UNPKG

@nestjs-mod/webhook

Version:

Webhook module with an error filter, guard, controller, database migrations and rest-sdk for work with module from other nodejs appliaction

25 lines (24 loc) 701 B
import { Observable } from 'rxjs'; import WebSocket from 'ws'; import { WebhookApi } from './rest-sdk'; export declare class WebhookRestSdkService { private options?; private webhookApi?; private webhookApiAxios?; private wsHeaders; constructor(options?: { serverUrl?: string; headers?: Record<string, string>; } | undefined); getWebhookApi(): WebhookApi; updateHeaders(headers: Record<string, string>): void; webSocket<T>({ path, eventName, options, }: { path: string; eventName: string; options?: WebSocket.ClientOptions; }): Observable<{ data: T; event: string; }>; private createApiClients; }