export declare class StacCatalogError extends Error { cause?: Error | undefined; constructor(message: string, cause?: Error | undefined); } export declare class StacLoadError extends StacCatalogError { constructor(message: string, cause?: Error); } export declare class StacResolutionError extends StacCatalogError { constructor(message: string); } export interface SpatialExtent { bbox: [number, number, number, number]; } export interface TemporalExtent { start: string | null; end: string | null; } export interface DatasetVariantConfig { variant: string; cid?: string; /** * Priority for auto-concatenation. Lower numbers = higher priority (loaded first). * When multiple variants have concatPriority defined, they will be automatically * concatenated in priority order (1, 2, 3, ...). * Variants without concatPriority are not included in auto-concatenation. */ concatPriority?: number; /** * Dimension along which to concatenate (default: "time"). * Only used when concatPriority is defined. */ concatDimension?: string; spatialExtent?: SpatialExtent; temporalExtent?: TemporalExtent; } export interface CatalogDataset { dataset: string; variants: DatasetVariantConfig[]; } export interface CatalogCollection { collection: string; datasets: CatalogDataset[]; organization?: string; title?: string; category?: string; } export type DatasetCatalog = CatalogCollection[]; export interface StacLink { rel: string; href: string; type?: string; title?: string; [key: string]: unknown; } export interface StacAsset { href: string; type?: string; title?: string; roles?: string[]; [key: string]: unknown; } export interface StacItem { type: "Feature"; stac_version: string; id: string; properties: Record; geometry: unknown; bbox?: number[]; assets: Record; links: StacLink[]; } export interface StacCollection { type: "Collection"; stac_version: string; id: string; title?: string; description?: string; keywords?: string[]; license?: string; extent?: unknown; summaries?: Record; links: StacLink[]; items?: StacItem[]; organizationId?: string; organizationTitle?: string; category?: string; datasetNames?: string[]; } export interface StacCatalog { type: "Catalog"; stac_version: string; id: string; title?: string; description?: string; links: StacLink[]; collections?: StacCollection[]; organizations?: StacOrganization[]; } export declare function getStringProperty(properties: Record | undefined, key: string): string | undefined; export interface StacReleaseMetadata { versionsApi?: string; provenanceApi?: string; citationApi?: string; streamId?: string; commitId?: string; versionLabel?: string; isCitable?: boolean; retentionClass?: string; } export declare function getStacReleaseMetadata(properties: Record | undefined): StacReleaseMetadata; export interface StacCatalogOptions { gatewayUrl?: string; cacheTtlMs?: number; rootCid?: string; } export interface ConcatenableStacItem { variant: string; cid: string; concatPriority: number; concatDimension: string; zarrResolutions: StacZarrResolution[]; } export interface StacOrganization { id: string; title?: string; link: StacLink; catalog: StacCatalog; } export interface ResolvedDatasetFromStac extends StacReleaseMetadata { cid: string; collectionId: string; organizationId?: string; dataset: string; variant: string; zarrResolutions: StacZarrResolution[]; } export interface StacZarrResolution { assetKey: string; resolution: string; group: string; } export declare function getStacZarrResolutions(assets: Record): StacZarrResolution[]; /** * Fetches the root catalog CID from the STAC API endpoint */ export declare function getRootCatalogCid(endpoint?: string): Promise; /** * Converts ipfs:// URIs to HTTP gateway URLs */ export declare function resolveIpfsUri(uri: string, gatewayUrl: string): string; /** * Loads the STAC catalog from IPFS, with recursive loading of collections and items */ export declare function loadStacCatalog(gatewayUrl: string, rootCid?: string): Promise; /** * Resolves a dataset from the STAC catalog, returning CID and resolved IDs. */ export declare function resolveDatasetFromStac(catalog: StacCatalog, collection: string, dataset: string, variant?: string, organization?: string): ResolvedDatasetFromStac; /** * Resolves a dataset CID from the STAC catalog */ export declare function resolveDatasetCidFromStac(catalog: StacCatalog, collection: string, dataset: string, variant?: string, organization?: string): string; /** * Gets all items for a collection/dataset that have concatenation metadata */ export declare function getConcatenableItemsFromStac(catalog: StacCatalog, collection: string, dataset: string, organization?: string): ConcatenableStacItem[]; /** * Lists all datasets available in the STAC catalog */ export declare function listAvailableDatasetsFromStac(catalog: StacCatalog): DatasetCatalog; //# sourceMappingURL=stac-catalog.d.ts.map