chore(websockets): mark facing apis public in websockets

This commit is contained in:
Tony133
2023-02-06 09:39:18 +01:00
parent e92ae413f4
commit 216ce4c60f
4 changed files with 10 additions and 0 deletions

View File

@@ -1,6 +1,9 @@
import { WsParamtype } from '../enums/ws-paramtype.enum';
import { createWsParamDecorator } from '../utils/param.utils';
/**
* @publicApi
*/
export const ConnectedSocket: () => ParameterDecorator = createWsParamDecorator(
WsParamtype.SOCKET,
);

View File

@@ -4,6 +4,8 @@ import { GatewayMetadata } from '../interfaces';
/**
* Decorator that marks a class as a Nest gateway that enables real-time, bidirectional
* and event-based communication between the browser and the server.
*
* @publicApi
*/
export function WebSocketGateway(port?: number): ClassDecorator;
export function WebSocketGateway<

View File

@@ -2,6 +2,8 @@ import { MESSAGE_MAPPING_METADATA, MESSAGE_METADATA } from '../constants';
/**
* Subscribes to messages that fulfils chosen pattern.
*
* @publicApi
*/
export const SubscribeMessage = <T = string>(message: T): MethodDecorator => {
return (

View File

@@ -1,3 +1,6 @@
/**
* @publicApi
*/
export interface WsResponse<T = any> {
event: string;
data: T;