This commit is contained in:
David R 2025-03-05 11:20:56 +01:00 committed by GitHub
commit aadc9c66e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,6 +35,7 @@ interface ICreateMemberBody {
email_address: string;
email_type?: string;
status?: Status;
status_if_new?: Status;
language?: string;
vip?: boolean;
location?: ILocation;
@ -1128,6 +1129,35 @@ export class Mailchimp implements INodeType {
default: '',
description: "Subscriber's current status",
},
{
displayName: 'Status If New',
name: 'status_if_new',
type: 'options',
options: [
{
name: 'Cleaned',
value: 'cleaned',
},
{
name: 'Pending',
value: 'pending',
},
{
name: 'Subscribed',
value: 'subscribed',
},
{
name: 'Transactional',
value: 'transactional',
},
{
name: 'Unsubscribed',
value: 'unsubscribed',
},
],
default: '',
description: "This status is required only if the email address is not already present on the list",
},
{
displayName: 'Vip',
name: 'vip',
@ -1930,6 +1960,9 @@ export class Mailchimp implements INodeType {
if (updateFields.ipOptIn) {
body.ip_opt = updateFields.ipOptIn as string;
}
if (updateFields.status_if_new) {
body.status_if_new = updateFields.status_if_new as Status;
}
if (updateFields.timestampOpt) {
body.timestamp_opt = moment(updateFields.timestampOpt as string).format(
'YYYY-MM-DD HH:MM:SS',