/**
 * WhatsApp Business Cloud Node - Version 1
 * Discriminator: resource=message, operation=sendTemplate
 */


interface Credentials {
  whatsAppApi: CredentialReference;
}

export type WhatsAppV1MessageSendTemplateParams = {
  resource: 'message';
  operation: 'sendTemplate';
/**
 * Messaging Product
 * @default whatsapp
 */
    messagingProduct?: unknown;
/**
 * The ID of the business account's phone number from which the message will be sent from
 */
    phoneNumberId?: string | Expression<string>;
/**
 * Phone number of the recipient of the message
 * @hint When entering a phone number, make sure to include the country code
 */
    recipientPhoneNumber?: string | Expression<string> | PlaceholderValue;
/**
 * Name of the template
 */
    template?: string | Expression<string>;
/**
 * Components
 * @default {}
 */
    components?: {
        /** Component
     */
    component?: Array<{
      /** Type
       * @default body
       */
      type?: 'body' | 'button' | 'header' | Expression<string>;
      /** Parameters
       * @displayOptions.show { type: ["body"] }
       * @default {}
       */
      bodyParameters?: {
        /** Parameter
     */
    parameter?: Array<{
      /** Type
       * @default text
       */
      type?: 'text' | 'currency' | 'date_time' | Expression<string>;
      /** Text
       * @displayOptions.show { type: ["text"] }
       */
      text?: string | Expression<string> | PlaceholderValue;
      /** Currency Code
       * @displayOptions.show { type: ["currency"] }
       */
      code?: 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL' | Expression<string>;
      /** Amount
       * @displayOptions.show { type: ["currency"] }
       */
      amount_1000?: number | Expression<number>;
      /** Date Time
       * @displayOptions.show { type: ["date_time"] }
       */
      date_time?: string | Expression<string>;
      /** Fallback Value
       * @displayOptions.show { type: ["currency"] }
       */
      fallback_value?: string | Expression<string> | PlaceholderValue;
    }>;
  };
      /** Sub Type
       * @displayOptions.show { type: ["button"] }
       * @default quick_reply
       */
      sub_type?: 'quick_reply' | 'url' | Expression<string>;
      /** Index
       * @displayOptions.show { type: ["button"] }
       * @default 0
       */
      index?: number | Expression<number>;
      /** Parameters
       * @displayOptions.show { type: ["button"] }
       * @default {}
       */
      buttonParameters?: {
        /** Parameter
     */
    parameter?: {
      /** Type
       * @default payload
       */
      type?: 'payload' | 'text' | Expression<string>;
      /** Payload
       * @displayOptions.show { type: ["payload"] }
       */
      payload?: string | Expression<string> | PlaceholderValue;
      /** Text
       * @displayOptions.show { type: ["text"] }
       */
      text?: string | Expression<string> | PlaceholderValue;
    };
  };
      /** Parameters
       * @displayOptions.show { type: ["header"] }
       * @default {}
       */
      headerParameters?: {
        /** Parameter
     */
    parameter?: Array<{
      /** Type
       * @default text
       */
      type?: 'text' | 'currency' | 'date_time' | 'image' | Expression<string>;
      /** Text
       * @displayOptions.show { type: ["text"] }
       */
      text?: string | Expression<string> | PlaceholderValue;
      /** Currency Code
       * @displayOptions.show { type: ["currency"] }
       */
      code?: 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL' | Expression<string>;
      /** Amount
       * @displayOptions.show { type: ["currency"] }
       */
      amount_1000?: number | Expression<number>;
      /** Date Time
       * @displayOptions.show { type: ["date_time"] }
       */
      date_time?: string | Expression<string>;
      /** Image Link
       * @displayOptions.show { type: ["image"] }
       */
      imageLink?: string | Expression<string> | PlaceholderValue;
    }>;
  };
    }>;
  };
};

export type WhatsAppV1MessageSendTemplateOutput = {
  contacts?: Array<{
    input?: string;
    wa_id?: string;
  }>;
  messages?: Array<{
    id?: string;
    message_status?: string;
  }>;
  messaging_product?: string;
};

export type WhatsAppV1MessageSendTemplateNode = {
  type: 'n8n-nodes-base.whatsApp';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<WhatsAppV1MessageSendTemplateParams>;
  output?: Items<WhatsAppV1MessageSendTemplateOutput>;
};