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


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

/** Get many members on a list */
export type MailchimpV1CampaignGetAllParams = {
  resource: 'campaign';
  operation: 'getAll';
  authentication?: 'apiKey' | 'oAuth2' | 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 10
 */
    limit?: number | Expression<number>;
/**
 * Options
 * @default {}
 */
    options?: {
    /** Restrict the response to campaigns created before the set time
     */
    beforeCreateTime?: string | Expression<string>;
    /** Restrict the response to campaigns sent before the set time
     */
    beforeSendTime?: string | Expression<string>;
    /** A comma-separated list of fields to exclude. Choose from the list, or specify IDs using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
     * @default []
     */
    excludeFields?: string[];
    /** A comma-separated list of fields to return. Choose from the list, or specify IDs using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
     * @default ["campaigns.id","campaigns.status","campaigns.tracking","campaigns.settings.from_name","campaigns.settings.reply_to","campaigns.settings.title"]
     */
    fields?: 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;.
     */
    listId?: string | Expression<string>;
    /** Restrict the response to campaigns created after the set time
     */
    sinceCreateTime?: string | Expression<string>;
    /** Restrict the response to campaigns sent after the set time
     */
    sinceSendTime?: string | Expression<string>;
    /** Determines the order direction for sorted results
     */
    sortDirection?: 'ASC' | 'DESC' | Expression<string>;
    /** Returns files sorted by the specified field
     */
    sortField?: 'create_time' | 'send_time' | Expression<string>;
    /** The status of the campaign
     */
    status?: 'save' | 'sending' | 'sent' | 'schedule' | Expression<string>;
  };
};

export type MailchimpV1CampaignGetAllOutput = {
  id?: string;
  settings?: {
    from_name?: string;
    reply_to?: string;
    title?: string;
  };
  status?: string;
  tracking?: {
    clicktale?: string;
    ecomm360?: boolean;
    goal_tracking?: boolean;
    google_analytics?: string;
    html_clicks?: boolean;
    opens?: boolean;
    text_clicks?: boolean;
  };
};

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