mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
✨ 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:
71
packages/nodes-base/nodes/CustomerIo/SegmentDescription.ts
Normal file
71
packages/nodes-base/nodes/CustomerIo/SegmentDescription.ts
Normal 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[];
|
||||
Reference in New Issue
Block a user