import { FDSNCommon, IRIS_HOST, EARTHSCOPE_HOST, LatLonRegion } from "./fdsncommon.mjs"; import { NslcId } from "./fdsnsourceid.mjs"; import { DateTime, Interval } from "luxon"; import { Network } from "./stationxml.mjs"; export declare const LEVEL_NETWORK = "network"; export declare const LEVEL_STATION = "station"; export declare const LEVEL_CHANNEL = "channel"; export declare const LEVEL_RESPONSE = "response"; export declare const LEVELS: string[]; /** const for service name */ export declare const STATION_SERVICE = "station"; /** * Major version of the FDSN spec supported here. * Currently is 1. */ export declare const SERVICE_VERSION = 1; /** * Service name as used in the FDSN DataCenters registry, * https://www.fdsn.org/datacenters */ export declare const SERVICE_NAME = "fdsnws-station-1"; /** const for the default IRIS web service host, service.iris.edu */ export { IRIS_HOST, EARTHSCOPE_HOST }; /** * Query to a FDSN Station web service. * * @see https://www.fdsn.org/webservices/ * @param host optional host to connect to, defaults to IRIS */ export declare class StationQuery extends FDSNCommon { /** @private */ _networkCode: string | undefined; /** @private */ _stationCode: string | undefined; /** @private */ _locationCode: string | undefined; /** @private */ _channelCode: string | undefined; /** @private */ _startTime: DateTime | undefined; /** @private */ _endTime: DateTime | undefined; /** @private */ _startBefore: DateTime | undefined; /** @private */ _endBefore: DateTime | undefined; /** @private */ _startAfter: DateTime | undefined; /** @private */ _endAfter: DateTime | undefined; /** @private */ _minLat: number | undefined; /** @private */ _maxLat: number | undefined; /** @private */ _minLon: number | undefined; /** @private */ _maxLon: number | undefined; /** @private */ _latitude: number | undefined; /** @private */ _longitude: number | undefined; /** @private */ _minRadius: number | undefined; /** @private */ _maxRadius: number | undefined; /** @private */ _includeRestricted: boolean | undefined; /** @private */ _includeAvailability: boolean | undefined; /** @private */ _format: string | undefined; /** @private */ _updatedAfter: DateTime | undefined; /** @private */ _matchTimeseries: boolean | undefined; /** * Construct a query * * @param host the host to connect to , defaults to service.iris.edu */ 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 new value if getting, this if setting */ specVersion(value?: string): StationQuery; 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 new value if getting, this if setting */ protocol(value?: string): StationQuery; getProtocol(): string | undefined; /** * Gets/Sets the remote host to connect to. * * @param value optional new value if setting * @returns new value if getting, this if setting */ host(value?: string): StationQuery; getHost(): string | undefined; /** * Gets/Sets the remote port to connect to. * * @param value optional new value if setting * @returns new value if getting, this if setting */ port(value?: number): StationQuery; getPort(): number | undefined; pathBase(value?: string): StationQuery; getPathBase(): string; /** * Gets/Sets the nodata parameter, usually 404 or 204 (default), controlling * the status code when no matching data is found by the service. * * @param value optional new value if setting * @returns new value if getting, this if setting */ nodata(value?: number): StationQuery; getNodata(): number | undefined; /** * Get/Set the network query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ networkCode(value?: string): StationQuery; getNetworkCode(): string | undefined; /** * Get/Set the station query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ stationCode(value?: string): StationQuery; getStationCode(): string | undefined; /** * Get/Set the location code query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ locationCode(value?: string): StationQuery; getLocationCode(): string | undefined; /** * Get/Set the channel query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ channelCode(value?: string): StationQuery; getChannelCode(): string | undefined; /** * Get/Set the starttime query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ startTime(value?: DateTime | string): StationQuery; getStartTime(): DateTime | undefined; /** * Get/Set the endtime query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ endTime(value?: DateTime | string): StationQuery; getEndTime(): DateTime | undefined; /** * Sets startTime and endTime using the given time window * * @param se time window * @returns this */ timeRange(se: Interval): StationQuery; /** * Get/Set the startbefore query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ startBefore(value?: DateTime | string): StationQuery; getStartBefore(): DateTime | undefined; /** * Get/Set the endbefore query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ endBefore(value?: DateTime | string): StationQuery; getEndBefore(): DateTime | undefined; /** * Get/Set the startafter query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ startAfter(value?: DateTime | string): StationQuery; getStartAfter(): DateTime | undefined; /** * Get/Set the endafter query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ endAfter(value?: DateTime | string): StationQuery; getEndAfter(): DateTime | undefined; /** * Get/Set the minlat query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ minLat(value?: number): StationQuery; getMinLat(): number | undefined; /** * Get/Set the maxlon query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ maxLat(value?: number): StationQuery; getMaxLat(): number | undefined; /** * Get/Set the minlon query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ minLon(value?: number): StationQuery; getMinLon(): number | undefined; /** * Get/Set the maxlon query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ maxLon(value?: number): StationQuery; getMaxLon(): number | undefined; /** * Get/Set the latitude query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ latitude(value?: number): StationQuery; getLatitude(): number | undefined; /** * Get/Set the longitude query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ longitude(value?: number): StationQuery; getLongitude(): number | undefined; /** * Get/Set the minradius query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ minRadius(value?: number): StationQuery; getMinRadius(): number | undefined; /** * Get/Set the maxradius query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ maxRadius(value?: number): StationQuery; getMaxRadius(): number | undefined; /** * Get/Set the includerestricted query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ includeRestricted(value?: boolean): StationQuery; getIncludeRestricted(): boolean | undefined; /** * Get/Set the includeavailability query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ includeAvailability(value?: boolean): StationQuery; getIncludeAvailability(): boolean | undefined; /** * Get/Set the format query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ format(value?: string): StationQuery; getFormat(): string | undefined; /** * Get/Set the updatedafter query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ updatedAfter(value?: DateTime): StationQuery; getUpdatedAfter(): DateTime | undefined; /** * Get/Set the matchtimeseries query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ matchTimeseries(value?: boolean): StationQuery; getMatchTimeseries(): boolean | undefined; latLonRegion(value: LatLonRegion | null): StationQuery; nslcCodes(channelId: NslcId): StationQuery; /** * Get/Set the timeout in seconds for the request. Default is 30. * * @param value optional new value if setting * @returns new value if getting, this if setting */ timeout(value?: number): StationQuery; getTimeout(): number | undefined; /** * Checks to see if any parameter that would limit the data * returned is set. This is a crude, coarse check to make sure * the client doesn't ask for EVERYTHING the server has. * * @returns true if some parameter set */ isSomeParameterSet(): boolean; /** * Queries the remote web service for networks. * * @returns a Promise to an Array of Network objects. */ queryNetworks(): Promise>; /** * Queries the remote web service for stations. The stations * are contained within their respective Networks. * * @returns a Promise to an Array of Network objects. */ queryStations(): Promise>; /** * Queries the remote web service for channels. The Channels * are contained within their respective Stations which are in Networks. * * @returns a Promise to an Array of Network objects. */ queryChannels(): Promise>; /** * Queries the remote web service for responses. The Responses * are contained within their respective Channels, * which are in Stations which are in Networks. * * @returns a Promise to an Array of Network objects. */ queryResponses(): Promise>; /** * Queries the remote web service at the given level. * * @param level the level to query at, networ, station, channel or response. * @returns a Promise to an Array of Network objects. */ query(level: string): Promise>; /** * Execute POST request for networks, using params defined in this, and with * channel lines of the form: * * NET STA LOC CHA STARTTIME ENDTIME * * Note that empty LOC should be encoded as dash-dash * * @param postLines array of channel selection lines * @returns a Promise to an Array of Network objects. */ postQueryNetworks(postLines: Array): Promise>; /** * Execute POST request for stations, using params defined in this, and with * channel lines of the form: * * NET STA LOC CHA STARTTIME ENDTIME * * Note that empty LOC should be encoded as dash-dash * * @param postLines array of channel selection lines * @returns a Promise to an Array of Network objects. */ postQueryStations(postLines: Array): Promise>; /** * Execute POST request for channels, using params defined in this, and with * channel lines of the form: * * NET STA LOC CHA STARTTIME ENDTIME * * Note that empty LOC should be encoded as dash-dash * * @param postLines array of channel selection lines * @returns a Promise to an Array of Network objects. */ postQueryChannels(postLines: Array): Promise>; /** * Execute POST request for responses, using params defined in this, and with * channel lines of the form: * * NET STA LOC CHA STARTTIME ENDTIME * * Note that empty LOC should be encoded as dash-dash * * @param postLines array of channel selection lines * @returns a Promise to an Array of Network objects. */ postQueryResponses(postLines: Array): Promise>; /** * Execute POST request using params defined in this, for given level, and with * channel lines of the form: * * NET STA LOC CHA STARTTIME ENDTIME * * Note that empty LOC should be encoded as dash-dash * * @param level level to request, one of network, station, channel, response * @param postLines array of channel selection lines * @returns a Promise to an Array of Network objects. */ postQuery(level: string, postLines: Array): Promise>; /** * Queries the remote web service at the given level for raw xml. * Note that in the case of a nodata status code, xml that represents a * valid stationxml but with zero <Network> elements will be returned * as this simplifies parsing. * * @param level the level to query at, network, station, channel or response. * @returns a Promise to an xml Document. */ queryRawXml(level: string): Promise; /** * Queries the remote web service at the given level for unparsed xml as text. * Note that in the case of a nodata status code, text that represents a * valid stationxml but with zero <Network> elements will be returned * as this simplifies parsing. * * @param level the level to query at, network, station, channel or response. * @returns a Promise to string. */ queryRawXmlText(level: string): Promise; /** * Execute POST request using params defined in this, for given level, and with * channel lines of the form: * * NET STA LOC CHA STARTTIME ENDTIME * * Note that empty LOC should be encoded as dash-dash * * @param level level to request, one of network, station, channel, response * @param postLines array of channel selection lines * @returns string suitable for POST to fdsn station web service. */ postQueryRawXml(level: string, postLines: Array): Promise; /** * Creates post body using params defined in this, for given level, and with * optional channel lines of the form: * * NET STA LOC CHA STARTTIME ENDTIME * * Note that empty LOC should be encoded as dash-dash * * @param level level to request, one of network, station, channel, response * @param postLines optional array of channel selection lines * @returns string suitable for POST to fdsn station web service. */ createPostBody(level: string, postLines?: Array): string; /** * Forms the URL to get version from the web service, without any query paramters * * @returns the url */ formVersionURL(): string; /** * Queries the remote web service to get its version * * @returns Promise to version string */ queryVersion(): Promise; /** * Forms the basic URL to contact the web service, without any query paramters * * @returns the url */ formBaseURL(): string; formPostURL(): string; /** * Form URL to query the remote web service, encoding the query parameters. * * @param level network, station, channel or response * @returns url */ formURL(level: string): string; } //# sourceMappingURL=fdsnstation.d.mts.map