n8n/packages/nodes-base/nodes/Hubspot/ContactDescription.ts

1100 lines
26 KiB
TypeScript
Raw Normal View History

2020-04-17 14:42:41 -07:00
import {
INodeProperties,
} from 'n8n-workflow';
2020-04-17 14:42:41 -07:00
export const contactOperations: INodeProperties[] = [
2020-04-17 14:42:41 -07:00
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'contact',
],
},
},
options: [
{
name: 'Create/Update',
value: 'upsert',
description: 'Create/Update a contact',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a contact',
2020-04-17 14:42:41 -07:00
},
{
name: 'Get',
value: 'get',
description: 'Get a contact',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all contacts',
},
{
name: 'Get Recently Created/Updated',
value: 'getRecentlyCreatedUpdated',
description: 'Get recently created/updated contacts',
},
{
name: 'Search',
value: 'search',
description: 'Search contacts',
},
2020-04-17 14:42:41 -07:00
],
default: 'upsert',
description: 'The operation to perform.',
},
];
2020-04-17 14:42:41 -07:00
export const contactFields: INodeProperties[] = [
2020-04-17 14:42:41 -07:00
/* -------------------------------------------------------------------------- */
/* contact:upsert */
/* -------------------------------------------------------------------------- */
2020-04-17 14:42:41 -07:00
{
displayName: 'Email',
name: 'email',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'upsert',
],
},
},
default: '',
},
{
displayName: 'Resolve Data',
name: 'resolveData',
type: 'boolean',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'upsert',
],
},
},
default: true,
: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: 'By default the response only includes the ID. If this option gets activated, it will resolve the data automatically.',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'upsert',
],
},
},
options: [
{
displayName: 'Annual Revenue',
name: 'annualRevenue',
type: 'number',
typeOptions: {
minValue: 0,
},
default: 0,
},
{
displayName: 'Associated Company ID',
name: 'associatedCompanyId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getCompanies',
2020-04-17 14:42:41 -07:00
},
default: '',
2020-10-22 06:46:03 -07:00
description: 'Companies associated with the ticket',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'City',
name: 'city',
type: 'string',
default: '',
},
{
displayName: 'Clicked Facebook Ad',
name: 'clickedFacebookAd',
type: 'string',
default: '',
},
{
displayName: 'Close Date',
name: 'closeDate',
type: 'dateTime',
default: '',
},
{
displayName: 'Company Name',
name: 'companyName',
type: 'string',
default: '',
},
{
displayName: 'Company Size',
name: 'companySize',
type: 'string',
default: '',
},
{
displayName: 'Contact Owner',
name: 'contactOwner',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getOwners',
},
default: '',
},
{
displayName: 'Country/Region',
name: 'country',
type: 'string',
default: '',
},
{
displayName: 'Custom Properties',
name: 'customPropertiesUi',
placeholder: 'Add Custom Property',
type: 'fixedCollection',
typeOptions: {
multipleValues: true,
},
default: {},
options: [
{
name: 'customPropertiesValues',
displayName: 'Custom Property',
values: [
{
displayName: 'Property',
name: 'property',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getContactCustomProperties',
},
default: '',
description: 'Name of the property',
},
{
displayName: 'Value',
name: 'value',
type: 'string',
default: '',
description: 'Value of the property',
},
],
},
],
},
2020-04-17 14:42:41 -07:00
{
displayName: 'Date of Birth',
name: 'dateOfBirth',
type: 'dateTime',
default: '',
},
{
displayName: 'Degree',
name: 'degree',
type: 'string',
default: '',
},
{
displayName: 'Facebook Click ID',
name: 'facebookClickId',
type: 'string',
default: '',
},
{
displayName: 'Fax Number',
name: 'faxNumber',
type: 'string',
default: '',
},
{
displayName: 'Field Of Study',
name: 'fieldOfStudy',
type: 'string',
default: '',
description: 'A contact\'s field of study. This property is required for the Facebook Ads Integration. This property will be automatically synced via the Lead Ads tool',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'First Name',
name: 'firstName',
type: 'string',
default: '',
description: 'A contact\'s first name',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Gender',
name: 'gender',
type: 'string',
default: '',
},
{
displayName: 'Google Ad Click ID',
name: 'googleAdClickId',
type: 'string',
default: '',
},
{
displayName: 'Graduation Date',
name: 'graduationDate',
type: 'dateTime',
default: '',
description: 'A contact\'s graduation date. This property is required for the Facebook Ads Integration. This property will be automatically synced via the Lead Ads tool',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Industry',
name: 'industry',
type: 'string',
default: '',
description: 'The industry a contact is in',
},
{
displayName: 'Job Function',
name: 'jobFunction',
type: 'string',
default: '',
description: 'A contact\'s job function. This property is required for the Facebook Ads Integration. This property will be automatically synced via the Lead Ads tool',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Job Title',
name: 'jobTitle',
type: 'string',
default: '',
description: 'A contact\'s job title',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Last Name',
name: 'lastName',
type: 'string',
default: '',
description: 'A contact\'s last name',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Lead Status',
name: 'leadStatus',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getContactLeadStatuses',
},
default: '',
description: 'The contact\'s sales, prospecting or outreach status',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Legal Basic For Processing Contact Data',
name: 'processingContactData',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getContactLealBasics',
},
default: '',
description: 'Legal basis for processing contact\'s data; \'Not applicable\' will exempt the contact from GDPR protections',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Lifecycle Stage',
name: 'lifeCycleStage',
type: 'options',
typeOptions: {
2020-10-22 06:46:03 -07:00
loadOptionsMethod: 'getContactLifeCycleStages',
2020-04-17 14:42:41 -07:00
},
default: '',
description: 'The qualification of contacts to sales readiness. It can be set through imports, forms, workflows, and manually on a per contact basis.',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Marital Status',
name: 'maritalStatus',
type: 'string',
default: '',
description: 'A contact\'s marital status. This property is required for the Facebook Ads Integration. This property will be automatically synced via the Lead Ads tool',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Membership Note',
name: 'membershipNote',
type: 'string',
typeOptions: {
alwaysOpenEditWindow: true,
},
default: '',
description: 'The notes relating to the contact\'s content membership',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Message',
name: 'message',
type: 'string',
typeOptions: {
alwaysOpenEditWindow: true,
},
default: '',
description: 'A default property to be used for any message or comments a contact may want to leave on a form',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Mobile Phone Number',
name: 'mobilePhoneNumber',
type: 'string',
default: '',
description: 'A contact\'s mobile phone number',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Number Of Employees',
name: 'numberOfEmployees',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getContactNumberOfEmployees',
},
default: '',
description: 'The number of company employees',
},
{
displayName: 'Original Source',
name: 'originalSource',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getContactOriginalSources',
},
default: '',
description: 'The first known source through which a contact found your website. Source is automatically set by HubSpot, but may be updated manually.',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Phone Number',
name: 'phoneNumber',
type: 'string',
default: '',
description: 'A contact\'s primary phone number',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Properties',
name: 'properties',
type: 'multiOptions',
typeOptions: {
loadOptionsMethod: 'getContactProperties',
},
displayOptions: {
show: {
'/resolveData': [
true,
],
},
},
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
default: [],
description: '<p>Used to include specific company properties in the results. By default, the results will only include company ID and will not include the values for any properties for your company.</p><p>Including this parameter will include the data for the specified property in the results. You can include this parameter multiple times to request multiple properties separated by a comma: <code>,</code>.</p>',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Postal Code',
name: 'postalCode',
type: 'string',
default: '',
description: 'The contact\'s zip code. This might be set via import, form, or integration.',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Preffered Language',
name: 'prefferedLanguage',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getContactPrefferedLanguages',
},
default: '',
description: 'Set your contact\'s preferred language for communications. This property can be changed from an import, form, or integration.',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Relationship Status',
name: 'relationshipStatus',
type: 'string',
default: '',
description: 'A contact\'s relationship status. This property is required for the Facebook Ads Integration. This property will be automatically synced via the Lead Ads tool',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Salutation',
name: 'salutation',
type: 'string',
default: '',
description: 'The title used to address a contact',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'School',
name: 'school',
type: 'string',
default: '',
description: 'A contact\'s school. This property is required for the Facebook Ads Integration. This property will be automatically synced via the Lead Ads tool',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Seniority',
name: 'seniority',
type: 'string',
default: '',
description: 'A contact\'s seniority. This property is required for the Facebook Ads Integration. This property will be automatically synced via the Lead Ads tool',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Start Date',
name: 'startDate',
type: 'dateTime',
default: '',
description: 'A contact\'s start date. This property is required for the Facebook Ads Integration. This property will be automatically synced via the Lead Ads tool',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'State/Region',
name: 'stateRegion',
type: 'string',
default: '',
description: 'The contact\'s state of residence. This might be set via import, form, or integration.',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Status',
name: 'status',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getContactStatuses',
},
default: '',
description: 'The status of the contact\'s content membership',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Street Address',
name: 'streetAddress',
type: 'string',
default: '',
description: 'A contact\'s street address, including apartment or unit #',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Twitter Username',
name: 'twitterUsername',
type: 'string',
default: '',
description: 'The contact\'s Twitter handle. This is set by HubSpot using the contact\'s email address.',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Website URL',
name: 'websiteUrl',
type: 'string',
default: '',
description: 'The contact\'s company website',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Work Email',
name: 'workEmail',
type: 'string',
default: '',
description: 'A contact\'s work email. This property is required for the Facebook Ads Integration. This property will be automatically synced via the Lead Ads tool',
2020-04-17 14:42:41 -07:00
},
],
},
/* -------------------------------------------------------------------------- */
/* contact:get */
/* -------------------------------------------------------------------------- */
2020-04-17 14:42:41 -07:00
{
displayName: 'Contact ID',
name: 'contactId',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'get',
],
},
},
default: '',
description: 'Unique identifier for a particular contact',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'get',
],
},
},
options: [
{
displayName: 'Form Submission Mode',
name: 'formSubmissionMode',
type: 'options',
options: [
{
name: 'All',
value: 'all',
},
{
name: 'None',
value: 'none',
},
{
name: 'Newest',
value: 'newest',
},
{
name: 'Oldest',
value: 'oldest',
},
],
default: 'all',
description: 'Specify which form submissions should be fetched',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'List Memberships',
name: 'listMerberships',
type: 'boolean',
default: true,
description: 'Whether current list memberships should be fetched for the contact',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Properties',
name: 'properties',
type: 'multiOptions',
typeOptions: {
loadOptionsMethod: 'getContactProperties',
},
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
default: [],
description: '<p>Used to include specific company properties in the results. By default, the results will only include company ID and will not include the values for any properties for your company.</p><p>Including this parameter will include the data for the specified property in the results. You can include this parameter multiple times to request multiple properties separated by a comma: <code>,</code>.</p>',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Property Mode',
name: 'propertyMode',
type: 'options',
options: [
{
name: 'Value And History',
value: 'valueAndHistory',
},
{
name: 'Value Only',
value: 'valueOnly',
},
],
default: 'valueAndHistory',
description: 'Specify if the current value for a property should be fetched, or the value and all the historical values for that property',
2020-04-17 14:42:41 -07:00
},
],
},
/* -------------------------------------------------------------------------- */
/* contact:getAll */
/* -------------------------------------------------------------------------- */
2020-04-17 14:42:41 -07:00
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'getAll',
],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'getAll',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 250,
},
default: 100,
description: 'Max number of results to return',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'getAll',
],
},
},
options: [
{
displayName: 'Form Submission Mode',
name: 'formSubmissionMode',
type: 'options',
options: [
{
name: 'All',
value: 'all',
},
{
name: 'None',
value: 'none',
},
{
name: 'Newest',
value: 'newest',
},
{
name: 'Oldest',
value: 'oldest',
},
],
default: 'all',
description: 'Specify which form submissions should be fetched',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'List Memberships',
name: 'listMerberships',
type: 'boolean',
default: true,
description: 'Whether current list memberships should be fetched for the contact',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Properties',
name: 'properties',
type: 'multiOptions',
typeOptions: {
loadOptionsMethod: 'getContactProperties',
},
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
default: [],
description: '<p>Used to include specific company properties in the results. By default, the results will only include company ID and will not include the values for any properties for your company.</p><p>Including this parameter will include the data for the specified property in the results. You can include this parameter multiple times to request multiple properties separated by a comma: <code>,</code>.</p>',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Property Mode',
name: 'propertyMode',
type: 'options',
options: [
{
name: 'Value And History',
value: 'valueAndHistory',
},
{
name: 'Value Only',
value: 'valueOnly',
},
],
default: 'valueAndHistory',
description: 'Specify if the current value for a property should be fetched, or the value and all the historical values for that property',
2020-04-17 14:42:41 -07:00
},
],
},
/* -------------------------------------------------------------------------- */
/* contact:delete */
/* -------------------------------------------------------------------------- */
2020-04-17 14:42:41 -07:00
{
displayName: 'Contact ID',
name: 'contactId',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'delete',
],
},
},
default: '',
description: 'Unique identifier for a particular contact',
},
/* -------------------------------------------------------------------------- */
/* contact:getRecentlyCreatedUpdated */
/* -------------------------------------------------------------------------- */
2020-04-17 14:42:41 -07:00
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'getRecentlyCreatedUpdated',
],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'getRecentlyCreatedUpdated',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 250,
},
default: 100,
description: 'Max number of results to return',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Filter',
default: {},
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'getRecentlyCreatedUpdated',
],
},
},
options: [
{
displayName: 'Form Submission Mode',
name: 'formSubmissionMode',
type: 'options',
options: [
{
name: 'All',
value: 'all',
},
{
name: 'None',
value: 'none',
},
{
name: 'Newest',
value: 'newest',
},
{
name: 'Oldest',
value: 'oldest',
},
],
default: 'all',
description: 'Specify which form submissions should be fetched',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'List Memberships',
name: 'listMerberships',
type: 'boolean',
default: true,
description: 'Whether current list memberships should be fetched for the contact',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Properties',
name: 'properties',
type: 'multiOptions',
typeOptions: {
loadOptionsMethod: 'getContactProperties',
},
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
default: [],
description: '<p>Used to include specific company properties in the results. By default, the results will only include company ID and will not include the values for any properties for your company.</p><p>Including this parameter will include the data for the specified property in the results. You can include this parameter multiple times to request multiple properties separated by a comma: <code>,</code>.</p>',
2020-04-17 14:42:41 -07:00
},
{
displayName: 'Property Mode',
name: 'propertyMode',
type: 'options',
options: [
{
name: 'Value And History',
value: 'valueAndHistory',
},
{
name: 'Value Only',
value: 'valueOnly',
},
],
default: 'valueAndHistory',
description: 'Specify if the current value for a property should be fetched, or the value and all the historical values for that property',
2020-04-17 14:42:41 -07:00
},
],
},
//*-------------------------------------------------------------------------- */
/* contact:search */
/* -------------------------------------------------------------------------- */
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'search',
],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'search',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 250,
},
default: 100,
description: 'Max number of results to return',
},
{
displayName: 'Filter Groups',
name: 'filterGroupsUi',
type: 'fixedCollection',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
default: {},
placeholder: 'Add Filter Group',
typeOptions: {
multipleValues: true,
},
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'search',
],
},
},
options: [
{
name: 'filterGroupsValues',
displayName: 'Filter Group',
values: [
{
displayName: 'Filters',
name: 'filtersUi',
type: 'fixedCollection',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
default: {},
placeholder: 'Add Filter',
typeOptions: {
multipleValues: true,
},
options: [
{
name: 'filterValues',
displayName: 'Filter',
values: [
{
displayName: 'Property Name',
name: 'propertyName',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getContactProperties',
},
default: '',
},
{
displayName: 'Operator',
name: 'operator',
type: 'options',
options: [
{
name: 'Equal',
value: 'EQ',
},
{
name: 'Not Equal',
value: 'NEQ',
},
{
name: 'Less Than',
value: 'LT',
},
{
name: 'Less Than Or Equal',
value: 'LTE',
},
{
name: 'Greater Than',
value: 'GT',
},
{
name: 'Greater Than Or Equal',
value: 'GTE',
},
{
name: 'Is Known',
value: 'HAS_PROPERTY',
},
{
name: 'Is Unknown',
value: 'NOT_HAS_PROPERTY',
},
{
name: 'Contains Exactly',
value: 'CONTAINS_TOKEN',
},
{
name: `Doesn't Contain Exactly`,
value: 'NOT_CONTAINS_TOKEN',
},
],
default: 'EQ',
},
{
displayName: 'Value',
name: 'value',
displayOptions: {
hide: {
operator: [
'HAS_PROPERTY',
'NOT_HAS_PROPERTY',
],
},
},
type: 'string',
default: '',
},
],
2020-10-22 06:46:03 -07:00
},
],
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
description: 'Use filters to limit the results to only CRM objects with matching property values. More info <a href="https://developers.hubspot.com/docs/api/crm/search">here</a>.',
},
],
2020-10-22 06:46:03 -07:00
},
],
description: 'When multiple filters are provided within a filterGroup, they will be combined using a logical AND operator. When multiple filterGroups are provided, they will be combined using a logical OR operator. The system supports a maximum of three filterGroups with up to three filters each. More info <a href="https://developers.hubspot.com/docs/api/crm/search">here</a>',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'search',
],
},
},
options: [
{
displayName: 'Direction',
name: 'direction',
type: 'options',
options: [
{
name: 'ASC',
value: 'ASCENDING',
},
{
name: 'DESC',
value: 'DESCENDING',
},
],
default: 'DESCENDING',
description: 'Defines the direction in which search results are ordered. Default value is DESC.',
},
{
displayName: 'Fields',
name: 'properties',
type: 'multiOptions',
typeOptions: {
loadOptionsMethod: 'getContactProperties',
},
default: [
'firstname',
'lastname',
'email',
],
description: '<p>Used to include specific company properties in the results. By default, the results will only include company ID and will not include the values for any properties for your company.</p><p>Including this parameter will include the data for the specified property in the results. You can include this parameter multiple times to request multiple properties separated by a comma: <code>,</code>.</p>',
},
{
displayName: 'Query',
name: 'query',
type: 'string',
default: '',
description: 'Perform a text search against all property values for an object type',
},
{
displayName: 'Sort By',
name: 'sortBy',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getContactProperties',
},
default: 'createdate',
},
],
},
];