import { Environments } from '../../apis/harmony.api.js'; export { Environments } from '../../apis/harmony.api.js'; import { LatLng } from '../../components/map/models/LatLng.js'; import { LatLngBounds } from '../../components/map/models/LatLngBounds.js'; import type { Variable } from '../../components/browse-variables/browse-variables.types.js'; export type HarmonyRequestOptions = { environment?: Environments; collectionConceptId?: string; variableConceptIds?: Array; variables?: Array; location: LatLng | LatLngBounds; /** GeoJSON object for shape/polygon subsetting via multipart POST */ shape?: object; startDate?: string; endDate?: string; format?: string; average?: string; labels?: Array; skipPreview?: boolean; anonymous?: boolean; dimensions?: Array; }; export type RangeDimension = { name: string; min: number; max: number; }; /** * Builds a Harmony OGC request URL * * usage: new HarmonyRequest({ options here }).requestUrl * usage: new HarmonyRequest().location(location).format(format).requestUrl */ export declare class HarmonyRequest { #private; constructor(options?: Partial); get requestUrl(): string; get hasShape(): boolean; /** * Builds a multipart FormData body for shape (polygon) subsetting. * All request params are appended as form fields (no query string). * The GeoJSON shape is appended as a `shapefile` file field. * Per HARMONY-290, Harmony cannot accept both files and query params simultaneously. */ buildFormData(): FormData; get baseUrl(): string; get params(): string; get options(): Partial; private set; /** * Helper method to get a label value by prefix, e.g. getLabelByPrefix('instrument-short-name') will return the value of the label that starts with 'instrument-short-name:' */ getLabelByPrefix(prefix: string): string | undefined; environment(environment: HarmonyRequestOptions['environment']): this; collection(collectionConceptId: string): this; variable(variable: string): this; location(location: HarmonyRequestOptions['location']): this; shape(shape: object): this; dateRange(startDate: string, endDate: string): this; startDate(startDate: string): this; endDate(endDate: string): this; format(format: string): this; label(label: string): this; addLabelsFromVariable(variable: Variable): this; average(average: string): this; dimension(dimension: RangeDimension): this; skipPreview(skipPreview: boolean): this; isVariableConceptId(value: string): boolean; /** * given a Harmony request, determines the most appropriate Terra icon to represent it. */ getTerraIcon(): "outline-map" | "outline-chart-bar"; /** * Parses a Harmony OGC request URL and returns a HarmonyRequest instance * with the corresponding options populated. * * @example * const request = HarmonyRequest.fromUrl( * 'https://harmony.earthdata.nasa.gov/C2723754847-GES_DISC/ogc-api-coverages/1.0.0/collections/parameter_vars/coverage/rangeset?subset=lat(5:40)&subset=lon(62:95)&format=text%2Fcsv' * ) */ static fromUrl(url?: string): HarmonyRequest; }