import { FDSNCommon } from "./fdsncommon.mjs"; import * as fdsnavailability from "./fdsnavailability.mjs"; import * as fdsndataselect from "./fdsndataselect.mjs"; import * as fdsnevent from "./fdsnevent.mjs"; import * as fdsnstation from "./fdsnstation.mjs"; /** const for fdsn web service host, www.fdsn.org */ export declare const FDSN_HOST = "www.fdsn.org"; /** const for service name */ export declare const DATACENTERS_SERVICE = "datacenters"; export declare const DATACENTERS_PATH_BASE = "ws"; /** * Query to a FDSN Data Centers Registry web service. * * @see https://www.fdsn.org/webservices/ * @param host optional host to connect to, defaults to FDSN */ export declare class DataCentersQuery extends FDSNCommon { /** @private */ _name: string | undefined; /** @private */ _services: string | undefined; /** @private */ _includedatasets: boolean | undefined; constructor(host?: string); /** * Gets/Sets the version of the fdsnws spec, 1 is currently the only value. * Setting this is probably a bad idea as the code may not be compatible with * the web service. * * @param value optional new value if setting * @returns the query when setting, the current value os services if no arguments */ specVersion(value?: string): DataCentersQuery; getSpecVersion(): string; /** * Gets/Sets the protocol, http or https. This should match the protocol * of the page loaded, but is autocalculated and generally need not be set. * * @param value optional new value if setting * @returns the query when setting, the current value os services if no arguments */ protocol(value?: string): DataCentersQuery; getProtocol(): string | undefined; /** * Gets/Sets the remote host to connect to. This defaults to * www.fdsn.org and generally should not be set. * * @param value optional new value if setting * @returns the query when setting, the current value os services if no arguments */ host(value?: string): DataCentersQuery; getHost(): string; /** * Gets/Sets the remote port to connect to. This defaults to * the standard port for the protocol and generally should not be set. * * @param value optional new value if setting * @returns the query when setting, the current value os services if no arguments */ port(value?: number): DataCentersQuery; getPort(): number | undefined; pathBase(value?: string): DataCentersQuery; getPathBase(): string; /** * limits results to the named data center, default is all data centers * * @param value names to search for * @returns the query when setting, the current value os services if no arguments */ name(value?: string): DataCentersQuery; getName(): string | undefined; /** * limits results to services that match the glob style pattern * * @param value glob style pattern to match against * @returns the query when setting, the current value os services if no arguments */ services(value?: string): DataCentersQuery; getServices(): string | undefined; /** * whether the results include detailed information about * the data sets offered by each center, default is false * * @param value true to include datasets * @returns the query when setting, the current value os services if no arguments */ includeDataSets(value?: boolean): DataCentersQuery; getIncludeDataSets(): boolean | undefined; /** * Get/Set the timeout in seconds for the request. Default is 30. * * @param value timeout seconds * @returns the query when setting, the current value os services if no arguments */ timeout(value?: number): DataCentersQuery; getTimeout(): number | undefined; /** * queries the fdsn registry web service, returning the result as a parsed json object. * * @returns Promise to the json object. */ queryJson(): Promise; /** * queries the registry to find fdsn availability compatible web services within * a datacenter of the given name, optionally within the repository with * the repo name. * * @param name datacenter name * @param repoName optional repository name * @returns Promise to Array of fdsnavailability.AvailabilityQuery objects */ findFdsnAvailability(name: string, repoName?: string): Promise>; /** * queries the registry to find fdsn dataselect compatible web services within * a datacenter of the given name, optionally within the repository with * the repo name. * * @param name datacenter name * @param repoName optional repository name * @returns Promise to Array of fdsndataselect.DataSelectQuery objects */ findFdsnDataSelect(name: string, repoName?: string): Promise>; /** * queries the registry to find a fdsn event compatible web services within * a datacenter of the given name, optionally within the repository with * the repo name. * * @param dcname datacenter name * @param repoName optional repository name * @returns Promise to Array of fdsnevent.EventQuery objects */ findFdsnEvent(dcname: string, repoName?: string): Promise>; /** * queries the registry to find a fdsn station compatible web services within * a datacenter of the given name, optionally within the repository with * the repo name. * * @param dcname datacenter name * @param repoName optional repository name * @returns Promise to Array of fdsnstation.StationQuery objects */ findFdsnStation(dcname: string, repoName?: string): Promise>; /** * Extracts services comaptible with the given service name, optionally within * the given repository, from the json. * * @param json json containing services * @param compatibleName service name to be compatible with * @param repoName optional repository within the json to search * @returns array of services found */ extractCompatibleServices(json: RootType, compatibleName: string, repoName?: string): Array; /** * Forms the base of the url for accessing the datacenters service. * * @returns URL as string */ formBaseURL(): string; /** * Forms version url, not part of spec and so may not be supported. * * @returns version */ formVersionURL(): string; /** * Queries the remote web service to get its version * * @returns Promise to version string */ queryVersion(): Promise; /** * forms a url to the fdsn registry based on the configured parameters. * * @returns the url */ formURL(): string; } /** * Root type of fdsn datacenters json query. */ export type RootType = { version: Record; datacenters: Array<{ name: string; website: string; fullName?: string; summary?: string; repositories: Array; }>; } & Record; export type Repository = { name: string; description?: string; website?: string; services: Array; datasets?: Array; }; export type Dataset = { network?: string; station?: string; location?: string; channel?: string; starttime?: string; endtime?: string; priority?: number; description?: string; url?: string; services?: Array; }; export type Service = { name: string; description?: string; url?: string; compatibleWith?: string; }; export declare function isValidRootType(jsonValue: unknown): jsonValue is RootType; //# sourceMappingURL=fdsndatacenters.d.mts.map