import type { Payload } from '../../transport'; import type { Site } from '../intakeSites'; import type { Configuration, ProxyFn } from './configuration'; export type TrackType = 'logs' | 'rum' | 'replay' | 'profile' | 'exposures' | 'flagevaluation' | 'debugger'; export type ApiType = 'fetch' | 'beacon' | 'manual'; /** * Source values supported by the transport layer for the `o2source` URL parameter. * * `'dd_debugger'` is internal to the Live Debugger SDK and is not part of * `InitConfiguration.source`. It is passed directly to `createEndpointBuilder` * by the debugger transport. */ export type TransportSource = 'browser' | 'flutter' | 'unity' | 'dd_debugger'; interface EndpointBuilderConfiguration { clientToken: string; proxy?: string | ProxyFn; site?: Site; source?: TransportSource; apiVersion?: string; organizationIdentifier?: string; insecureHTTP?: boolean; } export type EndpointBuilder = ReturnType; export declare function createEndpointBuilder(configuration: EndpointBuilderConfiguration, trackType: TrackType, extraParameters?: string[]): { build(api: ApiType, payload: Payload): string; trackType: TrackType; }; /** * Build the endpoint for the replica (dual shipping) site, if a replica is configured. * * The replica always targets the US1 site but keeps the `proxy` and `source` of the main * configuration. The RUM track additionally carries the replica `application.id`. */ export declare function createReplicaEndpointBuilder({ replica, proxy, source }: Configuration, trackType: TrackType): { build(api: ApiType, payload: Payload): string; trackType: TrackType; } | undefined; export interface BuildEndpointUrlOptions { proxy?: string | ProxyFn; site: Site | undefined; subdomain?: string; path: string; parameters?: string; insecureHTTP?: boolean; } export declare function buildEndpointUrl({ proxy, site, path, parameters, subdomain, insecureHTTP, }: BuildEndpointUrlOptions): string; export {};