UNPKG

n8n-nodes-feishu-lark

Version:

n8n custom nodes for n8n to interact with Feishu/Lark, including Lark Bot, Lark MCP, and Lark Trigger.

53 lines 1.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WSConfig = void 0; const enum_1 = require("./enum"); class WSConfig { constructor() { this.client = { appId: '', appSecret: '', domain: enum_1.Domain.Feishu, }; this.ws = { connectUrl: '', pingInterval: 120 * 1000, reconnectCount: -1, reconnectInterval: 120 * 1000, reconnectNonce: 30 * 1000, deviceId: '', serviceId: '', autoReconnect: true, }; this.wsInstance = null; } updateClient(clientConfig) { Object.assign(this.client, clientConfig); } updateWs(WSConfig) { Object.assign(this.ws, WSConfig); } getClient(key) { if (key === undefined) { return this.client; } return this.client[key]; } getWS(key) { if (key === undefined) { return this.ws; } return this.ws[key]; } get wsConfigUrl() { return `${this.getClient('domain')}/callback/ws/endpoint`; } setWSInstance(wsInstance) { this.wsInstance = wsInstance; } getWSInstance() { return this.wsInstance; } } exports.WSConfig = WSConfig; //# sourceMappingURL=ws-config.js.map