mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +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:
@@ -155,7 +155,7 @@ export class SecurityScorecard implements INodeType {
|
||||
}
|
||||
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
responseData = await scorecardApiRequest.call(this, 'GET', 'portfolios');
|
||||
responseData = responseData.entries;
|
||||
|
||||
@@ -192,7 +192,7 @@ export class SecurityScorecard implements INodeType {
|
||||
}
|
||||
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const portfolioId = this.getNodeParameter('portfolioId', i) as string;
|
||||
const filterParams = this.getNodeParameter('filters', i) as IDataObject;
|
||||
responseData = await scorecardApiRequest.call(
|
||||
@@ -292,7 +292,7 @@ export class SecurityScorecard implements INodeType {
|
||||
}
|
||||
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
responseData = await scorecardApiRequest.call(this, 'GET', 'reports/recent');
|
||||
responseData = responseData.entries;
|
||||
|
||||
@@ -333,7 +333,7 @@ export class SecurityScorecard implements INodeType {
|
||||
|
||||
if (operation === 'getFactor') {
|
||||
const simple = this.getNodeParameter('simple', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const industry = this.getNodeParameter('industry', i);
|
||||
responseData = await scorecardApiRequest.call(
|
||||
this,
|
||||
@@ -356,7 +356,7 @@ export class SecurityScorecard implements INodeType {
|
||||
|
||||
if (operation === 'getFactorHistorical') {
|
||||
const simple = this.getNodeParameter('simple', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const industry = this.getNodeParameter('industry', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
// Convert to YYYY-MM-DD
|
||||
@@ -401,7 +401,7 @@ export class SecurityScorecard implements INodeType {
|
||||
}
|
||||
|
||||
if (operation === 'getFactor') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const scorecardIdentifier = this.getNodeParameter('scorecardIdentifier', i);
|
||||
const filterParams = this.getNodeParameter('filters', i) as IDataObject;
|
||||
responseData = await scorecardApiRequest.call(
|
||||
@@ -424,7 +424,7 @@ export class SecurityScorecard implements INodeType {
|
||||
|
||||
if (operation === 'getFactorHistorical') {
|
||||
const simple = this.getNodeParameter('simple', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const scorecardIdentifier = this.getNodeParameter('scorecardIdentifier', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
// Convert to YYYY-MM-DD
|
||||
@@ -459,7 +459,7 @@ export class SecurityScorecard implements INodeType {
|
||||
|
||||
if (operation === 'getHistoricalScore') {
|
||||
const simple = this.getNodeParameter('simple', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const scorecardIdentifier = this.getNodeParameter('scorecardIdentifier', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
|
||||
@@ -494,7 +494,7 @@ export class SecurityScorecard implements INodeType {
|
||||
}
|
||||
|
||||
if (operation === 'getScorePlan') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const scorecardIdentifier = this.getNodeParameter('scorecardIdentifier', i) as string;
|
||||
const targetScore = this.getNodeParameter('score', i);
|
||||
responseData = await scorecardApiRequest.call(
|
||||
|
||||
Reference in New Issue
Block a user