UNPKG

@tuanltntu/n8n-nodes-bitrix24

Version:

Comprehensive n8n community node for Bitrix24 API integration with CRM, Tasks, Chat, Telephony, and more

122 lines 3.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.allDirectApiFields = exports.directApiFields = void 0; /** * DirectAPI Description - CLEAN VERSION without circular dependencies */ // Operation field for Direct API const operationField = { displayName: "Operation", name: "operation", type: "options", noDataExpression: true, required: true, default: "call", displayOptions: { show: { resource: ["directApi"], }, }, options: [ { name: "Call", value: "call", description: "Call any Bitrix24 REST API method directly", action: "Call any Bitrix24 REST API method", }, ], }; // Method field for Direct API const methodField = { displayName: "Method", name: "endpoint", type: "string", required: true, default: "", placeholder: "crm.lead.list", description: "Direct Bitrix24 REST API endpoint without the domain or auth parts. Example: crm.lead.list, user.get, tasks.task.list", displayOptions: { show: { resource: ["directApi"], operation: ["call"], }, }, }; // Body field for Direct API const bodyField = { displayName: "Body", name: "body", type: "json", default: "{}", description: 'JSON data to include in the request body. Example: {"FIELDS": {"TITLE": "New Lead", "NAME": "John"}}', displayOptions: { show: { resource: ["directApi"], operation: ["call"], }, }, }; // Return All field for list operations const returnAllField = { displayName: "Return All", name: "returnAll", type: "boolean", default: false, displayOptions: { show: { resource: ["directApi"], operation: ["call"], }, }, description: "Whether to return all results or only up to the limit. Only applies to .list operations", }; // Max Pages field for pagination const maxPagesField = { displayName: "Max pages to load", name: "maxPages", type: "number", default: 5, displayOptions: { show: { resource: ["directApi"], operation: ["call"], returnAll: [false], }, }, description: "Maximum number of pages to load for .list operations. If response has 'next', continue loading up to this limit (50 items per page)", }; // Options collection for Direct API const optionsCollection = { displayName: "Options", name: "directApiOptions", type: "collection", placeholder: "Add Option", default: {}, displayOptions: { show: { resource: ["directApi"], operation: ["call"], }, }, options: [ { displayName: "Debug Mode", name: "debug", type: "boolean", default: false, description: "Enable debug mode to see detailed request and response information", }, ], }; // Export fields using smart organization exports.directApiFields = [ operationField, methodField, bodyField, returnAllField, maxPagesField, optionsCollection, ]; // Export all fields directly without operations exports.allDirectApiFields = [...exports.directApiFields]; //# sourceMappingURL=DirectApiDescription.js.map