mongodb-dynamic-api 1.4.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +7 -2
- package/package.json +1 -1
- package/src/builders/route-decorators/auth-decorators.builder.d.ts +2 -2
- package/src/builders/route-decorators/route-decorators.builder.d.ts +2 -2
- package/src/dynamic-api.module.js +5 -6
- package/src/helpers/controller-ability-predicates.helper.d.ts +2 -2
- package/src/helpers/controller-ability-predicates.helper.js +1 -6
- package/src/helpers/route-decorators.helper.d.ts +2 -2
- package/src/helpers/schema.helper.js +7 -2
- package/src/interfaces/dynamic-api-casl-ability.interface.d.ts +4 -12
- package/src/interfaces/dynamic-api-casl-ability.interface.js +0 -9
- package/src/interfaces/dynamic-api-controller-options.interface.d.ts +12 -0
- package/src/interfaces/dynamic-api-decorator-builder.interface.d.ts +5 -0
- package/src/interfaces/dynamic-api-options.interface.d.ts +4 -4
- package/src/interfaces/dynamic-api-schema-options.interface.d.ts +7 -1
- package/src/interfaces/dynamic-api-schema-options.interface.js +14 -0
- package/src/interfaces/index.d.ts +2 -3
- package/src/interfaces/index.js +2 -3
- package/src/mixins/entity-presenter.mixin.d.ts +1 -1
- package/src/mixins/entity-presenter.mixin.js +12 -2
- package/src/models/base-entity.model.d.ts +1 -1
- package/src/modules/auth/auth.helper.d.ts +4 -4
- package/src/modules/auth/auth.helper.js +3 -3
- package/src/modules/auth/auth.module.d.ts +2 -2
- package/src/modules/auth/auth.module.js +3 -3
- package/src/modules/auth/interfaces/auth-options.interface.d.ts +12 -9
- package/src/modules/auth/mixins/auth-controller.mixin.d.ts +2 -3
- package/src/modules/auth/mixins/auth-controller.mixin.js +21 -4
- package/src/modules/auth/mixins/auth-register-policies-guard.mixin.d.ts +2 -2
- package/src/routes/create-many/create-many-controller.mixin.d.ts +2 -2
- package/src/routes/create-many/create-many.helper.d.ts +2 -2
- package/src/routes/create-many/create-many.module.d.ts +2 -2
- package/src/routes/create-one/create-one-controller.mixin.d.ts +2 -2
- package/src/routes/create-one/create-one.helper.d.ts +2 -2
- package/src/routes/create-one/create-one.module.d.ts +2 -2
- package/src/routes/delete-many/delete-many-controller.mixin.d.ts +2 -2
- package/src/routes/delete-many/delete-many.helper.d.ts +2 -2
- package/src/routes/delete-many/delete-many.module.d.ts +2 -2
- package/src/routes/delete-one/delete-one-controller.mixin.d.ts +2 -2
- package/src/routes/delete-one/delete-one.helper.d.ts +2 -2
- package/src/routes/delete-one/delete-one.module.d.ts +2 -2
- package/src/routes/duplicate-many/duplicate-many-controller.mixin.d.ts +2 -2
- package/src/routes/duplicate-many/duplicate-many.helper.d.ts +2 -2
- package/src/routes/duplicate-many/duplicate-many.module.d.ts +2 -2
- package/src/routes/duplicate-one/duplicate-one-controller.mixin.d.ts +2 -2
- package/src/routes/duplicate-one/duplicate-one.helper.d.ts +2 -2
- package/src/routes/duplicate-one/duplicate-one.module.d.ts +2 -2
- package/src/routes/get-many/base-get-many.service.js +1 -1
- package/src/routes/get-many/get-many-controller.mixin.d.ts +2 -2
- package/src/routes/get-many/get-many-controller.mixin.js +1 -1
- package/src/routes/get-many/get-many.helper.d.ts +2 -2
- package/src/routes/get-many/get-many.module.d.ts +2 -2
- package/src/routes/get-one/get-one-controller.mixin.d.ts +2 -2
- package/src/routes/get-one/get-one.helper.d.ts +2 -2
- package/src/routes/get-one/get-one.module.d.ts +2 -2
- package/src/routes/replace-one/replace-one-controller.mixin.d.ts +2 -2
- package/src/routes/replace-one/replace-one.helper.d.ts +2 -2
- package/src/routes/replace-one/replace-one.module.d.ts +2 -2
- package/src/routes/update-many/update-many-controller.mixin.d.ts +2 -2
- package/src/routes/update-many/update-many.helper.d.ts +2 -2
- package/src/routes/update-many/update-many.module.d.ts +2 -2
- package/src/routes/update-one/update-one-controller.mixin.d.ts +2 -2
- package/src/routes/update-one/update-one.helper.d.ts +2 -2
- package/src/routes/update-one/update-one.module.d.ts +2 -2
- package/src/version.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/src/interfaces/controller-options.interface.d.ts +0 -12
- package/src/interfaces/decorator-builder.interface.d.ts +0 -5
- package/src/interfaces/maybe-promise.type.d.ts +0 -2
- package/src/interfaces/maybe-promise.type.js +0 -2
- /package/src/interfaces/{controller-options.interface.js → dynamic-api-controller-options.interface.js} +0 -0
- /package/src/interfaces/{decorator-builder.interface.js → dynamic-api-decorator-builder.interface.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig, DynamicAPIServiceProvider } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { DeleteManyControllerConstructor } from './delete-many-controller.interface';
|
|
5
5
|
declare function createDeleteManyServiceProvider<Entity extends BaseEntity>(entity: Type<Entity>, version: string | undefined): DynamicAPIServiceProvider;
|
|
6
|
-
declare function createDeleteManyController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions:
|
|
6
|
+
declare function createDeleteManyController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions): DeleteManyControllerConstructor<Entity>;
|
|
7
7
|
export { createDeleteManyController, createDeleteManyServiceProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule, Provider, Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
export declare class DeleteManyModule {
|
|
5
|
-
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions:
|
|
5
|
+
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions, extraProviders?: Provider[]): DynamicModule;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { DeleteOneControllerConstructor } from './delete-one-controller.interface';
|
|
5
|
-
declare function DeleteOneControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }:
|
|
5
|
+
declare function DeleteOneControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }: DynamicApiControllerOptions<Entity>, { type: routeType, description, dTOs, isPublic: isPublicRoute, abilityPredicate: routeAbilityPredicate, }: DynamicAPIRouteConfig<Entity>, version?: string): DeleteOneControllerConstructor<Entity>;
|
|
6
6
|
export { DeleteOneControllerMixin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig, DynamicAPIServiceProvider } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { DeleteOneControllerConstructor } from './delete-one-controller.interface';
|
|
5
5
|
declare function createDeleteOneServiceProvider<Entity extends BaseEntity>(entity: Type<Entity>, version: string | undefined): DynamicAPIServiceProvider;
|
|
6
|
-
declare function createDeleteOneController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions:
|
|
6
|
+
declare function createDeleteOneController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions): DeleteOneControllerConstructor<Entity>;
|
|
7
7
|
export { createDeleteOneController, createDeleteOneServiceProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule, Provider, Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
export declare class DeleteOneModule {
|
|
5
|
-
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions:
|
|
5
|
+
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions, extraProviders?: Provider[]): DynamicModule;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { DuplicateManyControllerConstructor } from './duplicate-many-controller.interface';
|
|
5
|
-
declare function DuplicateManyControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }:
|
|
5
|
+
declare function DuplicateManyControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }: DynamicApiControllerOptions<Entity>, { type: routeType, description, dTOs, isPublic: isPublicRoute, abilityPredicate: routeAbilityPredicate, }: DynamicAPIRouteConfig<Entity>, version?: string): DuplicateManyControllerConstructor<Entity>;
|
|
6
6
|
export { DuplicateManyControllerMixin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig, DynamicAPIServiceProvider } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { DuplicateManyControllerConstructor } from './duplicate-many-controller.interface';
|
|
5
5
|
declare function createDuplicateManyServiceProvider<Entity extends BaseEntity>(entity: Type<Entity>, version: string | undefined): DynamicAPIServiceProvider;
|
|
6
|
-
declare function createDuplicateManyController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions:
|
|
6
|
+
declare function createDuplicateManyController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions): DuplicateManyControllerConstructor<Entity>;
|
|
7
7
|
export { createDuplicateManyController, createDuplicateManyServiceProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule, Provider, Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
export declare class DuplicateManyModule {
|
|
5
|
-
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions:
|
|
5
|
+
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions, extraProviders?: Provider[]): DynamicModule;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { DuplicateOneControllerConstructor } from './duplicate-one-controller.interface';
|
|
5
|
-
declare function DuplicateOneControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }:
|
|
5
|
+
declare function DuplicateOneControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }: DynamicApiControllerOptions<Entity>, { type: routeType, description, dTOs, isPublic: isPublicRoute, abilityPredicate: routeAbilityPredicate, }: DynamicAPIRouteConfig<Entity>, version?: string): DuplicateOneControllerConstructor<Entity>;
|
|
6
6
|
export { DuplicateOneControllerMixin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig, DynamicAPIServiceProvider } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { DuplicateOneControllerConstructor } from './duplicate-one-controller.interface';
|
|
5
5
|
declare function createDuplicateOneServiceProvider<Entity extends BaseEntity>(entity: Type<Entity>, version: string | undefined): DynamicAPIServiceProvider;
|
|
6
|
-
declare function createDuplicateOneController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions:
|
|
6
|
+
declare function createDuplicateOneController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions): DuplicateOneControllerConstructor<Entity>;
|
|
7
7
|
export { createDuplicateOneController, createDuplicateOneServiceProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule, Provider, Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
export declare class DuplicateOneModule {
|
|
5
|
-
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions:
|
|
5
|
+
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions, extraProviders?: Provider[]): DynamicModule;
|
|
6
6
|
}
|
|
@@ -10,8 +10,8 @@ class BaseGetManyService extends services_1.BaseService {
|
|
|
10
10
|
async getMany(query) {
|
|
11
11
|
const documents = await this.model
|
|
12
12
|
.find({
|
|
13
|
-
...(query ?? {}),
|
|
14
13
|
...(this.isSoftDeletable ? { isDeleted: false } : {}),
|
|
14
|
+
...(query ?? {}),
|
|
15
15
|
})
|
|
16
16
|
.lean()
|
|
17
17
|
.exec();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { GetManyControllerConstructor } from './get-many-controller.interface';
|
|
5
|
-
declare function GetManyControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }:
|
|
5
|
+
declare function GetManyControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }: DynamicApiControllerOptions<Entity>, { type: routeType, description, dTOs, isPublic: isPublicRoute, abilityPredicate: routeAbilityPredicate, }: DynamicAPIRouteConfig<Entity>, version?: string): GetManyControllerConstructor<Entity>;
|
|
6
6
|
export { GetManyControllerMixin };
|
|
@@ -41,7 +41,7 @@ function GetManyControllerMixin(entity, { path, apiTag, isPublic: isPublicContro
|
|
|
41
41
|
writable: false,
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
class RoutePresenter extends (CustomPresenter ?? entity) {
|
|
44
|
+
class RoutePresenter extends (CustomPresenter ?? (0, mixins_1.EntityPresenterMixin)(entity)) {
|
|
45
45
|
}
|
|
46
46
|
if (!CustomPresenter) {
|
|
47
47
|
Object.defineProperty(RoutePresenter, 'name', {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig, DynamicAPIServiceProvider } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { GetManyControllerConstructor } from './get-many-controller.interface';
|
|
5
5
|
declare function createGetManyServiceProvider<Entity extends BaseEntity>(entity: Type<Entity>, version: string | undefined): DynamicAPIServiceProvider;
|
|
6
|
-
declare function createGetManyController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions:
|
|
6
|
+
declare function createGetManyController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions): GetManyControllerConstructor<Entity>;
|
|
7
7
|
export { createGetManyController, createGetManyServiceProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule, Provider, Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
export declare class GetManyModule {
|
|
5
|
-
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions:
|
|
5
|
+
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions, extraProviders?: Provider[]): DynamicModule;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { GetOneControllerConstructor } from './get-one-controller.interface';
|
|
5
|
-
declare function GetOneControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }:
|
|
5
|
+
declare function GetOneControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }: DynamicApiControllerOptions<Entity>, { type: routeType, description, dTOs, isPublic: isPublicRoute, abilityPredicate: routeAbilityPredicate, }: DynamicAPIRouteConfig<Entity>, version?: string): GetOneControllerConstructor<Entity>;
|
|
6
6
|
export { GetOneControllerMixin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig, DynamicAPIServiceProvider } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { GetOneControllerConstructor } from './get-one-controller.interface';
|
|
5
5
|
declare function createGetOneServiceProvider<Entity extends BaseEntity>(entity: Type<Entity>, version: string | undefined): DynamicAPIServiceProvider;
|
|
6
|
-
declare function createGetOneController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions:
|
|
6
|
+
declare function createGetOneController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions): GetOneControllerConstructor<Entity>;
|
|
7
7
|
export { createGetOneController, createGetOneServiceProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule, Provider, Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
export declare class GetOneModule {
|
|
5
|
-
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions:
|
|
5
|
+
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions, extraProviders?: Provider[]): DynamicModule;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { ReplaceOneControllerConstructor } from './replace-one-controller.interface';
|
|
5
|
-
declare function ReplaceOneControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }:
|
|
5
|
+
declare function ReplaceOneControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }: DynamicApiControllerOptions<Entity>, { type: routeType, description, dTOs, isPublic: isPublicRoute, abilityPredicate: routeAbilityPredicate, }: DynamicAPIRouteConfig<Entity>, version?: string): ReplaceOneControllerConstructor<Entity>;
|
|
6
6
|
export { ReplaceOneControllerMixin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig, DynamicAPIServiceProvider } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { ReplaceOneControllerConstructor } from './replace-one-controller.interface';
|
|
5
5
|
declare function createReplaceOneServiceProvider<Entity extends BaseEntity>(entity: Type<Entity>, version: string | undefined): DynamicAPIServiceProvider;
|
|
6
|
-
declare function createReplaceOneController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions:
|
|
6
|
+
declare function createReplaceOneController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions): ReplaceOneControllerConstructor<Entity>;
|
|
7
7
|
export { createReplaceOneController, createReplaceOneServiceProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule, Provider, Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
export declare class ReplaceOneModule {
|
|
5
|
-
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions:
|
|
5
|
+
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions, extraProviders?: Provider[]): DynamicModule;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { UpdateManyControllerConstructor } from './update-many-controller.interface';
|
|
5
|
-
declare function UpdateManyControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }:
|
|
5
|
+
declare function UpdateManyControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }: DynamicApiControllerOptions<Entity>, { type: routeType, description, dTOs, isPublic: isPublicRoute, abilityPredicate: routeAbilityPredicate, }: DynamicAPIRouteConfig<Entity>, version?: string): UpdateManyControllerConstructor<Entity>;
|
|
6
6
|
export { UpdateManyControllerMixin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig, DynamicAPIServiceProvider } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { UpdateManyControllerConstructor } from './update-many-controller.interface';
|
|
5
5
|
declare function createUpdateManyServiceProvider<Entity extends BaseEntity>(entity: Type<Entity>, version: string | undefined): DynamicAPIServiceProvider;
|
|
6
|
-
declare function createUpdateManyController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions:
|
|
6
|
+
declare function createUpdateManyController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions): UpdateManyControllerConstructor<Entity>;
|
|
7
7
|
export { createUpdateManyController, createUpdateManyServiceProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule, Provider, Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
export declare class UpdateManyModule {
|
|
5
|
-
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions:
|
|
5
|
+
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions, extraProviders?: Provider[]): DynamicModule;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { UpdateOneControllerConstructor } from './update-one-controller.interface';
|
|
5
|
-
declare function UpdateOneControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }:
|
|
5
|
+
declare function UpdateOneControllerMixin<Entity extends BaseEntity>(entity: Type<Entity>, { path, apiTag, isPublic: isPublicController, abilityPredicates: controllerAbilityPredicates, }: DynamicApiControllerOptions<Entity>, { type: routeType, description, dTOs, isPublic: isPublicRoute, abilityPredicate: routeAbilityPredicate, }: DynamicAPIRouteConfig<Entity>, version?: string): UpdateOneControllerConstructor<Entity>;
|
|
6
6
|
export { UpdateOneControllerMixin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig, DynamicAPIServiceProvider } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
import { UpdateOneControllerConstructor } from './update-one-controller.interface';
|
|
5
5
|
declare function createUpdateOneServiceProvider<Entity extends BaseEntity>(entity: Type<Entity>, version: string | undefined): DynamicAPIServiceProvider;
|
|
6
|
-
declare function createUpdateOneController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions:
|
|
6
|
+
declare function createUpdateOneController<Entity extends BaseEntity>(entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions): UpdateOneControllerConstructor<Entity>;
|
|
7
7
|
export { createUpdateOneController, createUpdateOneServiceProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule, Provider, Type, ValidationPipeOptions } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { DynamicApiControllerOptions, DynamicAPIRouteConfig } from '../../interfaces';
|
|
3
3
|
import { BaseEntity } from '../../models';
|
|
4
4
|
export declare class UpdateOneModule {
|
|
5
|
-
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions:
|
|
5
|
+
static forFeature<Entity extends BaseEntity>(databaseModule: DynamicModule, entity: Type<Entity>, controllerOptions: DynamicApiControllerOptions<Entity>, routeConfig: DynamicAPIRouteConfig<Entity>, version?: string, validationPipeOptions?: ValidationPipeOptions, extraProviders?: Provider[]): DynamicModule;
|
|
6
6
|
}
|
package/src/version.json
CHANGED