@elsikora/nestjs-crud-automator 1.17.1 → 1.18.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/dist/cjs/class/api/authorization/policy/registry.class.d.ts +1 -5
- package/dist/cjs/class/api/authorization/policy/registry.class.js +41 -34
- package/dist/cjs/class/api/authorization/policy/registry.class.js.map +1 -1
- package/dist/cjs/class/api/subscriber/registry.class.js +13 -0
- package/dist/cjs/class/api/subscriber/registry.class.js.map +1 -1
- package/dist/cjs/class/metadata-storage.class.d.ts +2 -1
- package/dist/cjs/class/metadata-storage.class.js +53 -17
- package/dist/cjs/class/metadata-storage.class.js.map +1 -1
- package/dist/cjs/constant/dto/auto-context.constant.d.ts +4 -0
- package/dist/cjs/constant/dto/auto-context.constant.js +10 -0
- package/dist/cjs/constant/dto/auto-context.constant.js.map +1 -0
- package/dist/cjs/constant/dto/index.d.ts +1 -0
- package/dist/cjs/decorator/api/authorization/policy.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/authorization/policy.decorator.js +1 -0
- package/dist/cjs/decorator/api/authorization/policy.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/controller/decorator.d.ts +1 -1
- package/dist/cjs/decorator/api/controller/decorator.js +1 -1
- package/dist/cjs/decorator/api/controller/observable.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/controller/observable.decorator.js +1 -0
- package/dist/cjs/decorator/api/controller/observable.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/controller/securable.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/controller/securable.decorator.js +1 -0
- package/dist/cjs/decorator/api/controller/securable.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/create.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/function/create.decorator.js +1 -0
- package/dist/cjs/decorator/api/function/create.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/function/decorator.js +1 -0
- package/dist/cjs/decorator/api/function/decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/delete.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/function/delete.decorator.js +1 -0
- package/dist/cjs/decorator/api/function/delete.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/get-list.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/function/get-list.decorator.js +1 -0
- package/dist/cjs/decorator/api/function/get-list.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/get-many.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/function/get-many.decorator.js +1 -0
- package/dist/cjs/decorator/api/function/get-many.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/get.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/function/get.decorator.js +1 -0
- package/dist/cjs/decorator/api/function/get.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/update.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/function/update.decorator.js +1 -0
- package/dist/cjs/decorator/api/function/update.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/method.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/method.decorator.js +1 -0
- package/dist/cjs/decorator/api/method.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/boolean.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/property/boolean.decorator.js +11 -4
- package/dist/cjs/decorator/api/property/boolean.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/copy.decorator.d.ts +34 -14
- package/dist/cjs/decorator/api/property/copy.decorator.js +83 -30
- package/dist/cjs/decorator/api/property/copy.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/date.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/property/date.decorator.js +11 -4
- package/dist/cjs/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/describe.decorator.d.ts +1 -1
- package/dist/cjs/decorator/api/property/describe.decorator.js +1 -1
- package/dist/cjs/decorator/api/property/enum.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/property/enum.decorator.js +11 -4
- package/dist/cjs/decorator/api/property/enum.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/number.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/property/number.decorator.js +15 -5
- package/dist/cjs/decorator/api/property/number.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/object.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/property/object.decorator.js +13 -4
- package/dist/cjs/decorator/api/property/object.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/string.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/property/string.decorator.js +15 -5
- package/dist/cjs/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/uuid.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/property/uuid.decorator.js +12 -5
- package/dist/cjs/decorator/api/property/uuid.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/service/observable.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/service/observable.decorator.js +1 -0
- package/dist/cjs/decorator/api/service/observable.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/service.decorator.d.ts +1 -1
- package/dist/cjs/decorator/api/service.decorator.js +1 -1
- package/dist/cjs/decorator/api/subscriber/function.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/subscriber/function.decorator.js +1 -0
- package/dist/cjs/decorator/api/subscriber/function.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/subscriber/route.decorator.d.ts +1 -0
- package/dist/cjs/decorator/api/subscriber/route.decorator.js +1 -0
- package/dist/cjs/decorator/api/subscriber/route.decorator.js.map +1 -1
- package/dist/cjs/factory/api/controller.factory.js +0 -2
- package/dist/cjs/factory/api/controller.factory.js.map +1 -1
- package/dist/cjs/index.js +27 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interface/class/api/authorization/policy/registry.interface.d.ts +0 -1
- package/dist/cjs/type/auto-context-metadata.type.d.ts +5 -0
- package/dist/cjs/type/decorator/api/property/base/properties.type.d.ts +2 -1
- package/dist/cjs/type/decorator/api/property/copy-properties.type.d.ts +13 -0
- package/dist/cjs/type/decorator/api/property/entity.type.d.ts +3 -0
- package/dist/cjs/type/decorator/api/property/index.d.ts +2 -0
- package/dist/cjs/type/index.d.ts +1 -0
- package/dist/cjs/utility/api/controller/apply-metadata.utility.js +1 -1
- package/dist/cjs/utility/auto-dto-context-queue.utility.d.ts +11 -0
- package/dist/cjs/utility/auto-dto-context-queue.utility.js +40 -0
- package/dist/cjs/utility/auto-dto-context-queue.utility.js.map +1 -0
- package/dist/cjs/utility/defer-property-decorator-execution.utility.d.ts +5 -0
- package/dist/cjs/utility/defer-property-decorator-execution.utility.js +16 -0
- package/dist/cjs/utility/defer-property-decorator-execution.utility.js.map +1 -0
- package/dist/cjs/utility/dto/auto-context-pop.utility.d.ts +6 -0
- package/dist/cjs/utility/dto/auto-context-pop.utility.js +38 -0
- package/dist/cjs/utility/dto/auto-context-pop.utility.js.map +1 -0
- package/dist/cjs/utility/dto/auto-context-push.utility.d.ts +9 -0
- package/dist/cjs/utility/dto/auto-context-push.utility.js +35 -0
- package/dist/cjs/utility/dto/auto-context-push.utility.js.map +1 -0
- package/dist/cjs/utility/dto/build-decorator.utility.js +9 -1
- package/dist/cjs/utility/dto/build-decorator.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate-dynamic.utility.js +21 -13
- package/dist/cjs/utility/dto/generate-dynamic.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate.utility.js +35 -27
- package/dist/cjs/utility/dto/generate.utility.js.map +1 -1
- package/dist/cjs/utility/dto/index.d.ts +2 -1
- package/dist/cjs/utility/get-auto-dto-context.utility.d.ts +7 -0
- package/dist/cjs/utility/get-auto-dto-context.utility.js +19 -0
- package/dist/cjs/utility/get-auto-dto-context.utility.js.map +1 -0
- package/dist/cjs/utility/index.d.ts +9 -0
- package/dist/cjs/utility/is-entity-constructor.utility.d.ts +8 -0
- package/dist/cjs/utility/is-entity-constructor.utility.js +13 -0
- package/dist/cjs/utility/is-entity-constructor.utility.js.map +1 -0
- package/dist/cjs/utility/is-entity-factory.utility.d.ts +8 -0
- package/dist/cjs/utility/is-entity-factory.utility.js +15 -0
- package/dist/cjs/utility/is-entity-factory.utility.js.map +1 -0
- package/dist/cjs/utility/is-entity-literal.utility.d.ts +7 -0
- package/dist/cjs/utility/is-entity-literal.utility.js +13 -0
- package/dist/cjs/utility/is-entity-literal.utility.js.map +1 -0
- package/dist/cjs/utility/queue-auto-context-retry.utility.d.ts +6 -0
- package/dist/cjs/utility/queue-auto-context-retry.utility.js +23 -0
- package/dist/cjs/utility/queue-auto-context-retry.utility.js.map +1 -0
- package/dist/cjs/utility/register-auto-dto-child.utility.d.ts +14 -0
- package/dist/cjs/utility/register-auto-dto-child.utility.js +69 -0
- package/dist/cjs/utility/register-auto-dto-child.utility.js.map +1 -0
- package/dist/cjs/utility/resolve/decorator-context.utility.d.ts +13 -0
- package/dist/cjs/utility/resolve/decorator-context.utility.js +31 -0
- package/dist/cjs/utility/resolve/decorator-context.utility.js.map +1 -0
- package/dist/cjs/utility/resolve/index.d.ts +2 -0
- package/dist/cjs/utility/resolve/property-entity.utility.d.ts +16 -0
- package/dist/cjs/utility/resolve/property-entity.utility.js +43 -0
- package/dist/cjs/utility/resolve/property-entity.utility.js.map +1 -0
- package/dist/cjs/utility/with-resolved-property-entity.utility.d.ts +11 -0
- package/dist/cjs/utility/with-resolved-property-entity.utility.js +30 -0
- package/dist/cjs/utility/with-resolved-property-entity.utility.js.map +1 -0
- package/dist/esm/class/api/authorization/policy/registry.class.d.ts +1 -5
- package/dist/esm/class/api/authorization/policy/registry.class.js +41 -34
- package/dist/esm/class/api/authorization/policy/registry.class.js.map +1 -1
- package/dist/esm/class/api/subscriber/registry.class.js +13 -0
- package/dist/esm/class/api/subscriber/registry.class.js.map +1 -1
- package/dist/esm/class/metadata-storage.class.d.ts +2 -1
- package/dist/esm/class/metadata-storage.class.js +53 -17
- package/dist/esm/class/metadata-storage.class.js.map +1 -1
- package/dist/esm/constant/dto/auto-context.constant.d.ts +4 -0
- package/dist/esm/constant/dto/auto-context.constant.js +7 -0
- package/dist/esm/constant/dto/auto-context.constant.js.map +1 -0
- package/dist/esm/constant/dto/index.d.ts +1 -0
- package/dist/esm/decorator/api/authorization/policy.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/authorization/policy.decorator.js +1 -0
- package/dist/esm/decorator/api/authorization/policy.decorator.js.map +1 -1
- package/dist/esm/decorator/api/controller/decorator.d.ts +1 -1
- package/dist/esm/decorator/api/controller/decorator.js +1 -1
- package/dist/esm/decorator/api/controller/observable.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/controller/observable.decorator.js +1 -0
- package/dist/esm/decorator/api/controller/observable.decorator.js.map +1 -1
- package/dist/esm/decorator/api/controller/securable.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/controller/securable.decorator.js +1 -0
- package/dist/esm/decorator/api/controller/securable.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/create.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/function/create.decorator.js +1 -0
- package/dist/esm/decorator/api/function/create.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/decorator.d.ts +1 -0
- package/dist/esm/decorator/api/function/decorator.js +1 -0
- package/dist/esm/decorator/api/function/decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/delete.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/function/delete.decorator.js +1 -0
- package/dist/esm/decorator/api/function/delete.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/get-list.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/function/get-list.decorator.js +1 -0
- package/dist/esm/decorator/api/function/get-list.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/get-many.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/function/get-many.decorator.js +1 -0
- package/dist/esm/decorator/api/function/get-many.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/get.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/function/get.decorator.js +1 -0
- package/dist/esm/decorator/api/function/get.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/update.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/function/update.decorator.js +1 -0
- package/dist/esm/decorator/api/function/update.decorator.js.map +1 -1
- package/dist/esm/decorator/api/method.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/method.decorator.js +1 -0
- package/dist/esm/decorator/api/method.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/boolean.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/property/boolean.decorator.js +12 -5
- package/dist/esm/decorator/api/property/boolean.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/copy.decorator.d.ts +34 -14
- package/dist/esm/decorator/api/property/copy.decorator.js +83 -30
- package/dist/esm/decorator/api/property/copy.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/date.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/property/date.decorator.js +12 -5
- package/dist/esm/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/describe.decorator.d.ts +1 -1
- package/dist/esm/decorator/api/property/describe.decorator.js +1 -1
- package/dist/esm/decorator/api/property/enum.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/property/enum.decorator.js +12 -5
- package/dist/esm/decorator/api/property/enum.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/number.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/property/number.decorator.js +17 -7
- package/dist/esm/decorator/api/property/number.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/object.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/property/object.decorator.js +14 -5
- package/dist/esm/decorator/api/property/object.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/string.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/property/string.decorator.js +17 -7
- package/dist/esm/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/uuid.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/property/uuid.decorator.js +13 -6
- package/dist/esm/decorator/api/property/uuid.decorator.js.map +1 -1
- package/dist/esm/decorator/api/service/observable.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/service/observable.decorator.js +1 -0
- package/dist/esm/decorator/api/service/observable.decorator.js.map +1 -1
- package/dist/esm/decorator/api/service.decorator.d.ts +1 -1
- package/dist/esm/decorator/api/service.decorator.js +1 -1
- package/dist/esm/decorator/api/subscriber/function.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/subscriber/function.decorator.js +1 -0
- package/dist/esm/decorator/api/subscriber/function.decorator.js.map +1 -1
- package/dist/esm/decorator/api/subscriber/route.decorator.d.ts +1 -0
- package/dist/esm/decorator/api/subscriber/route.decorator.js +1 -0
- package/dist/esm/decorator/api/subscriber/route.decorator.js.map +1 -1
- package/dist/esm/factory/api/controller.factory.js +0 -2
- package/dist/esm/factory/api/controller.factory.js.map +1 -1
- package/dist/esm/index.js +13 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interface/class/api/authorization/policy/registry.interface.d.ts +0 -1
- package/dist/esm/type/auto-context-metadata.type.d.ts +5 -0
- package/dist/esm/type/decorator/api/property/base/properties.type.d.ts +2 -1
- package/dist/esm/type/decorator/api/property/copy-properties.type.d.ts +13 -0
- package/dist/esm/type/decorator/api/property/entity.type.d.ts +3 -0
- package/dist/esm/type/decorator/api/property/index.d.ts +2 -0
- package/dist/esm/type/index.d.ts +1 -0
- package/dist/esm/utility/api/controller/apply-metadata.utility.js +1 -1
- package/dist/esm/utility/auto-dto-context-queue.utility.d.ts +11 -0
- package/dist/esm/utility/auto-dto-context-queue.utility.js +37 -0
- package/dist/esm/utility/auto-dto-context-queue.utility.js.map +1 -0
- package/dist/esm/utility/defer-property-decorator-execution.utility.d.ts +5 -0
- package/dist/esm/utility/defer-property-decorator-execution.utility.js +14 -0
- package/dist/esm/utility/defer-property-decorator-execution.utility.js.map +1 -0
- package/dist/esm/utility/dto/auto-context-pop.utility.d.ts +6 -0
- package/dist/esm/utility/dto/auto-context-pop.utility.js +36 -0
- package/dist/esm/utility/dto/auto-context-pop.utility.js.map +1 -0
- package/dist/esm/utility/dto/auto-context-push.utility.d.ts +9 -0
- package/dist/esm/utility/dto/auto-context-push.utility.js +33 -0
- package/dist/esm/utility/dto/auto-context-push.utility.js.map +1 -0
- package/dist/esm/utility/dto/build-decorator.utility.js +9 -1
- package/dist/esm/utility/dto/build-decorator.utility.js.map +1 -1
- package/dist/esm/utility/dto/generate-dynamic.utility.js +21 -13
- package/dist/esm/utility/dto/generate-dynamic.utility.js.map +1 -1
- package/dist/esm/utility/dto/generate.utility.js +35 -27
- package/dist/esm/utility/dto/generate.utility.js.map +1 -1
- package/dist/esm/utility/dto/index.d.ts +2 -1
- package/dist/esm/utility/get-auto-dto-context.utility.d.ts +7 -0
- package/dist/esm/utility/get-auto-dto-context.utility.js +17 -0
- package/dist/esm/utility/get-auto-dto-context.utility.js.map +1 -0
- package/dist/esm/utility/index.d.ts +9 -0
- package/dist/esm/utility/is-entity-constructor.utility.d.ts +8 -0
- package/dist/esm/utility/is-entity-constructor.utility.js +11 -0
- package/dist/esm/utility/is-entity-constructor.utility.js.map +1 -0
- package/dist/esm/utility/is-entity-factory.utility.d.ts +8 -0
- package/dist/esm/utility/is-entity-factory.utility.js +13 -0
- package/dist/esm/utility/is-entity-factory.utility.js.map +1 -0
- package/dist/esm/utility/is-entity-literal.utility.d.ts +7 -0
- package/dist/esm/utility/is-entity-literal.utility.js +11 -0
- package/dist/esm/utility/is-entity-literal.utility.js.map +1 -0
- package/dist/esm/utility/queue-auto-context-retry.utility.d.ts +6 -0
- package/dist/esm/utility/queue-auto-context-retry.utility.js +21 -0
- package/dist/esm/utility/queue-auto-context-retry.utility.js.map +1 -0
- package/dist/esm/utility/register-auto-dto-child.utility.d.ts +14 -0
- package/dist/esm/utility/register-auto-dto-child.utility.js +66 -0
- package/dist/esm/utility/register-auto-dto-child.utility.js.map +1 -0
- package/dist/esm/utility/resolve/decorator-context.utility.d.ts +13 -0
- package/dist/esm/utility/resolve/decorator-context.utility.js +29 -0
- package/dist/esm/utility/resolve/decorator-context.utility.js.map +1 -0
- package/dist/esm/utility/resolve/index.d.ts +2 -0
- package/dist/esm/utility/resolve/property-entity.utility.d.ts +16 -0
- package/dist/esm/utility/resolve/property-entity.utility.js +40 -0
- package/dist/esm/utility/resolve/property-entity.utility.js.map +1 -0
- package/dist/esm/utility/with-resolved-property-entity.utility.d.ts +11 -0
- package/dist/esm/utility/with-resolved-property-entity.utility.js +28 -0
- package/dist/esm/utility/with-resolved-property-entity.utility.js.map +1 -0
- package/package.json +4 -1
- package/dist/cjs/utility/dto/analize.utility.d.ts +0 -8
- package/dist/cjs/utility/dto/analize.utility.js +0 -17
- package/dist/cjs/utility/dto/analize.utility.js.map +0 -1
- package/dist/esm/utility/dto/analize.utility.d.ts +0 -8
- package/dist/esm/utility/dto/analize.utility.js +0 -15
- package/dist/esm/utility/dto/analize.utility.js.map +0 -1
|
@@ -3,14 +3,11 @@ import type { IApiAuthorizationPolicy, IApiAuthorizationPolicyRegistry, IApiAuth
|
|
|
3
3
|
import type { TApiAuthorizationPolicyHookResult } from '../../../../type/class/api/authorization/policy/hook/index';
|
|
4
4
|
type TEntityConstructor<E extends IApiBaseEntity> = new () => E;
|
|
5
5
|
export declare class ApiAuthorizationPolicyRegistry implements IApiAuthorizationPolicyRegistry {
|
|
6
|
-
private readonly LEGACY_POLICIES;
|
|
7
6
|
private readonly POLICY_CACHE;
|
|
8
|
-
private readonly
|
|
9
|
-
private readonly POLICY_REGISTRATIONS_BY_ID;
|
|
7
|
+
private readonly POLICY_REGISTRY;
|
|
10
8
|
constructor();
|
|
11
9
|
buildAggregatedPolicy<E extends IApiBaseEntity, TAction extends string>(entity: TEntityConstructor<E>, action: TAction): Promise<IApiAuthorizationPolicy<E, TApiAuthorizationPolicyHookResult<TAction, E>> | undefined>;
|
|
12
10
|
clear(): void;
|
|
13
|
-
registerPolicy<E extends IApiBaseEntity, R>(policy: IApiAuthorizationPolicy<E, R>): void;
|
|
14
11
|
registerSubscriber<E extends IApiBaseEntity>(registration: IApiAuthorizationPolicySubscriberRegistration<E>): void;
|
|
15
12
|
private cachePolicy;
|
|
16
13
|
private createCacheKey;
|
|
@@ -19,7 +16,6 @@ export declare class ApiAuthorizationPolicyRegistry implements IApiAuthorization
|
|
|
19
16
|
private normalizeRule;
|
|
20
17
|
private resolvePolicyId;
|
|
21
18
|
private resolveRouteType;
|
|
22
|
-
private setLegacyPolicy;
|
|
23
19
|
private toBasePolicy;
|
|
24
20
|
}
|
|
25
21
|
export declare const apiAuthorizationPolicyRegistry: ApiAuthorizationPolicyRegistry;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var decorator_constant = require('../../../../constant/class/authorization/policy/decorator.constant.js');
|
|
4
|
+
require('../../../../external/@elsikora/cladi/dist/esm/domain/enum/logger-log-level.enum.js');
|
|
5
|
+
require('../../../../external/@elsikora/cladi/dist/esm/infrastructure/constant/console-logger-default-options.constant.js');
|
|
6
|
+
var registry_utility = require('../../../../external/@elsikora/cladi/dist/esm/presentation/utility/create/registry.utility.js');
|
|
4
7
|
var routeType_enum = require('../../../../enum/decorator/api/route-type.enum.js');
|
|
5
8
|
var generateEntityInformation_utility = require('../../../../utility/generate-entity-information.utility.js');
|
|
6
9
|
var logger_utility = require('../../../../utility/logger.utility.js');
|
|
@@ -8,15 +11,11 @@ var executor_class = require('./executor.class.js');
|
|
|
8
11
|
|
|
9
12
|
const policyRegistryLogger = logger_utility.LoggerUtility.getLogger("ApiAuthorizationPolicyRegistry");
|
|
10
13
|
class ApiAuthorizationPolicyRegistry {
|
|
11
|
-
LEGACY_POLICIES;
|
|
12
14
|
POLICY_CACHE;
|
|
13
|
-
|
|
14
|
-
POLICY_REGISTRATIONS_BY_ID;
|
|
15
|
+
POLICY_REGISTRY;
|
|
15
16
|
constructor() {
|
|
16
|
-
this.LEGACY_POLICIES = new Map();
|
|
17
17
|
this.POLICY_CACHE = new Map();
|
|
18
|
-
this.
|
|
19
|
-
this.POLICY_REGISTRATIONS_BY_ID = new Map();
|
|
18
|
+
this.POLICY_REGISTRY = registry_utility.createRegistry({});
|
|
20
19
|
}
|
|
21
20
|
async buildAggregatedPolicy(entity, action) {
|
|
22
21
|
const entityName = this.getEntityName(entity);
|
|
@@ -27,16 +26,13 @@ class ApiAuthorizationPolicyRegistry {
|
|
|
27
26
|
policyRegistryLogger.debug(`Returning cached policy for "${cacheKey}"`);
|
|
28
27
|
return cachedPolicy;
|
|
29
28
|
}
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
policyRegistryLogger.debug(`Found ${registrations?.length ?? 0} registration(s) for entity "${entityName}"`);
|
|
38
|
-
policyRegistryLogger.debug(`All registered entities: [${[...this.POLICY_REGISTRATIONS_BY_ENTITY.keys()].join(", ")}]`);
|
|
39
|
-
if (!registrations?.length) {
|
|
29
|
+
const registrationWrapper = this.POLICY_REGISTRY.get(entityName);
|
|
30
|
+
const registrations = registrationWrapper?.registrations ?? [];
|
|
31
|
+
policyRegistryLogger.debug(`Found ${registrations.length} registration(s) for entity "${entityName}"`);
|
|
32
|
+
policyRegistryLogger.debug(`All registered entities: [${this.POLICY_REGISTRY.getAll()
|
|
33
|
+
.map((wrapper) => wrapper.getName())
|
|
34
|
+
.join(", ")}]`);
|
|
35
|
+
if (registrations.length === 0) {
|
|
40
36
|
return undefined;
|
|
41
37
|
}
|
|
42
38
|
const entityMetadata = generateEntityInformation_utility.GenerateEntityInformation(entity);
|
|
@@ -72,14 +68,8 @@ class ApiAuthorizationPolicyRegistry {
|
|
|
72
68
|
return policy;
|
|
73
69
|
}
|
|
74
70
|
clear() {
|
|
75
|
-
this.LEGACY_POLICIES.clear();
|
|
76
71
|
this.POLICY_CACHE.clear();
|
|
77
|
-
this.
|
|
78
|
-
this.POLICY_REGISTRATIONS_BY_ID.clear();
|
|
79
|
-
}
|
|
80
|
-
registerPolicy(policy) {
|
|
81
|
-
const cacheKey = this.createCacheKey(policy.entity, policy.action);
|
|
82
|
-
this.setLegacyPolicy(cacheKey, policy);
|
|
72
|
+
this.POLICY_REGISTRY.clear();
|
|
83
73
|
}
|
|
84
74
|
registerSubscriber(registration) {
|
|
85
75
|
const normalizedRegistration = {
|
|
@@ -91,12 +81,13 @@ class ApiAuthorizationPolicyRegistry {
|
|
|
91
81
|
};
|
|
92
82
|
const entityName = this.getEntityName(normalizedRegistration.entity);
|
|
93
83
|
policyRegistryLogger.verbose(`Registering policy subscriber for entity "${entityName}" with policyId "${normalizedRegistration.policyId}" and priority ${normalizedRegistration.priority}`);
|
|
94
|
-
this.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
let wrapper = this.POLICY_REGISTRY.get(entityName);
|
|
85
|
+
if (!wrapper) {
|
|
86
|
+
wrapper = new PolicySubscriberWrapper(entityName);
|
|
87
|
+
this.POLICY_REGISTRY.register(wrapper);
|
|
88
|
+
}
|
|
89
|
+
wrapper.addRegistration(normalizedRegistration);
|
|
90
|
+
policyRegistryLogger.debug(`Total registrations for entity "${entityName}": ${wrapper.getRegistrationCount()}`);
|
|
100
91
|
this.invalidateCacheForEntity(entityName);
|
|
101
92
|
}
|
|
102
93
|
cachePolicy(cacheKey, policy) {
|
|
@@ -135,16 +126,32 @@ class ApiAuthorizationPolicyRegistry {
|
|
|
135
126
|
const routeTypes = Object.values(routeType_enum.EApiRouteType);
|
|
136
127
|
return routeTypes.find((routeType) => routeType === action);
|
|
137
128
|
}
|
|
138
|
-
setLegacyPolicy(cacheKey, policy) {
|
|
139
|
-
const normalizedPolicy = this.toBasePolicy(policy);
|
|
140
|
-
this.LEGACY_POLICIES.set(cacheKey, normalizedPolicy);
|
|
141
|
-
this.POLICY_CACHE.set(cacheKey, normalizedPolicy);
|
|
142
|
-
}
|
|
143
129
|
toBasePolicy(policy) {
|
|
144
130
|
return policy;
|
|
145
131
|
}
|
|
146
132
|
}
|
|
147
133
|
const apiAuthorizationPolicyRegistry = new ApiAuthorizationPolicyRegistry();
|
|
134
|
+
class PolicySubscriberWrapper {
|
|
135
|
+
name;
|
|
136
|
+
registrations;
|
|
137
|
+
constructor(name, registrations = []) {
|
|
138
|
+
this.name = name;
|
|
139
|
+
this.registrations = registrations;
|
|
140
|
+
}
|
|
141
|
+
addRegistration(registration) {
|
|
142
|
+
this.registrations.push(registration);
|
|
143
|
+
this.registrations.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
|
|
144
|
+
}
|
|
145
|
+
getName() {
|
|
146
|
+
return this.getNormalizedName();
|
|
147
|
+
}
|
|
148
|
+
getRegistrationCount() {
|
|
149
|
+
return this.registrations.length;
|
|
150
|
+
}
|
|
151
|
+
getNormalizedName() {
|
|
152
|
+
return this.name;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
148
155
|
|
|
149
156
|
exports.ApiAuthorizationPolicyRegistry = ApiAuthorizationPolicyRegistry;
|
|
150
157
|
exports.apiAuthorizationPolicyRegistry = apiAuthorizationPolicyRegistry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.class.js","sources":["../../../../../../../src/class/api/authorization/policy/registry.class.ts"],"sourcesContent":[null],"names":["LoggerUtility","GenerateEntityInformation","ApiAuthorizationPolicyExecutor","AUTHORIZATION_POLICY_DECORATOR_CONSTANT","EApiRouteType"],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.class.js","sources":["../../../../../../../src/class/api/authorization/policy/registry.class.ts"],"sourcesContent":[null],"names":["LoggerUtility","createRegistry","GenerateEntityInformation","ApiAuthorizationPolicyExecutor","AUTHORIZATION_POLICY_DECORATOR_CONSTANT","EApiRouteType"],"mappings":";;;;;;;;;;;AAcA,MAAM,oBAAoB,GAAkBA,4BAAa,CAAC,SAAS,CAAC,gCAAg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m/infrastructure/constant/console-logger-default-options.constant.js');
|
|
5
5
|
var registry_utility = require('../../../external/@elsikora/cladi/dist/esm/presentation/utility/create/registry.utility.js');
|
|
6
|
+
var logger_utility = require('../../../utility/logger.utility.js');
|
|
6
7
|
|
|
8
|
+
const subscriberRegistryLogger = logger_utility.LoggerUtility.getLogger("ApiSubscriberRegistry");
|
|
7
9
|
class ApiSubscriberRegistry {
|
|
8
10
|
FUNCTION_SUBSCRIBERS;
|
|
9
11
|
ROUTE_SUBSCRIBERS;
|
|
@@ -25,6 +27,10 @@ class ApiSubscriberRegistry {
|
|
|
25
27
|
this.FUNCTION_SUBSCRIBERS.register(wrapper);
|
|
26
28
|
}
|
|
27
29
|
wrapper.addSubscriber(subscriber, properties.priority);
|
|
30
|
+
subscriberRegistryLogger.debug(`Total function subscribers for "${entityName}": ${wrapper.getSubscriberCount()}`);
|
|
31
|
+
subscriberRegistryLogger.debug(`Registered function subscriber entities: [${this.FUNCTION_SUBSCRIBERS.getAll()
|
|
32
|
+
.map((registeredWrapper) => registeredWrapper.getName())
|
|
33
|
+
.join(", ")}]`);
|
|
28
34
|
}
|
|
29
35
|
registerRouteSubscriber(properties, subscriber) {
|
|
30
36
|
const entityName = properties.entity.name;
|
|
@@ -34,6 +40,10 @@ class ApiSubscriberRegistry {
|
|
|
34
40
|
this.ROUTE_SUBSCRIBERS.register(wrapper);
|
|
35
41
|
}
|
|
36
42
|
wrapper.addSubscriber(subscriber, properties.priority);
|
|
43
|
+
subscriberRegistryLogger.debug(`Total route subscribers for "${entityName}": ${wrapper.getSubscriberCount()}`);
|
|
44
|
+
subscriberRegistryLogger.debug(`Registered route subscriber entities: [${this.ROUTE_SUBSCRIBERS.getAll()
|
|
45
|
+
.map((registeredWrapper) => registeredWrapper.getName())
|
|
46
|
+
.join(", ")}]`);
|
|
37
47
|
}
|
|
38
48
|
}
|
|
39
49
|
class SubscriberWrapper {
|
|
@@ -50,6 +60,9 @@ class SubscriberWrapper {
|
|
|
50
60
|
getName() {
|
|
51
61
|
return this.name;
|
|
52
62
|
}
|
|
63
|
+
getSubscriberCount() {
|
|
64
|
+
return this.subscribers.length;
|
|
65
|
+
}
|
|
53
66
|
}
|
|
54
67
|
const apiSubscriberRegistry = new ApiSubscriberRegistry();
|
|
55
68
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.class.js","sources":["../../../../../../src/class/api/subscriber/registry.class.ts"],"sourcesContent":[null],"names":["createRegistry"],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.class.js","sources":["../../../../../../src/class/api/subscriber/registry.class.ts"],"sourcesContent":[null],"names":["LoggerUtility","createRegistry"],"mappings":";;;;;;;AASA,MAAM,wBAAwB,GAAkBA,4BAAa,CAAC,SAAS,CAAC,uBAAuB,CAAC;AAEhG,MAAM,qBAAqB,CAAA;AACT,IAAA,oBAAoB;AAEpB,IAAA,iBAAiB;AAElC,IAAA,WAAA,GAAA;AACC,QAAA,IAAI,CAAC,oBAAoB,GAAGC,+BAAc,CAA4D,EAAE,CAAC;AACzG,QAAA,IAAI,CAAC,iBAAiB,GAAGA,+BAAc,CAAyD,EAAE,CAAC;IACpG;AAEO,IAAA,sBAAsB,CAA2B,UAAkB,EAAA;QACzE,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,WAAW,IAAI,EAAE,EAAE,GAAG,CAAC,CAAC,CAA2E,KAAK,CAAC,CAAC,UAAU,CAAqC;IAC7M;AAEO,IAAA,mBAAmB,CAA2B,UAAkB,EAAA;QACtE,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,WAAW,IAAI,EAAE,EAAE,GAAG,CAAC,CAAC,CAAwE,KAAK,CAAC,CAAC,UAAU,CAAkC;IACpM;IAEO,0BAA0B,CAA2B,UAA+C,EAAE,UAAqC,EAAA;AACjJ,QAAA,MAAM,UAAU,GAAW,UAAU,CAAC,MAAM,CAAC,IAAI;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EAA0C,IAAI,CAAC,iBAAiB,CAAC,MAAM;aACrE,GAAG,CAAC,CAAC,iBAAyE,KAAK,iBAAiB,CAAC,OAAO,EAAE;AAC9G,aAAA,IAAI,CAAC,IAAI,CAAC,CAAA,CAAA,CAAG,CACf;IACF;AACA;AAED,MAAM,iBAAiB,CAAA;AAEJ,IAAA,IAAA;AACV,IAAA,WAAA;IAFR,WAAA,CACkB,IAAY,EACtB,WAAA,GAA0D,EAAE,EAAA;QADlD,IAAA,CAAA,IAAI,GAAJ,IAAI;QACd,IAAA,CAAA,WAAW,GAAX,WAAW;IAChB;AAEH,IAAA,aAAa,CAAC,UAAa,EAAE,QAAA,GAAmB,CAAC,EAAA;QAChD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;QAC/C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAsC,EAAE,CAAsC,KAAK,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;IACnI;IAEA,OAAO,GAAA;QACN,OAAO,IAAI,CAAC,IAAI;IACjB;IAEA,kBAAkB,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM;IAC/B;AACA;AAEM,MAAM,qBAAqB,GAA0B,IAAI,qBAAqB;;;;"}
|
|
@@ -7,7 +7,8 @@ import type { TMetadata } from '../type/class/index';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class MetadataStorage {
|
|
9
9
|
private static instance;
|
|
10
|
-
private readonly
|
|
10
|
+
private readonly REGISTRY;
|
|
11
|
+
constructor();
|
|
11
12
|
static getInstance(): MetadataStorage;
|
|
12
13
|
getAllEntitiesMetadata(): Record<string, TMetadata>;
|
|
13
14
|
getMetadata(entityName: string): TMetadata | undefined;
|
|
@@ -2,7 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
require('../constant/decorator/api/function.constant.js');
|
|
4
4
|
var propertyDescribe_constant = require('../constant/decorator/api/property-describe.constant.js');
|
|
5
|
+
require('../external/@elsikora/cladi/dist/esm/domain/enum/logger-log-level.enum.js');
|
|
6
|
+
require('../external/@elsikora/cladi/dist/esm/infrastructure/constant/console-logger-default-options.constant.js');
|
|
7
|
+
var registry_utility = require('../external/@elsikora/cladi/dist/esm/presentation/utility/create/registry.utility.js');
|
|
8
|
+
var logger_utility = require('../utility/logger.utility.js');
|
|
5
9
|
|
|
10
|
+
const metadataStorageLogger = logger_utility.LoggerUtility.getLogger("MetadataStorage");
|
|
11
|
+
class EntityMetadataWrapper {
|
|
12
|
+
entityName;
|
|
13
|
+
PROPERTIES;
|
|
14
|
+
constructor(entityName) {
|
|
15
|
+
this.entityName = entityName;
|
|
16
|
+
this.PROPERTIES = new Map();
|
|
17
|
+
}
|
|
18
|
+
asRecord() {
|
|
19
|
+
return Object.fromEntries(this.PROPERTIES);
|
|
20
|
+
}
|
|
21
|
+
getName() {
|
|
22
|
+
return this.entityName;
|
|
23
|
+
}
|
|
24
|
+
getProperty(propertyName) {
|
|
25
|
+
return this.PROPERTIES.get(propertyName);
|
|
26
|
+
}
|
|
27
|
+
getPropertyCount() {
|
|
28
|
+
return this.PROPERTIES.size;
|
|
29
|
+
}
|
|
30
|
+
setProperty(propertyName, key, value) {
|
|
31
|
+
if (!this.PROPERTIES.has(propertyName)) {
|
|
32
|
+
this.PROPERTIES.set(propertyName, { [propertyDescribe_constant.PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT.METADATA_KEY]: {} });
|
|
33
|
+
}
|
|
34
|
+
// eslint-disable-next-line @elsikora/typescript/no-non-null-assertion
|
|
35
|
+
const entry = this.PROPERTIES.get(propertyName);
|
|
36
|
+
entry[key] = value;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
6
39
|
/**
|
|
7
40
|
* Singleton class for storing and retrieving entity property metadata.
|
|
8
41
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/classes#metadatastorage | API Reference - MetadataStorage}
|
|
@@ -10,7 +43,10 @@ var propertyDescribe_constant = require('../constant/decorator/api/property-desc
|
|
|
10
43
|
*/
|
|
11
44
|
class MetadataStorage {
|
|
12
45
|
static instance;
|
|
13
|
-
|
|
46
|
+
REGISTRY;
|
|
47
|
+
constructor() {
|
|
48
|
+
this.REGISTRY = registry_utility.createRegistry({});
|
|
49
|
+
}
|
|
14
50
|
static getInstance() {
|
|
15
51
|
if (!MetadataStorage.instance) {
|
|
16
52
|
MetadataStorage.instance = new MetadataStorage();
|
|
@@ -19,18 +55,18 @@ class MetadataStorage {
|
|
|
19
55
|
}
|
|
20
56
|
getAllEntitiesMetadata() {
|
|
21
57
|
const result = {};
|
|
22
|
-
for (const
|
|
23
|
-
result[
|
|
58
|
+
for (const wrapper of this.REGISTRY.getAll()) {
|
|
59
|
+
result[wrapper.getName()] = wrapper.asRecord();
|
|
24
60
|
}
|
|
25
61
|
return result;
|
|
26
62
|
}
|
|
27
63
|
getMetadata(entityName, propertyName, key) {
|
|
28
|
-
const
|
|
29
|
-
if (!
|
|
64
|
+
const wrapper = this.REGISTRY.get(entityName);
|
|
65
|
+
if (!wrapper)
|
|
30
66
|
return undefined;
|
|
31
67
|
if (!propertyName)
|
|
32
|
-
return
|
|
33
|
-
const propertyMetadata =
|
|
68
|
+
return wrapper.asRecord();
|
|
69
|
+
const propertyMetadata = wrapper.getProperty(propertyName);
|
|
34
70
|
if (!propertyMetadata)
|
|
35
71
|
return undefined;
|
|
36
72
|
if (!key)
|
|
@@ -38,17 +74,17 @@ class MetadataStorage {
|
|
|
38
74
|
return propertyMetadata[key];
|
|
39
75
|
}
|
|
40
76
|
setMetadata(entityName, propertyName, key, value) {
|
|
41
|
-
|
|
42
|
-
|
|
77
|
+
let wrapper = this.REGISTRY.get(entityName);
|
|
78
|
+
if (!wrapper) {
|
|
79
|
+
wrapper = new EntityMetadataWrapper(entityName);
|
|
80
|
+
this.REGISTRY.register(wrapper);
|
|
81
|
+
metadataStorageLogger.debug(`Registered new entity metadata wrapper for "${entityName}"`);
|
|
43
82
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// eslint-disable-next-line @elsikora/typescript/no-non-null-assertion
|
|
50
|
-
const propertyMetadata = entityMetadata.get(propertyName);
|
|
51
|
-
propertyMetadata[key] = value;
|
|
83
|
+
wrapper.setProperty(propertyName, key, value);
|
|
84
|
+
metadataStorageLogger.debug(`Total properties for entity "${entityName}": ${wrapper.getPropertyCount()}`);
|
|
85
|
+
metadataStorageLogger.debug(`All registered entities: [${this.REGISTRY.getAll()
|
|
86
|
+
.map((w) => w.getName())
|
|
87
|
+
.join(", ")}]`);
|
|
52
88
|
}
|
|
53
89
|
}
|
|
54
90
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata-storage.class.js","sources":["../../../../src/class/metadata-storage.class.ts"],"sourcesContent":[null],"names":["PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT"],"mappings":"
|
|
1
|
+
{"version":3,"file":"metadata-storage.class.js","sources":["../../../../src/class/metadata-storage.class.ts"],"sourcesContent":[null],"names":["LoggerUtility","PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT","createRegistry"],"mappings":";;;;;;;;;AAQA,MAAM,qBAAqB,GAAkBA,4BAAa,CAAC,SAAS,CAAC,iBAAiB,CAAC;AAEvF,MAAM,qBAAqB,CAAA;AAGG,IAAA,UAAA;AAFZ,IAAA,UAAU;AAE3B,IAAA,WAAA,CAA6B,UAAkB,EAAA;QAAlB,IAAA,CAAA,UAAU,GAAV,UAAU;AACtC,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAmC;IAC7D;IAEO,QAAQ,GAAA;QACd,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAc;IACxD;IAEO,OAAO,GAAA;QACb,OAAO,IAAI,CAAC,UAAU;IACvB;AAEO,IAAA,WAAW,CAAC,YAA6B,EAAA;QAC/C,OAAO,IAAI,CAAC,U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
|
|
3
|
+
const DTO_AUTO_CONTEXT_METADATA_KEY = "crud-automator:auto-dto-context";
|
|
4
|
+
const AUTO_CONTEXT_DTO_CONSTANT = {
|
|
5
|
+
METADATA_KEY: DTO_AUTO_CONTEXT_METADATA_KEY,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
exports.AUTO_CONTEXT_DTO_CONSTANT = AUTO_CONTEXT_DTO_CONSTANT;
|
|
9
|
+
exports.DTO_AUTO_CONTEXT_METADATA_KEY = DTO_AUTO_CONTEXT_METADATA_KEY;
|
|
10
|
+
//# sourceMappingURL=auto-context.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-context.constant.js","sources":["../../../../../src/constant/dto/auto-context.constant.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAO,MAAM,6BAA6B,GAAW;AAE9C,MAAM,yBAAyB,GAElC;AACH,IAAA,YAAY,EAAE,6BAA6B;;;;;;"}
|
|
@@ -5,5 +5,6 @@ import type { IApiAuthorizationPolicySubscriberProperties } from '../../../inter
|
|
|
5
5
|
* @template E - Entity type extending IApiBaseEntity
|
|
6
6
|
* @param {IApiAuthorizationPolicySubscriberProperties<E>} properties - Policy properties.
|
|
7
7
|
* @returns {ClassDecorator} Class decorator registering metadata for discovery.
|
|
8
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-authorization/api-authorization-policy | API Reference - ApiAuthorizationPolicy}
|
|
8
9
|
*/
|
|
9
10
|
export declare function ApiAuthorizationPolicy<E extends IApiBaseEntity>(properties: IApiAuthorizationPolicySubscriberProperties<E>): ClassDecorator;
|
|
@@ -7,6 +7,7 @@ var decorator_constant = require('../../../constant/class/authorization/policy/d
|
|
|
7
7
|
* @template E - Entity type extending IApiBaseEntity
|
|
8
8
|
* @param {IApiAuthorizationPolicySubscriberProperties<E>} properties - Policy properties.
|
|
9
9
|
* @returns {ClassDecorator} Class decorator registering metadata for discovery.
|
|
10
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-authorization/api-authorization-policy | API Reference - ApiAuthorizationPolicy}
|
|
10
11
|
*/
|
|
11
12
|
function ApiAuthorizationPolicy(properties) {
|
|
12
13
|
const normalizedPolicyId = properties.policyId ?? `${properties.entity.name?.toLowerCase() ?? "unknown"}${decorator_constant.AUTHORIZATION_POLICY_DECORATOR_CONSTANT.DEFAULT_POLICY_ID_SUFFIX}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.decorator.js","sources":["../../../../../../src/decorator/api/authorization/policy.decorator.ts"],"sourcesContent":[null],"names":["AUTHORIZATION_POLICY_DECORATOR_CONSTANT"],"mappings":";;;;AAKA
|
|
1
|
+
{"version":3,"file":"policy.decorator.js","sources":["../../../../../../src/decorator/api/authorization/policy.decorator.ts"],"sourcesContent":[null],"names":["AUTHORIZATION_POLICY_DECORATOR_CONSTANT"],"mappings":";;;;AAKA;;;;;;AAMG;AACG,SAAU,sBAAsB,CAA2B,UAA0D,EAAA;IAC1H,MAAM,kBAAkB,GAAW,UAAU,CAAC,QAAQ,IAAI,CAAA,EAAG,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,SAAS,GAAGA,0DAAuC,CAAC,wBAAwB,CAAA,CAAE;AAEpL,IAAA,MAAM,QAAQ,GAAmD;QAChE,WAAW,EAAE,UAAU,CAAC,WAAW;QACnC,MAAM,EAAE,UAAU,CAAC,MAAM;AACzB,QAAA,QAAQ,EAAE,kBAAkB;AAC5B,QAAA,QAAQ,EAAE,UAAU,CAAC,QAAQ,IAAI,CAAC;KAClC;IAED,OAAO,CAAC,MAAc,KAAI;QACzB,OAAO,CAAC,cAAc,CAACA,0DAAuC,CAAC,YAAY,EAAE,QAAQ,EAAE,MAAM,CAAC;AAC/F,IAAA,CAAC;AACF;;;;"}
|
|
@@ -21,7 +21,7 @@ import type { TApiControllerConstructor } from '../../../type/decorator/api/cont
|
|
|
21
21
|
* })
|
|
22
22
|
* export class UserController {}
|
|
23
23
|
* ```
|
|
24
|
-
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators
|
|
24
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-controller/api-controller | API Reference - ApiController}
|
|
25
25
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/core-concepts/controllers | Core Concepts - Controllers}
|
|
26
26
|
*/
|
|
27
27
|
export declare const ApiController: <E extends IApiBaseEntity>(options: IApiControllerProperties<E>) => <T extends TApiControllerConstructor>(target: T) => T;
|
|
@@ -22,7 +22,7 @@ var controller_factory = require('../../../factory/api/controller.factory.js');
|
|
|
22
22
|
* })
|
|
23
23
|
* export class UserController {}
|
|
24
24
|
* ```
|
|
25
|
-
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators
|
|
25
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-controller/api-controller | API Reference - ApiController}
|
|
26
26
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/core-concepts/controllers | Core Concepts - Controllers}
|
|
27
27
|
*/
|
|
28
28
|
const ApiController = (options) => (target) => {
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
* Decorator that marks a controller as observable, allowing it to be monitored by subscribers.
|
|
3
3
|
* When a controller is marked as observable, its methods can be intercepted by subscribers that listen for specific events.
|
|
4
4
|
* @returns {ClassDecorator} - A decorator that marks a controller as observable.
|
|
5
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-controller/api-controller-observable | API Reference - ApiControllerObservable}
|
|
5
6
|
*/
|
|
6
7
|
export declare function ApiControllerObservable(): ClassDecorator;
|
|
@@ -6,6 +6,7 @@ var controller_constant = require('../../../constant/decorator/api/controller.co
|
|
|
6
6
|
* Decorator that marks a controller as observable, allowing it to be monitored by subscribers.
|
|
7
7
|
* When a controller is marked as observable, its methods can be intercepted by subscribers that listen for specific events.
|
|
8
8
|
* @returns {ClassDecorator} - A decorator that marks a controller as observable.
|
|
9
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-controller/api-controller-observable | API Reference - ApiControllerObservable}
|
|
9
10
|
*/
|
|
10
11
|
function ApiControllerObservable() {
|
|
11
12
|
return (target) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observable.decorator.js","sources":["../../../../../../src/decorator/api/controller/observable.decorator.ts"],"sourcesContent":[null],"names":["CONTROLLER_API_DECORATOR_CONSTANT"],"mappings":";;;;AAEA
|
|
1
|
+
{"version":3,"file":"observable.decorator.js","sources":["../../../../../../src/decorator/api/controller/observable.decorator.ts"],"sourcesContent":[null],"names":["CONTROLLER_API_DECORATOR_CONSTANT"],"mappings":";;;;AAEA;;;;;AAKG;SACa,uBAAuB,GAAA;IACtC,OAAO,CAAC,MAAc,KAAI;QACzB,OAAO,CAAC,cAAc,CAACA,qDAAiC,CAAC,uBAAuB,EAAE,IAAI,EAAE,MAAM,CAAC;AAChG,IAAA,CAAC;AACF;;;;"}
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
* Decorator that marks a controller as securable, enabling automatic RBAC guard application.
|
|
3
3
|
* Without this decorator the authorization guard short-circuits and controller methods remain unsecured.
|
|
4
4
|
* @returns {ClassDecorator} Class decorator that enables authorization for the controller.
|
|
5
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-controller/api-controller-securable | API Reference - ApiControllerSecurable}
|
|
5
6
|
*/
|
|
6
7
|
export declare function ApiControllerSecurable(): ClassDecorator;
|
|
@@ -6,6 +6,7 @@ var controller_constant = require('../../../constant/decorator/api/controller.co
|
|
|
6
6
|
* Decorator that marks a controller as securable, enabling automatic RBAC guard application.
|
|
7
7
|
* Without this decorator the authorization guard short-circuits and controller methods remain unsecured.
|
|
8
8
|
* @returns {ClassDecorator} Class decorator that enables authorization for the controller.
|
|
9
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-controller/api-controller-securable | API Reference - ApiControllerSecurable}
|
|
9
10
|
*/
|
|
10
11
|
function ApiControllerSecurable() {
|
|
11
12
|
return (target) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"securable.decorator.js","sources":["../../../../../../src/decorator/api/controller/securable.decorator.ts"],"sourcesContent":[null],"names":["CONTROLLER_API_DECORATOR_CONSTANT"],"mappings":";;;;AAEA
|
|
1
|
+
{"version":3,"file":"securable.decorator.js","sources":["../../../../../../src/decorator/api/controller/securable.decorator.ts"],"sourcesContent":[null],"names":["CONTROLLER_API_DECORATOR_CONSTANT"],"mappings":";;;;AAEA;;;;;AAKG;SACa,sBAAsB,GAAA;IACrC,OAAO,CAAC,MAAc,KAAI;QACzB,OAAO,CAAC,cAAc,CAACA,qDAAiC,CAAC,sBAAsB,EAAE,IAAI,EAAE,MAAM,CAAC;AAC/F,IAAA,CAAC;AACF;;;;"}
|
|
@@ -5,5 +5,6 @@ import type { IApiFunctionProperties } from '../../../interface/decorator/api/in
|
|
|
5
5
|
* @template E The entity type
|
|
6
6
|
* @param {IApiFunctionProperties<E>} properties - Configuration properties for the create function
|
|
7
7
|
* @returns {(target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor} A decorator function that modifies the target method to handle entity creation
|
|
8
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-function/api-function-create | API Reference - ApiFunctionCreate}
|
|
8
9
|
*/
|
|
9
10
|
export declare function ApiFunctionCreate<E extends IApiBaseEntity>(properties: IApiFunctionProperties<E>): (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
@@ -15,6 +15,7 @@ var logger_utility = require('../../../utility/logger.utility.js');
|
|
|
15
15
|
* @template E The entity type
|
|
16
16
|
* @param {IApiFunctionProperties<E>} properties - Configuration properties for the create function
|
|
17
17
|
* @returns {(target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor} A decorator function that modifies the target method to handle entity creation
|
|
18
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-function/api-function-create | API Reference - ApiFunctionCreate}
|
|
18
19
|
*/
|
|
19
20
|
function ApiFunctionCreate(properties) {
|
|
20
21
|
const { entity } = properties;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.decorator.js","sources":["../../../../../../src/decorator/api/function/create.decorator.ts"],"sourcesContent":[null],"names":["EApiFunctionType","ApiSubscriberExecutor","EApiSubscriberOnType","ErrorException","HttpException","LoggerUtility","InternalServerErrorException","ErrorString","EErrorStringAction"],"mappings":";;;;;;;;;;;;AAgBA
|
|
1
|
+
{"version":3,"file":"create.decorator.js","sources":["../../../../../../src/decorator/api/function/create.decorator.ts"],"sourcesContent":[null],"names":["EApiFunctionType","ApiSubscriberExecutor","EApiSubscriberOnType","ErrorException","HttpException","LoggerUtility","InternalServerErrorException","ErrorString","EErrorStringAction"],"mappings":";;;;;;;;;;;;AAgBA;;;;;;AAMG;AACG,SAAU,iBAAiB,CAA2B,UAAqC,EAAA;AAChG,IAAA,MAAM,EAAE,MAAM,EAAE,GAA8B,UAAU;AAExD,IAAA,OAAO,UAAU,OAAgB,EAAE,YAAoB,EAAE,UAA8B,EAAA;AACtF,QAAA,UAAU,CAAC,KAAK,GAAG,gBAAqD,gBAAiD,EAAE,YAA4B,EAAA;AACtJ,YAAA,MAAM,cAAc,GAAM,IAAI,MAAM,EAAE;AAEtC,YAAA,MAAM,gBAAgB,GAAwG;gBAC7H,IAAI,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE;AACnD,gBAAA,MAAM,EAAE,cAAc;gBACtB,aAAa,EAAEA,0BAAgB,CAAC,MAAM;AACtC,gBAAA,MAAM,EAAE,gBAAgB;aACxB;YAED,MAAM,MAAM,GAAgD,MAAMC,oCAAqB,CAAC,0BAA0B,CAAC,IAAI,CAAC,WAA6D,EAAE,cAAc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AAc,EAAED,0BAAgB,CAAC,MAAM,EAAEE,gCAAoB,CAAC,WAAW,EAAE,qBAAqB,EAAE,KAAc,CAAC;AAE1L,QAAA,MAAM,IAAII,mCAA4B,CACrCC,+BAAW,CAAC;AACX,YAAA,MAAM,EAAE,MAAM;YACd,IAAI,EAAEC,8BAAkB,CAAC,cAAc;AACvC,SAAA,CAAC,CACF;IACF;AACD;;;;"}
|
|
@@ -6,5 +6,6 @@ import type { TApiFunctionProperties } from '../../../type/decorator/api/functio
|
|
|
6
6
|
* @param {TApiFunctionProperties<E>} properties - Configuration properties for the API function
|
|
7
7
|
* @returns {(target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor} A decorator function that applies the appropriate function decorator
|
|
8
8
|
* @template E - The entity type for the API function
|
|
9
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-function/api-function | API Reference - ApiFunction}
|
|
9
10
|
*/
|
|
10
11
|
export declare function ApiFunction<E extends IApiBaseEntity, R>(properties: TApiFunctionProperties<E>): (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
@@ -28,6 +28,7 @@ var update_decorator = require('./update.decorator.js');
|
|
|
28
28
|
* @param {TApiFunctionProperties<E>} properties - Configuration properties for the API function
|
|
29
29
|
* @returns {(target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor} A decorator function that applies the appropriate function decorator
|
|
30
30
|
* @template E - The entity type for the API function
|
|
31
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-function/api-function | API Reference - ApiFunction}
|
|
31
32
|
*/
|
|
32
33
|
// eslint-disable-next-line @elsikora/typescript/no-unnecessary-type-parameters
|
|
33
34
|
function ApiFunction(properties) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorator.js","sources":["../../../../../../src/decorator/api/function/decorator.ts"],"sourcesContent":[null],"names":["EApiFunctionType","ApiFunctionCreate","ApiFunctionDelete","ApiFunctionGet","ApiFunctionGetList","ApiFunctionGetMany","ApiFunctionUpdate","ErrorException"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAcA
|
|
1
|
+
{"version":3,"file":"decorator.js","sources":["../../../../../../src/decorator/api/function/decorator.ts"],"sourcesContent":[null],"names":["EApiFunctionType","ApiFunctionCreate","ApiFunctionDelete","ApiFunctionGet","ApiFunctionGetList","ApiFunctionGetMany","ApiFunctionUpdate","ErrorException"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAcA;;;;;;;AAOG;AACH;AACM,SAAU,WAAW,CAA8B,UAAqC,EAAA;AAC7F,IAAA,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAA8B,UAAU;AAE9D,IAAA,OAAO,UAAU,OAAgB,EAAE,WAAmB,EAAE,UAA8B,EAAA;AACrF,QAAA,MAAM,cAAc,GAAY,UAAU,CAAC,KAAK;;AAGhD,QAAA,UAAU,CAAC,KAAK,GAAG,UAA+C,GAAG,UAA0B,EAAA;AAC9F,YAAA,IAAI,iBAA+G;YAEnH,QAAQ,IAAI;AACX,gBAAA,KAAKA,0BAAgB,CAAC,MAAM,EAAE;AAC7B,oBAAA,iBAAiB,GAAGC,kCAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;oBAEjD;gBACD;AAEA,gBAAA,KAAKD,0BAAgB,CAAC,MAAM,EAAE;AAC7B,oBAAA,iBAAiB,GAAGE,kCAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;oBAEjD;gBACD;AAEA,gBAAA,KAAKF,0BAAgB,CAAC,GAAG,EAAE;AAC1B,oBAAA,iBAAiB,GAAGG,4BAAc,CAAC,EAAE,MAAM,EAAE,CAAC;oBAE9C;gBACD;AAEA,gBAAA,KAAKH,0BAAgB,CAAC,QAAQ,EAAE;AAC/B,oBAAA,iBAAiB,GAAGI,oCAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;oBAElD;gBACD;AAEA,gBAAA,KAAKJ,0BAAgB,CAAC,QAAQ,EAAE;AAC/B,oBAAA,iBAAiB,GAAGK,oCAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;oBAElD;gBACD;AAEA,gBAAA,KAAKL,0BAAgB,CAAC,MAAM,EAAE;AAC7B,oBAAA,iBAAiB,GAAGM,kCAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;oBAEjD;gBACD;gBAEA,SAAS;AACR,oBAAA,MAAMC,qCAAc,CAAC,sBAAsB,CAAC;gBAC7C;;AAGD,YAAA,MAAM,kBAAkB,GAAuB,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;AAC9G,YAAA,MAAM,cAAc,GAA0C,kBAAkB,CAAC,KAA8C;YAE/H,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC;AAC9C,QAAA,CAAC;AAED,QAAA,OAAO,UAAU;AAClB,IAAA,CAAC;AACF;;;;"}
|
|
@@ -5,5 +5,6 @@ import type { IApiFunctionProperties } from '../../../interface/decorator/api/in
|
|
|
5
5
|
* @template E The entity type
|
|
6
6
|
* @param {IApiFunctionProperties<E>} properties - Configuration properties for the delete function
|
|
7
7
|
* @returns {(target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor} A decorator function that modifies the target method to handle entity deletion
|
|
8
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-function/api-function-delete | API Reference - ApiFunctionDelete}
|
|
8
9
|
*/
|
|
9
10
|
export declare function ApiFunctionDelete<E extends IApiBaseEntity>(properties: IApiFunctionProperties<E>): (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
@@ -28,6 +28,7 @@ var get_decorator = require('./get.decorator.js');
|
|
|
28
28
|
* @template E The entity type
|
|
29
29
|
* @param {IApiFunctionProperties<E>} properties - Configuration properties for the delete function
|
|
30
30
|
* @returns {(target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor} A decorator function that modifies the target method to handle entity deletion
|
|
31
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-function/api-function-delete | API Reference - ApiFunctionDelete}
|
|
31
32
|
*/
|
|
32
33
|
function ApiFunctionDelete(properties) {
|
|
33
34
|
const { entity } = properties;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.decorator.js","sources":["../../../../../../src/decorator/api/function/delete.decorator.ts"],"sourcesContent":[null],"names":["ApiFunctionGet","EApiFunctionType","ApiSubscriberExecutor","EApiSubscriberOnType","ErrorException","HttpException","LoggerUtility","InternalServerErrorException","ErrorString","EErrorStringAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBA
|
|
1
|
+
{"version":3,"file":"delete.decorator.js","sources":["../../../../../../src/decorator/api/function/delete.decorator.ts"],"sourcesContent":[null],"names":["ApiFunctionGet","EApiFunctionType","ApiSubscriberExecutor","EApiSubscriberOnType","ErrorException","HttpException","LoggerUtility","InternalServerErrorException","ErrorString","EErrorStringAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;AAMG;AACG,SAAU,iBAAiB,CAA2B,UAAqC,EAAA;AAChG,IAAA,MAAM,EAAE,MAAM,EAAE,GAA8B,UAAU;IACxD,MAAM,YAAY,GAAiGA,4BAAc,CAAI,EAAE,MAAM,EAAE,CAAC;AAChJ,IAAA,IAAI,WAAmG;AAEvG,IAAA,OAAO,UAAU,OAAgB,EAAE,YAAoB,EAAE,UAA8B,EAAA;AACtF,QAAA,UAAU,CAAC,KAAK,GAAG,gBAAqD,QAAuC,EAAE,YAA4B,EAAA;AAC5I,YAAA,MAAM,cAAc,GAAM,IAAI,MAAM,EAAE;AAEtC,YAAA,MAAM,gBAAgB,GAA6E;gBAClG,IAAI,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE;AAC7D,gBAAA,MAAM,EAAE,cAAc;gBACtB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AAA,OAAO,MAAM;IACd;IAAE,OAAO,KAAK,EAAE;AACf,QAAA,MAAM,cAAc,GAAM,IAAI,MAAM,EAAE;AAEtC,QAAA,MAAM,qBAAqB,GAA4E;AACtG,YAAA,IAAI,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE;AAC5C,YAAA,MAAM,EAAE,cAAc;YACtB,aAAa,EAAEF,0BAAgB,CAAC,MAAM;SACtC;AAED,QAAA,IAAI,KAAK,YAAYI,oBAAa,EAAE;YACnC,MAAMH,oCAAqB,CAAC,+BAA+B,CAAC,WAAW,EAAE,cAAc,EAAED,0BAAgB,CAAC,MAAM,EAAEE,gCAAoB,CAAC,WAAW,EAAE,qBAAqB,EAAE,KAAK,CAAC;AAEjL,YAAA,MAAM,KAAK;QACZ;AAEA,QAAAG,4BAAa,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,CAAA,sBAAA,EAAyB,MAAM,CAAC,IAAI,CAAA,CAAA,CAAG,EAAE,KAAK,CAAC;QACpG,MAAMJ,oCAAqB,CAAC,+BAA+B,CAAC,WAAW,EAAE,cAAc,EAAED,0BAAgB,CAAC,MAAM,EAAEE,gCAAoB,CAAC,WAAW,EAAE,qBAAqB,EAAE,KAAc,CAAC;AAE1L,QAAA,MAAM,IAAII,mCAA4B,CACrCC,+BAAW,CAAC;AACX,YAAA,MAAM,EAAE,MAAM;YACd,IAAI,EAAEC,8BAAkB,CAAC,cAAc;AACvC,SAAA,CAAC,CACF;IACF;AACD;;;;"}
|
|
@@ -5,5 +5,6 @@ import type { IApiFunctionProperties } from '../../../interface/decorator/api/in
|
|
|
5
5
|
* @template E The entity type
|
|
6
6
|
* @param {IApiFunctionProperties<E>} properties - Configuration properties for the get-list function
|
|
7
7
|
* @returns {(target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor} A decorator function that modifies the target method to handle entity list retrieval
|
|
8
|
+
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-function/api-function-get-list | API Reference - ApiFunctionGetList}
|
|
8
9
|
*/
|
|
9
10
|
export declare function ApiFunctionGetList<E extends IApiBaseEntity>(properties: IApiFunctionProperties<E>): (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|