2023-01-27 03:22:44 -08:00
|
|
|
import type { INodeProperties } from 'n8n-workflow';
|
2020-09-18 00:42:01 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const accountContactOperations: INodeProperties[] = [
|
2020-09-18 00:42:01 -07:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2020-09-18 00:42:01 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['accountContact'],
|
2020-09-18 00:42:01 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create an association',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Create an account contact',
|
2020-09-18 00:42:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Delete',
|
|
|
|
value: 'delete',
|
|
|
|
description: 'Delete an association',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Delete an account contact',
|
2020-09-18 00:42:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Update',
|
|
|
|
value: 'update',
|
|
|
|
description: 'Update an association',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Update an account contact',
|
2020-09-18 00:42:01 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'create',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2020-09-18 00:42:01 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const accountContactFields: INodeProperties[] = [
|
2020-09-18 00:42:01 -07:00
|
|
|
// ----------------------------------
|
|
|
|
// accountContact:create
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Account ID',
|
|
|
|
name: 'account',
|
|
|
|
type: 'number',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
operation: ['create'],
|
|
|
|
resource: ['accountContact'],
|
2020-09-18 00:42:01 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Contact ID',
|
|
|
|
name: 'contact',
|
|
|
|
type: 'number',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
operation: ['create'],
|
|
|
|
resource: ['accountContact'],
|
2020-09-18 00:42:01 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
name: 'additionalFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
operation: ['create'],
|
|
|
|
resource: ['accountContact'],
|
2020-09-18 00:42:01 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: {},
|
|
|
|
options: [
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Job Title',
|
2020-09-18 00:42:01 -07:00
|
|
|
name: 'jobTitle',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'Job Title of the contact at the account',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
// ----------------------------------
|
|
|
|
// accountContact:delete
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Account Contact ID',
|
|
|
|
name: 'accountContactId',
|
|
|
|
type: 'number',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
operation: ['delete'],
|
|
|
|
resource: ['accountContact'],
|
2020-09-18 00:42:01 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: 0,
|
|
|
|
required: true,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'ID of the account contact to delete',
|
2020-09-18 00:42:01 -07:00
|
|
|
},
|
|
|
|
// ----------------------------------
|
|
|
|
// accountContact:update
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Account Contact ID',
|
|
|
|
name: 'accountContactId',
|
|
|
|
type: 'number',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
operation: ['update'],
|
|
|
|
resource: ['accountContact'],
|
2020-09-18 00:42:01 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'Account ID',
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
displayName: 'Update Fields',
|
|
|
|
name: 'updateFields',
|
|
|
|
type: 'collection',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The fields to update',
|
2020-09-18 00:42:01 -07:00
|
|
|
placeholder: 'Add Field',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
operation: ['update'],
|
|
|
|
resource: ['accountContact'],
|
2020-09-18 00:42:01 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: {},
|
|
|
|
options: [
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Job Title',
|
2020-09-18 00:42:01 -07:00
|
|
|
name: 'jobTitle',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'Job Title of the contact at the account',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|