change spaces to tabs

This commit is contained in:
quansenB 2019-11-07 10:50:02 +01:00
parent 6c1d1ade14
commit 74d1f24981
6 changed files with 2252 additions and 2252 deletions

View file

@ -3,322 +3,322 @@ import { INodeProperties } from "n8n-workflow";
import { allCurrencies } from './currencies'; import { allCurrencies } from './currencies';
export const connectionOperations = [ export const connectionOperations = [
{ {
displayName: 'Operation', displayName: 'Operation',
name: 'operation', name: 'operation',
type: 'options', type: 'options',
displayOptions: { displayOptions: {
show: { show: {
resource: [ resource: [
'connection', 'connection',
], ],
}, },
}, },
options: [ options: [
{ {
name: 'Create', name: 'Create',
value: 'create', value: 'create',
description: 'Create a connection', description: 'Create a connection',
}, },
{ {
name: 'Delete', name: 'Delete',
value: 'delete', value: 'delete',
description: 'Delete a connection', description: 'Delete a connection',
}, },
{ {
name: 'Get', name: 'Get',
value: 'get', value: 'get',
description: 'Get data of a connection', description: 'Get data of a connection',
}, },
{ {
name: 'Get All', name: 'Get All',
value: 'getAll', value: 'getAll',
description: 'Get data of all connections', description: 'Get data of all connections',
}, },
{ {
name: 'Update', name: 'Update',
value: 'update', value: 'update',
description: 'Update a connection', description: 'Update a connection',
}, },
], ],
default: 'create', default: 'create',
description: 'The operation to perform.', description: 'The operation to perform.',
}, },
] as INodeProperties[]; ] as INodeProperties[];
export const connectionFields = [ export const connectionFields = [
// ---------------------------------- // ----------------------------------
// connection:create // connection:create
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Service', displayName: 'Service',
name: 'service', name: 'service',
type: 'string', type: 'string',
default: '', default: '',
required: true, required: true,
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'create', 'create',
], ],
resource: [ resource: [
'connection', 'connection',
], ],
}, },
}, },
description: 'The name of the service.', description: 'The name of the service.',
}, },
{ {
displayName: 'External accout ID', displayName: 'External accout ID',
name: 'externalid', name: 'externalid',
type: 'string', type: 'string',
default: '', default: '',
required: true, required: true,
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'create', 'create',
], ],
resource: [ resource: [
'connection', 'connection',
], ],
}, },
}, },
description: 'The id of the account in the external service.', description: 'The id of the account in the external service.',
}, },
{ {
displayName: 'Account Name', displayName: 'Account Name',
name: 'name', name: 'name',
type: 'string', type: 'string',
default: '', default: '',
required: true, required: true,
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'create', 'create',
], ],
resource: [ resource: [
'connection', 'connection',
], ],
}, },
}, },
description: 'The name associated with the account in the external service. Often this will be a company name (e.g., "My Toystore, Inc.").', description: 'The name associated with the account in the external service. Often this will be a company name (e.g., "My Toystore, Inc.").',
}, },
{ {
displayName: 'Logo URL', displayName: 'Logo URL',
name: 'logoUrl', name: 'logoUrl',
type: 'string', type: 'string',
default: '', default: '',
required: true, required: true,
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'create', 'create',
], ],
resource: [ resource: [
'connection', 'connection',
], ],
}, },
}, },
description: 'The URL to a logo image for the external service.', description: 'The URL to a logo image for the external service.',
}, },
{ {
displayName: 'Link URL', displayName: 'Link URL',
name: 'linkUrl', name: 'linkUrl',
type: 'string', type: 'string',
default: '', default: '',
required: true, required: true,
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'create', 'create',
], ],
resource: [ resource: [
'connection', 'connection',
], ],
}, },
}, },
description: 'The URL to a page where the integration with the external service can be managed in the third-party\'s website.', description: 'The URL to a page where the integration with the external service can be managed in the third-party\'s website.',
}, },
// ---------------------------------- // ----------------------------------
// connection:update // connection:update
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Connection ID', displayName: 'Connection ID',
name: 'connectionId', name: 'connectionId',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'update', 'update',
], ],
resource: [ resource: [
'connection', 'connection',
], ],
}, },
}, },
default: 0, default: 0,
required: true, required: true,
description: 'ID of the connection to update.', description: 'ID of the connection to update.',
}, },
{ {
displayName: 'Update Fields', displayName: 'Update Fields',
name: 'updateFields', name: 'updateFields',
type: 'collection', type: 'collection',
description: 'The fields to update.', description: 'The fields to update.',
placeholder: 'Add Field', placeholder: 'Add Field',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'update', 'update',
], ],
resource: [ resource: [
'connection', 'connection',
], ],
}, },
}, },
default: {}, default: {},
options: [ options: [
{ {
displayName: 'Service', displayName: 'Service',
name: 'service', name: 'service',
type: 'string', type: 'string',
default: '', default: '',
description: 'The name of the service.', description: 'The name of the service.',
}, },
{ {
displayName: 'External accout ID', displayName: 'External accout ID',
name: 'externalid', name: 'externalid',
type: 'string', type: 'string',
default: '', default: '',
description: 'The id of the account in the external service.', description: 'The id of the account in the external service.',
}, },
{ {
displayName: 'Account Name', displayName: 'Account Name',
name: 'name', name: 'name',
type: 'string', type: 'string',
default: '', default: '',
description: 'The name associated with the account in the external service. Often this will be a company name (e.g., "My Toystore, Inc.").', description: 'The name associated with the account in the external service. Often this will be a company name (e.g., "My Toystore, Inc.").',
}, },
{ {
displayName: 'Logo URL', displayName: 'Logo URL',
name: 'logoUrl', name: 'logoUrl',
type: 'string', type: 'string',
default: '', default: '',
description: 'The URL to a logo image for the external service.', description: 'The URL to a logo image for the external service.',
}, },
{ {
displayName: 'Link URL', displayName: 'Link URL',
name: 'linkUrl', name: 'linkUrl',
type: 'string', type: 'string',
default: '', default: '',
description: 'The URL to a page where the integration with the external service can be managed in the third-party\'s website.', description: 'The URL to a page where the integration with the external service can be managed in the third-party\'s website.',
}, },
{ {
displayName: 'Status', displayName: 'Status',
name: 'status', name: 'status',
type: 'number', type: 'number',
default: 1, default: 1,
description: 'The status of the connection (0 = error; 1 = connected)', description: 'The status of the connection (0 = error; 1 = connected)',
}, },
{ {
displayName: 'Syncronisation Status', displayName: 'Syncronisation Status',
name: 'syncStatus', name: 'syncStatus',
type: 'number', type: 'number',
default: 1, default: 1,
description: 'The status of a sync triggered on the connection (0 = sync stopped; 1 = sync running).', description: 'The status of a sync triggered on the connection (0 = sync stopped; 1 = sync running).',
}, },
] ]
}, },
// ---------------------------------- // ----------------------------------
// connection:delete // connection:delete
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Connection ID', displayName: 'Connection ID',
name: 'connectionId', name: 'connectionId',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'delete', 'delete',
], ],
resource: [ resource: [
'connection', 'connection',
], ],
}, },
}, },
default: 0, default: 0,
required: true, required: true,
description: 'ID of the connection to delete.', description: 'ID of the connection to delete.',
}, },
// ---------------------------------- // ----------------------------------
// connection:get // connection:get
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Connection ID', displayName: 'Connection ID',
name: 'connectionId', name: 'connectionId',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'get', 'get',
], ],
resource: [ resource: [
'connection', 'connection',
], ],
}, },
}, },
default: 0, default: 0,
required: true, required: true,
description: 'ID of the connection to get.', description: 'ID of the connection to get.',
}, },
// ---------------------------------- // ----------------------------------
// connection:getAll // connection:getAll
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Return All', displayName: 'Return All',
name: 'returnAll', name: 'returnAll',
type: 'boolean', type: 'boolean',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'getAll', 'getAll',
], ],
resource: [ resource: [
'connection', 'connection',
], ],
}, },
}, },
default: false, default: false,
description: 'If all results should be returned or only up to a given limit.', description: 'If all results should be returned or only up to a given limit.',
}, },
{ {
displayName: 'Limit', displayName: 'Limit',
name: 'limit', name: 'limit',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'getAll', 'getAll',
], ],
resource: [ resource: [
'connection', 'connection',
], ],
returnAll: [ returnAll: [
false, false,
], ],
}, },
}, },
typeOptions: { typeOptions: {
minValue: 1, minValue: 1,
maxValue: 500, maxValue: 500,
}, },
default: 100, default: 100,
description: 'How many results to return.', description: 'How many results to return.',
}, },
] as INodeProperties[]; ] as INodeProperties[];

