refactor: Lint for no unneeded backticks (#5057) (no-changelog)

*  Create rule `no-unneeded-backticks`

* 👕 Enable rule

*  Run rule on `cli`

*  Run rule on `core`

*  Run rule on `workflow`

*  Rule rule on `design-system`

*  Run rule on `node-dev`

*  Run rule on `editor-ui`

*  Run rule on `nodes-base`
This commit is contained in:
Iván Ovejero
2022-12-29 12:20:43 +01:00
committed by GitHub
parent a7868ae77d
commit d9b98fc8be
239 changed files with 772 additions and 714 deletions

View File

@@ -402,7 +402,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'contacts';
}
endpoint = `/api/3/contacts`;
endpoint = '/api/3/contacts';
} else if (operation === 'update') {
// ----------------------------------
// contact:update
@@ -479,7 +479,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'accounts';
}
endpoint = `/api/3/accounts`;
endpoint = '/api/3/accounts';
const filters = this.getNodeParameter('filters', i);
Object.assign(qs, filters);
@@ -648,7 +648,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'lists';
}
endpoint = `/api/3/lists`;
endpoint = '/api/3/lists';
}
} else if (resource === 'tag') {
if (operation === 'create') {
@@ -704,7 +704,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'tags';
}
endpoint = `/api/3/tags`;
endpoint = '/api/3/tags';
} else if (operation === 'update') {
// ----------------------------------
// tags:update
@@ -811,7 +811,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'deals';
}
endpoint = `/api/3/deals`;
endpoint = '/api/3/deals';
} else if (operation === 'createNote') {
// ----------------------------------
// deal:createNote
@@ -910,7 +910,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'connections';
}
endpoint = `/api/3/connections`;
endpoint = '/api/3/connections';
} else {
throw new NodeOperationError(
this.getNode(),
@@ -1010,7 +1010,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'ecomOrders';
}
endpoint = `/api/3/ecomOrders`;
endpoint = '/api/3/ecomOrders';
} else {
throw new NodeOperationError(
this.getNode(),
@@ -1099,7 +1099,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'ecomCustomers';
}
endpoint = `/api/3/ecomCustomers`;
endpoint = '/api/3/ecomCustomers';
} else {
throw new NodeOperationError(
this.getNode(),
@@ -1145,7 +1145,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'ecomOrderProducts';
}
endpoint = `/api/3/ecomOrderProducts`;
endpoint = '/api/3/ecomOrderProducts';
} else {
throw new NodeOperationError(
this.getNode(),

View File

@@ -132,7 +132,7 @@ export class Affinity implements INodeType {
// select them easily
async getLists(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const lists = await affinityApiRequest.call(this, 'GET', `/lists`);
const lists = await affinityApiRequest.call(this, 'GET', '/lists');
for (const list of lists) {
returnData.push({
name: list.name,
@@ -163,7 +163,7 @@ export class Affinity implements INodeType {
//https://api-docs.affinity.co/#get-all-lists
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await affinityApiRequest.call(this, 'GET', `/lists`, {}, qs);
responseData = await affinityApiRequest.call(this, 'GET', '/lists', {}, qs);
if (!returnAll) {
const limit = this.getNodeParameter('limit', i);
responseData = responseData.splice(0, limit);

View File

@@ -172,7 +172,7 @@ export class AgileCrm implements INodeType {
responseData = await agileCrmApiRequestAllItems.call(
this,
'POST',
`api/filters/filter/dynamic-filter`,
'api/filters/filter/dynamic-filter',
body,
undefined,
undefined,
@@ -183,7 +183,7 @@ export class AgileCrm implements INodeType {
responseData = await agileCrmApiRequest.call(
this,
'POST',
`api/filters/filter/dynamic-filter`,
'api/filters/filter/dynamic-filter',
body,
undefined,
undefined,

View File

@@ -188,7 +188,8 @@ export class ApiTemplateIo implements INodeType {
jsonParameters: [true],
},
},
placeholder: `[ {"name": "text_1", "text": "hello world", "textBackgroundColor": "rgba(246, 243, 243, 0)" } ]`,
placeholder:
'[ {"name": "text_1", "text": "hello world", "textBackgroundColor": "rgba(246, 243, 243, 0)" } ]',
},
{
displayName: 'Properties (JSON)',
@@ -202,7 +203,7 @@ export class ApiTemplateIo implements INodeType {
jsonParameters: [true],
},
},
placeholder: `{ "name": "text_1" }`,
placeholder: '{ "name": "text_1" }',
},
{
displayName: 'Overrides',

View File

@@ -1860,7 +1860,7 @@ export class Asana implements INodeType {
// Get all users to display them to user so that they can be selected easily
// See: https://developers.asana.com/docs/get-multiple-users
async getUsers(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const endpoint = `/users`;
const endpoint = '/users';
const responseData = await asanaApiRequest.call(this, 'GET', endpoint, {});
if (responseData.data === undefined) {
@@ -2026,7 +2026,7 @@ export class Asana implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i);
requestMethod = 'GET';
endpoint = `/tasks`;
endpoint = '/tasks';
Object.assign(qs, filters);
@@ -2335,7 +2335,7 @@ export class Asana implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i);
requestMethod = 'GET';
endpoint = `/projects`;
endpoint = '/projects';
if (additionalFields.team) {
qs.team = additionalFields.team;

View File

@@ -152,7 +152,7 @@ export class AsanaTrigger implements INodeType {
const resource = this.getNodeParameter('resource') as string;
const endpoint = `/webhooks`;
const endpoint = '/webhooks';
const body = {
resource,

View File

@@ -74,7 +74,7 @@ export class Automizy implements INodeType {
this,
'smartLists',
'GET',
`/smart-lists`,
'/smart-lists',
);
for (const list of lists) {
returnData.push({
@@ -272,7 +272,7 @@ export class Automizy implements INodeType {
name,
};
responseData = await automizyApiRequest.call(this, 'POST', `/smart-lists`, body);
responseData = await automizyApiRequest.call(this, 'POST', '/smart-lists', body);
responseData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(responseData),
{ itemData: { item: i } },
@@ -319,14 +319,14 @@ export class Automizy implements INodeType {
this,
'smartLists',
'GET',
`/smart-lists`,
'/smart-lists',
{},
qs,
);
} else {
qs.limit = this.getNodeParameter('limit', i);
responseData = await automizyApiRequest.call(this, 'GET', `/smart-lists`, {}, qs);
responseData = await automizyApiRequest.call(this, 'GET', '/smart-lists', {}, qs);
responseData = responseData.smartLists;
}

View File

@@ -169,7 +169,7 @@ export class Autopilot implements INodeType {
delete body.newEmail;
}
responseData = await autopilotApiRequest.call(this, 'POST', `/contact`, {
responseData = await autopilotApiRequest.call(this, 'POST', '/contact', {
contact: body,
});
}
@@ -198,7 +198,7 @@ export class Autopilot implements INodeType {
this,
'contacts',
'GET',
`/contacts`,
'/contacts',
{},
qs,
);
@@ -280,7 +280,7 @@ export class Autopilot implements INodeType {
name,
};
responseData = await autopilotApiRequest.call(this, 'POST', `/list`, body);
responseData = await autopilotApiRequest.call(this, 'POST', '/list', body);
}
if (operation === 'getAll') {

View File

@@ -18,7 +18,7 @@ import { get } from 'lodash';
export class AwsSnsTrigger implements INodeType {
description: INodeTypeDescription = {
displayName: 'AWS SNS Trigger',
subtitle: `={{$parameter["topic"].split(':')[5]}}`,
subtitle: '={{$parameter["topic"].split(\':\')[5]}}',
name: 'awsSnsTrigger',
icon: 'file:sns.svg',
group: ['trigger'],

View File

@@ -66,7 +66,7 @@ export class AwsCertificateManager implements INodeType {
responseData = await awsApiRequestREST.call(
this,
`acm`,
'acm',
'POST',
'',
JSON.stringify(body),
@@ -90,7 +90,7 @@ export class AwsCertificateManager implements INodeType {
responseData = await awsApiRequestREST.call(
this,
`acm`,
'acm',
'POST',
'',
JSON.stringify(body),
@@ -148,7 +148,7 @@ export class AwsCertificateManager implements INodeType {
body.MaxItems = this.getNodeParameter('limit', 0);
responseData = await awsApiRequestREST.call(
this,
`acm`,
'acm',
'POST',
'',
JSON.stringify(body),
@@ -172,7 +172,7 @@ export class AwsCertificateManager implements INodeType {
responseData = await awsApiRequestREST.call(
this,
`acm`,
'acm',
'POST',
'',
JSON.stringify(body),
@@ -196,7 +196,7 @@ export class AwsCertificateManager implements INodeType {
responseData = await awsApiRequestREST.call(
this,
`acm`,
'acm',
'POST',
'',
JSON.stringify(body),

View File

@@ -845,7 +845,7 @@ export class AwsSes implements INodeType {
const templateSubject = this.getNodeParameter('templateSubject', i) as string;
const params = [
`Action=CreateCustomVerificationEmailTemplate`,
'Action=CreateCustomVerificationEmailTemplate',
`FailureRedirectionURL=${failureRedirectionURL}`,
`FromEmailAddress=${email}`,
`SuccessRedirectionURL=${successRedirectionURL}`,
@@ -869,7 +869,7 @@ export class AwsSes implements INodeType {
const templateName = this.getNodeParameter('templateName', i) as string;
const params = [
`Action=DeleteCustomVerificationEmailTemplate`,
'Action=DeleteCustomVerificationEmailTemplate',
`TemplateName=${templateName}`,
];
@@ -935,7 +935,7 @@ export class AwsSes implements INodeType {
const additionalFields = this.getNodeParameter('additionalFields', i);
const params = [
`Action=SendCustomVerificationEmail`,
'Action=SendCustomVerificationEmail',
`TemplateName=${templateName}`,
`EmailAddress=${email}`,
];
@@ -961,7 +961,7 @@ export class AwsSes implements INodeType {
const updateFields = this.getNodeParameter('updateFields', i);
const params = [
`Action=UpdateCustomVerificationEmailTemplate`,
'Action=UpdateCustomVerificationEmailTemplate',
`TemplateName=${templateName}`,
];
@@ -1018,7 +1018,7 @@ export class AwsSes implements INodeType {
if (isBodyHtml) {
params.push(`Message.Body.Html.Data=${encodeURIComponent(message)}`);
params.push(`Message.Body.Html.Charset=UTF-8`);
params.push('Message.Body.Html.Charset=UTF-8');
} else {
params.push(`Message.Body.Text.Data=${encodeURIComponent(message)}`);
}

View File

@@ -25,7 +25,7 @@ export class AwsSqs implements INodeType {
icon: 'file:sqs.svg',
group: ['output'],
version: 1,
subtitle: `={{$parameter["operation"]}}`,
subtitle: '={{$parameter["operation"]}}',
description: 'Sends messages to AWS SQS',
defaults: {
name: 'AWS SQS',
@@ -249,7 +249,7 @@ export class AwsSqs implements INodeType {
loadOptions: {
// Get all the available queues to display them to user so that it can be selected easily
async getQueues(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const params = ['Version=2012-11-05', `Action=ListQueues`];
const params = ['Version=2012-11-05', 'Action=ListQueues'];
let data;
try {

View File

@@ -147,7 +147,7 @@ export async function validateCredentials(
// Concatenate path and instantiate URL object so it parses correctly query strings
const endpoint = new URL(
getEndpointForService(service, credentials) + `?Action=GetCallerIdentity&Version=2011-06-15`,
getEndpointForService(service, credentials) + '?Action=GetCallerIdentity&Version=2011-06-15',
);
// Sign AWS API request with the user credentials

View File

@@ -56,7 +56,7 @@ export async function upload(this: IExecuteFunctions, index: number) {
}
//endpoint
const endpoint = `files`;
const endpoint = 'files';
const { headers } = await apiRequest.call(this, requestMethod, endpoint, {}, {}, body);
return this.helpers.returnJsonArray({ fileId: headers.location.split('/').pop() });
}

View File

@@ -235,7 +235,7 @@ export class BitbucketTrigger implements INodeType {
this,
'values',
'GET',
`/workspaces`,
'/workspaces',
);
for (const workspace of workspaces) {
returnData.push({

View File

@@ -210,13 +210,13 @@ export class Box implements INodeType {
this,
'entries',
'GET',
`/search`,
'/search',
{},
qs,
);
} else {
qs.limit = this.getNodeParameter('limit', i);
responseData = await boxApiRequest.call(this, 'GET', `/search`, {}, qs);
responseData = await boxApiRequest.call(this, 'GET', '/search', {}, qs);
responseData = responseData.entries;
}
}
@@ -262,7 +262,7 @@ export class Box implements INodeType {
body.accessible_by.id = this.getNodeParameter('groupId', i) as string;
}
responseData = await boxApiRequest.call(this, 'POST', `/collaborations`, body, qs);
responseData = await boxApiRequest.call(this, 'POST', '/collaborations', body, qs);
}
// https://developer.box.com/reference/post-files-content
if (operation === 'upload') {
@@ -444,13 +444,13 @@ export class Box implements INodeType {
this,
'entries',
'GET',
`/search`,
'/search',
{},
qs,
);
} else {
qs.limit = this.getNodeParameter('limit', i);
responseData = await boxApiRequest.call(this, 'GET', `/search`, {}, qs);
responseData = await boxApiRequest.call(this, 'GET', '/search', {}, qs);
responseData = responseData.entries;
}
}
@@ -496,7 +496,7 @@ export class Box implements INodeType {
body.accessible_by.id = this.getNodeParameter('groupId', i) as string;
}
responseData = await boxApiRequest.call(this, 'POST', `/collaborations`, body, qs);
responseData = await boxApiRequest.call(this, 'POST', '/collaborations', body, qs);
}
//https://developer.box.com/guides/folders/single/move/
if (operation === 'update') {

View File

@@ -157,7 +157,7 @@ export class Brandfetch implements INodeType {
domain,
};
const response = await brandfetchApiRequest.call(this, 'POST', `/logo`, body);
const response = await brandfetchApiRequest.call(this, 'POST', '/logo', body);
if (download) {
const imageTypes = this.getNodeParameter('imageTypes', i) as string[];
@@ -219,7 +219,7 @@ export class Brandfetch implements INodeType {
domain,
};
const response = await brandfetchApiRequest.call(this, 'POST', `/color`, body);
const response = await brandfetchApiRequest.call(this, 'POST', '/color', body);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(response),
{ itemData: { item: i } },
@@ -233,7 +233,7 @@ export class Brandfetch implements INodeType {
domain,
};
const response = await brandfetchApiRequest.call(this, 'POST', `/font`, body);
const response = await brandfetchApiRequest.call(this, 'POST', '/font', body);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(response),
{ itemData: { item: i } },
@@ -247,7 +247,7 @@ export class Brandfetch implements INodeType {
domain,
};
const response = await brandfetchApiRequest.call(this, 'POST', `/company`, body);
const response = await brandfetchApiRequest.call(this, 'POST', '/company', body);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(response),
{ itemData: { item: i } },
@@ -261,7 +261,7 @@ export class Brandfetch implements INodeType {
domain,
};
const response = await brandfetchApiRequest.call(this, 'POST', `/industry`, body);
const response = await brandfetchApiRequest.call(this, 'POST', '/industry', body);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(response),

View File

@@ -422,7 +422,8 @@ export const objectFields: INodeProperties[] = [
'/jsonParameters': [true],
},
},
placeholder: `[ { "key": "name", "constraint_type": "text contains", "value": "cafe" } , { "key": "address", "constraint_type": "geographic_search", "value": { "range":10, "origin_address":"New York" } } ]`,
placeholder:
'[ { "key": "name", "constraint_type": "text contains", "value": "cafe" } , { "key": "address", "constraint_type": "geographic_search", "value": { "range":10, "origin_address":"New York" } } ]',
description:
'Refine the list that is returned by the Data API with search constraints, exactly as you define a search in Bubble. See <a href="https://manual.bubble.io/core-resources/api/data-api#search-constraints">link</a>.',
},

View File

@@ -493,7 +493,7 @@ export class Chargebee implements INodeType {
}
}
endpoint = `customers`;
endpoint = 'customers';
} else {
throw new NodeOperationError(
this.getNode(),

View File

@@ -72,7 +72,7 @@ export class CitrixAdc implements INodeType {
const fileLocation = this.getNodeParameter('fileLocation', i) as string;
const binaryProperty = this.getNodeParameter('binaryProperty', i);
const options = this.getNodeParameter('options', i);
const endpoint = `/config/systemfile`;
const endpoint = '/config/systemfile';
const item = items[i];
@@ -197,7 +197,7 @@ export class CitrixAdc implements INodeType {
};
}
const endpoint = `/config/sslcert?action=create`;
const endpoint = '/config/sslcert?action=create';
await citrixADCApiRequest.call(this, 'POST', endpoint, { sslcert: body });
@@ -237,7 +237,7 @@ export class CitrixAdc implements INodeType {
});
}
const endpoint = `/config/sslcertkey`;
const endpoint = '/config/sslcertkey';
await citrixADCApiRequest.call(this, 'POST', endpoint, { sslcertkey: body });

View File

@@ -82,5 +82,5 @@ export async function getAllCollectionEntries(
export async function getAllCollectionNames(
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
): Promise<string[]> {
return cockpitApiRequest.call(this, 'GET', `/collections/listCollections`, {});
return cockpitApiRequest.call(this, 'GET', '/collections/listCollections', {});
}

View File

@@ -11,5 +11,5 @@ export async function getSingleton(
export async function getAllSingletonNames(
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
): Promise<string[]> {
return cockpitApiRequest.call(this, 'GET', `/singletons/listSingletons`, {});
return cockpitApiRequest.call(this, 'GET', '/singletons/listSingletons', {});
}

View File

@@ -83,7 +83,7 @@ export class Coda implements INodeType {
async getDocs(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const qs = {};
const docs = await codaApiRequestAllItems.call(this, 'items', 'GET', `/docs`, {}, qs);
const docs = await codaApiRequestAllItems.call(this, 'items', 'GET', '/docs', {}, qs);
for (const doc of docs) {
const docName = doc.name;
const docId = doc.id;

View File

@@ -222,7 +222,7 @@ export class CoinGecko implements INodeType {
this,
'',
'GET',
`/coins/markets`,
'/coins/markets',
{},
qs,
);
@@ -231,7 +231,7 @@ export class CoinGecko implements INodeType {
qs.per_page = limit;
responseData = await coinGeckoApiRequest.call(this, 'GET', `/coins/markets`, {}, qs);
responseData = await coinGeckoApiRequest.call(this, 'GET', '/coins/markets', {}, qs);
}
}

View File

@@ -189,7 +189,7 @@ export class ConvertKit implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await convertKitApiRequest.call(this, 'GET', `/custom_fields`);
responseData = await convertKitApiRequest.call(this, 'GET', '/custom_fields');
responseData = responseData.custom_fields;
@@ -256,7 +256,7 @@ export class ConvertKit implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await convertKitApiRequest.call(this, 'GET', `/forms`);
responseData = await convertKitApiRequest.call(this, 'GET', '/forms');
responseData = responseData.forms;
@@ -339,7 +339,7 @@ export class ConvertKit implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await convertKitApiRequest.call(this, 'GET', `/sequences`);
responseData = await convertKitApiRequest.call(this, 'GET', '/sequences');
responseData = responseData.courses;
@@ -394,7 +394,7 @@ export class ConvertKit implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await convertKitApiRequest.call(this, 'GET', `/tags`);
responseData = await convertKitApiRequest.call(this, 'GET', '/tags');
responseData = responseData.tags;

View File

@@ -88,7 +88,7 @@ export class Cortex implements INodeType {
const requestResult = await cortexApiRequest.call(
this,
'POST',
`/analyzer/_search?range=all`,
'/analyzer/_search?range=all',
);
const returnData: INodePropertyOptions[] = [];
@@ -106,7 +106,7 @@ export class Cortex implements INodeType {
async loadActiveResponders(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
// request the enabled responders from instance
const requestResult = await cortexApiRequest.call(this, 'GET', `/responder`);
const requestResult = await cortexApiRequest.call(this, 'GET', '/responder');
const returnData: INodePropertyOptions[] = [];
for (const responder of requestResult) {

View File

@@ -93,7 +93,7 @@ export class CustomerIo implements INodeType {
}
if (operation === 'getAll') {
const endpoint = `/campaigns`;
const endpoint = '/campaigns';
responseData = await customerIoApiRequest.call(this, 'GET', endpoint, body, 'beta');
responseData = responseData.campaigns;
@@ -298,7 +298,7 @@ export class CustomerIo implements INodeType {
body.data = data;
}
const endpoint = `/events`;
const endpoint = '/events';
await customerIoApiRequest.call(this, 'POST', endpoint, body, 'tracking');
responseData = {

View File

@@ -68,7 +68,7 @@ export class Demio implements INodeType {
// select them easily
async getEvents(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const events = await demioApiRequest.call(this, 'GET', `/events`, {}, { type: 'upcoming' });
const events = await demioApiRequest.call(this, 'GET', '/events', {}, { type: 'upcoming' });
for (const event of events) {
returnData.push({
name: event.name,
@@ -136,7 +136,7 @@ export class Demio implements INodeType {
Object.assign(qs, filters);
responseData = await demioApiRequest.call(this, 'GET', `/events`, {}, qs);
responseData = await demioApiRequest.call(this, 'GET', '/events', {}, qs);
if (!returnAll) {
const limit = this.getNodeParameter('limit', i);
@@ -169,7 +169,7 @@ export class Demio implements INodeType {
delete additionalFields.customFields;
}
responseData = await demioApiRequest.call(this, 'PUT', `/event/register`, body);
responseData = await demioApiRequest.call(this, 'PUT', '/event/register', body);
}
}
if (resource === 'report') {

View File

@@ -82,7 +82,7 @@ export class Dhl implements INodeType {
default: {},
options: [
{
displayName: `Recipient's Postal Code`,
displayName: "Recipient's Postal Code",
name: 'recipientPostalCode',
type: 'string',
default: '',
@@ -140,7 +140,7 @@ export class Dhl implements INodeType {
Object.assign(qs, options);
responseData = await dhlApiRequest.call(this, 'GET', `/track/shipments`, {}, qs);
responseData = await dhlApiRequest.call(this, 'GET', '/track/shipments', {}, qs);
returnData.push(...responseData.shipments);
}

View File

@@ -66,7 +66,7 @@ export async function validateCredentials(
trackingNumber: 123,
},
method: 'GET',
uri: `https://api-eu.dhl.com/track/shipments`,
uri: 'https://api-eu.dhl.com/track/shipments',
json: true,
};

View File

@@ -96,7 +96,7 @@ export class Discourse implements INodeType {
// select them easily
async getCategories(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const { category_list } = await discourseApiRequest.call(this, 'GET', `/categories.json`);
const { category_list } = await discourseApiRequest.call(this, 'GET', '/categories.json');
for (const category of category_list.categories) {
returnData.push({
name: category.name,
@@ -131,7 +131,7 @@ export class Discourse implements INodeType {
text_color: textColor,
};
responseData = await discourseApiRequest.call(this, 'POST', `/categories.json`, body);
responseData = await discourseApiRequest.call(this, 'POST', '/categories.json', body);
responseData = responseData.category;
}
@@ -139,7 +139,7 @@ export class Discourse implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await discourseApiRequest.call(this, 'GET', `/categories.json`, {}, qs);
responseData = await discourseApiRequest.call(this, 'GET', '/categories.json', {}, qs);
responseData = responseData.category_list.categories;
@@ -181,7 +181,7 @@ export class Discourse implements INodeType {
name,
};
responseData = await discourseApiRequest.call(this, 'POST', `/admin/groups.json`, {
responseData = await discourseApiRequest.call(this, 'POST', '/admin/groups.json', {
group: body,
});
@@ -199,7 +199,7 @@ export class Discourse implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await discourseApiRequest.call(this, 'GET', `/groups.json`, {}, qs);
responseData = await discourseApiRequest.call(this, 'GET', '/groups.json', {}, qs);
responseData = responseData.groups;
@@ -237,7 +237,7 @@ export class Discourse implements INodeType {
Object.assign(body, additionalFields);
responseData = await discourseApiRequest.call(this, 'POST', `/posts.json`, body);
responseData = await discourseApiRequest.call(this, 'POST', '/posts.json', body);
}
//https://docs.discourse.org/#tag/Posts/paths/~1posts~1{id}.json/get
if (operation === 'get') {
@@ -250,7 +250,7 @@ export class Discourse implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i);
const limit = this.getNodeParameter('limit', i, 0);
responseData = await discourseApiRequest.call(this, 'GET', `/posts.json`, {}, qs);
responseData = await discourseApiRequest.call(this, 'GET', '/posts.json', {}, qs);
responseData = responseData.latest_posts;
//Getting all posts relying on https://github.com/discourse/discourse_api/blob/main/spec/discourse_api/api/posts_spec.rb
@@ -352,7 +352,7 @@ export class Discourse implements INodeType {
Object.assign(body, additionalFields);
responseData = await discourseApiRequest.call(this, 'POST', `/users.json`, body);
responseData = await discourseApiRequest.call(this, 'POST', '/users.json', body);
}
//https://docs.discourse.org/#tag/Users/paths/~1users~1{username}.json/get
if (operation === 'get') {

View File

@@ -68,7 +68,7 @@ export async function elasticsearchApiRequestAllItems(
track_total_hits: false, //Disable the tracking of total hits to speed up pagination
};
responseData = await elasticsearchApiRequest.call(this, 'GET', `/_search`, requestBody, qs);
responseData = await elasticsearchApiRequest.call(this, 'GET', '/_search', requestBody, qs);
if (responseData?.hits?.hits) {
returnData = returnData.concat(responseData.hits.hits);
const lastHitIndex = responseData.hits.hits.length - 1;
@@ -84,7 +84,7 @@ export async function elasticsearchApiRequestAllItems(
requestBody.search_after = searchAfter;
requestBody.pit = { id: pit, keep_alive: '1m' };
responseData = await elasticsearchApiRequest.call(this, 'GET', `/_search`, requestBody, qs);
responseData = await elasticsearchApiRequest.call(this, 'GET', '/_search', requestBody, qs);
if (responseData?.hits?.hits?.length) {
returnData = returnData.concat(responseData.hits.hits);
@@ -96,7 +96,7 @@ export async function elasticsearchApiRequestAllItems(
}
}
await elasticsearchApiRequest.call(this, 'DELETE', `/_pit`, { id: pit });
await elasticsearchApiRequest.call(this, 'DELETE', '/_pit', { id: pit });
return returnData;
} catch (error) {

View File

@@ -479,7 +479,7 @@ export class EmailReadImapV1 implements INodeType {
try {
searchCriteria = JSON.parse(options.customEmailConfig as string);
} catch (error) {
throw new NodeOperationError(this.getNode(), `Custom email config is not valid JSON.`);
throw new NodeOperationError(this.getNode(), 'Custom email config is not valid JSON.');
}
}

View File

@@ -239,7 +239,7 @@ export class EmailReadImapV2 implements INodeType {
const credentialsObject = await this.getCredentials('imap');
const credentials = isCredentialsDataImap(credentialsObject) ? credentialsObject : undefined;
if (!credentials) {
throw new NodeOperationError(this.getNode(), `Credentials are not valid for imap node.`);
throw new NodeOperationError(this.getNode(), 'Credentials are not valid for imap node.');
}
const mailbox = this.getNodeParameter('mailbox') as string;
const postProcessAction = this.getNodeParameter('postProcessAction') as string;
@@ -487,7 +487,7 @@ export class EmailReadImapV2 implements INodeType {
try {
searchCriteria = JSON.parse(options.customEmailConfig as string);
} catch (error) {
throw new NodeOperationError(this.getNode(), `Custom email config is not valid JSON.`);
throw new NodeOperationError(this.getNode(), 'Custom email config is not valid JSON.');
}
}
@@ -560,11 +560,11 @@ export class EmailReadImapV2 implements INodeType {
return imapConnect(config).then(async (conn) => {
conn.on('close', async (_hadError: boolean) => {
if (isCurrentlyReconnecting) {
Logger.debug(`Email Read Imap: Connected closed for forced reconnecting`);
Logger.debug('Email Read Imap: Connected closed for forced reconnecting');
} else if (closeFunctionWasCalled) {
Logger.debug(`Email Read Imap: Shutting down workflow - connected closed`);
Logger.debug('Email Read Imap: Shutting down workflow - connected closed');
} else {
Logger.error(`Email Read Imap: Connected closed unexpectedly`);
Logger.error('Email Read Imap: Connected closed unexpectedly');
this.emitError(new Error('Imap connection closed unexpectedly'));
}
});
@@ -586,7 +586,7 @@ export class EmailReadImapV2 implements INodeType {
if (options.forceReconnect !== undefined) {
reconnectionInterval = setInterval(async () => {
Logger.verbose(`Forcing reconnect to IMAP server`);
Logger.verbose('Forcing reconnect to IMAP server');
try {
isCurrentlyReconnecting = true;
if (connection.closeBox) await connection.closeBox(false);

View File

@@ -124,7 +124,7 @@ export async function emeliaApiTest(
},
method: 'POST',
body,
uri: `https://graphql.emelia.io/graphql`,
uri: 'https://graphql.emelia.io/graphql',
json: true,
};

View File

@@ -69,166 +69,169 @@ export function getFields(object: string) {
page: [
{
value: 'affiliation',
description: `Describes changes to a page's Affliation profile field`,
description: "Describes changes to a page's Affliation profile field",
},
{
value: 'attire',
description: `Describes changes to a page's Attire profile field`,
description: "Describes changes to a page's Attire profile field",
},
{
value: 'awards',
description: `Describes changes to a page's Awards profile field`,
description: "Describes changes to a page's Awards profile field",
},
{
value: 'bio',
description: `Describes changes to a page's Biography profile field`,
description: "Describes changes to a page's Biography profile field",
},
{
value: 'birthday',
description: `Describes changes to a page's Birthday profile field`,
description: "Describes changes to a page's Birthday profile field",
},
{
value: 'category',
description: `Describes changes to a page's Birthday profile field`,
description: "Describes changes to a page's Birthday profile field",
},
{
value: 'company_overview',
description: `Describes changes to a page's Company Overview profile field`,
description: "Describes changes to a page's Company Overview profile field",
},
{
value: 'culinary_team',
description: `Describes changes to a page's Culinary Team profile field`,
description: "Describes changes to a page's Culinary Team profile field",
},
{
value: 'current_location',
description: `Describes changes to a page's Current Location profile field`,
description: "Describes changes to a page's Current Location profile field",
},
{
value: 'description',
description: `Describes changes to a page's Story Description profile field`,
description: "Describes changes to a page's Story Description profile field",
},
{
value: 'email',
description: `Describes changes to a page's Email profile field`,
description: "Describes changes to a page's Email profile field",
},
{
value: 'feed',
description: `Describes nearly all changes to a Page's feed, such as Posts, shares, likes, etc`,
description:
"Describes nearly all changes to a Page's feed, such as Posts, shares, likes, etc",
},
{
value: 'founded',
description: `Describes changes to a page's Founded profile field. This is different from the Start Date field`,
description:
"Describes changes to a page's Founded profile field. This is different from the Start Date field",
},
{
value: 'general_info',
description: `Describes changes to a page's General Information profile field`,
description: "Describes changes to a page's General Information profile field",
},
{
value: 'general_manager',
description: `Describes changes to a page's General Information profile field`,
description: "Describes changes to a page's General Information profile field",
},
{
value: 'hometown',
description: `Describes changes to a page's Homewtown profile field`,
description: "Describes changes to a page's Homewtown profile field",
},
{
value: 'hours',
description: `Describes changes to a page's Hours profile field`,
description: "Describes changes to a page's Hours profile field",
},
{
value: 'leadgen',
description: `Describes changes to a page's leadgen settings`,
description: "Describes changes to a page's leadgen settings",
},
{
value: 'live_videos',
description: `Describes changes to a page's live video status`,
description: "Describes changes to a page's live video status",
},
{
value: 'location',
description: `Describes changes to a page's Location profile field`,
description: "Describes changes to a page's Location profile field",
},
{
value: 'members',
description: `Describes changes to a page's Members profile field`,
description: "Describes changes to a page's Members profile field",
},
{
value: 'mention',
description: `Describes new mentions of a page, including mentions in comments, posts, etc`,
description: 'Describes new mentions of a page, including mentions in comments, posts, etc',
},
{
value: 'merchant_review',
description: `Describes changes to a page's merchant review settings`,
description: "Describes changes to a page's merchant review settings",
},
{
value: 'mission',
description: `Describes changes to a page's Mission profile field`,
description: "Describes changes to a page's Mission profile field",
},
{
value: 'name',
description: `Describes changes to a page's Name profile field.`,
description: "Describes changes to a page's Name profile field.",
},
{
value: 'page_about_story',
},
{
value: 'page_change_proposal',
description: `Data for page change proposal.`,
description: 'Data for page change proposal.',
},
{
value: 'page_upcoming_change',
description: `Webhooks data for page upcoming changes`,
description: 'Webhooks data for page upcoming changes',
},
{
value: 'parking',
description: `Describes changes to a page's Parking profile field`,
description: "Describes changes to a page's Parking profile field",
},
{
value: 'payment_options',
description: `Describes change to a page's Payment profile field`,
description: "Describes change to a page's Payment profile field",
},
{
value: 'personal_info',
description: `Describes changes to a page's Personal Information profile field.`,
description: "Describes changes to a page's Personal Information profile field.",
},
{
value: 'personal_interests',
description: `Describes changes to a page's Personal Interests profile field.`,
description: "Describes changes to a page's Personal Interests profile field.",
},
{
value: 'phone',
description: `Describes changes to a page's Phone profile field`,
description: "Describes changes to a page's Phone profile field",
},
{
value: 'picture',
description: `Describes changes to a page's profile picture`,
description: "Describes changes to a page's profile picture",
},
{
value: 'price_range',
description: `Describes changes to a page's Price Range profile field`,
description: "Describes changes to a page's Price Range profile field",
},
{
value: 'product_review',
description: `Describes changes to a page's product review settings`,
description: "Describes changes to a page's product review settings",
},
{
value: 'products',
description: `Describes changes to a page's Products profile field`,
description: "Describes changes to a page's Products profile field",
},
{
value: 'public_transit',
description: `Describes changes to a page's Public Transit profile field`,
description: "Describes changes to a page's Public Transit profile field",
},
{
value: 'ratings',
description: `Describes changes to a page's ratings, including new ratings or a user's comments or reactions on a rating`,
description:
"Describes changes to a page's ratings, including new ratings or a user's comments or reactions on a rating",
},
{
value: 'videos',
description: `Describes changes to the encoding status of a video on a page`,
description: 'Describes changes to the encoding status of a video on a page',
},
{
value: 'website',
description: `Describes changes to a page's Website profile field`,
description: "Describes changes to a page's Website profile field",
},
],
application: [

View File

@@ -102,7 +102,7 @@ export class FlowTrigger implements INodeType {
return false;
}
qs.organization_id = credentials.organizationId as number;
const endpoint = `/integration_webhooks`;
const endpoint = '/integration_webhooks';
try {
webhooks = await flowApiRequest.call(this, 'GET', endpoint, {}, qs);
webhooks = webhooks.integration_webhooks;
@@ -126,7 +126,7 @@ export class FlowTrigger implements INodeType {
const webhookUrl = this.getNodeWebhookUrl('default');
const webhookData = this.getWorkflowStaticData('node');
const resource = this.getNodeParameter('resource') as string;
const endpoint = `/integration_webhooks`;
const endpoint = '/integration_webhooks';
if (resource === 'list') {
resourceIds = (this.getNodeParameter('listIds') as string).split(',');
}

View File

@@ -157,7 +157,7 @@ export class FormIoTrigger implements INodeType {
const method = this.getNodeParameter('events') as string[];
const payload = {
data: {
name: `webhook`,
name: 'webhook',
title: `webhook-n8n:${webhookUrl}`,
method,
handler: ['after'],

View File

@@ -38,7 +38,7 @@ async function getToken(
return responseObject.headers['x-jwt-token'];
} catch (error) {
throw new Error(
`Authentication Failed for Form.io. Please provide valid credentails/ endpoint details`,
'Authentication Failed for Form.io. Please provide valid credentails/ endpoint details',
);
}
}

View File

@@ -225,7 +225,7 @@ export class FreshworksCrm implements INodeType {
const response = (await freshworksCrmApiRequest.call(
this,
'GET',
`/selector/owners`,
'/selector/owners',
)) as FreshworksConfigResponse<LoadedUser>;
const key = Object.keys(response)[0];

View File

@@ -190,5 +190,5 @@ export function throwOnEmptyUpdate(this: IExecuteFunctions, resource: string) {
}
export function throwOnEmptyFilter(this: IExecuteFunctions) {
throw new NodeOperationError(this.getNode(), `Please select at least one filter.`);
throw new NodeOperationError(this.getNode(), 'Please select at least one filter.');
}

View File

@@ -217,7 +217,8 @@ export const searchFields: INodeProperties[] = [
},
],
// 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.`,
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

@@ -91,7 +91,7 @@ export class GetResponse implements INodeType {
// select them easily
async getCampaigns(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const campaigns = await getresponseApiRequest.call(this, 'GET', `/campaigns`);
const campaigns = await getresponseApiRequest.call(this, 'GET', '/campaigns');
for (const campaign of campaigns) {
returnData.push({
name: campaign.name as string,
@@ -104,7 +104,7 @@ export class GetResponse implements INodeType {
// select them easily
async getTags(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const tags = await getresponseApiRequest.call(this, 'GET', `/tags`);
const tags = await getresponseApiRequest.call(this, 'GET', '/tags');
for (const tag of tags) {
returnData.push({
name: tag.name as string,
@@ -117,7 +117,7 @@ export class GetResponse implements INodeType {
// select them easily
async getCustomFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const customFields = await getresponseApiRequest.call(this, 'GET', `/custom-fields`);
const customFields = await getresponseApiRequest.call(this, 'GET', '/custom-fields');
for (const customField of customFields) {
returnData.push({
name: customField.name as string,
@@ -256,13 +256,13 @@ export class GetResponse implements INodeType {
responseData = await getResponseApiRequestAllItems.call(
this,
'GET',
`/contacts`,
'/contacts',
{},
qs,
);
} else {
qs.perPage = this.getNodeParameter('limit', i);
responseData = await getresponseApiRequest.call(this, 'GET', `/contacts`, {}, qs);
responseData = await getresponseApiRequest.call(this, 'GET', '/contacts', {}, qs);
}
}
//https://apireference.getresponse.com/?_ga=2.160836350.2102802044.1604719933-1897033509.1604598019#operation/updateContact

View File

@@ -92,7 +92,7 @@ export class Ghost implements INodeType {
// select them easily
async getAuthors(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const users = await ghostApiRequestAllItems.call(this, 'users', 'GET', `/admin/users`);
const users = await ghostApiRequestAllItems.call(this, 'users', 'GET', '/admin/users');
for (const user of users) {
returnData.push({
name: user.name,
@@ -105,7 +105,7 @@ export class Ghost implements INodeType {
// select them easily
async getTags(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const tags = await ghostApiRequestAllItems.call(this, 'tags', 'GET', `/admin/tags`);
const tags = await ghostApiRequestAllItems.call(this, 'tags', 'GET', '/admin/tags');
for (const tag of tags) {
returnData.push({
name: tag.name,

View File

@@ -106,7 +106,7 @@ async function getAccessToken(
iss: credentials.email as string,
sub: credentials.delegatedEmail || (credentials.email as string),
scope: scopes.join(' '),
aud: `https://oauth2.googleapis.com/token`,
aud: 'https://oauth2.googleapis.com/token',
iat: now,
exp: now + 3600,
},

View File

@@ -115,7 +115,7 @@ async function getAccessToken(
iss: credentials.email,
sub: credentials.delegatedEmail || credentials.email,
scope: scopes.join(' '),
aud: `https://oauth2.googleapis.com/token`,
aud: 'https://oauth2.googleapis.com/token',
iat: now,
exp: now + 3600,
},

View File

@@ -402,7 +402,7 @@ export class GoogleBooks implements INodeType {
const userId = this.getNodeParameter('userId', i) as string;
endpoint = `v1/users/${userId}/bookshelves`;
} else {
endpoint = `v1/mylibrary/bookshelves`;
endpoint = 'v1/mylibrary/bookshelves';
}
if (returnAll) {
responseData = await googleApiRequestAllItems.call(

View File

@@ -163,7 +163,7 @@ export class GoogleCalendar implements INodeType {
responseData = await googleApiRequest.call(
this,
'POST',
`/calendar/v3/freeBusy`,
'/calendar/v3/freeBusy',
body,
{},
);
@@ -287,7 +287,7 @@ export class GoogleCalendar implements INodeType {
if (additionalFields.repeatHowManyTimes && additionalFields.repeatUntil) {
throw new NodeOperationError(
this.getNode(),
`You can set either 'Repeat How Many Times' or 'Repeat Until' but not both`,
"You can set either 'Repeat How Many Times' or 'Repeat Until' but not both",
{ itemIndex: i },
);
}
@@ -544,7 +544,7 @@ export class GoogleCalendar implements INodeType {
if (updateFields.repeatHowManyTimes && updateFields.repeatUntil) {
throw new NodeOperationError(
this.getNode(),
`You can set either 'Repeat How Many Times' or 'Repeat Until' but not both`,
"You can set either 'Repeat How Many Times' or 'Repeat Until' but not both",
{ itemIndex: i },
);
}

View File

@@ -126,7 +126,7 @@ export async function getAccessToken(
iss: credentials.email,
sub: credentials.delegatedEmail || credentials.email,
scope: scopes.join(' '),
aud: `https://oauth2.googleapis.com/token`,
aud: 'https://oauth2.googleapis.com/token',
iat: now,
exp: now + 3600,
},

View File

@@ -114,7 +114,7 @@ export class GoogleChat implements INodeType {
// select them easily
async getSpaces(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const spaces = await googleApiRequestAllItems.call(this, 'spaces', 'GET', `/v1/spaces`);
const spaces = await googleApiRequestAllItems.call(this, 'spaces', 'GET', '/v1/spaces');
for (const space of spaces) {
returnData.push({
name: space.displayName,
@@ -142,7 +142,7 @@ export class GoogleChat implements INodeType {
iss: email,
sub: credential.data!.delegatedEmail || email,
scope: scopes.join(' '),
aud: `https://oauth2.googleapis.com/token`,
aud: 'https://oauth2.googleapis.com/token',
iat: now,
exp: now,
},
@@ -274,13 +274,13 @@ export class GoogleChat implements INodeType {
this,
'spaces',
'GET',
`/v1/spaces`,
'/v1/spaces',
);
} else {
const limit = this.getNodeParameter('limit', i);
qs.pageSize = limit;
responseData = await googleApiRequest.call(this, 'GET', `/v1/spaces`, undefined, qs);
responseData = await googleApiRequest.call(this, 'GET', '/v1/spaces', undefined, qs);
responseData = responseData.spaces;
}
}

View File

@@ -287,7 +287,7 @@ export class GoogleCloudNaturalLanguage implements INodeType {
const response = await googleApiRequest.call(
this,
'POST',
`/v1/documents:analyzeSentiment`,
'/v1/documents:analyzeSentiment',
body,
);
responseData.push(response);

View File

@@ -70,7 +70,7 @@ export class GoogleContacts implements INodeType {
this,
'contactGroups',
'GET',
`/contactGroups`,
'/contactGroups',
);
for (const group of groups) {
const groupName = group.name;
@@ -222,7 +222,7 @@ export class GoogleContacts implements INodeType {
responseData = await googleApiRequest.call(
this,
'POST',
`/people:createContact`,
'/people:createContact',
body,
qs,
);

View File

@@ -110,7 +110,7 @@ async function getAccessToken(
iss: credentials.email,
sub: credentials.delegatedEmail || credentials.email,
scope: scopes.join(' '),
aud: `https://oauth2.googleapis.com/token`,
aud: 'https://oauth2.googleapis.com/token',
iat: now,
exp: now + 3600,
},

View File

@@ -117,7 +117,7 @@ async function getAccessToken(
iss: credentials.email,
sub: credentials.delegatedEmail || credentials.email,
scope: scopes.join(' '),
aud: `https://oauth2.googleapis.com/token`,
aud: 'https://oauth2.googleapis.com/token',
iat: now,
exp: now + 3600,
},

View File

@@ -2041,7 +2041,7 @@ export class GoogleDrive implements INodeType {
if (filter) {
query.push(`name contains '${filter.replace("'", "\\'")}'`);
}
query.push(`mimeType != 'application/vnd.google-apps.folder'`);
query.push("mimeType != 'application/vnd.google-apps.folder'");
const res = await googleApiRequest.call(this, 'GET', '/drive/v3/files', undefined, {
q: query.join(' and '),
pageToken: paginationToken,
@@ -2066,7 +2066,7 @@ export class GoogleDrive implements INodeType {
if (filter) {
query.push(`name contains '${filter.replace("'", "\\'")}'`);
}
query.push(`mimeType = 'application/vnd.google-apps.folder'`);
query.push("mimeType = 'application/vnd.google-apps.folder'");
const res = await googleApiRequest.call(this, 'GET', '/drive/v3/files', undefined, {
q: query.join(' and '),
pageToken: paginationToken,
@@ -2137,7 +2137,7 @@ export class GoogleDrive implements INodeType {
Object.assign(body, options);
const response = await googleApiRequest.call(this, 'POST', `/drive/v3/drives`, body, {
const response = await googleApiRequest.call(this, 'POST', '/drive/v3/drives', body, {
requestId: uuid(),
});
@@ -2211,13 +2211,13 @@ export class GoogleDrive implements INodeType {
this,
'drives',
'GET',
`/drive/v3/drives`,
'/drive/v3/drives',
{},
qs,
);
} else {
qs.pageSize = this.getNodeParameter('limit', i);
const data = await googleApiRequest.call(this, 'GET', `/drive/v3/drives`, {}, qs);
const data = await googleApiRequest.call(this, 'GET', '/drive/v3/drives', {}, qs);
response = data.drives as IDataObject[];
}
@@ -2489,7 +2489,7 @@ export class GoogleDrive implements INodeType {
supportsAllDrives: queryCorpora !== '' || driveId !== '',
};
const response = await googleApiRequest.call(this, 'GET', `/drive/v3/files`, {}, qs);
const response = await googleApiRequest.call(this, 'GET', '/drive/v3/files', {}, qs);
const files = response.files;
@@ -2568,7 +2568,7 @@ export class GoogleDrive implements INodeType {
let response = await googleApiRequest.call(
this,
'POST',
`/upload/drive/v3/files`,
'/upload/drive/v3/files',
body,
qs,
undefined,

View File

@@ -312,7 +312,7 @@ export class GoogleDriveTrigger implements INodeType {
this,
'drives',
'GET',
`/drive/v3/drives`,
'/drive/v3/drives',
);
returnData.push({
name: 'Root',
@@ -355,9 +355,9 @@ export class GoogleDriveTrigger implements INodeType {
// }
if (event.startsWith('file')) {
query.push(`mimeType != 'application/vnd.google-apps.folder'`);
query.push("mimeType != 'application/vnd.google-apps.folder'");
} else {
query.push(`mimeType = 'application/vnd.google-apps.folder'`);
query.push("mimeType = 'application/vnd.google-apps.folder'");
}
if (options.fileType && options.fileType !== 'all') {
@@ -380,10 +380,10 @@ export class GoogleDriveTrigger implements INodeType {
if (this.getMode() === 'manual') {
qs.pageSize = 1;
files = await googleApiRequest.call(this, 'GET', `/drive/v3/files`, {}, qs);
files = await googleApiRequest.call(this, 'GET', '/drive/v3/files', {}, qs);
files = files.files;
} else {
files = await googleApiRequestAllItems.call(this, 'files', 'GET', `/drive/v3/files`, {}, qs);
files = await googleApiRequestAllItems.call(this, 'files', 'GET', '/drive/v3/files', {}, qs);
}
if (triggerOn === 'specificFile' && this.getMode() !== 'manual') {

View File

@@ -219,7 +219,7 @@ export class GoogleFirebaseRealtimeDatabase implements INodeType {
if (responseData === null) {
if (operation === 'get') {
throw new NodeApiError(this.getNode(), responseData, {
message: `Requested entity was not found.`,
message: 'Requested entity was not found.',
});
} else if (method === 'DELETE') {
responseData = { success: true };

View File

@@ -129,7 +129,7 @@ export class GSuiteAdmin implements INodeType {
Object.assign(body, additionalFields);
responseData = await googleApiRequest.call(this, 'POST', `/directory/v1/groups`, body);
responseData = await googleApiRequest.call(this, 'POST', '/directory/v1/groups', body);
}
//https://developers.google.com/admin-sdk/directory/v1/reference/groups/delete
@@ -175,14 +175,14 @@ export class GSuiteAdmin implements INodeType {
this,
'groups',
'GET',
`/directory/v1/groups`,
'/directory/v1/groups',
{},
qs,
);
} else {
qs.maxResults = this.getNodeParameter('limit', i);
responseData = await googleApiRequest.call(this, 'GET', `/directory/v1/groups`, {}, qs);
responseData = await googleApiRequest.call(this, 'GET', '/directory/v1/groups', {}, qs);
responseData = responseData.groups;
}
@@ -251,7 +251,7 @@ export class GSuiteAdmin implements INodeType {
delete body.emailUi;
}
responseData = await googleApiRequest.call(this, 'POST', `/directory/v1/users`, body, qs);
responseData = await googleApiRequest.call(this, 'POST', '/directory/v1/users', body, qs);
if (makeAdmin) {
await googleApiRequest.call(
@@ -345,14 +345,14 @@ export class GSuiteAdmin implements INodeType {
this,
'users',
'GET',
`/directory/v1/users`,
'/directory/v1/users',
{},
qs,
);
} else {
qs.maxResults = this.getNodeParameter('limit', i);
responseData = await googleApiRequest.call(this, 'GET', `/directory/v1/users`, {}, qs);
responseData = await googleApiRequest.call(this, 'GET', '/directory/v1/users', {}, qs);
responseData = responseData.users;
}

View File

@@ -126,7 +126,7 @@ export async function googleApiRequest(
const resource = this.getNodeParameter('resource', 0) as string;
if (resource === 'label') {
const errorOptions = {
message: `Label name exists already`,
message: 'Label name exists already',
description: '',
};
throw new NodeApiError(this.getNode(), error, errorOptions);
@@ -147,7 +147,7 @@ export async function googleApiRequest(
) {
const errorOptions = {
message: error.description,
description: ``,
description: '',
};
throw new NodeApiError(this.getNode(), error, errorOptions);
}
@@ -319,7 +319,7 @@ async function getAccessToken(
iss: credentials.email,
sub: credentials.delegatedEmail || credentials.email,
scope: scopes.join(' '),
aud: `https://oauth2.googleapis.com/token`,
aud: 'https://oauth2.googleapis.com/token',
iat: now,
exp: now + 3600,
},
@@ -405,7 +405,7 @@ export function prepareQuery(
if (!timestamp) {
const description = `'${qs.receivedAfter}' isn't a valid date and time. If you're using an expression, be sure to set an ISO date string or a timestamp.`;
throw new NodeOperationError(this.getNode(), `Invalid date/time in 'Received After' field`, {
throw new NodeOperationError(this.getNode(), "Invalid date/time in 'Received After' field", {
description,
});
}
@@ -434,7 +434,7 @@ export function prepareQuery(
if (!timestamp) {
const description = `'${qs.receivedBefore}' isn't a valid date and time. If you're using an expression, be sure to set an ISO date string or a timestamp.`;
throw new NodeOperationError(this.getNode(), `Invalid date/time in 'Received Before' field`, {
throw new NodeOperationError(this.getNode(), "Invalid date/time in 'Received Before' field", {
description,
});
}
@@ -463,7 +463,7 @@ export function prepareEmailsInput(
if (email.indexOf('@') === -1) {
const description = `The email address '${email}' in the '${fieldName}' field isn't valid`;
throw new NodeOperationError(this.getNode(), `Invalid email address`, {
throw new NodeOperationError(this.getNode(), 'Invalid email address', {
description,
itemIndex,
});
@@ -510,7 +510,7 @@ export async function prepareEmailAttachments(
for (const name of (property as string).split(',')) {
if (!items[itemIndex].binary || items[itemIndex].binary![name] === undefined) {
const description = `This node has no input field called '${name}' `;
throw new NodeOperationError(this.getNode(), `Attachment not found`, {
throw new NodeOperationError(this.getNode(), 'Attachment not found', {
description,
itemIndex,
});
@@ -521,7 +521,7 @@ export async function prepareEmailAttachments(
if (!items[itemIndex].binary![name] || !Buffer.isBuffer(binaryDataBuffer)) {
const description = `The input field '${name}' doesn't contain an attachment. Please make sure you specify a field containing binary data`;
throw new NodeOperationError(this.getNode(), `Attachment not found`, {
throw new NodeOperationError(this.getNode(), 'Attachment not found', {
description,
itemIndex,
});
@@ -675,7 +675,7 @@ export async function simplifyOutput(
this: IExecuteFunctions | IPollFunctions,
data: IDataObject[],
) {
const labelsData = await googleApiRequest.call(this, 'GET', `/gmail/v1/users/me/labels`);
const labelsData = await googleApiRequest.call(this, 'GET', '/gmail/v1/users/me/labels');
const labels = ((labelsData.labels as IDataObject[]) || []).map(({ id, name }) => ({
id,
name,

View File

@@ -211,7 +211,7 @@ export class GmailTrigger implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/gmail/v1/users/me/messages`,
'/gmail/v1/users/me/messages',
{},
qs,
);

View File

@@ -231,7 +231,7 @@ export class GmailV1 implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/gmail/v1/users/me/labels`,
'/gmail/v1/users/me/labels',
{},
qs,
);
@@ -537,7 +537,7 @@ export class GmailV1 implements INodeType {
this,
'messages',
'GET',
`/gmail/v1/users/me/messages`,
'/gmail/v1/users/me/messages',
{},
qs,
);
@@ -546,7 +546,7 @@ export class GmailV1 implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/gmail/v1/users/me/messages`,
'/gmail/v1/users/me/messages',
{},
qs,
);
@@ -765,7 +765,7 @@ export class GmailV1 implements INodeType {
this,
'drafts',
'GET',
`/gmail/v1/users/me/drafts`,
'/gmail/v1/users/me/drafts',
{},
qs,
);
@@ -774,7 +774,7 @@ export class GmailV1 implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/gmail/v1/users/me/drafts`,
'/gmail/v1/users/me/drafts',
{},
qs,
);

View File

@@ -260,7 +260,7 @@ export class GmailV2 implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await googleApiRequest.call(this, 'GET', `/gmail/v1/users/me/labels`);
responseData = await googleApiRequest.call(this, 'GET', '/gmail/v1/users/me/labels');
responseData = this.helpers.returnJsonArray(responseData.labels);
@@ -390,7 +390,7 @@ export class GmailV2 implements INodeType {
this,
'messages',
'GET',
`/gmail/v1/users/me/messages`,
'/gmail/v1/users/me/messages',
{},
qs,
);
@@ -399,7 +399,7 @@ export class GmailV2 implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/gmail/v1/users/me/messages`,
'/gmail/v1/users/me/messages',
{},
qs,
);
@@ -613,7 +613,7 @@ export class GmailV2 implements INodeType {
this,
'drafts',
'GET',
`/gmail/v1/users/me/drafts`,
'/gmail/v1/users/me/drafts',
{},
qs,
);
@@ -622,7 +622,7 @@ export class GmailV2 implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/gmail/v1/users/me/drafts`,
'/gmail/v1/users/me/drafts',
{},
qs,
);
@@ -713,7 +713,7 @@ export class GmailV2 implements INodeType {
this,
'threads',
'GET',
`/gmail/v1/users/me/threads`,
'/gmail/v1/users/me/threads',
{},
qs,
);
@@ -722,7 +722,7 @@ export class GmailV2 implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/gmail/v1/users/me/threads`,
'/gmail/v1/users/me/threads',
{},
qs,
);

View File

@@ -121,7 +121,7 @@ export async function getAccessToken(
iss: credentials.email,
sub: credentials.delegatedEmail || credentials.email,
scope: scopes.join(' '),
aud: `https://oauth2.googleapis.com/token`,
aud: 'https://oauth2.googleapis.com/token',
iat: now,
exp: now + 3600,
},

View File

@@ -481,7 +481,7 @@ export class GoogleSheet {
if (keyRowIndex < 0 || dataStartRowIndex < keyRowIndex || keyRowIndex >= inputData.length) {
// The key row does not exist so it is not possible to look up the data
throw new NodeOperationError(this.executeFunctions.getNode(), `The key row does not exist!`);
throw new NodeOperationError(this.executeFunctions.getNode(), 'The key row does not exist!');
}
// Create the keys array

View File

@@ -481,7 +481,7 @@ export class GoogleSheetsV1 implements INodeType {
: undefined;
body.properties.locale = options.locale ? (options.locale as string) : undefined;
responseData = await googleApiRequest.call(this, 'POST', `/v4/spreadsheets`, body);
responseData = await googleApiRequest.call(this, 'POST', '/v4/spreadsheets', body);
returnData.push(responseData);
} catch (error) {

View File

@@ -155,13 +155,15 @@ export const descriptions: INodeProperties[] = [
type: 'string',
extractValue: {
type: 'regex',
regex: `https:\\/\\/docs\\.google\\.com\/spreadsheets\\/d\\/[0-9a-zA-Z\\-_]+\\/edit\\#gid=([0-9]+)`,
regex:
'https:\\/\\/docs\\.google\\.com/spreadsheets\\/d\\/[0-9a-zA-Z\\-_]+\\/edit\\#gid=([0-9]+)',
},
validation: [
{
type: 'regex',
properties: {
regex: `https:\\/\\/docs\\.google\\.com\/spreadsheets\\/d\\/[0-9a-zA-Z\\-_]+\\/edit\\#gid=([0-9]+)`,
regex:
'https:\\/\\/docs\\.google\\.com/spreadsheets\\/d\\/[0-9a-zA-Z\\-_]+\\/edit\\#gid=([0-9]+)',
errorMessage: 'Not a valid Sheet URL',
},
},

View File

@@ -234,7 +234,7 @@ export async function execute(
if (handlingExtraDataOption === 'error') {
Object.keys(items[i].json).forEach((key) => {
if (!columnNames.includes(key)) {
throw new NodeOperationError(this.getNode(), `Unexpected fields in node input`, {
throw new NodeOperationError(this.getNode(), 'Unexpected fields in node input', {
itemIndex: i,
description: `The input field '${key}' doesn't match any column in the Sheet. You can ignore this by changing the 'Handling extra data' field, which you can find under 'Options'.`,
});

View File

@@ -232,7 +232,7 @@ export async function execute(
if (handlingExtraDataOption === 'error') {
Object.keys(items[i].json).forEach((key) => {
if (!columnNames.includes(key)) {
throw new NodeOperationError(this.getNode(), `Unexpected fields in node input`, {
throw new NodeOperationError(this.getNode(), 'Unexpected fields in node input', {
itemIndex: i,
description: `The input field '${key}' doesn't match any column in the Sheet. You can ignore this by changing the 'Handling extra data' field, which you can find under 'Options'.`,
});

View File

@@ -145,7 +145,7 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
body.properties.autoRecalc = options.autoRecalc ? (options.autoRecalc as string) : undefined;
body.properties.locale = options.locale ? (options.locale as string) : undefined;
const response = await apiRequest.call(this, 'POST', `/v4/spreadsheets`, body);
const response = await apiRequest.call(this, 'POST', '/v4/spreadsheets', body);
returnData.push(response);
}

View File

@@ -547,7 +547,7 @@ export class GoogleSheet {
if (keyRowIndex < 0 || dataStartRowIndex < keyRowIndex || keyRowIndex >= inputData.length) {
// The key row does not exist so it is not possible to look up the data
throw new NodeOperationError(this.executeFunctions.getNode(), `The key row does not exist`);
throw new NodeOperationError(this.executeFunctions.getNode(), 'The key row does not exist');
}
// Create the keys array

View File

@@ -267,7 +267,7 @@ export async function autoMapInputData(
items.forEach((item, itemIndex) => {
Object.keys(item.json).forEach((key) => {
if (!columnNames.includes(key)) {
throw new NodeOperationError(this.getNode(), `Unexpected fields in node input`, {
throw new NodeOperationError(this.getNode(), 'Unexpected fields in node input', {
itemIndex,
description: `The input field '${key}' doesn't match any column in the Sheet. You can ignore this by changing the 'Handling extra data' field, which you can find under 'Options'.`,
});

View File

@@ -122,7 +122,7 @@ export async function getAccessToken(
iss: credentials.email,
sub: credentials.delegatedEmail || credentials.email,
scope: scopes.join(' '),
aud: `https://oauth2.googleapis.com/token`,
aud: 'https://oauth2.googleapis.com/token',
iat: now,
exp: now + 3600,
},

View File

@@ -112,7 +112,7 @@ async function getAccessToken(
iss: credentials.email,
sub: credentials.email,
scope: scopes.join(' '),
aud: `https://oauth2.googleapis.com/token`,
aud: 'https://oauth2.googleapis.com/token',
iat: now,
exp: now + 3600,
},

View File

@@ -195,7 +195,7 @@ export class GoogleTranslate implements INodeType {
const text = this.getNodeParameter('text', i) as string;
const translateTo = this.getNodeParameter('translateTo', i) as string;
const response = await googleApiRequest.call(this, 'POST', `/language/translate/v2`, {
const response = await googleApiRequest.call(this, 'POST', '/language/translate/v2', {
q: text,
target: translateTo,
});

View File

@@ -217,7 +217,7 @@ export class YouTube implements INodeType {
qs.id = channelId;
responseData = await googleApiRequest.call(this, 'GET', `/youtube/v3/channels`, {}, qs);
responseData = await googleApiRequest.call(this, 'GET', '/youtube/v3/channels', {}, qs);
responseData = responseData.items;
}
@@ -257,7 +257,7 @@ export class YouTube implements INodeType {
this,
'items',
'GET',
`/youtube/v3/channels`,
'/youtube/v3/channels',
{},
qs,
);
@@ -266,7 +266,7 @@ export class YouTube implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/youtube/v3/channels`,
'/youtube/v3/channels',
{},
qs,
);
@@ -434,7 +434,7 @@ export class YouTube implements INodeType {
responseData = await googleApiRequest.call(
this,
'PUT',
`/youtube/v3/channels`,
'/youtube/v3/channels',
{
id: channelId,
brandingSettings: {
@@ -467,7 +467,7 @@ export class YouTube implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/youtube/v3/playlists`,
'/youtube/v3/playlists',
{},
qs,
);
@@ -500,7 +500,7 @@ export class YouTube implements INodeType {
this,
'items',
'GET',
`/youtube/v3/playlists`,
'/youtube/v3/playlists',
{},
qs,
);
@@ -509,7 +509,7 @@ export class YouTube implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/youtube/v3/playlists`,
'/youtube/v3/playlists',
{},
qs,
);
@@ -651,7 +651,7 @@ export class YouTube implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/youtube/v3/playlistItems`,
'/youtube/v3/playlistItems',
{},
qs,
);
@@ -681,7 +681,7 @@ export class YouTube implements INodeType {
this,
'items',
'GET',
`/youtube/v3/playlistItems`,
'/youtube/v3/playlistItems',
{},
qs,
);
@@ -690,7 +690,7 @@ export class YouTube implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/youtube/v3/playlistItems`,
'/youtube/v3/playlistItems',
{},
qs,
);
@@ -793,7 +793,7 @@ export class YouTube implements INodeType {
if (qs.relatedToVideoId && qs.forDeveloper !== undefined) {
throw new NodeOperationError(
this.getNode(),
`When using the parameter 'related to video' the parameter 'for developer' cannot be set`,
"When using the parameter 'related to video' the parameter 'for developer' cannot be set",
{ itemIndex: i },
);
}
@@ -803,13 +803,13 @@ export class YouTube implements INodeType {
this,
'items',
'GET',
`/youtube/v3/search`,
'/youtube/v3/search',
{},
qs,
);
} else {
qs.maxResults = this.getNodeParameter('limit', i);
responseData = await googleApiRequest.call(this, 'GET', `/youtube/v3/search`, {}, qs);
responseData = await googleApiRequest.call(this, 'GET', '/youtube/v3/search', {}, qs);
responseData = responseData.items;
}
}
@@ -840,7 +840,7 @@ export class YouTube implements INodeType {
Object.assign(qs, options);
responseData = await googleApiRequest.call(this, 'GET', `/youtube/v3/videos`, {}, qs);
responseData = await googleApiRequest.call(this, 'GET', '/youtube/v3/videos', {}, qs);
responseData = responseData.items;
}
@@ -962,7 +962,7 @@ export class YouTube implements INodeType {
delete options.notifySubscribers;
}
responseData = await googleApiRequest.call(this, 'PUT', `/youtube/v3/videos`, data, qs);
responseData = await googleApiRequest.call(this, 'PUT', '/youtube/v3/videos', data, qs);
}
//https://developers.google.com/youtube/v3/docs/playlists/update
if (operation === 'update') {
@@ -1085,7 +1085,7 @@ export class YouTube implements INodeType {
responseData = await googleApiRequest.call(
this,
'GET',
`/youtube/v3/videoCategories`,
'/youtube/v3/videoCategories',
{},
qs,
);

View File

@@ -179,7 +179,7 @@ export class Gotify implements INodeType {
Object.assign(body, additionalFields);
responseData = await gotifyApiRequest.call(this, 'POST', `/message`, body);
responseData = await gotifyApiRequest.call(this, 'POST', '/message', body);
}
if (operation === 'delete') {
const messageId = this.getNodeParameter('messageId', i) as string;
@@ -202,7 +202,7 @@ export class Gotify implements INodeType {
);
} else {
qs.limit = this.getNodeParameter('limit', i);
responseData = await gotifyApiRequest.call(this, 'GET', `/message`, {}, qs);
responseData = await gotifyApiRequest.call(this, 'GET', '/message', {}, qs);
responseData = responseData.messages;
}
}

View File

@@ -143,7 +143,7 @@ export class HaloPSA implements INodeType {
const response = (await haloPSAApiRequest.call(
this,
'GET',
`/TicketType`,
'/TicketType',
tokens.access_token,
{},
)) as IDataObject[];
@@ -178,7 +178,7 @@ export class HaloPSA implements INodeType {
const response = (await haloPSAApiRequest.call(
this,
'GET',
`/agent`,
'/agent',
tokens.access_token,
{},
)) as IDataObject[];
@@ -294,7 +294,7 @@ export class HaloPSA implements INodeType {
this,
'clients',
'GET',
`/client`,
'/client',
tokens.access_token,
{},
qs,
@@ -305,7 +305,7 @@ export class HaloPSA implements INodeType {
const { clients } = await haloPSAApiRequest.call(
this,
'GET',
`/client`,
'/client',
tokens.access_token,
{},
qs,
@@ -401,7 +401,7 @@ export class HaloPSA implements INodeType {
this,
'sites',
'GET',
`/site`,
'/site',
tokens.access_token,
{},
qs,
@@ -412,7 +412,7 @@ export class HaloPSA implements INodeType {
const { sites } = await haloPSAApiRequest.call(
this,
'GET',
`/site`,
'/site',
tokens.access_token,
{},
qs,
@@ -510,7 +510,7 @@ export class HaloPSA implements INodeType {
this,
'tickets',
'GET',
`/tickets`,
'/tickets',
tokens.access_token,
{},
qs,
@@ -521,7 +521,7 @@ export class HaloPSA implements INodeType {
const { tickets } = await haloPSAApiRequest.call(
this,
'GET',
`/tickets`,
'/tickets',
tokens.access_token,
{},
qs,
@@ -618,7 +618,7 @@ export class HaloPSA implements INodeType {
this,
'users',
'GET',
`/users`,
'/users',
tokens.access_token,
{},
qs,
@@ -629,7 +629,7 @@ export class HaloPSA implements INodeType {
const { users } = await haloPSAApiRequest.call(
this,
'GET',
`/users`,
'/users',
tokens.access_token,
{},
qs,

View File

@@ -665,7 +665,7 @@ export class Harvest implements INodeType {
requestMethod = 'GET';
endpoint = `users/me`;
endpoint = 'users/me';
const responseData = await harvestApiRequest.call(this, requestMethod, qs, endpoint);
@@ -871,7 +871,7 @@ export class Harvest implements INodeType {
// ----------------------------------
requestMethod = 'GET';
endpoint = `company`;
endpoint = 'company';
const responseData = await harvestApiRequest.call(this, requestMethod, qs, endpoint);

View File

@@ -236,7 +236,7 @@ export class HtmlExtract implements INodeType {
htmlArray = item.json[dataPropertyName] as string;
} else {
if (item.binary === undefined) {
throw new NodeOperationError(this.getNode(), `No item does not contain binary data!`, {
throw new NodeOperationError(this.getNode(), 'No item does not contain binary data!', {
itemIndex,
});
}

View File

@@ -1106,7 +1106,7 @@ export class HttpRequestV3 implements INodeType {
} catch (_) {
throw new NodeOperationError(
this.getNode(),
`JSON parameter need to be an valid JSON`,
'JSON parameter need to be an valid JSON',
{
runIndex: itemIndex,
},
@@ -1156,7 +1156,7 @@ export class HttpRequestV3 implements INodeType {
} catch (_) {
throw new NodeOperationError(
this.getNode(),
`JSON parameter need to be an valid JSON`,
'JSON parameter need to be an valid JSON',
{
runIndex: itemIndex,
},
@@ -1181,7 +1181,7 @@ export class HttpRequestV3 implements INodeType {
} catch (_) {
throw new NodeOperationError(
this.getNode(),
`JSON parameter need to be an valid JSON`,
'JSON parameter need to be an valid JSON',
{
runIndex: itemIndex,
},

View File

@@ -1997,7 +1997,7 @@ export async function validateCredentials(
const options: OptionsWithUri = {
method: 'GET',
headers: {},
uri: `https://api.hubapi.com/deals/v1/deal/paged`,
uri: 'https://api.hubapi.com/deals/v1/deal/paged',
json: true,
};

View File

@@ -187,7 +187,7 @@ export class Hubspot implements INodeType {
if (err.statusCode === 401) {
return {
status: 'Error',
message: `Invalid credentials`,
message: 'Invalid credentials',
};
}
}
@@ -1938,7 +1938,7 @@ export class Hubspot implements INodeType {
if (options.propertiesWithHistory) {
qs.propertiesWithHistory = (options.propertiesWithHistory as string).split(',');
}
const endpoint = `/companies/v2/companies/paged`;
const endpoint = '/companies/v2/companies/paged';
if (returnAll) {
responseData = await hubspotApiRequestAllItems.call(
this,
@@ -1959,13 +1959,13 @@ export class Hubspot implements INodeType {
let endpoint;
const returnAll = this.getNodeParameter('returnAll', 0);
if (operation === 'getRecentlyCreated') {
endpoint = `/companies/v2/companies/recent/created`;
endpoint = '/companies/v2/companies/recent/created';
} else {
const filters = this.getNodeParameter('filters', i);
if (filters.since) {
qs.since = new Date(filters.since as string).getTime();
}
endpoint = `/companies/v2/companies/recent/modified`;
endpoint = '/companies/v2/companies/recent/modified';
}
if (returnAll) {
responseData = await hubspotApiRequestAllItems.call(
@@ -2176,7 +2176,7 @@ export class Hubspot implements INodeType {
? (propertiesWithHistory as string).split(',')
: propertiesWithHistory;
}
const endpoint = `/deals/v1/deal/paged`;
const endpoint = '/deals/v1/deal/paged';
if (returnAll) {
responseData = await hubspotApiRequestAllItems.call(
this,
@@ -2203,9 +2203,9 @@ export class Hubspot implements INodeType {
qs.includePropertyVersions = filters.includePropertyVersions as boolean;
}
if (operation === 'getRecentlyCreated') {
endpoint = `/deals/v1/deal/recent/created`;
endpoint = '/deals/v1/deal/recent/created';
} else {
endpoint = `/deals/v1/deal/recent/modified`;
endpoint = '/deals/v1/deal/recent/modified';
}
if (returnAll) {
responseData = await hubspotApiRequestAllItems.call(
@@ -2295,7 +2295,7 @@ export class Hubspot implements INodeType {
if (!Object.keys(metadata).length) {
throw new NodeOperationError(
this.getNode(),
`At least one metadata field needs to set`,
'At least one metadata field needs to set',
{ itemIndex: i },
);
}
@@ -2350,7 +2350,7 @@ export class Hubspot implements INodeType {
//https://legacydocs.hubspot.com/docs/methods/engagements/get-all-engagements
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', 0);
const endpoint = `/engagements/v1/engagements/paged`;
const endpoint = '/engagements/v1/engagements/paged';
if (returnAll) {
responseData = await hubspotApiRequestAllItems.call(
this,
@@ -2578,7 +2578,7 @@ export class Hubspot implements INodeType {
',',
);
}
const endpoint = `/crm-objects/v1/objects/tickets/paged`;
const endpoint = '/crm-objects/v1/objects/tickets/paged';
if (returnAll) {
responseData = await hubspotApiRequestAllItems.call(
this,

View File

@@ -328,7 +328,7 @@ export class HubspotTrigger implements INodeType {
endpoint = `/webhooks/v3/${appId}/subscriptions`;
if (Array.isArray(events) && events.length === 0) {
throw new NodeOperationError(this.getNode(), `You must define at least one event`);
throw new NodeOperationError(this.getNode(), 'You must define at least one event');
}
for (const event of events) {

View File

@@ -94,7 +94,7 @@ export class HumanticAi implements INodeType {
responseData = await humanticAiApiRequest.call(
this,
'POST',
`/user-profile/create`,
'/user-profile/create',
{},
qs,
{
@@ -112,7 +112,7 @@ export class HumanticAi implements INodeType {
responseData = await humanticAiApiRequest.call(
this,
'GET',
`/user-profile/create`,
'/user-profile/create',
{},
qs,
);
@@ -134,7 +134,7 @@ export class HumanticAi implements INodeType {
qs.persona = (options.persona as string[]).join(',');
}
responseData = await humanticAiApiRequest.call(this, 'GET', `/user-profile`, {}, qs);
responseData = await humanticAiApiRequest.call(this, 'GET', '/user-profile', {}, qs);
responseData = responseData.results;
}
if (operation === 'update') {
@@ -167,7 +167,7 @@ export class HumanticAi implements INodeType {
responseData = await humanticAiApiRequest.call(
this,
'POST',
`/user-profile/create`,
'/user-profile/create',
{},
qs,
{
@@ -193,7 +193,7 @@ export class HumanticAi implements INodeType {
responseData = await humanticAiApiRequest.call(
this,
'POST',
`/user-profile/create`,
'/user-profile/create',
body,
qs,
);

View File

@@ -767,7 +767,8 @@ return 0;`,
this.getNode(),
`Couldn't find the field '${fieldToSplitOut}' in the input data`,
{
description: `If you're trying to use a nested field, make sure you turn off 'disable dot notation' in the node options`,
description:
"If you're trying to use a nested field, make sure you turn off 'disable dot notation' in the node options",
},
);
} else {
@@ -901,7 +902,8 @@ return 0;`,
this.getNode(),
`Couldn't find the field '${fieldToAggregate}' in the input data`,
{
description: `If you're trying to use a nested field, make sure you turn off 'disable dot notation' in the node options`,
description:
"If you're trying to use a nested field, make sure you turn off 'disable dot notation' in the node options",
},
);
} else if (!found && !keepMissing) {
@@ -931,7 +933,7 @@ return 0;`,
throw new NodeOperationError(
this.getNode(),
`The '${field}' output field is used more than once`,
{ description: `Please make sure each output field name is unique` },
{ description: 'Please make sure each output field name is unique' },
);
} else {
outputFields.push(field);
@@ -1132,7 +1134,7 @@ return 0;`,
let type: any = undefined;
for (const item of newItems) {
if (key === '') {
throw new NodeOperationError(this.getNode(), `Name of field to compare is blank`);
throw new NodeOperationError(this.getNode(), 'Name of field to compare is blank');
}
const value = !disableDotNotation ? get(item.json, key) : item.json[key];
if (value === undefined && disableDotNotation && key.includes('.')) {
@@ -1140,7 +1142,8 @@ return 0;`,
this.getNode(),
`'${key}' field is missing from some input items`,
{
description: `If you're trying to use a nested field, make sure you turn off 'disable dot notation' in the node options`,
description:
"If you're trying to use a nested field, make sure you turn off 'disable dot notation' in the node options",
},
);
} else if (value === undefined) {
@@ -1225,7 +1228,8 @@ return 0;`,
this.getNode(),
`Couldn't find the field '${fieldName}' in the input data`,
{
description: `If you're trying to use a nested field, make sure you turn off 'disable dot notation' in the node options`,
description:
"If you're trying to use a nested field, make sure you turn off 'disable dot notation' in the node options",
},
);
} else if (!found) {
@@ -1328,7 +1332,7 @@ return 0;`,
} else {
throw new NodeOperationError(
this.getNode(),
`Sort code doesn't return. Please add a 'return' statement to your code`,
"Sort code doesn't return. Please add a 'return' statement to your code",
);
}
}

View File

@@ -232,7 +232,7 @@ export class Iterable implements INodeType {
if (by === 'email') {
const email = this.getNodeParameter('email', i) as string;
endpoint = `/users/getByEmail`;
endpoint = '/users/getByEmail';
qs.email = email;
} else {
const userId = this.getNodeParameter('userId', i) as string;
@@ -244,7 +244,7 @@ export class Iterable implements INodeType {
if (!this.continueOnFail()) {
if (Object.keys(responseData).length === 0) {
throw new NodeApiError(this.getNode(), responseData, {
message: `User not found`,
message: 'User not found',
httpCode: '404',
});
}

View File

@@ -77,7 +77,7 @@ export const userFields: INodeProperties[] = [
default: '',
},
{
displayName: `Create If Doesn't exist`,
displayName: "Create If Doesn't Exist",
name: 'preferUserId',
type: 'boolean',
required: true,

View File

@@ -428,7 +428,7 @@ export class Jenkins implements INodeType {
loadOptions: {
async getJobs(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const endpoint = `/api/json`;
const endpoint = '/api/json';
const { jobs } = await jenkinsApiRequest.call(this, 'GET', endpoint);
for (const job of jobs) {
returnData.push({
@@ -530,7 +530,7 @@ export class Jenkins implements INodeType {
from: job,
};
const endpoint = `/createItem`;
const endpoint = '/createItem';
try {
await jenkinsApiRequest.call(this, 'POST', endpoint, queryParams);
responseData = { success: true };
@@ -553,7 +553,7 @@ export class Jenkins implements INodeType {
const body = this.getNodeParameter('xml', i) as string;
const endpoint = `/createItem`;
const endpoint = '/createItem';
await jenkinsApiRequest.call(this, 'POST', endpoint, queryParams, body, {
headers,
json: false,
@@ -573,17 +573,17 @@ export class Jenkins implements INodeType {
};
}
const endpoint = `/quietDown`;
const endpoint = '/quietDown';
await jenkinsApiRequest.call(this, 'POST', endpoint, queryParams);
responseData = { success: true };
}
if (operation === 'cancelQuietDown') {
const endpoint = `/cancelQuietDown`;
const endpoint = '/cancelQuietDown';
await jenkinsApiRequest.call(this, 'POST', endpoint);
responseData = { success: true };
}
if (operation === 'restart') {
const endpoint = `/restart`;
const endpoint = '/restart';
try {
await jenkinsApiRequest.call(this, 'POST', endpoint);
} catch (error) {
@@ -595,7 +595,7 @@ export class Jenkins implements INodeType {
}
}
if (operation === 'safeRestart') {
const endpoint = `/safeRestart`;
const endpoint = '/safeRestart';
try {
await jenkinsApiRequest.call(this, 'POST', endpoint);
} catch (error) {
@@ -607,12 +607,12 @@ export class Jenkins implements INodeType {
}
}
if (operation === 'exit') {
const endpoint = `/exit`;
const endpoint = '/exit';
await jenkinsApiRequest.call(this, 'POST', endpoint);
responseData = { success: true };
}
if (operation === 'safeExit') {
const endpoint = `/safeExit`;
const endpoint = '/safeExit';
await jenkinsApiRequest.call(this, 'POST', endpoint);
responseData = { success: true };
}

View File

@@ -753,7 +753,7 @@ export class Jira implements INodeType {
responseData = await jiraSoftwareCloudApiRequestAllItems.call(
this,
'issues',
`/api/2/search`,
'/api/2/search',
'POST',
body,
);
@@ -762,7 +762,7 @@ export class Jira implements INodeType {
body.maxResults = limit;
responseData = await jiraSoftwareCloudApiRequest.call(
this,
`/api/2/search`,
'/api/2/search',
'POST',
body,
);

View File

@@ -369,7 +369,7 @@ export class JiraTrigger implements INodeType {
const events = this.getNodeParameter('events') as string[];
const endpoint = `/webhooks/1.0/webhook`;
const endpoint = '/webhooks/1.0/webhook';
const webhooks = await jiraSoftwareCloudApiRequest.call(this, endpoint, 'GET', {});
@@ -389,7 +389,7 @@ export class JiraTrigger implements INodeType {
const additionalFields = this.getNodeParameter('additionalFields') as IDataObject;
const endpoint = `/webhooks/1.0/webhook`;
const endpoint = '/webhooks/1.0/webhook';
const webhookData = this.getWorkflowStaticData('node');
@@ -430,7 +430,7 @@ export class JiraTrigger implements INodeType {
);
}
if (!httpQueryAuth.name && !httpQueryAuth.value) {
throw new NodeOperationError(this.getNode(), `HTTP Query Auth credentials are empty`);
throw new NodeOperationError(this.getNode(), 'HTTP Query Auth credentials are empty');
}
parameters[encodeURIComponent(httpQueryAuth.name as string)] = Buffer.from(
httpQueryAuth.value as string,

View File

@@ -26,7 +26,7 @@ export async function lineApiRequest(
method,
body,
qs,
uri: uri || ``,
uri: uri || '',
json: true,
};
options = Object.assign({}, options, option);

View File

@@ -167,7 +167,7 @@ export class LingvaNex implements INodeType {
Object.assign(body, options);
const response = await lingvaNexApiRequest.call(this, 'POST', `/translate`, body);
const response = await lingvaNexApiRequest.call(this, 'POST', '/translate', body);
responseData.push(response);
}
}

View File

@@ -990,7 +990,7 @@ export async function getProductAttributes(
this,
'items',
'GET',
`/rest/default/V1/products/attributes`,
'/rest/default/V1/products/attributes',
{},
{
search_criteria: 0,

View File

@@ -210,7 +210,7 @@ export class Magento2 implements INodeType {
const types = (await magentoApiRequest.call(
this,
'GET',
`/rest/default/V1/products/types`,
'/rest/default/V1/products/types',
)) as IDataObject[];
const returnData: INodePropertyOptions[] = [];
for (const type of types) {
@@ -227,7 +227,7 @@ export class Magento2 implements INodeType {
const { items: categories } = (await magentoApiRequest.call(
this,
'GET',
`/rest/default/V1/categories/list`,
'/rest/default/V1/categories/list',
{},
{
search_criteria: {
@@ -260,7 +260,7 @@ export class Magento2 implements INodeType {
const { items: attributeSets } = (await magentoApiRequest.call(
this,
'GET',
`/rest/default/V1/products/attribute-sets/sets/list`,
'/rest/default/V1/products/attribute-sets/sets/list',
{},
{
search_criteria: 0,
@@ -439,7 +439,7 @@ export class Magento2 implements INodeType {
this,
'items',
'GET',
`/rest/default/V1/customers/search`,
'/rest/default/V1/customers/search',
{},
qs as unknown as IDataObject,
);
@@ -449,7 +449,7 @@ export class Magento2 implements INodeType {
responseData = await magentoApiRequest.call(
this,
'GET',
`/rest/default/V1/customers/search`,
'/rest/default/V1/customers/search',
{},
qs as unknown as IDataObject,
);
@@ -617,7 +617,7 @@ export class Magento2 implements INodeType {
this,
'items',
'GET',
`/rest/default/V1/orders`,
'/rest/default/V1/orders',
{},
qs as unknown as IDataObject,
);
@@ -627,7 +627,7 @@ export class Magento2 implements INodeType {
responseData = await magentoApiRequest.call(
this,
'GET',
`/rest/default/V1/orders`,
'/rest/default/V1/orders',
{},
qs as unknown as IDataObject,
);
@@ -739,7 +739,7 @@ export class Magento2 implements INodeType {
this,
'items',
'GET',
`/rest/default/V1/products`,
'/rest/default/V1/products',
{},
qs as unknown as IDataObject,
);
@@ -749,7 +749,7 @@ export class Magento2 implements INodeType {
responseData = await magentoApiRequest.call(
this,
'GET',
`/rest/default/V1/products`,
'/rest/default/V1/products',
{},
qs as unknown as IDataObject,
);

View File

@@ -29,7 +29,7 @@ export async function mailchimpApiRequest(
method,
qs,
body,
url: ``,
url: '',
json: true,
};

View File

@@ -2119,7 +2119,7 @@ export class Mailchimp implements INodeType {
if (returnAll) {
responseData = await mailchimpApiRequestAllItems.call(
this,
`/campaigns`,
'/campaigns',
'GET',
'campaigns',
{},
@@ -2127,7 +2127,7 @@ export class Mailchimp implements INodeType {
);
} else {
qs.count = this.getNodeParameter('limit', i);
responseData = await mailchimpApiRequest.call(this, `/campaigns`, 'GET', {}, qs);
responseData = await mailchimpApiRequest.call(this, '/campaigns', 'GET', {}, qs);
responseData = responseData.campaigns;
}
}

View File

@@ -136,14 +136,14 @@ export class MailerLite implements INodeType {
responseData = await mailerliteApiRequestAllItems.call(
this,
'GET',
`/subscribers`,
'/subscribers',
{},
qs,
);
} else {
qs.limit = this.getNodeParameter('limit', i);
responseData = await mailerliteApiRequest.call(this, 'GET', `/subscribers`, {}, qs);
responseData = await mailerliteApiRequest.call(this, 'GET', '/subscribers', {}, qs);
}
}
//https://developers.mailerlite.com/reference#update-subscriber

View File

@@ -136,7 +136,7 @@ export class Mailjet implements INodeType {
if (parsedJson === undefined) {
throw new NodeOperationError(
this.getNode(),
`Parameter 'Variables (JSON)' has a invalid JSON`,
"Parameter 'Variables (JSON)' has a invalid JSON",
{ itemIndex: i },
);
}
@@ -231,7 +231,7 @@ export class Mailjet implements INodeType {
if (parsedJson === undefined) {
throw new NodeOperationError(
this.getNode(),
`Parameter 'Variables (JSON)' has a invalid JSON`,
"Parameter 'Variables (JSON)' has a invalid JSON",
{ itemIndex: i },
);
}

View File

@@ -73,7 +73,7 @@ export class MailjetTrigger implements INodeType {
webhookMethods = {
default: {
async checkExists(this: IHookFunctions): Promise<boolean> {
const endpoint = `/v3/rest/eventcallbackurl`;
const endpoint = '/v3/rest/eventcallbackurl';
const responseData = await mailjetApiRequest.call(this, 'GET', endpoint);
const event = this.getNodeParameter('event') as string;

View File

@@ -75,7 +75,7 @@ export async function handleMatrixCall(
if (roomAlias) {
body.room_alias_name = roomAlias;
}
return matrixApiRequest.call(this, 'POST', `/createRoom`, body);
return matrixApiRequest.call(this, 'POST', '/createRoom', body);
} else if (operation === 'join') {
const roomIdOrAlias = this.getNodeParameter('roomIdOrAlias', index) as string;
return matrixApiRequest.call(this, 'POST', `/rooms/${roomIdOrAlias}/join`);
@@ -214,7 +214,7 @@ export async function handleMatrixCall(
const uploadRequestResult = await matrixApiRequest.call(
this,
'POST',
`/upload`,
'/upload',
body,
qs,
headers,

Some files were not shown because too many files have changed in this diff Show More