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

450 lines
8.2 KiB
TypeScript
Raw Normal View History

2021-01-13 11:20:30 -08:00
import { INodeProperties } from 'n8n-workflow';
2019-11-21 09:39:04 -08:00
export const companyOperations = [
2019-11-21 09:39:04 -08:00
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'company',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a new company',
},
{
name: 'Get',
value: 'get',
description: 'Get data of a company',
2019-11-21 09:39:04 -08:00
},
{
name: 'Get All',
value: 'getAll',
description: 'Get data of all companies',
2019-11-21 09:39:04 -08:00
},
{
name: 'Update',
value: 'update',
description: 'Update a company',
2019-11-21 09:39:04 -08:00
},
{
2019-11-21 09:52:57 -08:00
name: 'Users',
value: 'users',
2019-11-21 09:39:04 -08:00
description: `List company's users`,
},
],
default: 'create',
2019-11-21 09:39:04 -08:00
description: 'The operation to perform.',
},
] as INodeProperties[];
export const companyFields = [
/* -------------------------------------------------------------------------- */
/* company:users */
/* -------------------------------------------------------------------------- */
2019-11-21 09:39:04 -08:00
{
displayName: 'List By',
name: 'listBy',
type: 'options',
displayOptions: {
show: {
resource: [
'company',
],
operation: [
2019-11-21 09:52:57 -08:00
'users',
2019-11-21 09:39:04 -08:00
],
},
},
options: [
{
name: 'ID',
value: 'id',
description: 'The Intercom defined id representing the company',
},
{
name: 'Company ID',
value: 'companyId',
description: 'The company_id you have given to the company',
},
],
default: '',
description: 'List by',
2019-11-21 09:39:04 -08:00
},
{
displayName: 'Value',
name: 'value',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'company',
],
operation: [
2019-11-21 09:52:57 -08:00
'users',
2019-11-21 09:39:04 -08:00
],
},
},
description: 'View by value',
},
2021-04-24 08:42:31 -07:00
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'users',
],
},
},
default: false,
description: 'If all results should be returned or only up to a given limit.',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'users',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 60,
},
default: 50,
description: 'How many results to return.',
},
/* -------------------------------------------------------------------------- */
/* company:getAll */
/* -------------------------------------------------------------------------- */
2019-11-21 09:39:04 -08:00
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
2019-11-21 09:39:04 -08:00
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'getAll',
2019-11-21 09:39:04 -08:00
],
},
},
default: false,
description: 'If all results should be returned or only up to a given limit.',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'getAll',
],
returnAll: [
false,
],
2019-11-21 09:39:04 -08:00
},
},
typeOptions: {
minValue: 1,
maxValue: 60,
},
default: 50,
description: 'How many results to return.',
2019-11-21 09:39:04 -08:00
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Filter',
default: {},
2019-11-21 09:39:04 -08:00
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'getAll',
2019-11-21 09:39:04 -08:00
],
},
},
options: [
{
displayName: 'Segment ID',
name: 'segment_id',
type: 'string',
default: '',
description: 'Segment representing the Lead',
},
{
displayName: 'Tag ID',
name: 'tag_id',
type: 'string',
default: '',
description: 'Tag representing the Lead',
},
2020-10-22 06:46:03 -07:00
],
2019-11-21 09:39:04 -08:00
},
/* -------------------------------------------------------------------------- */
/* company:get */
/* -------------------------------------------------------------------------- */
2019-11-21 09:39:04 -08:00
{
displayName: 'Select By',
name: 'selectBy',
2019-11-21 09:39:04 -08:00
type: 'options',
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'get',
2019-11-21 09:39:04 -08:00
],
},
},
options: [
{
name: 'Company ID',
value: 'companyId',
description: 'The company_id you have given to the company',
},
{
name: 'ID',
value: 'id',
description: 'The Intercom defined id representing the company',
},
2019-11-21 09:39:04 -08:00
{
name: 'Name',
value: 'name',
description: 'The name of the company',
},
],
default: '',
description: 'What property to use to query the company.',
2019-11-21 09:39:04 -08:00
},
{
displayName: 'Value',
name: 'value',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'get',
2019-11-21 09:39:04 -08:00
],
},
},
description: 'View by value',
},
/* -------------------------------------------------------------------------- */
/* company:create/update */
/* -------------------------------------------------------------------------- */
2019-11-21 09:39:04 -08:00
{
displayName: 'Company Id',
name: 'companyId',
type: 'string',
default: '',
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'create',
'update',
2019-11-21 09:39:04 -08:00
],
},
},
description: 'The company id you have defined for the company',
},
{
displayName: 'JSON Parameters',
name: 'jsonParameters',
type: 'boolean',
default: false,
description: '',
displayOptions: {
show: {
operation: [
'create',
'update',
],
resource: [
'company',
2019-11-21 09:39:04 -08:00
],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
2019-11-21 09:39:04 -08:00
type: 'collection',
placeholder: 'Add Field',
2019-11-21 09:39:04 -08:00
default: {},
displayOptions: {
show: {
operation: [
'create',
'update',
],
resource: [
'company',
2019-11-21 09:39:04 -08:00
],
},
},
options: [
{
displayName: 'Industry',
name: 'industry',
type: 'string',
default: '',
description: 'The industry that this company operates in',
},
2019-11-21 09:39:04 -08:00
{
displayName: 'Monthly Spend',
name: 'monthlySpend',
type: 'string',
default: '',
description: 'The phone number of the user',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
placeholder: '',
description: 'Name of the user',
},
{
displayName: 'Plan',
name: 'plan',
type: 'string',
default: '',
placeholder: '',
description: 'The name of the plan you have associated with the company',
},
{
displayName: 'Size',
name: 'size',
type: 'number',
default: '',
description: 'The number of employees in this company',
},
{
displayName: 'Website',
name: 'website',
type: 'string',
default: '',
:zap: Remove unnessasry <br/> (#2340) * introduce analytics * add user survey backend * add user survey backend * set answers on survey submit Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> * change name to personalization * lint Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> * N8n 2495 add personalization modal (#2280) * update modals * add onboarding modal * implement questions * introduce analytics * simplify impl * implement survey handling * add personalized cateogry * update modal behavior * add thank you view * handle empty cases * rename modal * standarize modal names * update image, add tags to headings * remove unused file * remove unused interfaces * clean up footer spacing * introduce analytics * refactor to fix bug * update endpoint * set min height * update stories * update naming from questions to survey * remove spacing after core categories * fix bug in logic * sort nodes * rename types * merge with be * rename userSurvey * clean up rest api * use constants for keys * use survey keys * clean up types * move personalization to its own file Co-authored-by: ahsan-virani <ahsan.virani@gmail.com> * update parameter inputs to be multiline * update spacing * Survey new options (#2300) * split up options * fix quotes * remove unused import * refactor node credentials * add user created workflow event (#2301) * update multi params * simplify env vars * fix versionCli on FE * update personalization env * clean up node detail settings * fix event User opened Credentials panel * fix font sizes across modals * clean up input spacing * fix select modal spacing * increase spacing * fix input copy * fix webhook, tab spacing, retry button * fix button sizes * fix button size * add mini xlarge sizes * fix webhook spacing * fix nodes panel event * fix workflow id in workflow execute event * improve telemetry error logging * fix config and stop process events * add flush call on n8n stop * ready for release * fix input error highlighting * revert change * update toggle spacing * fix delete positioning * keep tooltip while focused * set strict size * increase left spacing * fix sort icons * remove unnessasry <br/> * remove unnessary break * remove unnessary margin * clean unused functionality * remove unnessary css * remove duplicate tracking * only show tooltip when hovering over label * remove extra space * add br * remove extra space * clean up commas * clean up commas * remove extra space * remove extra space * rewrite desc * add commas * add space * remove extra space * add space * add dot * update credentials section * use includes Co-authored-by: ahsan-virani <ahsan.virani@gmail.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-10-27 13:00:13 -07:00
description: `The URL for this company's website. Please note that the value specified here is not validated. Accepts any string.`,
2019-11-21 09:39:04 -08:00
},
2020-10-22 06:46:03 -07:00
],
2019-11-21 09:39:04 -08:00
},
{
displayName: 'Custom Attributes',
name: 'customAttributesJson',
type: 'json',
required: false,
typeOptions: {
alwaysOpenEditWindow: true,
},
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'create',
'update',
],
jsonParameters: [
true,
],
},
},
default: '',
description: 'A hash of key/value pairs to represent custom data you want to attribute to a user.',
},
{
displayName: 'Custom Attributes',
name: 'customAttributesUi',
type: 'fixedCollection',
default: '',
placeholder: 'Add Attribute',
typeOptions: {
multipleValues: true,
},
required: false,
displayOptions: {
show: {
resource: [
'company',
],
operation: [
'create',
'update',
],
jsonParameters: [
false,
],
},
},
options: [
{
name: 'customAttributesValues',
displayName: 'Attributes',
values: [
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
},
{
displayName: 'Value',
name: 'value',
type: 'string',
default: '',
},
],
2020-10-22 06:46:03 -07:00
},
2019-11-21 09:39:04 -08:00
],
description: 'A hash of key/value pairs to represent custom data you want to attribute to a user.',
},
] as INodeProperties[];