export { API_BASE_PATH } from "../api-base-path.gen.js"; export { type ApiPathScope, parseApiPathScope } from "./api-path-scope.js"; /** * Encode one Sentry API path identifier without letting it become a URL path. * * URL parsing collapses bare `.` and `..` segments even after * `encodeURIComponent`, so callers must reject those identifiers before * constructing a request. The caller owns its product-specific error type. * A pre-encoded spelling such as `%2e%2e` is safe: encoding its percent signs * prevents the URL parser from treating it as a dot segment. */ export declare function encodeApiPathSegment(value: string | number): string | null; /** * Assemble an API URL from a product-validated base and a relative endpoint. * This does not decide which host is trusted or which region an org uses. */ export declare function buildSentryApiUrl(baseUrl: string, endpoint: string): string; /** * Builds an API request path, confining each interpolated value to one path segment. * * `fetch` resolves dot segments during URL parsing, so a raw value in a path can * rewrite it above the org and project the server injected. Encoding stops separators * but not `.` or `..`, which survive encoding and still collapse (the URL spec treats * `%2e%2e` as a dot segment too), so those are rejected instead. * * Query strings go outside the template, since `URLSearchParams` has already encoded * them and their separators must stay literal: * * ```typescript * const path = apiPath`/organizations/${organizationSlug}/issues/`; * await this.requestJSON(`${path}?${query}`); * ``` */ export declare function apiPath(strings: TemplateStringsArray, ...values: (string | number)[]): string; /** `path` with `query` appended, or `path` alone when `query` is empty. */ export declare function withQuery(path: string, query: URLSearchParams): string;