/**
 * WooCommerce Node - Version 1
 * Discriminator: resource=order, operation=create
 */


interface Credentials {
  wooCommerceApi: CredentialReference;
}

/** Create a customer */
export type WooCommerceV1OrderCreateParams = {
  resource: 'order';
  operation: 'create';
/**
 * Additional Fields
 * @default {}
 */
    additionalFields?: {
    /** Currency the order was created with
     */
    currency?: string | Expression<string> | PlaceholderValue;
    /** User ID who owns the order. 0 for guests.
     */
    customerId?: string | Expression<string> | PlaceholderValue;
    /** Note left by customer during checkout
     */
    customerNote?: string | Expression<string> | PlaceholderValue;
    /** Parent order ID
     */
    parentId?: string | Expression<string> | PlaceholderValue;
    /** Payment Method ID
     */
    paymentMethodId?: string | Expression<string> | PlaceholderValue;
    /** Payment Method Title
     */
    paymentMethodTitle?: string | Expression<string> | PlaceholderValue;
    /** Whether the order is paid. It will set the status to processing and reduce stock items.
     * @default false
     */
    setPaid?: boolean | Expression<boolean>;
    /** A named status for the order
     * @default pending
     */
    status?: 'cancelled' | 'completed' | 'failed' | 'on-hold' | 'pending' | 'processing' | 'refunded' | 'trash' | Expression<string>;
    /** Unique transaction ID
     */
    transactionID?: string | Expression<string> | PlaceholderValue;
  };
/**
 * Billing address
 * @default {}
 */
    billingUi?: {
        /** Address
     */
    billingValues?: {
      /** First Name
       */
      firstName?: string | Expression<string> | PlaceholderValue;
      /** Last Name
       */
      lastName?: string | Expression<string> | PlaceholderValue;
      /** Company
       */
      company?: string | Expression<string> | PlaceholderValue;
      /** Address Line 1
       */
      address_1?: string | Expression<string> | PlaceholderValue;
      /** Address Line 2
       */
      address_2?: string | Expression<string> | PlaceholderValue;
      /** ISO code or name of the state, province or district
       */
      city?: string | Expression<string> | PlaceholderValue;
      /** Postal Code
       */
      postcode?: string | Expression<string> | PlaceholderValue;
      /** Country
       */
      country?: string | Expression<string> | PlaceholderValue;
      /** Email
       */
      email?: string | Expression<string> | PlaceholderValue;
      /** Phone
       */
      phone?: string | Expression<string> | PlaceholderValue;
    };
  };
/**
 * Coupons line data
 * @default {}
 */
    couponLinesUi?: {
        /** Coupon Line
     */
    couponLinesValues?: Array<{
      /** Coupon code
       */
      code?: string | Expression<string> | PlaceholderValue;
      /** Meta data
       * @default {}
       */
      metadataUi?: {
        /** Metadata
     */
    metadataValues?: Array<{
      /** Name of the metadata key to add
       */
      key?: string | Expression<string> | PlaceholderValue;
      /** Value to set for the metadata key
       */
      value?: string | Expression<string> | PlaceholderValue;
    }>;
  };
    }>;
  };
/**
 * Fee line data
 * @default {}
 */
    feeLinesUi?: {
        /** Fee Line
     */
    feeLinesValues?: Array<{
      /** Fee name
       */
      name?: string | Expression<string> | PlaceholderValue;
      /** Tax class of fee
       */
      taxClass?: string | Expression<string> | PlaceholderValue;
      /** Tax class of fee
       */
      taxStatus?: 'taxable' | 'none' | Expression<string>;
      /** Line total (after discounts)
       */
      total?: string | Expression<string> | PlaceholderValue;
      /** Meta data
       * @default {}
       */
      metadataUi?: {
        /** Metadata
     */
    metadataValues?: Array<{
      /** Name of the metadata key to add
       */
      key?: string | Expression<string> | PlaceholderValue;
      /** Value to set for the metadata key
       */
      value?: string | Expression<string> | PlaceholderValue;
    }>;
  };
    }>;
  };
/**
 * Line item data
 * @default {}
 */
    lineItemsUi?: {
        /** Line Item
     */
    lineItemsValues?: Array<{
      /** Product name
       */
      name?: string | Expression<string> | PlaceholderValue;
      /** Product ID
       * @default 0
       */
      productId?: number | Expression<number>;
      /** Variation ID, if applicable
       * @default 0
       */
      variationId?: number | Expression<number>;
      /** Quantity ordered
       * @default 1
       */
      quantity?: number | Expression<number>;
      /** Slug of the tax class of product
       */
      taxClass?: string | Expression<string> | PlaceholderValue;
      /** Line subtotal (before discounts)
       */
      subtotal?: string | Expression<string> | PlaceholderValue;
      /** Line total (after discounts)
       */
      total?: string | Expression<string> | PlaceholderValue;
      /** Meta data
       * @default {}
       */
      metadataUi?: {
        /** Metadata
     */
    metadataValues?: Array<{
      /** Name of the metadata key to add
       */
      key?: string | Expression<string> | PlaceholderValue;
      /** Value to set for the metadata key
       */
      value?: string | Expression<string> | PlaceholderValue;
    }>;
  };
    }>;
  };
/**
 * Meta data
 * @default {}
 */
    metadataUi?: {
        /** Metadata
     */
    metadataValues?: Array<{
      /** Name of the metadata key to add
       */
      key?: string | Expression<string> | PlaceholderValue;
      /** Value to set for the metadata key
       */
      value?: string | Expression<string> | PlaceholderValue;
    }>;
  };
/**
 * Shipping address
 * @default {}
 */
    shippingUi?: {
        /** Address
     */
    shippingValues?: {
      /** First Name
       */
      firstName?: string | Expression<string> | PlaceholderValue;
      /** Last Name
       */
      lastName?: string | Expression<string> | PlaceholderValue;
      /** Company
       */
      company?: string | Expression<string> | PlaceholderValue;
      /** Address Line 1
       */
      address_1?: string | Expression<string> | PlaceholderValue;
      /** Address Line 2
       */
      address_2?: string | Expression<string> | PlaceholderValue;
      /** ISO code or name of the state, province or district
       */
      city?: string | Expression<string> | PlaceholderValue;
      /** Postal Code
       */
      postcode?: string | Expression<string> | PlaceholderValue;
      /** Country
       */
      country?: string | Expression<string> | PlaceholderValue;
    };
  };
/**
 * Shipping line data
 * @default {}
 */
    shippingLinesUi?: {
        /** Fee Line
     */
    shippingLinesValues?: Array<{
      /** Shipping method name
       */
      methodTitle?: string | Expression<string> | PlaceholderValue;
      /** Shipping method ID
       */
      'method ID'?: string | Expression<string> | PlaceholderValue;
      /** Line total (after discounts)
       */
      total?: string | Expression<string> | PlaceholderValue;
      /** Meta data
       * @default {}
       */
      metadataUi?: {
        /** Metadata
     */
    metadataValues?: Array<{
      /** Name of the metadata key to add
       */
      key?: string | Expression<string> | PlaceholderValue;
      /** Value to set for the metadata key
       */
      value?: string | Expression<string> | PlaceholderValue;
    }>;
  };
    }>;
  };
};

