mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Some improvements to Customer.io Node
This commit is contained in:
@@ -14,53 +14,31 @@ export const customerOperations = [
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Create a customer.',
|
||||
name: 'Create/Update',
|
||||
value: 'upsert',
|
||||
description: 'Create/Update a customer.',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
description: 'Delete a customer.',
|
||||
},
|
||||
{
|
||||
name: 'Update',
|
||||
value: 'update',
|
||||
description: 'Update a customer.',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
default: 'upsert',
|
||||
description: 'The operation to perform.',
|
||||
},
|
||||
] as INodeProperties[];
|
||||
|
||||
export const customerFields = [
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* customer:create/delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* customer:delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
type: 'number',
|
||||
required: true,
|
||||
default: 0,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'customer',
|
||||
],
|
||||
operation: [
|
||||
'create', 'delete'
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'The unique identifier for the customer.',
|
||||
},
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
@@ -68,144 +46,29 @@ export const customerFields = [
|
||||
'customer',
|
||||
],
|
||||
operation: [
|
||||
'create'
|
||||
'delete',
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'The email address of the user.',
|
||||
},
|
||||
{
|
||||
displayName: 'Created at',
|
||||
name: 'createdAt',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'customer',
|
||||
],
|
||||
operation: [
|
||||
'create'
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'The UNIX timestamp from when the user was created.',
|
||||
},
|
||||
{
|
||||
displayName: 'JSON Parameters',
|
||||
name: 'jsonParameters',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'customer',
|
||||
],
|
||||
operation: [
|
||||
'create'
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: ' Additional Fields',
|
||||
name: 'additionalFieldsJson',
|
||||
type: 'json',
|
||||
typeOptions: {
|
||||
alwaysOpenEditWindow: true,
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'customer',
|
||||
],
|
||||
operation: [
|
||||
'create'
|
||||
],
|
||||
jsonParameters: [
|
||||
true,
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'Object of values to set as described <a href="https://github.com/agilecrm/rest-api#1-companys---companies-api" target="_blank">here</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'customer',
|
||||
],
|
||||
operation: [
|
||||
'create'
|
||||
],
|
||||
jsonParameters: [
|
||||
false,
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Custom Properties',
|
||||
name: 'customProperties',
|
||||
type: 'fixedCollection',
|
||||
description: 'Custom Properties',
|
||||
typeOptions: {
|
||||
multipleValues: true,
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Property',
|
||||
name: 'customProperty',
|
||||
values: [
|
||||
{
|
||||
displayName: 'Key',
|
||||
name: 'key',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
description: 'Property name.',
|
||||
placeholder: 'Plan'
|
||||
},
|
||||
|
||||
{
|
||||
displayName: 'Value',
|
||||
name: 'value',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
description: 'Property value.',
|
||||
placeholder: 'Basic'
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
description: 'The unique identifier for the customer.',
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* customer:update */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* customer:upsert */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
type: 'number',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: 0,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'customer',
|
||||
],
|
||||
operation: [
|
||||
'update'
|
||||
'upsert',
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -223,7 +86,7 @@ export const customerFields = [
|
||||
'customer',
|
||||
],
|
||||
operation: [
|
||||
'update'
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -242,7 +105,7 @@ export const customerFields = [
|
||||
'customer',
|
||||
],
|
||||
operation: [
|
||||
'update'
|
||||
'upsert',
|
||||
],
|
||||
jsonParameters: [
|
||||
true,
|
||||
@@ -263,7 +126,7 @@ export const customerFields = [
|
||||
'customer',
|
||||
],
|
||||
operation: [
|
||||
'update'
|
||||
'upsert',
|
||||
],
|
||||
jsonParameters: [
|
||||
false,
|
||||
@@ -290,18 +153,18 @@ export const customerFields = [
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
description: 'Property name.',
|
||||
placeholder: 'Plan'
|
||||
description: 'Property name.',
|
||||
placeholder: 'Plan',
|
||||
},
|
||||
|
||||
{
|
||||
displayName: 'Value',
|
||||
name: 'value',
|
||||
type: 'string',
|
||||
required: true,
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
description: 'Property value.',
|
||||
placeholder: 'Basic'
|
||||
description: 'Property value.',
|
||||
placeholder: 'Basic',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user