Add Customer.io-Node (#833)

* 🚧 Descriptions, node function, generic function changes

*  Finished functionality, added icon

*  Added new campaign operations, acommodated for 2 different authentications

*  Fixed number defaults not being numbers but empty strings
This commit is contained in:
Rupenieks
2020-09-02 12:25:11 +02:00
committed by GitHub
parent 0e1a4e5309
commit e5a5e1ed11
10 changed files with 1301 additions and 12 deletions

View File

@@ -0,0 +1,71 @@
import { INodeProperties } from 'n8n-workflow';
export const segmentOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'segment',
],
},
},
options: [
{
name: 'Add Customer',
value: 'add',
},
{
name: 'Remove Customer',
value: 'remove',
},
],
default: 'add',
description: 'The operation to perform.',
},
] as INodeProperties[];
export const segmentFields = [
/* -------------------------------------------------------------------------- */
/* segment:add */
/* -------------------------------------------------------------------------- */
{
displayName: 'ID',
name: 'id',
type: 'number',
required: true,
default: 0,
displayOptions: {
show: {
resource: [
'segment',
],
operation: [
'add', 'remove'
]
},
},
description: 'The unique identifier of the segment.',
},
{
displayName: 'IDs',
name: 'ids',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'segment',
],
operation: [
'add', 'remove'
]
},
},
description: 'A list of customer ids to add to the segment.',
},
] as INodeProperties[];