n8n/packages/nodes-base/nodes/AgileCrm/CompanyDescription.ts

661 lines
13 KiB
TypeScript
Raw Normal View History

2020-05-05 04:59:45 -07:00
import {
INodeProperties,
2020-05-06 01:27:01 -07:00
} from 'n8n-workflow';
2020-05-05 04:59:45 -07:00
export const companyOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'company',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a new company',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a company',
},
2020-05-05 04:59:45 -07:00
{
name: 'Get',
value: 'get',
description: 'Get a company',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all companies',
},
{
name: 'Update',
value: 'update',
description: 'Update company properties',
},
],
default: 'get',
description: 'The operation to perform.',
},
] as INodeProperties[];
export const companyFields = [
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: {
resource: [
'company',
],
operation: [
'get',
],
},
},
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: {
resource: [
'company',
],
operation: [
'getAll',
],
},
},
default: false,
description: 'If all results should be returned or only up to a given limit.',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 20,
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'getAll',
],
returnAll: [
false,
],
},
2020-10-22 06:46:03 -07:00
},
2020-05-05 04:59:45 -07:00
},
2020-05-06 01:27:01 -07:00
/* -------------------------------------------------------------------------- */
/* company:create */
/* -------------------------------------------------------------------------- */
{
displayName: 'JSON Parameters',
name: 'jsonParameters',
type: 'boolean',
default: false,
description: '',
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'create',
],
},
2020-05-05 04:59:45 -07:00
},
},
2020-05-06 01:27:01 -07:00
{
displayName: ' Additional Fields',
name: 'additionalFieldsJson',
type: 'json',
typeOptions: {
alwaysOpenEditWindow: true,
},
default: '',
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'create',
],
jsonParameters: [
true,
],
},
2020-05-05 04:59:45 -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: {
resource: [
'company',
],
operation: [
'create',
],
jsonParameters: [
false,
],
},
2020-05-05 04:59:45 -07:00
},
2020-05-06 01:27:01 -07:00
options: [
{
displayName: 'Address',
name: 'email',
type: 'string',
default: '',
description: 'Company address.',
},
{
displayName: 'Email',
name: 'email',
type: 'string',
default: '',
description: 'Company email.',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
description: 'Company name.',
},
{
displayName: 'Phone',
name: 'phone',
type: 'string',
default: '',
description: 'Company phone.',
},
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: [],
description: 'Unique identifiers added to company, for easy management of companys. This is not applicable for companies.',
},
{
displayName: 'Website',
name: 'websiteOptions',
type: 'fixedCollection',
description: 'Companies 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: [
{
displayName: 'Website properties.',
name: 'websiteProperties',
values: [
{
displayName: 'Type',
name: 'subtype',
type: 'options',
required: true,
default: '',
description: 'Type of website.',
options: [
{
2020-05-11 11:22:31 -07:00
name: 'Facebook',
value: 'facebook',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'Feed',
value: 'feed',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'Flickr',
value: 'flickr',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'Github',
value: 'github',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'Google Plus',
value: 'googlePlus',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'LinkedIn',
value: 'linkedin',
},
{
name: 'Skype',
value: 'skype',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'Twitter',
value: 'twitter',
2020-05-06 01:27:01 -07:00
},
{
name: 'URL',
value: 'url',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'Xing',
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',
description: 'Custom Properties',
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: '',
2020-10-22 06:46:03 -07:00
description: 'Property name.',
2020-05-06 01:27:01 -07:00
},
{
displayName: 'Sub Type',
name: 'subtype',
type: 'string',
default: '',
description: 'Property sub type.',
},
{
displayName: 'Value',
name: 'value',
type: 'string',
default: '',
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 */
/* -------------------------------------------------------------------------- */
{
displayName: 'company ID',
name: 'companyId',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'delete',
],
},
2020-05-05 04:59:45 -07:00
},
2020-05-06 01:27:01 -07:00
default: '',
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: {
resource: [
'company',
],
operation: [
'update',
],
},
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,
description: '',
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'update',
],
},
2020-05-05 04:59:45 -07:00
},
},
2020-05-06 01:27:01 -07:00
{
displayName: ' Additional Fields',
name: 'additionalFieldsJson',
type: 'json',
typeOptions: {
alwaysOpenEditWindow: true,
},
default: '',
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'update',
],
jsonParameters: [
true,
],
},
},
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: {
resource: [
'company',
],
operation: [
'update',
],
jsonParameters: [
false,
],
},
2020-05-05 04:59:45 -07:00
},
2020-05-06 01:27:01 -07:00
options: [
{
displayName: 'Address',
name: 'email',
type: 'string',
default: '',
description: 'Company address.',
},
{
displayName: 'Email',
name: 'email',
type: 'string',
default: '',
description: 'Company email.',
},
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: [],
description: 'Unique identifiers added to company, for easy management of companys. This is not applicable for companies.',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
description: 'Company name.',
},
{
displayName: 'Phone',
name: 'phone',
2020-05-06 01:27:01 -07:00
type: 'string',
default: '',
description: 'Company phone.',
2020-05-06 01:27:01 -07:00
},
{
displayName: 'Website',
name: 'websiteOptions',
type: 'fixedCollection',
2020-05-11 11:22:31 -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: [
{
displayName: 'Website properties.',
name: 'websiteProperties',
values: [
{
displayName: 'Type',
name: 'subtype',
type: 'options',
required: true,
default: '',
description: 'Type of website.',
options: [
{
2020-05-11 11:22:31 -07:00
name: 'Facebook',
value: 'facebook',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'Feed',
value: 'feed',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'Flickr',
value: 'flickr',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'Github',
value: 'github',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'Google Plus',
value: 'googlePlus',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'LinkedIn',
value: 'linkedin',
},
{
name: 'Skype',
value: 'skype',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'Twitter',
value: 'twitter',
2020-05-06 01:27:01 -07:00
},
{
name: 'URL',
value: 'url',
2020-05-06 01:27:01 -07:00
},
{
2020-05-11 11:22:31 -07:00
name: 'Xing',
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',
description: 'Custom Properties',
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: '',
2020-05-11 11:22:31 -07:00
description: 'Property name.',
2020-05-06 01:27:01 -07:00
},
{
displayName: 'Sub Type',
name: 'subtype',
type: 'string',
default: '',
description: 'Property sub type.',
},
{
displayName: 'Value',
name: 'value',
type: 'string',
default: '',
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
},
],
},
2020-05-05 04:59:45 -07:00
] as INodeProperties[];