mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Remove linting exceptions in nodes-base (#4794)
* ⚡ enabled array-type * ⚡ await-thenable on * ⚡ ban-types on * ⚡ default-param-last on * ⚡ dot-notation on * ⚡ member-delimiter-style on * ⚡ no-duplicate-imports on * ⚡ no-empty-interface on * ⚡ no-floating-promises on * ⚡ no-for-in-array on * ⚡ no-invalid-void-type on * ⚡ no-loop-func on * ⚡ no-shadow on * ⚡ ban-ts-comment re enabled * ⚡ @typescript-eslint/lines-between-class-members on * address my own comment * @typescript-eslint/return-await on * @typescript-eslint/promise-function-async on * @typescript-eslint/no-unnecessary-boolean-literal-compare on * @typescript-eslint/no-unnecessary-type-assertion on * prefer-const on * @typescript-eslint/prefer-optional-chain on Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -141,15 +141,15 @@ export class FreshworksCrm implements INodeType {
|
||||
},
|
||||
|
||||
async getBusinessTypes(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'business_types');
|
||||
return loadResource.call(this, 'business_types');
|
||||
},
|
||||
|
||||
async getCampaigns(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'campaigns');
|
||||
return loadResource.call(this, 'campaigns');
|
||||
},
|
||||
|
||||
async getContactStatuses(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'contact_statuses');
|
||||
return loadResource.call(this, 'contact_statuses');
|
||||
},
|
||||
|
||||
async getContactViews(this: ILoadOptionsFunctions) {
|
||||
@@ -171,27 +171,27 @@ export class FreshworksCrm implements INodeType {
|
||||
},
|
||||
|
||||
async getDealPaymentStatuses(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'deal_payment_statuses');
|
||||
return loadResource.call(this, 'deal_payment_statuses');
|
||||
},
|
||||
|
||||
async getDealPipelines(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'deal_pipelines');
|
||||
return loadResource.call(this, 'deal_pipelines');
|
||||
},
|
||||
|
||||
async getDealProducts(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'deal_products');
|
||||
return loadResource.call(this, 'deal_products');
|
||||
},
|
||||
|
||||
async getDealReasons(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'deal_reasons');
|
||||
return loadResource.call(this, 'deal_reasons');
|
||||
},
|
||||
|
||||
async getDealStages(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'deal_stages');
|
||||
return loadResource.call(this, 'deal_stages');
|
||||
},
|
||||
|
||||
async getDealTypes(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'deal_types');
|
||||
return loadResource.call(this, 'deal_types');
|
||||
},
|
||||
|
||||
async getDealViews(this: ILoadOptionsFunctions) {
|
||||
@@ -201,23 +201,23 @@ export class FreshworksCrm implements INodeType {
|
||||
},
|
||||
|
||||
async getIndustryTypes(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'industry_types');
|
||||
return loadResource.call(this, 'industry_types');
|
||||
},
|
||||
|
||||
async getLifecycleStages(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'lifecycle_stages');
|
||||
return loadResource.call(this, 'lifecycle_stages');
|
||||
},
|
||||
|
||||
async getOutcomes(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'sales_activity_outcomes');
|
||||
return loadResource.call(this, 'sales_activity_outcomes');
|
||||
},
|
||||
|
||||
async getSalesActivityTypes(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'sales_activity_types');
|
||||
return loadResource.call(this, 'sales_activity_types');
|
||||
},
|
||||
|
||||
async getTerritories(this: ILoadOptionsFunctions) {
|
||||
return await loadResource.call(this, 'territories');
|
||||
return loadResource.call(this, 'territories');
|
||||
},
|
||||
|
||||
async getUsers(this: ILoadOptionsFunctions) {
|
||||
@@ -379,7 +379,7 @@ export class FreshworksCrm implements INodeType {
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
if (attendees.length) {
|
||||
body['appointment_attendees_attributes'] = adjustAttendees(attendees);
|
||||
body.appointment_attendees_attributes = adjustAttendees(attendees);
|
||||
}
|
||||
responseData = await freshworksCrmApiRequest.call(this, 'POST', '/appointments', body);
|
||||
responseData = responseData.appointment;
|
||||
@@ -466,7 +466,7 @@ export class FreshworksCrm implements INodeType {
|
||||
Object.assign(body, rest);
|
||||
|
||||
if (attendees.length) {
|
||||
body['appointment_attendees_attributes'] = adjustAttendees(attendees);
|
||||
body.appointment_attendees_attributes = adjustAttendees(attendees);
|
||||
delete body.attendees;
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ export async function handleListing(
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (returnAll) {
|
||||
return await freshworksCrmApiRequestAllItems.call(this, method, endpoint, body, qs);
|
||||
return freshworksCrmApiRequestAllItems.call(this, method, endpoint, body, qs);
|
||||
}
|
||||
|
||||
const responseData = await freshworksCrmApiRequestAllItems.call(this, method, endpoint, body, qs);
|
||||
|
||||
@@ -260,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((timeZone) => ({ name: timeZone, value: timeZone })),
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -576,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((timeZone) => ({ name: timeZone, value: timeZone })),
|
||||
},
|
||||
{
|
||||
displayName: 'Title',
|
||||
|
||||
Reference in New Issue
Block a user