/**
 * Mailchimp Node - Version 1
 * Discriminator: resource=member, operation=getAll
 */


interface Credentials {
  mailchimpApi: CredentialReference;
  mailchimpOAuth2Api: CredentialReference;
}

/** Get many members on a list */
export type MailchimpV1MemberGetAllParams = {
  resource: 'member';
  operation: 'getAll';
  authentication?: 'apiKey' | 'oAuth2' | Expression<string>;
/**
 * List of lists. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
 */
    list?: string | Expression<string>;
/**
 * Whether to return all results or only up to a given limit
 * @default false
 */
    returnAll?: boolean | Expression<boolean>;
/**
 * Max number of results to return
 * @displayOptions.show { returnAll: [false] }
 * @default 500
 */
    limit?: number | Expression<number>;
/**
 * Options
 * @default {}
 */
    options?: {
    /** Restrict results to subscribers whose information changed before the set timeframe
     */
    beforeLastChanged?: string | Expression<string>;
    /** Restrict results to subscribers who opted-in before the set timeframe
     */
    beforeTimestampOpt?: string | Expression<string>;
    /** Type of email this member asked to get
     */
    emailType?: 'html' | 'text' | Expression<string>;
    /** Subscriber's current status
     */
    status?: 'cleaned' | 'pending' | 'subscribed' | 'transactional' | 'unsubscribed' | Expression<string>;
    /** Restrict results to subscribers whose information changed after the set timeframe
     */
    sinceLastChanged?: string | Expression<string>;
  };
};

export type MailchimpV1MemberGetAllOutput = {
  _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?: {
    FNAME?: string;
    LNAME?: string;
    PHONE?: string;
  };
  sms_phone_number?: string;
  sms_subscription_last_updated?: string;
  sms_subscription_status?: string;
  source?: string;
  status?: string;
  tags?: Array<{
    id?: number;
  }>;
  tags_count?: number;
  timestamp_opt?: string;
  timestamp_signup?: string;
  unique_email_id?: string;
  vip?: boolean;
  web_id?: number;
};

export type MailchimpV1MemberGetAllNode = {
  type: 'n8n-nodes-base.mailchimp';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<MailchimpV1MemberGetAllParams>;
  output?: Items<MailchimpV1MemberGetAllOutput>;
};