@devgateway/dvz-ui-react
Version:
A modular, embeddable React component library for data visualization and UI, built with TypeScript. Provides reusable components for charts, maps, dashboards, and more, with built-in support for internationalization and Redux integration.
25 lines (24 loc) • 960 B
TypeScript
/**
* Utility functions for managing internal traffic detection via first-party cookies
*/
/**
* Set a first-party cookie to mark this session as internal traffic
* @param enable - Whether to enable (true) or disable (false) internal traffic tracking
*/
export declare const setInternalTrafficCookie: (enable: boolean) => void;
/**
* Check if internal traffic cookie is enabled
* @returns true if the internal traffic cookie is set to '1', false otherwise
*/
export declare const isInternalTrafficEnabled: () => boolean;
/**
* Clear the internal traffic cookie
*/
export declare const clearInternalTrafficCookie: () => void;
/**
* Validate the token against the expected value
* @param providedToken - The token from query params
* @param expectedToken - The expected token from environment
* @returns true if tokens match, false otherwise
*/
export declare const validateToken: (providedToken: string | null, expectedToken: string) => boolean;