2021-12-02 12:23:05 +02:00
|
|
|
import {
|
|
|
|
|
INodeProperties,
|
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
2022-04-27 18:10:59 +03:00
|
|
|
export const contactOperations: INodeProperties[] = [
|
2021-12-02 12:23:05 +02:00
|
|
|
{
|
|
|
|
|
displayName: 'Operation',
|
|
|
|
|
name: 'operation',
|
|
|
|
|
type: 'options',
|
|
|
|
|
displayOptions: {
|
|
|
|
|
show: {
|
|
|
|
|
resource: [
|
|
|
|
|
'contact',
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
options: [
|
|
|
|
|
{
|
|
|
|
|
name: 'Create',
|
|
|
|
|
value: 'create',
|
|
|
|
|
description: 'Create a contact',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
default: 'create',
|
2022-02-01 13:37:22 +02:00
|
|
|
description: 'The operation to perform',
|
2021-12-02 12:23:05 +02:00
|
|
|
},
|
2022-04-27 18:10:59 +03:00
|
|
|
];
|
2021-12-02 12:23:05 +02:00
|
|
|
|
2022-04-27 18:10:59 +03:00
|
|
|
export const contactFields: INodeProperties[] = [
|
2021-12-02 12:23:05 +02:00
|
|
|
/*-------------------------------------------------------------------------- */
|
|
|
|
|
/* contact:create */
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
{
|
|
|
|
|
displayName: 'Email',
|
|
|
|
|
name: 'email',
|
|
|
|
|
type: 'string',
|
|
|
|
|
required: true,
|
|
|
|
|
displayOptions: {
|
|
|
|
|
show: {
|
|
|
|
|
operation: [
|
|
|
|
|
'create',
|
|
|
|
|
],
|
|
|
|
|
resource: [
|
|
|
|
|
'contact',
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
default:'',
|
|
|
|
|
description:'Primary email for the contact',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
|
name: 'additionalFields',
|
|
|
|
|
type: 'collection',
|
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
|
default: {},
|
|
|
|
|
displayOptions: {
|
|
|
|
|
show: {
|
|
|
|
|
resource: [
|
|
|
|
|
'contact',
|
|
|
|
|
],
|
|
|
|
|
operation: [
|
|
|
|
|
'create',
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
options: [
|
|
|
|
|
{
|
|
|
|
|
displayName: 'First Name',
|
|
|
|
|
name: 'firstName',
|
|
|
|
|
type: 'string',
|
|
|
|
|
default: '',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
displayName: 'Last Name',
|
|
|
|
|
name: 'lastName',
|
|
|
|
|
type: 'string',
|
|
|
|
|
default: '',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
2022-04-27 18:10:59 +03:00
|
|
|
];
|