mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Introduce overload for boolean-type node parameter (no-changelog) (#4647)
* 📘 Set up overloads * 📘 Add temporary assertion * 🔥 Remove inferrable boolean assertions * ⏪ Undo autoformatting
This commit is contained in:
@@ -104,7 +104,7 @@ export class AwsCertificateManager implements INodeType {
|
||||
|
||||
//https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
|
||||
if (operation === 'getMany') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
|
||||
const body: { Includes: IDataObject; CertificateStatuses: string[]; MaxItems: number } = {
|
||||
|
||||
@@ -307,7 +307,7 @@ export class AwsDynamoDB implements INodeType {
|
||||
const eavUi = this.getNodeParameter('eavUi.eavValues', i, []) as IAttributeValueUi[];
|
||||
const simple = this.getNodeParameter('simple', 0, false) as boolean;
|
||||
const select = this.getNodeParameter('select', 0) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const scan = this.getNodeParameter('scan', 0) as boolean;
|
||||
const eanUi = this.getNodeParameter(
|
||||
'options.eanUi.eanValues',
|
||||
|
||||
@@ -251,7 +251,7 @@ export class AwsElb implements INodeType {
|
||||
if (operation === 'getMany') {
|
||||
const params = ['Version=2015-12-01'];
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
const listenerId = this.getNodeParameter('listenerId', i) as string;
|
||||
|
||||
@@ -385,7 +385,7 @@ export class AwsElb implements INodeType {
|
||||
if (operation === 'getMany') {
|
||||
const params = ['Version=2015-12-01'];
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (returnAll) {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
|
||||
@@ -412,7 +412,7 @@ export class AwsRekognition implements INodeType {
|
||||
body.Filters.WordFilter = keysTPascalCase(wordFilter);
|
||||
}
|
||||
|
||||
const binaryData = this.getNodeParameter('binaryData', 0) as boolean;
|
||||
const binaryData = this.getNodeParameter('binaryData', 0);
|
||||
|
||||
if (binaryData) {
|
||||
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0) as string;
|
||||
|
||||
@@ -172,7 +172,7 @@ export class AwsS3 implements INodeType {
|
||||
|
||||
//https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
if (returnAll) {
|
||||
responseData = await awsApiRequestSOAPAllItems.call(
|
||||
this,
|
||||
@@ -200,7 +200,7 @@ export class AwsS3 implements INodeType {
|
||||
//https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
|
||||
if (operation === 'search') {
|
||||
const bucketName = this.getNodeParameter('bucketName', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', 0) as IDataObject;
|
||||
|
||||
if (additionalFields.prefix) {
|
||||
@@ -391,7 +391,7 @@ export class AwsS3 implements INodeType {
|
||||
//https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
|
||||
if (operation === 'getAll') {
|
||||
const bucketName = this.getNodeParameter('bucketName', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const options = this.getNodeParameter('options', 0) as IDataObject;
|
||||
|
||||
if (options.folderKey) {
|
||||
@@ -656,7 +656,7 @@ export class AwsS3 implements INodeType {
|
||||
//https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
|
||||
if (operation === 'getAll') {
|
||||
const bucketName = this.getNodeParameter('bucketName', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const options = this.getNodeParameter('options', 0) as IDataObject;
|
||||
|
||||
if (options.folderKey) {
|
||||
@@ -720,7 +720,7 @@ export class AwsS3 implements INodeType {
|
||||
if (operation === 'upload') {
|
||||
const bucketName = this.getNodeParameter('bucketName', i) as string;
|
||||
const fileName = this.getNodeParameter('fileName', i) as string;
|
||||
const isBinaryData = this.getNodeParameter('binaryData', i) as boolean;
|
||||
const isBinaryData = this.getNodeParameter('binaryData', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const tagsValues = (this.getNodeParameter('tagsUi', i) as IDataObject)
|
||||
.tagsValues as IDataObject[];
|
||||
|
||||
@@ -909,7 +909,7 @@ export class AwsSes implements INodeType {
|
||||
}
|
||||
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (returnAll === true) {
|
||||
responseData = await awsApiRequestSOAPAllItems.call(
|
||||
@@ -1237,7 +1237,7 @@ export class AwsSes implements INodeType {
|
||||
}
|
||||
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (returnAll === true) {
|
||||
responseData = await awsApiRequestSOAPAllItems.call(
|
||||
|
||||
@@ -490,7 +490,7 @@ export class AwsTranscribe implements INodeType {
|
||||
}
|
||||
//https://docs.aws.amazon.com/transcribe/latest/dg/API_ListTranscriptionJobs.html
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const action = 'Transcribe.ListTranscriptionJobs';
|
||||
const body: IDataObject = {};
|
||||
|
||||
Reference in New Issue
Block a user