UNPKG

n8n-nodes-close-crm

Version:

N8N community node for Close CRM integration with comprehensive lead, opportunity, task, note, and call management

153 lines (152 loc) 4.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.opportunityFields = exports.opportunityOperations = void 0; exports.opportunityOperations = [ { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { resource: ['opportunity'], }, }, options: [ { name: 'Find', value: 'find', description: 'Find opportunities', action: 'Find opportunities', }, { name: 'Update', value: 'update', description: 'Update an opportunity', action: 'Update an opportunity', }, ], default: 'find', }, ]; exports.opportunityFields = [ { displayName: 'Lead ID', name: 'leadId', type: 'string', displayOptions: { show: { resource: ['opportunity'], operation: ['find'], }, }, default: '', description: 'Filter opportunities by lead ID', }, { displayName: 'Status Name or ID', name: 'statusId', type: 'options', typeOptions: { loadOptionsMethod: 'getOpportunityStatuses', }, displayOptions: { show: { resource: ['opportunity'], operation: ['find'], }, }, default: '', description: 'Filter opportunities by status. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.', }, { displayName: 'Return All', name: 'returnAll', type: 'boolean', displayOptions: { show: { resource: ['opportunity'], operation: ['find'], }, }, default: false, description: 'Whether to return all results or only up to a given limit', }, { displayName: 'Limit', name: 'limit', type: 'number', displayOptions: { show: { resource: ['opportunity'], operation: ['find'], returnAll: [false], }, }, typeOptions: { minValue: 1, }, default: 50, description: 'Max number of results to return', }, { displayName: 'Opportunity ID', name: 'opportunityId', type: 'string', displayOptions: { show: { resource: ['opportunity'], operation: ['update'], }, }, default: '', required: true, description: 'The ID of the opportunity to update', }, { displayName: 'Update Fields', name: 'updateFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { resource: ['opportunity'], operation: ['update'], }, }, options: [ { displayName: 'Status Name or ID', name: 'statusId', type: 'options', typeOptions: { loadOptionsMethod: 'getOpportunityStatuses', }, default: '', description: 'The status of the opportunity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.', }, { displayName: 'Note', name: 'note', type: 'string', default: '', description: 'Note about the opportunity', }, { displayName: 'Value', name: 'value', type: 'number', default: 0, description: 'The value of the opportunity in cents', }, { displayName: 'Value Formatted', name: 'valueFormatted', type: 'string', default: '', description: 'The formatted value of the opportunity', }, ], }, ];