@trycourier/courier-js
Version:
A browser-safe API wrapper
19 lines (18 loc) • 699 B
TypeScript
/** HTTP Header key used to report the Courier User-Agent. */
export declare const HTTP_HEADER_KEY: string;
export declare const SDK_KEY: "sdk";
export declare const SDK_VERSION_KEY: "sdkv";
export declare const CLIENT_ID_KEY: "cid";
/**
* Courier User Agent object, identifying:
* - the SDK name and version making a request
* - the pseudonymous client ID, which is not connected to a user ID or workspace
*
* This JSON-serializable object is sent as part of WebSocket messages under
* the `stats` key or serialized to a string HTTP header value for HTTP requests.
*/
export interface CourierUserAgent {
[SDK_KEY]: string;
[SDK_VERSION_KEY]: string;
[CLIENT_ID_KEY]: string;
}