mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-23 11:44:06 -08:00
refactor: Phase out TSLint in nodes-base
(no-changelog) (#4798)
* 🔥 Remove TSLint scripts * 🔥 Remove TSLint config * 🔥 Remove TSLint exceptions * 👕 Adjust lint config * ✏️ Add story numbers
This commit is contained in:
parent
632f573021
commit
cfd32d2642
|
@ -124,8 +124,16 @@ const config = (module.exports = {
|
|||
'undefined',
|
||||
],
|
||||
|
||||
/**
|
||||
* https://eslint.org/docs/latest/rules/no-void
|
||||
*/
|
||||
'no-void': ['error', { allowAsStatement: true }],
|
||||
|
||||
/**
|
||||
* https://eslint.org/docs/latest/rules/sort-imports
|
||||
*/
|
||||
'sort-imports': 'off', // @TECH_DEBT: Enable, prefs to be decided - N8N-5821
|
||||
|
||||
// ----------------------------------
|
||||
// @typescript-eslint
|
||||
// ----------------------------------
|
||||
|
@ -185,11 +193,6 @@ const config = (module.exports = {
|
|||
*/
|
||||
'@typescript-eslint/consistent-type-assertions': 'error',
|
||||
|
||||
/**
|
||||
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md
|
||||
*/
|
||||
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],
|
||||
|
||||
/**
|
||||
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/member-delimiter-style.md
|
||||
*/
|
||||
|
@ -299,6 +302,11 @@ const config = (module.exports = {
|
|||
*/
|
||||
'@typescript-eslint/promise-function-async': 'error',
|
||||
|
||||
/**
|
||||
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/triple-slash-reference.md
|
||||
*/
|
||||
'@typescript-eslint/triple-slash-reference': 'off', // @TECH_DEBT: Enable, disallowing in all cases - N8N-5820
|
||||
|
||||
// ----------------------------------
|
||||
// eslint-plugin-import
|
||||
// ----------------------------------
|
||||
|
|
|
@ -21,7 +21,6 @@ export async function activeCampaignApiRequest(
|
|||
body: IDataObject,
|
||||
query?: IDataObject,
|
||||
dataKey?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('activeCampaignApi');
|
||||
|
||||
|
@ -75,7 +74,6 @@ export async function activeCampaignApiRequestAllItems(
|
|||
body: IDataObject,
|
||||
query?: IDataObject,
|
||||
dataKey?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
if (query === undefined) {
|
||||
query = {};
|
||||
|
|
|
@ -17,12 +17,10 @@ export async function acuitySchedulingApiRequest(
|
|||
| IWebhookFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
_option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const authenticationMethod = this.getNodeParameter('authentication', 0);
|
||||
|
||||
|
|
|
@ -8,12 +8,10 @@ export async function affinityApiRequest(
|
|||
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('affinityApi');
|
||||
|
||||
|
@ -51,10 +49,8 @@ export async function affinityApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -17,12 +17,10 @@ export async function agileCrmApiRequest(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
uri?: string,
|
||||
sendAsForm?: boolean,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('agileCrmApi');
|
||||
const options: OptionsWithUri = {
|
||||
|
@ -60,12 +58,10 @@ export async function agileCrmApiRequestAllItems(
|
|||
this: IHookFunctions | ILoadOptionsFunctions | IExecuteFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
uri?: string,
|
||||
sendAsForm?: boolean,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
// https://github.com/agilecrm/rest-api#11-listing-contacts-
|
||||
|
||||
|
@ -101,11 +97,9 @@ export async function agileCrmApiRequestUpdate(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method = 'PUT',
|
||||
endpoint?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
body: any = {},
|
||||
_query: IDataObject = {},
|
||||
uri?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('agileCrmApi');
|
||||
const baseUri = `https://${credentials.subdomain}.agilecrm.com/dev/`;
|
||||
|
@ -124,7 +118,7 @@ export async function agileCrmApiRequestUpdate(
|
|||
};
|
||||
|
||||
const successfulUpdates = [];
|
||||
let lastSuccesfulUpdateReturn: any; // tslint:disable-line:no-any
|
||||
let lastSuccesfulUpdateReturn: any;
|
||||
const payload: IContactUpdate = body;
|
||||
|
||||
try {
|
||||
|
@ -135,7 +129,6 @@ export async function agileCrmApiRequestUpdate(
|
|||
lastSuccesfulUpdateReturn = await this.helpers.request!(options);
|
||||
|
||||
// Iterate trough properties and show them as individial updates instead of only vague "properties"
|
||||
// tslint:disable-next-line:no-any
|
||||
payload.properties?.map((property: any) => {
|
||||
successfulUpdates.push(`${property.name}`);
|
||||
});
|
||||
|
@ -186,7 +179,6 @@ export async function agileCrmApiRequestUpdate(
|
|||
}
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
export function validateJSON(json: string | undefined): any {
|
||||
let result;
|
||||
try {
|
||||
|
|
|
@ -538,7 +538,6 @@ export class Airtable implements INodeType {
|
|||
if (addAllFields === true) {
|
||||
// Add all the fields the item has
|
||||
row.fields = { ...items[i].json };
|
||||
// tslint:disable-next-line: no-any
|
||||
delete (row.fields! as any).id;
|
||||
} else {
|
||||
// Add only the specified fields
|
||||
|
@ -742,7 +741,6 @@ export class Airtable implements INodeType {
|
|||
// Update all the fields the item has
|
||||
row.fields = { ...items[i].json };
|
||||
// remove id field
|
||||
// tslint:disable-next-line: no-any
|
||||
delete (row.fields! as any).id;
|
||||
|
||||
if (options.ignoreFields && options.ignoreFields !== '') {
|
||||
|
|
|
@ -33,7 +33,6 @@ export async function apiRequest(
|
|||
query?: IDataObject,
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
query = query || {};
|
||||
|
||||
|
@ -75,7 +74,6 @@ export async function apiRequestAllItems(
|
|||
endpoint: string,
|
||||
body: IDataObject,
|
||||
query?: IDataObject,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
if (query === undefined) {
|
||||
query = {};
|
||||
|
|
|
@ -107,7 +107,7 @@ export class Amqp implements INodeType {
|
|||
const containerReconnect = (options.reconnect as boolean) || true;
|
||||
const containerReconnectLimit = (options.reconnectLimit as number) || 50;
|
||||
|
||||
let headerProperties: Dictionary<any>; // tslint:disable-line:no-any
|
||||
let headerProperties: Dictionary<any>;
|
||||
if (typeof applicationProperties === 'string' && applicationProperties !== '') {
|
||||
headerProperties = JSON.parse(applicationProperties);
|
||||
} else {
|
||||
|
|
|
@ -197,7 +197,7 @@ export class AmqpTrigger implements INodeType {
|
|||
data = data.body;
|
||||
}
|
||||
|
||||
self.emit([self.helpers.returnJsonArray([data as any])]); // tslint:disable-line:no-any
|
||||
self.emit([self.helpers.returnJsonArray([data as any])]);
|
||||
|
||||
if (!context.receiver?.has_credit()) {
|
||||
setTimeout(() => {
|
||||
|
@ -264,7 +264,7 @@ export class AmqpTrigger implements INodeType {
|
|||
if (Object.keys(message)[0] === 'body' && Object.keys(message).length === 1) {
|
||||
self.emit([self.helpers.returnJsonArray([message.body])]);
|
||||
} else {
|
||||
self.emit([self.helpers.returnJsonArray([message as any])]); // tslint:disable-line:no-any
|
||||
self.emit([self.helpers.returnJsonArray([message as any])]);
|
||||
}
|
||||
clearTimeout(timeoutHandler);
|
||||
resolve(true);
|
||||
|
|
|
@ -60,7 +60,6 @@ export async function loadResource(this: ILoadOptionsFunctions, resource: 'image
|
|||
}));
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
export function validateJSON(json: string | object | undefined): any {
|
||||
let result;
|
||||
if (typeof json === 'object') {
|
||||
|
|
|
@ -20,7 +20,6 @@ export async function asanaApiRequest(
|
|||
body: object,
|
||||
query?: IDataObject,
|
||||
uri?: string | undefined,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const authenticationMethod = this.getNodeParameter('authentication', 0) as string;
|
||||
|
||||
|
@ -41,10 +40,9 @@ export async function asanaApiRequestAllItems(
|
|||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: IHttpRequestMethods,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -8,11 +8,10 @@ export async function automizyApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
path: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
option = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = (await this.getCredentials('automizyApi')) as IDataObject;
|
||||
|
||||
|
@ -49,10 +48,9 @@ export async function automizyApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -8,12 +8,11 @@ export async function autopilotApiRequest(
|
|||
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
uri?: string,
|
||||
_option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = (await this.getCredentials('autopilotApi')) as IDataObject;
|
||||
|
||||
|
@ -51,10 +50,9 @@ export async function autopilotApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
const returnAll = this.getNodeParameter('returnAll', 0, false) as boolean;
|
||||
|
|
|
@ -17,7 +17,6 @@ export async function awsApiRequest(
|
|||
body?: string | Buffer,
|
||||
query: IDataObject = {},
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('aws');
|
||||
|
||||
|
@ -49,7 +48,6 @@ export async function awsApiRequestREST(
|
|||
body?: string,
|
||||
query: IDataObject = {},
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(this, service, method, path, body, query, headers);
|
||||
try {
|
||||
|
@ -68,7 +66,6 @@ export async function awsApiRequestAllItems(
|
|||
body?: string,
|
||||
query: IDataObject = {},
|
||||
headers: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
@ -77,7 +74,6 @@ export async function awsApiRequestAllItems(
|
|||
do {
|
||||
responseData = await awsApiRequestREST.call(this, service, method, path, body, query, headers);
|
||||
if (responseData.NextToken) {
|
||||
// tslint:disable-next-line:no-any
|
||||
const data = jsonParse<any>(body as string, {
|
||||
errorMessage: 'Response body is not valid JSON',
|
||||
});
|
||||
|
|
|
@ -16,7 +16,6 @@ export async function awsApiRequest(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('aws');
|
||||
|
||||
|
@ -41,7 +40,6 @@ export async function awsApiRequestREST(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(this, service, method, path, body, headers);
|
||||
try {
|
||||
|
@ -58,7 +56,6 @@ export async function awsApiRequestSOAP(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(this, service, method, path, body, headers);
|
||||
try {
|
||||
|
|
|
@ -175,7 +175,6 @@ export class AwsDynamoDB implements INodeType {
|
|||
|
||||
// https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html
|
||||
|
||||
// tslint:disable-next-line: no-any
|
||||
const body: { [key: string]: any } = {
|
||||
TableName: this.getNodeParameter('tableName', i) as string,
|
||||
Key: {},
|
||||
|
@ -252,7 +251,6 @@ export class AwsDynamoDB implements INodeType {
|
|||
[],
|
||||
) as IAttributeNameUi[];
|
||||
|
||||
// tslint:disable-next-line: no-any
|
||||
const body: { [key: string]: any } = {
|
||||
TableName: tableName,
|
||||
Key: {},
|
||||
|
|
|
@ -16,7 +16,6 @@ export async function awsApiRequest(
|
|||
path: string,
|
||||
body?: object | IRequestBody,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('aws');
|
||||
const requestOptions = {
|
||||
|
@ -63,7 +62,6 @@ export async function awsApiRequestAllItems(
|
|||
path: string,
|
||||
body?: IRequestBody,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -86,7 +86,6 @@ function decodeAttribute(type: AttributeValueType, attribute: string) {
|
|||
}
|
||||
}
|
||||
|
||||
// tslint:disable-next-line: no-any
|
||||
export function validateJSON(input: any): object {
|
||||
try {
|
||||
return JSON.parse(input);
|
||||
|
|
|
@ -16,7 +16,6 @@ export async function awsApiRequest(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('aws');
|
||||
const requestOptions = {
|
||||
|
@ -45,7 +44,6 @@ export async function awsApiRequestREST(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(this, service, method, path, body, headers);
|
||||
try {
|
||||
|
@ -62,7 +60,6 @@ export async function awsApiRequestSOAP(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(this, service, method, path, body, headers);
|
||||
try {
|
||||
|
|
|
@ -23,7 +23,6 @@ export async function awsApiRequest(
|
|||
headers?: object,
|
||||
option: IDataObject = {},
|
||||
_region?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('aws');
|
||||
|
||||
|
@ -55,7 +54,6 @@ export async function awsApiRequestREST(
|
|||
headers?: object,
|
||||
options: IDataObject = {},
|
||||
region?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(
|
||||
this,
|
||||
|
@ -85,7 +83,6 @@ export async function awsApiRequestSOAP(
|
|||
headers?: object,
|
||||
option: IDataObject = {},
|
||||
region?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(
|
||||
this,
|
||||
|
@ -123,7 +120,6 @@ export async function awsApiRequestSOAPAllItems(
|
|||
headers: IDataObject = {},
|
||||
option: IDataObject = {},
|
||||
region?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ export async function awsApiRequest(
|
|||
headers?: object,
|
||||
option: IDataObject = {},
|
||||
_region?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const requestOptions = {
|
||||
qs: {
|
||||
|
@ -53,7 +52,6 @@ export async function awsApiRequestREST(
|
|||
headers?: object,
|
||||
options: IDataObject = {},
|
||||
region?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(
|
||||
this,
|
||||
|
@ -83,7 +81,6 @@ export async function awsApiRequestSOAP(
|
|||
headers?: object,
|
||||
option: IDataObject = {},
|
||||
region?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(
|
||||
this,
|
||||
|
@ -121,7 +118,6 @@ export async function awsApiRequestSOAPAllItems(
|
|||
headers: IDataObject = {},
|
||||
option: IDataObject = {},
|
||||
region?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ export async function awsApiRequest(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('aws');
|
||||
|
||||
|
@ -48,7 +47,6 @@ export async function awsApiRequestREST(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(this, service, method, path, body, headers);
|
||||
try {
|
||||
|
@ -65,7 +63,6 @@ export async function awsApiRequestSOAP(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(this, service, method, path, body, headers);
|
||||
try {
|
||||
|
@ -93,7 +90,6 @@ export async function awsApiRequestSOAPAllItems(
|
|||
_headers: IDataObject = {},
|
||||
_option: IDataObject = {},
|
||||
_region?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ export async function awsApiRequest(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('aws');
|
||||
|
||||
|
@ -83,7 +82,6 @@ export async function awsApiRequestREST(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(this, service, method, path, body, headers);
|
||||
try {
|
||||
|
@ -100,7 +98,6 @@ export async function awsApiRequestSOAP(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(this, service, method, path, body, headers);
|
||||
try {
|
||||
|
@ -145,7 +142,6 @@ export async function validateCredentials(
|
|||
this: ICredentialTestFunctions,
|
||||
decryptedCredentials: ICredentialDataDecryptedObject,
|
||||
service: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = decryptedCredentials;
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ export async function awsApiRequest(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('aws');
|
||||
|
||||
|
@ -77,7 +76,6 @@ export async function awsApiRequestREST(
|
|||
path: string,
|
||||
body?: string,
|
||||
headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const response = await awsApiRequest.call(this, service, method, path, body, headers);
|
||||
try {
|
||||
|
@ -98,7 +96,6 @@ export async function awsApiRequestRESTAllItems(
|
|||
_headers: IDataObject = {},
|
||||
_option: IDataObject = {},
|
||||
_region?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ export async function bambooHrApiCredentialTest(
|
|||
async function validateCredentials(
|
||||
this: ICredentialTestFunctions,
|
||||
decryptedCredentials: ICredentialDataDecryptedObject,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = decryptedCredentials;
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ export async function bannerbearApiRequest(
|
|||
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
uri?: string,
|
||||
headers: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('bannerbearApi');
|
||||
|
||||
|
|
|
@ -10,10 +10,9 @@ export async function beeminderApiRequest(
|
|||
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const options: OptionsWithUri = {
|
||||
method,
|
||||
|
@ -38,10 +37,9 @@ export async function beeminderApiRequestAllItems(
|
|||
this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -11,12 +11,11 @@ export async function bitbucketApiRequest(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('bitbucketApi');
|
||||
let options: OptionsWithUri = {
|
||||
|
@ -51,10 +50,9 @@ export async function bitbucketApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -13,12 +13,11 @@ export async function bitlyApiRequest(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const authenticationMethod = this.getNodeParameter('authentication', 0) as string;
|
||||
let options: OptionsWithUri = {
|
||||
|
@ -59,10 +58,9 @@ export async function bitlyApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ export async function bitwardenApiRequest(
|
|||
qs: IDataObject,
|
||||
body: IDataObject,
|
||||
token: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const baseUrl = await getBaseUrl.call(this);
|
||||
const options: OptionsWithUri = {
|
||||
|
@ -55,7 +54,6 @@ export async function bitwardenApiRequest(
|
|||
*/
|
||||
export async function getAccessToken(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('bitwardenApi');
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ export class Box implements INodeType {
|
|||
const role = this.getNodeParameter('role', i) as string;
|
||||
const accessibleBy = this.getNodeParameter('accessibleBy', i) as string;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
// tslint:disable-next-line: no-any
|
||||
|
||||
const body: { accessible_by: IDataObject; [key: string]: any } = {
|
||||
accessible_by: {},
|
||||
item: {
|
||||
|
@ -460,7 +460,7 @@ export class Box implements INodeType {
|
|||
const role = this.getNodeParameter('role', i) as string;
|
||||
const accessibleBy = this.getNodeParameter('accessibleBy', i) as string;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
// tslint:disable-next-line: no-any
|
||||
|
||||
const body: { accessible_by: IDataObject; [key: string]: any } = {
|
||||
accessible_by: {},
|
||||
item: {
|
||||
|
|
|
@ -13,12 +13,11 @@ export async function boxApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IHookFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
let options: OptionsWithUri = {
|
||||
headers: {
|
||||
|
@ -53,10 +52,9 @@ export async function boxApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -13,12 +13,11 @@ export async function brandfetchApiRequest(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
try {
|
||||
const credentials = await this.getCredentials('brandfetchApi');
|
||||
|
|
|
@ -77,7 +77,6 @@ export async function bubbleApiRequestAllItems(
|
|||
return returnData;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
export function validateJSON(json: string | undefined): any {
|
||||
let result;
|
||||
try {
|
||||
|
|
|
@ -14,11 +14,10 @@ export async function calApiRequest(
|
|||
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions,
|
||||
method: IHttpRequestMethods,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('calApi');
|
||||
|
||||
|
|
|
@ -14,12 +14,11 @@ export async function calendlyApiRequest(
|
|||
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const { apiKey } = (await this.getCredentials('calendlyApi')) as { apiKey: string };
|
||||
|
||||
|
@ -64,7 +63,6 @@ export function getAuthenticationType(data: string): 'accessToken' | 'apiKey' {
|
|||
export async function validateCredentials(
|
||||
this: ICredentialTestFunctions,
|
||||
decryptedCredentials: ICredentialDataDecryptedObject,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = decryptedCredentials;
|
||||
|
||||
|
|
|
@ -13,12 +13,11 @@ export async function circleciApiRequest(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('circleCiApi');
|
||||
let options: OptionsWithUri = {
|
||||
|
@ -52,10 +51,9 @@ export async function circleciApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -18,12 +18,11 @@ export async function webexApiRequest(
|
|||
this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
let options: OptionsWithUri = {
|
||||
method,
|
||||
|
@ -56,11 +55,10 @@ export async function webexApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
options: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
@ -140,7 +138,6 @@ export function getAttachemnts(attachements: IDataObject[]) {
|
|||
const actions: IDataObject[] = [];
|
||||
for (const element of ((attachment?.elementsUi as IDataObject)
|
||||
.elementValues as IDataObject[]) || []) {
|
||||
// tslint:disable-next-line: no-any
|
||||
const { type, ...rest } = element as { type: string; [key: string]: any };
|
||||
if (type.startsWith('input')) {
|
||||
body.push({
|
||||
|
@ -153,7 +150,6 @@ export function getAttachemnts(attachements: IDataObject[]) {
|
|||
}
|
||||
for (const action of ((attachment?.actionsUi as IDataObject).actionValues as IDataObject[]) ||
|
||||
[]) {
|
||||
// tslint:disable-next-line: no-any
|
||||
const { type, ...rest } = action as { type: string; [key: string]: any };
|
||||
actions.push({ type: `Action.${upperFirst(type)}`, ...removeEmptyProperties(rest) });
|
||||
}
|
||||
|
@ -628,7 +624,6 @@ export function getInputTextProperties(): INodeProperties[] {
|
|||
];
|
||||
}
|
||||
|
||||
// tslint:disable-next-line: no-any
|
||||
function removeEmptyProperties(rest: { [key: string]: any }) {
|
||||
return Object.keys(rest)
|
||||
.filter((k) => rest[k] !== '')
|
||||
|
|
|
@ -18,7 +18,6 @@ export async function citrixADCApiRequest(
|
|||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const { url } = (await this.getCredentials('citrixAdcApi')) as { url: string };
|
||||
|
||||
|
|
|
@ -14,12 +14,11 @@ export async function clearbitApiRequest(
|
|||
method: string,
|
||||
api: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('clearbitApi');
|
||||
let options: OptionsWithUri = {
|
||||
|
|
|
@ -19,12 +19,11 @@ export async function clickupApiRequest(
|
|||
| IWebhookFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
_option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
|
@ -65,10 +64,9 @@ export async function clickupApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
@ -86,7 +84,6 @@ export async function clickupApiRequestAllItems(
|
|||
return returnData;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
export function validateJSON(json: string | undefined): any {
|
||||
let result;
|
||||
try {
|
||||
|
|
|
@ -25,7 +25,7 @@ export interface IMembershipDto {
|
|||
|
||||
export interface ITagDto {
|
||||
id: string;
|
||||
name: any; // tslint:disable-line:no-any
|
||||
name: any;
|
||||
workspaceId: string;
|
||||
archived: boolean;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ export interface ITaskDto {
|
|||
assigneeIds: object;
|
||||
estimate: string;
|
||||
id: string;
|
||||
name: any; // tslint:disable-line:no-any
|
||||
name: any;
|
||||
workspaceId: string;
|
||||
projectId: string;
|
||||
'is-active': boolean;
|
||||
|
|
|
@ -8,12 +8,11 @@ export async function clockifyApiRequest(
|
|||
this: ILoadOptionsFunctions | IPollFunctions | IExecuteFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
_option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const BASE_URL = 'https://api.clockify.me/api/v1';
|
||||
|
||||
|
@ -35,10 +34,9 @@ export async function clockifyApiRequestAllItems(
|
|||
this: IExecuteFunctions | IPollFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ export async function cloudflareApiRequest(
|
|||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
headers: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const options: OptionsWithUri = {
|
||||
method,
|
||||
|
@ -47,7 +46,6 @@ export async function cloudflareApiRequestAllItems(
|
|||
endpoint: string,
|
||||
body: IDataObject = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ export async function createCollectionEntry(
|
|||
resourceName: string,
|
||||
data: IDataObject,
|
||||
id?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const body: ICollection = {
|
||||
data,
|
||||
|
@ -28,7 +27,6 @@ export async function getAllCollectionEntries(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
resourceName: string,
|
||||
options: IDataObject,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const body: ICollection = {};
|
||||
|
||||
|
|
|
@ -6,11 +6,10 @@ export async function cockpitApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('cockpitApi');
|
||||
let options: OptionsWithUri = {
|
||||
|
|
|
@ -4,7 +4,6 @@ import { cockpitApiRequest } from './GenericFunctions';
|
|||
export async function getSingleton(
|
||||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
resourceName: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
return cockpitApiRequest.call(this, 'get', `/singletons/get/${resourceName}`);
|
||||
}
|
||||
|
|
|
@ -6,12 +6,11 @@ export async function codaApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('codaApi');
|
||||
|
||||
|
@ -44,10 +43,9 @@ export async function codaApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ export class Sandbox extends NodeVM {
|
|||
export function getSandboxContext(this: IExecuteFunctions, index?: number) {
|
||||
const sandboxContext: Record<string, unknown> & {
|
||||
$item: (i: number) => IWorkflowDataProxyData;
|
||||
$input: any; // tslint:disable-line: no-any
|
||||
$input: any;
|
||||
} = {
|
||||
// from NodeExecuteFunctions
|
||||
$getNodeParameter: this.getNodeParameter,
|
||||
|
|
|
@ -8,12 +8,11 @@ export async function coinGeckoApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
let options: OptionsWithUri = {
|
||||
headers: {
|
||||
|
@ -46,10 +45,9 @@ export async function coinGeckoRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ export class Contentful implements INodeType {
|
|||
|
||||
if (!rawData) {
|
||||
const assets: IDataObject[] = [];
|
||||
// tslint:disable-next-line: no-any
|
||||
|
||||
responseData.map((asset: any) => {
|
||||
assets.push(asset.fields);
|
||||
});
|
||||
|
@ -214,7 +214,7 @@ export class Contentful implements INodeType {
|
|||
|
||||
if (!rawData) {
|
||||
const assets: IDataObject[] = [];
|
||||
// tslint:disable-next-line: no-any
|
||||
|
||||
responseData.map((asset: any) => {
|
||||
assets.push(asset.fields);
|
||||
});
|
||||
|
@ -293,7 +293,7 @@ export class Contentful implements INodeType {
|
|||
|
||||
if (!rawData) {
|
||||
const assets: IDataObject[] = [];
|
||||
// tslint:disable-next-line: no-any
|
||||
|
||||
responseData.map((asset: any) => {
|
||||
assets.push(asset.fields);
|
||||
});
|
||||
|
@ -313,7 +313,7 @@ export class Contentful implements INodeType {
|
|||
|
||||
if (!rawData) {
|
||||
const assets: IDataObject[] = [];
|
||||
// tslint:disable-next-line: no-any
|
||||
|
||||
responseData.map((asset: any) => {
|
||||
assets.push(asset.fields);
|
||||
});
|
||||
|
|
|
@ -8,12 +8,11 @@ export async function contentfulApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
_option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('contentfulApi');
|
||||
const source = this.getNodeParameter('source', 0) as string;
|
||||
|
@ -45,10 +44,9 @@ export async function contenfulApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -8,12 +8,11 @@ export async function convertKitApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IHookFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('convertKitApi');
|
||||
|
||||
|
|
|
@ -15,12 +15,11 @@ export async function cortexApiRequest(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('cortexApi');
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ export class CustomerIo implements INodeType {
|
|||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.customProperties) {
|
||||
const data: any = {}; // tslint:disable-line:no-any
|
||||
const data: any = {};
|
||||
//@ts-ignore
|
||||
additionalFields.customProperties.customProperty.map((property) => {
|
||||
data[property.key] = property.value;
|
||||
|
@ -238,7 +238,7 @@ export class CustomerIo implements INodeType {
|
|||
}
|
||||
} else {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const data: any = {}; // tslint:disable-line:no-any
|
||||
const data: any = {};
|
||||
|
||||
if (additionalFields.customAttributes) {
|
||||
//@ts-ignore
|
||||
|
@ -287,7 +287,7 @@ export class CustomerIo implements INodeType {
|
|||
}
|
||||
} else {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const data: any = {}; // tslint:disable-line:no-any
|
||||
const data: any = {};
|
||||
|
||||
if (additionalFields.customAttributes) {
|
||||
//@ts-ignore
|
||||
|
|
|
@ -46,7 +46,6 @@ export function eventExists(currentEvents: string[], webhookEvents: IDataObject)
|
|||
return true;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
export function validateJSON(json: string | undefined): any {
|
||||
let result;
|
||||
try {
|
||||
|
|
|
@ -13,12 +13,11 @@ export async function demioApiRequest(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
try {
|
||||
const credentials = await this.getCredentials('demioApi');
|
||||
|
|
|
@ -18,12 +18,11 @@ export async function dhlApiRequest(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
path: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = (await this.getCredentials('dhlApi')) as { apiKey: string };
|
||||
|
||||
|
@ -52,7 +51,6 @@ export async function dhlApiRequest(
|
|||
export async function validateCredentials(
|
||||
this: ICredentialTestFunctions,
|
||||
decryptedCredentials: ICredentialDataDecryptedObject,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = decryptedCredentials;
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// tslint:disable: no-any
|
||||
|
||||
export interface DiscordWebhook {
|
||||
content?: string;
|
||||
username?: string;
|
||||
|
|
|
@ -8,11 +8,10 @@ export async function discourseApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
path: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
_option = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = (await this.getCredentials('discourseApi')) as { url: string };
|
||||
|
||||
|
@ -38,10 +37,9 @@ export async function discourseApiRequestAllItems(
|
|||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ export async function disqusApiRequest(
|
|||
uri?: string,
|
||||
body: IDataObject = {},
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = (await this.getCredentials('disqusApi')) as IDataObject;
|
||||
qs.api_key = credentials.accessToken;
|
||||
|
@ -60,7 +59,6 @@ export async function disqusApiRequestAllItems(
|
|||
uri?: string,
|
||||
body: IDataObject = {},
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -8,12 +8,11 @@ export async function driftApiRequest(
|
|||
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
let options: OptionsWithUri = {
|
||||
headers: {},
|
||||
|
|
|
@ -16,7 +16,6 @@ export async function dropboxApiRequest(
|
|||
query: IDataObject = {},
|
||||
headers: object = {},
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const options: OptionsWithUri = {
|
||||
headers,
|
||||
|
@ -51,11 +50,10 @@ export async function dropboxpiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
headers: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const resource = this.getNodeParameter('resource', 0) as string;
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ export class Dropcontact implements INodeType {
|
|||
const entryData = this.getInputData();
|
||||
const resource = this.getNodeParameter('resource', 0);
|
||||
const operation = this.getNodeParameter('operation', 0);
|
||||
// tslint:disable-next-line: no-any
|
||||
|
||||
let responseData: any;
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
@ -287,7 +287,7 @@ export class Dropcontact implements INodeType {
|
|||
|
||||
if (simplify === false) {
|
||||
const waitTime = this.getNodeParameter('options.waitTime', 0, 45) as number;
|
||||
// tslint:disable-next-line: no-any
|
||||
|
||||
const delay = (ms: any) => new Promise((res) => setTimeout(res, ms * 1000));
|
||||
await delay(waitTime);
|
||||
responseData = await dropcontactApiRequest.call(
|
||||
|
|
|
@ -62,7 +62,6 @@ export async function erpNextApiRequestAllItems(
|
|||
body: IDataObject,
|
||||
query: IDataObject = {},
|
||||
) {
|
||||
// tslint:disable-next-line: no-any
|
||||
const returnData: any[] = [];
|
||||
|
||||
let responseData;
|
||||
|
|
|
@ -31,11 +31,10 @@ export async function egoiApiRequest(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
_headers?: object,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('egoiApi');
|
||||
|
||||
|
@ -67,10 +66,9 @@ export async function egoiApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
@ -101,7 +99,6 @@ export async function simplify(this: IExecuteFunctions, contacts: IContact[], li
|
|||
|
||||
for (const contact of contacts) {
|
||||
const extras = contact.extra.reduce(
|
||||
// tslint:disable-next-line:no-any
|
||||
(acumulator: IDataObject, currentValue: IDataObject): any => {
|
||||
const key = fieldsKeyValue[currentValue.field_id as string] as string;
|
||||
return { [key]: currentValue.value, ...acumulator };
|
||||
|
|
|
@ -63,7 +63,7 @@ export async function elasticSecurityApiRequestAllItems(
|
|||
) {
|
||||
let _page = 1;
|
||||
const returnData: IDataObject[] = [];
|
||||
let responseData: any; // tslint:disable-line
|
||||
let responseData: any;
|
||||
|
||||
const resource = this.getNodeParameter('resource', 0) as 'case' | 'caseComment';
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ export async function elasticsearchApiRequestAllItems(
|
|||
indexId: string,
|
||||
body: IDataObject = {},
|
||||
qs: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
//https://www.elastic.co/guide/en/elasticsearch/reference/7.16/paginate-search-results.html#search-after
|
||||
try {
|
||||
|
|
|
@ -246,7 +246,7 @@ export class EmailReadImapV1 implements INodeType {
|
|||
let connection: ImapSimple;
|
||||
|
||||
// Returns the email text
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
const getText = async (parts: any[], message: Message, subtype: string) => {
|
||||
if (!message.attributes.struct) {
|
||||
return '';
|
||||
|
@ -272,7 +272,7 @@ export class EmailReadImapV1 implements INodeType {
|
|||
// Returns the email attachments
|
||||
const getAttachment = async (
|
||||
connection: ImapSimple,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
parts: any[],
|
||||
message: Message,
|
||||
): Promise<IBinaryData[]> => {
|
||||
|
|
|
@ -253,7 +253,7 @@ export class EmailReadImapV2 implements INodeType {
|
|||
let isCurrentlyReconnecting = false;
|
||||
|
||||
// Returns the email text
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
const getText = async (parts: any[], message: Message, subtype: string) => {
|
||||
if (!message.attributes.struct) {
|
||||
return '';
|
||||
|
@ -279,7 +279,7 @@ export class EmailReadImapV2 implements INodeType {
|
|||
// Returns the email attachments
|
||||
const getAttachment = async (
|
||||
connection: ImapSimple,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
parts: any[],
|
||||
message: Message,
|
||||
): Promise<IBinaryData[]> => {
|
||||
|
|
|
@ -19,12 +19,11 @@ export async function eventbriteApiRequest(
|
|||
| IWebhookFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
let options: OptionsWithUri = {
|
||||
headers: {},
|
||||
|
@ -64,10 +63,9 @@ export async function eventbriteApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ export class FacebookGraphApi implements INodeType {
|
|||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
|
||||
let response: any; // tslint:disable-line:no-any
|
||||
let response: any;
|
||||
const returnItems: INodeExecutionData[] = [];
|
||||
|
||||
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
||||
|
|
|
@ -21,12 +21,11 @@ export async function facebookApiRequest(
|
|||
| IWebhookFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
_option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
let credentials;
|
||||
|
||||
|
@ -549,7 +548,6 @@ export function getFields(object: string) {
|
|||
value: 'account_update',
|
||||
},
|
||||
],
|
||||
// tslint:disable-next-line: no-any
|
||||
} as { [key: string]: any };
|
||||
|
||||
return [{ name: '*', value: '*' }]
|
||||
|
|
|
@ -13,12 +13,11 @@ export async function figmaApiRequest(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
_qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('figmaApi');
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ interface ScriptObject {
|
|||
export async function layoutsApiRequest(
|
||||
this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions,
|
||||
): Promise<INodePropertyOptions[]> {
|
||||
// tslint:disable-line:no-any
|
||||
const token = await getToken.call(this);
|
||||
const credentials = await this.getCredentials('fileMaker');
|
||||
|
||||
|
@ -77,10 +76,7 @@ function parseLayouts(layouts: LayoutObject[]): INodePropertyOptions[] {
|
|||
* Make an API request to ActiveCampaign
|
||||
*
|
||||
*/
|
||||
export async function getFields(
|
||||
this: ILoadOptionsFunctions,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
export async function getFields(this: ILoadOptionsFunctions): Promise<any> {
|
||||
const token = await getToken.call(this);
|
||||
const credentials = await this.getCredentials('fileMaker');
|
||||
const layout = this.getCurrentNodeParameter('layout') as string;
|
||||
|
@ -111,10 +107,7 @@ export async function getFields(
|
|||
* Make an API request to ActiveCampaign
|
||||
*
|
||||
*/
|
||||
export async function getPortals(
|
||||
this: ILoadOptionsFunctions,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
export async function getPortals(this: ILoadOptionsFunctions): Promise<any> {
|
||||
const token = await getToken.call(this);
|
||||
const credentials = await this.getCredentials('fileMaker');
|
||||
const layout = this.getCurrentNodeParameter('layout') as string;
|
||||
|
@ -145,10 +138,7 @@ export async function getPortals(
|
|||
* Make an API request to ActiveCampaign
|
||||
*
|
||||
*/
|
||||
export async function getScripts(
|
||||
this: ILoadOptionsFunctions,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
export async function getScripts(this: ILoadOptionsFunctions): Promise<any> {
|
||||
const token = await getToken.call(this);
|
||||
const credentials = await this.getCredentials('fileMaker');
|
||||
|
||||
|
@ -193,7 +183,6 @@ function parseScriptsList(scripts: ScriptObject[]): INodePropertyOptions[] {
|
|||
|
||||
export async function getToken(
|
||||
this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('fileMaker');
|
||||
|
||||
|
@ -246,7 +235,6 @@ export async function getToken(
|
|||
export async function logout(
|
||||
this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions,
|
||||
token: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('fileMaker');
|
||||
|
||||
|
|
|
@ -11,12 +11,11 @@ export async function flowApiRequest(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('flowApi');
|
||||
|
||||
|
@ -49,10 +48,9 @@ export async function FlowApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -139,7 +139,6 @@ export class FormIoTrigger implements INodeType {
|
|||
if (
|
||||
action.settings.url === webhookUrl &&
|
||||
action.method.length === method.length &&
|
||||
// tslint:disable-next-line:no-any
|
||||
action.method.every((value: any) => method.includes(value))
|
||||
) {
|
||||
webhookData.webhookId = action._id;
|
||||
|
|
|
@ -52,7 +52,6 @@ export async function formIoApiRequest(
|
|||
endpoint: string,
|
||||
body = {},
|
||||
qs = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = (await this.getCredentials('formIoApi')) as unknown as IFormIoCredentials;
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@ export async function apiRequest(
|
|||
endpoint: string,
|
||||
body: IDataObject = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const authenticationMethod = this.getNodeParameter('authentication', 0);
|
||||
|
||||
|
@ -97,7 +96,6 @@ export async function apiRequestAllItems(
|
|||
body: IDataObject,
|
||||
dataKey: string,
|
||||
query?: IDataObject,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
if (query === undefined) {
|
||||
query = {};
|
||||
|
|
|
@ -8,7 +8,7 @@ export async function freshdeskApiRequest(
|
|||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
uri?: string,
|
||||
|
@ -49,7 +49,7 @@ export async function freshdeskApiRequestAllItems(
|
|||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
) {
|
||||
|
@ -73,7 +73,6 @@ export async function freshdeskApiRequestAllItems(
|
|||
return returnData;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
export function validateJSON(json: string | undefined): any {
|
||||
let result;
|
||||
try {
|
||||
|
|
|
@ -232,7 +232,7 @@ export class Freshservice implements INodeType {
|
|||
)) as {
|
||||
asset_type_fields: [{ fields: LoadedResource[] }];
|
||||
};
|
||||
// tslint:disable-next-line: no-any
|
||||
|
||||
let fields: any[] = [];
|
||||
fields = fields
|
||||
.concat(...asset_type_fields.map((data) => data.fields))
|
||||
|
|
|
@ -83,7 +83,7 @@ export async function freshworksCrmApiRequestAllItems(
|
|||
qs: IDataObject = {},
|
||||
) {
|
||||
const returnData: IDataObject[] = [];
|
||||
let response: any; // tslint:disable-line: no-any
|
||||
let response: any;
|
||||
|
||||
qs.page = 1;
|
||||
|
||||
|
|
|
@ -755,7 +755,6 @@ async function callRecursiveList(
|
|||
let index = 0;
|
||||
|
||||
do {
|
||||
// tslint:disable-next-line: array-type
|
||||
const returnData: sftpClient.FileInfo[] | (string | ftpClient.ListingElement)[] =
|
||||
await client.list(pathArray[index]);
|
||||
|
||||
|
|
|
@ -13,12 +13,11 @@ export async function getresponseApiRequest(
|
|||
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const authentication = this.getNodeParameter('authentication', 0, 'apiKey') as string;
|
||||
|
||||
|
@ -53,10 +52,9 @@ export async function getResponseApiRequestAllItems(
|
|||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -13,11 +13,10 @@ export async function ghostApiRequest(
|
|||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
uri?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const source = this.getNodeParameter('source', 0) as string;
|
||||
|
||||
|
@ -52,10 +51,9 @@ export async function ghostApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
@ -72,7 +70,6 @@ export async function ghostApiRequestAllItems(
|
|||
return returnData;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
export function validateJSON(json: string | undefined): any {
|
||||
let result;
|
||||
try {
|
||||
|
|
|
@ -15,7 +15,6 @@ export async function githubApiRequest(
|
|||
body: object,
|
||||
query?: object,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const options: OptionsWithUri = {
|
||||
method,
|
||||
|
@ -71,7 +70,6 @@ export async function getFileSha(
|
|||
repository: string,
|
||||
filePath: string,
|
||||
branch?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const getBody: IDataObject = {};
|
||||
if (branch !== undefined) {
|
||||
|
@ -90,10 +88,9 @@ export async function githubApiRequestAllItems(
|
|||
this: IHookFunctions | IExecuteFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ export async function gitlabApiRequest(
|
|||
body: object,
|
||||
query?: object,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const options: OptionsWithUri = {
|
||||
method,
|
||||
|
@ -55,10 +54,9 @@ export async function gitlabApiRequestAllItems(
|
|||
this: IHookFunctions | IExecuteFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -276,7 +276,6 @@ export async function loadRegistranMultiChoiceQuestions(this: ILoadOptionsFuncti
|
|||
return returnData;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line: no-any
|
||||
function convertLosslessNumber(key: any, value: any) {
|
||||
if (value && value.isLosslessNumber) {
|
||||
return value.toString();
|
||||
|
|
|
@ -8,12 +8,11 @@ export async function googleApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
let options: OptionsWithUri = {
|
||||
headers: {
|
||||
|
@ -47,11 +46,10 @@ export async function googleApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
uri?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
@ -75,7 +73,6 @@ export async function googleApiRequestAllItems(
|
|||
return returnData;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
export function simplify(responseData: any | [any]) {
|
||||
const response = [];
|
||||
for (const {
|
||||
|
@ -102,7 +99,6 @@ export function simplify(responseData: any | [any]) {
|
|||
return response;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
export function merge(responseData: [any]) {
|
||||
const response: { columnHeader: IDataObject; data: { rows: [] } } = {
|
||||
columnHeader: responseData[0].columnHeader,
|
||||
|
|
|
@ -12,12 +12,11 @@ export async function googleApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
headers: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const authenticationMethod = this.getNodeParameter(
|
||||
'authentication',
|
||||
|
@ -72,10 +71,9 @@ export async function googleApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -19,12 +19,11 @@ export async function googleApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
headers: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const authenticationMethod = this.getNodeParameter(
|
||||
'authentication',
|
||||
|
@ -81,10 +80,9 @@ export async function googleApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -16,12 +16,11 @@ export async function googleApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IPollFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
headers: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
|
@ -52,10 +51,9 @@ export async function googleApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -25,13 +25,12 @@ export async function googleApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
noCredentials = false,
|
||||
encoding?: null | undefined,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
|
@ -87,10 +86,9 @@ export async function googleApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
@ -160,7 +158,6 @@ export function getAccessToken(
|
|||
return this.helpers.request(options);
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
export function validateJSON(json: string | undefined): any {
|
||||
let result;
|
||||
try {
|
||||
|
|
|
@ -8,12 +8,11 @@ export async function googleApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
let options: OptionsWithUri = {
|
||||
headers: {
|
||||
|
|
|
@ -8,12 +8,11 @@ export async function googleApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
headers: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
|
@ -45,10 +44,9 @@ export async function googleApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
@ -91,7 +89,6 @@ export const allFields = [
|
|||
'userDefined',
|
||||
];
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
export function cleanData(responseData: any) {
|
||||
const fields = ['emailAddresses', 'phoneNumbers', 'relations', 'events', 'addresses'];
|
||||
const newResponseData = [];
|
||||
|
@ -99,7 +96,7 @@ export function cleanData(responseData: any) {
|
|||
responseData = [responseData];
|
||||
}
|
||||
for (let y = 0; y < responseData.length; y++) {
|
||||
const object: { [key: string]: any } = {}; // tslint:disable-line:no-any
|
||||
const object: { [key: string]: any } = {};
|
||||
for (const key of Object.keys(responseData[y])) {
|
||||
if (key === 'metadata') {
|
||||
continue;
|
||||
|
@ -129,7 +126,7 @@ export function cleanData(responseData: any) {
|
|||
}
|
||||
}
|
||||
if (fields.includes(key)) {
|
||||
const value: { [key: string]: any } = {}; // tslint:disable-line:no-any
|
||||
const value: { [key: string]: any } = {};
|
||||
for (const data of responseData[y][key]) {
|
||||
let result;
|
||||
if (value[data.type] === undefined) {
|
||||
|
|
|
@ -71,7 +71,6 @@ export async function googleApiRequestAllItems(
|
|||
body: IDataObject = {},
|
||||
qs?: IDataObject,
|
||||
uri?: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -19,12 +19,11 @@ export async function googleApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IPollFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const authenticationMethod = this.getNodeParameter(
|
||||
'authentication',
|
||||
|
@ -78,10 +77,9 @@ export async function googleApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -10,11 +10,10 @@ export async function googleApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri: string | null = null,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
|
@ -50,11 +49,10 @@ export async function googleApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
uri: string | null = null,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -9,12 +9,11 @@ export async function googleApiRequest(
|
|||
projectId: string,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
headers: IDataObject = {},
|
||||
uri: string | null = null,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const { region } = (await this.getCredentials(
|
||||
'googleFirebaseRealtimeDatabaseOAuth2Api',
|
||||
|
@ -54,12 +53,11 @@ export async function googleApiRequestAllItems(
|
|||
projectId: string,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
_headers: IDataObject = {},
|
||||
uri: string | null = null,
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
|
@ -8,12 +8,11 @@ export async function googleApiRequest(
|
|||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
headers: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
|
@ -44,10 +43,9 @@ export async function googleApiRequestAllItems(
|
|||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue