import { FDSNCommon, IRIS_HOST, EARTHSCOPE_HOST } from "./fdsncommon.mjs"; import { NslcId } from "./fdsnsourceid.mjs"; import { DateTime, Interval } from "luxon"; import * as miniseed from "./miniseed.mjs"; import * as mseed3 from "./mseed3.mjs"; import { Seismogram, SeismogramDisplayData } from "./seismogram.mjs"; /** const for miniseed format, mseed */ export declare const FORMAT_MINISEED = "miniseed"; /** const for miniseed format, mseed */ export declare const FORMAT_MINISEED_THREE = "miniseed3"; /** const for service name */ export declare const DATASELECT_SERVICE = "dataselect"; /** * 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-dataselect-1"; /** const for the default IRIS web service host, service.iris.edu */ export { IRIS_HOST, EARTHSCOPE_HOST }; /** * Query to a FDSN Dataselect web service. * * @see https://www.fdsn.org/webservices/ * @param host optional host to connect to, defaults to IRIS */ export declare class DataSelectQuery 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 */ _quality: string | undefined; /** @private */ _minimumLength: number | undefined; /** @private */ _longestOnly: boolean | undefined; /** @private */ _repository: string | undefined; /** @private */ _format: string | 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 spec version, usually 1 * @returns new value if getting, this if setting */ specVersion(value?: string): DataSelectQuery; 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): DataSelectQuery; getProtocol(): string; /** * 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): DataSelectQuery; getHost(): 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): DataSelectQuery; getNodata(): number | 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): DataSelectQuery; getPort(): number | undefined; pathBase(value?: string): DataSelectQuery; getPathBase(): string; /** * Get/Set the network query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ networkCode(value?: string): DataSelectQuery; 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): DataSelectQuery; 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): DataSelectQuery; 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): DataSelectQuery; getChannelCode(): string | undefined; nslcCodes(channelId: NslcId): DataSelectQuery; /** * 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): DataSelectQuery; 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): DataSelectQuery; getEndTime(): DateTime | undefined; /** * Sets startTime and endTime using the given time range * * @param se time range * @returns this */ timeRange(se: Interval): DataSelectQuery; /** * Get/Set the quality query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ quality(value?: string): DataSelectQuery; getQuality(): string | undefined; /** * Get/Set the minimum length query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ minimumLength(value?: number): DataSelectQuery; getMinimumLength(): number | undefined; /** * Get/Set the longest only query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ longestOnly(value?: boolean): DataSelectQuery; getLongestOnly(): boolean | undefined; /** * set or get the repository paramter. This is an IRIS-specific * parameter that will not work with other dataselect web services. * * * @param value optional new value if setting * @returns new value if getting, this if setting */ repository(value?: string): DataSelectQuery; getRepository(): string | 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): DataSelectQuery; getFormat(): string | undefined; /** * 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): DataSelectQuery; getTimeout(): number | undefined; /** * queries the web service using the configured parameters, parsing the response * into miniseed data records. * * @returns Promise to Array of miniseed.DataRecords */ queryDataRecords(): Promise>; /** * queries the web service using the configured parameters, parsing the response * into miniseed3 data records. * * @returns Promise to Array of mseed3.MSeed3Record */ queryMS3Records(): Promise>; /** * queries the web service using the configured parameters, parsing the response * into miniseed data records and then combining the data records into * Seismogram objects. * * @returns Promise to Array of Seismogram objects */ querySeismograms(): Promise>; postQueryDataRecords(channelTimeList: Array): Promise>; postQueryMS3Records(channelTimeList: Array): Promise>; /** * query the dataselect server using post, which allows for multiple * channel-timeranges at once. This assumes that there are not multiple * time ranges for the same channel as the results, encapsulated as * SeismogramDisplayData objects, are returned one seismogram * per channel, which may contain gaps. The original channel and timerange are * also populated with each result. * * @param sddList array of SeismogramDisplayData objects * that will be filled in with the resulting seismogram * @returns Promise to the input Array of SeismogramDisplayData objects, each with the * seismogram containing the data returned from the server */ postQuerySeismograms(sddList: Array): Promise>; postQueryRaw(sddList: Array): Promise; postQueryRawWithBody(body: string): Promise; static createPostBody(sddList: Array): string; /** * Forms the base of the url for accessing the dataselect service. * * @returns URL as string */ formBaseURL(): string; formVersionURL(): string; /** * Queries the remote web service to get its version * * @returns Promise to version string */ queryVersion(): Promise; formPostURL(): string; formURL(): string; } export declare function createDataSelectQuery(params: Record): DataSelectQuery; //# sourceMappingURL=fdsndataselect.d.mts.map