n8n-nodes-base
Version:
Base nodes of n8n
198 lines (193 loc) • 5.3 kB
text/typescript
/**
* Mailchimp Node - Version 1
* Discriminator: resource=member, operation=create
*/
interface Credentials {
mailchimpApi: CredentialReference;
mailchimpOAuth2Api: CredentialReference;
}
/** Create a new member on list */
export type MailchimpV1MemberCreateParams = {
resource: 'member';
operation: 'create';
authentication?: 'apiKey' | 'oAuth2' | Expression<string>;
/**
* List of lists. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
*/
list?: string | Expression<string>;
/**
* Email address for a subscriber
*/
email?: string | Expression<string> | PlaceholderValue;
/**
* Subscriber's current status
*/
status?: 'cleaned' | 'pending' | 'subscribed' | 'transactional' | 'unsubscribed' | Expression<string>;
/**
* JSON Parameters
* @default false
*/
jsonParameters?: boolean | Expression<boolean>;
/**
* Options
* @default {}
*/
options?: {
/** Type of email this member asked to get
*/
emailType?: 'html' | 'text' | Expression<string>;
/** If set/detected, the subscriber's language
*/
language?: string | Expression<string> | PlaceholderValue;
/** The IP address the subscriber used to confirm their opt-in status
*/
ipOptIn?: string | Expression<string> | PlaceholderValue;
/** IP address the subscriber signed up from
*/
ipSignup?: string | Expression<string> | PlaceholderValue;
/** The date and time the subscriber signed up for the list in ISO 8601 format
*/
timestampSignup?: string | Expression<string>;
/** The tags that are associated with a member separeted by ,
*/
tags?: string | Expression<string> | PlaceholderValue;
/** Vip status for subscribers
* @default false
*/
vip?: boolean | Expression<boolean>;
/** The date and time the subscribe confirmed their opt-in status in ISO 8601 format
*/
timestampOpt?: string | Expression<string>;
};
/**
* Subscriber location information.n
* @displayOptions.show { jsonParameters: [false] }
* @default {}
*/
locationFieldsUi?: {
/** Location
*/
locationFieldsValues?: {
/** The location latitude
*/
latitude?: string | Expression<string> | PlaceholderValue;
/** The location longitude
*/
longitude?: string | Expression<string> | PlaceholderValue;
};
};
/**
* An individual merge var and value for a member
* @displayOptions.show { jsonParameters: [false] }
* @default {}
*/
mergeFieldsUi?: {
/** Field
*/
mergeFieldsValues?: Array<{
/** Merge Field name. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
*/
name?: string | Expression<string>;
/** Merge field value
*/
value?: string | Expression<string> | PlaceholderValue;
}>;
};
/**
* Merge Fields
* @displayOptions.show { jsonParameters: [true] }
*/
mergeFieldsJson?: IDataObject | string | Expression<string>;
/**
* Location
* @displayOptions.show { jsonParameters: [true] }
*/
locationJson?: IDataObject | string | Expression<string>;
/**
* Interest Groups
* @displayOptions.show { jsonParameters: [false] }
* @default {}
*/
groupsUi?: {
/** Group
*/
groupsValues?: Array<{
/** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>
*/
categoryId?: string | Expression<string>;
/** Category Field ID
*/
categoryFieldId?: string | Expression<string> | PlaceholderValue;
/** Value
* @default false
*/
value?: boolean | Expression<boolean>;
}>;
};
/**
* Interest Groups
* @displayOptions.show { jsonParameters: [true] }
*/
groupJson?: IDataObject | string | Expression<string>;
};
export type MailchimpV1MemberCreateOutput = {
_links?: Array<{
href?: string;
method?: string;
rel?: string;
schema?: string;
targetSchema?: string;
}>;
consents_to_one_to_one_messaging?: boolean;
contact_id?: string;
email_address?: string;
email_client?: string;
email_type?: string;
full_name?: string;
id?: string;
ip_opt?: string;
ip_signup?: string;
language?: string;
last_changed?: string;
list_id?: string;
location?: {
country_code?: string;
dstoff?: number;
gmtoff?: number;
region?: string;
timezone?: string;
};
member_rating?: number;
merge_fields?: {
BIRTHDAY?: string;
COMPANY?: string;
FNAME?: string;
LNAME?: string;
PHONE?: string;
};
sms_phone_number?: string;
sms_subscription_last_updated?: string;
sms_subscription_status?: string;
source?: string;
stats?: {
avg_click_rate?: number;
};
status?: string;
tags?: Array<{
id?: number;
name?: string;
}>;
tags_count?: number;
timestamp_opt?: string;
timestamp_signup?: string;
unique_email_id?: string;
vip?: boolean;
web_id?: number;
};
export type MailchimpV1MemberCreateNode = {
type: 'n8n-nodes-base.mailchimp';
version: 1;
credentials?: Credentials;
config: NodeConfig<MailchimpV1MemberCreateParams>;
output?: Items<MailchimpV1MemberCreateOutput>;
};