mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Introduce overload for record-type node parameter (no-changelog) (#4648)
* 📘 Set up overload * 🔥 Remove inferrable record assertions * 👕 Fix semicolon * 👕 Fix another semicolon
This commit is contained in:
@@ -194,7 +194,7 @@ export class SecurityScorecard implements INodeType {
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const portfolioId = this.getNodeParameter('portfolioId', i) as string;
|
||||
const filterParams = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filterParams = this.getNodeParameter('filters', i);
|
||||
responseData = await scorecardApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -277,7 +277,7 @@ export class SecurityScorecard implements INodeType {
|
||||
body = { params: body };
|
||||
}
|
||||
if (reportType === 'scorecard-footprint') {
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
Object.assign(body, options);
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ export class SecurityScorecard implements INodeType {
|
||||
const simple = this.getNodeParameter('simple', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const industry = this.getNodeParameter('industry', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
// Convert to YYYY-MM-DD
|
||||
if (options['from']) {
|
||||
options['from'] = moment(options['from'] as Date).format('YYYY-MM-DD');
|
||||
@@ -403,7 +403,7 @@ export class SecurityScorecard implements INodeType {
|
||||
if (operation === 'getFactor') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const scorecardIdentifier = this.getNodeParameter('scorecardIdentifier', i);
|
||||
const filterParams = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filterParams = this.getNodeParameter('filters', i);
|
||||
responseData = await scorecardApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -426,7 +426,7 @@ export class SecurityScorecard implements INodeType {
|
||||
const simple = this.getNodeParameter('simple', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const scorecardIdentifier = this.getNodeParameter('scorecardIdentifier', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
// Convert to YYYY-MM-DD
|
||||
if (options['date_from']) {
|
||||
options['date_from'] = moment(options['date_from'] as Date).format('YYYY-MM-DD');
|
||||
@@ -461,7 +461,7 @@ export class SecurityScorecard implements INodeType {
|
||||
const simple = this.getNodeParameter('simple', 0) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const scorecardIdentifier = this.getNodeParameter('scorecardIdentifier', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
// for some reason the params are different between these two APis :/
|
||||
if (options['date_from']) {
|
||||
|
||||
Reference in New Issue
Block a user