n8n-nodes-everest-tms
Version:
Everest TMS n8n integration
468 lines • 14.2 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.clientFields = exports.clientOperations = void 0;
exports.clientOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['client'],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a new client',
action: 'Create a client',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a client',
action: 'Delete a client',
},
{
name: 'Get',
value: 'get',
description: 'Get a client by ID',
action: 'Get a client',
},
{
name: 'Get Many',
value: 'getMany',
description: 'Get multiple clients',
action: 'Get many clients',
},
{
name: 'Update',
value: 'update',
description: 'Update a client',
action: 'Update a client',
},
],
default: 'get',
},
];
exports.clientFields = [
// Get and Delete operations
{
displayName: 'Client ID',
name: 'id',
type: 'number',
required: true,
displayOptions: {
show: {
resource: ['client'],
operation: ['get', 'delete', 'update'],
},
},
default: 0,
description: 'The ID of the client',
},
// Create operation - Required fields
{
displayName: 'Email',
name: 'email',
type: 'string',
required: true,
displayOptions: {
show: {
resource: ['client'],
operation: ['create'],
},
},
default: '',
description: 'Email address of the client',
placeholder: 'client@company.com',
},
{
displayName: 'First Name',
name: 'first_name',
type: 'string',
required: true,
displayOptions: {
show: {
resource: ['client'],
operation: ['create'],
},
},
default: '',
description: 'First name of the client',
},
{
displayName: 'Last Name',
name: 'last_name',
type: 'string',
required: true,
displayOptions: {
show: {
resource: ['client'],
operation: ['create'],
},
},
default: '',
description: 'Last name of the client',
},
{
displayName: 'Phone',
name: 'tel',
type: 'string',
required: true,
displayOptions: {
show: {
resource: ['client'],
operation: ['create'],
},
},
default: '',
description: 'Phone number of the client',
},
{
displayName: 'Password',
name: 'password',
type: 'string',
typeOptions: { password: true },
required: true,
displayOptions: {
show: {
resource: ['client'],
operation: ['create'],
},
},
default: '',
description: 'Password for the client account',
},
{
displayName: 'Confirm Password',
name: 'password_repeat',
type: 'string',
typeOptions: { password: true },
required: true,
displayOptions: {
show: {
resource: ['client'],
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: ['client'],
operation: ['create', 'update'],
},
},
options: [
{
displayName: 'Internal Code',
name: 'internal_code',
type: 'string',
default: '',
description: 'Internal reference code for the client',
},
{
displayName: 'Accounting Code',
name: 'accounting_code',
type: 'string',
default: '',
description: 'Accounting reference code for the client',
},
{
displayName: 'VAT Rate (%)',
name: 'vat',
type: 'number',
default: 20,
description: 'VAT rate applied to this client',
},
{
displayName: 'VAT Number',
name: 'vat_number',
type: 'string',
default: '',
description: 'VAT identification number',
},
{
displayName: 'Address Line 1',
name: 'address_line1',
type: 'string',
default: '',
description: 'Primary address line',
},
{
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 Email',
name: 'billing_email',
type: 'string',
default: '',
description: 'Email address for billing',
},
{
displayName: 'Billing Address',
name: 'billing_address',
type: 'string',
default: '',
description: 'Address for billing',
},
{
displayName: 'Billing Complementary Info',
name: 'billing_complementary',
type: 'string',
default: '',
description: 'Additional billing information',
},
{
displayName: 'Fuel Surcharge',
name: 'fuel_surcharge',
type: 'number',
default: 0,
description: 'Fuel surcharge percentage applied to missions',
},
{
displayName: 'Photo (Base64)',
name: 'photo',
type: 'string',
default: '',
description: 'Base64 encoded profile photo',
},
{
displayName: 'Periodic Invoicing',
name: 'is_periodic_invoiced',
type: 'boolean',
default: false,
description: 'Whether client is invoiced periodically',
},
{
displayName: 'Invoice Period',
name: 'invoice_period',
type: 'options',
options: [
{
name: '1st of Month',
value: '1st_of_month',
},
],
default: '1st_of_month',
description: 'Invoicing period for periodic invoicing',
},
{
displayName: 'Invoice Period Extra',
name: 'invoice_period_extra',
type: 'number',
default: 0,
description: 'Additional parameter for invoicing period',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
options: [
{
name: 'Active',
value: 1,
},
{
name: 'Inactive',
value: 0,
},
],
default: 1,
description: 'Client account status',
},
{
displayName: 'Establishment',
name: 'establishment_id',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getEstablishments',
},
default: '',
description: 'Establishment this client belongs to',
},
],
},
// Update operation fields
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['client'],
operation: ['update'],
},
},
options: [
{
displayName: 'Email',
name: 'email',
type: 'string',
default: '',
description: 'Email address of the client',
},
{
displayName: 'First Name',
name: 'first_name',
type: 'string',
default: '',
description: 'First name of the client',
},
{
displayName: 'Last Name',
name: 'last_name',
type: 'string',
default: '',
description: 'Last name of the client',
},
{
displayName: 'Phone',
name: 'tel',
type: 'string',
default: '',
description: 'Phone number of the client',
},
{
displayName: 'Password',
name: 'password',
type: 'string',
typeOptions: { password: true },
default: '',
description: 'New password for the client',
},
{
displayName: 'Confirm Password',
name: 'password_repeat',
type: 'string',
typeOptions: { password: true },
default: '',
description: 'Confirm the new password',
},
],
},
// Custom Information for Create and Update
{
displayName: 'Custom Information Requirements',
name: 'custom_infos',
type: 'fixedCollection',
default: {},
placeholder: 'Add Custom Info',
displayOptions: {
show: {
resource: ['client'],
operation: ['create', 'update'],
},
},
typeOptions: {
multipleValues: true,
},
options: [
{
name: 'info',
displayName: 'Custom Info',
values: [
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
description: 'Name of the custom information field',
},
{
displayName: 'Mandatory',
name: 'mandatory',
type: 'boolean',
default: false,
description: 'Whether this field is mandatory when creating missions',
},
],
},
],
},
// Get Many - Options
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Option',
default: {},
displayOptions: {
show: {
resource: ['client'],
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 clients',
},
{
displayName: 'Start Date From',
name: 'date_between_start',
type: 'dateTime',
default: '',
description: 'Filter clients who had missions from this date/time (Europe/Paris timezone)',
placeholder: '2025-01-01 00:00',
},
{
displayName: 'Start Date To',
name: 'date_between_end',
type: 'dateTime',
default: '',
description: 'Filter clients who had missions until this date/time (Europe/Paris timezone)',
placeholder: '2025-12-31 23:59',
},
{
displayName: 'With Missions Only',
name: 'with_missions',
type: 'boolean',
default: false,
description: 'If true, returns only clients who have missions (can be used without date filters)',
},
],
},
];
//# sourceMappingURL=ClientDescription.js.map