UNPKG

mongodb-dynamic-api

Version:

Auto generated CRUD API for MongoDB using NestJS

10 lines (9 loc) 588 B
import { JwtService } from '@nestjs/jwt'; import { ExtendedSocket, GatewayResponse } from '../../interfaces'; import { BaseEntity } from '../../models'; import { GetManyService } from './get-many-service.interface'; interface GetManyGateway<Entity extends BaseEntity, Response = any> { getMany(socket: ExtendedSocket, body?: object): GatewayResponse<(Entity | Response)[]>; } type GetManyGatewayConstructor<Entity extends BaseEntity> = new (service: GetManyService<Entity>, jwtService: JwtService) => GetManyGateway<Entity>; export type { GetManyGateway, GetManyGatewayConstructor };