UNPKG

n8n-nodes-everest-tms

Version:

Everest TMS n8n integration

435 lines 12.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.agentFields = exports.agentOperations = void 0; exports.agentOperations = [ { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { resource: ['agent'], }, }, options: [ { name: 'Create', value: 'create', description: 'Create a new agent', action: 'Create an agent', }, { name: 'Delete', value: 'delete', description: 'Delete an agent', action: 'Delete an agent', }, { name: 'Get', value: 'get', description: 'Get an agent by ID', action: 'Get an agent', }, { name: 'Get Many', value: 'getMany', description: 'Get multiple agents', action: 'Get many agents', }, { name: 'Update', value: 'update', description: 'Update an agent', action: 'Update an agent', }, { name: 'Update Location', value: 'updateLocation', description: 'Update agent location', action: 'Update agent location', }, ], default: 'get', }, ]; exports.agentFields = [ // Get, Delete, Update operations { displayName: 'Agent ID', name: 'id', type: 'number', required: true, displayOptions: { show: { resource: ['agent'], operation: ['get', 'delete', 'update'], }, }, default: 0, description: 'The ID of the agent', }, // Create operation - Required fields { displayName: 'Email', name: 'email', type: 'string', required: true, displayOptions: { show: { resource: ['agent'], operation: ['create'], }, }, default: '', description: 'Email address of the agent', placeholder: 'agent@company.com', }, { displayName: 'First Name', name: 'first_name', type: 'string', required: true, displayOptions: { show: { resource: ['agent'], operation: ['create'], }, }, default: '', description: 'First name of the agent', }, { displayName: 'Last Name', name: 'last_name', type: 'string', required: true, displayOptions: { show: { resource: ['agent'], operation: ['create'], }, }, default: '', description: 'Last name of the agent', }, { displayName: 'Address Line 1', name: 'address_line1', type: 'string', required: true, displayOptions: { show: { resource: ['agent'], operation: ['create'], }, }, default: '', description: 'Primary address of the agent', }, { displayName: 'Password', name: 'password', type: 'string', typeOptions: { password: true }, required: true, displayOptions: { show: { resource: ['agent'], operation: ['create'], }, }, default: '', description: 'Password for the agent account', }, { displayName: 'Confirm Password', name: 'password_repeat', type: 'string', typeOptions: { password: true }, required: true, displayOptions: { show: { resource: ['agent'], operation: ['create'], }, }, default: '', description: 'Confirm the password', }, // Additional fields for Create and Update { displayName: 'Additional Fields', name: 'additionalFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { resource: ['agent'], operation: ['create', 'update'], }, }, options: [ { displayName: 'Phone', name: 'tel', type: 'string', default: '', description: 'Phone number of the agent', }, { displayName: 'Address Line 2', name: 'address_line2', type: 'string', default: '', description: 'Secondary address line', }, { displayName: 'Billing Name', name: 'billing_name', type: 'string', default: '', description: 'Company name for billing', }, { displayName: 'Billing Address', name: 'billing_address', type: 'string', default: '', description: 'Address for billing', }, { displayName: 'Company Number', name: 'company_number', type: 'string', default: '', description: 'Company registration number', }, { displayName: 'Minimum Price', name: 'price_min', type: 'number', default: 0, description: 'Minimum price the agent accepts for missions', }, { displayName: 'Maximum Price', name: 'price_max', type: 'number', default: 0, description: 'Maximum price the agent accepts for missions', }, { displayName: 'Maximum Distance (km)', name: 'dist_max', type: 'number', default: 0, description: 'Maximum distance the agent is willing to travel', }, { displayName: 'Latitude', name: 'lat', type: 'string', default: '', description: 'GPS latitude of the agent', }, { displayName: 'Longitude', name: 'lng', type: 'string', default: '', description: 'GPS longitude of the agent', }, { displayName: 'Photo (Base64)', name: 'photo', type: 'string', default: '', description: 'Base64 encoded profile photo', }, { displayName: 'Available', name: 'available', type: 'boolean', default: true, description: 'Whether the agent is available for missions', }, { displayName: 'Status', name: 'status', type: 'options', options: [ { name: 'Active', value: 1, }, { name: 'Inactive', value: 0, }, ], default: 1, description: 'Agent account status', }, { displayName: 'Establishment', name: 'establishment_id', type: 'options', typeOptions: { loadOptionsMethod: 'getEstablishments', }, default: '', description: 'Establishment this agent belongs to', }, ], }, // Update operation fields { displayName: 'Update Fields', name: 'updateFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { resource: ['agent'], operation: ['update'], }, }, options: [ { displayName: 'Email', name: 'email', type: 'string', default: '', description: 'Email address of the agent', }, { displayName: 'First Name', name: 'first_name', type: 'string', default: '', description: 'First name of the agent', }, { displayName: 'Last Name', name: 'last_name', type: 'string', default: '', description: 'Last name of the agent', }, { displayName: 'Password', name: 'password', type: 'string', typeOptions: { password: true }, default: '', description: 'New password for the agent', }, { displayName: 'Confirm Password', name: 'password_repeat', type: 'string', typeOptions: { password: true }, default: '', description: 'Confirm the new password', }, ], }, // Update Location operation { displayName: 'Agent ID', name: 'id', type: 'number', required: false, displayOptions: { show: { resource: ['agent'], operation: ['updateLocation'], }, }, default: 0, description: 'The ID of the agent (optional, will use authenticated agent if not provided)', }, { displayName: 'Latitude', name: 'lat', type: 'string', required: true, displayOptions: { show: { resource: ['agent'], operation: ['updateLocation'], }, }, default: '', description: 'GPS latitude of the agent', }, { displayName: 'Longitude', name: 'lng', type: 'string', required: true, displayOptions: { show: { resource: ['agent'], operation: ['updateLocation'], }, }, default: '', description: 'GPS longitude of the agent', }, // Get Many - Options { displayName: 'Options', name: 'options', type: 'collection', placeholder: 'Add Option', default: {}, displayOptions: { show: { resource: ['agent'], 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 agents by name, email, or phone', }, { displayName: 'Available Only', name: 'available', type: 'boolean', default: false, description: 'Filter to show only available agents', }, { displayName: 'Active Only', name: 'active', type: 'boolean', default: false, description: 'Filter to show only active agent accounts', }, ], }, ]; //# sourceMappingURL=AgentDescription.js.map