mongodb-dynamic-api
Version:
Auto generated CRUD API for MongoDB using NestJS
14 lines (13 loc) • 496 B
TypeScript
import { GatewayMetadata } from '@nestjs/websockets';
import { Socket } from 'socket.io';
import { BaseEntity } from '../models';
interface ExtendedSocket<Entity extends BaseEntity = any> extends Socket {
user?: Entity;
}
type GatewayResponse<Data> = Promise<{
event: string;
data: Data;
}>;
type GatewayOptions = GatewayMetadata;
type DynamicApiWebSocketOptions = GatewayOptions | boolean;
export type { DynamicApiWebSocketOptions, ExtendedSocket, GatewayOptions, GatewayResponse };