@agentman/chat-widget
Version:
Agentman Chat Widget for easy integration with web applications
20 lines (19 loc) • 639 B
TypeScript
/**
* Simple ID generator to replace uuid dependency
* Generates unique IDs using crypto.randomUUID when available,
* falls back to timestamp + random string
*/
/**
* Generate a unique ID
* Uses crypto.randomUUID if available, otherwise generates a unique string
*/
export declare function generateId(): string;
/**
* Generate a shorter ID for cases where full UUID isn't needed
* Useful for temporary IDs or when storage space is a concern
*/
export declare function generateShortId(): string;
/**
* Check if a string is a valid ID (either UUID or our custom format)
*/
export declare function isValidId(id: string): boolean;