refactor: Format nodes-base package (A-F) (#3800)

* 🔨 prettier formated nodes - A

* 🔨 prettier formated nodes - B

*  prettier formated nodes - C

*  prettier formated nodes - D

*  prettier formated nodes - E-F

* 🎨 Adjust nodes-base formatting command (#3805)

* Format additional files in nodes A-F (#3811)

*  fixes

* 🎨 Add Mindee to ignored dirs

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
Michael Kret
2022-08-01 23:47:55 +03:00
committed by GitHub
parent 2c17e6f3ca
commit 0ecbb4a19d
411 changed files with 12906 additions and 20148 deletions

View File

@@ -1,6 +1,4 @@
import {
IExecuteFunctions,
} from 'n8n-core';
import { IExecuteFunctions } from 'n8n-core';
import {
IDataObject,
@@ -40,16 +38,9 @@ import {
taskOperations,
} from './descriptions';
import {
FreshworksConfigResponse,
LoadedCurrency,
LoadedUser,
LoadOption,
} from './types';
import { FreshworksConfigResponse, LoadedCurrency, LoadedUser, LoadOption } from './types';
import {
tz,
} from 'moment-timezone';
import { tz } from 'moment-timezone';
export class FreshworksCrm implements INodeType {
description: INodeTypeDescription = {
@@ -136,7 +127,11 @@ export class FreshworksCrm implements INodeType {
loadOptions: {
async getAccounts(this: ILoadOptionsFunctions) {
const viewId = await getAllItemsViewId.call(this, { fromLoadOptions: true });
const responseData = await handleListing.call(this, 'GET', `/sales_accounts/view/${viewId}`);
const responseData = await handleListing.call(
this,
'GET',
`/sales_accounts/view/${viewId}`,
);
return responseData.map(({ name, id }) => ({ name, value: id })) as LoadOption[];
},
@@ -165,9 +160,11 @@ export class FreshworksCrm implements INodeType {
},
async getCurrencies(this: ILoadOptionsFunctions) {
const response = await freshworksCrmApiRequest.call(
this, 'GET', '/selector/currencies',
) as FreshworksConfigResponse<LoadedCurrency>;
const response = (await freshworksCrmApiRequest.call(
this,
'GET',
'/selector/currencies',
)) as FreshworksConfigResponse<LoadedCurrency>;
const key = Object.keys(response)[0];
@@ -224,16 +221,17 @@ export class FreshworksCrm implements INodeType {
return await loadResource.call(this, 'territories');
},
async getUsers(this: ILoadOptionsFunctions) { // for attendees, owners, and creators
const response = await freshworksCrmApiRequest.call(
this, 'GET', `/selector/owners`,
) as FreshworksConfigResponse<LoadedUser>;
async getUsers(this: ILoadOptionsFunctions) {
// for attendees, owners, and creators
const response = (await freshworksCrmApiRequest.call(
this,
'GET',
`/selector/owners`,
)) as FreshworksConfigResponse<LoadedUser>;
const key = Object.keys(response)[0];
return response[key].map(
({ display_name, id }) => ({ name: display_name, value: id }),
);
return response[key].map(({ display_name, id }) => ({ name: display_name, value: id }));
},
},
};
@@ -249,11 +247,8 @@ export class FreshworksCrm implements INodeType {
let responseData;
for (let i = 0; i < items.length; i++) {
try {
if (resource === 'account') {
// **********************************************************************
// account
// **********************************************************************
@@ -261,7 +256,6 @@ export class FreshworksCrm implements INodeType {
// https://developers.freshworks.com/crm/api/#accounts
if (operation === 'create') {
// ----------------------------------------
// account: create
// ----------------------------------------
@@ -278,11 +272,14 @@ export class FreshworksCrm implements INodeType {
Object.assign(body, additionalFields);
}
responseData = await freshworksCrmApiRequest.call(this, 'POST', '/sales_accounts', body);
responseData = await freshworksCrmApiRequest.call(
this,
'POST',
'/sales_accounts',
body,
);
responseData = responseData.sales_account;
} else if (operation === 'delete') {
// ----------------------------------------
// account: delete
// ----------------------------------------
@@ -294,9 +291,7 @@ export class FreshworksCrm implements INodeType {
const endpoint = `/sales_accounts/${accountId}`;
await freshworksCrmApiRequest.call(this, 'DELETE', endpoint);
responseData = { success: true };
} else if (operation === 'get') {
// ----------------------------------------
// account: get
// ----------------------------------------
@@ -308,9 +303,7 @@ export class FreshworksCrm implements INodeType {
const endpoint = `/sales_accounts/${accountId}`;
responseData = await freshworksCrmApiRequest.call(this, 'GET', endpoint);
responseData = responseData.sales_account;
} else if (operation === 'getAll') {
// ----------------------------------------
// account: getAll
// ----------------------------------------
@@ -320,9 +313,7 @@ export class FreshworksCrm implements INodeType {
const view = this.getNodeParameter('view', i) as string;
responseData = await handleListing.call(this, 'GET', `/sales_accounts/view/${view}`);
} else if (operation === 'update') {
// ----------------------------------------
// account: update
// ----------------------------------------
@@ -343,11 +334,8 @@ export class FreshworksCrm implements INodeType {
const endpoint = `/sales_accounts/${accountId}`;
responseData = await freshworksCrmApiRequest.call(this, 'PUT', endpoint, body);
responseData = responseData.sales_account;
}
} else if (resource === 'appointment') {
// **********************************************************************
// appointment
// **********************************************************************
@@ -355,7 +343,6 @@ export class FreshworksCrm implements INodeType {
// https://developers.freshworks.com/crm/api/#appointments
if (operation === 'create') {
// ----------------------------------------
// appointment: create
// ----------------------------------------
@@ -369,7 +356,9 @@ export class FreshworksCrm implements INodeType {
const startDate = this.getNodeParameter('fromDate', i) as string;
const endDate = this.getNodeParameter('endDate', i) as string;
const attendees = this.getNodeParameter('attendees.attendee', i, []) as [{ type: string, contactId: string, userId: string }];
const attendees = this.getNodeParameter('attendees.attendee', i, []) as [
{ type: string; contactId: string; userId: string },
];
const timezone = additionalFields.time_zone ?? defaultTimezone;
@@ -385,7 +374,7 @@ export class FreshworksCrm implements INodeType {
const body = {
title: this.getNodeParameter('title', i),
from_date: start.format(),
end_date: (allDay) ? start.format() : end.format(),
end_date: allDay ? start.format() : end.format(),
} as IDataObject;
Object.assign(body, additionalFields);
@@ -395,9 +384,7 @@ export class FreshworksCrm implements INodeType {
}
responseData = await freshworksCrmApiRequest.call(this, 'POST', '/appointments', body);
responseData = responseData.appointment;
} else if (operation === 'delete') {
// ----------------------------------------
// appointment: delete
// ----------------------------------------
@@ -409,9 +396,7 @@ export class FreshworksCrm implements INodeType {
const endpoint = `/appointments/${appointmentId}`;
await freshworksCrmApiRequest.call(this, 'DELETE', endpoint);
responseData = { success: true };
} else if (operation === 'get') {
// ----------------------------------------
// appointment: get
// ----------------------------------------
@@ -423,9 +408,7 @@ export class FreshworksCrm implements INodeType {
const endpoint = `/appointments/${appointmentId}`;
responseData = await freshworksCrmApiRequest.call(this, 'GET', endpoint);
responseData = responseData.appointment;
} else if (operation === 'getAll') {
// ----------------------------------------
// appointment: getAll
// ----------------------------------------
@@ -447,9 +430,7 @@ export class FreshworksCrm implements INodeType {
qs.include = include;
}
responseData = await handleListing.call(this, 'GET', '/appointments', {}, qs);
} else if (operation === 'update') {
// ----------------------------------------
// appointment: update
// ----------------------------------------
@@ -462,7 +443,9 @@ export class FreshworksCrm implements INodeType {
time_zone: string;
};
const attendees = this.getNodeParameter('updateFields.attendees.attendee', i, []) as [{ type: string, contactId: string, userId: string }];
const attendees = this.getNodeParameter('updateFields.attendees.attendee', i, []) as [
{ type: string; contactId: string; userId: string },
];
if (!Object.keys(updateFields).length) {
throwOnEmptyUpdate.call(this, resource);
@@ -493,11 +476,8 @@ export class FreshworksCrm implements INodeType {
const endpoint = `/appointments/${appointmentId}`;
responseData = await freshworksCrmApiRequest.call(this, 'PUT', endpoint, body);
responseData = responseData.appointment;
}
} else if (resource === 'contact') {
// **********************************************************************
// contact
// **********************************************************************
@@ -505,7 +485,6 @@ export class FreshworksCrm implements INodeType {
// https://developers.freshworks.com/crm/api/#contacts
if (operation === 'create') {
// ----------------------------------------
// contact: create
// ----------------------------------------
@@ -526,9 +505,7 @@ export class FreshworksCrm implements INodeType {
responseData = await freshworksCrmApiRequest.call(this, 'POST', '/contacts', body);
responseData = responseData.contact;
} else if (operation === 'delete') {
// ----------------------------------------
// contact: delete
// ----------------------------------------
@@ -540,9 +517,7 @@ export class FreshworksCrm implements INodeType {
const endpoint = `/contacts/${contactId}`;
await freshworksCrmApiRequest.call(this, 'DELETE', endpoint);
responseData = { success: true };
} else if (operation === 'get') {
// ----------------------------------------
// contact: get
// ----------------------------------------
@@ -554,9 +529,7 @@ export class FreshworksCrm implements INodeType {
const endpoint = `/contacts/${contactId}`;
responseData = await freshworksCrmApiRequest.call(this, 'GET', endpoint);
responseData = responseData.contact;
} else if (operation === 'getAll') {
// ----------------------------------------
// contact: getAll
// ----------------------------------------
@@ -566,9 +539,7 @@ export class FreshworksCrm implements INodeType {
const view = this.getNodeParameter('view', i) as string;
responseData = await handleListing.call(this, 'GET', `/contacts/view/${view}`);
} else if (operation === 'update') {
// ----------------------------------------
// contact: update
// ----------------------------------------
@@ -589,11 +560,8 @@ export class FreshworksCrm implements INodeType {
const endpoint = `/contacts/${contactId}`;
responseData = await freshworksCrmApiRequest.call(this, 'PUT', endpoint, body);
responseData = responseData.contact;
}
} else if (resource === 'deal') {
// **********************************************************************
// deal
// **********************************************************************
@@ -601,7 +569,6 @@ export class FreshworksCrm implements INodeType {
// https://developers.freshworks.com/crm/api/#deals
if (operation === 'create') {
// ----------------------------------------
// deal: create
// ----------------------------------------
@@ -621,9 +588,7 @@ export class FreshworksCrm implements INodeType {
responseData = await freshworksCrmApiRequest.call(this, 'POST', '/deals', body);
responseData = responseData.deal;
} else if (operation === 'delete') {
// ----------------------------------------
// deal: delete
// ----------------------------------------
@@ -634,9 +599,7 @@ export class FreshworksCrm implements INodeType {
await freshworksCrmApiRequest.call(this, 'DELETE', `/deals/${dealId}`);
responseData = { success: true };
} else if (operation === 'get') {
// ----------------------------------------
// deal: get
// ----------------------------------------
@@ -647,9 +610,7 @@ export class FreshworksCrm implements INodeType {
responseData = await freshworksCrmApiRequest.call(this, 'GET', `/deals/${dealId}`);
responseData = responseData.deal;
} else if (operation === 'getAll') {
// ----------------------------------------
// deal: getAll
// ----------------------------------------
@@ -659,9 +620,7 @@ export class FreshworksCrm implements INodeType {
const view = this.getNodeParameter('view', i) as string;
responseData = await handleListing.call(this, 'GET', `/deals/view/${view}`);
} else if (operation === 'update') {
// ----------------------------------------
// deal: update
// ----------------------------------------
@@ -679,13 +638,15 @@ export class FreshworksCrm implements INodeType {
const dealId = this.getNodeParameter('dealId', i);
responseData = await freshworksCrmApiRequest.call(this, 'PUT', `/deals/${dealId}`, body);
responseData = await freshworksCrmApiRequest.call(
this,
'PUT',
`/deals/${dealId}`,
body,
);
responseData = responseData.deal;
}
} else if (resource === 'note') {
// **********************************************************************
// note
// **********************************************************************
@@ -693,7 +654,6 @@ export class FreshworksCrm implements INodeType {
// https://developers.freshworks.com/crm/api/#notes
if (operation === 'create') {
// ----------------------------------------
// note: create
// ----------------------------------------
@@ -708,9 +668,7 @@ export class FreshworksCrm implements INodeType {
responseData = await freshworksCrmApiRequest.call(this, 'POST', '/notes', body);
responseData = responseData.note;
} else if (operation === 'delete') {
// ----------------------------------------
// note: delete
// ----------------------------------------
@@ -721,9 +679,7 @@ export class FreshworksCrm implements INodeType {
await freshworksCrmApiRequest.call(this, 'DELETE', `/notes/${noteId}`);
responseData = { success: true };
} else if (operation === 'update') {
// ----------------------------------------
// note: update
// ----------------------------------------
@@ -741,13 +697,15 @@ export class FreshworksCrm implements INodeType {
const noteId = this.getNodeParameter('noteId', i);
responseData = await freshworksCrmApiRequest.call(this, 'PUT', `/notes/${noteId}`, body);
responseData = await freshworksCrmApiRequest.call(
this,
'PUT',
`/notes/${noteId}`,
body,
);
responseData = responseData.note;
}
} else if (resource === 'salesActivity') {
// **********************************************************************
// salesActivity
// **********************************************************************
@@ -755,7 +713,6 @@ export class FreshworksCrm implements INodeType {
// https://developers.freshworks.com/crm/api/#sales-activities
if (operation === 'create') {
// ----------------------------------------
// salesActivity: create
// ----------------------------------------
@@ -781,11 +738,11 @@ export class FreshworksCrm implements INodeType {
Object.assign(body, additionalFields);
}
responseData = await freshworksCrmApiRequest.call(this, 'POST', '/sales_activities', { sales_activity: body });
responseData = await freshworksCrmApiRequest.call(this, 'POST', '/sales_activities', {
sales_activity: body,
});
responseData = responseData.sales_activity;
} else if (operation === 'delete') {
// ----------------------------------------
// salesActivity: delete
// ----------------------------------------
@@ -797,9 +754,7 @@ export class FreshworksCrm implements INodeType {
const endpoint = `/sales_activities/${salesActivityId}`;
await freshworksCrmApiRequest.call(this, 'DELETE', endpoint);
responseData = { success: true };
} else if (operation === 'get') {
// ----------------------------------------
// salesActivity: get
// ----------------------------------------
@@ -811,9 +766,7 @@ export class FreshworksCrm implements INodeType {
const endpoint = `/sales_activities/${salesActivityId}`;
responseData = await freshworksCrmApiRequest.call(this, 'GET', endpoint);
responseData = responseData.sales_activity;
} else if (operation === 'getAll') {
// ----------------------------------------
// salesActivity: getAll
// ----------------------------------------
@@ -821,9 +774,7 @@ export class FreshworksCrm implements INodeType {
// https://developers.freshworks.com/crm/api/#list_all_sales_activities
responseData = await handleListing.call(this, 'GET', '/sales_activities');
} else if (operation === 'update') {
// ----------------------------------------
// salesActivity: update
// ----------------------------------------
@@ -860,11 +811,8 @@ export class FreshworksCrm implements INodeType {
const endpoint = `/sales_activities/${salesActivityId}`;
responseData = await freshworksCrmApiRequest.call(this, 'PUT', endpoint, body);
responseData = responseData.sales_activity;
}
} else if (resource === 'search') {
// **********************************************************************
// search
// **********************************************************************
@@ -896,8 +844,8 @@ export class FreshworksCrm implements INodeType {
if (operation === 'lookup') {
// https://developers.freshworks.com/crm/api/#lookup_search
let searchField = this.getNodeParameter('searchField', i) as string;
let fieldValue = this.getNodeParameter('fieldValue', i, '') as string;
let entities = this.getNodeParameter('options.entities', i) as string;
let fieldValue = this.getNodeParameter('fieldValue', i, '') as string;
let entities = this.getNodeParameter('options.entities', i) as string;
if (Array.isArray(entities)) {
entities = entities.join(',');
}
@@ -916,7 +864,6 @@ export class FreshworksCrm implements INodeType {
responseData = await freshworksCrmApiRequest.call(this, 'GET', '/lookup', {}, qs);
}
} else if (resource === 'task') {
// **********************************************************************
// task
// **********************************************************************
@@ -924,7 +871,6 @@ export class FreshworksCrm implements INodeType {
// https://developers.freshworks.com/crm/api/#tasks
if (operation === 'create') {
// ----------------------------------------
// task: create
// ----------------------------------------
@@ -949,9 +895,7 @@ export class FreshworksCrm implements INodeType {
responseData = await freshworksCrmApiRequest.call(this, 'POST', '/tasks', body);
responseData = responseData.task;
} else if (operation === 'delete') {
// ----------------------------------------
// task: delete
// ----------------------------------------
@@ -962,9 +906,7 @@ export class FreshworksCrm implements INodeType {
await freshworksCrmApiRequest.call(this, 'DELETE', `/tasks/${taskId}`);
responseData = { success: true };
} else if (operation === 'get') {
// ----------------------------------------
// task: get
// ----------------------------------------
@@ -975,9 +917,7 @@ export class FreshworksCrm implements INodeType {
responseData = await freshworksCrmApiRequest.call(this, 'GET', `/tasks/${taskId}`);
responseData = responseData.task;
} else if (operation === 'getAll') {
// ----------------------------------------
// task: getAll
// ----------------------------------------
@@ -1002,9 +942,7 @@ export class FreshworksCrm implements INodeType {
}
responseData = await handleListing.call(this, 'GET', '/tasks', {}, qs);
} else if (operation === 'update') {
// ----------------------------------------
// task: update
// ----------------------------------------
@@ -1030,13 +968,15 @@ export class FreshworksCrm implements INodeType {
const taskId = this.getNodeParameter('taskId', i);
responseData = await freshworksCrmApiRequest.call(this, 'PUT', `/tasks/${taskId}`, body);
responseData = await freshworksCrmApiRequest.call(
this,
'PUT',
`/tasks/${taskId}`,
body,
);
responseData = responseData.task;
}
}
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ json: { error: error.message } });
@@ -1048,7 +988,6 @@ export class FreshworksCrm implements INodeType {
Array.isArray(responseData)
? returnData.push(...responseData)
: returnData.push(responseData);
}
return [this.helpers.returnJsonArray(returnData)];

View File

@@ -1,17 +1,8 @@
import {
IExecuteFunctions,
} from 'n8n-core';
import { IExecuteFunctions } from 'n8n-core';
import {
IDataObject,
ILoadOptionsFunctions,
NodeApiError,
NodeOperationError,
} from 'n8n-workflow';
import { IDataObject, ILoadOptionsFunctions, NodeApiError, NodeOperationError } from 'n8n-workflow';
import {
OptionsWithUri,
} from 'request';
import { OptionsWithUri } from 'request';
import {
FreshworksConfigResponse,
@@ -20,9 +11,7 @@ import {
ViewsResponse,
} from './types';
import {
omit,
} from 'lodash';
import { omit } from 'lodash';
export async function freshworksCrmApiRequest(
this: IExecuteFunctions | ILoadOptionsFunctions,
@@ -31,7 +20,7 @@ export async function freshworksCrmApiRequest(
body: IDataObject = {},
qs: IDataObject = {},
) {
const { domain } = await this.getCredentials('freshworksCrmApi') as FreshworksCrmApiCredentials;
const { domain } = (await this.getCredentials('freshworksCrmApi')) as FreshworksCrmApiCredentials;
const options: OptionsWithUri = {
method,
@@ -71,9 +60,13 @@ export async function getAllItemsViewId(
keyword = 'My Deals'; // no 'All Deals' available
}
const response = await freshworksCrmApiRequest.call(this, 'GET', `/${resource}s/filters`) as ViewsResponse;
const response = (await freshworksCrmApiRequest.call(
this,
'GET',
`/${resource}s/filters`,
)) as ViewsResponse;
const view = response.filters.find(v => v.name.includes(keyword));
const view = response.filters.find((v) => v.name.includes(keyword));
if (!view) {
throw new NodeOperationError(this.getNode(), 'Failed to get all items view');
@@ -99,9 +92,7 @@ export async function freshworksCrmApiRequestAllItems(
const key = Object.keys(response)[0];
returnData.push(...response[key]);
qs.page++;
} while (
response.meta.total_pages && qs.page <= response.meta.total_pages
);
} while (response.meta.total_pages && qs.page <= response.meta.total_pages);
return returnData;
}
@@ -132,19 +123,18 @@ export async function handleListing(
*
* See: https://developers.freshworks.com/crm/api/#admin_configuration
*/
export async function loadResource(
this: ILoadOptionsFunctions,
resource: string,
) {
const response = await freshworksCrmApiRequest.call(
this, 'GET', `/selector/${resource}`,
) as FreshworksConfigResponse<LoadedResource>;
export async function loadResource(this: ILoadOptionsFunctions, resource: string) {
const response = (await freshworksCrmApiRequest.call(
this,
'GET',
`/selector/${resource}`,
)) as FreshworksConfigResponse<LoadedResource>;
const key = Object.keys(response)[0];
return response[key].map(({ name, id }) => ({ name, value: id }));
}
export function adjustAttendees(attendees: [{ type: string, contactId: string, userId: string }]) {
export function adjustAttendees(attendees: [{ type: string; contactId: string; userId: string }]) {
return attendees.map((attendee) => {
if (attendee.type === 'contact') {
return {
@@ -160,7 +150,6 @@ export function adjustAttendees(attendees: [{ type: string, contactId: string, u
});
}
// /**
// * Adjust attendee data from n8n UI to the format expected by Freshworks CRM API.
// */
@@ -181,7 +170,7 @@ export function adjustAttendees(attendees: [{ type: string, contactId: string, u
export function adjustAccounts(additionalFields: IDataObject & SalesAccounts) {
if (!additionalFields?.sales_accounts) return additionalFields;
const adjusted = additionalFields.sales_accounts.map(accountId => {
const adjusted = additionalFields.sales_accounts.map((accountId) => {
return { id: accountId, is_primary: false };
});
@@ -193,21 +182,13 @@ export function adjustAccounts(additionalFields: IDataObject & SalesAccounts) {
};
}
export function throwOnEmptyUpdate(
this: IExecuteFunctions,
resource: string,
) {
export function throwOnEmptyUpdate(this: IExecuteFunctions, resource: string) {
throw new NodeOperationError(
this.getNode(),
`Please enter at least one field to update for the ${resource}.`,
);
}
export function throwOnEmptyFilter(
this: IExecuteFunctions,
) {
throw new NodeOperationError(
this.getNode(),
`Please select at least one filter.`,
);
export function throwOnEmptyFilter(this: IExecuteFunctions) {
throw new NodeOperationError(this.getNode(), `Please select at least one filter.`);
}

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const accountOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const accountOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'account',
],
resource: ['account'],
},
},
options: [
@@ -64,12 +60,8 @@ export const accountFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'account',
],
operation: [
'create',
],
resource: ['account'],
operation: ['create'],
},
},
},
@@ -81,12 +73,8 @@ export const accountFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'account',
],
operation: [
'create',
],
resource: ['account'],
operation: ['create'],
},
},
options: [
@@ -112,7 +100,8 @@ export const accountFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getBusinessTypes',
},
description: 'ID of the business that the account belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the business that the account belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'City',
@@ -143,7 +132,8 @@ export const accountFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getIndustryTypes',
},
description: 'ID of the industry that the account belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the industry that the account belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'LinkedIn',
@@ -167,7 +157,8 @@ export const accountFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user to whom the account is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user to whom the account is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Parent Sales Account ID',
@@ -198,7 +189,8 @@ export const accountFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getTerritories',
},
description: 'ID of the territory that the account belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the territory that the account belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Twitter',
@@ -236,12 +228,8 @@ export const accountFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'account',
],
operation: [
'delete',
],
resource: ['account'],
operation: ['delete'],
},
},
},
@@ -258,12 +246,8 @@ export const accountFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'account',
],
operation: [
'get',
],
resource: ['account'],
operation: ['get'],
},
},
},
@@ -275,19 +259,16 @@ export const accountFields: INodeProperties[] = [
displayName: 'View Name or ID',
name: 'view',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
required: true,
typeOptions: {
loadOptionsMethod: 'getAccountViews',
},
displayOptions: {
show: {
resource: [
'account',
],
operation: [
'getAll',
],
resource: ['account'],
operation: ['getAll'],
},
},
default: '',
@@ -300,12 +281,8 @@ export const accountFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'account',
],
operation: [
'getAll',
],
resource: ['account'],
operation: ['getAll'],
},
},
},
@@ -320,15 +297,9 @@ export const accountFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'account',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['account'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -345,12 +316,8 @@ export const accountFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'account',
],
operation: [
'update',
],
resource: ['account'],
operation: ['update'],
},
},
},
@@ -362,12 +329,8 @@ export const accountFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'account',
],
operation: [
'update',
],
resource: ['account'],
operation: ['update'],
},
},
options: [
@@ -393,7 +356,8 @@ export const accountFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getBusinessTypes',
},
description: 'ID of the business that the account belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the business that the account belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'City',
@@ -424,7 +388,8 @@ export const accountFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getIndustryTypes',
},
description: 'ID of the industry that the account belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the industry that the account belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'LinkedIn',
@@ -455,7 +420,8 @@ export const accountFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user to whom the account is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user to whom the account is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Parent Sales Account ID',
@@ -486,7 +452,8 @@ export const accountFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getTerritories',
},
description: 'ID of the territory that the account belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the territory that the account belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Twitter',

View File

@@ -1,10 +1,6 @@
import {
tz,
} from 'moment-timezone';
import { tz } from 'moment-timezone';
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const appointmentOperations: INodeProperties[] = [
{
@@ -14,9 +10,7 @@ export const appointmentOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'appointment',
],
resource: ['appointment'],
},
},
options: [
@@ -68,48 +62,38 @@ export const appointmentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'appointment',
],
operation: [
'create',
],
resource: ['appointment'],
operation: ['create'],
},
},
},
{
displayName: 'Start Date',
name: 'fromDate',
description: 'Timestamp that denotes the start of appointment. Start date if this is an all-day appointment.',
description:
'Timestamp that denotes the start of appointment. Start date if this is an all-day appointment.',
type: 'dateTime',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'appointment',
],
operation: [
'create',
],
resource: ['appointment'],
operation: ['create'],
},
},
},
{
displayName: 'End Date',
name: 'endDate',
description: 'Timestamp that denotes the end of appointment. End date if this is an all-day appointment.',
description:
'Timestamp that denotes the end of appointment. End date if this is an all-day appointment.',
type: 'dateTime',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'appointment',
],
operation: [
'create',
],
resource: ['appointment'],
operation: ['create'],
},
},
},
@@ -122,12 +106,8 @@ export const appointmentFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'appointment',
],
operation: [
'create',
],
resource: ['appointment'],
operation: ['create'],
},
},
placeholder: 'Add Attendee',
@@ -157,12 +137,11 @@ export const appointmentFields: INodeProperties[] = [
displayName: 'User Name or ID',
name: 'userId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
displayOptions: {
show: {
type: [
'user',
],
type: ['user'],
},
},
typeOptions: {
@@ -175,9 +154,7 @@ export const appointmentFields: INodeProperties[] = [
name: 'contactId',
displayOptions: {
show: {
type: [
'contact',
],
type: ['contact'],
},
},
type: 'string',
@@ -195,12 +172,8 @@ export const appointmentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'appointment',
],
operation: [
'create',
],
resource: ['appointment'],
operation: ['create'],
},
},
options: [
@@ -212,7 +185,8 @@ export const appointmentFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user who created the appointment. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user who created the appointment. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Is All-Day',
@@ -250,7 +224,8 @@ export const appointmentFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getOutcomes',
},
description: 'ID of outcome of Appointment sales activity type. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of outcome of Appointment sales activity type. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Target ID',
@@ -285,7 +260,7 @@ export const appointmentFields: INodeProperties[] = [
type: 'options',
default: '',
description: 'Timezone that the appointment is scheduled in',
options: tz.names().map(tz => ({ name: tz, value: tz })),
options: tz.names().map((tz) => ({ name: tz, value: tz })),
},
],
},
@@ -302,12 +277,8 @@ export const appointmentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'appointment',
],
operation: [
'delete',
],
resource: ['appointment'],
operation: ['delete'],
},
},
},
@@ -324,12 +295,8 @@ export const appointmentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'appointment',
],
operation: [
'get',
],
resource: ['appointment'],
operation: ['get'],
},
},
},
@@ -345,12 +312,8 @@ export const appointmentFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'appointment',
],
operation: [
'getAll',
],
resource: ['appointment'],
operation: ['getAll'],
},
},
},
@@ -365,15 +328,9 @@ export const appointmentFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'appointment',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['appointment'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -385,12 +342,8 @@ export const appointmentFields: INodeProperties[] = [
placeholder: 'Add Filter',
displayOptions: {
show: {
resource: [
'appointment',
],
operation: [
'getAll',
],
resource: ['appointment'],
operation: ['getAll'],
},
},
options: [
@@ -445,12 +398,8 @@ export const appointmentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'appointment',
],
operation: [
'update',
],
resource: ['appointment'],
operation: ['update'],
},
},
},
@@ -462,12 +411,8 @@ export const appointmentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'appointment',
],
operation: [
'update',
],
resource: ['appointment'],
operation: ['update'],
},
},
options: [
@@ -505,12 +450,11 @@ export const appointmentFields: INodeProperties[] = [
displayName: 'User Name or ID',
name: 'userId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
displayOptions: {
show: {
type: [
'user',
],
type: ['user'],
},
},
typeOptions: {
@@ -523,9 +467,7 @@ export const appointmentFields: INodeProperties[] = [
name: 'contactId',
displayOptions: {
show: {
type: [
'contact',
],
type: ['contact'],
},
},
type: 'string',
@@ -543,12 +485,14 @@ export const appointmentFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user who created the appointment. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user who created the appointment. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'End Date',
name: 'endDate',
description: 'Timestamp that denotes the end of appointment. End date if this is an all-day appointment.',
description:
'Timestamp that denotes the end of appointment. End date if this is an all-day appointment.',
type: 'dateTime',
default: '',
},
@@ -588,12 +532,14 @@ export const appointmentFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getOutcomes',
},
description: 'ID of outcome of Appointment sales activity type. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of outcome of Appointment sales activity type. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Start Date',
name: 'fromDate',
description: 'Timestamp that denotes the start of appointment. Start date if this is an all-day appointment.',
description:
'Timestamp that denotes the start of appointment. Start date if this is an all-day appointment.',
type: 'dateTime',
default: '',
},
@@ -630,7 +576,7 @@ export const appointmentFields: INodeProperties[] = [
type: 'options',
default: '',
description: 'Timezone that the appointment is scheduled in',
options: tz.names().map(tz => ({ name: tz, value: tz })),
options: tz.names().map((tz) => ({ name: tz, value: tz })),
},
{
displayName: 'Title',

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const contactOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const contactOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'contact',
],
resource: ['contact'],
},
},
options: [
@@ -64,12 +60,8 @@ export const contactFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'create',
],
resource: ['contact'],
operation: ['create'],
},
},
},
@@ -82,12 +74,8 @@ export const contactFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'create',
],
resource: ['contact'],
operation: ['create'],
},
},
},
@@ -100,12 +88,8 @@ export const contactFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'create',
],
resource: ['contact'],
operation: ['create'],
},
},
},
@@ -117,12 +101,8 @@ export const contactFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'create',
],
resource: ['contact'],
operation: ['create'],
},
},
options: [
@@ -141,7 +121,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getCampaigns',
},
description: 'ID of the campaign that led your contact to your webapp. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the campaign that led your contact to your webapp. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'City',
@@ -158,7 +139,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getContactStatuses',
},
description: 'ID of the contact status that the contact belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the contact status that the contact belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Country',
@@ -210,7 +192,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getLifecycleStages',
},
description: 'ID of the lifecycle stage that the contact belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the lifecycle stage that the contact belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'LinkedIn',
@@ -241,7 +224,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user to whom the contact is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user to whom the contact is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Sales Account Names or IDs',
@@ -251,7 +235,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getAccounts',
},
description: 'Accounts which contact belongs to. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Accounts which contact belongs to. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'State',
@@ -282,7 +267,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getTerritories',
},
description: 'ID of the territory that the contact belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the territory that the contact belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Time Zone',
@@ -327,12 +313,8 @@ export const contactFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'delete',
],
resource: ['contact'],
operation: ['delete'],
},
},
},
@@ -349,12 +331,8 @@ export const contactFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'get',
],
resource: ['contact'],
operation: ['get'],
},
},
},
@@ -366,15 +344,12 @@ export const contactFields: INodeProperties[] = [
displayName: 'View Name or ID',
name: 'view',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'getAll',
],
resource: ['contact'],
operation: ['getAll'],
},
},
typeOptions: {
@@ -390,12 +365,8 @@ export const contactFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'getAll',
],
resource: ['contact'],
operation: ['getAll'],
},
},
},
@@ -410,15 +381,9 @@ export const contactFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['contact'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -435,12 +400,8 @@ export const contactFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'update',
],
resource: ['contact'],
operation: ['update'],
},
},
},
@@ -452,12 +413,8 @@ export const contactFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'update',
],
resource: ['contact'],
operation: ['update'],
},
},
options: [
@@ -476,7 +433,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getCampaigns',
},
description: 'ID of the campaign that led your contact to your webapp. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the campaign that led your contact to your webapp. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'City',
@@ -493,7 +451,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getContactStatuses',
},
description: 'ID of the contact status that the contact belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the contact status that the contact belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Country',
@@ -552,7 +511,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getLeadSources',
},
description: 'ID of the source where contact came from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the source where contact came from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Lifecycle Stage Name or ID',
@@ -562,7 +522,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getLifecycleStages',
},
description: 'ID of the lifecycle stage that the contact belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the lifecycle stage that the contact belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'LinkedIn',
@@ -593,7 +554,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user to whom the contact is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user to whom the contact is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Sales Account Names or IDs',
@@ -603,7 +565,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getAccounts',
},
description: 'Accounts which contact belongs to. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Accounts which contact belongs to. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'State',
@@ -620,7 +583,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getSubscriptionStatuses',
},
description: 'Status of subscription that the contact is in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Status of subscription that the contact is in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Subscription Types Name or ID',
@@ -630,7 +594,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getSubscriptionTypes',
},
description: 'Type of subscription that the contact is in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Type of subscription that the contact is in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Territory Name or ID',
@@ -640,7 +605,8 @@ export const contactFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getTerritories',
},
description: 'ID of the territory that the contact belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the territory that the contact belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Time Zone',

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const dealOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const dealOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'deal',
],
resource: ['deal'],
},
},
options: [
@@ -64,12 +60,8 @@ export const dealFields: INodeProperties[] = [
default: 0,
displayOptions: {
show: {
resource: [
'deal',
],
operation: [
'create',
],
resource: ['deal'],
operation: ['create'],
},
},
},
@@ -82,12 +74,8 @@ export const dealFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'deal',
],
operation: [
'create',
],
resource: ['deal'],
operation: ['create'],
},
},
},
@@ -99,12 +87,8 @@ export const dealFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'deal',
],
operation: [
'create',
],
resource: ['deal'],
operation: ['create'],
},
},
options: [
@@ -123,7 +107,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getCampaigns',
},
description: 'ID of the campaign that landed this deal. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the campaign that landed this deal. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Currency Name or ID',
@@ -133,7 +118,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getCurrencies',
},
description: 'ID of the currency that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the currency that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Deal Payment Status Name or ID',
@@ -143,7 +129,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getDealPaymentStatuses',
},
description: 'ID of the mode of payment for the deal. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the mode of payment for the deal. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Deal Pipeline Name or ID',
@@ -153,7 +140,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getDealPipelines',
},
description: 'ID of the deal pipeline that it belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the deal pipeline that it belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Deal Product Name or ID',
@@ -163,7 +151,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getDealProducts',
},
description: 'ID of the product that the deal belongs to (in a multi-product company). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the product that the deal belongs to (in a multi-product company). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Deal Reason Name or ID',
@@ -173,7 +162,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getDealReasons',
},
description: 'ID of the reason for losing the deal. Can only be set if the deal is in \'Lost\' stage. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the reason for losing the deal. Can only be set if the deal is in \'Lost\' stage. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Deal Stage Name or ID',
@@ -183,7 +173,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getDealStages',
},
description: 'ID of the deal stage that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the deal stage that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Deal Type Name or ID',
@@ -193,7 +184,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getDealTypes',
},
description: 'ID of the deal type that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the deal type that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Lead Source ID',
@@ -210,7 +202,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user to whom the deal is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user to whom the deal is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Probability',
@@ -231,7 +224,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getAccounts',
},
description: 'ID of the account that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the account that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Territory Name or ID',
@@ -241,7 +235,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getTerritories',
},
description: 'ID of the territory that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the territory that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
],
},
@@ -258,12 +253,8 @@ export const dealFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'deal',
],
operation: [
'delete',
],
resource: ['deal'],
operation: ['delete'],
},
},
},
@@ -280,12 +271,8 @@ export const dealFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'deal',
],
operation: [
'get',
],
resource: ['deal'],
operation: ['get'],
},
},
},
@@ -297,15 +284,12 @@ export const dealFields: INodeProperties[] = [
displayName: 'View Name or ID',
name: 'view',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
displayOptions: {
show: {
resource: [
'deal',
],
operation: [
'getAll',
],
resource: ['deal'],
operation: ['getAll'],
},
},
typeOptions: {
@@ -321,12 +305,8 @@ export const dealFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'deal',
],
operation: [
'getAll',
],
resource: ['deal'],
operation: ['getAll'],
},
},
},
@@ -341,15 +321,9 @@ export const dealFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'deal',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['deal'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -366,12 +340,8 @@ export const dealFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'deal',
],
operation: [
'update',
],
resource: ['deal'],
operation: ['update'],
},
},
},
@@ -383,12 +353,8 @@ export const dealFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'deal',
],
operation: [
'update',
],
resource: ['deal'],
operation: ['update'],
},
},
options: [
@@ -420,7 +386,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getCampaigns',
},
description: 'ID of the campaign that landed this deal. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the campaign that landed this deal. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Currency Name or ID',
@@ -430,7 +397,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getCurrencies',
},
description: 'ID of the currency that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the currency that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Deal Payment Status Name or ID',
@@ -440,7 +408,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getDealPaymentStatuses',
},
description: 'ID of the mode of payment for the deal. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the mode of payment for the deal. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Deal Pipeline Name or ID',
@@ -450,7 +419,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getDealPipelines',
},
description: 'ID of the deal pipeline that it belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the deal pipeline that it belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Deal Product Name or ID',
@@ -460,7 +430,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getDealProducts',
},
description: 'ID of the product that the deal belongs to (in a multi-product company). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the product that the deal belongs to (in a multi-product company). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Deal Reason Name or ID',
@@ -470,7 +441,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getDealReasons',
},
description: 'ID of the reason for losing the deal. Can only be set if the deal is in \'Lost\' stage. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the reason for losing the deal. Can only be set if the deal is in \'Lost\' stage. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Deal Stage Name or ID',
@@ -480,7 +452,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getDealStages',
},
description: 'ID of the deal stage that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the deal stage that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Deal Type Name or ID',
@@ -490,7 +463,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getDealTypes',
},
description: 'ID of the deal type that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the deal type that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Lead Source ID',
@@ -514,7 +488,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user to whom the deal is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user to whom the deal is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Probability',
@@ -535,7 +510,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getAccounts',
},
description: 'ID of the account that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the account that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Territory Name or ID',
@@ -545,7 +521,8 @@ export const dealFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getTerritories',
},
description: 'ID of the territory that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the territory that the deal belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
],
},

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const noteOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const noteOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'note',
],
resource: ['note'],
},
},
options: [
@@ -55,12 +51,8 @@ export const noteFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'create',
],
resource: ['note'],
operation: ['create'],
},
},
},
@@ -87,30 +79,23 @@ export const noteFields: INodeProperties[] = [
],
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'create',
],
resource: ['note'],
operation: ['create'],
},
},
},
{
displayName: 'Target ID',
name: 'targetable_id',
description: 'ID of the entity for which note is created. The type of entity is selected in "Target Type".',
description:
'ID of the entity for which note is created. The type of entity is selected in "Target Type".',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'create',
],
resource: ['note'],
operation: ['create'],
},
},
},
@@ -127,12 +112,8 @@ export const noteFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'delete',
],
resource: ['note'],
operation: ['delete'],
},
},
},
@@ -149,12 +130,8 @@ export const noteFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'update',
],
resource: ['note'],
operation: ['update'],
},
},
},
@@ -166,12 +143,8 @@ export const noteFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'update',
],
resource: ['note'],
operation: ['update'],
},
},
options: [

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const salesActivityOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const salesActivityOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'salesActivity',
],
resource: ['salesActivity'],
},
},
options: [
@@ -60,15 +56,12 @@ export const salesActivityFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getSalesActivityTypes',
},
description: 'ID of a sales activity type for which the sales activity is created. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of a sales activity type for which the sales activity is created. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'create',
],
resource: ['salesActivity'],
operation: ['create'],
},
},
},
@@ -81,19 +74,16 @@ export const salesActivityFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'create',
],
resource: ['salesActivity'],
operation: ['create'],
},
},
},
{
displayName: 'Owner Name or ID',
name: 'ownerId',
description: 'ID of the user who owns the sales activity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user who owns the sales activity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
type: 'options',
default: '',
typeOptions: {
@@ -102,12 +92,8 @@ export const salesActivityFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'create',
],
resource: ['salesActivity'],
operation: ['create'],
},
},
},
@@ -120,12 +106,8 @@ export const salesActivityFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'create',
],
resource: ['salesActivity'],
operation: ['create'],
},
},
},
@@ -138,12 +120,8 @@ export const salesActivityFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'create',
],
resource: ['salesActivity'],
operation: ['create'],
},
},
},
@@ -170,30 +148,23 @@ export const salesActivityFields: INodeProperties[] = [
],
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'create',
],
resource: ['salesActivity'],
operation: ['create'],
},
},
},
{
displayName: 'Target ID',
name: 'targetable_id',
description: 'ID of the entity for which the sales activity is created. The type of entity is selected in "Target Type".',
description:
'ID of the entity for which the sales activity is created. The type of entity is selected in "Target Type".',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'create',
],
resource: ['salesActivity'],
operation: ['create'],
},
},
},
@@ -205,12 +176,8 @@ export const salesActivityFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'create',
],
resource: ['salesActivity'],
operation: ['create'],
},
},
options: [
@@ -222,7 +189,8 @@ export const salesActivityFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user who created the sales activity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user who created the sales activity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Latitude',
@@ -260,7 +228,8 @@ export const salesActivityFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getOutcomes',
},
description: 'ID of a sales activity\'s outcome. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of a sales activity\'s outcome. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
],
},
@@ -277,12 +246,8 @@ export const salesActivityFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'delete',
],
resource: ['salesActivity'],
operation: ['delete'],
},
},
},
@@ -299,12 +264,8 @@ export const salesActivityFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'get',
],
resource: ['salesActivity'],
operation: ['get'],
},
},
},
@@ -320,12 +281,8 @@ export const salesActivityFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'getAll',
],
resource: ['salesActivity'],
operation: ['getAll'],
},
},
},
@@ -340,15 +297,9 @@ export const salesActivityFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['salesActivity'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -365,12 +316,8 @@ export const salesActivityFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'update',
],
resource: ['salesActivity'],
operation: ['update'],
},
},
},
@@ -382,12 +329,8 @@ export const salesActivityFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'salesActivity',
],
operation: [
'update',
],
resource: ['salesActivity'],
operation: ['update'],
},
},
options: [
@@ -399,7 +342,8 @@ export const salesActivityFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user who created the sales activity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user who created the sales activity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Start Date',
@@ -444,7 +388,8 @@ export const salesActivityFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user who owns the sales activity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user who owns the sales activity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Sales Activity Outcome Name or ID',
@@ -454,7 +399,8 @@ export const salesActivityFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getOutcomes',
},
description: 'ID of a sales activity\'s outcome. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of a sales activity\'s outcome. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Sales Activity Type Name or ID',
@@ -464,7 +410,8 @@ export const salesActivityFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getSalesActivityTypes',
},
description: 'ID of a sales activity type for which the sales activity is updated. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of a sales activity type for which the sales activity is updated. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Start Date',
@@ -478,7 +425,8 @@ export const salesActivityFields: INodeProperties[] = [
name: 'targetable_id',
type: 'string',
default: '',
description: 'ID of the entity for which the sales activity is updated. The type of entity is selected in "Target Type".',
description:
'ID of the entity for which the sales activity is updated. The type of entity is selected in "Target Type".',
},
{
displayName: 'Target Type',

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const searchOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const searchOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'search',
],
resource: ['search'],
},
},
options: [
@@ -45,12 +41,8 @@ export const searchFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'search',
],
operation: [
'query',
],
resource: ['search'],
operation: ['query'],
},
},
description: 'Enter a term that will be used for searching entities',
@@ -81,12 +73,8 @@ export const searchFields: INodeProperties[] = [
default: [],
displayOptions: {
show: {
resource: [
'search',
],
operation: [
'query',
],
resource: ['search'],
operation: ['query'],
},
},
description: 'Enter a term that will be used for searching entities',
@@ -98,12 +86,8 @@ export const searchFields: INodeProperties[] = [
default: false,
displayOptions: {
show: {
resource: [
'search',
],
operation: [
'query',
],
resource: ['search'],
operation: ['query'],
},
},
description: 'Whether to return all results or only up to a given limit',
@@ -118,15 +102,9 @@ export const searchFields: INodeProperties[] = [
default: 25,
displayOptions: {
show: {
resource: [
'search',
],
operation: [
'query',
],
returnAll: [
false,
],
resource: ['search'],
operation: ['query'],
returnAll: [false],
},
},
description: 'Max number of results to return',
@@ -150,19 +128,16 @@ export const searchFields: INodeProperties[] = [
{
name: 'Custom Field',
value: 'customField',
description: 'Only allowed custom fields of type "Text field", "Number", "Dropdown" or "Radio button"',
description:
'Only allowed custom fields of type "Text field", "Number", "Dropdown" or "Radio button"',
},
],
required: true,
default: '',
displayOptions: {
show: {
resource: [
'search',
],
operation: [
'lookup',
],
resource: ['search'],
operation: ['lookup'],
},
},
description: 'Field against which the entities have to be searched',
@@ -175,15 +150,9 @@ export const searchFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'search',
],
operation: [
'lookup',
],
searchField: [
'customField',
],
resource: ['search'],
operation: ['lookup'],
searchField: ['customField'],
},
},
},
@@ -195,15 +164,9 @@ export const searchFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'search',
],
operation: [
'lookup',
],
searchField: [
'customField',
],
resource: ['search'],
operation: ['lookup'],
searchField: ['customField'],
},
},
},
@@ -215,16 +178,9 @@ export const searchFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'search',
],
operation: [
'lookup',
],
searchField: [
'email',
'name',
],
resource: ['search'],
operation: ['lookup'],
searchField: ['email', 'name'],
},
},
},
@@ -236,12 +192,8 @@ export const searchFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'search',
],
operation: [
'lookup',
],
resource: ['search'],
operation: ['lookup'],
},
},
options: [
@@ -264,8 +216,8 @@ export const searchFields: INodeProperties[] = [
value: 'sales_account',
},
],
// eslint-disable-next-line n8n-nodes-base/node-param-description-unneeded-backticks
description: `Use 'entities' to query against related entities. You can include multiple entities at once, provided the field is available in both entities or else you'd receive an error response.`,
// eslint-disable-next-line n8n-nodes-base/node-param-description-unneeded-backticks
description: `Use 'entities' to query against related entities. You can include multiple entities at once, provided the field is available in both entities or else you'd receive an error response.`,
},
],
},

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const taskOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const taskOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'task',
],
resource: ['task'],
},
},
options: [
@@ -64,12 +60,8 @@ export const taskFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'create',
],
resource: ['task'],
operation: ['create'],
},
},
},
@@ -82,19 +74,16 @@ export const taskFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'create',
],
resource: ['task'],
operation: ['create'],
},
},
},
{
displayName: 'Owner Name or ID',
name: 'ownerId',
description: 'ID of the user to whom the task is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user to whom the task is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
type: 'options',
default: '',
typeOptions: {
@@ -103,12 +92,8 @@ export const taskFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'create',
],
resource: ['task'],
operation: ['create'],
},
},
},
@@ -135,30 +120,23 @@ export const taskFields: INodeProperties[] = [
],
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'create',
],
resource: ['task'],
operation: ['create'],
},
},
},
{
displayName: 'Target ID',
name: 'targetable_id',
description: 'ID of the entity for which the task is created. The type of entity is selected in "Target Type".',
description:
'ID of the entity for which the task is created. The type of entity is selected in "Target Type".',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'create',
],
resource: ['task'],
operation: ['create'],
},
},
},
@@ -170,12 +148,8 @@ export const taskFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'create',
],
resource: ['task'],
operation: ['create'],
},
},
options: [
@@ -187,7 +161,8 @@ export const taskFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user who created the task. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user who created the task. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Outcome Name or ID',
@@ -197,7 +172,8 @@ export const taskFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getOutcomes',
},
description: 'ID of the outcome of the task. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the outcome of the task. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Task Type ID',
@@ -221,12 +197,8 @@ export const taskFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'delete',
],
resource: ['task'],
operation: ['delete'],
},
},
},
@@ -243,12 +215,8 @@ export const taskFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'get',
],
resource: ['task'],
operation: ['get'],
},
},
},
@@ -264,12 +232,8 @@ export const taskFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'getAll',
],
resource: ['task'],
operation: ['getAll'],
},
},
},
@@ -284,15 +248,9 @@ export const taskFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['task'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -304,12 +262,8 @@ export const taskFields: INodeProperties[] = [
placeholder: 'Add Filter',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'getAll',
],
resource: ['task'],
operation: ['getAll'],
},
},
options: [
@@ -376,12 +330,8 @@ export const taskFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'update',
],
resource: ['task'],
operation: ['update'],
},
},
},
@@ -393,12 +343,8 @@ export const taskFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'update',
],
resource: ['task'],
operation: ['update'],
},
},
options: [
@@ -410,7 +356,8 @@ export const taskFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user who created the sales activity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user who created the sales activity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Due Date',
@@ -427,7 +374,8 @@ export const taskFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getOutcomes',
},
description: 'ID of the outcome of the task. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the outcome of the task. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Owner Name or ID',
@@ -437,14 +385,16 @@ export const taskFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getUsers',
},
description: 'ID of the user to whom the task is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user to whom the task is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Target ID',
name: 'targetable_id',
type: 'string',
default: '',
description: 'ID of the entity for which the task is updated. The type of entity is selected in "Target Type".',
description:
'ID of the entity for which the task is updated. The type of entity is selected in "Target Type".',
},
{
displayName: 'Target Type',

View File

@@ -1,7 +1,7 @@
export type FreshworksCrmApiCredentials = {
apiKey: string;
domain: string;
}
};
export type FreshworksConfigResponse<T> = {
[key: string]: T[];
@@ -29,7 +29,7 @@ export type SalesAccounts = {
export type ViewsResponse = {
filters: View[];
meta: object;
}
};
export type View = {
id: number;