Open jhownpaixao opened 11 months ago
adicionar suporte ao typescript:
declare module 'node-webhooks' { import type { EventEmitter2 } from 'eventemitter2';
interface WebHookOptions { db: string | Record<string, string[]>; httpSuccessCodes?: number[]; }
type WebHookCallback = ( shortname: string, jsonData: any, headersData?: Record<string, string> ) => void;
class WebHooks { constructor(options: WebHookOptions);
trigger(shortname: string, jsonData: any, headersData?: Record<string, string>): void; add(shortname: string, url: string): Promise<boolean>; remove(shortname: string, url?: string): Promise<boolean>; getDB(): Promise<Record<string, string[]>>; getWebHook(shortname: string): Promise<string[]>; getListeners(): Record<string, WebHookCallback>; getEmitter(): EventEmitter2;
}
export = WebHooks; }
adicionar suporte ao typescript:
declare module 'node-webhooks' { import type { EventEmitter2 } from 'eventemitter2';
interface WebHookOptions { db: string | Record<string, string[]>; httpSuccessCodes?: number[]; }
type WebHookCallback = ( shortname: string, jsonData: any, headersData?: Record<string, string> ) => void;
class WebHooks { constructor(options: WebHookOptions);
}
export = WebHooks; }