/** * Time range query parameters shared by the endpoints that take one: * `statsPeriod` or a `start`/`end` pair, or the `since`/`until` seconds of * Sentry's `StatsMixin` endpoints. */ /** A trimmed `statsPeriod`, or undefined when it is blank. */ export declare function normalizeStatsPeriod(statsPeriod?: string): string | undefined; /** * The relative period to query: the trimmed `statsPeriod`, or 24 hours when * neither it nor an absolute `start` or `end` is given. */ export declare function defaultStatsPeriod({ statsPeriod, start, end, }: { statsPeriod?: string; start?: string; end?: string; }): string | undefined; /** * Split a relative period such as `24h` into its amount and unit. * * @throws {ApiValidationError} For any other format */ export declare function parseStatsPeriod(statsPeriod: string): { amount: number; unit: string; }; /** * Validates and applies time parameters to a URLSearchParams object. * * Enforces mutual exclusivity between relative (statsPeriod) and * absolute (start/end) time ranges, and ensures start/end are paired. * * @param queryParams The URLSearchParams to modify * @param statsPeriod Relative time period (e.g., "24h", "7d") * @param start Absolute start time (ISO 8601) * @param end Absolute end time (ISO 8601) * @throws {ApiValidationError} If time parameters are invalid */ export declare function applyTimeParams(queryParams: URLSearchParams, statsPeriod?: string, start?: string, end?: string): void; /** * Like {@link applyTimeParams}, but as the `since` and `until` Unix seconds * that `StatsMixin` endpoints read, with an optional `resolution`. A missing * range means the last 24 hours. * * @throws {ApiValidationError} If time parameters are invalid */ export declare function applyStatsMixinTimeParams(queryParams: URLSearchParams, statsPeriod?: string, start?: string, end?: string, resolutionSeconds?: number): void;