UNPKG

n8n-nodes-espocrm

Version:

n8n Community Node for EspoCRM

19 lines (18 loc) 644 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseOperation = void 0; const n8n_workflow_1 = require("n8n-workflow"); const ApiClient_1 = require("../utils/ApiClient"); class BaseOperation { constructor(context) { this.context = context; this.apiClient = new ApiClient_1.ApiClient(context); } async initializeClient() { await this.apiClient.initialize(); } handleError(error, operation) { throw new n8n_workflow_1.NodeOperationError(this.context.getNode(), `EspoCRM ${operation} Error: ${error.message}`); } } exports.BaseOperation = BaseOperation;