refactor(core): Introduce overload for string-type node parameter (no-changelog) (#4797)

* 📘 Set up overload

* 🔥 Remove inferrable assertions
This commit is contained in:
Iván Ovejero 2022-12-02 12:53:59 +01:00 committed by GitHub
parent 8ef675332d
commit 632f573021
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
233 changed files with 461 additions and 450 deletions

View file

@ -327,8 +327,8 @@ export class ActiveCampaign implements INodeType {
for (let i = 0; i < items.length; i++) {
try {
dataKey = undefined;
resource = this.getNodeParameter('resource', 0) as string;
operation = this.getNodeParameter('operation', 0) as string;
resource = this.getNodeParameter('resource', 0);
operation = this.getNodeParameter('operation', 0);
requestMethod = 'GET';
endpoint = '';

View file

@ -150,8 +150,8 @@ export class Affinity implements INodeType {
const length = items.length;
let responseData;
const qs: IDataObject = {};
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'list') {

View file

@ -93,8 +93,8 @@ export class AgileCrm implements INodeType {
const items = this.getInputData();
const returnData: IDataObject[] = [];
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
if (resource === 'contact' || resource === 'company') {

View file

@ -493,7 +493,7 @@ export class Airtable implements INodeType {
const returnData: INodeExecutionData[] = [];
let responseData;
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
const application = this.getNodeParameter('application', 0, undefined, {
extractValue: true,

View file

@ -346,8 +346,8 @@ export class ApiTemplateIo implements INodeType {
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
if (resource === 'account') {
// *********************************************************************
@ -436,7 +436,7 @@ export class ApiTemplateIo implements INodeType {
responseData = await apiTemplateIoApiRequest.call(this, 'POST', '/create', qs, body);
if (download === true) {
const binaryProperty = this.getNodeParameter('binaryProperty', i) as string;
const binaryProperty = this.getNodeParameter('binaryProperty', i);
const data = await downloadImage.call(this, responseData.download_url);
const fileName = responseData.download_url.split('/').pop();
const binaryData = await this.helpers.prepareBinaryData(
@ -520,7 +520,7 @@ export class ApiTemplateIo implements INodeType {
responseData = await apiTemplateIoApiRequest.call(this, 'POST', '/create', qs, data);
if (download === true) {
const binaryProperty = this.getNodeParameter('binaryProperty', i) as string;
const binaryProperty = this.getNodeParameter('binaryProperty', i);
const data = await downloadImage.call(this, responseData.download_url);
const fileName = responseData.download_url.split('/').pop();
const binaryData = await this.helpers.prepareBinaryData(

View file

@ -1911,8 +1911,8 @@ export class Asana implements INodeType {
const returnData: IDataObject[] = [];
const timezone = this.getTimezone();
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let endpoint = '';
let requestMethod: IHttpRequestMethods = 'GET';

View file

@ -125,8 +125,8 @@ export class Automizy implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
if (resource === 'contact') {
if (operation === 'create') {

View file

@ -121,8 +121,8 @@ export class Autopilot implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'contact') {

View file

@ -247,7 +247,7 @@ export class AwsSns implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const returnData: IDataObject[] = [];
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {

View file

@ -51,8 +51,8 @@ export class AwsCertificateManager implements INodeType {
const returnData: IDataObject[] = [];
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {
if (resource === 'certificate') {

View file

@ -191,8 +191,8 @@ export class AwsComprehend implements INodeType {
const items = this.getInputData();
const returnData: IDataObject[] = [];
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {
if (resource === 'text') {

View file

@ -218,8 +218,8 @@ export class AwsElb implements INodeType {
const items = this.getInputData();
const returnData: IDataObject[] = [];
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {

View file

@ -335,8 +335,8 @@ export class AwsRekognition implements INodeType {
const items = this.getInputData();
const returnData: IDataObject[] = [];
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {
if (resource === 'image') {

View file

@ -87,8 +87,8 @@ export class AwsS3 implements INodeType {
const returnData: IDataObject[] = [];
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
const headers: IDataObject = {};
try {

View file

@ -828,8 +828,8 @@ export class AwsSes implements INodeType {
const items = this.getInputData();
const returnData: IDataObject[] = [];
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {

View file

@ -290,7 +290,7 @@ export class AwsSqs implements INodeType {
const items = this.getInputData();
const returnData: IDataObject[] = [];
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {

View file

@ -115,7 +115,7 @@ export class AwsTextract implements INodeType {
const items = this.getInputData();
const returnData: IDataObject[] = [];
let responseData;
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {
//https://docs.aws.amazon.com/textract/latest/dg/API_AnalyzeExpense.html

View file

@ -355,8 +355,8 @@ export class AwsTranscribe implements INodeType {
const items = this.getInputData();
const returnData: IDataObject[] = [];
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {
if (resource === 'transcriptionJob') {

View file

@ -109,8 +109,8 @@ export class Bannerbear implements INodeType {
const returnData: IDataObject[] = [];
const length = items.length;
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
if (resource === 'image') {
//https://developers.bannerbear.com/#create-an-image

View file

@ -296,8 +296,8 @@ export class Beeminder implements INodeType {
const length = items.length;
const timezone = this.getTimezone();
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let results;
for (let i = 0; i < length; i++) {

View file

@ -252,7 +252,7 @@ export class BitbucketTrigger implements INodeType {
default: {
async checkExists(this: IHookFunctions): Promise<boolean> {
let endpoint = '';
const resource = this.getNodeParameter('resource', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const workspace = this.getNodeParameter('workspace', 0) as string;
const webhookUrl = this.getNodeWebhookUrl('default');
const webhookData = this.getWorkflowStaticData('node');
@ -278,7 +278,7 @@ export class BitbucketTrigger implements INodeType {
const webhookUrl = this.getNodeWebhookUrl('default');
const webhookData = this.getWorkflowStaticData('node');
const events = this.getNodeParameter('events') as string[];
const resource = this.getNodeParameter('resource', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const workspace = this.getNodeParameter('workspace', 0) as string;
if (resource === 'workspace') {
@ -302,7 +302,7 @@ export class BitbucketTrigger implements INodeType {
let endpoint = '';
const webhookData = this.getWorkflowStaticData('node');
const workspace = this.getNodeParameter('workspace', 0) as string;
const resource = this.getNodeParameter('resource', 0) as string;
const resource = this.getNodeParameter('resource', 0);
if (resource === 'workspace') {
endpoint = `/workspaces/${workspace}/hooks/${webhookData.webhookId}`;
}

View file

@ -128,8 +128,8 @@ export class Bitly implements INodeType {
const returnData: INodeExecutionData[] = [];
const length = items.length;
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'link') {

View file

@ -112,8 +112,8 @@ export class Bitwarden implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let responseData;
const returnData: INodeExecutionData[] = [];

View file

@ -72,8 +72,8 @@ export class Box implements INodeType {
const qs: IDataObject = {};
let responseData;
const timezone = this.getTimezone();
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'file') {

View file

@ -145,7 +145,7 @@ export class Brandfetch implements INodeType {
const items = this.getInputData();
const length = items.length;
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
const responseData: INodeExecutionData[] = [];
for (let i = 0; i < length; i++) {
try {

View file

@ -54,8 +54,8 @@ export class Bubble implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let responseData;
const qs: IDataObject = {};

View file

@ -52,8 +52,8 @@ export class CircleCi implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {

View file

@ -112,8 +112,8 @@ export class CiscoWebex implements INodeType {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const timezone = this.getTimezone();
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let responseData;

View file

@ -61,8 +61,8 @@ export class CitrixAdc implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const returnData: IDataObject[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let responseData: IDataObject | IDataObject[] = {};
for (let i = 0; i < items.length; i++) {
@ -70,7 +70,7 @@ export class CitrixAdc implements INodeType {
if (resource === 'file') {
if (operation === 'upload') {
const fileLocation = this.getNodeParameter('fileLocation', i) as string;
const binaryProperty = this.getNodeParameter('binaryProperty', i) as string;
const binaryProperty = this.getNodeParameter('binaryProperty', i);
const options = this.getNodeParameter('options', i);
const endpoint = `/config/systemfile`;
@ -119,7 +119,7 @@ export class CitrixAdc implements INodeType {
if (operation === 'download') {
const fileName = this.getNodeParameter('fileName', i) as string;
const fileLocation = this.getNodeParameter('fileLocation', i) as string;
const binaryProperty = this.getNodeParameter('binaryProperty', i) as string;
const binaryProperty = this.getNodeParameter('binaryProperty', i);
const endpoint = `/config/systemfile?args=filename:${fileName},filelocation:${encodeURIComponent(
fileLocation,

View file

@ -62,8 +62,8 @@ export class Clearbit implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'person') {

View file

@ -428,8 +428,8 @@ export class ClickUp implements INodeType {
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {

View file

@ -243,9 +243,9 @@ export class Clockify implements INodeType {
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {

View file

@ -74,8 +74,8 @@ export class Cloudflare implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {

View file

@ -102,8 +102,8 @@ export class Cockpit implements INodeType {
const items = this.getInputData();
const returnData: IDataObject[] = [];
const length = items.length;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let responseData;

View file

@ -242,9 +242,9 @@ export class Coda implements INodeType {
const returnData: INodeExecutionData[] = [];
const items = this.getInputData();
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const resource = this.getNodeParameter('resource', 0);
let qs: IDataObject = {};
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
if (resource === 'table') {
// https://coda.io/developers/apis/v1beta1#operation/upsertRows

View file

@ -143,8 +143,8 @@ export class CoinGecko implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'coin') {

View file

@ -180,7 +180,7 @@ export class Compression implements INodeType {
const items = this.getInputData();
const length = items.length;
const returnData: INodeExecutionData[] = [];
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {

View file

@ -82,8 +82,8 @@ export class Contentful implements INodeType {
};
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let responseData;
const items = this.getInputData();

View file

@ -159,8 +159,8 @@ export class ConvertKit implements INodeType {
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {

View file

@ -115,8 +115,8 @@ export class Copper implements INodeType {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let responseData;

View file

@ -166,8 +166,8 @@ export class Cortex implements INodeType {
const returnData: IDataObject[] = [];
const length = items.length;
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {

View file

@ -276,7 +276,7 @@ export class CrateDb implements INodeType {
let returnItems: INodeExecutionData[] = [];
const items = this.getInputData();
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
if (operation === 'executeQuery') {
// ----------------------------------

View file

@ -76,8 +76,8 @@ export class CustomerIo implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const returnData: IDataObject[] = [];
const items = this.getInputData();
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
const body: IDataObject = {};
let responseData;

View file

@ -109,8 +109,8 @@ export class Demio implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {

View file

@ -124,8 +124,8 @@ export class Dhl implements INodeType {
const returnData: IDataObject[] = [];
let qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {

View file

@ -114,8 +114,8 @@ export class Discourse implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'category') {

View file

@ -572,8 +572,8 @@ export class Disqus implements INodeType {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let endpoint = '';
let requestMethod = '';

View file

@ -79,8 +79,8 @@ export class Drift implements INodeType {
const returnData: IDataObject[] = [];
const length = items.length;
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'contact') {

View file

@ -695,8 +695,8 @@ export class Dropbox implements INodeType {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let endpoint = '';
let requestMethod = '';

View file

@ -241,8 +241,8 @@ export class Dropcontact implements INodeType {
};
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const entryData = this.getInputData();
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
// tslint:disable-next-line: no-any
let responseData: any;
const returnData: IDataObject[] = [];

View file

@ -120,8 +120,8 @@ export class ERPNext implements INodeType {
const body: IDataObject = {};
const qs: IDataObject = {};
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
// https://app.swaggerhub.com/apis-docs/alyf.de/ERPNext/11#/Resources/post_api_resource_Webhook

View file

@ -541,8 +541,8 @@ export class Egoi implements INodeType {
const returnData: INodeExecutionData[] = [];
const items = this.getInputData();
const length = items.length;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0);
const resource = this.getNodeParameter('resource', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'contact') {

View file

@ -166,8 +166,8 @@ export class ElasticSecurity implements INodeType {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let responseData;

View file

@ -66,7 +66,7 @@ export class Elasticsearch implements INodeType {
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as 'document' | 'index';
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
let responseData;

View file

@ -60,8 +60,8 @@ export class Flow implements INodeType {
const length = items.length;
let responseData;
const qs: IDataObject = {};
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
if (resource === 'task') {

View file

@ -1096,8 +1096,8 @@ export class Freshdesk implements INodeType {
const returnData: INodeExecutionData[] = [];
let responseData;
const qs: IDataObject = {};
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {
if (resource === 'ticket') {

View file

@ -271,8 +271,8 @@ export class Freshservice implements INodeType {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
const defaultTimezone = this.getTimezone();

View file

@ -239,8 +239,8 @@ export class FreshworksCrm implements INodeType {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
const defaultTimezone = this.getTimezone();
let responseData;

View file

@ -49,7 +49,7 @@ export async function getAllItemsViewId(
this: IExecuteFunctions | ILoadOptionsFunctions,
{ fromLoadOptions } = { fromLoadOptions: false },
) {
let resource = this.getNodeParameter('resource', 0) as string;
let resource = this.getNodeParameter('resource', 0);
let keyword = 'All';
if (resource === 'account' || fromLoadOptions) {

View file

@ -415,7 +415,7 @@ export class Ftp implements INodeType {
// const returnData: IDataObject[] = [];
const returnItems: INodeExecutionData[] = [];
let responseData;
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
let credentials: ICredentialDataDecryptedObject | undefined = undefined;
const protocol = this.getNodeParameter('protocol', 0) as string;

View file

@ -135,8 +135,8 @@ export class GetResponse implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'contact') {

View file

@ -124,8 +124,8 @@ export class Ghost implements INodeType {
const timezone = this.getTimezone();
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
const source = this.getNodeParameter('source', 0) as string;
for (let i = 0; i < length; i++) {

View file

@ -211,7 +211,7 @@ export class Git implements INodeType {
return repositoryPath;
};
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
let _item: INodeExecutionData;
const returnItems: INodeExecutionData[] = [];
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {

View file

@ -1658,8 +1658,8 @@ export class Github implements INodeType {
let requestMethod: string;
let endpoint: string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0);
const resource = this.getNodeParameter('resource', 0);
const fullOperation = `${resource}:${operation}`;
for (let i = 0; i < items.length; i++) {

View file

@ -1025,8 +1025,8 @@ export class Gitlab implements INodeType {
let endpoint: string;
let returnAll = false;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0);
const resource = this.getNodeParameter('resource', 0);
const fullOperation = `${resource}:${operation}`;
for (let i = 0; i < items.length; i++) {

View file

@ -24,8 +24,8 @@ export async function goToWebinarApiRequest(
body: IDataObject | IDataObject[],
option: IDataObject = {},
) {
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0);
const resource = this.getNodeParameter('resource', 0);
const options: OptionsWithUri = {
headers: {

View file

@ -150,8 +150,8 @@ export class GoToWebinar implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let responseData;
const returnData: INodeExecutionData[] = [];

View file

@ -141,8 +141,8 @@ export class GoogleAnalytics implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let method = '';
const qs: IDataObject = {};

View file

@ -142,8 +142,8 @@ export class GoogleBigQuery implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
if (resource === 'record') {
// *********************************************************************

View file

@ -345,8 +345,8 @@ export class GoogleBooks implements INodeType {
const items = this.getInputData();
const length = items.length;
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
const qs: IDataObject = {};
let responseData;

View file

@ -129,8 +129,8 @@ export class GoogleCalendar implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
const timezone = this.getTimezone();
for (let i = 0; i < length; i++) {
try {

View file

@ -199,8 +199,8 @@ export class GoogleChat implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'media') {

View file

@ -254,8 +254,8 @@ export class GoogleCloudNaturalLanguage implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const length = items.length;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
const responseData = [];
for (let i = 0; i < length; i++) {
if (resource === 'document') {

View file

@ -91,8 +91,8 @@ export class GoogleContacts implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'contact') {

View file

@ -202,8 +202,8 @@ export class GoogleDocs implements INodeType {
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {

View file

@ -2106,8 +2106,8 @@ export class GoogleDrive implements INodeType {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {

View file

@ -93,8 +93,8 @@ export class GoogleFirebaseCloudFirestore implements INodeType {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
if (resource === 'document') {
if (operation === 'get') {

View file

@ -166,7 +166,7 @@ export class GoogleFirebaseRealtimeDatabase implements INodeType {
const returnData: INodeExecutionData[] = [];
const length = items.length;
let responseData;
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
//https://firebase.google.com/docs/reference/rest/database
if (

View file

@ -113,8 +113,8 @@ export class GSuiteAdmin implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
if (resource === 'group') {
//https://developers.google.com/admin-sdk/directory/v1/reference/groups/insert

View file

@ -175,8 +175,8 @@ export class GmailV1 implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let method = '';
let body: IDataObject = {};

View file

@ -204,8 +204,8 @@ export class GmailV2 implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let responseData;

View file

@ -102,8 +102,8 @@ export class GoogleSheetsV1 implements INodeType {
};
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0);
const resource = this.getNodeParameter('resource', 0);
if (resource === 'sheet') {
const spreadsheetId = this.getNodeParameter('sheetId', 0) as string;

View file

@ -387,8 +387,8 @@ export class GoogleSlides implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let responseData;
const returnData: INodeExecutionData[] = [];
@ -433,7 +433,7 @@ export class GoogleSlides implements INodeType {
const download = this.getNodeParameter('download', 0);
if (download === true) {
const binaryProperty = this.getNodeParameter('binaryProperty', i) as string;
const binaryProperty = this.getNodeParameter('binaryProperty', i);
const data = await this.helpers.request({
uri: responseData.contentUrl,

View file

@ -83,8 +83,8 @@ export class GoogleTasks implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let body: IDataObject = {};
for (let i = 0; i < length; i++) {
try {

View file

@ -186,8 +186,8 @@ export class GoogleTranslate implements INodeType {
const items = this.getInputData();
const length = items.length;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
const responseData: INodeExecutionData[] = [];
for (let i = 0; i < length; i++) {
if (resource === 'language') {

View file

@ -189,8 +189,8 @@ export class YouTube implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'channel') {
@ -383,7 +383,7 @@ export class YouTube implements INodeType {
//https://developers.google.com/youtube/v3/docs/channelBanners/insert
if (operation === 'uploadBanner') {
const channelId = this.getNodeParameter('channelId', i) as string;
const binaryProperty = this.getNodeParameter('binaryProperty', i) as string;
const binaryProperty = this.getNodeParameter('binaryProperty', i);
let mimeType;
@ -849,7 +849,7 @@ export class YouTube implements INodeType {
const title = this.getNodeParameter('title', i) as string;
const categoryId = this.getNodeParameter('categoryId', i) as string;
const options = this.getNodeParameter('options', i);
const binaryProperty = this.getNodeParameter('binaryProperty', i) as string;
const binaryProperty = this.getNodeParameter('binaryProperty', i);
let mimeType;

View file

@ -163,8 +163,8 @@ export class Gotify implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'message') {

View file

@ -123,8 +123,8 @@ export class Grafana implements INodeType {
const items = this.getInputData();
const returnData: IDataObject[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let responseData;

View file

@ -118,7 +118,7 @@ export class Grist implements INodeType {
let responseData;
const returnData: IDataObject[] = [];
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < items.length; i++) {
try {

View file

@ -265,8 +265,8 @@ export class HackerNews implements INodeType {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let returnAll = false;
for (let i = 0; i < items.length; i++) {

View file

@ -222,8 +222,8 @@ export class HaloPSA implements INodeType {
const tokens = await getAccessTokens.call(this);
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
//====================================================================
// Main Loop

View file

@ -204,8 +204,8 @@ export class Harvest implements INodeType {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
let endpoint = '';
let requestMethod = '';

View file

@ -151,8 +151,8 @@ export class HelpScout implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
try {
if (resource === 'conversation') {

View file

@ -182,8 +182,8 @@ export class HomeAssistant implements INodeType {
const items = this.getInputData();
const returnData: IDataObject[] = [];
const length = items.length;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
const qs: IDataObject = {};
let responseData;
for (let i = 0; i < length; i++) {

View file

@ -933,8 +933,8 @@ export class Hubspot implements INodeType {
const length = items.length;
let responseData;
const qs: IDataObject = {};
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
//https://legacydocs.hubspot.com/docs/methods/lists/contact-lists-overview
if (resource === 'contactList') {

View file

@ -61,8 +61,8 @@ export class HumanticAi implements INodeType {
const length = items.length;
const qs: IDataObject = {};
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
for (let i = 0; i < length; i++) {
if (resource === 'profile') {
if (operation === 'create') {

View file

@ -274,7 +274,7 @@ export class Hunter implements INodeType {
let responseData;
for (let i = 0; i < length; i++) {
try {
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
//https://hunter.io/api-documentation/v2#domain-search
if (operation === 'domainSearch') {
const returnAll = this.getNodeParameter('returnAll', i);

View file

@ -300,7 +300,7 @@ export class ICalendar implements INodeType {
const items = this.getInputData();
const length = items.length;
const returnData: INodeExecutionData[] = [];
const operation = this.getNodeParameter('operation', 0) as string;
const operation = this.getNodeParameter('operation', 0);
if (operation === 'createEventFile') {
for (let i = 0; i < length; i++) {
const title = this.getNodeParameter('title', i) as string;

View file

@ -108,8 +108,8 @@ export class Intercom implements INodeType {
for (let i = 0; i < length; i++) {
try {
qs = {};
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
//https://developers.intercom.com/intercom-api-reference/reference#leads
if (resource === 'lead') {
if (operation === 'create' || operation === 'update') {

View file

@ -267,8 +267,8 @@ export class InvoiceNinja implements INodeType {
let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
const apiVersion = this.getNodeParameter('apiVersion', 0) as string;
for (let i = 0; i < length; i++) {

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