UNPKG

mongodb-dynamic-api

Version:

Auto generated CRUD API for MongoDB using NestJS

11 lines (10 loc) 688 B
import { JwtService } from '@nestjs/jwt'; import { ManyEntityQuery } from '../../dtos'; import { ExtendedSocket, GatewayResponse } from '../../interfaces'; import { BaseEntity } from '../../models'; import { UpdateManyService } from './update-many-service.interface'; interface UpdateManyGateway<Entity extends BaseEntity, Data = any, Response = any> { updateMany(socket: ExtendedSocket, body: ManyEntityQuery & Data): GatewayResponse<(Entity | Response)[]>; } type UpdateManyGatewayConstructor<Entity extends BaseEntity> = new (service: UpdateManyService<Entity>, jwtService: JwtService) => UpdateManyGateway<Entity>; export type { UpdateManyGateway, UpdateManyGatewayConstructor };