View file

@ -1,351 +1,351 @@
import { INodeProperties } from "n8n-workflow"; import { INodeProperties } from "n8n-workflow";
export const contactOperations = [ export const contactOperations = [
{ {
displayName: 'Operation', displayName: 'Operation',
name: 'operation', name: 'operation',
type: 'options', type: 'options',
displayOptions: { displayOptions: {
show: { show: {
resource: [ resource: [
'contact', 'contact',
], ],
}, },
}, },
options: [ options: [
{ {
name: 'Create', name: 'Create',
value: 'create', value: 'create',
description: 'Create a contact', description: 'Create a contact',
}, },
{ {
name: 'Delete', name: 'Delete',
value: 'delete', value: 'delete',
description: 'Delete a contact', description: 'Delete a contact',
}, },
{ {
name: 'Get', name: 'Get',
value: 'get', value: 'get',
description: 'Get data of a contact', description: 'Get data of a contact',
}, },
{ {
name: 'Get All', name: 'Get All',
value: 'getAll', value: 'getAll',
description: 'Get data of all contact', description: 'Get data of all contact',
}, },
{ {
name: 'Update', name: 'Update',
value: 'update', value: 'update',
description: 'Update a contact', description: 'Update a contact',
}, },
], ],
default: 'create', default: 'create',
description: 'The operation to perform.', description: 'The operation to perform.',
}, },
] as INodeProperties[]; ] as INodeProperties[];
export const contactFields = [ export const contactFields = [
// ---------------------------------- // ----------------------------------
// contact:create // contact:create
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Email', displayName: 'Email',
name: 'email', name: 'email',
type: 'string', type: 'string',
default: '', default: '',
required: true, required: true,
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'create', 'create',
], ],
resource: [ resource: [
'contact', 'contact',
], ],
}, },
}, },
description: 'The email of the contact to create.', description: 'The email of the contact to create.',
}, },
{ {
displayName: 'Update if exists', displayName: 'Update if exists',
name: 'updateIfExists', name: 'updateIfExists',
type: 'boolean', type: 'boolean',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'create', 'create',
], ],
resource: [ resource: [
'contact', 'contact',
], ],
}, },
}, },
default: false, default: false,
description: 'Update user if it exists already. If not set and user exists it will error instead.', description: 'Update user if it exists already. If not set and user exists it will error instead.',
}, },
{ {
displayName: 'Additional Fields', displayName: 'Additional Fields',
name: 'additionalFields', name: 'additionalFields',
type: 'collection', type: 'collection',
placeholder: 'Add Field', placeholder: 'Add Field',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'create', 'create',
], ],
resource: [ resource: [
'contact', 'contact',
], ],
}, },
}, },
default: {}, default: {},
options: [ options: [
{ {
displayName: 'First Name', displayName: 'First Name',
name: 'firstName', name: 'firstName',
type: 'string', type: 'string',
default: '', default: '',
description: 'The first name of the contact to create.', description: 'The first name of the contact to create.',
}, },
{ {
displayName: 'Last Name', displayName: 'Last Name',
name: 'lastName', name: 'lastName',
type: 'string', type: 'string',
default: '', default: '',
description: 'The last name of the contact to create.', description: 'The last name of the contact to create.',
}, },
{ {
displayName: 'Phone', displayName: 'Phone',
name: 'phone', name: 'phone',
type: 'string', type: 'string',
default: '', default: '',
description: 'Phone number of the contact.', description: 'Phone number of the contact.',
}, },
{ {
displayName: 'Custom Properties', displayName: 'Custom Properties',
name: 'customProperties', name: 'customProperties',
placeholder: 'Add Custom Property', placeholder: 'Add Custom Property',
description: 'Adds a custom property to set also values which have not been predefined.', description: 'Adds a custom property to set also values which have not been predefined.',
type: 'fixedCollection', type: 'fixedCollection',
typeOptions: { typeOptions: {
multipleValues: true, multipleValues: true,
}, },
default: {}, default: {},
options: [ options: [
{ {
name: 'property', name: 'property',
displayName: 'Property', displayName: 'Property',
values: [ values: [
{ {
displayName: 'Property Name', displayName: 'Property Name',
name: 'name', name: 'name',
type: 'string', type: 'string',
default: '', default: '',
description: 'Name of the property to set.', description: 'Name of the property to set.',
}, },
{ {
displayName: 'Property Value', displayName: 'Property Value',
name: 'value', name: 'value',
type: 'string', type: 'string',
default: '', default: '',
description: 'Value of the property to set.', description: 'Value of the property to set.',
}, },
] ]
}, },
], ],
}, },
], ],
}, },
// ---------------------------------- // ----------------------------------
// contact:update // contact:update
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Contact ID', displayName: 'Contact ID',
name: 'contactId', name: 'contactId',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'update', 'update',
], ],
resource: [ resource: [
'contact', 'contact',
], ],
}, },
}, },
default: 0, default: 0,
required: true, required: true,
description: 'ID of the contact to update.', description: 'ID of the contact to update.',
}, },
{ {
displayName: 'Update Fields', displayName: 'Update Fields',
name: 'updateFields', name: 'updateFields',
type: 'collection', type: 'collection',
description: 'The fields to update.', description: 'The fields to update.',
placeholder: 'Add Field', placeholder: 'Add Field',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'update', 'update',
], ],
resource: [ resource: [
'contact', 'contact',
], ],
}, },
}, },
default: {}, default: {},
options: [ options: [
{ {
displayName: 'Email', displayName: 'Email',
name: 'email', name: 'email',
type: 'string', type: 'string',
default: '', default: '',
description: 'Email of the contact.', description: 'Email of the contact.',
}, },
{ {
displayName: 'First Name', displayName: 'First Name',
name: 'firstName', name: 'firstName',
type: 'string', type: 'string',
default: '', default: '',
description: 'First name of the contact.', description: 'First name of the contact.',
}, },
{ {
displayName: 'Last Name', displayName: 'Last Name',
name: 'lastName', name: 'lastName',
type: 'string', type: 'string',
default: '', default: '',
description: 'Last name of the contact.', description: 'Last name of the contact.',
}, },
{ {
displayName: 'Phone', displayName: 'Phone',
name: 'phone', name: 'phone',
type: 'string', type: 'string',
default: '', default: '',
description: 'Phone number of the contact.', description: 'Phone number of the contact.',
}, },
{ {
displayName: 'Custom Properties', displayName: 'Custom Properties',
name: 'customProperties', name: 'customProperties',
placeholder: 'Add Custom Property', placeholder: 'Add Custom Property',
description: 'Adds a custom property to set also values which have not been predefined.', description: 'Adds a custom property to set also values which have not been predefined.',
type: 'fixedCollection', type: 'fixedCollection',
typeOptions: { typeOptions: {
multipleValues: true, multipleValues: true,
}, },
default: {}, default: {},
options: [ options: [
{ {
name: 'property', name: 'property',
displayName: 'Property', displayName: 'Property',
values: [ values: [
{ {
displayName: 'Property Name', displayName: 'Property Name',
name: 'name', name: 'name',
type: 'string', type: 'string',
default: '', default: '',
description: 'Name of the property to set.', description: 'Name of the property to set.',
}, },
{ {
displayName: 'Property Value', displayName: 'Property Value',
name: 'value', name: 'value',
type: 'string', type: 'string',
default: '', default: '',
description: 'Value of the property to set.', description: 'Value of the property to set.',
}, },
] ]
}, },
], ],
}, },
], ],
}, },
// ---------------------------------- // ----------------------------------
// contact:delete // contact:delete
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Contact ID', displayName: 'Contact ID',
name: 'contactId', name: 'contactId',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'delete', 'delete',
], ],
resource: [ resource: [
'contact', 'contact',
], ],
}, },
}, },
default: 0, default: 0,
required: true, required: true,
description: 'ID of the contact to delete.', description: 'ID of the contact to delete.',
}, },
// ---------------------------------- // ----------------------------------
// contact:get // contact:get
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Contact ID', displayName: 'Contact ID',
name: 'contactId', name: 'contactId',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'get', 'get',
], ],
resource: [ resource: [
'contact', 'contact',
], ],
}, },
}, },
default: 0, default: 0,
required: true, required: true,
description: 'ID of the contact to get.', description: 'ID of the contact to get.',
}, },
// ---------------------------------- // ----------------------------------
// contact:getAll // contact:getAll
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Return All', displayName: 'Return All',
name: 'returnAll', name: 'returnAll',
type: 'boolean', type: 'boolean',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'getAll', 'getAll',
], ],
resource: [ resource: [
'contact', 'contact',
], ],
}, },
}, },
default: false, default: false,
description: 'If all results should be returned or only up to a given limit.', description: 'If all results should be returned or only up to a given limit.',
}, },
{ {
displayName: 'Limit', displayName: 'Limit',
name: 'limit', name: 'limit',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'getAll', 'getAll',
], ],
resource: [ resource: [
'contact', 'contact',
], ],
returnAll: [ returnAll: [
false, false,
], ],
}, },
}, },
typeOptions: { typeOptions: {
minValue: 1, minValue: 1,
maxValue: 500, maxValue: 500,
}, },
default: 100, default: 100,
description: 'How many results to return.', description: 'How many results to return.',
}, },
] as INodeProperties[]; ] as INodeProperties[];

