import type Extent from "../../../geometry/Extent.js";
import type { WCSVersion } from "./types.js";

/** Coverage information associated with a WCS service. */
export interface CoverageBrief {
  /** The subtype of the coverage. */
  coverageSubType?: string;
  /** The id of the coverage. */
  id: string;
  /** The extent of the coverage. */
  lonLatEnvelope?: Extent;
}

/** A list of URLs for the WCS service resources. It is necessary for a WCS client to communicate correctly with your WCS service. */
export interface OnlineResources {
  /** The URL to the describeCoverage endpoint. */
  describeCoverage: string;
  /** The URL to the getCapabilities endpoint. */
  getCapabilities: string;
  /** The URL to the getCoverage endpoint. */
  getCoverage: string;
}

/**
 * WCS service information about the available coverages, versions, extensions and more.
 *
 * @see [getCapabilities()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ogc-wcsUtils.html#getCapabilities)
 */
export interface WCSCapabilities {
  /** Information about the available coverages. */
  coverages: CoverageBrief[];
  /** Information about the available grid coverages. */
  gridCoverages: CoverageBrief[];
  /** Name of the WCS service. */
  name: string;
  /** Online resources for the WCS service. */
  onlineResources: OnlineResources;
  /** Application profiles supported by the WCS service. */
  profiles?: string[];
  /** Formats supported by the WCS service. */
  supportedFormats?: string[];
  /** Interpolations supported by the WCS service. */
  supportedInterpolations?: string[];
  /** The versions supported by the WCS service. */
  supportedVersions: string[];
  /** The WCS service version. */
  version: WCSVersion;
}