mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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:
@@ -1287,7 +1287,7 @@ export class Salesforce implements INodeType {
|
||||
}
|
||||
//https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_query.htm
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
try {
|
||||
if (returnAll) {
|
||||
@@ -1633,7 +1633,7 @@ export class Salesforce implements INodeType {
|
||||
}
|
||||
//https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_query.htm
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
try {
|
||||
if (returnAll) {
|
||||
@@ -1789,7 +1789,7 @@ export class Salesforce implements INodeType {
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const customObject = this.getNodeParameter('customObject', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
try {
|
||||
if (returnAll) {
|
||||
@@ -2034,7 +2034,7 @@ export class Salesforce implements INodeType {
|
||||
}
|
||||
//https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_query.htm
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
try {
|
||||
if (returnAll) {
|
||||
@@ -2324,7 +2324,7 @@ export class Salesforce implements INodeType {
|
||||
}
|
||||
//https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_query.htm
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
try {
|
||||
if (returnAll) {
|
||||
@@ -2539,7 +2539,7 @@ export class Salesforce implements INodeType {
|
||||
}
|
||||
//https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_query.htm
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
try {
|
||||
if (returnAll) {
|
||||
@@ -2802,7 +2802,7 @@ export class Salesforce implements INodeType {
|
||||
}
|
||||
//https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_query.htm
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
try {
|
||||
if (returnAll) {
|
||||
@@ -2934,7 +2934,7 @@ export class Salesforce implements INodeType {
|
||||
}
|
||||
//https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_query.htm
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
try {
|
||||
if (returnAll) {
|
||||
@@ -2989,7 +2989,7 @@ export class Salesforce implements INodeType {
|
||||
}
|
||||
//https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_query.htm
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
try {
|
||||
if (returnAll) {
|
||||
@@ -3023,7 +3023,7 @@ export class Salesforce implements INodeType {
|
||||
//https://developer.salesforce.com/docs/atlas.en-us.api_action.meta/api_action/actions_obj_flow.htm
|
||||
if (operation === 'invoke') {
|
||||
const apiName = this.getNodeParameter('apiName', i) as string;
|
||||
const jsonParameters = this.getNodeParameter('jsonParameters', i) as boolean;
|
||||
const jsonParameters = this.getNodeParameter('jsonParameters', i);
|
||||
let variables = {};
|
||||
if (jsonParameters) {
|
||||
variables = this.getNodeParameter('variablesJson', i) as object;
|
||||
@@ -3050,7 +3050,7 @@ export class Salesforce implements INodeType {
|
||||
}
|
||||
//https://developer.salesforce.com/docs/atlas.en-us.api_action.meta/api_action/actions_obj_flow.htm
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
responseData = await salesforceApiRequest.call(this, 'GET', '/actions/custom/flow');
|
||||
responseData = responseData.actions;
|
||||
if (returnAll === false) {
|
||||
|
||||
Reference in New Issue
Block a user