import { type RequestOptions } from '../lib/api.client.js'; import type { MapEventDetail } from '../components/map/type.js'; import type { UmmC } from './types/cmr/umm-c.js'; import type { UmmVar } from './types/cmr/umm-var.js'; import type { UmmG } from './types/cmr/umm-g.js'; export type CmrCollectionCitationItem = { doi: { doi: string; }; collectionCitations: Array; }; export type CmrCollectionCitation = { creator: string; editor: string; dataPresentationForm: string; onlineResource: { linkage: string; }; publisher: string; title: string; seriesName: string; releaseDate: string; version: string; releasePlace: string; }; export type CmrSearchResult = { type: 'collection' | 'variable'; collectionConceptId: string; collectionEntryId: string; summary: string; conceptId: string; entryId: string; provider: string; title: string; }; export type CmrGranule = { conceptId: string; dataGranule: CmrGranuleDataGranule; title: string; timeEnd: string; timeStart: string; relatedUrls: Array<{ type: string; url: string; }>; cloudCover: unknown; }; export type CmrGranuleDataGranule = { archiveAndDistributionInformation: Array; }; export type ArchiveAndDistributionInformation = { name: string; size: number; sizeUnit: string; sizeInBytes?: number; files?: Array; }; export type CloudCoverRange = { min: number; max: number; }; export interface UmmResponse { hits: number; items: Array>; } export interface UmmResult { meta: UmmMeta; umm: T; } /** * meta information from the CMR search endpoint * there are quite a few more fields available but we're only using what we need */ export interface UmmMeta { 'concept-id': string; 'native-id': string; 'provider-id': string; 'granule-count'?: number; } export type SearchParams = { pageSize?: number; pageNum?: number; offset?: number; sortBy?: string; sortDirection?: 'asc' | 'desc' | string; search?: string; searchFields?: string[]; }; export type SearchGranulesParams = SearchParams & { collectionEntryId?: string; collectionConceptId?: string; startDate?: string; endDate?: string; location?: MapEventDetail | null; cloudCover?: { min?: number; max?: number; }; }; export type SearchVariablesParams = SearchParams & { collectionConceptId?: string; }; declare class CmrApi { #private; getCollection(shortName: string, version: string, options?: RequestOptions): Promise>; getCollectionByEntryId(collectionEntryId?: string, options?: RequestOptions): Promise>; searchVariables(searchParams: SearchVariablesParams, options?: RequestOptions): Promise>; getSamplingOfGranules(collectionEntryId: string, options?: RequestOptions): Promise<{ minDate?: string; maxDate?: string; isSubDaily: boolean; hasGranules: boolean; }>; searchGranules(params: SearchGranulesParams, options?: RequestOptions): Promise>; getCollectionCitation(collectionEntryId: string, options?: RequestOptions): Promise; } declare const cmrApi: CmrApi; export default cmrApi;