n8n-nodes-alegra-unofficial
Version:
Unofficial Alegra node for n8n - Community integration with Alegra's accounting platform. NOT OFFICIALLY SUPPORTED BY ALEGRA.
583 lines • 18.1 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
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: '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: 'getAll',
description: 'Get many contacts',
action: 'Get many contacts',
},
{
name: 'Update',
value: 'update',
description: 'Update a contact',
action: 'Update a contact',
},
],
default: 'create',
},
// Create Contact
{
displayName: 'Name',
name: 'name',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['contact'],
operation: ['create'],
},
},
description: 'Contact name',
},
{
displayName: 'Contact Type',
name: 'type',
type: 'multiOptions',
required: true,
options: [
{
name: 'Client',
value: 'client',
},
{
name: 'Provider',
value: 'provider',
},
],
default: ['client'],
displayOptions: {
show: {
resource: ['contact'],
operation: ['create'],
},
},
description: 'Type of contact',
},
{
displayName: 'Identification Type',
name: 'identificationType',
type: 'options',
required: true,
options: [
{
name: 'CC - Cédula de Ciudadanía',
value: 'CC',
},
{
name: 'CE - Cédula de Extranjería',
value: 'CE',
},
{
name: 'NIT - Número de Identificación Tributaria',
value: 'NIT',
},
{
name: 'PP - Pasaporte',
value: 'PP',
},
{
name: 'TI - Tarjeta de Identidad',
value: 'TI',
},
{
name: 'RC - Registro Civil',
value: 'RC',
},
{
name: 'RUT - Registro Único Tributario',
value: 'RUT',
},
{
name: 'DNI - Documento Nacional de Identidad',
value: 'DNI',
},
{
name: 'RFC - Registro Federal de Contribuyentes',
value: 'RFC',
},
{
name: 'RUC - Registro Único de Contribuyente',
value: 'RUC',
},
],
default: 'NIT',
displayOptions: {
show: {
resource: ['contact'],
operation: ['create'],
},
},
description: 'Type of identification document',
},
{
displayName: 'Identification Number',
name: 'identificationNumber',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['contact'],
operation: ['create'],
},
},
description: 'Identification document number',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['contact'],
operation: ['create'],
},
},
options: [
{
displayName: 'Email',
name: 'email',
type: 'string',
placeholder: 'name@email.com',
default: '',
description: 'Contact email address',
},
{
displayName: 'Phone Primary',
name: 'phonePrimary',
type: 'string',
default: '',
description: 'Primary phone number',
},
{
displayName: 'Phone Secondary',
name: 'phoneSecondary',
type: 'string',
default: '',
description: 'Secondary phone number',
},
{
displayName: 'Mobile',
name: 'mobile',
type: 'string',
default: '',
description: 'Mobile phone number',
},
{
displayName: 'Fax',
name: 'fax',
type: 'string',
default: '',
description: 'Fax number',
},
{
displayName: 'Address',
name: 'address',
type: 'fixedCollection',
typeOptions: {
multipleValues: false,
},
default: {},
options: [
{
name: 'addressFields',
displayName: 'Address',
values: [
{
displayName: 'Address',
name: 'address',
type: 'string',
default: '',
description: 'Street address',
},
{
displayName: 'City',
name: 'city',
type: 'string',
default: '',
description: 'City',
},
{
displayName: 'Department/State',
name: 'department',
type: 'string',
default: '',
description: 'Department or state',
},
{
displayName: 'Country',
name: 'country',
type: 'string',
default: '',
description: 'Country',
},
{
displayName: 'Postal Code',
name: 'postalCode',
type: 'string',
default: '',
description: 'Postal or ZIP code',
},
],
},
],
},
{
displayName: 'Observations',
name: 'observations',
type: 'string',
typeOptions: {
rows: 4,
},
default: '',
description: 'Additional observations about the contact',
},
{
displayName: 'Seller Name or ID',
name: 'seller',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getSellers',
},
default: '',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
},
{
displayName: 'Price List Name or ID',
name: 'priceList',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getPriceLists',
},
default: '',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
},
{
displayName: 'Ignore Repeated',
name: 'ignoreRepeated',
type: 'boolean',
default: false,
description: 'Whether to ignore if identification already exists',
},
{
displayName: 'Include Statement Link',
name: 'statementAttached',
type: 'boolean',
default: false,
description: 'Whether to include customer statement link',
},
],
},
// Get Contact
{
displayName: 'Contact ID',
name: 'id',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['contact'],
operation: ['get', 'delete'],
},
},
description: 'The ID of the contact',
},
// Get All Contacts
{
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,
maxValue: 100,
},
default: 30,
description: 'Max number of results to return',
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Filter',
default: {},
displayOptions: {
show: {
resource: ['contact'],
operation: ['getAll'],
},
},
options: [
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
description: 'Filter by contact name',
},
{
displayName: 'Identification',
name: 'identification',
type: 'string',
default: '',
description: 'Filter by identification number',
},
{
displayName: 'Type',
name: 'type',
type: 'options',
options: [
{
name: 'All',
value: '',
},
{
name: 'Client',
value: 'client',
},
{
name: 'Provider',
value: 'provider',
},
],
default: '',
description: 'Filter by contact type',
},
{
displayName: 'Email',
name: 'email',
type: 'string',
default: '',
description: 'Filter by email address',
},
{
displayName: 'Order By',
name: 'orderBy',
type: 'options',
options: [
{
name: 'Name',
value: 'name',
},
{
name: 'ID',
value: 'id',
},
{
name: 'Identification',
value: 'identification',
},
],
default: 'name',
description: 'Field to order results by',
},
{
displayName: 'Order Direction',
name: 'orderDirection',
type: 'options',
options: [
{
name: 'Ascending',
value: 'ASC',
},
{
name: 'Descending',
value: 'DESC',
},
],
default: 'ASC',
description: 'Order direction',
},
],
},
// Update Contact
{
displayName: 'Contact ID',
name: 'id',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['contact'],
operation: ['update'],
},
},
description: 'The ID of the contact to update',
},
{
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: '',
description: 'Contact name',
},
{
displayName: 'Email',
name: 'email',
type: 'string',
placeholder: 'name@email.com',
default: '',
description: 'Contact email address',
},
{
displayName: 'Phone Primary',
name: 'phonePrimary',
type: 'string',
default: '',
description: 'Primary phone number',
},
{
displayName: 'Phone Secondary',
name: 'phoneSecondary',
type: 'string',
default: '',
description: 'Secondary phone number',
},
{
displayName: 'Mobile',
name: 'mobile',
type: 'string',
default: '',
description: 'Mobile phone number',
},
{
displayName: 'Fax',
name: 'fax',
type: 'string',
default: '',
description: 'Fax number',
},
{
displayName: 'Address',
name: 'address',
type: 'fixedCollection',
typeOptions: {
multipleValues: false,
},
default: {},
options: [
{
name: 'addressFields',
displayName: 'Address',
values: [
{
displayName: 'Address',
name: 'address',
type: 'string',
default: '',
description: 'Street address',
},
{
displayName: 'City',
name: 'city',
type: 'string',
default: '',
description: 'City',
},
{
displayName: 'Department/State',
name: 'department',
type: 'string',
default: '',
description: 'Department or state',
},
{
displayName: 'Country',
name: 'country',
type: 'string',
default: '',
description: 'Country',
},
{
displayName: 'Postal Code',
name: 'postalCode',
type: 'string',
default: '',
description: 'Postal or ZIP code',
},
],
},
],
},
{
displayName: 'Observations',
name: 'observations',
type: 'string',
typeOptions: {
rows: 4,
},
default: '',
description: 'Additional observations about the contact',
},
],
},
];
//# sourceMappingURL=contact.operations.js.map