import type { ReactiveController, ReactiveControllerHost } from 'lit'; import type { QueryClientHost } from '../mixins/query-client.mixin.js'; import type { HarmonyCapabilitiesResponse } from '../apis/harmony.api.js'; import type { UmmC } from '../apis/types/cmr/umm-c.js'; export interface CollectionControllerConfig { getCollectionEntryId: () => string | undefined; getBearerToken: () => string | undefined; } export type CollectionWithAvailableServices = HarmonyCapabilitiesResponse & { granuleCount: number; collection: UmmC; }; /** * A Lit ReactiveController that manages all collection-related queries for a given * collection entry ID. Owns the full dependency chain: * * collectionEntryId * ├── #collectionQuery (CMR UMM-C record) * │ └── conceptId * │ ├── #capabilitiesQuery (Harmony capabilities — also needs bearerToken) * │ ├── #variablesQuery (CMR UMM-Var records) * │ └── #gesDiscCollectionQuery (GES DISC collection details) * └── #samplingQuery (first/last granule dates from CMR) * * #giovanniVariablesQuery (always enabled; static endpoint) * * Queries re-run automatically when collectionEntryId changes because QueryController * calls optionsFn() on every hostUpdate(), which picks up the new value. */ export declare class CollectionController implements ReactiveController { #private; private host; private config; constructor(host: ReactiveControllerHost & QueryClientHost, config: CollectionControllerConfig); hostConnected(): void; hostDisconnected(): void; /** The CMR concept-id for the current collection, once loaded. */ get conceptId(): string | undefined; /** Raw CMR UMM-C result for the current collection. */ get collection(): import("@tanstack/query-core").QueryObserverResult | null, Error> | undefined; /** Harmony capabilities for the current collection (output formats, subsetting options, etc.). */ get capabilities(): import("@tanstack/query-core").QueryObserverResult | undefined; /** CMR UMM-Var records for all variables in the current collection. */ get variables(): import("@tanstack/query-core").QueryObserverResult | null, Error> | undefined; /** GES DISC collection details (user-friendly dimension names, etc.). */ get gesDiscCollection(): import("@tanstack/query-core").QueryObserverResult | undefined; /** First/last granule dates derived from a CMR temporal sampling query. */ get sampling(): import("@tanstack/query-core").QueryObserverResult<{ minDate?: string; maxDate?: string; isSubDaily: boolean; hasGranules: boolean; } | null, Error> | undefined; /** List of variable names configured in Giovanni. Stable reference — only changes when data changes. */ get giovanniVariables(): Set; /** True while the primary collection record is being fetched. */ get isLoadingCollection(): boolean; /** True if the capabilities query errored (e.g. collection not found in Harmony). */ get hasCapabilitiesError(): boolean; /** True if the collection contains sub-daily granules (temporal extent < 24 h). */ get isSubDaily(): boolean; /** True if the collection has at least one granule. */ get hasGranules(): boolean; /** * Bounding box string derived from the UMM-C spatial extent, in the format * "west, south, east, north". Returns a global default if no extent is defined. */ get spatialConstraints(): string; /** * Returns a `CollectionWithAvailableServices` shaped object by combining the * Harmony capabilities response with UMM-C metadata from CMR. * Returns undefined until both capabilities and the collection record are loaded. * Stable reference — only rebuilds when the underlying query data changes. */ get collectionInfo(): CollectionWithAvailableServices | undefined; }