UNPKG

n8n-nodes-innotes

Version:

N8N node for InNotes CRM API integration

401 lines (399 loc) 12.3 kB
"use strict"; /** * @author Marco Visin * @date 2025-05-30 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.contactFields = exports.contactOperations = void 0; exports.contactOperations = [ { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { resource: ['contact'], }, }, options: [ { name: 'Create', value: 'create', description: 'Create a new contact', action: 'Create a contact', }, { name: 'Get', value: 'get', description: 'Get a contact by ID', action: 'Get a contact', }, { name: 'Get Many', value: 'getAll', description: 'Get multiple contacts', action: 'Get many contacts', }, { name: 'Update', value: 'update', description: 'Update a contact', action: 'Update a contact', }, { name: 'Delete', value: 'delete', description: 'Delete a contact', action: 'Delete a contact', }, ], default: 'getAll', }, ]; exports.contactFields = [ // Create fields { displayName: 'Name', name: 'name', type: 'string', required: true, displayOptions: { show: { resource: ['contact'], operation: ['create'], }, }, default: '', description: 'The name of the contact', }, { displayName: 'LinkedIn Key', name: 'linkedin_key', type: 'string', required: true, displayOptions: { show: { resource: ['contact'], operation: ['create'], }, }, default: '', description: 'The LinkedIn profile key/username', }, { displayName: 'LinkedIn User', name: 'linkedin_user', type: 'string', displayOptions: { show: { resource: ['contact'], operation: ['create'], }, }, default: '', description: 'The LinkedIn username', }, { displayName: 'Location', name: 'location', type: 'string', displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'], }, }, default: '', description: 'The location of the contact', }, { displayName: 'Current Company', name: 'current_company', type: 'string', displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'], }, }, default: '', description: 'The current company of the contact', }, { displayName: 'Phone & Email', name: 'contact_details', type: 'fixedCollection', typeOptions: { multipleValues: true, sortable: true, }, placeholder: 'Add Phone or Email', displayOptions: { show: { resource: ['contact'], operation: ['create'], }, }, default: {}, description: 'Phone numbers and email addresses to store for this contact', options: [ { displayName: 'Entry', name: 'entry', values: [ { displayName: 'Type', name: 'type', type: 'options', options: [ { name: 'Email', value: 'email' }, { name: 'Phone', value: 'phone' }, ], default: 'email', description: 'Whether this entry is an email address or a phone number', }, { displayName: 'Value', name: 'value', type: 'string', default: '', placeholder: '+41 79 123 45 67', description: 'The address or number itself', }, { displayName: 'Label', name: 'label', type: 'string', default: '', placeholder: 'work', description: 'Optional label such as work, mobile or private', }, ], }, ], }, { displayName: 'Picture URL', name: 'picture_url', type: 'string', displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'], }, }, default: '', description: 'URL of the contact profile picture', }, { displayName: 'Tags', name: 'tags', type: 'collection', placeholder: 'Add Tag', displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'], }, }, default: [], options: [ { displayName: 'Tag', name: 'tag', type: 'string', default: '', }, ], description: 'Tags to assign to the contact', }, { displayName: 'Status ID', name: 'status_id', type: 'string', displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'], }, }, default: '', description: 'The status ID for the contact', }, // Get fields { displayName: 'Contact ID', name: 'contactId', type: 'string', required: true, displayOptions: { show: { resource: ['contact'], operation: ['get', 'update', 'delete'], }, }, default: '', description: 'The ID of the contact', }, // Get All fields { displayName: 'Return All', name: 'returnAll', type: 'boolean', displayOptions: { show: { resource: ['contact'], operation: ['getAll'], }, }, default: false, description: 'Whether to return all results or only up to a given limit', }, { displayName: 'Limit', name: 'limit', type: 'number', displayOptions: { show: { resource: ['contact'], operation: ['getAll'], returnAll: [false], }, }, typeOptions: { minValue: 1, // GET /api/contacts clamps pageSize at 200. Without the same ceiling // here a workflow asking for 500 gets 200 back with a 200 status and // nothing to say it was cut. maxValue: 200, }, default: 24, description: 'Max number of results to return (200 at most)', }, { displayName: 'Search Term', name: 'search', type: 'string', displayOptions: { show: { resource: ['contact'], operation: ['getAll'], }, }, default: '', description: 'Search term to filter contacts', }, { displayName: 'Filter by Tags', name: 'tags', type: 'string', displayOptions: { show: { resource: ['contact'], operation: ['getAll'], }, }, default: '', description: 'Comma-separated list of tags to filter by', }, // Update fields { displayName: 'Update Fields', name: 'updateFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { resource: ['contact'], operation: ['update'], }, }, options: [ { displayName: 'Name', name: 'name', type: 'string', default: '', }, { displayName: 'Location', name: 'location', type: 'string', default: '', }, { displayName: 'Current Company', name: 'current_company', type: 'string', default: '', }, { displayName: 'Picture URL', name: 'picture_url', type: 'string', default: '', }, { displayName: 'Status ID', name: 'status_id', type: 'string', default: '', }, { displayName: 'Phone & Email', name: 'contact_details', type: 'fixedCollection', typeOptions: { multipleValues: true, sortable: true, }, placeholder: 'Add Phone or Email', default: {}, // Replaces the stored list rather than adding to it, which is what // the API does with this field a workflow that sends one number // deletes the others, and an operator reading this list is the only // person who can know that before it happens. Leaving it empty is // the one thing it does NOT do: see contactDetailsFromCollection. description: 'Phone numbers and email addresses. This REPLACES the ones already stored, so add every entry the contact should keep. Leaving it empty changes nothing — deleting all of a contact\'s recapiti is not possible from this node.', options: [ { displayName: 'Entry', name: 'entry', values: [ { displayName: 'Type', name: 'type', type: 'options', options: [ { name: 'Email', value: 'email' }, { name: 'Phone', value: 'phone' }, ], default: 'email', description: 'Whether this entry is an email address or a phone number', }, { displayName: 'Value', name: 'value', type: 'string', default: '', placeholder: '+41 79 123 45 67', description: 'The address or number itself', }, { displayName: 'Label', name: 'label', type: 'string', default: '', placeholder: 'work', description: 'Optional label such as work, mobile or private', }, ], }, ], }, ], }, ]; //# sourceMappingURL=ContactDescription.js.map