export type WooCommerceV1OrderCreateOutput = {
  _links?: {
    collection?: Array<{
      href?: string;
    }>;
    self?: Array<{
      href?: string;
    }>;
  };
  billing?: {
    address_1?: string;
    address_2?: string;
    city?: string;
    company?: string;
    country?: string;
    email?: string;
    first_name?: string;
    last_name?: string;
    phone?: string;
    postcode?: string;
    state?: string;
  };
  cart_hash?: string;
  cart_tax?: string;
  created_via?: string;
  currency?: string;
  currency_symbol?: string;
  customer_id?: number;
  customer_ip_address?: string;
  customer_note?: string;
  customer_user_agent?: string;
  date_created?: string;
  date_created_gmt?: string;
  date_modified?: string;
  date_modified_gmt?: string;
  discount_tax?: string;
  discount_total?: string;
  fee_lines?: Array<{
    amount?: string;
    id?: number;
    name?: string;
    tax_class?: string;
    tax_status?: string;
    total?: string;
    total_tax?: string;
  }>;
  id?: number;
  is_editable?: boolean;
  line_items?: Array<{
    id?: number;
    image?: {
      src?: string;
    };
    meta_data?: Array<{
      display_key?: string;
      display_value?: string;
      id?: number;
      key?: string;
      value?: string;
    }>;
    name?: string;
    product_id?: number;
    quantity?: number;
    subtotal?: string;
    subtotal_tax?: string;
    tax_class?: string;
    total?: string;
    total_tax?: string;
    variation_id?: number;
  }>;
  meta_data?: Array<{
    id?: number;
    key?: string;
  }>;
  needs_processing?: boolean;
  number?: string;
  order_key?: string;
  parent_id?: number;
  payment_method?: string;
  payment_method_title?: string;
  payment_url?: string;
  prices_include_tax?: boolean;
  shipping?: {
    address_1?: string;
    address_2?: string;
    city?: string;
    company?: string;
    country?: string;
    first_name?: string;
    last_name?: string;
    phone?: string;
    postcode?: string;
    state?: string;
  };
  shipping_lines?: Array<{
    id?: number;
    instance_id?: string;
    method_id?: string;
    method_title?: string;
    total?: string;
    total_tax?: string;
  }>;
  shipping_tax?: string;
  shipping_total?: string;
  status?: string;
  total?: string;
  total_tax?: string;
  transaction_id?: string;
  version?: string;
};

export type WooCommerceV1OrderCreateNode = {
  type: 'n8n-nodes-base.wooCommerce';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<WooCommerceV1OrderCreateParams>;
  output?: Items<WooCommerceV1OrderCreateOutput>;
};