import type Collection from "../../../core/Collection.js";
import type SpatialReference from "../../../geometry/SpatialReference.js";
import type Field from "../../support/Field.js";
import type { ParquetGeometryEncodingUnion } from "../../support/ParquetGeometryEncodingBase.js";
import type { ParquetGeometryType } from "../../support/parquetUtils.js";

/**
 * Contains an information inferred from the parquet files.
 *
 * @see [getParquetLayerInfo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-parquetUtils.html#getParquetLayerInfo)
 */
export interface ParquetLayerInfo {
  /** The fields derived from the parquet files. */
  fields?: Field[];
  /**
   * The encoding format used to store geometries in the parquet files.
   *  See [ParquetLayer#geometryEncoding](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ParquetLayer.html#geometryEncoding) for more information.
   */
  geometryEncoding?: ParquetGeometryEncodingUnion | null;
  /** The geometry type of the features in the layer. */
  geometryType?: ParquetGeometryType | null;
  /** The spatial reference of the layer. */
  spatialReference?: SpatialReference;
  /** A collection of URLs pointing to the parquet files. */
  urls: Collection<string>;
}