/**
 * Provides utility functions for the [ParquetLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ParquetLayer.html).
 *
 * @since 4.33
 * @see [ParquetLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ParquetLayer.html)
 */
import type { AbortOptions } from "../../core/promiseUtils.js";
import type { ParquetLayerInfo } from "../graphics/sources/ParquetSource.js";
import type { CustomParameters } from "../mixins/CustomParametersMixin.js";

export type ParquetGeometryType = "point" | "polygon" | "polyline" | "multipoint";

export interface ParquetLayerInfoOptions extends AbortOptions {
  /** A list of key-value pairs of parameters to append to the url. */
  customParameters?: CustomParameters | null;
}

/**
 * Retrieves information about a [ParquetLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ParquetLayer.html) from the first parquet file in the specified URLs array.
 * Throws an error if the parquet file is empty or if the information cannot be determined.
 *
 * @param urls - An array of URLs pointing to parquet files. At least one url must be provided.
 * @param options - An object specifying additional options. See the
 *   object specification table below for the properties of this object.
 * @returns A promise that resolves to the parquet layer information.
 * @example
 * const urls = ["url-to-your-parquet-file.parquet"];
 * const info = await parquetUtils.getParquetLayerInfo(urls);
 *
 * // create new parquet layer using the retrieved info
 * const layer = new ParquetLayer(info);
 */
export function getParquetLayerInfo(urls: string[], options?: ParquetLayerInfoOptions): Promise<ParquetLayerInfo>;