diff --git a/packages/cli/BREAKING-CHANGES.md b/packages/cli/BREAKING-CHANGES.md index ec7a00d861..d762f824da 100644 --- a/packages/cli/BREAKING-CHANGES.md +++ b/packages/cli/BREAKING-CHANGES.md @@ -105,7 +105,7 @@ const items = this.getInputData(); for (const i = 0; i < items.length; i++) { const item = items[i].binary as IBinaryKeyData; - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); const binaryData = item[binaryPropertyName] as IBinaryData; // Before 0.135.0: const binaryDataBuffer = Buffer.from(binaryData.data, BINARY_ENCODING); diff --git a/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts b/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts index 3deca7e3f5..6da1c53b96 100644 --- a/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts +++ b/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts @@ -415,7 +415,7 @@ export class AwsRekognition implements INodeType { const binaryData = this.getNodeParameter('binaryData', 0); if (binaryData) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0); if (items[i].binary === undefined) { throw new NodeOperationError(this.getNode(), 'No binary data exists on item!', { diff --git a/packages/nodes-base/nodes/Aws/S3/AwsS3.node.ts b/packages/nodes-base/nodes/Aws/S3/AwsS3.node.ts index 402ce87387..c480e18387 100644 --- a/packages/nodes-base/nodes/Aws/S3/AwsS3.node.ts +++ b/packages/nodes-base/nodes/Aws/S3/AwsS3.node.ts @@ -608,10 +608,7 @@ export class AwsS3 implements INodeType { items[i] = newItem; - const dataPropertyNameDownload = this.getNodeParameter( - 'binaryPropertyName', - i, - ) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); const data = Buffer.from(response.body as string, 'utf8'); @@ -806,7 +803,7 @@ export class AwsS3 implements INodeType { const region = responseData.LocationConstraint._; if (isBinaryData) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0); if (items[i].binary === undefined) { throw new NodeOperationError(this.getNode(), 'No binary data exists on item!', { diff --git a/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts b/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts index 5b18f95cc0..06848bb82d 100644 --- a/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts +++ b/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts @@ -120,7 +120,7 @@ export class AwsTextract implements INodeType { try { //https://docs.aws.amazon.com/textract/latest/dg/API_AnalyzeExpense.html if (operation === 'analyzeExpense') { - const binaryProperty = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryProperty = this.getNodeParameter('binaryPropertyName', i); const simple = this.getNodeParameter('simple', i) as boolean; if (items[i].binary === undefined) { diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/upload/execute.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/upload/execute.ts index 4132adbb7c..af1e939f4d 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/upload/execute.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/upload/execute.ts @@ -19,7 +19,7 @@ export async function upload(this: IExecuteFunctions, index: number) { }); } - const propertyNameUpload = this.getNodeParameter('binaryPropertyName', index) as string; + const propertyNameUpload = this.getNodeParameter('binaryPropertyName', index); if (items[index]!.binary![propertyNameUpload] === undefined) { throw new NodeOperationError( diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/file/upload/execute.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/file/upload/execute.ts index 84cd835edc..8389b67379 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/file/upload/execute.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/file/upload/execute.ts @@ -19,7 +19,7 @@ export async function upload(this: IExecuteFunctions, index: number) { }); } - const propertyNameUpload = this.getNodeParameter('binaryPropertyName', index) as string; + const propertyNameUpload = this.getNodeParameter('binaryPropertyName', index); if (items[index]!.binary![propertyNameUpload] === undefined) { throw new NodeOperationError( diff --git a/packages/nodes-base/nodes/Box/Box.node.ts b/packages/nodes-base/nodes/Box/Box.node.ts index 0bc23385e7..3c1cff1e0a 100644 --- a/packages/nodes-base/nodes/Box/Box.node.ts +++ b/packages/nodes-base/nodes/Box/Box.node.ts @@ -114,10 +114,7 @@ export class Box implements INodeType { // https://developer.box.com/reference/get-files-id-content if (operation === 'download') { const fileId = this.getNodeParameter('fileId', i) as string; - const dataPropertyNameDownload = this.getNodeParameter( - 'binaryPropertyName', - i, - ) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); responseData = await boxApiRequest.call(this, 'GET', `/files/${fileId}`); const fileName = responseData.name; @@ -280,7 +277,7 @@ export class Box implements INodeType { } if (isBinaryData) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0); if (items[i].binary === undefined) { throw new NodeOperationError(this.getNode(), 'No binary data exists on item!', { diff --git a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts index fad7ea4fd3..4b6ddad07f 100644 --- a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts +++ b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts @@ -513,7 +513,7 @@ export class CiscoWebex implements INodeType { // if (operation === 'download') { // for (let i = 0; i < items.length; i++) { // const transcriptId = this.getNodeParameter('transcriptId', i) as string; - // const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + // const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); // const meetingId = this.getNodeParameter('meetingId', i) as string; // const options = this.getNodeParameter('options', i); diff --git a/packages/nodes-base/nodes/Compression/Compression.node.ts b/packages/nodes-base/nodes/Compression/Compression.node.ts index d984fed1a2..547999446b 100644 --- a/packages/nodes-base/nodes/Compression/Compression.node.ts +++ b/packages/nodes-base/nodes/Compression/Compression.node.ts @@ -185,7 +185,7 @@ export class Compression implements INodeType { for (let i = 0; i < length; i++) { try { if (operation === 'decompress') { - const binaryPropertyNames = (this.getNodeParameter('binaryPropertyName', 0) as string) + const binaryPropertyNames = this.getNodeParameter('binaryPropertyName', 0) .split(',') .map((key) => key.trim()); @@ -256,7 +256,7 @@ export class Compression implements INodeType { } if (operation === 'compress') { - const binaryPropertyNames = (this.getNodeParameter('binaryPropertyName', 0) as string) + const binaryPropertyNames = this.getNodeParameter('binaryPropertyName', 0) .split(',') .map((key) => key.trim()); @@ -308,7 +308,7 @@ export class Compression implements INodeType { if (outputFormat === 'zip') { const fileName = this.getNodeParameter('fileName', 0) as string; - const binaryPropertyOutput = this.getNodeParameter('binaryPropertyOutput', 0) as string; + const binaryPropertyOutput = this.getNodeParameter('binaryPropertyOutput', 0); const buffer = await zip(zipData); diff --git a/packages/nodes-base/nodes/Cortex/Cortex.node.ts b/packages/nodes-base/nodes/Cortex/Cortex.node.ts index 0ed093c6d2..6ba7674a8f 100644 --- a/packages/nodes-base/nodes/Cortex/Cortex.node.ts +++ b/packages/nodes-base/nodes/Cortex/Cortex.node.ts @@ -201,7 +201,7 @@ export class Cortex implements INodeType { }); } - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); if (item.binary[binaryPropertyName] === undefined) { throw new NodeOperationError( diff --git a/packages/nodes-base/nodes/Crypto/Crypto.node.ts b/packages/nodes-base/nodes/Crypto/Crypto.node.ts index 9fbbbefc5b..3d4a25cb89 100644 --- a/packages/nodes-base/nodes/Crypto/Crypto.node.ts +++ b/packages/nodes-base/nodes/Crypto/Crypto.node.ts @@ -434,12 +434,12 @@ export class Crypto implements INodeType { for (let i = 0; i < length; i++) { try { item = items[i]; - const dataPropertyName = this.getNodeParameter('dataPropertyName', i) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', i); const value = this.getNodeParameter('value', i, '') as string; let newValue; if (action === 'generate') { - const encodingType = this.getNodeParameter('encodingType', i) as string; + const encodingType = this.getNodeParameter('encodingType', i); if (encodingType === 'uuid') { newValue = uuid(); } else { diff --git a/packages/nodes-base/nodes/DateTime/DateTime.node.ts b/packages/nodes-base/nodes/DateTime/DateTime.node.ts index ba7b56237b..d48937f10f 100644 --- a/packages/nodes-base/nodes/DateTime/DateTime.node.ts +++ b/packages/nodes-base/nodes/DateTime/DateTime.node.ts @@ -376,7 +376,7 @@ export class DateTime implements INodeType { if (action === 'format') { const currentDate = this.getNodeParameter('value', i) as string; - const dataPropertyName = this.getNodeParameter('dataPropertyName', i) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', i); const toFormat = this.getNodeParameter('toFormat', i) as string; const options = this.getNodeParameter('options', i); let newDate; @@ -461,7 +461,7 @@ export class DateTime implements INodeType { const duration = this.getNodeParameter('duration', i) as number; const timeUnit = this.getNodeParameter('timeUnit', i) as moment.DurationInputArg2; const { fromFormat } = this.getNodeParameter('options', i) as { fromFormat?: string }; - const dataPropertyName = this.getNodeParameter('dataPropertyName', i) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', i); const newDate = fromFormat ? parseDateByFormat.call(this, dateValue, fromFormat) diff --git a/packages/nodes-base/nodes/Dropbox/Dropbox.node.ts b/packages/nodes-base/nodes/Dropbox/Dropbox.node.ts index 4791b68502..e414d99c11 100644 --- a/packages/nodes-base/nodes/Dropbox/Dropbox.node.ts +++ b/packages/nodes-base/nodes/Dropbox/Dropbox.node.ts @@ -769,7 +769,7 @@ export class Dropbox implements INodeType { }); } - const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i) as string; + const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i); if (item.binary[propertyNameUpload] === undefined) { throw new NodeOperationError( @@ -954,7 +954,7 @@ export class Dropbox implements INodeType { items[i] = newItem; - const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); const filePathDownload = this.getNodeParameter('path', i) as string; items[i].binary![dataPropertyNameDownload] = await this.helpers.prepareBinaryData( diff --git a/packages/nodes-base/nodes/EditImage/EditImage.node.ts b/packages/nodes-base/nodes/EditImage/EditImage.node.ts index 1dcaaf8ebe..d90a0b4ef7 100644 --- a/packages/nodes-base/nodes/EditImage/EditImage.node.ts +++ b/packages/nodes-base/nodes/EditImage/EditImage.node.ts @@ -986,7 +986,7 @@ export class EditImage implements INodeType { item = items[itemIndex]; const operation = this.getNodeParameter('operation', itemIndex); - const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex); const options = this.getNodeParameter('options', itemIndex, {}); diff --git a/packages/nodes-base/nodes/Facebook/FacebookGraphApi.node.ts b/packages/nodes-base/nodes/Facebook/FacebookGraphApi.node.ts index 6261bbb94e..01cf9bc477 100644 --- a/packages/nodes-base/nodes/Facebook/FacebookGraphApi.node.ts +++ b/packages/nodes-base/nodes/Facebook/FacebookGraphApi.node.ts @@ -374,10 +374,7 @@ export class FacebookGraphApi implements INodeType { }); } - const binaryPropertyNameFull = this.getNodeParameter( - 'binaryPropertyName', - itemIndex, - ) as string; + const binaryPropertyNameFull = this.getNodeParameter('binaryPropertyName', itemIndex); let propertyName = 'file'; let binaryPropertyName = binaryPropertyNameFull; diff --git a/packages/nodes-base/nodes/Ftp/Ftp.node.ts b/packages/nodes-base/nodes/Ftp/Ftp.node.ts index 7053b56f2e..543067afb8 100644 --- a/packages/nodes-base/nodes/Ftp/Ftp.node.ts +++ b/packages/nodes-base/nodes/Ftp/Ftp.node.ts @@ -518,10 +518,7 @@ export class Ftp implements INodeType { responseData = await sftp!.get(path); - const dataPropertyNameDownload = this.getNodeParameter( - 'binaryPropertyName', - i, - ) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); const filePathDownload = this.getNodeParameter('path', i) as string; items[i].binary![dataPropertyNameDownload] = await this.helpers.prepareBinaryData( @@ -546,7 +543,7 @@ export class Ftp implements INodeType { }); } - const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i) as string; + const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i); if (item.binary[propertyNameUpload] === undefined) { throw new NodeOperationError( @@ -619,10 +616,7 @@ export class Ftp implements INodeType { // @ts-ignore responseData = Buffer.concat(chunks); - const dataPropertyNameDownload = this.getNodeParameter( - 'binaryPropertyName', - i, - ) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); const filePathDownload = this.getNodeParameter('path', i) as string; items[i].binary![dataPropertyNameDownload] = await this.helpers.prepareBinaryData( @@ -658,7 +652,7 @@ export class Ftp implements INodeType { }); } - const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i) as string; + const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i); if (item.binary[propertyNameUpload] === undefined) { throw new NodeOperationError( diff --git a/packages/nodes-base/nodes/Github/Github.node.ts b/packages/nodes-base/nodes/Github/Github.node.ts index 81dd776152..067497cf55 100644 --- a/packages/nodes-base/nodes/Github/Github.node.ts +++ b/packages/nodes-base/nodes/Github/Github.node.ts @@ -1687,7 +1687,7 @@ export class Github implements INodeType { requestMethod = 'PUT'; - const filePath = this.getNodeParameter('filePath', i) as string; + const filePath = this.getNodeParameter('filePath', i); const additionalParameters = this.getNodeParameter( 'additionalParameters', @@ -1731,7 +1731,7 @@ export class Github implements INodeType { }); } - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); if (item.binary[binaryPropertyName] === undefined) { throw new NodeOperationError( @@ -1778,7 +1778,7 @@ export class Github implements INodeType { body.branch = (additionalParameters.branch as IDataObject).branch; } - const filePath = this.getNodeParameter('filePath', i) as string; + const filePath = this.getNodeParameter('filePath', i); body.message = this.getNodeParameter('commitMessage', i) as string; body.sha = await getFileSha.call( @@ -1793,7 +1793,7 @@ export class Github implements INodeType { } else if (operation === 'get') { requestMethod = 'GET'; - const filePath = this.getNodeParameter('filePath', i) as string; + const filePath = this.getNodeParameter('filePath', i); const additionalParameters = this.getNodeParameter( 'additionalParameters', i, @@ -1806,7 +1806,7 @@ export class Github implements INodeType { endpoint = `/repos/${owner}/${repository}/contents/${encodeURI(filePath)}`; } else if (operation === 'list') { requestMethod = 'GET'; - const filePath = this.getNodeParameter('filePath', i) as string; + const filePath = this.getNodeParameter('filePath', i); endpoint = `/repos/${owner}/${repository}/contents/${encodeURI(filePath)}`; } } else if (resource === 'issue') { @@ -2117,7 +2117,7 @@ export class Github implements INodeType { }); } // Add the returned data to the item as binary property - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); const newItem: INodeExecutionData = { json: items[i].json, diff --git a/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts b/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts index 6b38025b90..6b80b967a9 100644 --- a/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts +++ b/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts @@ -243,7 +243,7 @@ export class GoogleChat implements INodeType { items[i] = newItem; - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); items[i].binary![binaryPropertyName] = await this.helpers.prepareBinaryData( responseData, diff --git a/packages/nodes-base/nodes/Google/Drive/GoogleDrive.node.ts b/packages/nodes-base/nodes/Google/Drive/GoogleDrive.node.ts index bf2d999249..3858c91164 100644 --- a/packages/nodes-base/nodes/Google/Drive/GoogleDrive.node.ts +++ b/packages/nodes-base/nodes/Google/Drive/GoogleDrive.node.ts @@ -2392,10 +2392,7 @@ export class GoogleDrive implements INodeType { items[i] = newItem; - const dataPropertyNameDownload = this.getNodeParameter( - 'binaryPropertyName', - i, - ) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); items[i].binary![dataPropertyNameDownload] = await this.helpers.prepareBinaryData( response.body as unknown as Readable, @@ -2521,7 +2518,7 @@ export class GoogleDrive implements INodeType { }); } - const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i) as string; + const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i); const binary = item.binary[propertyNameUpload]; if (binary === undefined) { diff --git a/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts b/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts index 8bdebbaf2b..7a45f54ea3 100644 --- a/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts +++ b/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts @@ -426,7 +426,7 @@ export class GraphQL implements INodeType { response = await this.helpers.request(requestOptions); } if (responseFormat === 'string') { - const dataPropertyName = this.getNodeParameter('dataPropertyName', 0) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', 0); returnItems.push({ json: { [dataPropertyName]: response, diff --git a/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts b/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts index eb850514c1..2ea8321b48 100644 --- a/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts +++ b/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts @@ -392,10 +392,7 @@ export class HomeAssistant implements INodeType { } else if (resource === 'cameraProxy') { if (operation === 'getScreenshot') { const cameraEntityId = this.getNodeParameter('cameraEntityId', i) as string; - const dataPropertyNameDownload = this.getNodeParameter( - 'binaryPropertyName', - i, - ) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); const endpoint = `/camera_proxy/${cameraEntityId}`; let mimeType: string | undefined; diff --git a/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts b/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts index 40a1e28d92..cf731ad498 100644 --- a/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts +++ b/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts @@ -214,7 +214,7 @@ export class HtmlExtract implements INodeType { let item: INodeExecutionData; for (let itemIndex = 0; itemIndex < items.length; itemIndex++) { try { - const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex); const extractionValues = this.getNodeParameter( 'extractionValues', itemIndex, diff --git a/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts b/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts index 7965e54933..c6ded920d7 100644 --- a/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts @@ -746,10 +746,7 @@ export class HttpRequestV1 implements INodeType { } if (options.bodyContentType === 'raw') { - const binaryPropertyName = this.getNodeParameter( - 'binaryPropertyName', - itemIndex, - ) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', itemIndex); if (item.binary[binaryPropertyName] === undefined) { throw new NodeOperationError( this.getNode(), @@ -768,7 +765,7 @@ export class HttpRequestV1 implements INodeType { const binaryPropertyNameFull = this.getNodeParameter( 'binaryPropertyName', itemIndex, - ) as string; + ); const binaryPropertyNames = binaryPropertyNameFull .split(',') .map((key) => key.trim()); @@ -1012,7 +1009,7 @@ export class HttpRequestV1 implements INodeType { const fullResponse = !!options.fullResponse; if (responseFormat === 'file') { - const dataPropertyName = this.getNodeParameter('dataPropertyName', 0) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', 0); const newItem: INodeExecutionData = { json: {}, @@ -1058,7 +1055,7 @@ export class HttpRequestV1 implements INodeType { returnItems.push(newItem); } else if (responseFormat === 'string') { - const dataPropertyName = this.getNodeParameter('dataPropertyName', 0) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', 0); if (fullResponse) { const returnItem: IDataObject = {}; diff --git a/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts b/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts index 60fc469b57..0692eca397 100644 --- a/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts @@ -785,10 +785,7 @@ export class HttpRequestV2 implements INodeType { } if (options.bodyContentType === 'raw') { - const binaryPropertyName = this.getNodeParameter( - 'binaryPropertyName', - itemIndex, - ) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', itemIndex); if (item.binary[binaryPropertyName] === undefined) { throw new NodeOperationError( this.getNode(), @@ -807,7 +804,7 @@ export class HttpRequestV2 implements INodeType { const binaryPropertyNameFull = this.getNodeParameter( 'binaryPropertyName', itemIndex, - ) as string; + ); const binaryPropertyNames = binaryPropertyNameFull .split(',') .map((key) => key.trim()); @@ -1065,7 +1062,7 @@ export class HttpRequestV2 implements INodeType { const fullResponse = !!options.fullResponse; if (responseFormat === 'file') { - const dataPropertyName = this.getNodeParameter('dataPropertyName', 0) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', 0); const newItem: INodeExecutionData = { json: {}, @@ -1111,7 +1108,7 @@ export class HttpRequestV2 implements INodeType { returnItems.push(newItem); } else if (responseFormat === 'string') { - const dataPropertyName = this.getNodeParameter('dataPropertyName', 0) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', 0); if (fullResponse) { const returnItem: IDataObject = {}; diff --git a/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts b/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts index 82389ea039..05c77df76d 100644 --- a/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts +++ b/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts @@ -70,7 +70,7 @@ export class HumanticAi implements INodeType { qs.userid = userId; if (sendResume) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); if (items[i].binary === undefined) { throw new NodeOperationError(this.getNode(), 'No binary data exists on item!', { @@ -143,7 +143,7 @@ export class HumanticAi implements INodeType { qs.userid = userId; if (sendResume) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); if (items[i].binary === undefined) { throw new NodeOperationError(this.getNode(), 'No binary data exists on item!', { diff --git a/packages/nodes-base/nodes/ICalendar/ICalendar.node.ts b/packages/nodes-base/nodes/ICalendar/ICalendar.node.ts index d86ca44ea8..d0896ee477 100644 --- a/packages/nodes-base/nodes/ICalendar/ICalendar.node.ts +++ b/packages/nodes-base/nodes/ICalendar/ICalendar.node.ts @@ -308,7 +308,7 @@ export class ICalendar implements INodeType { const start = this.getNodeParameter('start', i) as string; let end = this.getNodeParameter('end', i) as string; end = allDay ? moment(end).utc().add(1, 'day').format() : end; - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); const additionalFields = this.getNodeParameter('additionalFields', i); let fileName = 'event.ics'; diff --git a/packages/nodes-base/nodes/Jira/Jira.node.ts b/packages/nodes-base/nodes/Jira/Jira.node.ts index 3dedfbcdeb..ace29863c9 100644 --- a/packages/nodes-base/nodes/Jira/Jira.node.ts +++ b/packages/nodes-base/nodes/Jira/Jira.node.ts @@ -975,7 +975,7 @@ export class Jira implements INodeType { //https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-issue-issueidorkey-attachments-post if (operation === 'add') { for (let i = 0; i < length; i++) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); const issueKey = this.getNodeParameter('issueKey', i) as string; if (items[i].binary === undefined) { diff --git a/packages/nodes-base/nodes/Keap/Keap.node.ts b/packages/nodes-base/nodes/Keap/Keap.node.ts index 35a87c85bd..e8a8eb9a87 100644 --- a/packages/nodes-base/nodes/Keap/Keap.node.ts +++ b/packages/nodes-base/nodes/Keap/Keap.node.ts @@ -827,7 +827,7 @@ export class Keap implements INodeType { body.contact_id = contactId; } if (binaryData) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); if (items[i].binary === undefined) { throw new NodeOperationError(this.getNode(), 'No binary data exists on item!', { diff --git a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts index 61c269ccc4..40c07f451e 100644 --- a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts +++ b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts @@ -400,7 +400,7 @@ export class KoBoToolbox implements INodeType { ]; if (responseData?.[0] && download) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); const binaryItem: INodeExecutionData = { json: responseData[0], @@ -441,7 +441,7 @@ export class KoBoToolbox implements INodeType { }; if ('binary' === fileMode) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); const item = items[i].binary as IBinaryKeyData; const binaryData = item[binaryPropertyName]; diff --git a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts index 96b3cbd338..847658982b 100644 --- a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts +++ b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts @@ -146,7 +146,7 @@ export class LinkedIn implements INodeType { }); } - const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i) as string; + const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i); if (item.binary[propertyNameUpload] === undefined) { throw new NodeOperationError( diff --git a/packages/nodes-base/nodes/Matrix/GenericFunctions.ts b/packages/nodes-base/nodes/Matrix/GenericFunctions.ts index aa0525f0fb..261b539ec7 100644 --- a/packages/nodes-base/nodes/Matrix/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Matrix/GenericFunctions.ts @@ -184,7 +184,7 @@ export async function handleMatrixCall( if (operation === 'upload') { const roomId = this.getNodeParameter('roomId', index) as string; const mediaType = this.getNodeParameter('mediaType', index) as string; - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', index) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', index); let body; const qs: IDataObject = {}; diff --git a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts index 5d3f06803d..fa030048e8 100644 --- a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts +++ b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts @@ -104,10 +104,7 @@ export class MicrosoftOneDrive implements INodeType { //https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_list_children?view=odsp-graph-online if (operation === 'download') { const fileId = this.getNodeParameter('fileId', i) as string; - const dataPropertyNameDownload = this.getNodeParameter( - 'binaryPropertyName', - i, - ) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); responseData = await microsoftApiRequest.call(this, 'GET', `/drive/items/${fileId}`); const fileName = responseData.name; @@ -199,7 +196,7 @@ export class MicrosoftOneDrive implements INodeType { const fileName = this.getNodeParameter('fileName', i) as string; if (isBinaryData) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0); if (items[i].binary === undefined) { throw new NodeOperationError(this.getNode(), 'No binary data exists on item!', { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlook.node.ts b/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlook.node.ts index 5fe5ebac01..7c99401574 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlook.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlook.node.ts @@ -370,10 +370,7 @@ export class MicrosoftOutlook implements INodeType { for (let i = 0; i < length; i++) { try { const messageId = this.getNodeParameter('messageId', i) as string; - const dataPropertyNameDownload = this.getNodeParameter( - 'binaryPropertyName', - i, - ) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); const response = await microsoftApiRequest.call( this, 'GET', @@ -557,7 +554,7 @@ export class MicrosoftOutlook implements INodeType { for (let i = 0; i < length; i++) { try { const messageId = this.getNodeParameter('messageId', i) as string; - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0); const additionalFields = this.getNodeParameter('additionalFields', i); if (items[i].binary === undefined) { @@ -667,10 +664,7 @@ export class MicrosoftOutlook implements INodeType { try { const messageId = this.getNodeParameter('messageId', i) as string; const attachmentId = this.getNodeParameter('attachmentId', i) as string; - const dataPropertyNameDownload = this.getNodeParameter( - 'binaryPropertyName', - i, - ) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); // Get attachment details first const attachmentDetails = await microsoftApiRequest.call( diff --git a/packages/nodes-base/nodes/Mindee/Mindee.node.ts b/packages/nodes-base/nodes/Mindee/Mindee.node.ts index cf022e97fa..6c284199ed 100644 --- a/packages/nodes-base/nodes/Mindee/Mindee.node.ts +++ b/packages/nodes-base/nodes/Mindee/Mindee.node.ts @@ -160,7 +160,7 @@ export class Mindee implements INodeType { try { if (resource === 'receipt') { if (operation === 'predict') { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); const rawData = this.getNodeParameter('rawData', i); @@ -231,7 +231,7 @@ export class Mindee implements INodeType { if (resource === 'invoice') { if (operation === 'predict') { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); const rawData = this.getNodeParameter('rawData', i); diff --git a/packages/nodes-base/nodes/Nasa/Nasa.node.ts b/packages/nodes-base/nodes/Nasa/Nasa.node.ts index a43a0e06ff..e4701502d7 100644 --- a/packages/nodes-base/nodes/Nasa/Nasa.node.ts +++ b/packages/nodes-base/nodes/Nasa/Nasa.node.ts @@ -1050,7 +1050,7 @@ export class Nasa implements INodeType { } if (resource === 'earthImagery') { - const binaryProperty = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryProperty = this.getNodeParameter('binaryPropertyName', i); const data = await nasaApiRequest.call(this, 'GET', endpoint, qs, { encoding: null }); @@ -1072,7 +1072,7 @@ export class Nasa implements INodeType { download = this.getNodeParameter('download', 0); if (download) { - const binaryProperty = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryProperty = this.getNodeParameter('binaryPropertyName', i); const data = await nasaApiRequest.call( this, diff --git a/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts b/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts index 348afb891d..69c709e0cd 100644 --- a/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts +++ b/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts @@ -911,7 +911,7 @@ export class NextCloud implements INodeType { }); } - const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i) as string; + const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i); if (item.binary[propertyNameUpload] === undefined) { throw new NodeOperationError( @@ -1144,7 +1144,7 @@ export class NextCloud implements INodeType { items[i] = newItem; - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); items[i].binary![binaryPropertyName] = await this.helpers.prepareBinaryData( responseData, diff --git a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts index a05ef56958..834288443a 100644 --- a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts +++ b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts @@ -4345,7 +4345,7 @@ export class Pipedrive implements INodeType { }); } - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); if (item.binary[binaryPropertyName] === undefined) { throw new NodeOperationError( @@ -4847,7 +4847,7 @@ export class Pipedrive implements INodeType { items[i] = newItem; - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); items[i].binary![binaryPropertyName] = await this.helpers.prepareBinaryData( responseData.data, diff --git a/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts b/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts index 4be313744e..d9ab330a94 100644 --- a/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts +++ b/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts @@ -407,7 +407,7 @@ export class Pushbullet implements INodeType { } if (type === 'file') { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0); if (items[i].binary === undefined) { throw new NodeOperationError(this.getNode(), 'No binary data exists on item!'); diff --git a/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts b/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts index 1cc466b7db..dd1c56e575 100644 --- a/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts +++ b/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts @@ -208,7 +208,7 @@ export class QuickBase implements INodeType { items[i] = newItem; - const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); responseData = await quickbaseApiRequest.call( this, diff --git a/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts b/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts index dee0ddb233..453b13d1b8 100644 --- a/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts +++ b/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts @@ -61,9 +61,9 @@ export class ReadBinaryFile implements INodeType { Object.assign(newItem.binary, item.binary); } - const filePath = this.getNodeParameter('filePath', itemIndex) as string; + const filePath = this.getNodeParameter('filePath', itemIndex); const stream = await this.helpers.createReadStream(filePath); - const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex); newItem.binary![dataPropertyName] = await this.helpers.prepareBinaryData(stream, filePath); returnData.push(newItem); } catch (error) { diff --git a/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts b/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts index c080bb0a0c..3f2c668162 100644 --- a/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts +++ b/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts @@ -39,7 +39,7 @@ export class ReadBinaryFiles implements INodeType { async execute(this: IExecuteFunctions): Promise { const fileSelector = this.getNodeParameter('fileSelector', 0) as string; - const dataPropertyName = this.getNodeParameter('dataPropertyName', 0) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', 0); const files = await glob(fileSelector); diff --git a/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts b/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts index ffb16a5005..0d234beba8 100644 --- a/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts +++ b/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts @@ -41,7 +41,7 @@ export class ReadPDF implements INodeType { for (let itemIndex = 0; itemIndex < length; itemIndex++) { try { item = items[itemIndex]; - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', itemIndex) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', itemIndex); if (item.binary === undefined) { item.binary = {}; diff --git a/packages/nodes-base/nodes/S3/S3.node.ts b/packages/nodes-base/nodes/S3/S3.node.ts index a041d0e757..fcf333ab36 100644 --- a/packages/nodes-base/nodes/S3/S3.node.ts +++ b/packages/nodes-base/nodes/S3/S3.node.ts @@ -626,10 +626,7 @@ export class S3 implements INodeType { items[i] = newItem; - const dataPropertyNameDownload = this.getNodeParameter( - 'binaryPropertyName', - i, - ) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); const data = Buffer.from(response.body as string, 'utf8'); @@ -835,7 +832,7 @@ export class S3 implements INodeType { const region = responseData.LocationConstraint._; if (isBinaryData) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0); if (items[i].binary === undefined) { throw new NodeOperationError(this.getNode(), 'No binary data exists on item!', { diff --git a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts index 0ec777247f..d9036c2c71 100644 --- a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts +++ b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts @@ -1834,7 +1834,7 @@ export class Salesforce implements INodeType { if (operation === 'upload') { const title = this.getNodeParameter('title', i) as string; const additionalFields = this.getNodeParameter('additionalFields', i); - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); let data; const body: { entity_content: { [key: string]: string } } = { entity_content: { @@ -2852,7 +2852,7 @@ export class Salesforce implements INodeType { const name = this.getNodeParameter('name', i) as string; const parentId = this.getNodeParameter('parentId', i) as string; const additionalFields = this.getNodeParameter('additionalFields', i); - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); const body: IAttachment = { Name: name, ParentId: parentId, diff --git a/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts b/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts index cb97bdf1f5..ab2a5c8fa3 100644 --- a/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts +++ b/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts @@ -242,7 +242,7 @@ export class SecurityScorecard implements INodeType { items[i] = newItem; - const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); const fileName = reportUrl.split('/').pop(); diff --git a/packages/nodes-base/nodes/Slack/Slack.node.ts b/packages/nodes-base/nodes/Slack/Slack.node.ts index 1c8532725f..3c2d038cd0 100644 --- a/packages/nodes-base/nodes/Slack/Slack.node.ts +++ b/packages/nodes-base/nodes/Slack/Slack.node.ts @@ -1092,7 +1092,7 @@ export class Slack implements INodeType { body.title = options.title as string; } if (binaryData) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); if ( items[i].binary === undefined || //@ts-ignore diff --git a/packages/nodes-base/nodes/SpreadsheetFile/SpreadsheetFile.node.ts b/packages/nodes-base/nodes/SpreadsheetFile/SpreadsheetFile.node.ts index 8aadc753a4..6d64579be0 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/SpreadsheetFile.node.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/SpreadsheetFile.node.ts @@ -308,7 +308,7 @@ export class SpreadsheetFile implements INodeType { try { item = items[i]; - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i); const options = this.getNodeParameter('options', i, {}); if (item.binary === undefined || item.binary[binaryPropertyName] === undefined) { @@ -413,7 +413,7 @@ export class SpreadsheetFile implements INodeType { } else if (operation === 'toFile') { try { // Write the workflow data to spreadsheet file - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0); const fileFormat = this.getNodeParameter('fileFormat', 0) as string; const options = this.getNodeParameter('options', 0, {}); const sheetToJsonOptions: JSON2SheetOpts = {}; diff --git a/packages/nodes-base/nodes/Ssh/Ssh.node.ts b/packages/nodes-base/nodes/Ssh/Ssh.node.ts index 61bd01897f..372a122251 100644 --- a/packages/nodes-base/nodes/Ssh/Ssh.node.ts +++ b/packages/nodes-base/nodes/Ssh/Ssh.node.ts @@ -302,10 +302,7 @@ export class Ssh implements INodeType { if (resource === 'file') { if (operation === 'download') { - const dataPropertyNameDownload = this.getNodeParameter( - 'binaryPropertyName', - i, - ) as string; + const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i); const parameterPath = this.getNodeParameter('path', i) as string; const { path } = await file({ prefix: 'n8n-ssh-' }); @@ -350,7 +347,7 @@ export class Ssh implements INodeType { }); } - const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i) as string; + const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i); const binaryData = item.binary[propertyNameUpload]; diff --git a/packages/nodes-base/nodes/Telegram/Telegram.node.ts b/packages/nodes-base/nodes/Telegram/Telegram.node.ts index 5286a20da5..fb920749dd 100644 --- a/packages/nodes-base/nodes/Telegram/Telegram.node.ts +++ b/packages/nodes-base/nodes/Telegram/Telegram.node.ts @@ -1960,7 +1960,7 @@ export class Telegram implements INodeType { let responseData; if (binaryData) { - const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0) as string; + const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0); const itemBinaryData = items[i].binary![binaryPropertyName]; const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName); const propertyName = getPropertyName(operation); diff --git a/packages/nodes-base/nodes/WriteBinaryFile/WriteBinaryFile.node.ts b/packages/nodes-base/nodes/WriteBinaryFile/WriteBinaryFile.node.ts index c630081092..bc52ca9039 100644 --- a/packages/nodes-base/nodes/WriteBinaryFile/WriteBinaryFile.node.ts +++ b/packages/nodes-base/nodes/WriteBinaryFile/WriteBinaryFile.node.ts @@ -69,7 +69,7 @@ export class WriteBinaryFile implements INodeType { for (let itemIndex = 0; itemIndex < length; itemIndex++) { try { - const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex); const fileName = this.getNodeParameter('fileName', itemIndex) as string; const options = this.getNodeParameter('options', 0, {}); diff --git a/packages/nodes-base/nodes/Xml/Xml.node.ts b/packages/nodes-base/nodes/Xml/Xml.node.ts index 1a82957386..a69b1cf8bd 100644 --- a/packages/nodes-base/nodes/Xml/Xml.node.ts +++ b/packages/nodes-base/nodes/Xml/Xml.node.ts @@ -220,7 +220,7 @@ export class Xml implements INodeType { const items = this.getInputData(); const mode = this.getNodeParameter('mode', 0) as string; - const dataPropertyName = this.getNodeParameter('dataPropertyName', 0) as string; + const dataPropertyName = this.getNodeParameter('dataPropertyName', 0); const options = this.getNodeParameter('options', 0, {}); let item: INodeExecutionData; diff --git a/packages/nodes-base/nodes/Zulip/Zulip.node.ts b/packages/nodes-base/nodes/Zulip/Zulip.node.ts index bc328afc73..e1497aa5e5 100644 --- a/packages/nodes-base/nodes/Zulip/Zulip.node.ts +++ b/packages/nodes-base/nodes/Zulip/Zulip.node.ts @@ -192,7 +192,7 @@ export class Zulip implements INodeType { //https://zulipchat.com/api/upload-file if (operation === 'updateFile') { const credentials = await this.getCredentials('zulipApi'); - const binaryProperty = this.getNodeParameter('dataBinaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('dataBinaryProperty', i); if (items[i].binary === undefined) { throw new NodeOperationError(this.getNode(), 'No binary data exists on item!'); } diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index 3f9ecda086..94a1b6bad4 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -560,7 +560,16 @@ export interface IGetNodeParameterOptions { namespace ExecuteFunctions { namespace StringReturning { - export type NodeParameter = 'binaryProperty' | 'resource' | 'operation'; + export type NodeParameter = + | 'binaryProperty' + | 'binaryPropertyName' + | 'binaryPropertyOutput' + | 'dataPropertyName' + | 'dataBinaryProperty' + | 'resource' + | 'operation' + | 'filePath' + | 'encodingType'; } namespace NumberReturning {