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:
@@ -1718,7 +1718,7 @@ export class Mailchimp implements INodeType {
|
||||
const listId = this.getNodeParameter('list', i) as string;
|
||||
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 options = this.getNodeParameter('options', i);
|
||||
const jsonActive = this.getNodeParameter('jsonParameters', i);
|
||||
|
||||
const body: ICreateMemberBody = {
|
||||
@@ -1829,7 +1829,7 @@ export class Mailchimp implements INodeType {
|
||||
if (operation === 'get') {
|
||||
const listId = this.getNodeParameter('list', i) as string;
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
if (options.fields) {
|
||||
qs.fields = options.fields as string;
|
||||
@@ -1851,7 +1851,7 @@ export class Mailchimp implements INodeType {
|
||||
if (operation === 'getAll') {
|
||||
const listId = this.getNodeParameter('list', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
if (options.beforeLastChanged) {
|
||||
qs.before_last_changed = options.beforeLastChanged as string;
|
||||
@@ -1903,7 +1903,7 @@ export class Mailchimp implements INodeType {
|
||||
if (operation === 'update') {
|
||||
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 updateFields = this.getNodeParameter('updateFields', i);
|
||||
const jsonActive = this.getNodeParameter('jsonParameters', i);
|
||||
const body: ICreateMemberBody = {
|
||||
listId,
|
||||
@@ -2011,7 +2011,7 @@ export class Mailchimp implements INodeType {
|
||||
const listId = this.getNodeParameter('list', i) as string;
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
const tags = this.getNodeParameter('tags', i) as string[];
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
tags: [],
|
||||
@@ -2042,7 +2042,7 @@ export class Mailchimp implements INodeType {
|
||||
const listId = this.getNodeParameter('list', i) as string;
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
const tags = this.getNodeParameter('tags', i) as string[];
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
tags: [],
|
||||
@@ -2072,7 +2072,7 @@ export class Mailchimp implements INodeType {
|
||||
//https://mailchimp.com/developer/api/marketing/campaigns/list-campaigns/
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.status) {
|
||||
qs.status = options.status as string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user