import { APIClient, type APIClientConfig, type ClockLike } from "@mailwoman/core/api"; import type { PathBuilderLike } from "path-ts"; /** * Sends anonymous requests to the Soil Data Access tabular query endpoint. * Requests need no key or account. */ export declare const SDA_POST_REST_URL = "https://sdmdataaccess.nrcs.usda.gov/Tabular/post.rest"; /** * Sets the minimum spacing between Soil Data Access requests. * NRCS publishes no rate limit for the service. */ export declare const SDA_MIN_REQUEST_INTERVAL_MS = 500; /** * One published survey area, as the catalogue reports it. */ export interface SurveyAreaCatalogEntry { areasymbol: string; areaname: string; /** * The version-established date as an ISO date. * The survey area's archive filename embeds it. */ saverest: string; saversion: number; } /** * A client for Soil Data Access. */ export declare class SoilDataAccessClient extends APIClient { /** * Runs one SQL query and returns its rows as strings, with NULL as an empty string. * * @throws {OGCServiceError} When the service answers with an exception report, * including an HTTP 200 response. * A server-side timeout uses that status. */ query(sql: string): Promise; /** * Returns the published survey areas whose symbol starts with `prefix`, * such as a state code or one whole area symbol. * * @throws {Error} When no survey area matches, because a build over an empty set * would otherwise report success having written no rows. */ readSurveyAreaCatalog(prefix: string): Promise; /** * Returns the map unit key the service's own geometry assigns at a point, or `undefined`, * as a cross-check against the authority through a channel this package never processed. */ mukeyAtPoint(latitude: number, longitude: number): Promise; } /** * Overrides the clock, the HTTP cache directory and the request spacing used * by {@link createSoilDataAccessClient}. */ export interface CreateSoilDataAccessClientOptions { clock?: ClockLike; cacheDirectory?: PathBuilderLike; minRequestIntervalMs?: number; } /** * Creates a {@link SoilDataAccessClient} with retries, a 12-hour disk cache and the default request pacing. */ export declare function createSoilDataAccessClient(options?: CreateSoilDataAccessClientOptions): SoilDataAccessClient; //# sourceMappingURL=client.d.ts.map