ci: Fix linting issues on master (no-changelog) (#5030)

* make CI logs less noisy. suppress linting warning

* fix linting issues
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2022-12-23 19:09:52 +01:00 committed by GitHub
parent a8f4efaf3e
commit a229788d4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
131 changed files with 177 additions and 173 deletions

View file

@ -24,7 +24,7 @@
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && node scripts/build.mjs", "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && node scripts/build.mjs",
"dev": "concurrently -k -n \"TypeScript,Node\" -c \"yellow.bold,cyan.bold\" \"npm run watch\" \"nodemon\"", "dev": "concurrently -k -n \"TypeScript,Node\" -c \"yellow.bold,cyan.bold\" \"npm run watch\" \"nodemon\"",
"format": "prettier --write . --ignore-path ../../.prettierignore", "format": "prettier --write . --ignore-path ../../.prettierignore",
"lint": "eslint .", "lint": "eslint --quiet .",
"lintfix": "eslint . --fix", "lintfix": "eslint . --fix",
"postpack": "rm -f oclif.manifest.json", "postpack": "rm -f oclif.manifest.json",
"prepack": "oclif-dev manifest", "prepack": "oclif-dev manifest",

View file

@ -24,7 +24,7 @@
"build": "tsc -p tsconfig.build.json", "build": "tsc -p tsconfig.build.json",
"dev": "pnpm watch", "dev": "pnpm watch",
"format": "prettier --write . --ignore-path ../../.prettierignore", "format": "prettier --write . --ignore-path ../../.prettierignore",
"lint": "eslint .", "lint": "eslint --quiet .",
"lintfix": "eslint . --fix", "lintfix": "eslint . --fix",
"watch": "tsc -p tsconfig.build.json --watch", "watch": "tsc -p tsconfig.build.json --watch",
"test": "jest" "test": "jest"

View file

@ -22,7 +22,7 @@
"build:storybook": "build-storybook", "build:storybook": "build-storybook",
"storybook": "start-storybook -p 6006", "storybook": "start-storybook -p 6006",
"format": "prettier --write . --ignore-path ../../.prettierignore", "format": "prettier --write . --ignore-path ../../.prettierignore",
"lint": "eslint --ext .js,.ts,.vue src", "lint": "eslint --quiet --ext .js,.ts,.vue src",
"lintfix": "eslint --ext .js,.ts,.vue src --fix" "lintfix": "eslint --ext .js,.ts,.vue src --fix"
}, },
"peerDependencies": { "peerDependencies": {

View file

@ -18,7 +18,7 @@
"build": "cross-env VUE_APP_PUBLIC_PATH=\"/{{BASE_PATH}}/\" NODE_OPTIONS=\"--max-old-space-size=8192\" vite build", "build": "cross-env VUE_APP_PUBLIC_PATH=\"/{{BASE_PATH}}/\" NODE_OPTIONS=\"--max-old-space-size=8192\" vite build",
"typecheck": "vue-tsc --emitDeclarationOnly", "typecheck": "vue-tsc --emitDeclarationOnly",
"dev": "pnpm serve", "dev": "pnpm serve",
"lint": "eslint --ext .js,.ts,.vue src", "lint": "eslint --quiet --ext .js,.ts,.vue src",
"lintfix": "eslint --ext .js,.ts,.vue src --fix", "lintfix": "eslint --ext .js,.ts,.vue src --fix",
"format": "prettier --write . --ignore-path ../../.prettierignore", "format": "prettier --write . --ignore-path ../../.prettierignore",
"serve": "cross-env VUE_APP_URL_BASE_API=http://localhost:5678/ vite --host 0.0.0.0 --port 8080 dev", "serve": "cross-env VUE_APP_URL_BASE_API=http://localhost:5678/ vite --host 0.0.0.0 --port 8080 dev",

View file

@ -24,7 +24,7 @@
"build": "tsc --noEmit", "build": "tsc --noEmit",
"build-node-dev": "tsc", "build-node-dev": "tsc",
"format": "prettier --write . --ignore-path ../../.prettierignore", "format": "prettier --write . --ignore-path ../../.prettierignore",
"lint": "eslint .", "lint": "eslint --quiet .",
"lintfix": "eslint . --fix", "lintfix": "eslint . --fix",
"postpack": "rm -f oclif.manifest.json", "postpack": "rm -f oclif.manifest.json",
"prepack": "echo \"Building project...\" && rm -rf dist && tsc -b && oclif-dev manifest", "prepack": "echo \"Building project...\" && rm -rf dist && tsc -b && oclif-dev manifest",

View file

@ -45,10 +45,10 @@ export async function acuitySchedulingApiRequest(
password: credentials.apiKey as string, password: credentials.apiKey as string,
}; };
return await this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
delete options.auth; delete options.auth;
return await this.helpers.requestOAuth2!.call( return await this.helpers.requestOAuth2.call(
this, this,
'acuitySchedulingOAuth2Api', 'acuitySchedulingOAuth2Api',
options, options,

View file

@ -38,7 +38,7 @@ export async function affinityApiRequest(
} }
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -48,7 +48,7 @@ export async function agileCrmApiRequest(
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }
@ -126,7 +126,7 @@ export async function agileCrmApiRequestUpdate(
if (payload.properties) { if (payload.properties) {
options.body.properties = payload.properties; options.body.properties = payload.properties;
options.uri = baseUri + 'api/contacts/edit-properties'; options.uri = baseUri + 'api/contacts/edit-properties';
lastSuccesfulUpdateReturn = await this.helpers.request!(options); lastSuccesfulUpdateReturn = await this.helpers.request(options);
// Iterate trough properties and show them as individial updates instead of only vague "properties" // Iterate trough properties and show them as individial updates instead of only vague "properties"
payload.properties?.map((property: any) => { payload.properties?.map((property: any) => {
@ -138,7 +138,7 @@ export async function agileCrmApiRequestUpdate(
if (payload.lead_score) { if (payload.lead_score) {
options.body.lead_score = payload.lead_score; options.body.lead_score = payload.lead_score;
options.uri = baseUri + 'api/contacts/edit/lead-score'; options.uri = baseUri + 'api/contacts/edit/lead-score';
lastSuccesfulUpdateReturn = await this.helpers.request!(options); lastSuccesfulUpdateReturn = await this.helpers.request(options);
successfulUpdates.push('lead_score'); successfulUpdates.push('lead_score');
@ -147,7 +147,7 @@ export async function agileCrmApiRequestUpdate(
if (body.tags) { if (body.tags) {
options.body.tags = payload.tags; options.body.tags = payload.tags;
options.uri = baseUri + 'api/contacts/edit/tags'; options.uri = baseUri + 'api/contacts/edit/tags';
lastSuccesfulUpdateReturn = await this.helpers.request!(options); lastSuccesfulUpdateReturn = await this.helpers.request(options);
payload.tags?.map((tag: string) => { payload.tags?.map((tag: string) => {
successfulUpdates.push(`(Tag) ${tag}`); successfulUpdates.push(`(Tag) ${tag}`);
@ -158,7 +158,7 @@ export async function agileCrmApiRequestUpdate(
if (body.star_value) { if (body.star_value) {
options.body.star_value = payload.star_value; options.body.star_value = payload.star_value;
options.uri = baseUri + 'api/contacts/edit/add-star'; options.uri = baseUri + 'api/contacts/edit/add-star';
lastSuccesfulUpdateReturn = await this.helpers.request!(options); lastSuccesfulUpdateReturn = await this.helpers.request(options);
successfulUpdates.push('star_value'); successfulUpdates.push('star_value');

View file

@ -39,7 +39,7 @@ export async function autopilotApiRequest(
} }
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -173,7 +173,7 @@ export async function validateCredentials(
body: signOpts.body, body: signOpts.body,
}; };
const response = await this.helpers.request!(options); const response = await this.helpers.request(options);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
parseString(response, { explicitArray: false }, (err, data) => { parseString(response, { explicitArray: false }, (err, data) => {

View file

@ -63,7 +63,7 @@ export async function awsApiRequest(
}; };
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); // no XML parsing needed throw new NodeApiError(this.getNode(), error); // no XML parsing needed
} }

View file

@ -37,7 +37,7 @@ export async function bannerbearApiRequest(
} }
options.headers = Object.assign({}, options.headers, headers); options.headers = Object.assign({}, options.headers, headers);
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -39,7 +39,7 @@ export async function baserowApiRequest(
} }
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }
@ -97,7 +97,7 @@ export async function getJwtToken(
}; };
try { try {
const { token } = (await this.helpers.request!(options)) as { token: string }; const { token } = (await this.helpers.request(options)) as { token: string };
return token; return token;
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);

View file

@ -35,7 +35,7 @@ export async function bitbucketApiRequest(
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -38,9 +38,9 @@ export async function bitlyApiRequest(
const credentials = await this.getCredentials('bitlyApi'); const credentials = await this.getCredentials('bitlyApi');
options.headers = { Authorization: `Bearer ${credentials.accessToken}` }; options.headers = { Authorization: `Bearer ${credentials.accessToken}` };
return await this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
return await this.helpers.requestOAuth2!.call(this, 'bitlyOAuth2Api', options, { return await this.helpers.requestOAuth2.call(this, 'bitlyOAuth2Api', options, {
tokenType: 'Bearer', tokenType: 'Bearer',
}); });
} }

View file

@ -43,7 +43,7 @@ export async function bitwardenApiRequest(
} }
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }
@ -76,7 +76,7 @@ export async function getAccessToken(
}; };
try { try {
const { access_token } = await this.helpers.request!(options); const { access_token } = await this.helpers.request(options);
return access_token; return access_token;
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);

View file

@ -45,7 +45,7 @@ export async function brandfetchApiRequest(
delete options.qs; delete options.qs;
} }
const response = await this.helpers.request!(options); const response = await this.helpers.request(options);
if (response.statusCode && response.statusCode !== 200) { if (response.statusCode && response.statusCode !== 200) {
throw new NodeApiError(this.getNode(), response); throw new NodeApiError(this.getNode(), response);

View file

@ -48,7 +48,7 @@ export async function bubbleApiRequest(
} }
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -89,5 +89,5 @@ export async function validateCredentials(
uri: 'https://calendly.com/api/v1/users/me', uri: 'https://calendly.com/api/v1/users/me',
}); });
} }
return this.helpers.request!(options); return this.helpers.request(options);
} }

View file

@ -36,7 +36,7 @@ export async function circleciApiRequest(
delete options.body; delete options.body;
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -42,7 +42,7 @@ export async function webexApiRequest(
delete options.qs; delete options.qs;
} }
//@ts-ignore //@ts-ignore
return this.helpers.requestOAuth2.call(this, 'ciscoWebexOAuth2Api', options, { return await this.helpers.requestOAuth2.call(this, 'ciscoWebexOAuth2Api', options, {
tokenType: 'Bearer', tokenType: 'Bearer',
}); });
} catch (error) { } catch (error) {

View file

@ -35,7 +35,7 @@ export async function citrixADCApiRequest(
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
try { try {
return this.helpers.requestWithAuthentication.call(this, 'citrixAdcApi', options); return await this.helpers.requestWithAuthentication.call(this, 'citrixAdcApi', options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error as JsonObject); throw new NodeApiError(this.getNode(), error as JsonObject);
} }

View file

@ -34,7 +34,7 @@ export async function clearbitApiRequest(
delete options.body; delete options.body;
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -47,7 +47,7 @@ export async function clickupApiRequest(
tokenType: 'Bearer', tokenType: 'Bearer',
}; };
// @ts-ignore // @ts-ignore
return await this.helpers.requestOAuth2!.call( return await this.helpers.requestOAuth2.call(
this, this,
'clickUpOAuth2Api', 'clickUpOAuth2Api',
options, options,

View file

@ -33,7 +33,7 @@ export async function cockpitApiRequest(
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -28,7 +28,7 @@ export async function codaApiRequest(
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -33,7 +33,7 @@ export async function contentfulApiRequest(
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -45,7 +45,7 @@ export async function convertKitApiRequest(
} }
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -65,7 +65,7 @@ export async function copperApiRequest(
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -35,7 +35,7 @@ export async function demioApiRequest(
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -42,7 +42,7 @@ export async function dhlApiRequest(
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }
@ -70,5 +70,5 @@ export async function validateCredentials(
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }

View file

@ -42,7 +42,7 @@ export async function disqusApiRequest(
delete options.body; delete options.body;
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -39,9 +39,9 @@ export async function driftApiRequest(
options.headers!.Authorization = `Bearer ${credentials.accessToken}`; options.headers!.Authorization = `Bearer ${credentials.accessToken}`;
return this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
return this.helpers.requestOAuth2!.call(this, 'driftOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'driftOAuth2Api', options);
} }
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);

View file

@ -39,7 +39,7 @@ export async function erpNextApiRequest(
delete options.qs; delete options.qs;
} }
try { try {
return this.helpers.requestWithAuthentication.call(this, 'erpNextApi', options); return await this.helpers.requestWithAuthentication.call(this, 'erpNextApi', options);
} catch (error) { } catch (error) {
if (error.statusCode === 403) { if (error.statusCode === 403) {
throw new NodeApiError(this.getNode(), { message: 'DocType unavailable.' }); throw new NodeApiError(this.getNode(), { message: 'DocType unavailable.' });

View file

@ -55,7 +55,7 @@ export async function egoiApiRequest(
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -44,7 +44,7 @@ export async function elasticSecurityApiRequest(
} }
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
if (error?.error?.error === 'Not Acceptable' && error?.error?.message) { if (error?.error?.error === 'Not Acceptable' && error?.error?.message) {
error.error.error = `${error.error.error}: ${error.error.message}`; error.error.error = `${error.error.error}: ${error.error.message}`;

View file

@ -50,7 +50,7 @@ export async function emeliaApiRequest(
}; };
try { try {
return this.helpers.request!.call(this, options); return await this.helpers.request.call(this, options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error as JsonObject); throw new NodeApiError(this.getNode(), error as JsonObject);
} }
@ -129,7 +129,7 @@ export async function emeliaApiTest(
}; };
try { try {
await this.helpers.request!(options); await this.helpers.request(options);
} catch (error) { } catch (error) {
return { return {
status: 'Error', status: 'Error',

View file

@ -45,9 +45,9 @@ export async function eventbriteApiRequest(
const credentials = await this.getCredentials('eventbriteApi'); const credentials = await this.getCredentials('eventbriteApi');
options.headers!.Authorization = `Bearer ${credentials.apiKey}`; options.headers!.Authorization = `Bearer ${credentials.apiKey}`;
return await this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
return await this.helpers.requestOAuth2!.call(this, 'eventbriteOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'eventbriteOAuth2Api', options);
} }
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error as JsonObject); throw new NodeApiError(this.getNode(), error as JsonObject);

View file

@ -50,7 +50,7 @@ export async function facebookApiRequest(
}; };
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -33,7 +33,7 @@ export async function figmaApiRequest(
delete options.body; delete options.body;
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -48,7 +48,7 @@ export async function layoutsApiRequest(
}; };
try { try {
const responseData = await this.helpers.request!(options); const responseData = await this.helpers.request(options);
const items = parseLayouts(responseData.response.layouts); const items = parseLayouts(responseData.response.layouts);
items.sort((a, b) => (a.name > b.name ? 0 : 1)); items.sort((a, b) => (a.name > b.name ? 0 : 1));
return items; return items;
@ -95,7 +95,7 @@ export async function getFields(this: ILoadOptionsFunctions): Promise<any> {
}; };
try { try {
const responseData = await this.helpers.request!(options); const responseData = await this.helpers.request(options);
return responseData.response.fieldMetaData; return responseData.response.fieldMetaData;
} catch (error) { } catch (error) {
// If that data does not exist for some reason return the actual error // If that data does not exist for some reason return the actual error
@ -126,7 +126,7 @@ export async function getPortals(this: ILoadOptionsFunctions): Promise<any> {
}; };
try { try {
const responseData = await this.helpers.request!(options); const responseData = await this.helpers.request(options);
return responseData.response.portalMetaData; return responseData.response.portalMetaData;
} catch (error) { } catch (error) {
// If that data does not exist for some reason return the actual error // If that data does not exist for some reason return the actual error
@ -156,7 +156,7 @@ export async function getScripts(this: ILoadOptionsFunctions): Promise<any> {
}; };
try { try {
const responseData = await this.helpers.request!(options); const responseData = await this.helpers.request(options);
const items = parseScriptsList(responseData.response.scripts); const items = parseScriptsList(responseData.response.scripts);
items.sort((a, b) => (a.name > b.name ? 0 : 1)); items.sort((a, b) => (a.name > b.name ? 0 : 1));
return items; return items;
@ -216,7 +216,7 @@ export async function getToken(
}; };
try { try {
const response = await this.helpers.request!(requestOptions); const response = await this.helpers.request(requestOptions);
if (typeof response === 'string') { if (typeof response === 'string') {
throw new NodeOperationError( throw new NodeOperationError(
@ -252,7 +252,7 @@ export async function logout(
}; };
try { try {
const response = await this.helpers.request!(requestOptions); const response = await this.helpers.request(requestOptions);
if (typeof response === 'string') { if (typeof response === 'string') {
throw new NodeOperationError( throw new NodeOperationError(

View file

@ -33,7 +33,7 @@ export async function flowApiRequest(
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -34,7 +34,7 @@ async function getToken(
}; };
try { try {
const responseObject = await this.helpers.request!(options); const responseObject = await this.helpers.request(options);
return responseObject.headers['x-jwt-token']; return responseObject.headers['x-jwt-token'];
} catch (error) { } catch (error) {
throw new Error( throw new Error(
@ -72,7 +72,7 @@ export async function formIoApiRequest(
}; };
try { try {
return this.helpers.request!.call(this, options); return await this.helpers.request.call(this, options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -74,9 +74,9 @@ export async function apiRequest(
const credentials = (await this.getCredentials('formstackApi')) as IDataObject; const credentials = (await this.getCredentials('formstackApi')) as IDataObject;
options.headers!.Authorization = `Bearer ${credentials.accessToken}`; options.headers!.Authorization = `Bearer ${credentials.accessToken}`;
return await this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
return await this.helpers.requestOAuth2!.call(this, 'formstackOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'formstackOAuth2Api', options);
} }
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);

View file

@ -39,7 +39,7 @@ export async function freshdeskApiRequest(
} }
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -45,7 +45,7 @@ export async function freshserviceApiRequest(
} }
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
if (error.error.description === 'Validation failed') { if (error.error.description === 'Validation failed') {
const numberOfErrors = error.error.errors.length; const numberOfErrors = error.error.errors.length;

View file

@ -57,7 +57,7 @@ export async function goToWebinarApiRequest(
} }
try { try {
const response = await this.helpers.requestOAuth2!.call(this, 'goToWebinarOAuth2Api', options, { const response = await this.helpers.requestOAuth2.call(this, 'goToWebinarOAuth2Api', options, {
tokenExpiredStatusCode: 403, tokenExpiredStatusCode: 403,
}); });

View file

@ -52,7 +52,7 @@ export async function googleApiRequest(
const { access_token } = await getAccessToken.call(this, credentials as IDataObject); const { access_token } = await getAccessToken.call(this, credentials as IDataObject);
options.headers!.Authorization = `Bearer ${access_token}`; options.headers!.Authorization = `Bearer ${access_token}`;
return await this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
//@ts-ignore //@ts-ignore
return await this.helpers.requestOAuth2.call(this, 'googleBigQueryOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'googleBigQueryOAuth2Api', options);
@ -134,7 +134,7 @@ async function getAccessToken(
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }
export function simplify(rows: IDataObject[], fields: string[]) { export function simplify(rows: IDataObject[], fields: string[]) {

View file

@ -143,5 +143,5 @@ async function getAccessToken(
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }

View file

@ -40,7 +40,7 @@ export async function googleApiRequest(
delete options.body; delete options.body;
} }
//@ts-ignore //@ts-ignore
return this.helpers.requestOAuth2.call(this, 'googleCalendarOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'googleCalendarOAuth2Api', options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -154,7 +154,7 @@ export async function getAccessToken(
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }
export function validateJSON(json: string | undefined): any { export function validateJSON(json: string | undefined): any {

View file

@ -53,7 +53,7 @@ export async function googleApiRequest(
); );
options.headers!.Authorization = `Bearer ${access_token}`; options.headers!.Authorization = `Bearer ${access_token}`;
return await this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
//@ts-ignore //@ts-ignore
return await this.helpers.requestOAuth2.call(this, 'googleDocsOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'googleDocsOAuth2Api', options);
@ -138,7 +138,7 @@ async function getAccessToken(
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }
export const hasKeys = (obj = {}) => Object.keys(obj).length > 0; export const hasKeys = (obj = {}) => Object.keys(obj).length > 0;

View file

@ -58,10 +58,10 @@ export async function googleApiRequest(
); );
options.headers!.Authorization = `Bearer ${access_token}`; options.headers!.Authorization = `Bearer ${access_token}`;
return this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
//@ts-ignore //@ts-ignore
return this.helpers.requestOAuth2.call(this, 'googleDriveOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'googleDriveOAuth2Api', options);
} }
} catch (error) { } catch (error) {
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') { if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
@ -145,7 +145,7 @@ async function getAccessToken(
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }
export function extractId(url: string): string { export function extractId(url: string): string {

View file

@ -38,7 +38,7 @@ export async function googleApiRequest(
delete options.body; delete options.body;
} }
return await this.helpers.requestOAuth2!.call( return await this.helpers.requestOAuth2.call(
this, this,
'googleFirebaseRealtimeDatabaseOAuth2Api', 'googleFirebaseRealtimeDatabaseOAuth2Api',
options, options,

View file

@ -347,7 +347,7 @@ async function getAccessToken(
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }
export function prepareQuery( export function prepareQuery(

View file

@ -149,7 +149,7 @@ export async function getAccessToken(
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }
// Hex to RGB // Hex to RGB

View file

@ -53,9 +53,9 @@ export async function apiRequest(
options.headers!.Authorization = `Bearer ${access_token}`; options.headers!.Authorization = `Bearer ${access_token}`;
return await this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
return await this.helpers.requestOAuth2!.call(this, 'googleSheetsOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'googleSheetsOAuth2Api', options);
} }
} catch (error) { } catch (error) {
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') { if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
@ -150,5 +150,5 @@ export async function getAccessToken(
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }

View file

@ -55,9 +55,9 @@ export async function googleApiRequest(
credentials as unknown as IGoogleAuthCredentials, credentials as unknown as IGoogleAuthCredentials,
); );
options.headers.Authorization = `Bearer ${access_token}`; options.headers.Authorization = `Bearer ${access_token}`;
return await this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
return await this.helpers.requestOAuth2!.call(this, 'googleSlidesOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'googleSlidesOAuth2Api', options);
} }
} catch (error) { } catch (error) {
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') { if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
@ -117,5 +117,5 @@ async function getAccessToken(
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }

View file

@ -140,5 +140,5 @@ async function getAccessToken(
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }

View file

@ -49,7 +49,7 @@ export async function gristApiRequest(
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -39,7 +39,7 @@ export async function gumroadApiRequest(
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -22,7 +22,7 @@ export async function hackerNewsApiRequest(
}; };
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -46,7 +46,7 @@ export async function getAccessTokens(
}; };
try { try {
const tokens = await this.helpers.request!(options); const tokens = await this.helpers.request(options);
return tokens; return tokens;
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error as JsonObject); throw new NodeApiError(this.getNode(), error as JsonObject);
@ -89,7 +89,7 @@ export async function haloPSAApiRequest(
if (Object.keys(body).length === 0) { if (Object.keys(body).length === 0) {
delete options.body; delete options.body;
} }
const result = await this.helpers.request!(options); const result = await this.helpers.request(options);
if (method === 'DELETE' && result.id) { if (method === 'DELETE' && result.id) {
return { success: true }; return { success: true };
} }
@ -246,5 +246,5 @@ export async function validateCredentials(
json: true, json: true,
}; };
return (await this.helpers.request!(options)) as IHaloPSATokens; return (await this.helpers.request(options)) as IHaloPSATokens;
} }

View file

@ -44,9 +44,9 @@ export async function harvestApiRequest(
//@ts-ignore //@ts-ignore
options.headers.Authorization = `Bearer ${credentials.accessToken}`; options.headers.Authorization = `Bearer ${credentials.accessToken}`;
return await this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
return await this.helpers.requestOAuth2!.call(this, 'harvestOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'harvestOAuth2Api', options);
} }
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);

View file

@ -50,15 +50,15 @@ export async function hubspotApiRequest(
if (endpoint.includes('webhooks')) { if (endpoint.includes('webhooks')) {
const credentials = await this.getCredentials('hubspotDeveloperApi'); const credentials = await this.getCredentials('hubspotDeveloperApi');
options.qs.hapikey = credentials.apiKey as string; options.qs.hapikey = credentials.apiKey as string;
return await this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
return await this.helpers.requestOAuth2!.call(this, 'hubspotDeveloperApi', options, { return await this.helpers.requestOAuth2.call(this, 'hubspotDeveloperApi', options, {
tokenType: 'Bearer', tokenType: 'Bearer',
includeCredentialsOnRefreshOnBody: true, includeCredentialsOnRefreshOnBody: true,
}); });
} }
} else { } else {
return await this.helpers.requestOAuth2!.call(this, 'hubspotOAuth2Api', options, { return await this.helpers.requestOAuth2.call(this, 'hubspotOAuth2Api', options, {
tokenType: 'Bearer', tokenType: 'Bearer',
includeCredentialsOnRefreshOnBody: true, includeCredentialsOnRefreshOnBody: true,
}); });

View file

@ -38,7 +38,7 @@ export async function humanticAiApiRequest(
delete options.body; delete options.body;
} }
const response = await this.helpers.request!(options); const response = await this.helpers.request(options);
if (response.data && response.data.status === 'error') { if (response.data && response.data.status === 'error') {
throw new NodeApiError(this.getNode(), response.data); throw new NodeApiError(this.getNode(), response.data);

View file

@ -31,7 +31,7 @@ export async function hunterApiRequest(
delete options.body; delete options.body;
} }
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -35,7 +35,7 @@ export async function intercomApiRequest(
}; };
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -35,7 +35,7 @@ export async function jenkinsApiRequest(
}; };
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -41,7 +41,7 @@ export async function jotformApiRequest(
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -20,7 +20,7 @@ export async function kitemakerRequest(
json: true, json: true,
}; };
const responseData = await this.helpers.request!.call(this, options); const responseData = await this.helpers.request.call(this, options);
if (responseData.errors) { if (responseData.errors) {
throw new NodeApiError(this.getNode(), responseData); throw new NodeApiError(this.getNode(), responseData);

View file

@ -38,7 +38,7 @@ export async function linearApiRequest(
}; };
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error as JsonObject); throw new NodeApiError(this.getNode(), error as JsonObject);
} }
@ -90,7 +90,7 @@ export async function validateCredentials(
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }
//@ts-ignore //@ts-ignore

View file

@ -34,7 +34,7 @@ export async function lingvaNexApiRequest(
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
const response = await this.helpers.request!(options); const response = await this.helpers.request(options);
if (response.err !== null) { if (response.err !== null) {
throw new NodeApiError(this.getNode(), response); throw new NodeApiError(this.getNode(), response);

View file

@ -34,7 +34,7 @@ export async function linkedInApiRequest(
} }
try { try {
return await this.helpers.requestOAuth2!.call(this, 'linkedInOAuth2Api', options, { return await this.helpers.requestOAuth2.call(this, 'linkedInOAuth2Api', options, {
tokenType: 'Bearer', tokenType: 'Bearer',
}); });
} catch (error) { } catch (error) {

View file

@ -41,7 +41,7 @@ export async function mailCheckApiRequest(
if (Object.keys(body).length === 0) { if (Object.keys(body).length === 0) {
delete options.body; delete options.body;
} }
return await this.helpers.request!.call(this, options); return await this.helpers.request.call(this, options);
} catch (error) { } catch (error) {
if (error.response?.body?.message) { if (error.response?.body?.message) {
// Try to return the error prettier // Try to return the error prettier

View file

@ -56,7 +56,7 @@ export async function mailchimpApiRequest(
options.url = `${api_endpoint}/3.0${endpoint}`; options.url = `${api_endpoint}/3.0${endpoint}`;
//@ts-ignore //@ts-ignore
return await this.helpers.requestOAuth2!.call(this, 'mailchimpOAuth2Api', options, { return await this.helpers.requestOAuth2.call(this, 'mailchimpOAuth2Api', options, {
tokenType: 'Bearer', tokenType: 'Bearer',
}); });
} }
@ -114,7 +114,7 @@ async function getMetadata(
url: credentials.metadataUrl as string, url: credentials.metadataUrl as string,
json: true, json: true,
}; };
return this.helpers.request!(options); return this.helpers.request(options);
} }
export const campaignFieldsMetadata = [ export const campaignFieldsMetadata = [

View file

@ -29,7 +29,7 @@ export async function mandrillApiRequest(
}; };
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -41,7 +41,7 @@ export async function matrixApiRequest(
option.overridePrefix || 'client' option.overridePrefix || 'client'
}/r0${resource}`; }/r0${resource}`;
options.headers!.Authorization = `Bearer ${credentials.accessToken}`; options.headers!.Authorization = `Bearer ${credentials.accessToken}`;
const response = await this.helpers.request!(options); const response = await this.helpers.request(options);
// When working with images, the request cannot be JSON (it's raw binary data) // When working with images, the request cannot be JSON (it's raw binary data)
// But the output is JSON so we have to parse it manually. // But the output is JSON so we have to parse it manually.

View file

@ -39,9 +39,9 @@ export async function mediumApiRequest(
options.headers!.Authorization = `Bearer ${credentials.accessToken}`; options.headers!.Authorization = `Bearer ${credentials.accessToken}`;
return await this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
return await this.helpers.requestOAuth2!.call(this, 'mediumOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'mediumOAuth2Api', options);
} }
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);

View file

@ -32,7 +32,7 @@ export async function microsoftApiRequest(
delete options.body; delete options.body;
} }
//@ts-ignore //@ts-ignore
return this.helpers.requestOAuth2.call(this, 'microsoftToDoOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'microsoftToDoOAuth2Api', options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -40,7 +40,7 @@ export async function mispApiRequest(
} }
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
// MISP API wrongly returns 403 for malformed requests // MISP API wrongly returns 403 for malformed requests
if (error.statusCode === 403) { if (error.statusCode === 403) {

View file

@ -200,7 +200,7 @@ export class Mocean implements INodeType {
json: true, json: true,
}; };
try { try {
await this.helpers.request!(options); await this.helpers.request(options);
} catch (error) { } catch (error) {
return { return {
status: 'Error', status: 'Error',

View file

@ -32,9 +32,9 @@ export async function mondayComApiRequest(
options.headers = { Authorization: `Bearer ${credentials.apiToken}` }; options.headers = { Authorization: `Bearer ${credentials.apiToken}` };
return this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
return this.helpers.requestOAuth2!.call(this, 'mondayComOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'mondayComOAuth2Api', options);
} }
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);

View file

@ -49,7 +49,7 @@ export async function monicaCrmApiRequest(
} }
try { try {
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -44,7 +44,7 @@ export async function apiRequest(
}; };
try { try {
return this.helpers.requestWithAuthentication.call(this, 'n8nApi', options); return await this.helpers.requestWithAuthentication.call(this, 'n8nApi', options);
} catch (error) { } catch (error) {
if (error instanceof NodeApiError) { if (error instanceof NodeApiError) {
throw error; throw error;

View file

@ -43,7 +43,7 @@ export async function netlifyApiRequest(
options.headers!.Authorization = `Bearer ${credentials.accessToken}`; options.headers!.Authorization = `Bearer ${credentials.accessToken}`;
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -61,9 +61,9 @@ export async function notionApiRequest(
delete options.body; delete options.body;
} }
if (!uri) { if (!uri) {
return this.helpers.requestWithAuthentication.call(this, 'notionApi', options); return await this.helpers.requestWithAuthentication.call(this, 'notionApi', options);
} }
return this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -122,7 +122,7 @@ export async function odooJSONRPCRequest(
json: true, json: true,
}; };
const responce = await this.helpers.request!(options); const responce = await this.helpers.request(options);
if (responce.error) { if (responce.error) {
throw new NodeApiError(this.getNode(), responce.error.data, { throw new NodeApiError(this.getNode(), responce.error.data, {
message: responce.error.data.message, message: responce.error.data.message,

View file

@ -269,7 +269,7 @@ export class Odoo implements INodeType {
uri: `${(credentials?.url as string).replace(/\/$/, '')}/jsonrpc`, uri: `${(credentials?.url as string).replace(/\/$/, '')}/jsonrpc`,
json: true, json: true,
}; };
const result = await this.helpers.request!(options); const result = await this.helpers.request(options);
if (result.error || !result.result) { if (result.error || !result.result) {
return { return {
status: 'Error', status: 'Error',

View file

@ -42,7 +42,7 @@ export async function onfleetApiRequest(
}; };
try { try {
//@ts-ignore //@ts-ignore
return this.helpers.request(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error as JsonObject); throw new NodeApiError(this.getNode(), error as JsonObject);
} }

View file

@ -34,7 +34,7 @@ export async function openThesaurusApiRequest(
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
options.qs.format = 'application/json'; options.qs.format = 'application/json';
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -36,7 +36,7 @@ export async function orbitApiRequest(
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -41,7 +41,7 @@ export async function ouraApiRequest(
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -43,7 +43,7 @@ export async function paddleApiRequest(
body.vendor_id = credentials.vendorId; body.vendor_id = credentials.vendorId;
body.vendor_auth_code = credentials.vendorAuthCode; body.vendor_auth_code = credentials.vendorAuthCode;
try { try {
const response = await this.helpers.request!(options); const response = await this.helpers.request(options);
if (!response.success) { if (!response.success) {
throw new NodeApiError(this.getNode(), response); throw new NodeApiError(this.getNode(), response);

View file

@ -47,9 +47,9 @@ export async function pagerDutyApiRequest(
options.headers.Authorization = `Token token=${credentials.apiToken}`; options.headers.Authorization = `Token token=${credentials.apiToken}`;
return this.helpers.request!(options); return await this.helpers.request(options);
} else { } else {
return this.helpers.requestOAuth2!.call(this, 'pagerDutyOAuth2Api', options); return await this.helpers.requestOAuth2.call(this, 'pagerDutyOAuth2Api', options);
} }
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);

View file

@ -41,7 +41,7 @@ export async function payPalApiRequest(
json: true, json: true,
}; };
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }
@ -82,7 +82,7 @@ async function getAccessToken(
json: true, json: true,
}; };
try { try {
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeOperationError(this.getNode(), error); throw new NodeOperationError(this.getNode(), error);
} }

View file

@ -113,7 +113,7 @@ export class PayPal implements INodeType {
}; };
try { try {
await this.helpers.request!(options); await this.helpers.request(options);
return { return {
status: 'OK', status: 'OK',
message: 'Authentication successful!', message: 'Authentication successful!',

View file

@ -34,7 +34,7 @@ export async function peekalinkApiRequest(
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -34,7 +34,7 @@ export async function posthogApiRequest(
if (Object.keys(body).length === 0) { if (Object.keys(body).length === 0) {
delete options.body; delete options.body;
} }
return await this.helpers.request!(options); return await this.helpers.request(options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

View file

@ -28,7 +28,7 @@ export async function postmarkApiRequest(
options = Object.assign({}, options, option); options = Object.assign({}, options, option);
try { try {
return this.helpers.requestWithAuthentication.call(this, 'postmarkApi', options); return await this.helpers.requestWithAuthentication.call(this, 'postmarkApi', options);
} catch (error) { } catch (error) {
throw new NodeApiError(this.getNode(), error); throw new NodeApiError(this.getNode(), error);
} }

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