UNPKG

@tuanltntu/n8n-nodes-bitrix24

Version:

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

198 lines 4.89 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.userFields = exports.userOperations = void 0; // User Operation field const operationField = { displayName: "Operation", name: "operation", type: "options", noDataExpression: true, required: true, default: "get", displayOptions: { show: { resource: ["user"], }, }, options: [ { name: "Get Current User", value: "getCurrent", description: "Get current user information (user.current)", action: "Get current user", }, { name: "Get User", value: "get", description: "Get user information (user.get)", action: "Get user information", }, { name: "Get All Users", value: "getAll", description: "Get list of users (user.list)", action: "Get list of users", }, { name: "Add User", value: "add", description: "Add new user (user.add)", action: "Add new user", }, { name: "Update User", value: "update", description: "Update user information (user.update)", action: "Update user", }, { name: "Get User Fields", value: "getFields", description: "Get user fields (user.fields)", action: "Get user fields", }, ], }; // User ID field const userIdField = { displayName: "User ID", name: "userId", type: "string", required: true, default: "", description: "ID of the user", displayOptions: { show: { resource: ["user"], operation: ["get", "update"], }, }, }; // User data field for add/update operations const userDataField = { displayName: "User Data", name: "userData", type: "json", default: "{}", description: "User data in JSON format", displayOptions: { show: { resource: ["user"], operation: ["add", "update"], }, }, }; // Return All field const returnAllField = { displayName: "Return All", name: "returnAll", type: "boolean", displayOptions: { show: { resource: ["user"], operation: ["getAll"], }, }, default: false, description: "Whether to return all results or only up to the limit", }; // Limit field const limitField = { displayName: "Limit", name: "limit", type: "number", displayOptions: { show: { resource: ["user"], operation: ["getAll"], returnAll: [false], }, }, typeOptions: { minValue: 1, maxValue: 500, }, default: 50, description: "Max number of results to return", }; // Options collection const optionsCollection = { displayName: "Options", name: "options", type: "collection", placeholder: "Add Option", default: {}, displayOptions: { show: { resource: ["user"], }, }, options: [ { displayName: "Filter", name: "filter", type: "json", default: "{}", description: "Filter criteria in JSON format", }, { displayName: "Order", name: "order", type: "json", default: "{}", description: "Sort criteria in JSON format", }, { displayName: "Admin Mode", name: "adminMode", type: "boolean", default: false, description: "Whether to use admin mode", }, { displayName: "Custom Parameters", name: "customParameters", type: "json", default: "{}", description: "Additional parameters in JSON format", }, { displayName: "Access Token", name: "accessToken", type: "string", default: "", description: "Access token for authentication", }, ], }; // Export operations exports.userOperations = [ { name: "Get", value: "get", description: "Get a user by ID", action: "Get a user", }, { name: "Get All", value: "getAll", description: "Get all users", action: "Get all users", }, { name: "Get Current", value: "getCurrent", description: "Get current user", action: "Get current user", }, ]; // Export fields exports.userFields = [ operationField, userIdField, userDataField, returnAllField, limitField, optionsCollection, ]; //# sourceMappingURL=UserDescription.js.map