UNPKG

@tuanltntu/n8n-nodes-bitrix24

Version:

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

948 lines 27.9 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.imBotCommandAnswerFields = exports.imBotAppFields = exports.imBotChatFields = exports.imBotContextClientFields = exports.imBotMethodBindFields = exports.imBotMessageFields = exports.imBotCommandFields = exports.imBotUnregistrationFields = exports.imBotRegistrationFields = exports.imBotOperationFields = void 0; // Operation fields for ImBot (Chat Bot) operations exports.imBotOperationFields = [ { displayName: "Operation", name: "operation", type: "options", noDataExpression: true, displayOptions: { show: { resource: ["imbot"], }, }, options: [ // Bot registration and management { name: "Register Bot", value: "registerBot", description: "Register a new bot (imbot.register)", action: "Register a new bot", }, { name: "Unregister Bot", value: "unregisterBot", description: "Unregister a bot (imbot.unregister)", action: "Unregister a bot", }, { name: "Get Bot List", value: "botList", description: "Get list of bots (imbot.bot.list)", action: "Get list of bots", }, // Bot messages { name: "Add Bot Message", value: "addBotMessage", description: "Add a message via bot (imbot.message.add)", action: "Add a message via bot", }, { name: "Update Bot Message", value: "updateBotMessage", description: "Update a bot message (imbot.message.update)", action: "Update a bot message", }, { name: "Delete Bot Message", value: "deleteBotMessage", description: "Delete a bot message (imbot.message.delete)", action: "Delete a bot message", }, { name: "Like Message", value: "likeMessage", description: "Like a message (imbot.message.like)", action: "Like a message", }, // Bot commands { name: "Add Bot Command", value: "addBotCommand", description: "Register a bot command (imbot.command.register)", action: "Register a bot command", }, { name: "Delete Bot Command", value: "deleteBotCommand", description: "Unregister a bot command (imbot.command.unregister)", action: "Unregister a bot command", }, { name: "Get Bot Commands", value: "getBotCommands", description: "Get list of bot commands (imbot.command.list)", action: "Get list of bot commands", }, { name: "Update Bot Command", value: "updateBotCommand", description: "Update a bot command (imbot.command.update)", action: "Update a bot command", }, { name: "Answer Command", value: "answerCommand", description: "Answer to a bot command (imbot.command.answer)", action: "Answer to a bot command", }, // Chat operations { name: "Get Bot Chat", value: "getBotChat", description: "Get information about a bot chat (imbot.chat.get)", action: "Get information about a bot chat", }, { name: "Add User To Chat", value: "addUserToChat", description: "Add a user to a chat via bot (imbot.chat.user.add)", action: "Add a user to a chat via bot", }, { name: "Delete User From Chat", value: "deleteUserFromChat", description: "Remove a user from chat via bot (imbot.chat.user.delete)", action: "Remove a user from chat via bot", }, // Method bindings { name: "Method Bind", value: "methodBind", description: "Bind a bot method (imbot.method.bind)", action: "Bind a bot method", }, { name: "Method Unbind", value: "methodUnbind", description: "Unbind a bot method (imbot.method.unbind)", action: "Unbind a bot method", }, // App operations { name: "App Register", value: "appRegister", description: "Register an application (imbot.app.register)", action: "Register an application", }, { name: "App Unregister", value: "appUnregister", description: "Unregister an application (imbot.app.unregister)", action: "Unregister an application", }, // Context and client { name: "Context Get", value: "contextGet", description: "Get context (imbot.context.get)", action: "Get context", }, { name: "Client Get", value: "clientGet", description: "Get client (imbot.client.get)", action: "Get client", }, ], default: "registerBot", }, ]; // Fields for bot registration exports.imBotRegistrationFields = [ { displayName: "Code", name: "code", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["registerBot"], }, }, default: "", description: "Authorization code received in the redirect URL", }, { displayName: "Event Handler URL", name: "eventHandlerUrl", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["registerBot"], }, }, default: "", description: "URL where bot events will be sent", }, { displayName: "Bot Name", name: "botName", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["registerBot"], }, }, default: "", description: "Name of the bot (required by Bitrix24 API)", }, { displayName: "Options", name: "options", type: "collection", placeholder: "Add Option", default: {}, displayOptions: { show: { resource: ["imbot"], operation: ["registerBot"], }, }, options: [ { displayName: "Type", name: "type", type: "options", options: [ { name: "Human", value: "H", }, { name: "Chat Bot", value: "B", }, { name: "Open Channels", value: "O", }, { name: "Network Bot", value: "N", }, ], default: "B", description: "Type of the bot", }, { displayName: "Event Types", name: "eventTypes", type: "multiOptions", options: [ { name: "Message Add", value: "ONIMBOTMESSAGEADD", }, { name: "Chat Add", value: "ONIMBOTJOINCHAT", }, { name: "Delete Message", value: "ONIMBOTDELETE", }, { name: "Message Update", value: "ONIMBOTMESSAGEUPDATE", }, ], default: ["ONIMBOTMESSAGEADD"], description: "Types of events the bot will listen to", }, { displayName: "Bot Description", name: "botDescription", type: "string", default: "", description: "Description of the bot", }, { displayName: "Bot Avatar", name: "botAvatar", type: "string", default: "", description: "URL to the bot avatar image", }, { displayName: "Custom Parameters", name: "customParameters", type: "string", default: "", description: "Additional parameters in JSON format to include in the request", hint: "Enter a JSON object with key-value pairs that will be merged with other parameters", typeOptions: { rows: 2, }, }, ], }, ]; // Fields for bot unregistration exports.imBotUnregistrationFields = [ { displayName: "Bot ID", name: "botId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["unregisterBot"], }, }, default: "", description: "ID of the bot to unregister", }, ]; // Fields for bot command operations exports.imBotCommandFields = [ { displayName: "Bot ID", name: "botId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: [ "addBotCommand", "deleteBotCommand", "getBotCommands", "updateBotCommand", ], }, }, default: "", description: "ID of the bot", }, { displayName: "Command", name: "command", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["addBotCommand", "deleteBotCommand"], }, }, default: "", description: "Command text (e.g., help, start)", }, { displayName: "Command Description", name: "commandDescription", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["addBotCommand"], }, }, default: "", description: "Description of what the command does", }, { displayName: "Command Params", name: "commandParams", type: "string", displayOptions: { show: { resource: ["imbot"], operation: ["addBotCommand"], }, }, default: "", description: "Additional parameters for the command", }, { displayName: "Command ID", name: "commandId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["updateBotCommand"], }, }, default: "", description: "The ID of the command to update", }, { displayName: "Fields", name: "fields", type: "collection", placeholder: "Add Field", default: {}, displayOptions: { show: { resource: ["imbot"], operation: ["updateBotCommand"], }, }, options: [ { displayName: "Command", name: "command", type: "string", default: "", description: "The new command text", }, { displayName: "Description", name: "description", type: "string", default: "", description: "The new command description", }, { displayName: "Parameters", name: "params", type: "string", default: "", description: "The new command parameters in JSON format", }, ], }, ]; // Fields for sending messages as a bot exports.imBotMessageFields = [ { displayName: "Bot ID", name: "botId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["addBotMessage", "updateBotMessage", "deleteBotMessage"], }, }, default: "", description: "ID of the bot sending the message", }, { displayName: "Dialog ID", name: "dialogId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["addBotMessage"], }, }, default: "", description: "ID of the dialog to send the message to", }, { displayName: "Message", name: "message", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["addBotMessage"], }, }, default: "", typeOptions: { rows: 4, }, description: "The message text to send", }, { displayName: "Message ID", name: "messageId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["updateBotMessage", "deleteBotMessage", "likeMessage"], }, }, default: "", description: "ID of the message to update, delete, or like", }, { displayName: "Updated Message", name: "message", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["updateBotMessage"], }, }, default: "", typeOptions: { rows: 4, }, description: "The updated message text", }, { displayName: "Options", name: "options", type: "collection", placeholder: "Add Option", default: {}, displayOptions: { show: { resource: ["imbot"], operation: ["addBotMessage", "updateBotMessage"], }, }, options: [ { displayName: "Attach Files", name: "attachFiles", type: "boolean", default: false, description: "Whether to attach files to the message", }, { displayName: "Binary Property", name: "binaryPropertyName", type: "string", default: "data", required: true, displayOptions: { show: { attachFiles: [true], }, }, description: "The name of the binary property which contains the file data for the attachment", }, { displayName: "Keyboard", name: "keyboard", type: "boolean", default: false, description: "Whether to add a keyboard to the message", }, { displayName: "Keyboard JSON", name: "keyboardJson", type: "string", default: "", typeOptions: { rows: 4, }, displayOptions: { show: { keyboard: [true], }, }, description: "JSON representation of the keyboard buttons", }, { displayName: "Custom Parameters", name: "customParameters", type: "string", default: "", description: "Additional parameters in JSON format to include in the request", hint: "Enter a JSON object with key-value pairs that will be merged with other parameters", typeOptions: { rows: 2, }, }, ], }, ]; // Fields for method binding operations exports.imBotMethodBindFields = [ { displayName: "Bot ID", name: "botId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["methodBind", "methodUnbind"], }, }, default: "", description: "The ID of the bot", }, { displayName: "Method", name: "method", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["methodBind"], }, }, default: "", description: "The method name to bind", }, { displayName: "Handler", name: "handler", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["methodBind"], }, }, default: "", description: "The handler URL for the method", }, { displayName: "Method ID", name: "methodId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["methodUnbind"], }, }, default: "", description: "The ID of the method to unbind", }, ]; // Fields for context and client operations exports.imBotContextClientFields = [ { displayName: "Bot ID", name: "botId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["contextGet", "clientGet"], }, }, default: "", description: "The ID of the bot", }, { displayName: "Dialog ID", name: "dialogId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["contextGet", "clientGet"], }, }, default: "", description: "The ID of the dialog", }, ]; // Fields for chat operations exports.imBotChatFields = [ { displayName: "Bot ID", name: "botId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["getBotChat", "addUserToChat", "deleteUserFromChat"], }, }, default: "", description: "The ID of the bot", }, { displayName: "Chat ID", name: "chatId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["getBotChat", "addUserToChat", "deleteUserFromChat"], }, }, default: "", description: "The ID of the chat", }, { displayName: "User ID", name: "userId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["addUserToChat", "deleteUserFromChat"], }, }, default: "", description: "The ID of the user to add or remove", }, ]; // Fields for app operations exports.imBotAppFields = [ { displayName: "Code", name: "code", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["appRegister"], }, }, default: "", description: "The application code", }, { displayName: "Bot ID", name: "botId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["appRegister"], }, }, default: "", description: "The ID of the bot", }, { displayName: "iFrame URL", name: "iframe", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["appRegister"], }, }, default: "", description: "The application iFrame URL", }, { displayName: "iFrame Width", name: "iframeWidth", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["appRegister"], }, }, default: "350", description: "The width of the application iFrame", }, { displayName: "iFrame Height", name: "iframeHeight", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["appRegister"], }, }, default: "250", description: "The height of the application iFrame", }, { displayName: "JS Method", name: "jsMethod", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["appRegister"], }, }, default: "", description: "The JavaScript method to call", }, { displayName: "Extranet Support", name: "extranetSupport", type: "boolean", displayOptions: { show: { resource: ["imbot"], operation: ["appRegister"], }, }, default: false, description: "Whether the application supports extranet", }, { displayName: "Livechat Support", name: "livechatSupport", type: "boolean", displayOptions: { show: { resource: ["imbot"], operation: ["appRegister"], }, }, default: false, description: "Whether the application supports livechat", }, { displayName: "App ID", name: "appId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["appUnregister"], }, }, default: "", description: "The ID of the application to unregister", }, { displayName: "Options", name: "options", type: "collection", placeholder: "Add Option", default: {}, displayOptions: { show: { resource: ["imbot"], operation: ["appRegister"], }, }, options: [ { displayName: "Custom Parameters", name: "customParameters", type: "string", default: "", description: "Additional parameters in JSON format to include in the request", hint: "Enter a JSON object with key-value pairs that will be merged with other parameters", typeOptions: { rows: 2, }, }, ], }, ]; // Fields for command answer exports.imBotCommandAnswerFields = [ { displayName: "Bot ID", name: "botId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["answerCommand"], }, }, default: "", description: "The ID of the bot", }, { displayName: "Command ID", name: "commandId", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["answerCommand"], }, }, default: "", description: "The ID of the command to answer", }, { displayName: "Message", name: "message", type: "string", required: true, displayOptions: { show: { resource: ["imbot"], operation: ["answerCommand"], }, }, default: "", typeOptions: { rows: 4, }, description: "The response message text", }, { displayName: "Options", name: "options", type: "collection", placeholder: "Add Option", default: {}, displayOptions: { show: { resource: ["imbot"], operation: ["answerCommand"], }, }, options: [ { displayName: "Attach Files", name: "attachFiles", type: "boolean", default: false, description: "Whether to attach files to the message", }, { displayName: "Binary Property", name: "binaryPropertyName", type: "string", default: "data", required: true, displayOptions: { show: { attachFiles: [true], }, }, description: "The name of the binary property which contains the file data for the attachment", }, { displayName: "Custom Parameters", name: "customParameters", type: "string", default: "", description: "Additional parameters in JSON format to include in the request", hint: "Enter a JSON object with key-value pairs that will be merged with other parameters", typeOptions: { rows: 2, }, }, ], }, ]; //# sourceMappingURL=ImBotDescription.js.map