n8n/packages/nodes-base/nodes/Vero/EventDescripion.ts

243 lines
4.2 KiB
TypeScript
Raw Normal View History

2019-12-17 12:33:28 -08:00
import { INodeProperties } from 'n8n-workflow';
export const eventOperations: INodeProperties[] = [
2019-12-17 12:33:28 -08:00
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'event',
],
},
},
options: [
{
name: 'Track',
value: 'track',
description: `Track an event for a specific customer`,
2019-12-17 12:33:28 -08:00
},
],
default: 'track',
description: 'The operation to perform.',
},
];
2019-12-17 12:33:28 -08:00
export const eventFields: INodeProperties[] = [
2019-12-17 12:33:28 -08:00
/* -------------------------------------------------------------------------- */
/* event:track */
/* -------------------------------------------------------------------------- */
{
displayName: 'ID',
name: 'id',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'event',
],
operation: [
'track',
2020-10-22 06:46:03 -07:00
],
2019-12-17 12:33:28 -08:00
},
},
description: 'The unique identifier of the customer',
},
{
displayName: 'Email',
name: 'email',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'event',
],
operation: [
'track',
2020-10-22 06:46:03 -07:00
],
2019-12-17 12:33:28 -08:00
},
},
},
{
displayName: 'Event Name',
name: 'eventName',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'event',
],
operation: [
'track',
2020-10-22 06:46:03 -07:00
],
2019-12-17 12:33:28 -08:00
},
},
description: 'The name of the event tracked.',
},
{
displayName: 'JSON Parameters',
name: 'jsonParameters',
type: 'boolean',
default: false,
displayOptions: {
show: {
resource: [
'event',
],
operation: [
'track',
2020-10-22 06:46:03 -07:00
],
2019-12-17 12:33:28 -08:00
},
2020-10-22 06:46:03 -07:00
},
2019-12-17 12:33:28 -08:00
},
{
displayName: 'Data',
name: 'dataAttributesUi',
placeholder: 'Add Data',
description: 'key value pairs that represent any properties you want to track with this event',
type: 'fixedCollection',
typeOptions: {
multipleValues: true,
},
default: {},
displayOptions: {
show: {
resource: [
'event',
],
operation: [
'track',
],
jsonParameters: [
2019-12-19 20:33:37 -08:00
false,
2019-12-17 12:33:28 -08:00
],
},
},
options: [
{
name: 'dataAttributesValues',
displayName: 'Data',
values: [
{
displayName: 'Key',
name: 'key',
type: 'string',
default: '',
description: 'Name of the property to set.',
},
{
displayName: 'Value',
name: 'value',
type: 'string',
default: '',
description: 'Value of the property to set.',
},
2020-10-22 06:46:03 -07:00
],
2019-12-17 12:33:28 -08:00
},
],
},
{
displayName: 'Extra',
name: 'extraAttributesUi',
placeholder: 'Add Extra',
description: 'Key value pairs that represent reserved, Vero-specific operators. Refer to the note on “deduplication” below.',
type: 'fixedCollection',
typeOptions: {
multipleValues: true,
},
default: {},
displayOptions: {
show: {
resource: [
'event',
],
operation: [
'track',
],
jsonParameters: [
2019-12-19 20:33:37 -08:00
false,
2019-12-17 12:33:28 -08:00
],
},
},
options: [
{
name: 'extraAttributesValues',
displayName: 'Extra',
values: [
{
displayName: 'Key',
name: 'key',
type: 'string',
default: '',
description: 'Name of the property to set.',
},
{
displayName: 'Value',
name: 'value',
type: 'string',
default: '',
description: 'Value of the property to set.',
},
2020-10-22 06:46:03 -07:00
],
2019-12-17 12:33:28 -08:00
},
],
},
{
displayName: 'Data',
name: 'dataAttributesJson',
type: 'json',
default: '',
required: false,
typeOptions: {
alwaysOpenEditWindow: true,
},
description: 'key value pairs that represent the custom user properties you want to update',
displayOptions: {
show: {
resource: [
'event',
],
operation: [
'track',
],
jsonParameters: [
true,
],
},
},
},
{
displayName: 'Extra',
name: 'extraAttributesJson',
type: 'json',
default: '',
required: false,
typeOptions: {
alwaysOpenEditWindow: true,
},
description: 'Key value pairs that represent reserved, Vero-specific operators. Refer to the note on “deduplication” below.',
displayOptions: {
show: {
resource: [
'event',
],
operation: [
'track',
],
jsonParameters: [
true,
],
},
},
},
];