File diff suppressed because it is too large Load diff

View file

@ -1,290 +1,290 @@
import { INodeProperties } from "n8n-workflow"; import { INodeProperties } from "n8n-workflow";
export const ecomCustomerOperations = [ export const ecomCustomerOperations = [
{ {
displayName: 'Operation', displayName: 'Operation',
name: 'operation', name: 'operation',
type: 'options', type: 'options',
displayOptions: { displayOptions: {
show: { show: {
resource: [ resource: [
'ecommerceCustomer', 'ecommerceCustomer',
], ],
}, },
}, },
options: [ options: [
{ {
name: 'Create', name: 'Create',
value: 'create', value: 'create',
description: 'Create a E-commerce Customer', description: 'Create a E-commerce Customer',
}, },
{ {
name: 'Delete', name: 'Delete',
value: 'delete', value: 'delete',
description: 'Delete a E-commerce Customer', description: 'Delete a E-commerce Customer',
}, },
{ {
name: 'Get', name: 'Get',
value: 'get', value: 'get',
description: 'Get data of a E-commerce Customer', description: 'Get data of a E-commerce Customer',
}, },
{ {
name: 'Get All', name: 'Get All',
value: 'getAll', value: 'getAll',
description: 'Get data of all E-commerce Customer', description: 'Get data of all E-commerce Customer',
}, },
{ {
name: 'Update', name: 'Update',
value: 'update', value: 'update',
description: 'Update a E-commerce Customer', description: 'Update a E-commerce Customer',
}, },
], ],
default: 'create', default: 'create',
description: 'The operation to perform.', description: 'The operation to perform.',
}, },
] as INodeProperties[]; ] as INodeProperties[];
export const ecomCustomerFields = [ export const ecomCustomerFields = [
// ---------------------------------- // ----------------------------------
// ecommerceCustomer:create // ecommerceCustomer:create
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Service ID', displayName: 'Service ID',
name: 'connectionid', name: 'connectionid',
type: 'string', type: 'string',
default: '', default: '',
required: true, required: true,
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'create', 'create',
], ],
resource: [ resource: [
'ecommerceCustomer', 'ecommerceCustomer',
], ],
}, },
}, },
description: 'The id of the connection object for the service where the customer originates.', description: 'The id of the connection object for the service where the customer originates.',
}, },
{ {
displayName: 'Customer ID', displayName: 'Customer ID',
name: 'externalid', name: 'externalid',
type: 'string', type: 'string',
default: '', default: '',
required: true, required: true,
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'create', 'create',
], ],
resource: [ resource: [
'ecommerceCustomer', 'ecommerceCustomer',
], ],
}, },
}, },
description: 'The id of the customer in the external service.', description: 'The id of the customer in the external service.',
}, },
{ {
displayName: 'Customer Email', displayName: 'Customer Email',
name: 'email', name: 'email',
type: 'string', type: 'string',
default: '', default: '',
required: true, required: true,
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'create', 'create',
], ],
resource: [ resource: [
'ecommerceCustomer', 'ecommerceCustomer',
], ],
}, },
}, },
description: 'The email address of the customer.', description: 'The email address of the customer.',
}, },
{ {
displayName: 'Additional Fields', displayName: 'Additional Fields',
name: 'additionalFields', name: 'additionalFields',
type: 'collection', type: 'collection',
placeholder: 'Add Field', placeholder: 'Add Field',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'create', 'create',
], ],
resource: [ resource: [
'ecommerceCustomer', 'ecommerceCustomer',
], ],
}, },
}, },
default: {}, default: {},
options: [ options: [
{ {
displayName: 'Accepts Marketing', displayName: 'Accepts Marketing',
name: 'acceptsMarketing', name: 'acceptsMarketing',
type: 'boolean', type: 'boolean',
default: false, default: false,
description: 'Indication of whether customer has opt-ed in to marketing communications.', description: 'Indication of whether customer has opt-ed in to marketing communications.',
}, },
], ],
}, },
// ---------------------------------- // ----------------------------------
// ecommerceCustomer:update // ecommerceCustomer:update
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Customer ID', displayName: 'Customer ID',
name: 'ecommerceCustomerId', name: 'ecommerceCustomerId',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'update', 'update',
], ],
resource: [ resource: [
'ecommerceCustomer', 'ecommerceCustomer',
], ],
}, },
}, },
default: 0, default: 0,
required: true, required: true,
description: 'ID of the E-commerce customer to update.', description: 'ID of the E-commerce customer to update.',
}, },
{ {
displayName: 'Update Fields', displayName: 'Update Fields',
name: 'updateFields', name: 'updateFields',
type: 'collection', type: 'collection',
description: 'The fields to update.', description: 'The fields to update.',
placeholder: 'Add Field', placeholder: 'Add Field',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'update', 'update',
], ],
resource: [ resource: [
'ecommerceCustomer', 'ecommerceCustomer',
], ],
}, },
}, },
default: {}, default: {},
options: [ options: [
{ {
displayName: 'Service ID', displayName: 'Service ID',
name: 'connectionid', name: 'connectionid',
type: 'string', type: 'string',
default: '', default: '',
description: 'The id of the connection object for the service where the customer originates.', description: 'The id of the connection object for the service where the customer originates.',
}, },
{ {
displayName: 'Customer ID', displayName: 'Customer ID',
name: 'externalid', name: 'externalid',
type: 'string', type: 'string',
default: '', default: '',
description: 'The id of the customer in the external service.', description: 'The id of the customer in the external service.',
}, },
{ {
displayName: 'Customer Email', displayName: 'Customer Email',
name: 'email', name: 'email',
type: 'string', type: 'string',
default: '', default: '',
description: 'The email address of the customer.', description: 'The email address of the customer.',
}, },
{ {
displayName: 'Accepts Marketing', displayName: 'Accepts Marketing',
name: 'acceptsMarketing', name: 'acceptsMarketing',
type: 'boolean', type: 'boolean',
default: false, default: false,
description: 'Indication of whether customer has opt-ed in to marketing communications.', description: 'Indication of whether customer has opt-ed in to marketing communications.',
}, },
], ],
}, },
// ---------------------------------- // ----------------------------------
// ecommerceCustomer:delete // ecommerceCustomer:delete
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Customer ID', displayName: 'Customer ID',
name: 'ecommerceCustomerId', name: 'ecommerceCustomerId',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'delete', 'delete',
], ],
resource: [ resource: [
'ecommerceCustomer', 'ecommerceCustomer',
], ],
}, },
}, },
default: 0, default: 0,
required: true, required: true,
description: 'ID of the E-commerce customer to delete.', description: 'ID of the E-commerce customer to delete.',
}, },
// ---------------------------------- // ----------------------------------
// ecommerceCustomer:get // ecommerceCustomer:get
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Customer ID', displayName: 'Customer ID',
name: 'ecommerceCustomerId', name: 'ecommerceCustomerId',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'get', 'get',
], ],
resource: [ resource: [
'ecommerceCustomer', 'ecommerceCustomer',
], ],
}, },
}, },
default: 0, default: 0,
required: true, required: true,
description: 'ID of the E-commerce customer to get.', description: 'ID of the E-commerce customer to get.',
}, },
// ---------------------------------- // ----------------------------------
// ecommerceCustomer:getAll // ecommerceCustomer:getAll
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Return All', displayName: 'Return All',
name: 'returnAll', name: 'returnAll',
type: 'boolean', type: 'boolean',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'getAll', 'getAll',
], ],
resource: [ resource: [
'ecommerceCustomer', 'ecommerceCustomer',
], ],
}, },
}, },
default: false, default: false,
description: 'If all results should be returned or only up to a given limit.', description: 'If all results should be returned or only up to a given limit.',
}, },
{ {
displayName: 'Limit', displayName: 'Limit',
name: 'limit', name: 'limit',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'getAll', 'getAll',
], ],
resource: [ resource: [
'ecommerceCustomer', 'ecommerceCustomer',
], ],
returnAll: [ returnAll: [
false, false,
], ],
}, },
}, },
typeOptions: { typeOptions: {
minValue: 1, minValue: 1,
maxValue: 500, maxValue: 500,
}, },
default: 100, default: 100,
description: 'How many results to return.', description: 'How many results to return.',
}, },
] as INodeProperties[]; ] as INodeProperties[];

