gypsum
Version:
Simple and easy lightweight typescript server side framework on Node.js.
27 lines (26 loc) • 805 B
TypeScript
import * as MongoDB from 'mongodb';
import * as Validall from 'validall';
import { CorsOptions } from 'cors';
import { API_TYPES, RESPONSE_DOMAINS } from '../types';
import { IHookOptions } from './hook';
import { IServiceOptions } from '.';
export interface IModelOptions {
secure?: any;
authorize?: any;
private?: boolean | string[];
internal?: boolean;
servicesOptions?: {
[key: string]: IServiceOptions;
};
apiType?: API_TYPES;
domain?: RESPONSE_DOMAINS;
before?: IHookOptions[];
after?: IHookOptions[];
schema?: Validall.ISchema;
indexes?: {
name: string;
options?: MongoDB.IndexOptions;
}[];
cors?: CorsOptions;
}
export declare function MODEL(options?: IModelOptions): (Target: any) => void;