UNPKG

@launchdarkly/js-sdk-common

Version:
58 lines 2.3 kB
/** * Specifies the base service URIs used by SDK components. */ export default class ServiceEndpoints { static DEFAULT_EVENTS: string; readonly streaming: string; readonly polling: string; readonly events: string; readonly payloadFilterKey?: string; /** Valid paths are: * /bulk * /events/bulk/envId * /mobile */ readonly analyticsEventPath: string; /** Valid paths are: * /diagnostic * /events/diagnostic/envId * /mobile/events/diagnostic */ readonly diagnosticEventPath: string; readonly includeAuthorizationHeader: boolean; constructor(streaming: string, polling: string, events?: string, analyticsEventPath?: string, diagnosticEventPath?: string, includeAuthorizationHeader?: boolean, payloadFilterKey?: string); } /** * Get the URI for the streaming endpoint. * * @param endpoints The service endpoints. * @param path The path to the resource, devoid of any query parameters or hrefs. * @param parameters The query parameters. These query parameters must already have the appropriate encoding applied. This function WILL NOT apply it for you. */ export declare function getStreamingUri(endpoints: ServiceEndpoints, path: string, parameters: { key: string; value: string; }[]): string; /** * Get the URI for the polling endpoint. * * @param endpoints The service endpoints. * @param path The path to the resource, devoid of any query parameters or hrefs. * @param parameters The query parameters. These query parameters must already have the appropriate encoding applied. This function WILL NOT apply it for you. */ export declare function getPollingUri(endpoints: ServiceEndpoints, path: string, parameters?: { key: string; value: string; }[]): string; /** * Get the URI for the events endpoint. * * @param endpoints The service endpoints. * @param path The path to the resource, devoid of any query parameters or hrefs. * @param parameters The query parameters. These query parameters must already have the appropriate encoding applied. This function WILL NOT apply it for you. */ export declare function getEventsUri(endpoints: ServiceEndpoints, path: string, parameters?: { key: string; value: string; }[]): string; //# sourceMappingURL=ServiceEndpoints.d.ts.map