@elsikora/nestjs-crud-automator 1.16.0 → 1.17.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/dist/cjs/class/api/authorization/engine.class.d.ts +8 -0
- package/dist/cjs/class/api/authorization/engine.class.js +92 -0
- package/dist/cjs/class/api/authorization/engine.class.js.map +1 -0
- package/dist/cjs/class/api/authorization/guard.class.d.ts +13 -0
- package/dist/cjs/class/api/authorization/guard.class.js +79 -0
- package/dist/cjs/class/api/authorization/guard.class.js.map +1 -0
- package/dist/cjs/class/api/authorization/index.d.ts +3 -0
- package/dist/cjs/class/api/authorization/policy/base.class.d.ts +37 -0
- package/dist/cjs/class/api/authorization/policy/base.class.js +68 -0
- package/dist/cjs/class/api/authorization/policy/base.class.js.map +1 -0
- package/dist/cjs/class/api/authorization/policy/discovery-service.class.d.ts +10 -0
- package/dist/cjs/class/api/authorization/policy/discovery-service.class.js +53 -0
- package/dist/cjs/class/api/authorization/policy/discovery-service.class.js.map +1 -0
- package/dist/cjs/class/api/authorization/policy/executor.class.d.ts +8 -0
- package/dist/cjs/class/api/authorization/policy/executor.class.js +43 -0
- package/dist/cjs/class/api/authorization/policy/executor.class.js.map +1 -0
- package/dist/cjs/class/api/authorization/policy/index.d.ts +4 -0
- package/dist/cjs/class/api/authorization/policy/registry.class.d.ts +26 -0
- package/dist/cjs/class/api/authorization/policy/registry.class.js +151 -0
- package/dist/cjs/class/api/authorization/policy/registry.class.js.map +1 -0
- package/dist/cjs/class/api/service-base.class.d.ts +2 -2
- package/dist/cjs/class/api/service-base.class.js.map +1 -1
- package/dist/cjs/class/index.d.ts +1 -0
- package/dist/cjs/constant/authorization/index.d.ts +3 -0
- package/dist/cjs/constant/authorization/metadata/decision.constant.d.ts +3 -0
- package/dist/cjs/constant/authorization/metadata/decision.constant.js +9 -0
- package/dist/cjs/constant/authorization/metadata/decision.constant.js.map +1 -0
- package/dist/cjs/constant/authorization/metadata/index.d.ts +1 -0
- package/dist/cjs/constant/authorization/policy/decorator.constant.d.ts +4 -0
- package/dist/cjs/constant/authorization/policy/decorator.constant.js +11 -0
- package/dist/cjs/constant/authorization/policy/decorator.constant.js.map +1 -0
- package/dist/cjs/constant/authorization/policy/index.d.ts +1 -0
- package/dist/cjs/constant/authorization/token/index.d.ts +1 -0
- package/dist/cjs/constant/authorization/token/registry.constant.d.ts +1 -0
- package/dist/cjs/constant/authorization/token/registry.constant.js +7 -0
- package/dist/cjs/constant/authorization/token/registry.constant.js.map +1 -0
- package/dist/cjs/constant/decorator/api/controller.constant.d.ts +2 -0
- package/dist/cjs/constant/decorator/api/controller.constant.js +4 -0
- package/dist/cjs/constant/decorator/api/controller.constant.js.map +1 -1
- package/dist/cjs/constant/index.d.ts +1 -0
- package/dist/cjs/decorator/api/authorization/index.d.ts +1 -0
- package/dist/cjs/decorator/api/authorization/policy.decorator.d.ts +9 -0
- package/dist/cjs/decorator/api/authorization/policy.decorator.js +25 -0
- package/dist/cjs/decorator/api/authorization/policy.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/controller/index.d.ts +1 -0
- package/dist/cjs/decorator/api/controller/securable.decorator.d.ts +6 -0
- package/dist/cjs/decorator/api/controller/securable.decorator.js +17 -0
- package/dist/cjs/decorator/api/controller/securable.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/index.d.ts +1 -0
- package/dist/cjs/decorator/api/method.decorator.js +7 -1
- package/dist/cjs/decorator/api/method.decorator.js.map +1 -1
- package/dist/cjs/enum/authorization/effect.enum.d.ts +4 -0
- package/dist/cjs/enum/authorization/effect.enum.js +8 -0
- package/dist/cjs/enum/authorization/effect.enum.js.map +1 -0
- package/dist/cjs/enum/authorization/index.d.ts +2 -0
- package/dist/cjs/enum/authorization/policy/index.d.ts +1 -0
- package/dist/cjs/enum/authorization/policy/on-type.enum.d.ts +3 -0
- package/dist/cjs/enum/authorization/policy/on-type.enum.js +7 -0
- package/dist/cjs/enum/authorization/policy/on-type.enum.js.map +1 -0
- package/dist/cjs/enum/index.d.ts +1 -0
- package/dist/cjs/external/tslib/tslib.es6.js +5 -0
- package/dist/cjs/external/tslib/tslib.es6.js.map +1 -1
- package/dist/cjs/factory/api/controller.factory.js +63 -28
- package/dist/cjs/factory/api/controller.factory.js.map +1 -1
- package/dist/cjs/index.js +60 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interface/api-authentication-request.interface.d.ts +3 -0
- package/dist/cjs/interface/authorization/decision.interface.d.ts +17 -0
- package/dist/cjs/interface/authorization/engine.interface.d.ts +6 -0
- package/dist/cjs/interface/authorization/evaluate-options.interface.d.ts +9 -0
- package/dist/cjs/interface/authorization/index.d.ts +7 -0
- package/dist/cjs/interface/authorization/policy/index.d.ts +3 -0
- package/dist/cjs/interface/authorization/policy/interface.d.ts +9 -0
- package/dist/cjs/interface/authorization/policy/registry.interface.d.ts +10 -0
- package/dist/cjs/interface/authorization/policy/subscriber/context.interface.d.ts +9 -0
- package/dist/cjs/interface/authorization/policy/subscriber/index.d.ts +5 -0
- package/dist/cjs/interface/authorization/policy/subscriber/interface.d.ts +14 -0
- package/dist/cjs/interface/authorization/policy/subscriber/properties.interface.d.ts +7 -0
- package/dist/cjs/interface/authorization/policy/subscriber/registration.interface.d.ts +9 -0
- package/dist/cjs/interface/authorization/policy/subscriber/rule.interface.d.ts +13 -0
- package/dist/cjs/interface/authorization/rule/context.interface.d.ts +6 -0
- package/dist/cjs/interface/authorization/rule/index.d.ts +2 -0
- package/dist/cjs/interface/authorization/rule/interface.d.ts +15 -0
- package/dist/cjs/interface/authorization/scope.interface.d.ts +5 -0
- package/dist/cjs/interface/authorization/subject.interface.d.ts +6 -0
- package/dist/cjs/interface/class/api/subscriber/route-execution-context-data.interface.d.ts +7 -1
- package/dist/cjs/interface/index.d.ts +1 -0
- package/dist/cjs/module/api/authorization.module.d.ts +7 -0
- package/dist/cjs/module/api/authorization.module.js +39 -0
- package/dist/cjs/module/api/authorization.module.js.map +1 -0
- package/dist/cjs/module/api/index.d.ts +2 -0
- package/dist/cjs/module/{api-subscriber.module.js → api/subscriber.module.js} +3 -3
- package/dist/cjs/module/api/subscriber.module.js.map +1 -0
- package/dist/cjs/module/index.d.ts +1 -1
- package/dist/cjs/type/class/api/authorization/guard-request.type.d.ts +7 -0
- package/dist/cjs/type/class/api/authorization/index.d.ts +4 -0
- package/dist/cjs/type/class/api/authorization/policy/hook/index.d.ts +2 -0
- package/dist/cjs/type/class/api/authorization/policy/hook/result.type.d.ts +8 -0
- package/dist/cjs/type/class/api/authorization/policy/hook/type.d.ts +5 -0
- package/dist/cjs/type/class/api/authorization/policy/index.d.ts +2 -0
- package/dist/cjs/type/class/api/authorization/policy/policy-subscriber-rule-result.type.d.ts +3 -0
- package/dist/cjs/type/class/api/authorization/rule/condition.type.d.ts +3 -0
- package/dist/cjs/type/class/api/authorization/rule/index.d.ts +4 -0
- package/dist/cjs/type/class/api/authorization/rule/result-transform.type.d.ts +4 -0
- package/dist/cjs/type/class/api/authorization/rule/scope-resolver.type.d.ts +4 -0
- package/dist/cjs/type/class/api/authorization/rule/transform-payload.type.d.ts +3 -0
- package/dist/cjs/type/class/api/authorization/scope-where.type.d.ts +3 -0
- package/dist/cjs/type/class/api/subscriber/route/after/create-context.type.d.ts +1 -1
- package/dist/cjs/type/class/api/subscriber/route/after/delete-context.type.d.ts +1 -1
- package/dist/cjs/type/class/api/subscriber/route/after/get/context.type.d.ts +1 -1
- package/dist/cjs/type/class/api/subscriber/route/after/get/list-context.type.d.ts +2 -1
- package/dist/cjs/type/class/api/subscriber/route/after/get/many-context.type.d.ts +1 -1
- package/dist/cjs/type/class/api/subscriber/route/after/update-context.type.d.ts +1 -1
- package/dist/cjs/type/index.d.ts +1 -0
- package/dist/cjs/utility/api/controller/apply-metadata.utility.js +3 -5
- package/dist/cjs/utility/api/controller/apply-metadata.utility.js.map +1 -1
- package/dist/cjs/utility/authorization/decision/apply-result.utility.d.ts +12 -0
- package/dist/cjs/utility/authorization/decision/apply-result.utility.js +27 -0
- package/dist/cjs/utility/authorization/decision/apply-result.utility.js.map +1 -0
- package/dist/cjs/utility/authorization/decision/attach-resource.utility.d.ts +11 -0
- package/dist/cjs/utility/authorization/decision/attach-resource.utility.js +20 -0
- package/dist/cjs/utility/authorization/decision/attach-resource.utility.js.map +1 -0
- package/dist/cjs/utility/authorization/decision/index.d.ts +3 -0
- package/dist/cjs/utility/authorization/decision/resolve-from-request.utility.d.ts +12 -0
- package/dist/cjs/utility/authorization/decision/resolve-from-request.utility.js +22 -0
- package/dist/cjs/utility/authorization/decision/resolve-from-request.utility.js.map +1 -0
- package/dist/cjs/utility/authorization/index.d.ts +3 -0
- package/dist/cjs/utility/authorization/scope/index.d.ts +1 -0
- package/dist/cjs/utility/authorization/scope/merge/index.d.ts +1 -0
- package/dist/cjs/utility/authorization/scope/merge/where.utility.d.ts +10 -0
- package/dist/cjs/utility/authorization/scope/merge/where.utility.js +32 -0
- package/dist/cjs/utility/authorization/scope/merge/where.utility.js.map +1 -0
- package/dist/cjs/utility/authorization/subject/index.d.ts +1 -0
- package/dist/cjs/utility/authorization/subject/resolve-default-subject.utility.d.ts +7 -0
- package/dist/cjs/utility/authorization/subject/resolve-default-subject.utility.js +52 -0
- package/dist/cjs/utility/authorization/subject/resolve-default-subject.utility.js.map +1 -0
- package/dist/cjs/utility/index.d.ts +1 -0
- package/dist/esm/class/api/authorization/engine.class.d.ts +8 -0
- package/dist/esm/class/api/authorization/engine.class.js +92 -0
- package/dist/esm/class/api/authorization/engine.class.js.map +1 -0
- package/dist/esm/class/api/authorization/guard.class.d.ts +13 -0
- package/dist/esm/class/api/authorization/guard.class.js +79 -0
- package/dist/esm/class/api/authorization/guard.class.js.map +1 -0
- package/dist/esm/class/api/authorization/index.d.ts +3 -0
- package/dist/esm/class/api/authorization/policy/base.class.d.ts +37 -0
- package/dist/esm/class/api/authorization/policy/base.class.js +66 -0
- package/dist/esm/class/api/authorization/policy/base.class.js.map +1 -0
- package/dist/esm/class/api/authorization/policy/discovery-service.class.d.ts +10 -0
- package/dist/esm/class/api/authorization/policy/discovery-service.class.js +53 -0
- package/dist/esm/class/api/authorization/policy/discovery-service.class.js.map +1 -0
- package/dist/esm/class/api/authorization/policy/executor.class.d.ts +8 -0
- package/dist/esm/class/api/authorization/policy/executor.class.js +41 -0
- package/dist/esm/class/api/authorization/policy/executor.class.js.map +1 -0
- package/dist/esm/class/api/authorization/policy/index.d.ts +4 -0
- package/dist/esm/class/api/authorization/policy/registry.class.d.ts +26 -0
- package/dist/esm/class/api/authorization/policy/registry.class.js +148 -0
- package/dist/esm/class/api/authorization/policy/registry.class.js.map +1 -0
- package/dist/esm/class/api/service-base.class.d.ts +2 -2
- package/dist/esm/class/api/service-base.class.js.map +1 -1
- package/dist/esm/class/index.d.ts +1 -0
- package/dist/esm/constant/authorization/index.d.ts +3 -0
- package/dist/esm/constant/authorization/metadata/decision.constant.d.ts +3 -0
- package/dist/esm/constant/authorization/metadata/decision.constant.js +7 -0
- package/dist/esm/constant/authorization/metadata/decision.constant.js.map +1 -0
- package/dist/esm/constant/authorization/metadata/index.d.ts +1 -0
- package/dist/esm/constant/authorization/policy/decorator.constant.d.ts +4 -0
- package/dist/esm/constant/authorization/policy/decorator.constant.js +9 -0
- package/dist/esm/constant/authorization/policy/decorator.constant.js.map +1 -0
- package/dist/esm/constant/authorization/policy/index.d.ts +1 -0
- package/dist/esm/constant/authorization/token/index.d.ts +1 -0
- package/dist/esm/constant/authorization/token/registry.constant.d.ts +1 -0
- package/dist/esm/constant/authorization/token/registry.constant.js +5 -0
- package/dist/esm/constant/authorization/token/registry.constant.js.map +1 -0
- package/dist/esm/constant/decorator/api/controller.constant.d.ts +2 -0
- package/dist/esm/constant/decorator/api/controller.constant.js +4 -0
- package/dist/esm/constant/decorator/api/controller.constant.js.map +1 -1
- package/dist/esm/constant/index.d.ts +1 -0
- package/dist/esm/decorator/api/authorization/index.d.ts +1 -0
- package/dist/esm/decorator/api/authorization/policy.decorator.d.ts +9 -0
- package/dist/esm/decorator/api/authorization/policy.decorator.js +23 -0
- package/dist/esm/decorator/api/authorization/policy.decorator.js.map +1 -0
- package/dist/esm/decorator/api/controller/index.d.ts +1 -0
- package/dist/esm/decorator/api/controller/securable.decorator.d.ts +6 -0
- package/dist/esm/decorator/api/controller/securable.decorator.js +15 -0
- package/dist/esm/decorator/api/controller/securable.decorator.js.map +1 -0
- package/dist/esm/decorator/api/index.d.ts +1 -0
- package/dist/esm/decorator/api/method.decorator.js +7 -1
- package/dist/esm/decorator/api/method.decorator.js.map +1 -1
- package/dist/esm/enum/authorization/effect.enum.d.ts +4 -0
- package/dist/esm/enum/authorization/effect.enum.js +8 -0
- package/dist/esm/enum/authorization/effect.enum.js.map +1 -0
- package/dist/esm/enum/authorization/index.d.ts +2 -0
- package/dist/esm/enum/authorization/policy/index.d.ts +1 -0
- package/dist/esm/enum/authorization/policy/on-type.enum.d.ts +3 -0
- package/dist/esm/enum/authorization/policy/on-type.enum.js +7 -0
- package/dist/esm/enum/authorization/policy/on-type.enum.js.map +1 -0
- package/dist/esm/enum/index.d.ts +1 -0
- package/dist/esm/external/tslib/tslib.es6.js +5 -1
- package/dist/esm/external/tslib/tslib.es6.js.map +1 -1
- package/dist/esm/factory/api/controller.factory.js +63 -28
- package/dist/esm/factory/api/controller.factory.js.map +1 -1
- package/dist/esm/index.js +20 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interface/api-authentication-request.interface.d.ts +3 -0
- package/dist/esm/interface/authorization/decision.interface.d.ts +17 -0
- package/dist/esm/interface/authorization/engine.interface.d.ts +6 -0
- package/dist/esm/interface/authorization/evaluate-options.interface.d.ts +9 -0
- package/dist/esm/interface/authorization/index.d.ts +7 -0
- package/dist/esm/interface/authorization/policy/index.d.ts +3 -0
- package/dist/esm/interface/authorization/policy/interface.d.ts +9 -0
- package/dist/esm/interface/authorization/policy/registry.interface.d.ts +10 -0
- package/dist/esm/interface/authorization/policy/subscriber/context.interface.d.ts +9 -0
- package/dist/esm/interface/authorization/policy/subscriber/index.d.ts +5 -0
- package/dist/esm/interface/authorization/policy/subscriber/interface.d.ts +14 -0
- package/dist/esm/interface/authorization/policy/subscriber/properties.interface.d.ts +7 -0
- package/dist/esm/interface/authorization/policy/subscriber/registration.interface.d.ts +9 -0
- package/dist/esm/interface/authorization/policy/subscriber/rule.interface.d.ts +13 -0
- package/dist/esm/interface/authorization/rule/context.interface.d.ts +6 -0
- package/dist/esm/interface/authorization/rule/index.d.ts +2 -0
- package/dist/esm/interface/authorization/rule/interface.d.ts +15 -0
- package/dist/esm/interface/authorization/scope.interface.d.ts +5 -0
- package/dist/esm/interface/authorization/subject.interface.d.ts +6 -0
- package/dist/esm/interface/class/api/subscriber/route-execution-context-data.interface.d.ts +7 -1
- package/dist/esm/interface/index.d.ts +1 -0
- package/dist/esm/module/api/authorization.module.d.ts +7 -0
- package/dist/esm/module/api/authorization.module.js +39 -0
- package/dist/esm/module/api/authorization.module.js.map +1 -0
- package/dist/esm/module/api/index.d.ts +2 -0
- package/dist/esm/module/{api-subscriber.module.js → api/subscriber.module.js} +3 -3
- package/dist/esm/module/api/subscriber.module.js.map +1 -0
- package/dist/esm/module/index.d.ts +1 -1
- package/dist/esm/type/class/api/authorization/guard-request.type.d.ts +7 -0
- package/dist/esm/type/class/api/authorization/index.d.ts +4 -0
- package/dist/esm/type/class/api/authorization/policy/hook/index.d.ts +2 -0
- package/dist/esm/type/class/api/authorization/policy/hook/result.type.d.ts +8 -0
- package/dist/esm/type/class/api/authorization/policy/hook/type.d.ts +5 -0
- package/dist/esm/type/class/api/authorization/policy/index.d.ts +2 -0
- package/dist/esm/type/class/api/authorization/policy/policy-subscriber-rule-result.type.d.ts +3 -0
- package/dist/esm/type/class/api/authorization/rule/condition.type.d.ts +3 -0
- package/dist/esm/type/class/api/authorization/rule/index.d.ts +4 -0
- package/dist/esm/type/class/api/authorization/rule/result-transform.type.d.ts +4 -0
- package/dist/esm/type/class/api/authorization/rule/scope-resolver.type.d.ts +4 -0
- package/dist/esm/type/class/api/authorization/rule/transform-payload.type.d.ts +3 -0
- package/dist/esm/type/class/api/authorization/scope-where.type.d.ts +3 -0
- package/dist/esm/type/class/api/subscriber/route/after/create-context.type.d.ts +1 -1
- package/dist/esm/type/class/api/subscriber/route/after/delete-context.type.d.ts +1 -1
- package/dist/esm/type/class/api/subscriber/route/after/get/context.type.d.ts +1 -1
- package/dist/esm/type/class/api/subscriber/route/after/get/list-context.type.d.ts +2 -1
- package/dist/esm/type/class/api/subscriber/route/after/get/many-context.type.d.ts +1 -1
- package/dist/esm/type/class/api/subscriber/route/after/update-context.type.d.ts +1 -1
- package/dist/esm/type/index.d.ts +1 -0
- package/dist/esm/utility/api/controller/apply-metadata.utility.js +3 -5
- package/dist/esm/utility/api/controller/apply-metadata.utility.js.map +1 -1
- package/dist/esm/utility/authorization/decision/apply-result.utility.d.ts +12 -0
- package/dist/esm/utility/authorization/decision/apply-result.utility.js +25 -0
- package/dist/esm/utility/authorization/decision/apply-result.utility.js.map +1 -0
- package/dist/esm/utility/authorization/decision/attach-resource.utility.d.ts +11 -0
- package/dist/esm/utility/authorization/decision/attach-resource.utility.js +18 -0
- package/dist/esm/utility/authorization/decision/attach-resource.utility.js.map +1 -0
- package/dist/esm/utility/authorization/decision/index.d.ts +3 -0
- package/dist/esm/utility/authorization/decision/resolve-from-request.utility.d.ts +12 -0
- package/dist/esm/utility/authorization/decision/resolve-from-request.utility.js +20 -0
- package/dist/esm/utility/authorization/decision/resolve-from-request.utility.js.map +1 -0
- package/dist/esm/utility/authorization/index.d.ts +3 -0
- package/dist/esm/utility/authorization/scope/index.d.ts +1 -0
- package/dist/esm/utility/authorization/scope/merge/index.d.ts +1 -0
- package/dist/esm/utility/authorization/scope/merge/where.utility.d.ts +10 -0
- package/dist/esm/utility/authorization/scope/merge/where.utility.js +30 -0
- package/dist/esm/utility/authorization/scope/merge/where.utility.js.map +1 -0
- package/dist/esm/utility/authorization/subject/index.d.ts +1 -0
- package/dist/esm/utility/authorization/subject/resolve-default-subject.utility.d.ts +7 -0
- package/dist/esm/utility/authorization/subject/resolve-default-subject.utility.js +50 -0
- package/dist/esm/utility/authorization/subject/resolve-default-subject.utility.js.map +1 -0
- package/dist/esm/utility/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/module/api-subscriber.module.js.map +0 -1
- package/dist/esm/module/api-subscriber.module.js.map +0 -1
- /package/dist/cjs/module/{api-subscriber.module.d.ts → api/subscriber.module.d.ts} +0 -0
- /package/dist/esm/module/{api-subscriber.module.d.ts → api/subscriber.module.d.ts} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiAuthorizationGuard } from '../../class/api/authorization/guard.class.js';
|
|
1
2
|
import { pluralizer } from '@elsikora/pluralizer';
|
|
2
3
|
import { EApiAction } from '../../enum/decorator/api/action.enum.js';
|
|
3
4
|
import '../../enum/decorator/api/authentication-type.enum.js';
|
|
@@ -343,6 +344,7 @@ function ApiMethod(options) {
|
|
|
343
344
|
throw new Error(`ApiMethod error: Method ${String(options.method)} is not supported`);
|
|
344
345
|
}
|
|
345
346
|
}
|
|
347
|
+
const guards = [];
|
|
346
348
|
if (options.authentication) {
|
|
347
349
|
if (options.authentication?.bearerStrategies?.length) {
|
|
348
350
|
for (const strategy of options.authentication?.bearerStrategies ?? []) {
|
|
@@ -354,8 +356,12 @@ function ApiMethod(options) {
|
|
|
354
356
|
decorators.push(ApiSecurity(strategy));
|
|
355
357
|
}
|
|
356
358
|
}
|
|
357
|
-
|
|
359
|
+
if (options.authentication.guard) {
|
|
360
|
+
guards.push(options.authentication.guard);
|
|
361
|
+
}
|
|
358
362
|
}
|
|
363
|
+
guards.push(ApiAuthorizationGuard);
|
|
364
|
+
decorators.push(UseGuards(...guards));
|
|
359
365
|
return applyDecorators(...decorators);
|
|
360
366
|
}
|
|
361
367
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method.decorator.js","sources":["../../../../../src/decorator/api/method.decor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G,EAAE;YACvB,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAElC;QACD;QAEA,SAAS;AACR,YAAA,MAAM,IAAI,KAAK,CAAC,CAAA,wBAAA,EAA2B,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA,iBAAA,CAAmB,CAAC;QACtF;;AAGD,IAAA,IAAI,OAAO,CAAC,cAAc,EAAE;QAC3B,IAAI,OAAO,CAAC,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAAE;YACrD,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,cAAc,EAAE,gBAAgB,IAAI,EAAE,EAAE;gBACtE,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YACzC;QACD;QAEA,IAAI,OAAO,CAAC,cAAc,EAAE,kBAAkB,EAAE,MAAM,EAAE;YACvD,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC,kBAAkB,EAAE;gBACjE,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YACvC;QACD;AAEA,QAAA,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACzD;AAEA,IAAA,OAAO,eAAe,CAAC,GAAG,UAAU,CAAC;AACtC;;;;"}
|
|
1
|
+
{"version":3,"file":"method.decorator.js","sources":["../../../../../src/decorator/api/method.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAYA;;;;;AAKG;AACH;AACM,SAAU,SAAS,CAA2B,OAAgC,EAAA;IACnF,IAAI,OAAO,GAAW,EAAE;AAExB,IAAA,IAAI,OAAO,CAAC,MAAM,EAAE;AACnB,QAAA,QAAQ,OAAO,CAAC,MAAM;AACrB,YAAA,KAAK,UAAU,CAAC,OAAO,EAAE;AACxB,gBAAA,OAAO,GAAG,CAAA,YAAA,EAAe,UAAU,CA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AO,CAAC,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAAE;YACrD,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,cAAc,EAAE,gBAAgB,IAAI,EAAE,EAAE;gBACtE,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YACzC;QACD;QAEA,IAAI,OAAO,CAAC,cAAc,EAAE,kBAAkB,EAAE,MAAM,EAAE;YACvD,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC,kBAAkB,EAAE;gBACjE,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YACvC;QACD;AAEA,QAAA,IAAI,OAAO,CAAC,cAAc,CAAC,KAAK,EAAE;YACjC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC;QAC1C;IACD;AAEA,IAAA,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC;IAElC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,CAAC;AAErC,IAAA,OAAO,eAAe,CAAC,GAAG,UAAU,CAAC;AACtC;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var EAuthorizationEffect;
|
|
2
|
+
(function (EAuthorizationEffect) {
|
|
3
|
+
EAuthorizationEffect["ALLOW"] = "ALLOW";
|
|
4
|
+
EAuthorizationEffect["DENY"] = "DENY";
|
|
5
|
+
})(EAuthorizationEffect || (EAuthorizationEffect = {}));
|
|
6
|
+
|
|
7
|
+
export { EAuthorizationEffect };
|
|
8
|
+
//# sourceMappingURL=effect.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect.enum.js","sources":["../../../../../src/enum/authorization/effect.enum.ts"],"sourcesContent":[null],"names":[],"mappings":"IAAY;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAC/B,IAAA,oBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,oBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACd,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,GAAA,EAAA,CAAA,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EApiAuthorizationPolicyOnType } from './on-type.enum';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var EApiAuthorizationPolicyOnType;
|
|
2
|
+
(function (EApiAuthorizationPolicyOnType) {
|
|
3
|
+
EApiAuthorizationPolicyOnType["BEFORE"] = "Before";
|
|
4
|
+
})(EApiAuthorizationPolicyOnType || (EApiAuthorizationPolicyOnType = {}));
|
|
5
|
+
|
|
6
|
+
export { EApiAuthorizationPolicyOnType };
|
|
7
|
+
//# sourceMappingURL=on-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"on-type.enum.js","sources":["../../../../../../src/enum/authorization/policy/on-type.enum.ts"],"sourcesContent":[null],"names":[],"mappings":"IAAY;AAAZ,CAAA,UAAY,6BAA6B,EAAA;AACxC,IAAA,6BAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAClB,CAAC,EAFW,6BAA6B,KAA7B,6BAA6B,GAAA,EAAA,CAAA,CAAA;;;;"}
|
package/dist/esm/enum/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './authorization/index';
|
|
1
2
|
export * from './decorator/api/index';
|
|
2
3
|
export { EException } from './exception.enum';
|
|
3
4
|
export { EFilterOperation, EFilterOperationArray, EFilterOperationBoolean, EFilterOperationDate, EFilterOperationEnum, EFilterOperationNumber, EFilterOperationObject, EFilterOperationRelation, EFilterOperationString, EFilterOperationUuid } from './filter-operation.enum';
|
|
@@ -22,6 +22,10 @@ function __decorate(decorators, target, key, desc) {
|
|
|
22
22
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
function __param(paramIndex, decorator) {
|
|
26
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
27
|
+
}
|
|
28
|
+
|
|
25
29
|
function __metadata(metadataKey, metadataValue) {
|
|
26
30
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
27
31
|
}
|
|
@@ -31,5 +35,5 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
31
35
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
32
36
|
};
|
|
33
37
|
|
|
34
|
-
export { __decorate, __metadata };
|
|
38
|
+
export { __decorate, __metadata, __param };
|
|
35
39
|
//# sourceMappingURL=tslib.es6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tslib.es6.js","sources":["../../../../node_modules/tslib/tslib.es6.js"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAsCA;AACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;AAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;AACjI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACnI,SAAS,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;AACtJ,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;AAClE,CAAC;AAkDD;AACO,SAAS,UAAU,CAAC,WAAW,EAAE,aAAa,EAAE;AACvD,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AACnI,CAAC;AAuND;AACuB,OAAO,eAAe,KAAK,UAAU,GAAG,eAAe,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE;AACvH,IAAI,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC/B,IAAI,OAAO,CAAC,CAAC,IAAI,GAAG,iBAAiB,EAAE,CAAC,CAAC,KAAK,GAAG,KAAK,EAAE,CAAC,CAAC,UAAU,GAAG,UAAU,EAAE,CAAC,CAAC;AACrF;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"tslib.es6.js","sources":["../../../../node_modules/tslib/tslib.es6.js"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAsCA;AACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;AAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;AACjI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE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AU,EAAE,CAAC,CAAC;AACrF;;;;","x_google_ignoreList":[0]}
|
|
@@ -32,6 +32,10 @@ import '../../constant/interface/api/property/default-string-format.constant.js'
|
|
|
32
32
|
import 'typeorm';
|
|
33
33
|
import 'reflect-metadata';
|
|
34
34
|
import 'lodash/cloneDeep';
|
|
35
|
+
import { AuthorizationDecisionApplyResult } from '../../utility/authorization/decision/apply-result.utility.js';
|
|
36
|
+
import { AuthorizationDecisionAttachResource } from '../../utility/authorization/decision/attach-resource.utility.js';
|
|
37
|
+
import { AuthorizationDecisionResolveFromRequest } from '../../utility/authorization/decision/resolve-from-request.utility.js';
|
|
38
|
+
import { AuthorizationScopeMergeWhere } from '../../utility/authorization/scope/merge/where.utility.js';
|
|
35
39
|
import { analyzeEntityMetadata } from '../../utility/dto/analize.utility.js';
|
|
36
40
|
import '../../constant/utility/dto/constant.js';
|
|
37
41
|
import { ErrorException } from '../../utility/error-exception.utility.js';
|
|
@@ -64,6 +68,7 @@ class ApiControllerFactory {
|
|
|
64
68
|
}
|
|
65
69
|
Controller(this.properties.path ?? (this.properties.entity.name ? this.properties.entity.name.toLowerCase() : "UnknownResource"))(this.target);
|
|
66
70
|
ApiTags(this.properties.name ?? this.properties.entity.name ?? "UnknownResource")(this.target);
|
|
71
|
+
Reflect.defineMetadata(CONTROLLER_API_DECORATOR_CONSTANT.ENTITY_METADATA_KEY, this.properties.entity, this.target);
|
|
67
72
|
}
|
|
68
73
|
createMethod(method) {
|
|
69
74
|
if (!(method in this.properties.routes) || this.properties.routes[method]?.isEnabled !== false) {
|
|
@@ -94,8 +99,9 @@ class ApiControllerFactory {
|
|
|
94
99
|
[EApiRouteType.CREATE](method, methodName, properties, entityMetadata) {
|
|
95
100
|
this.targetPrototype[methodName] = Object.defineProperty(async function (body, headers, ip, authenticationRequest) {
|
|
96
101
|
const entityInstance = new properties.entity();
|
|
102
|
+
let authorizationDecision = AuthorizationDecisionResolveFromRequest(authenticationRequest);
|
|
97
103
|
const beforeExecutionContext = {
|
|
98
|
-
DATA: { entityMetadata, method, methodName, properties },
|
|
104
|
+
DATA: { authorizationDecision, entityMetadata, method, methodName, properties },
|
|
99
105
|
ENTITY: entityInstance,
|
|
100
106
|
result: { authenticationRequest, body, headers, ip },
|
|
101
107
|
ROUTE_TYPE: EApiRouteType.CREATE,
|
|
@@ -106,6 +112,7 @@ class ApiControllerFactory {
|
|
|
106
112
|
headers = beforeResult.headers;
|
|
107
113
|
ip = beforeResult.ip;
|
|
108
114
|
authenticationRequest = beforeResult.authenticationRequest;
|
|
115
|
+
authorizationDecision = AuthorizationDecisionResolveFromRequest(authenticationRequest);
|
|
109
116
|
}
|
|
110
117
|
try {
|
|
111
118
|
const primaryKey = ApiControllerGetPrimaryColumn(body, entityMetadata);
|
|
@@ -125,19 +132,22 @@ class ApiControllerFactory {
|
|
|
125
132
|
const dto = DtoGenerate(properties.entity, entityMetadata, method, EApiDtoType.RESPONSE, properties.routes[method]?.autoDto?.[EApiDtoType.RESPONSE], properties.routes[method]?.authentication?.guard);
|
|
126
133
|
const requestProperties = {
|
|
127
134
|
relations: properties.routes[method]?.response?.relations,
|
|
128
|
-
where: { [primaryKey.key]: createResponse[primaryKey.key] },
|
|
135
|
+
where: AuthorizationScopeMergeWhere({ [primaryKey.key]: createResponse[primaryKey.key] }, authorizationDecision?.scope?.where),
|
|
129
136
|
};
|
|
130
137
|
const response = await this.service.get(requestProperties);
|
|
138
|
+
authorizationDecision = AuthorizationDecisionAttachResource(authorizationDecision, response);
|
|
131
139
|
ApiControllerTransformData(properties.routes[method]?.response?.transformers, properties, { response }, { authenticationRequest, headers, ip });
|
|
132
140
|
const afterExecutionContext = {
|
|
133
|
-
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, body, headers, ip },
|
|
141
|
+
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, authorizationDecision, body, headers, ip },
|
|
134
142
|
ENTITY: response,
|
|
135
143
|
result: response,
|
|
136
144
|
ROUTE_TYPE: EApiRouteType.CREATE,
|
|
137
145
|
};
|
|
138
146
|
const afterResult = await ApiSubscriberExecutor.executeRouteSubscribers(this.constructor, response, EApiRouteType.CREATE, EApiSubscriberOnType.AFTER, afterExecutionContext);
|
|
139
147
|
const finalResponse = afterResult ?? response;
|
|
140
|
-
|
|
148
|
+
authorizationDecision = AuthorizationDecisionAttachResource(authorizationDecision, finalResponse);
|
|
149
|
+
const transformedResponse = await AuthorizationDecisionApplyResult(authorizationDecision, finalResponse);
|
|
150
|
+
return plainToInstance(dto, transformedResponse, {
|
|
141
151
|
/* eslint-disable-next-line @elsikora/typescript/naming-convention */
|
|
142
152
|
excludeExtraneousValues: true,
|
|
143
153
|
strategy: "excludeAll",
|
|
@@ -145,7 +155,7 @@ class ApiControllerFactory {
|
|
|
145
155
|
}
|
|
146
156
|
catch (error) {
|
|
147
157
|
const errorExecutionContext = {
|
|
148
|
-
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, body, headers, ip },
|
|
158
|
+
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, authorizationDecision, body, headers, ip },
|
|
149
159
|
ENTITY: entityInstance,
|
|
150
160
|
ROUTE_TYPE: EApiRouteType.CREATE,
|
|
151
161
|
};
|
|
@@ -157,8 +167,9 @@ class ApiControllerFactory {
|
|
|
157
167
|
[EApiRouteType.DELETE](method, methodName, properties, entityMetadata) {
|
|
158
168
|
this.targetPrototype[methodName] = Object.defineProperty(async function (parameters, headers, ip, authenticationRequest) {
|
|
159
169
|
const entityInstance = new properties.entity();
|
|
170
|
+
let authorizationDecision = AuthorizationDecisionResolveFromRequest(authenticationRequest);
|
|
160
171
|
const beforeExecutionContext = {
|
|
161
|
-
DATA: { entityMetadata, method, methodName, properties },
|
|
172
|
+
DATA: { authorizationDecision, entityMetadata, method, methodName, properties },
|
|
162
173
|
ENTITY: entityInstance,
|
|
163
174
|
result: { authenticationRequest, headers, ip, parameters },
|
|
164
175
|
ROUTE_TYPE: EApiRouteType.DELETE,
|
|
@@ -169,6 +180,7 @@ class ApiControllerFactory {
|
|
|
169
180
|
headers = beforeResult.headers;
|
|
170
181
|
ip = beforeResult.ip;
|
|
171
182
|
authenticationRequest = beforeResult.authenticationRequest;
|
|
183
|
+
authorizationDecision = AuthorizationDecisionResolveFromRequest(authenticationRequest);
|
|
172
184
|
}
|
|
173
185
|
try {
|
|
174
186
|
const primaryKey = ApiControllerGetPrimaryColumn(parameters, entityMetadata);
|
|
@@ -187,9 +199,10 @@ class ApiControllerFactory {
|
|
|
187
199
|
const requestCriteria = {
|
|
188
200
|
[primaryKey.key]: primaryKey.value,
|
|
189
201
|
};
|
|
190
|
-
|
|
202
|
+
const scopedCriteria = AuthorizationScopeMergeWhere(requestCriteria, authorizationDecision?.scope?.where);
|
|
203
|
+
await this.service.delete(scopedCriteria ?? requestCriteria);
|
|
191
204
|
const afterExecutionContext = {
|
|
192
|
-
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, headers, ip, parameters },
|
|
205
|
+
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, authorizationDecision, headers, ip, parameters },
|
|
193
206
|
ENTITY: entityInstance,
|
|
194
207
|
result: parameters,
|
|
195
208
|
ROUTE_TYPE: EApiRouteType.DELETE,
|
|
@@ -198,7 +211,7 @@ class ApiControllerFactory {
|
|
|
198
211
|
}
|
|
199
212
|
catch (error) {
|
|
200
213
|
const errorExecutionContext = {
|
|
201
|
-
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, headers, ip, parameters },
|
|
214
|
+
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, authorizationDecision, headers, ip, parameters },
|
|
202
215
|
ENTITY: entityInstance,
|
|
203
216
|
ROUTE_TYPE: EApiRouteType.DELETE,
|
|
204
217
|
};
|
|
@@ -210,8 +223,9 @@ class ApiControllerFactory {
|
|
|
210
223
|
[EApiRouteType.GET](method, methodName, properties, entityMetadata) {
|
|
211
224
|
this.targetPrototype[methodName] = Object.defineProperty(async function (parameters, headers, ip, authenticationRequest) {
|
|
212
225
|
const entityInstance = new properties.entity();
|
|
226
|
+
let authorizationDecision = AuthorizationDecisionResolveFromRequest(authenticationRequest);
|
|
213
227
|
const beforeExecutionContext = {
|
|
214
|
-
DATA: { entityMetadata, method, methodName, properties },
|
|
228
|
+
DATA: { authorizationDecision, entityMetadata, method, methodName, properties },
|
|
215
229
|
ENTITY: entityInstance,
|
|
216
230
|
result: { authenticationRequest, headers, ip, parameters },
|
|
217
231
|
ROUTE_TYPE: EApiRouteType.GET,
|
|
@@ -222,6 +236,7 @@ class ApiControllerFactory {
|
|
|
222
236
|
headers = beforeResult.headers;
|
|
223
237
|
ip = beforeResult.ip;
|
|
224
238
|
authenticationRequest = beforeResult.authenticationRequest;
|
|
239
|
+
authorizationDecision = AuthorizationDecisionResolveFromRequest(authenticationRequest);
|
|
225
240
|
}
|
|
226
241
|
try {
|
|
227
242
|
const primaryKey = ApiControllerGetPrimaryColumn(parameters, entityMetadata);
|
|
@@ -241,25 +256,29 @@ class ApiControllerFactory {
|
|
|
241
256
|
relations: properties.routes[method]?.response?.relations,
|
|
242
257
|
where: { [primaryKey.key]: primaryKey.value },
|
|
243
258
|
};
|
|
259
|
+
requestProperties.where = AuthorizationScopeMergeWhere(requestProperties.where, authorizationDecision?.scope?.where);
|
|
244
260
|
const response = await this.service.get(requestProperties);
|
|
261
|
+
authorizationDecision = AuthorizationDecisionAttachResource(authorizationDecision, response);
|
|
245
262
|
ApiControllerTransformData(properties.routes[method]?.response?.transformers, properties, { response }, { authenticationRequest, headers, ip });
|
|
246
263
|
const afterExecutionContext = {
|
|
247
|
-
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, headers, ip, parameters },
|
|
264
|
+
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, authorizationDecision, headers, ip, parameters },
|
|
248
265
|
ENTITY: response,
|
|
249
266
|
result: response,
|
|
250
267
|
ROUTE_TYPE: EApiRouteType.GET,
|
|
251
268
|
};
|
|
252
269
|
const afterResult = await ApiSubscriberExecutor.executeRouteSubscribers(this.constructor, response, EApiRouteType.GET, EApiSubscriberOnType.AFTER, afterExecutionContext);
|
|
253
270
|
const finalResponse = afterResult ?? response;
|
|
271
|
+
authorizationDecision = AuthorizationDecisionAttachResource(authorizationDecision, finalResponse);
|
|
272
|
+
const transformedResponse = await AuthorizationDecisionApplyResult(authorizationDecision, finalResponse);
|
|
254
273
|
const dto = DtoGenerate(properties.entity, entityMetadata, method, EApiDtoType.RESPONSE, properties.routes[method]?.autoDto?.[EApiDtoType.RESPONSE], properties.routes[method]?.authentication?.guard);
|
|
255
|
-
return plainToInstance(dto,
|
|
274
|
+
return plainToInstance(dto, transformedResponse, {
|
|
256
275
|
/* eslint-disable-next-line @elsikora/typescript/naming-convention */
|
|
257
276
|
excludeExtraneousValues: true,
|
|
258
277
|
});
|
|
259
278
|
}
|
|
260
279
|
catch (error) {
|
|
261
280
|
const errorExecutionContext = {
|
|
262
|
-
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, headers, ip, parameters },
|
|
281
|
+
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, authorizationDecision, headers, ip, parameters },
|
|
263
282
|
ENTITY: entityInstance,
|
|
264
283
|
ROUTE_TYPE: EApiRouteType.GET,
|
|
265
284
|
};
|
|
@@ -271,8 +290,9 @@ class ApiControllerFactory {
|
|
|
271
290
|
[EApiRouteType.GET_LIST](method, methodName, properties, entityMetadata) {
|
|
272
291
|
this.targetPrototype[methodName] = Object.defineProperty(async function (query, headers, ip, authenticationRequest) {
|
|
273
292
|
const entityInstance = new properties.entity();
|
|
293
|
+
let authorizationDecision = AuthorizationDecisionResolveFromRequest(authenticationRequest);
|
|
274
294
|
const beforeExecutionContext = {
|
|
275
|
-
DATA: { entityMetadata, method, methodName, properties },
|
|
295
|
+
DATA: { authorizationDecision, entityMetadata, method, methodName, properties },
|
|
276
296
|
ENTITY: entityInstance,
|
|
277
297
|
result: { authenticationRequest, headers, ip, query },
|
|
278
298
|
ROUTE_TYPE: EApiRouteType.GET_LIST,
|
|
@@ -283,6 +303,7 @@ class ApiControllerFactory {
|
|
|
283
303
|
headers = beforeResult.headers;
|
|
284
304
|
ip = beforeResult.ip;
|
|
285
305
|
authenticationRequest = beforeResult.authenticationRequest;
|
|
306
|
+
authorizationDecision = AuthorizationDecisionResolveFromRequest(authenticationRequest);
|
|
286
307
|
}
|
|
287
308
|
try {
|
|
288
309
|
ApiControllerTransformData(properties.routes[method]?.request?.transformers, properties, { query }, { authenticationRequest, headers, ip });
|
|
@@ -290,11 +311,12 @@ class ApiControllerFactory {
|
|
|
290
311
|
await ApiControllerHandleRequestRelations(this, properties, properties.routes[method]?.request?.relations, query);
|
|
291
312
|
const { limit, orderBy, orderDirection, page, ...getListQuery } = query;
|
|
292
313
|
const filter = ApiControllerGetListTransformFilter(getListQuery, entityMetadata);
|
|
314
|
+
const scopedFilter = AuthorizationScopeMergeWhere(filter, authorizationDecision?.scope?.where);
|
|
293
315
|
const requestProperties = {
|
|
294
316
|
relations: properties.routes[method]?.response?.relations,
|
|
295
317
|
skip: query.limit * (query.page - 1),
|
|
296
318
|
take: query.limit,
|
|
297
|
-
where: filter,
|
|
319
|
+
where: scopedFilter ?? filter,
|
|
298
320
|
};
|
|
299
321
|
if (orderBy) {
|
|
300
322
|
requestProperties.order = { [orderBy]: orderDirection ?? FUNCTION_API_DECORATOR_CONSTANT.DEFAULT_FILTER_ORDER_BY_DIRECTION };
|
|
@@ -302,22 +324,23 @@ class ApiControllerFactory {
|
|
|
302
324
|
const response = await this.service.getList(requestProperties);
|
|
303
325
|
ApiControllerTransformData(properties.routes[method]?.request?.transformers, properties, { response }, { authenticationRequest, headers, ip });
|
|
304
326
|
const afterExecutionContext = {
|
|
305
|
-
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, headers, ip, query },
|
|
327
|
+
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, authorizationDecision, headers, ip, query },
|
|
306
328
|
ENTITY: entityInstance,
|
|
307
329
|
result: response,
|
|
308
330
|
ROUTE_TYPE: EApiRouteType.GET_LIST,
|
|
309
331
|
};
|
|
310
332
|
const afterResult = await ApiSubscriberExecutor.executeRouteSubscribers(this.constructor, entityInstance, EApiRouteType.GET_LIST, EApiSubscriberOnType.AFTER, afterExecutionContext);
|
|
311
333
|
const finalResponse = afterResult ?? response;
|
|
334
|
+
const transformedResponse = await AuthorizationDecisionApplyResult(authorizationDecision, finalResponse);
|
|
312
335
|
const dto = DtoGenerate(properties.entity, entityMetadata, method, EApiDtoType.RESPONSE, properties.routes[method]?.autoDto?.[EApiDtoType.RESPONSE], properties.routes[method]?.authentication?.guard);
|
|
313
|
-
return plainToInstance(dto,
|
|
336
|
+
return plainToInstance(dto, transformedResponse, {
|
|
314
337
|
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
315
338
|
excludeExtraneousValues: true,
|
|
316
339
|
});
|
|
317
340
|
}
|
|
318
341
|
catch (error) {
|
|
319
342
|
const errorExecutionContext = {
|
|
320
|
-
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, headers, ip, query },
|
|
343
|
+
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, authorizationDecision, headers, ip, query },
|
|
321
344
|
ENTITY: entityInstance,
|
|
322
345
|
ROUTE_TYPE: EApiRouteType.GET_LIST,
|
|
323
346
|
};
|
|
@@ -329,8 +352,9 @@ class ApiControllerFactory {
|
|
|
329
352
|
[EApiRouteType.PARTIAL_UPDATE](method, methodName, properties, entityMetadata) {
|
|
330
353
|
this.targetPrototype[methodName] = Object.defineProperty(async function (parameters, body, headers, ip, authenticationRequest) {
|
|
331
354
|
const entityInstance = new properties.entity();
|
|
355
|
+
let authorizationDecision = AuthorizationDecisionResolveFromRequest(authenticationRequest);
|
|
332
356
|
const beforeExecutionContext = {
|
|
333
|
-
DATA: { entityMetadata, method, methodName, properties },
|
|
357
|
+
DATA: { authorizationDecision, entityMetadata, method, methodName, properties },
|
|
334
358
|
ENTITY: entityInstance,
|
|
335
359
|
result: { authenticationRequest, body, headers, ip, parameters },
|
|
336
360
|
ROUTE_TYPE: EApiRouteType.PARTIAL_UPDATE,
|
|
@@ -342,6 +366,7 @@ class ApiControllerFactory {
|
|
|
342
366
|
headers = beforeResult.headers;
|
|
343
367
|
ip = beforeResult.ip;
|
|
344
368
|
authenticationRequest = beforeResult.authenticationRequest;
|
|
369
|
+
authorizationDecision = AuthorizationDecisionResolveFromRequest(authenticationRequest);
|
|
345
370
|
}
|
|
346
371
|
try {
|
|
347
372
|
const primaryKey = ApiControllerGetPrimaryColumn(parameters, entityMetadata);
|
|
@@ -360,25 +385,29 @@ class ApiControllerFactory {
|
|
|
360
385
|
const requestCriteria = {
|
|
361
386
|
[primaryKey.key]: primaryKey.value,
|
|
362
387
|
};
|
|
363
|
-
const
|
|
388
|
+
const scopedCriteria = AuthorizationScopeMergeWhere(requestCriteria, authorizationDecision?.scope?.where);
|
|
389
|
+
const response = await this.service.update(scopedCriteria ?? requestCriteria, body);
|
|
390
|
+
authorizationDecision = AuthorizationDecisionAttachResource(authorizationDecision, response);
|
|
364
391
|
ApiControllerTransformData(properties.routes[method]?.response?.transformers, properties, { response }, { authenticationRequest, headers, ip });
|
|
365
392
|
const afterExecutionContext = {
|
|
366
|
-
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, body, headers, ip, parameters },
|
|
393
|
+
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, authorizationDecision, body, headers, ip, parameters },
|
|
367
394
|
ENTITY: response,
|
|
368
395
|
result: response,
|
|
369
396
|
ROUTE_TYPE: EApiRouteType.PARTIAL_UPDATE,
|
|
370
397
|
};
|
|
371
398
|
const afterResult = await ApiSubscriberExecutor.executeRouteSubscribers(this.constructor, response, EApiRouteType.PARTIAL_UPDATE, EApiSubscriberOnType.AFTER, afterExecutionContext);
|
|
372
399
|
const finalResponse = afterResult ?? response;
|
|
400
|
+
authorizationDecision = AuthorizationDecisionAttachResource(authorizationDecision, finalResponse);
|
|
401
|
+
const transformedResponse = await AuthorizationDecisionApplyResult(authorizationDecision, finalResponse);
|
|
373
402
|
const dto = DtoGenerate(properties.entity, entityMetadata, method, EApiDtoType.RESPONSE, properties.routes[method]?.autoDto?.[EApiDtoType.RESPONSE], properties.routes[method]?.authentication?.guard);
|
|
374
|
-
return plainToInstance(dto,
|
|
403
|
+
return plainToInstance(dto, transformedResponse, {
|
|
375
404
|
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
376
405
|
excludeExtraneousValues: true,
|
|
377
406
|
});
|
|
378
407
|
}
|
|
379
408
|
catch (error) {
|
|
380
409
|
const errorExecutionContext = {
|
|
381
|
-
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, body, headers, ip, parameters },
|
|
410
|
+
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, authorizationDecision, body, headers, ip, parameters },
|
|
382
411
|
ENTITY: entityInstance,
|
|
383
412
|
ROUTE_TYPE: EApiRouteType.PARTIAL_UPDATE,
|
|
384
413
|
};
|
|
@@ -390,8 +419,9 @@ class ApiControllerFactory {
|
|
|
390
419
|
[EApiRouteType.UPDATE](method, methodName, properties, entityMetadata) {
|
|
391
420
|
this.targetPrototype[methodName] = Object.defineProperty(async function (parameters, body, headers, ip, authenticationRequest) {
|
|
392
421
|
const entityInstance = new properties.entity();
|
|
422
|
+
let authorizationDecision = AuthorizationDecisionResolveFromRequest(authenticationRequest);
|
|
393
423
|
const beforeExecutionContext = {
|
|
394
|
-
DATA: { entityMetadata, method, methodName, properties },
|
|
424
|
+
DATA: { authorizationDecision, entityMetadata, method, methodName, properties },
|
|
395
425
|
ENTITY: entityInstance,
|
|
396
426
|
result: { authenticationRequest, body, headers, ip, parameters },
|
|
397
427
|
ROUTE_TYPE: EApiRouteType.UPDATE,
|
|
@@ -403,6 +433,7 @@ class ApiControllerFactory {
|
|
|
403
433
|
headers = beforeResult.headers;
|
|
404
434
|
ip = beforeResult.ip;
|
|
405
435
|
authenticationRequest = beforeResult.authenticationRequest;
|
|
436
|
+
authorizationDecision = AuthorizationDecisionResolveFromRequest(authenticationRequest);
|
|
406
437
|
}
|
|
407
438
|
try {
|
|
408
439
|
const primaryKey = ApiControllerGetPrimaryColumn(parameters, entityMetadata);
|
|
@@ -421,25 +452,29 @@ class ApiControllerFactory {
|
|
|
421
452
|
const requestCriteria = {
|
|
422
453
|
[primaryKey.key]: primaryKey.value,
|
|
423
454
|
};
|
|
424
|
-
const
|
|
455
|
+
const scopedCriteria = AuthorizationScopeMergeWhere(requestCriteria, authorizationDecision?.scope?.where);
|
|
456
|
+
const response = await this.service.update(scopedCriteria ?? requestCriteria, body);
|
|
457
|
+
authorizationDecision = AuthorizationDecisionAttachResource(authorizationDecision, response);
|
|
425
458
|
ApiControllerTransformData(properties.routes[method]?.response?.transformers, properties, { response }, { authenticationRequest, headers, ip });
|
|
426
459
|
const afterExecutionContext = {
|
|
427
|
-
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, body, headers, ip, parameters },
|
|
460
|
+
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, authorizationDecision, body, headers, ip, parameters },
|
|
428
461
|
ENTITY: response,
|
|
429
462
|
result: response,
|
|
430
463
|
ROUTE_TYPE: EApiRouteType.UPDATE,
|
|
431
464
|
};
|
|
432
465
|
const afterResult = await ApiSubscriberExecutor.executeRouteSubscribers(this.constructor, response, EApiRouteType.UPDATE, EApiSubscriberOnType.AFTER, afterExecutionContext);
|
|
433
466
|
const finalResponse = afterResult ?? response;
|
|
467
|
+
authorizationDecision = AuthorizationDecisionAttachResource(authorizationDecision, finalResponse);
|
|
468
|
+
const transformedResponse = await AuthorizationDecisionApplyResult(authorizationDecision, finalResponse);
|
|
434
469
|
const dto = DtoGenerate(properties.entity, entityMetadata, method, EApiDtoType.RESPONSE, properties.routes[method]?.autoDto?.[EApiDtoType.RESPONSE], properties.routes[method]?.authentication?.guard);
|
|
435
|
-
return plainToInstance(dto,
|
|
470
|
+
return plainToInstance(dto, transformedResponse, {
|
|
436
471
|
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
437
472
|
excludeExtraneousValues: true,
|
|
438
473
|
});
|
|
439
474
|
}
|
|
440
475
|
catch (error) {
|
|
441
476
|
const errorExecutionContext = {
|
|
442
|
-
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, body, headers, ip, parameters },
|
|
477
|
+
DATA: { ...beforeExecutionContext.DATA, authenticationRequest, authorizationDecision, body, headers, ip, parameters },
|
|
443
478
|
ENTITY: entityInstance,
|
|
444
479
|
ROUTE_TYPE: EApiRouteType.UPDATE,
|
|
445
480
|
};
|