/**
 * WooCommerce Node - Version 1
 * Discriminator: resource=customer, operation=getAll
 */


interface Credentials {
  wooCommerceApi: CredentialReference;
}

/** Retrieve many customers */
export type WooCommerceV1CustomerGetAllParams = {
  resource: 'customer';
  operation: 'getAll';
/**
 * 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 50
 */
    limit?: number | Expression<number>;
/**
 * Filters
 * @default {}
 */
    filters?: {
    /** Email address to filter customers by
     */
    email?: string | Expression<string> | PlaceholderValue;
    /** Order to sort customers in
     * @default asc
     */
    order?: 'asc' | 'desc' | Expression<string>;
    /** Field to sort customers by
     * @default id
     */
    orderby?: 'id' | 'include' | 'name' | 'registered_date' | Expression<string>;
  };
};

export type WooCommerceV1CustomerGetAllOutput = {
  _links?: {
    collection?: Array<{
      href?: string;
    }>;
    self?: Array<{
      href?: string;
    }>;
  };
  avatar_url?: 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;
  };
  date_created?: string;
  date_created_gmt?: string;
  email?: string;
  first_name?: string;
  id?: number;
  is_paying_customer?: boolean;
  last_name?: string;
  meta_data?: Array<{
    id?: number;
    key?: string;
  }>;
  role?: string;
  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;
  };
  username?: string;
};

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