View file

@ -1,124 +1,124 @@
import { INodeProperties } from "n8n-workflow"; import { INodeProperties } from "n8n-workflow";
export const ecomOrderProductsOperations = [ export const ecomOrderProductsOperations = [
{ {
displayName: 'Operation', displayName: 'Operation',
name: 'operation', name: 'operation',
type: 'options', type: 'options',
displayOptions: { displayOptions: {
show: { show: {
resource: [ resource: [
'ecommerceOrderProducts', 'ecommerceOrderProducts',
], ],
}, },
}, },
options: [ options: [
{ {
name: 'Get All', name: 'Get All',
value: 'getAll', value: 'getAll',
description: 'Get data of all order products', description: 'Get data of all order products',
}, },
{ {
name: 'Get by Product ID', name: 'Get by Product ID',
value: 'getByProductId', value: 'getByProductId',
description: 'Get data of a ordered product', description: 'Get data of a ordered product',
}, },
{ {
name: 'Get by Order ID', name: 'Get by Order ID',
value: 'getByOrderId', value: 'getByOrderId',
description: 'Get data of an order\'s products', description: 'Get data of an order\'s products',
}, },
], ],
default: 'getAll', default: 'getAll',
description: 'The operation to perform.', description: 'The operation to perform.',
}, },
] as INodeProperties[]; ] as INodeProperties[];
export const ecomOrderProductsFields = [ export const ecomOrderProductsFields = [
// ---------------------------------- // ----------------------------------
// ecommerceOrderProducts:getByOrderId // ecommerceOrderProducts:getByOrderId
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Order ID', displayName: 'Order ID',
name: 'orderId', name: 'orderId',
type: 'number', type: 'number',
default: 0, default: 0,
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'getByOrderId', 'getByOrderId',
], ],
resource: [ resource: [
'ecommerceOrderProducts', 'ecommerceOrderProducts',
], ],
}, },
}, },
description: 'The ID of the order whose products you\'d like returned.', description: 'The ID of the order whose products you\'d like returned.',
}, },
// ---------------------------------- // ----------------------------------
// ecommerceOrderProducts:getByProductId // ecommerceOrderProducts:getByProductId
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Product ID', displayName: 'Product ID',
name: 'procuctId', name: 'procuctId',
type: 'number', type: 'number',
default: 0, default: 0,
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'getByProductId', 'getByProductId',
], ],
resource: [ resource: [
'ecommerceOrderProducts', 'ecommerceOrderProducts',
], ],
}, },
}, },
description: 'The ID of the product you\'d like returned.', description: 'The ID of the product you\'d like returned.',
}, },
// ---------------------------------- // ----------------------------------
// ecommerceOrderProducts:getAll // ecommerceOrderProducts:getAll
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Return All', displayName: 'Return All',
name: 'returnAll', name: 'returnAll',
type: 'boolean', type: 'boolean',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'getAll', 'getAll',
], ],
resource: [ resource: [
'ecommerceOrderProducts', 'ecommerceOrderProducts',
], ],
}, },
}, },
default: false, default: false,
description: 'If all results should be returned or only up to a given limit.', description: 'If all results should be returned or only up to a given limit.',
}, },
{ {
displayName: 'Limit', displayName: 'Limit',
name: 'limit', name: 'limit',
type: 'number', type: 'number',
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'getAll', 'getAll',
], ],
resource: [ resource: [
'ecommerceOrderProducts', 'ecommerceOrderProducts',
], ],
returnAll: [ returnAll: [
false, false,
], ],
}, },
}, },
typeOptions: { typeOptions: {
minValue: 1, minValue: 1,
maxValue: 500, maxValue: 500,
}, },
default: 100, default: 100,
description: 'How many results to return.', description: 'How many results to return.',
}, },
] as INodeProperties[]; ] as INodeProperties[];