2020-10-23 00:31:32 -07:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
2021-07-08 01:12:19 -07:00
|
|
|
export const companyContactOperations = [
|
2020-10-23 00:31:32 -07:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
2021-07-08 01:12:19 -07:00
|
|
|
'companyContact',
|
2020-10-23 00:31:32 -07:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Add',
|
|
|
|
value: 'add',
|
|
|
|
description: 'Add contact to a company',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Remove',
|
|
|
|
value: 'remove',
|
|
|
|
description: 'Remove a contact from a company',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'create',
|
|
|
|
description: 'The operation to perform.',
|
|
|
|
},
|
|
|
|
] as INodeProperties[];
|
|
|
|
|
2021-07-08 01:12:19 -07:00
|
|
|
export const companyContactFields = [
|
2020-10-23 00:31:32 -07:00
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2021-07-08 01:12:19 -07:00
|
|
|
/* companyContact:add */
|
2020-10-23 00:31:32 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'Contact ID',
|
|
|
|
name: 'contactId',
|
|
|
|
type: 'string',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
2021-07-08 01:12:19 -07:00
|
|
|
'companyContact',
|
2020-10-23 00:31:32 -07:00
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'add',
|
|
|
|
'remove',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
description: 'The ID of the contact.',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Company ID',
|
|
|
|
name: 'companyId',
|
|
|
|
type: 'string',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
2021-07-08 01:12:19 -07:00
|
|
|
'companyContact',
|
2020-10-23 00:31:32 -07:00
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'add',
|
|
|
|
'remove',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
description: 'The ID of the company.',
|
|
|
|
},
|
|
|
|
] as INodeProperties[];
|