mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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:
@@ -162,7 +162,7 @@ export class HelpScout implements INodeType {
|
||||
const status = this.getNodeParameter('status', i) as string;
|
||||
const subject = this.getNodeParameter('subject', i) as string;
|
||||
const type = this.getNodeParameter('type', i) as string;
|
||||
const resolveData = this.getNodeParameter('resolveData', i) as boolean;
|
||||
const resolveData = this.getNodeParameter('resolveData', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const threads = (this.getNodeParameter('threadsUi', i) as IDataObject)
|
||||
.threadsValues as IDataObject[];
|
||||
@@ -246,7 +246,7 @@ export class HelpScout implements INodeType {
|
||||
}
|
||||
//https://developer.helpscout.com/mailbox-api/endpoints/conversations/list
|
||||
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;
|
||||
Object.assign(qs, options);
|
||||
if (returnAll) {
|
||||
@@ -275,7 +275,7 @@ export class HelpScout implements INodeType {
|
||||
if (resource === 'customer') {
|
||||
//https://developer.helpscout.com/mailbox-api/endpoints/customers/create
|
||||
if (operation === 'create') {
|
||||
const resolveData = this.getNodeParameter('resolveData', i) as boolean;
|
||||
const resolveData = this.getNodeParameter('resolveData', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const chats = (this.getNodeParameter('chatsUi', i) as IDataObject)
|
||||
.chatsValues as IDataObject[];
|
||||
@@ -360,7 +360,7 @@ export class HelpScout implements INodeType {
|
||||
}
|
||||
//https://developer.helpscout.com/mailbox-api/endpoints/customers/list
|
||||
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;
|
||||
Object.assign(qs, options);
|
||||
if (returnAll) {
|
||||
@@ -425,7 +425,7 @@ export class HelpScout implements INodeType {
|
||||
}
|
||||
//https://developer.helpscout.com/mailbox-api/endpoints/mailboxes/list
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
if (returnAll) {
|
||||
responseData = await helpscoutApiRequestAllItems.call(
|
||||
this,
|
||||
@@ -534,7 +534,7 @@ export class HelpScout implements INodeType {
|
||||
}
|
||||
//https://developer.helpscout.com/mailbox-api/endpoints/conversations/threads/list
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const conversationId = this.getNodeParameter('conversationId', i) as string;
|
||||
if (returnAll) {
|
||||
responseData = await helpscoutApiRequestAllItems.call(
|
||||
|
||||
Reference in New Issue
Block a user