mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Introduce overload for string-type node parameter (no-changelog) (#4797)
* 📘 Set up overload * 🔥 Remove inferrable assertions
This commit is contained in:
@@ -383,7 +383,7 @@ export class Salesforce implements INodeType {
|
||||
// select them easily
|
||||
async getCustomFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const resource = this.getNodeParameter('resource', 0) as string;
|
||||
const resource = this.getNodeParameter('resource', 0);
|
||||
// TODO: find a way to filter this object to get just the lead sources instead of the whole object
|
||||
const { fields } = await salesforceApiRequest.call(
|
||||
this,
|
||||
@@ -407,7 +407,7 @@ export class Salesforce implements INodeType {
|
||||
// select them easily
|
||||
async getRecordTypes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
let resource = this.getNodeParameter('resource', 0) as string;
|
||||
let resource = this.getNodeParameter('resource', 0);
|
||||
if (resource === 'customObject') {
|
||||
resource = this.getNodeParameter('customObject', 0) as string;
|
||||
}
|
||||
@@ -1065,8 +1065,8 @@ export class Salesforce implements INodeType {
|
||||
const returnData: INodeExecutionData[] = [];
|
||||
let responseData;
|
||||
const qs: IDataObject = {};
|
||||
const resource = this.getNodeParameter('resource', 0) as string;
|
||||
const operation = this.getNodeParameter('operation', 0) as string;
|
||||
const resource = this.getNodeParameter('resource', 0);
|
||||
const operation = this.getNodeParameter('operation', 0);
|
||||
|
||||
Logger.debug(
|
||||
`Running "Salesforce" node named "${this.getNode.name}" resource "${resource}" operation "${operation}"`,
|
||||
|
||||
Reference in New Issue
Block a user