mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
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:
parent
a8f4efaf3e
commit
a229788d4b
|
@ -24,7 +24,7 @@
|
|||
"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\"",
|
||||
"format": "prettier --write . --ignore-path ../../.prettierignore",
|
||||
"lint": "eslint .",
|
||||
"lint": "eslint --quiet .",
|
||||
"lintfix": "eslint . --fix",
|
||||
"postpack": "rm -f oclif.manifest.json",
|
||||
"prepack": "oclif-dev manifest",
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"build": "tsc -p tsconfig.build.json",
|
||||
"dev": "pnpm watch",
|
||||
"format": "prettier --write . --ignore-path ../../.prettierignore",
|
||||
"lint": "eslint .",
|
||||
"lint": "eslint --quiet .",
|
||||
"lintfix": "eslint . --fix",
|
||||
"watch": "tsc -p tsconfig.build.json --watch",
|
||||
"test": "jest"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"build:storybook": "build-storybook",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"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"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"build": "cross-env VUE_APP_PUBLIC_PATH=\"/{{BASE_PATH}}/\" NODE_OPTIONS=\"--max-old-space-size=8192\" vite build",
|
||||
"typecheck": "vue-tsc --emitDeclarationOnly",
|
||||
"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",
|
||||
"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",
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"build": "tsc --noEmit",
|
||||
"build-node-dev": "tsc",
|
||||
"format": "prettier --write . --ignore-path ../../.prettierignore",
|
||||
"lint": "eslint .",
|
||||
"lint": "eslint --quiet .",
|
||||
"lintfix": "eslint . --fix",
|
||||
"postpack": "rm -f oclif.manifest.json",
|
||||
"prepack": "echo \"Building project...\" && rm -rf dist && tsc -b && oclif-dev manifest",
|
||||
|
|
|
@ -45,10 +45,10 @@ export async function acuitySchedulingApiRequest(
|
|||
password: credentials.apiKey as string,
|
||||
};
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
delete options.auth;
|
||||
return await this.helpers.requestOAuth2!.call(
|
||||
return await this.helpers.requestOAuth2.call(
|
||||
this,
|
||||
'acuitySchedulingOAuth2Api',
|
||||
options,
|
||||
|
|
|
@ -38,7 +38,7 @@ export async function affinityApiRequest(
|
|||
}
|
||||
options = Object.assign({}, options, option);
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ export async function agileCrmApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ export async function agileCrmApiRequestUpdate(
|
|||
if (payload.properties) {
|
||||
options.body.properties = payload.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"
|
||||
payload.properties?.map((property: any) => {
|
||||
|
@ -138,7 +138,7 @@ export async function agileCrmApiRequestUpdate(
|
|||
if (payload.lead_score) {
|
||||
options.body.lead_score = payload.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');
|
||||
|
||||
|
@ -147,7 +147,7 @@ export async function agileCrmApiRequestUpdate(
|
|||
if (body.tags) {
|
||||
options.body.tags = payload.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) => {
|
||||
successfulUpdates.push(`(Tag) ${tag}`);
|
||||
|
@ -158,7 +158,7 @@ export async function agileCrmApiRequestUpdate(
|
|||
if (body.star_value) {
|
||||
options.body.star_value = payload.star_value;
|
||||
options.uri = baseUri + 'api/contacts/edit/add-star';
|
||||
lastSuccesfulUpdateReturn = await this.helpers.request!(options);
|
||||
lastSuccesfulUpdateReturn = await this.helpers.request(options);
|
||||
|
||||
successfulUpdates.push('star_value');
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ export async function autopilotApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ export async function validateCredentials(
|
|||
body: signOpts.body,
|
||||
};
|
||||
|
||||
const response = await this.helpers.request!(options);
|
||||
const response = await this.helpers.request(options);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
parseString(response, { explicitArray: false }, (err, data) => {
|
||||
|
|
|
@ -63,7 +63,7 @@ export async function awsApiRequest(
|
|||
};
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error); // no XML parsing needed
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ export async function bannerbearApiRequest(
|
|||
}
|
||||
options.headers = Object.assign({}, options.headers, headers);
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ export async function baserowApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ export async function getJwtToken(
|
|||
};
|
||||
|
||||
try {
|
||||
const { token } = (await this.helpers.request!(options)) as { token: string };
|
||||
const { token } = (await this.helpers.request(options)) as { token: string };
|
||||
return token;
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
|
|
|
@ -35,7 +35,7 @@ export async function bitbucketApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -38,9 +38,9 @@ export async function bitlyApiRequest(
|
|||
const credentials = await this.getCredentials('bitlyApi');
|
||||
options.headers = { Authorization: `Bearer ${credentials.accessToken}` };
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
return await this.helpers.requestOAuth2!.call(this, 'bitlyOAuth2Api', options, {
|
||||
return await this.helpers.requestOAuth2.call(this, 'bitlyOAuth2Api', options, {
|
||||
tokenType: 'Bearer',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ export async function bitwardenApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ export async function getAccessToken(
|
|||
};
|
||||
|
||||
try {
|
||||
const { access_token } = await this.helpers.request!(options);
|
||||
const { access_token } = await this.helpers.request(options);
|
||||
return access_token;
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
|
|
|
@ -45,7 +45,7 @@ export async function brandfetchApiRequest(
|
|||
delete options.qs;
|
||||
}
|
||||
|
||||
const response = await this.helpers.request!(options);
|
||||
const response = await this.helpers.request(options);
|
||||
|
||||
if (response.statusCode && response.statusCode !== 200) {
|
||||
throw new NodeApiError(this.getNode(), response);
|
||||
|
|
|
@ -48,7 +48,7 @@ export async function bubbleApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -89,5 +89,5 @@ export async function validateCredentials(
|
|||
uri: 'https://calendly.com/api/v1/users/me',
|
||||
});
|
||||
}
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ export async function circleciApiRequest(
|
|||
delete options.body;
|
||||
}
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ export async function webexApiRequest(
|
|||
delete options.qs;
|
||||
}
|
||||
//@ts-ignore
|
||||
return this.helpers.requestOAuth2.call(this, 'ciscoWebexOAuth2Api', options, {
|
||||
return await this.helpers.requestOAuth2.call(this, 'ciscoWebexOAuth2Api', options, {
|
||||
tokenType: 'Bearer',
|
||||
});
|
||||
} catch (error) {
|
||||
|
|
|
@ -35,7 +35,7 @@ export async function citrixADCApiRequest(
|
|||
options = Object.assign({}, options, option);
|
||||
|
||||
try {
|
||||
return this.helpers.requestWithAuthentication.call(this, 'citrixAdcApi', options);
|
||||
return await this.helpers.requestWithAuthentication.call(this, 'citrixAdcApi', options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ export async function clearbitApiRequest(
|
|||
delete options.body;
|
||||
}
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ export async function clickupApiRequest(
|
|||
tokenType: 'Bearer',
|
||||
};
|
||||
// @ts-ignore
|
||||
return await this.helpers.requestOAuth2!.call(
|
||||
return await this.helpers.requestOAuth2.call(
|
||||
this,
|
||||
'clickUpOAuth2Api',
|
||||
options,
|
||||
|
|
|
@ -33,7 +33,7 @@ export async function cockpitApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ export async function codaApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ export async function contentfulApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ export async function convertKitApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ export async function copperApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ export async function demioApiRequest(
|
|||
|
||||
options = Object.assign({}, options, option);
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ export async function dhlApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
@ -70,5 +70,5 @@ export async function validateCredentials(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ export async function disqusApiRequest(
|
|||
delete options.body;
|
||||
}
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -39,9 +39,9 @@ export async function driftApiRequest(
|
|||
|
||||
options.headers!.Authorization = `Bearer ${credentials.accessToken}`;
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
return this.helpers.requestOAuth2!.call(this, 'driftOAuth2Api', options);
|
||||
return await this.helpers.requestOAuth2.call(this, 'driftOAuth2Api', options);
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
|
|
|
@ -39,7 +39,7 @@ export async function erpNextApiRequest(
|
|||
delete options.qs;
|
||||
}
|
||||
try {
|
||||
return this.helpers.requestWithAuthentication.call(this, 'erpNextApi', options);
|
||||
return await this.helpers.requestWithAuthentication.call(this, 'erpNextApi', options);
|
||||
} catch (error) {
|
||||
if (error.statusCode === 403) {
|
||||
throw new NodeApiError(this.getNode(), { message: 'DocType unavailable.' });
|
||||
|
|
|
@ -55,7 +55,7 @@ export async function egoiApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ export async function elasticSecurityApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
if (error?.error?.error === 'Not Acceptable' && error?.error?.message) {
|
||||
error.error.error = `${error.error.error}: ${error.error.message}`;
|
||||
|
|
|
@ -50,7 +50,7 @@ export async function emeliaApiRequest(
|
|||
};
|
||||
|
||||
try {
|
||||
return this.helpers.request!.call(this, options);
|
||||
return await this.helpers.request.call(this, options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ export async function emeliaApiTest(
|
|||
};
|
||||
|
||||
try {
|
||||
await this.helpers.request!(options);
|
||||
await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
return {
|
||||
status: 'Error',
|
||||
|
|
|
@ -45,9 +45,9 @@ export async function eventbriteApiRequest(
|
|||
const credentials = await this.getCredentials('eventbriteApi');
|
||||
|
||||
options.headers!.Authorization = `Bearer ${credentials.apiKey}`;
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
return await this.helpers.requestOAuth2!.call(this, 'eventbriteOAuth2Api', options);
|
||||
return await this.helpers.requestOAuth2.call(this, 'eventbriteOAuth2Api', options);
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
|
|
|
@ -50,7 +50,7 @@ export async function facebookApiRequest(
|
|||
};
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ export async function figmaApiRequest(
|
|||
delete options.body;
|
||||
}
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ export async function layoutsApiRequest(
|
|||
};
|
||||
|
||||
try {
|
||||
const responseData = await this.helpers.request!(options);
|
||||
const responseData = await this.helpers.request(options);
|
||||
const items = parseLayouts(responseData.response.layouts);
|
||||
items.sort((a, b) => (a.name > b.name ? 0 : 1));
|
||||
return items;
|
||||
|
@ -95,7 +95,7 @@ export async function getFields(this: ILoadOptionsFunctions): Promise<any> {
|
|||
};
|
||||
|
||||
try {
|
||||
const responseData = await this.helpers.request!(options);
|
||||
const responseData = await this.helpers.request(options);
|
||||
return responseData.response.fieldMetaData;
|
||||
} catch (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 {
|
||||
const responseData = await this.helpers.request!(options);
|
||||
const responseData = await this.helpers.request(options);
|
||||
return responseData.response.portalMetaData;
|
||||
} catch (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 {
|
||||
const responseData = await this.helpers.request!(options);
|
||||
const responseData = await this.helpers.request(options);
|
||||
const items = parseScriptsList(responseData.response.scripts);
|
||||
items.sort((a, b) => (a.name > b.name ? 0 : 1));
|
||||
return items;
|
||||
|
@ -216,7 +216,7 @@ export async function getToken(
|
|||
};
|
||||
|
||||
try {
|
||||
const response = await this.helpers.request!(requestOptions);
|
||||
const response = await this.helpers.request(requestOptions);
|
||||
|
||||
if (typeof response === 'string') {
|
||||
throw new NodeOperationError(
|
||||
|
@ -252,7 +252,7 @@ export async function logout(
|
|||
};
|
||||
|
||||
try {
|
||||
const response = await this.helpers.request!(requestOptions);
|
||||
const response = await this.helpers.request(requestOptions);
|
||||
|
||||
if (typeof response === 'string') {
|
||||
throw new NodeOperationError(
|
||||
|
|
|
@ -33,7 +33,7 @@ export async function flowApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ async function getToken(
|
|||
};
|
||||
|
||||
try {
|
||||
const responseObject = await this.helpers.request!(options);
|
||||
const responseObject = await this.helpers.request(options);
|
||||
return responseObject.headers['x-jwt-token'];
|
||||
} catch (error) {
|
||||
throw new Error(
|
||||
|
@ -72,7 +72,7 @@ export async function formIoApiRequest(
|
|||
};
|
||||
|
||||
try {
|
||||
return this.helpers.request!.call(this, options);
|
||||
return await this.helpers.request.call(this, options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -74,9 +74,9 @@ export async function apiRequest(
|
|||
const credentials = (await this.getCredentials('formstackApi')) as IDataObject;
|
||||
|
||||
options.headers!.Authorization = `Bearer ${credentials.accessToken}`;
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
return await this.helpers.requestOAuth2!.call(this, 'formstackOAuth2Api', options);
|
||||
return await this.helpers.requestOAuth2.call(this, 'formstackOAuth2Api', options);
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
|
|
|
@ -39,7 +39,7 @@ export async function freshdeskApiRequest(
|
|||
}
|
||||
options = Object.assign({}, options, option);
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ export async function freshserviceApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
if (error.error.description === 'Validation failed') {
|
||||
const numberOfErrors = error.error.errors.length;
|
||||
|
|
|
@ -57,7 +57,7 @@ export async function goToWebinarApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
const response = await this.helpers.requestOAuth2!.call(this, 'goToWebinarOAuth2Api', options, {
|
||||
const response = await this.helpers.requestOAuth2.call(this, 'goToWebinarOAuth2Api', options, {
|
||||
tokenExpiredStatusCode: 403,
|
||||
});
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ export async function googleApiRequest(
|
|||
const { access_token } = await getAccessToken.call(this, credentials as IDataObject);
|
||||
|
||||
options.headers!.Authorization = `Bearer ${access_token}`;
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
//@ts-ignore
|
||||
return await this.helpers.requestOAuth2.call(this, 'googleBigQueryOAuth2Api', options);
|
||||
|
@ -134,7 +134,7 @@ async function getAccessToken(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
||||
export function simplify(rows: IDataObject[], fields: string[]) {
|
||||
|
|
|
@ -143,5 +143,5 @@ async function getAccessToken(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ export async function googleApiRequest(
|
|||
delete options.body;
|
||||
}
|
||||
//@ts-ignore
|
||||
return this.helpers.requestOAuth2.call(this, 'googleCalendarOAuth2Api', options);
|
||||
return await this.helpers.requestOAuth2.call(this, 'googleCalendarOAuth2Api', options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ export async function getAccessToken(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
||||
export function validateJSON(json: string | undefined): any {
|
||||
|
|
|
@ -53,7 +53,7 @@ export async function googleApiRequest(
|
|||
);
|
||||
|
||||
options.headers!.Authorization = `Bearer ${access_token}`;
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
//@ts-ignore
|
||||
return await this.helpers.requestOAuth2.call(this, 'googleDocsOAuth2Api', options);
|
||||
|
@ -138,7 +138,7 @@ async function getAccessToken(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
||||
export const hasKeys = (obj = {}) => Object.keys(obj).length > 0;
|
||||
|
|
|
@ -58,10 +58,10 @@ export async function googleApiRequest(
|
|||
);
|
||||
|
||||
options.headers!.Authorization = `Bearer ${access_token}`;
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
//@ts-ignore
|
||||
return this.helpers.requestOAuth2.call(this, 'googleDriveOAuth2Api', options);
|
||||
return await this.helpers.requestOAuth2.call(this, 'googleDriveOAuth2Api', options);
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
|
||||
|
@ -145,7 +145,7 @@ async function getAccessToken(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
||||
export function extractId(url: string): string {
|
||||
|
|
|
@ -38,7 +38,7 @@ export async function googleApiRequest(
|
|||
delete options.body;
|
||||
}
|
||||
|
||||
return await this.helpers.requestOAuth2!.call(
|
||||
return await this.helpers.requestOAuth2.call(
|
||||
this,
|
||||
'googleFirebaseRealtimeDatabaseOAuth2Api',
|
||||
options,
|
||||
|
|
|
@ -347,7 +347,7 @@ async function getAccessToken(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
||||
export function prepareQuery(
|
||||
|
|
|
@ -149,7 +149,7 @@ export async function getAccessToken(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
||||
// Hex to RGB
|
||||
|
|
|
@ -53,9 +53,9 @@ export async function apiRequest(
|
|||
|
||||
options.headers!.Authorization = `Bearer ${access_token}`;
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
return await this.helpers.requestOAuth2!.call(this, 'googleSheetsOAuth2Api', options);
|
||||
return await this.helpers.requestOAuth2.call(this, 'googleSheetsOAuth2Api', options);
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
|
||||
|
@ -150,5 +150,5 @@ export async function getAccessToken(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
|
|
@ -55,9 +55,9 @@ export async function googleApiRequest(
|
|||
credentials as unknown as IGoogleAuthCredentials,
|
||||
);
|
||||
options.headers.Authorization = `Bearer ${access_token}`;
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
return await this.helpers.requestOAuth2!.call(this, 'googleSlidesOAuth2Api', options);
|
||||
return await this.helpers.requestOAuth2.call(this, 'googleSlidesOAuth2Api', options);
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
|
||||
|
@ -117,5 +117,5 @@ async function getAccessToken(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
|
|
@ -140,5 +140,5 @@ async function getAccessToken(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ export async function gristApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ export async function gumroadApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ export async function hackerNewsApiRequest(
|
|||
};
|
||||
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ export async function getAccessTokens(
|
|||
};
|
||||
|
||||
try {
|
||||
const tokens = await this.helpers.request!(options);
|
||||
const tokens = await this.helpers.request(options);
|
||||
return tokens;
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
|
@ -89,7 +89,7 @@ export async function haloPSAApiRequest(
|
|||
if (Object.keys(body).length === 0) {
|
||||
delete options.body;
|
||||
}
|
||||
const result = await this.helpers.request!(options);
|
||||
const result = await this.helpers.request(options);
|
||||
if (method === 'DELETE' && result.id) {
|
||||
return { success: true };
|
||||
}
|
||||
|
@ -246,5 +246,5 @@ export async function validateCredentials(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return (await this.helpers.request!(options)) as IHaloPSATokens;
|
||||
return (await this.helpers.request(options)) as IHaloPSATokens;
|
||||
}
|
||||
|
|
|
@ -44,9 +44,9 @@ export async function harvestApiRequest(
|
|||
//@ts-ignore
|
||||
options.headers.Authorization = `Bearer ${credentials.accessToken}`;
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
return await this.helpers.requestOAuth2!.call(this, 'harvestOAuth2Api', options);
|
||||
return await this.helpers.requestOAuth2.call(this, 'harvestOAuth2Api', options);
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
|
|
|
@ -50,15 +50,15 @@ export async function hubspotApiRequest(
|
|||
if (endpoint.includes('webhooks')) {
|
||||
const credentials = await this.getCredentials('hubspotDeveloperApi');
|
||||
options.qs.hapikey = credentials.apiKey as string;
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
return await this.helpers.requestOAuth2!.call(this, 'hubspotDeveloperApi', options, {
|
||||
return await this.helpers.requestOAuth2.call(this, 'hubspotDeveloperApi', options, {
|
||||
tokenType: 'Bearer',
|
||||
includeCredentialsOnRefreshOnBody: true,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return await this.helpers.requestOAuth2!.call(this, 'hubspotOAuth2Api', options, {
|
||||
return await this.helpers.requestOAuth2.call(this, 'hubspotOAuth2Api', options, {
|
||||
tokenType: 'Bearer',
|
||||
includeCredentialsOnRefreshOnBody: true,
|
||||
});
|
||||
|
|
|
@ -38,7 +38,7 @@ export async function humanticAiApiRequest(
|
|||
delete options.body;
|
||||
}
|
||||
|
||||
const response = await this.helpers.request!(options);
|
||||
const response = await this.helpers.request(options);
|
||||
|
||||
if (response.data && response.data.status === 'error') {
|
||||
throw new NodeApiError(this.getNode(), response.data);
|
||||
|
|
|
@ -31,7 +31,7 @@ export async function hunterApiRequest(
|
|||
delete options.body;
|
||||
}
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ export async function intercomApiRequest(
|
|||
};
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ export async function jenkinsApiRequest(
|
|||
};
|
||||
options = Object.assign({}, options, option);
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ export async function jotformApiRequest(
|
|||
options = Object.assign({}, options, option);
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export async function kitemakerRequest(
|
|||
json: true,
|
||||
};
|
||||
|
||||
const responseData = await this.helpers.request!.call(this, options);
|
||||
const responseData = await this.helpers.request.call(this, options);
|
||||
|
||||
if (responseData.errors) {
|
||||
throw new NodeApiError(this.getNode(), responseData);
|
||||
|
|
|
@ -38,7 +38,7 @@ export async function linearApiRequest(
|
|||
};
|
||||
options = Object.assign({}, options, option);
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ export async function validateCredentials(
|
|||
json: true,
|
||||
};
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
||||
//@ts-ignore
|
||||
|
|
|
@ -34,7 +34,7 @@ export async function lingvaNexApiRequest(
|
|||
|
||||
options = Object.assign({}, options, option);
|
||||
|
||||
const response = await this.helpers.request!(options);
|
||||
const response = await this.helpers.request(options);
|
||||
|
||||
if (response.err !== null) {
|
||||
throw new NodeApiError(this.getNode(), response);
|
||||
|
|
|
@ -34,7 +34,7 @@ export async function linkedInApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.requestOAuth2!.call(this, 'linkedInOAuth2Api', options, {
|
||||
return await this.helpers.requestOAuth2.call(this, 'linkedInOAuth2Api', options, {
|
||||
tokenType: 'Bearer',
|
||||
});
|
||||
} catch (error) {
|
||||
|
|
|
@ -41,7 +41,7 @@ export async function mailCheckApiRequest(
|
|||
if (Object.keys(body).length === 0) {
|
||||
delete options.body;
|
||||
}
|
||||
return await this.helpers.request!.call(this, options);
|
||||
return await this.helpers.request.call(this, options);
|
||||
} catch (error) {
|
||||
if (error.response?.body?.message) {
|
||||
// Try to return the error prettier
|
||||
|
|
|
@ -56,7 +56,7 @@ export async function mailchimpApiRequest(
|
|||
|
||||
options.url = `${api_endpoint}/3.0${endpoint}`;
|
||||
//@ts-ignore
|
||||
return await this.helpers.requestOAuth2!.call(this, 'mailchimpOAuth2Api', options, {
|
||||
return await this.helpers.requestOAuth2.call(this, 'mailchimpOAuth2Api', options, {
|
||||
tokenType: 'Bearer',
|
||||
});
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ async function getMetadata(
|
|||
url: credentials.metadataUrl as string,
|
||||
json: true,
|
||||
};
|
||||
return this.helpers.request!(options);
|
||||
return this.helpers.request(options);
|
||||
}
|
||||
|
||||
export const campaignFieldsMetadata = [
|
||||
|
|
|
@ -29,7 +29,7 @@ export async function mandrillApiRequest(
|
|||
};
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ export async function matrixApiRequest(
|
|||
option.overridePrefix || 'client'
|
||||
}/r0${resource}`;
|
||||
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)
|
||||
// But the output is JSON so we have to parse it manually.
|
||||
|
|
|
@ -39,9 +39,9 @@ export async function mediumApiRequest(
|
|||
|
||||
options.headers!.Authorization = `Bearer ${credentials.accessToken}`;
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
return await this.helpers.requestOAuth2!.call(this, 'mediumOAuth2Api', options);
|
||||
return await this.helpers.requestOAuth2.call(this, 'mediumOAuth2Api', options);
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
|
|
|
@ -32,7 +32,7 @@ export async function microsoftApiRequest(
|
|||
delete options.body;
|
||||
}
|
||||
//@ts-ignore
|
||||
return this.helpers.requestOAuth2.call(this, 'microsoftToDoOAuth2Api', options);
|
||||
return await this.helpers.requestOAuth2.call(this, 'microsoftToDoOAuth2Api', options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ export async function mispApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
// MISP API wrongly returns 403 for malformed requests
|
||||
if (error.statusCode === 403) {
|
||||
|
|
|
@ -200,7 +200,7 @@ export class Mocean implements INodeType {
|
|||
json: true,
|
||||
};
|
||||
try {
|
||||
await this.helpers.request!(options);
|
||||
await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
return {
|
||||
status: 'Error',
|
||||
|
|
|
@ -32,9 +32,9 @@ export async function mondayComApiRequest(
|
|||
|
||||
options.headers = { Authorization: `Bearer ${credentials.apiToken}` };
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
return this.helpers.requestOAuth2!.call(this, 'mondayComOAuth2Api', options);
|
||||
return await this.helpers.requestOAuth2.call(this, 'mondayComOAuth2Api', options);
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
|
|
|
@ -49,7 +49,7 @@ export async function monicaCrmApiRequest(
|
|||
}
|
||||
|
||||
try {
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ export async function apiRequest(
|
|||
};
|
||||
|
||||
try {
|
||||
return this.helpers.requestWithAuthentication.call(this, 'n8nApi', options);
|
||||
return await this.helpers.requestWithAuthentication.call(this, 'n8nApi', options);
|
||||
} catch (error) {
|
||||
if (error instanceof NodeApiError) {
|
||||
throw error;
|
||||
|
|
|
@ -43,7 +43,7 @@ export async function netlifyApiRequest(
|
|||
|
||||
options.headers!.Authorization = `Bearer ${credentials.accessToken}`;
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -61,9 +61,9 @@ export async function notionApiRequest(
|
|||
delete options.body;
|
||||
}
|
||||
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) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ export async function odooJSONRPCRequest(
|
|||
json: true,
|
||||
};
|
||||
|
||||
const responce = await this.helpers.request!(options);
|
||||
const responce = await this.helpers.request(options);
|
||||
if (responce.error) {
|
||||
throw new NodeApiError(this.getNode(), responce.error.data, {
|
||||
message: responce.error.data.message,
|
||||
|
|
|
@ -269,7 +269,7 @@ export class Odoo implements INodeType {
|
|||
uri: `${(credentials?.url as string).replace(/\/$/, '')}/jsonrpc`,
|
||||
json: true,
|
||||
};
|
||||
const result = await this.helpers.request!(options);
|
||||
const result = await this.helpers.request(options);
|
||||
if (result.error || !result.result) {
|
||||
return {
|
||||
status: 'Error',
|
||||
|
|
|
@ -42,7 +42,7 @@ export async function onfleetApiRequest(
|
|||
};
|
||||
try {
|
||||
//@ts-ignore
|
||||
return this.helpers.request(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ export async function openThesaurusApiRequest(
|
|||
options = Object.assign({}, options, option);
|
||||
options.qs.format = 'application/json';
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ export async function orbitApiRequest(
|
|||
|
||||
options = Object.assign({}, options, option);
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ export async function ouraApiRequest(
|
|||
options = Object.assign({}, options, option);
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ export async function paddleApiRequest(
|
|||
body.vendor_id = credentials.vendorId;
|
||||
body.vendor_auth_code = credentials.vendorAuthCode;
|
||||
try {
|
||||
const response = await this.helpers.request!(options);
|
||||
const response = await this.helpers.request(options);
|
||||
|
||||
if (!response.success) {
|
||||
throw new NodeApiError(this.getNode(), response);
|
||||
|
|
|
@ -47,9 +47,9 @@ export async function pagerDutyApiRequest(
|
|||
|
||||
options.headers.Authorization = `Token token=${credentials.apiToken}`;
|
||||
|
||||
return this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
return this.helpers.requestOAuth2!.call(this, 'pagerDutyOAuth2Api', options);
|
||||
return await this.helpers.requestOAuth2.call(this, 'pagerDutyOAuth2Api', options);
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
|
|
|
@ -41,7 +41,7 @@ export async function payPalApiRequest(
|
|||
json: true,
|
||||
};
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ async function getAccessToken(
|
|||
json: true,
|
||||
};
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeOperationError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ export class PayPal implements INodeType {
|
|||
};
|
||||
|
||||
try {
|
||||
await this.helpers.request!(options);
|
||||
await this.helpers.request(options);
|
||||
return {
|
||||
status: 'OK',
|
||||
message: 'Authentication successful!',
|
||||
|
|
|
@ -34,7 +34,7 @@ export async function peekalinkApiRequest(
|
|||
|
||||
options = Object.assign({}, options, option);
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ export async function posthogApiRequest(
|
|||
if (Object.keys(body).length === 0) {
|
||||
delete options.body;
|
||||
}
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ export async function postmarkApiRequest(
|
|||
options = Object.assign({}, options, option);
|
||||
|
||||
try {
|
||||
return this.helpers.requestWithAuthentication.call(this, 'postmarkApi', options);
|
||||
return await this.helpers.requestWithAuthentication.call(this, 'postmarkApi', options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue