mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor: Impose import/order linting rule across nodes packages (no-changelog) (#12314)
This commit is contained in:
committed by
GitHub
parent
8c635993bd
commit
bafac73eb5
@@ -1,3 +1,7 @@
|
||||
import { capitalCase } from 'change-case';
|
||||
import omit from 'lodash/omit';
|
||||
import pickBy from 'lodash/pickBy';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
@@ -9,15 +13,8 @@ import type {
|
||||
IRequestOptions,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import { capitalCase } from 'change-case';
|
||||
|
||||
import omit from 'lodash/omit';
|
||||
import pickBy from 'lodash/pickBy';
|
||||
|
||||
import type { CustomField, GeneralAddress, Ref } from './descriptions/Shared.interface';
|
||||
|
||||
import type { DateFieldsUi, Option, QuickBooksOAuth2Credentials, TransactionReport } from './types';
|
||||
|
||||
/**
|
||||
@@ -43,9 +40,7 @@ export async function quickBooksApiRequest(
|
||||
const productionUrl = 'https://quickbooks.api.intuit.com';
|
||||
const sandboxUrl = 'https://sandbox-quickbooks.api.intuit.com';
|
||||
|
||||
const credentials = (await this.getCredentials(
|
||||
'quickBooksOAuth2Api',
|
||||
)) as QuickBooksOAuth2Credentials;
|
||||
const credentials = await this.getCredentials<QuickBooksOAuth2Credentials>('quickBooksOAuth2Api');
|
||||
|
||||
const options: IRequestOptions = {
|
||||
headers: {
|
||||
@@ -236,9 +231,9 @@ export async function handleBinaryData(
|
||||
const data = await quickBooksApiRequest.call(this, 'GET', endpoint, {}, {}, { encoding: null });
|
||||
|
||||
items[i].binary = items[i].binary ?? {};
|
||||
items[i].binary![binaryProperty] = await this.helpers.prepareBinaryData(data as Buffer);
|
||||
items[i].binary![binaryProperty].fileName = fileName;
|
||||
items[i].binary![binaryProperty].fileExtension = 'pdf';
|
||||
items[i].binary[binaryProperty] = await this.helpers.prepareBinaryData(data as Buffer);
|
||||
items[i].binary[binaryProperty].fileName = fileName;
|
||||
items[i].binary[binaryProperty].fileExtension = 'pdf';
|
||||
|
||||
return items;
|
||||
}
|
||||
@@ -254,9 +249,7 @@ export async function loadResource(this: ILoadOptionsFunctions, resource: string
|
||||
oauthTokenData: {
|
||||
callbackQueryString: { realmId },
|
||||
},
|
||||
} = await this.getCredentials<{
|
||||
oauthTokenData: { callbackQueryString: { realmId: string } };
|
||||
}>('quickBooksOAuth2Api');
|
||||
} = await this.getCredentials<QuickBooksOAuth2Credentials>('quickBooksOAuth2Api');
|
||||
const endpoint = `/v3/company/${realmId}/query`;
|
||||
|
||||
const resourceItems = await quickBooksApiRequestAllItems.call(
|
||||
|
||||
Reference in New Issue
Block a user