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:
@@ -1688,7 +1688,7 @@ export class Mailchimp implements INodeType {
|
||||
if (operation === 'getAll') {
|
||||
const listId = this.getNodeParameter('list', i) as string;
|
||||
const categoryId = this.getNodeParameter('groupCategory', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (returnAll === true) {
|
||||
responseData = await mailchimpApiRequestAllItems.call(
|
||||
@@ -1719,7 +1719,7 @@ export class Mailchimp implements INodeType {
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
const status = this.getNodeParameter('status', i) as Status;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const jsonActive = this.getNodeParameter('jsonParameters', i) as IDataObject;
|
||||
const jsonActive = this.getNodeParameter('jsonParameters', i);
|
||||
|
||||
const body: ICreateMemberBody = {
|
||||
listId,
|
||||
@@ -1850,7 +1850,7 @@ export class Mailchimp implements INodeType {
|
||||
//https://mailchimp.com/developer/reference/lists/list-members/#get_/lists/-list_id-/members
|
||||
if (operation === 'getAll') {
|
||||
const listId = this.getNodeParameter('list', 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;
|
||||
|
||||
if (options.beforeLastChanged) {
|
||||
@@ -1904,7 +1904,7 @@ export class Mailchimp implements INodeType {
|
||||
const listId = this.getNodeParameter('list', i) as string;
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const jsonActive = this.getNodeParameter('jsonParameters', i) as IDataObject;
|
||||
const jsonActive = this.getNodeParameter('jsonParameters', i);
|
||||
const body: ICreateMemberBody = {
|
||||
listId,
|
||||
email_address: email,
|
||||
@@ -2071,7 +2071,7 @@ export class Mailchimp implements INodeType {
|
||||
if (resource === 'campaign') {
|
||||
//https://mailchimp.com/developer/api/marketing/campaigns/list-campaigns/
|
||||
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;
|
||||
if (options.status) {
|
||||
qs.status = options.status as string;
|
||||
|
||||
Reference in New Issue
Block a user