UNPKG

@tuanltntu/n8n-nodes-bitrix24

Version:

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

255 lines 7.53 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.chatboxResources = exports.chatNotificationFields = exports.chatConversationFields = exports.chatMessageFields = exports.chatOperationFields = void 0; // Common fields used in chat operations exports.chatOperationFields = [ // Operation selector for chat operations { displayName: "Operation", name: "operation", type: "options", noDataExpression: true, displayOptions: { show: { resource: ["chatbox"], chatResource: ["chat"], }, }, options: [ { name: "Send Message", value: "send", description: "Send a message to a chat", action: "Send a message to a chat", }, { name: "Update Message", value: "update", description: "Update a message in a chat", action: "Update a message in a chat", }, { name: "Delete Message", value: "delete", description: "Delete a message from a chat", action: "Delete a message from a chat", }, ], default: "send", }, ]; exports.chatMessageFields = [ // Fields for sending a message { displayName: "Chat ID", name: "chatId", type: "string", required: true, displayOptions: { show: { resource: ["chatbox"], chatResource: ["message"], operation: ["sendMessage", "getMessages"], }, }, default: "", description: "The ID of the chat", }, { displayName: "Message", name: "message", type: "string", required: true, displayOptions: { show: { resource: ["chatbox"], chatResource: ["message"], operation: ["sendMessage"], }, }, default: "", typeOptions: { rows: 4, }, description: "The message text to send", }, { displayName: "Options", name: "options", type: "collection", placeholder: "Add Option", default: {}, displayOptions: { show: { resource: ["chatbox"], chatResource: ["message"], operation: ["sendMessage"], }, }, 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: "System", name: "system", type: "boolean", default: false, description: "Whether the message is a system message", }, { 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, }, }, ], }, ]; exports.chatConversationFields = [ // Fields for chat operations { displayName: "Title", name: "title", type: "string", required: true, displayOptions: { show: { resource: ["chatbox"], chatResource: ["chat"], operation: ["createChat"], }, }, default: "", description: "The title of the chat", }, { displayName: "User IDs", name: "userIds", type: "string", required: true, displayOptions: { show: { resource: ["chatbox"], chatResource: ["chat"], operation: ["createChat", "addUsersToChat"], }, }, default: "", description: "Comma-separated list of user IDs to add to the chat", }, { displayName: "Chat ID", name: "chatId", type: "string", required: true, displayOptions: { show: { resource: ["chatbox"], chatResource: ["chat"], operation: ["addUsersToChat"], }, }, default: "", description: "The ID of the chat to add users to", }, ]; exports.chatNotificationFields = [ // Fields for notification operations { displayName: "User ID", name: "userId", type: "string", required: true, displayOptions: { show: { resource: ["chatbox"], chatResource: ["notification"], operation: ["sendNotification"], }, }, default: "", description: "The ID of the user to send the notification to", }, { displayName: "Message", name: "message", type: "string", required: true, displayOptions: { show: { resource: ["chatbox"], chatResource: ["notification"], operation: ["sendNotification"], }, }, default: "", typeOptions: { rows: 4, }, description: "The notification message text", }, { displayName: "Tag", name: "tag", type: "string", displayOptions: { show: { resource: ["chatbox"], chatResource: ["notification"], operation: ["sendNotification"], }, }, default: "", description: "Tag to categorize the notification", }, { displayName: "Custom Parameters", name: "customParameters", type: "string", displayOptions: { show: { resource: ["chatbox"], chatResource: ["notification"], operation: ["sendNotification"], }, }, 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, }, }, ]; // Thêm vào node export exports.chatboxResources = [ // Include only chat-specific resources ...exports.chatOperationFields, ...exports.chatMessageFields, ...exports.chatConversationFields, ...exports.chatNotificationFields, ]; //# sourceMappingURL=ChatboxDescription.js.map