2023-01-27 03:22:44 -08:00
|
|
|
import type { INodeProperties } from 'n8n-workflow';
|
2021-10-26 20:45:26 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const companyOperations: INodeProperties[] = [
|
2020-05-05 04:59:45 -07:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2020-05-05 04:59:45 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
2020-05-06 04:01:52 -07:00
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a new company',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Create a company',
|
2020-05-06 04:01:52 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Delete',
|
|
|
|
value: 'delete',
|
|
|
|
description: 'Delete a company',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Delete a company',
|
2020-05-06 04:01:52 -07:00
|
|
|
},
|
2020-05-05 04:59:45 -07:00
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
|
|
|
description: 'Get a company',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a company',
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
|
|
|
{
|
2022-09-07 07:51:14 -07:00
|
|
|
name: 'Get Many',
|
2020-05-05 04:59:45 -07:00
|
|
|
value: 'getAll',
|
2022-09-13 03:36:36 -07:00
|
|
|
description: 'Get many companies',
|
2022-09-08 08:10:13 -07:00
|
|
|
action: 'Get many companies',
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Update',
|
|
|
|
value: 'update',
|
|
|
|
description: 'Update company properties',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Update a company',
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'get',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2021-10-26 20:45:26 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const companyFields: INodeProperties[] = [
|
2020-05-11 11:22:31 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* company:get */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-05-05 04:59:45 -07:00
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
displayName: 'Company ID',
|
2020-05-05 04:59:45 -07:00
|
|
|
name: 'companyId',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['get'],
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
description: 'Unique identifier for a particular company',
|
|
|
|
},
|
2020-05-11 11:22:31 -07:00
|
|
|
|
2020-05-06 01:27:01 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* company:get all */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-05-05 04:59:45 -07:00
|
|
|
{
|
|
|
|
displayName: 'Return All',
|
|
|
|
name: 'returnAll',
|
|
|
|
type: 'boolean',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['getAll'],
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: false,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Whether to return all results or only up to a given limit',
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Limit',
|
|
|
|
name: 'limit',
|
|
|
|
type: 'number',
|
2022-05-20 14:47:24 -07:00
|
|
|
typeOptions: {
|
|
|
|
minValue: 1,
|
|
|
|
},
|
2020-05-05 04:59:45 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['getAll'],
|
|
|
|
returnAll: [false],
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-10-22 06:46:03 -07:00
|
|
|
},
|
2021-10-26 20:45:26 -07:00
|
|
|
default: 20,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Max number of results to return',
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
displayName: 'Filter',
|
|
|
|
name: 'filterType',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'None',
|
|
|
|
value: 'none',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Build Manually',
|
|
|
|
value: 'manual',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'JSON',
|
|
|
|
value: 'json',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['getAll'],
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: 'none',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Must Match',
|
|
|
|
name: 'matchType',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
name: 'Any Filter',
|
2021-10-26 20:45:26 -07:00
|
|
|
value: 'anyFilter',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'All Filters',
|
|
|
|
value: 'allFilters',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['getAll'],
|
|
|
|
filterType: ['manual'],
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: 'anyFilter',
|
|
|
|
},
|
|
|
|
{
|
2022-05-20 14:47:24 -07:00
|
|
|
displayName: 'Simplify',
|
2021-10-26 20:45:26 -07:00
|
|
|
name: 'simple',
|
|
|
|
type: 'boolean',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['getAll'],
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
},
|
2022-04-22 09:29:51 -07:00
|
|
|
// eslint-disable-next-line n8n-nodes-base/node-param-default-wrong-for-simplify
|
2021-10-26 20:45:26 -07:00
|
|
|
default: false,
|
2022-05-20 14:47:24 -07:00
|
|
|
description: 'Whether to return a simplified version of the response instead of the raw data',
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Filters',
|
|
|
|
name: 'filters',
|
|
|
|
type: 'fixedCollection',
|
|
|
|
typeOptions: {
|
|
|
|
multipleValues: true,
|
|
|
|
},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['getAll'],
|
|
|
|
filterType: ['manual'],
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
},
|
2022-04-22 09:29:51 -07:00
|
|
|
default: {},
|
2021-10-26 20:45:26 -07:00
|
|
|
placeholder: 'Add Condition',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Conditions',
|
|
|
|
name: 'conditions',
|
|
|
|
values: [
|
|
|
|
{
|
|
|
|
displayName: 'Field',
|
|
|
|
name: 'field',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Any searchable field',
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Condition Type',
|
|
|
|
name: 'condition_type',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
name: 'After',
|
|
|
|
value: 'AFTER',
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
name: 'Before',
|
|
|
|
value: 'BEFORE',
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Between',
|
|
|
|
value: 'BETWEEN',
|
|
|
|
},
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
name: 'Equals',
|
|
|
|
value: 'EQUALS',
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
name: 'Last',
|
|
|
|
value: 'LAST',
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
name: 'Not Equal',
|
|
|
|
value: 'NOTEQUALS',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'On',
|
|
|
|
value: 'ON',
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'EQUALS',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Value',
|
|
|
|
name: 'value',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Value 2',
|
|
|
|
name: 'value2',
|
|
|
|
type: 'string',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
condition_type: ['BETWEEN'],
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2022-08-01 13:47:55 -07:00
|
|
|
displayName:
|
|
|
|
'See <a href="https://github.com/agilecrm/rest-api#121-get-contacts-by-dynamic-filter" target="_blank">Agile CRM guide</a> to creating filters',
|
2021-10-26 20:45:26 -07:00
|
|
|
name: 'jsonNotice',
|
|
|
|
type: 'notice',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['getAll'],
|
|
|
|
filterType: ['json'],
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Filters (JSON)',
|
|
|
|
name: 'filterJson',
|
|
|
|
type: 'string',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['getAll'],
|
|
|
|
filterType: ['json'],
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2021-10-26 20:45:26 -07:00
|
|
|
{
|
|
|
|
displayName: 'Options',
|
|
|
|
name: 'options',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Option',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['getAll'],
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Sort',
|
|
|
|
name: 'sort',
|
|
|
|
type: 'fixedCollection',
|
|
|
|
placeholder: 'Add Sort',
|
|
|
|
default: [],
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Sort',
|
|
|
|
name: 'sort',
|
|
|
|
values: [
|
|
|
|
{
|
|
|
|
displayName: 'Direction',
|
|
|
|
name: 'direction',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Ascending',
|
|
|
|
value: 'ASC',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Descending',
|
|
|
|
value: 'DESC',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'ASC',
|
|
|
|
description: 'The sorting direction',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Field',
|
|
|
|
name: 'field',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The sorting field',
|
2021-10-26 20:45:26 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2020-05-06 01:27:01 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* company:create */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'JSON Parameters',
|
|
|
|
name: 'jsonParameters',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['create'],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
{
|
2022-05-20 14:47:24 -07:00
|
|
|
displayName: 'Additional Fields',
|
2020-05-06 01:27:01 -07:00
|
|
|
name: 'additionalFieldsJson',
|
|
|
|
type: 'json',
|
|
|
|
typeOptions: {
|
|
|
|
alwaysOpenEditWindow: true,
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['create'],
|
|
|
|
jsonParameters: [true],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2022-08-01 13:47:55 -07:00
|
|
|
description:
|
|
|
|
'Object of values to set as described <a href="https://github.com/agilecrm/rest-api#1-companys---companies-api">here</a>',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
name: 'additionalFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['create'],
|
|
|
|
jsonParameters: [false],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
options: [
|
2020-05-06 04:01:52 -07:00
|
|
|
{
|
|
|
|
displayName: 'Address',
|
|
|
|
name: 'email',
|
|
|
|
type: 'string',
|
2022-06-20 07:54:01 -07:00
|
|
|
placeholder: 'name@email.com',
|
2020-05-06 04:01:52 -07:00
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Company address',
|
2020-05-06 04:01:52 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Email',
|
|
|
|
name: 'email',
|
|
|
|
type: 'string',
|
2022-06-20 07:54:01 -07:00
|
|
|
placeholder: 'name@email.com',
|
2020-05-06 04:01:52 -07:00
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Company email',
|
2020-05-06 04:01:52 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Company name',
|
2020-05-06 04:01:52 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Phone',
|
|
|
|
name: 'phone',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Company phone',
|
2020-05-06 04:01:52 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
{
|
|
|
|
displayName: 'Star Value',
|
|
|
|
name: 'starValue',
|
|
|
|
type: 'options',
|
|
|
|
default: '',
|
|
|
|
description: 'Rating of company (Max value 5). This is not applicable for companies.',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: '0',
|
2020-10-22 06:46:03 -07:00
|
|
|
value: 0,
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '1',
|
2020-10-22 06:46:03 -07:00
|
|
|
value: 1,
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '2',
|
2020-10-22 06:46:03 -07:00
|
|
|
value: 2,
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '3',
|
2020-10-22 06:46:03 -07:00
|
|
|
value: 3,
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '4',
|
2020-10-22 06:46:03 -07:00
|
|
|
value: 4,
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '5',
|
2020-10-22 06:46:03 -07:00
|
|
|
value: 5,
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-10-22 06:46:03 -07:00
|
|
|
],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Tags',
|
|
|
|
name: 'tags',
|
|
|
|
type: 'string',
|
|
|
|
typeOptions: {
|
|
|
|
multipleValues: true,
|
|
|
|
multipleValueButtonText: 'Add Tag',
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
default: [],
|
2022-08-01 13:47:55 -07:00
|
|
|
description:
|
|
|
|
'Unique identifiers added to company, for easy management of companys. This is not applicable for companies.',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Website',
|
|
|
|
name: 'websiteOptions',
|
|
|
|
type: 'fixedCollection',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Companies websites',
|
2021-12-03 00:44:16 -08:00
|
|
|
default: {},
|
2020-05-06 01:27:01 -07:00
|
|
|
typeOptions: {
|
|
|
|
multipleValues: true,
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
options: [
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Website Properties.',
|
2020-05-06 01:27:01 -07:00
|
|
|
name: 'websiteProperties',
|
|
|
|
values: [
|
|
|
|
{
|
|
|
|
displayName: 'Type',
|
|
|
|
name: 'subtype',
|
|
|
|
type: 'options',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Type of website',
|
2020-05-06 01:27:01 -07:00
|
|
|
options: [
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Facebook',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'facebook',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Feed',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'feed',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Flickr',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'flickr',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Github',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'github',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Google Plus',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'googlePlus',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'LinkedIn',
|
|
|
|
value: 'linkedin',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Skype',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'skype',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Twitter',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'twitter',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-06 04:01:52 -07:00
|
|
|
name: 'URL',
|
|
|
|
value: 'url',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Xing',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'xing',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'YouTube',
|
2020-05-06 01:27:01 -07:00
|
|
|
value: 'youtube',
|
|
|
|
},
|
2020-05-11 11:22:31 -07:00
|
|
|
],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'URL',
|
|
|
|
name: 'url',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
description: 'Website URL',
|
2020-05-11 11:22:31 -07:00
|
|
|
},
|
|
|
|
],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-05-11 11:22:31 -07:00
|
|
|
],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Custom Properties',
|
|
|
|
name: 'customProperties',
|
|
|
|
type: 'fixedCollection',
|
2021-12-03 00:44:16 -08:00
|
|
|
default: {},
|
2020-05-06 01:27:01 -07:00
|
|
|
typeOptions: {
|
|
|
|
multipleValues: true,
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Property',
|
|
|
|
name: 'customProperty',
|
|
|
|
values: [
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Property name',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Sub Type',
|
|
|
|
name: 'subtype',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Property sub type',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Value',
|
|
|
|
name: 'value',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Property value',
|
2020-05-11 11:22:31 -07:00
|
|
|
},
|
|
|
|
],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-05-11 11:22:31 -07:00
|
|
|
],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
],
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-11 11:22:31 -07:00
|
|
|
|
2020-05-06 01:27:01 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* company:delete */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Company ID',
|
2020-05-06 01:27:01 -07:00
|
|
|
name: 'companyId',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['delete'],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
default: '',
|
2020-05-06 04:01:52 -07:00
|
|
|
description: 'ID of company to delete',
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-11 11:22:31 -07:00
|
|
|
|
2020-05-06 01:27:01 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* company:update */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
displayName: 'Company ID',
|
2020-05-06 01:27:01 -07:00
|
|
|
name: 'companyId',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['update'],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
default: '',
|
|
|
|
description: 'Unique identifier for a particular company',
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
{
|
|
|
|
displayName: 'JSON Parameters',
|
|
|
|
name: 'jsonParameters',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['update'],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
{
|
2022-05-20 14:47:24 -07:00
|
|
|
displayName: 'Additional Fields',
|
2020-05-06 01:27:01 -07:00
|
|
|
name: 'additionalFieldsJson',
|
|
|
|
type: 'json',
|
|
|
|
typeOptions: {
|
|
|
|
alwaysOpenEditWindow: true,
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['update'],
|
|
|
|
jsonParameters: [true],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
},
|
2022-08-01 13:47:55 -07:00
|
|
|
description:
|
|
|
|
'Object of values to set as described <a href="https://github.com/agilecrm/rest-api#1-companys---companies-api">here</a>',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
name: 'additionalFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['company'],
|
|
|
|
operation: ['update'],
|
|
|
|
jsonParameters: [false],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
options: [
|
2020-05-06 04:01:52 -07:00
|
|
|
{
|
|
|
|
displayName: 'Address',
|
|
|
|
name: 'email',
|
|
|
|
type: 'string',
|
2022-06-20 07:54:01 -07:00
|
|
|
placeholder: 'name@email.com',
|
2020-05-06 04:01:52 -07:00
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Company address',
|
2020-05-06 04:01:52 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Email',
|
|
|
|
name: 'email',
|
|
|
|
type: 'string',
|
2022-06-20 07:54:01 -07:00
|
|
|
placeholder: 'name@email.com',
|
2020-05-06 04:01:52 -07:00
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Company email',
|
2020-05-06 04:01:52 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
{
|
|
|
|
displayName: 'Star Value',
|
|
|
|
name: 'starValue',
|
|
|
|
type: 'options',
|
|
|
|
default: '',
|
|
|
|
description: 'Rating of company (Max value 5). This is not applicable for companies.',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: '0',
|
2020-05-11 11:22:31 -07:00
|
|
|
value: 0,
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '1',
|
2020-05-11 11:22:31 -07:00
|
|
|
value: 1,
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '2',
|
2020-05-11 11:22:31 -07:00
|
|
|
value: 2,
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '3',
|
2020-05-11 11:22:31 -07:00
|
|
|
value: 3,
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '4',
|
2020-05-11 11:22:31 -07:00
|
|
|
value: 4,
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '5',
|
2020-05-11 11:22:31 -07:00
|
|
|
value: 5,
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-05-11 11:22:31 -07:00
|
|
|
],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Tags',
|
|
|
|
name: 'tags',
|
|
|
|
type: 'string',
|
|
|
|
typeOptions: {
|
|
|
|
multipleValues: true,
|
|
|
|
multipleValueButtonText: 'Add Tag',
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
default: [],
|
2022-08-01 13:47:55 -07:00
|
|
|
description:
|
|
|
|
'Unique identifiers added to company, for easy management of companys. This is not applicable for companies.',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Company name',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-06 04:01:52 -07:00
|
|
|
displayName: 'Phone',
|
|
|
|
name: 'phone',
|
2020-05-06 01:27:01 -07:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Company phone',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Website',
|
|
|
|
name: 'websiteOptions',
|
|
|
|
type: 'fixedCollection',
|
2021-12-03 00:44:16 -08:00
|
|
|
default: {},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Companys websites',
|
2020-05-06 01:27:01 -07:00
|
|
|
typeOptions: {
|
|
|
|
multipleValues: true,
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
options: [
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Website Properties.',
|
2020-05-06 01:27:01 -07:00
|
|
|
name: 'websiteProperties',
|
|
|
|
values: [
|
|
|
|
{
|
|
|
|
displayName: 'Type',
|
|
|
|
name: 'subtype',
|
|
|
|
type: 'options',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Type of website',
|
2020-05-06 01:27:01 -07:00
|
|
|
options: [
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Facebook',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'facebook',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Feed',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'feed',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Flickr',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'flickr',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Github',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'github',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Google Plus',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'googlePlus',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'LinkedIn',
|
|
|
|
value: 'linkedin',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Skype',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'skype',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Twitter',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'twitter',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-06 04:01:52 -07:00
|
|
|
name: 'URL',
|
|
|
|
value: 'url',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'Xing',
|
2020-05-06 04:01:52 -07:00
|
|
|
value: 'xing',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
2020-05-11 11:22:31 -07:00
|
|
|
name: 'YouTube',
|
2020-05-06 01:27:01 -07:00
|
|
|
value: 'youtube',
|
|
|
|
},
|
2020-05-11 11:22:31 -07:00
|
|
|
],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'URL',
|
|
|
|
name: 'url',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
description: 'Website URL',
|
2020-05-11 11:22:31 -07:00
|
|
|
},
|
|
|
|
],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-05-11 11:22:31 -07:00
|
|
|
],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Custom Properties',
|
|
|
|
name: 'customProperties',
|
|
|
|
type: 'fixedCollection',
|
2021-12-03 00:44:16 -08:00
|
|
|
default: {},
|
2020-05-06 01:27:01 -07:00
|
|
|
typeOptions: {
|
|
|
|
multipleValues: true,
|
2020-05-05 04:59:45 -07:00
|
|
|
},
|
2020-05-06 01:27:01 -07:00
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Property',
|
|
|
|
name: 'customProperty',
|
|
|
|
values: [
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Property name',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Sub Type',
|
|
|
|
name: 'subtype',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Property sub type',
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Value',
|
|
|
|
name: 'value',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Property value',
|
2020-05-11 11:22:31 -07:00
|
|
|
},
|
|
|
|
],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
2020-10-22 06:46:03 -07:00
|
|
|
],
|
2020-05-06 01:27:01 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|