mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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:
@@ -63,49 +63,49 @@ export class MicrosoftDynamicsCrm implements INodeType {
|
||||
methods = {
|
||||
loadOptions: {
|
||||
async getAccountCategories(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'accountcategorycode');
|
||||
return getPicklistOptions.call(this, 'account', 'accountcategorycode');
|
||||
},
|
||||
async getAccountRatingCodes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'accountratingcode');
|
||||
return getPicklistOptions.call(this, 'account', 'accountratingcode');
|
||||
},
|
||||
async getAddressTypes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'address1_addresstypecode');
|
||||
return getPicklistOptions.call(this, 'account', 'address1_addresstypecode');
|
||||
},
|
||||
async getBusinessTypes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'businesstypecode');
|
||||
return getPicklistOptions.call(this, 'account', 'businesstypecode');
|
||||
},
|
||||
async getCustomerSizeCodes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'customersizecode');
|
||||
return getPicklistOptions.call(this, 'account', 'customersizecode');
|
||||
},
|
||||
async getCustomerTypeCodes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'customertypecode');
|
||||
return getPicklistOptions.call(this, 'account', 'customertypecode');
|
||||
},
|
||||
async getIndustryCodes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'industrycode');
|
||||
return getPicklistOptions.call(this, 'account', 'industrycode');
|
||||
},
|
||||
async getPaymentTermsCodes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'paymenttermscode');
|
||||
return getPicklistOptions.call(this, 'account', 'paymenttermscode');
|
||||
},
|
||||
async getPreferredAppointmentDayCodes(
|
||||
this: ILoadOptionsFunctions,
|
||||
): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'preferredappointmentdaycode');
|
||||
return getPicklistOptions.call(this, 'account', 'preferredappointmentdaycode');
|
||||
},
|
||||
async getPreferredAppointmentTimeCodes(
|
||||
this: ILoadOptionsFunctions,
|
||||
): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'preferredappointmenttimecode');
|
||||
return getPicklistOptions.call(this, 'account', 'preferredappointmenttimecode');
|
||||
},
|
||||
async getPreferredContactMethodCodes(
|
||||
this: ILoadOptionsFunctions,
|
||||
): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'preferredcontactmethodcode');
|
||||
return getPicklistOptions.call(this, 'account', 'preferredcontactmethodcode');
|
||||
},
|
||||
async getShippingMethodCodes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'shippingmethodcode');
|
||||
return getPicklistOptions.call(this, 'account', 'shippingmethodcode');
|
||||
},
|
||||
async getTerritoryCodes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
return await getPicklistOptions.call(this, 'account', 'territorycode');
|
||||
return getPicklistOptions.call(this, 'account', 'territorycode');
|
||||
},
|
||||
async getAccountFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const fields = await getEntityFields.call(this, 'account');
|
||||
@@ -177,9 +177,9 @@ export class MicrosoftDynamicsCrm implements INodeType {
|
||||
|
||||
if (options.returnFields) {
|
||||
options.returnFields.push('accountid');
|
||||
qs['$select'] = options.returnFields.join(',');
|
||||
qs.$select = options.returnFields.join(',');
|
||||
} else {
|
||||
qs['$select'] = 'accountid';
|
||||
qs.$select = 'accountid';
|
||||
}
|
||||
|
||||
responseData = await microsoftApiRequest.call(this, 'POST', `/accounts`, body, qs);
|
||||
@@ -197,10 +197,10 @@ export class MicrosoftDynamicsCrm implements INodeType {
|
||||
const accountId = this.getNodeParameter('accountId', i) as string;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.returnFields) {
|
||||
qs['$select'] = (options.returnFields as string[]).join(',');
|
||||
qs.$select = (options.returnFields as string[]).join(',');
|
||||
}
|
||||
if (options.expandFields) {
|
||||
qs['$expand'] = (options.expandFields as string[]).join(',');
|
||||
qs.$expand = (options.expandFields as string[]).join(',');
|
||||
}
|
||||
responseData = await microsoftApiRequest.call(
|
||||
this,
|
||||
@@ -217,13 +217,13 @@ export class MicrosoftDynamicsCrm implements INodeType {
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
if (options.returnFields) {
|
||||
qs['$select'] = (options.returnFields as string[]).join(',');
|
||||
qs.$select = (options.returnFields as string[]).join(',');
|
||||
}
|
||||
if (options.expandFields) {
|
||||
qs['$expand'] = (options.expandFields as string[]).join(',');
|
||||
qs.$expand = (options.expandFields as string[]).join(',');
|
||||
}
|
||||
if (filters.query) {
|
||||
qs['$filter'] = filters.query as string;
|
||||
qs.$filter = filters.query as string;
|
||||
}
|
||||
if (returnAll) {
|
||||
responseData = await microsoftApiRequestAllItems.call(
|
||||
@@ -235,7 +235,7 @@ export class MicrosoftDynamicsCrm implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', 0);
|
||||
qs.$top = this.getNodeParameter('limit', 0);
|
||||
responseData = await microsoftApiRequest.call(this, 'GET', `/accounts`, {}, qs);
|
||||
responseData = responseData.value;
|
||||
}
|
||||
@@ -260,9 +260,9 @@ export class MicrosoftDynamicsCrm implements INodeType {
|
||||
|
||||
if (options.returnFields) {
|
||||
options.returnFields.push('accountid');
|
||||
qs['$select'] = options.returnFields.join(',');
|
||||
qs.$select = options.returnFields.join(',');
|
||||
} else {
|
||||
qs['$select'] = 'accountid';
|
||||
qs.$select = 'accountid';
|
||||
}
|
||||
|
||||
responseData = await microsoftApiRequest.call(
|
||||
|
||||
Reference in New Issue
Block a user