/**
 * Mailjet Node - Version 1
 * Discriminator: resource=email, operation=sendTemplate
 */


interface Credentials {
  mailjetEmailApi: CredentialReference;
  mailjetSmsApi: CredentialReference;
}

/** Send a email template */
export type MailjetV1EmailSendTemplateParams = {
  resource: 'email';
  operation: 'sendTemplate';
/**
 * Subject line of the email
 */
    subject?: string | Expression<string> | PlaceholderValue;
/**
 * The title for the email
 */
    fromEmail?: string | Expression<string> | PlaceholderValue;
/**
 * Email address of the recipient. Multiple ones can be separated by comma.
 */
    toEmail?: string | Expression<string> | PlaceholderValue;
/**
 * Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;
 */
    templateId?: string | Expression<string>;
/**
 * JSON Parameters
 * @default false
 */
    jsonParameters?: boolean | Expression<boolean>;
/**
 * Additional Fields
 * @default {}
 */
    additionalFields?: {
    /** BCC Recipients of the email separated by ,
     */
    bccEmail?: string | Expression<string> | PlaceholderValue;
    /** Cc recipients of the email separated by ,
     */
    ccEmail?: string | Expression<string> | PlaceholderValue;
    /** From Name
     */
    fromName?: string | Expression<string> | PlaceholderValue;
    /** Priority
     * @default 2
     */
    priority?: number | Expression<number>;
    /** The reply-to email address. Multiple ones can be separated by comma.
     */
    replyTo?: string | Expression<string> | PlaceholderValue;
    /** Subject
     */
    subject?: string | Expression<string> | PlaceholderValue;
    /** Template Language
     * @default false
     */
    templateLanguage?: boolean | Expression<boolean>;
    /** Enable or disable open tracking on this message
     */
    trackClicks?: string | Expression<string> | PlaceholderValue;
    /** Enable or disable open tracking on this message
     */
    trackOpens?: string | Expression<string> | PlaceholderValue;
    /** Custom Campaign
     */
    customCampaign?: string | Expression<string> | PlaceholderValue;
    /** Deduplicate Campaign
     * @default false
     */
    deduplicateCampaign?: boolean | Expression<boolean>;
  };
/**
 * Variables
 * @displayOptions.show { jsonParameters: [false] }
 * @default {}
 */
    variablesUi?: {
        /** Variable
     */
    variablesValues?: Array<{
      /** Name
       */
      name?: string | Expression<string> | PlaceholderValue;
      /** Value
       */
      value?: string | Expression<string> | PlaceholderValue;
    }>;
  };
/**
 * HTML text message of email
 * @displayOptions.show { jsonParameters: [true] }
 */
    variablesJson?: string | Expression<string> | PlaceholderValue;
};

export type MailjetV1EmailSendTemplateOutput = {
  Bcc?: Array<{
    Email?: string;
    MessageHref?: string;
    MessageID?: number;
    MessageUUID?: string;
  }>;
  Cc?: Array<{
    Email?: string;
    MessageHref?: string;
    MessageID?: number;
    MessageUUID?: string;
  }>;
  CustomID?: string;
  Status?: string;
  To?: Array<{
    Email?: string;
    MessageHref?: string;
    MessageID?: number;
    MessageUUID?: string;
  }>;
};

export type MailjetV1EmailSendTemplateNode = {
  type: 'n8n-nodes-base.mailjet';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<MailjetV1EmailSendTemplateParams>;
  output?: Items<MailjetV1EmailSendTemplateOutput>;
};