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

View file

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

File diff suppressed because it is too large Load diff

View file

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

View file

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