n8n-nodes-everest-tms
Version:
Everest TMS n8n integration
320 lines • 9.04 kB
JavaScript
"use strict";
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 CRM contact',
action: 'Create a contact',
},
{
name: 'Create Event',
value: 'createEvent',
description: 'Create an event for a contact',
action: 'Create contact event',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a contact',
action: 'Delete a contact',
},
{
name: 'Get',
value: 'get',
description: 'Get a contact by ID',
action: 'Get a contact',
},
{
name: 'Get Many',
value: 'getMany',
description: 'Get multiple contacts',
action: 'Get many contacts',
},
{
name: 'Update',
value: 'update',
description: 'Update a contact',
action: 'Update a contact',
},
],
default: 'get',
},
];
exports.contactFields = [
// Get, Delete, Update operations
{
displayName: 'Contact ID',
name: 'id',
type: 'number',
required: true,
displayOptions: {
show: {
resource: ['contact'],
operation: ['get', 'delete', 'update', 'createEvent'],
},
},
default: 0,
description: 'The ID of the contact',
},
// Create operation - Required fields
{
displayName: 'Email',
name: 'email',
type: 'string',
required: true,
displayOptions: {
show: {
resource: ['contact'],
operation: ['create'],
},
},
default: '',
description: 'Email address of the contact',
placeholder: 'johndoe@domain.tld',
},
{
displayName: 'Phone',
name: 'tel',
type: 'string',
required: true,
displayOptions: {
show: {
resource: ['contact'],
operation: ['create'],
},
},
default: '',
description: 'Phone number of the contact',
placeholder: '0033123456789',
},
// Additional fields for Create
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['contact'],
operation: ['create'],
},
},
options: [
{
displayName: 'First Name',
name: 'first_name',
type: 'string',
default: '',
description: 'First name of the contact',
},
{
displayName: 'Last Name',
name: 'last_name',
type: 'string',
default: '',
description: 'Last name of the contact',
},
{
displayName: 'Company',
name: 'company',
type: 'string',
default: '',
description: 'Company of the contact',
},
{
displayName: 'Job',
name: 'job',
type: 'string',
default: '',
description: 'Job title of the contact',
},
{
displayName: 'Points',
name: 'points',
type: 'number',
default: 0,
description: 'CRM points for this contact',
},
],
},
// Update operation fields
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['contact'],
operation: ['update'],
},
},
options: [
{
displayName: 'Email',
name: 'email',
type: 'string',
default: '',
description: 'Email address of the contact',
},
{
displayName: 'Phone',
name: 'tel',
type: 'string',
default: '',
description: 'Phone number of the contact',
},
{
displayName: 'First Name',
name: 'first_name',
type: 'string',
default: '',
description: 'First name of the contact',
},
{
displayName: 'Last Name',
name: 'last_name',
type: 'string',
default: '',
description: 'Last name of the contact',
},
{
displayName: 'Company',
name: 'company',
type: 'string',
default: '',
description: 'Company of the contact',
},
{
displayName: 'Job',
name: 'job',
type: 'string',
default: '',
description: 'Job title of the contact',
},
{
displayName: 'Points',
name: 'points',
type: 'number',
default: 0,
description: 'CRM points for this contact',
},
],
},
// Create Event operation
{
displayName: 'Event Type',
name: 'type',
type: 'options',
required: true,
displayOptions: {
show: {
resource: ['contact'],
operation: ['createEvent'],
},
},
options: [
{
name: 'Contact Created',
value: 'contact_created',
},
{
name: 'Contact Updated',
value: 'contact_updated',
},
{
name: 'Email Sent',
value: 'email_sent',
},
{
name: 'Email Opened',
value: 'email_opened',
},
{
name: 'Form Submitted',
value: 'form_submitted',
},
{
name: 'Custom',
value: 'custom',
},
{
name: 'Phone Call Incoming',
value: 'phone_call_incoming',
},
{
name: 'Phone Call Outgoing',
value: 'phone_call_outgoing',
},
],
default: 'custom',
description: 'Type of event to create',
},
{
displayName: 'Description',
name: 'desc',
type: 'string',
displayOptions: {
show: {
resource: ['contact'],
operation: ['createEvent'],
},
},
default: '',
description: 'Description of the event',
placeholder: 'Just had a conversation with this contact [...]',
},
// Get Many - Options
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Option',
default: {},
displayOptions: {
show: {
resource: ['contact'],
operation: ['getMany'],
},
},
options: [
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
},
{
displayName: 'Limit Start',
name: 'limit_start',
type: 'number',
default: 0,
description: 'Starting offset for pagination (0-based index)',
},
{
displayName: 'Search',
name: 'search',
type: 'string',
default: '',
description: 'Search term to filter contacts',
},
],
},
];
//# sourceMappingURL=ContactDescription.js.map