mongodb-dynamic-api
Version:
Auto generated CRUD API for MongoDB using NestJS
13 lines (12 loc) • 2.61 kB
TypeScript
import { Type, ValidationPipeOptions } from '@nestjs/common';
import { AuthAbilityPredicate, DynamicApiServiceBeforeSaveCallback, DynamicApiServiceCallback, DynamicAPIServiceProvider, GatewayOptions } from '../../interfaces';
import { BaseEntity } from '../../models';
import { AuthControllerConstructor, AuthGatewayConstructor, DynamicApiLoginOptions, DynamicApiRegisterOptions, DynamicApiResetPasswordOptions, DynamicApiUpdateAccountOptions } from './interfaces';
declare const authServiceProviderName = "DynamicApiAuthService";
declare const authGatewayProviderName = "DynamicApiAuthGateway";
declare const localStrategyProviderName = "DynamicApiLocalStrategy";
declare function createLocalStrategyProvider<Entity extends BaseEntity>(loginField: keyof Entity, passwordField: keyof Entity, abilityPredicate: AuthAbilityPredicate | undefined): DynamicAPIServiceProvider;
declare function createAuthServiceProvider<Entity extends BaseEntity>(userEntity: Type<Entity>, { loginField, passwordField, additionalFields, callback: loginCallback }: DynamicApiLoginOptions<Entity>, registerCallback: DynamicApiServiceCallback<Entity> | undefined, resetPasswordOptions: DynamicApiResetPasswordOptions<Entity> | undefined, updateAccountCallback: DynamicApiServiceCallback<Entity> | undefined, beforeRegisterCallback: DynamicApiServiceBeforeSaveCallback<Entity> | undefined, beforeUpdateAccountCallback: DynamicApiServiceBeforeSaveCallback<Entity> | undefined): DynamicAPIServiceProvider;
declare function createAuthController<Entity extends BaseEntity>(userEntity: Type<Entity>, { loginField, passwordField, additionalFields }: DynamicApiLoginOptions<Entity>, registerOptions: DynamicApiRegisterOptions<Entity> | undefined, validationPipeOptions: ValidationPipeOptions | undefined, resetPasswordOptions: DynamicApiResetPasswordOptions<Entity> | undefined, updateAccountOptions: DynamicApiUpdateAccountOptions<Entity> | undefined): AuthControllerConstructor<Entity>;
declare function createAuthGateway<Entity extends BaseEntity>(userEntity: Type<Entity>, loginOptions: DynamicApiLoginOptions<Entity>, registerOptions: DynamicApiRegisterOptions<Entity> | undefined, validationPipeOptions: ValidationPipeOptions | undefined, resetPasswordOptions: DynamicApiResetPasswordOptions<Entity> | undefined, updateAccountOptions: DynamicApiUpdateAccountOptions<Entity> | undefined, gatewayOptions: GatewayOptions): AuthGatewayConstructor<Entity>;
export { authServiceProviderName, authGatewayProviderName, createAuthController, createAuthServiceProvider, createAuthGateway, createLocalStrategyProvider, localStrategyProviderName, };