/**
 * PayPal Node - Version 1
 * Discriminator: resource=payout, operation=create
 */


interface Credentials {
  payPalApi: CredentialReference;
}

/** Create a batch payout */
export type PayPalV1PayoutCreateParams = {
  resource: 'payout';
  operation: 'create';
/**
 * A sender-specified ID number. Tracks the payout in an accounting system.
 */
    senderBatchId?: string | Expression<string> | PlaceholderValue;
/**
 * JSON Parameters
 * @default false
 */
    jsonParameters?: boolean | Expression<boolean>;
/**
 * Items
 * @displayOptions.show { jsonParameters: [false] }
 * @default {}
 */
    itemsUi?: {
        /** Item
     */
    itemsValues?: Array<{
      /** The ID type that identifies the recipient of the payment
       * @default email
       */
      recipientType?: 'phone' | 'email' | 'paypalId' | Expression<string>;
      /** The receiver of the payment. Corresponds to the recipient_type value in the request. Max length: 127 characters.
       */
      receiverValue?: string | Expression<string> | PlaceholderValue;
      /** Currency
       * @default USD
       */
      currency?: 'AUD' | 'BRL' | 'CAD' | 'CZK' | 'DKK' | 'EUR' | 'USD' | Expression<string>;
      /** The value, which might be
       */
      amount?: string | Expression<string> | PlaceholderValue;
      /** The sender-specified note for notifications. Supports up to 4000 ASCII characters and 1000 non-ASCII characters.
       */
      note?: string | Expression<string> | PlaceholderValue;
      /** The sender-specified ID number. Tracks the payout in an accounting system.
       */
      senderItemId?: string | Expression<string> | PlaceholderValue;
      /** Recipient Wallet
       * @default paypal
       */
      recipientWallet?: 'paypal' | 'venmo' | Expression<string>;
    }>;
  };
/**
 * An array of individual payout items
 * @displayOptions.show { jsonParameters: [true] }
 */
    itemsJson?: IDataObject | string | Expression<string>;
/**
 * Additional Fields
 * @default {}
 */
    additionalFields?: {
    /** The subject line for the email that PayPal sends when payment for a payout item completes. The subject line is the same for all recipients. Max length: 255 characters.
     */
    emailSubject?: string | Expression<string> | PlaceholderValue;
    /** The email message that PayPal sends when the payout item completes. The message is the same for all recipients.
     */
    emailMessage?: string | Expression<string> | PlaceholderValue;
    /** The payouts and item-level notes are concatenated in the email. Max length: 1000 characters.
     */
    note?: string | Expression<string> | PlaceholderValue;
  };
};

export type PayPalV1PayoutCreateOutput = {
  batch_header?: {
    batch_status?: string;
    payout_batch_id?: string;
    sender_batch_header?: {
      sender_batch_id?: string;
    };
  };
  links?: Array<{
    encType?: string;
    href?: string;
    method?: string;
    rel?: string;
  }>;
};

export type PayPalV1PayoutCreateNode = {
  type: 'n8n-nodes-base.payPal';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<PayPalV1PayoutCreateParams>;
  output?: Items<PayPalV1PayoutCreateOutput>;
};