Source

admin-bro-nestjs/src/interfaces/admin-module-options.interface.ts

import { AdminBroOptions, CurrentAdmin } from 'admin-bro';
import { SessionOptions } from 'express-session';

import { ExpressFormidableOptions } from './express-formidable-options.interface';

/**
 * Options passed to nestjs module
 * 
 * @memberof module:@admin-bro/nestjs
 * @alias AdminModuleOptions
 */
export type AdminModuleOptions = {
  /**
   * Standard AdminBro options
   */
  adminBroOptions: AdminBroOptions,
  /**
   * Authentication options. When NOT provided, it will initialize AdminBro without login page and authorization function. 
   */
  auth?: {
    /**
     * verifies if given credentials are valid, therefore if user has access to Admin Panel
     */
    authenticate: (email: string, password: string) => Promise<CurrentAdmin>,
    cookiePassword: string,
    cookieName: string,
  }
  /**
   * Options passed to express formidable (used only by AdminBro express module)
   */
  formidableOptions?: ExpressFormidableOptions,
  /**
   * Options passed to express session (used only by AdminBro express module)
   * Here you might want to change the store from the default memory store to
   * something more reliable (i.e. database).
   */
  sessionOptions?: SessionOptions,
}
SoftwareBrothers

Proudly built and maintained by SoftwareBrothers

Software House with a passion for both JavaScript and TypeScript.

See what we do See what we believe in

Proudly built and maintained by

SoftwareBrothers