2020-01-27 07:27:14 +03:00
|
|
|
import { INodeProperties } from 'n8n-workflow';
|
|
|
|
|
2021-12-03 11:44:16 +03:00
|
|
|
export const companyOperations: INodeProperties[] = [
|
2020-01-27 07:27:14 +03:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-21 00:47:24 +03:00
|
|
|
noDataExpression: true,
|
2020-01-27 07:27:14 +03:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'company',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Autocomplete',
|
|
|
|
value: 'autocomplete',
|
2020-07-24 13:56:41 +03:00
|
|
|
description: 'Auto-complete company names and retrieve logo and domain',
|
2022-07-10 23:50:51 +03:00
|
|
|
action: 'Autocomplete a company',
|
2020-01-27 07:27:14 +03:00
|
|
|
},
|
2021-03-24 02:20:48 +03:00
|
|
|
{
|
|
|
|
name: 'Enrich',
|
|
|
|
value: 'enrich',
|
|
|
|
description: 'Look up person and company data based on an email or domain',
|
2022-07-10 23:50:51 +03:00
|
|
|
action: 'Enrich a company',
|
2021-03-24 02:20:48 +03:00
|
|
|
},
|
2020-01-27 07:27:14 +03:00
|
|
|
],
|
|
|
|
default: 'enrich',
|
|
|
|
},
|
2021-12-03 11:44:16 +03:00
|
|
|
];
|
2020-01-27 07:27:14 +03:00
|
|
|
|
2021-12-03 11:44:16 +03:00
|
|
|
export const companyFields: INodeProperties[] = [
|
2020-01-27 07:27:14 +03:00
|
|
|
|
2021-03-24 02:20:48 +03:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* company:enrich */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-01-27 07:27:14 +03:00
|
|
|
{
|
|
|
|
displayName: 'Domain',
|
|
|
|
name: 'domain',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'company',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'enrich',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-05-07 00:01:25 +03:00
|
|
|
description: 'The domain to look up',
|
2020-01-27 07:27:14 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
name: 'additionalFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'company',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'enrich',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
2020-01-30 08:49:04 +03:00
|
|
|
displayName: 'Company Name',
|
|
|
|
name: 'companyName',
|
2020-01-27 07:27:14 +03:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-07 00:01:25 +03:00
|
|
|
description: 'The name of the company',
|
2020-01-27 07:27:14 +03:00
|
|
|
},
|
|
|
|
{
|
2020-01-30 08:49:04 +03:00
|
|
|
displayName: 'Facebook',
|
|
|
|
name: 'facebook',
|
2020-01-27 07:27:14 +03:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-07 00:01:25 +03:00
|
|
|
description: 'The Facebook URL for the company',
|
2020-01-27 07:27:14 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Linkedin',
|
|
|
|
name: 'linkedin',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-07 00:01:25 +03:00
|
|
|
description: 'The LinkedIn URL for the company',
|
2020-01-27 07:27:14 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Twitter',
|
|
|
|
name: 'twitter',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-07 00:01:25 +03:00
|
|
|
description: 'The Twitter handle for the company',
|
2020-01-27 07:27:14 +03:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-03-24 02:20:48 +03:00
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* company:autocomplete */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'company',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'autocomplete',
|
|
|
|
],
|
|
|
|
},
|
2020-01-27 07:27:14 +03:00
|
|
|
},
|
2022-05-07 00:01:25 +03:00
|
|
|
description: 'Name is the partial name of the company',
|
2020-01-27 07:27:14 +03:00
|
|
|
},
|
2021-12-03 11:44:16 +03:00
|
|
|
];
|