src/api/api.ts
export interface Config {
src/api/storage.ts
export interface StorageAdapter {
getItem(key: string): string | null
setItem(key: string, value: string): void
removeItem(key: string): void
src/api/storage.ts
export class InMemoryStorage implements StorageAdapter {
private store = new Map<string, string>()
return this.store.has(key) ? this.store.get(key)! : null
setItem(key: string, value: string) {
this.store.set(key, value)
removeItem(key: string) {
src/api/storage.ts
export class SessionStorageAdapter implements StorageAdapter {
if (typeof window === 'undefined' || !window.sessionStorage) return null
return window.sessionStorage.getItem(key)
setItem(key: string, value: string) {
if (typeof window === 'undefined' || !window.sessionStorage) return
window.sessionStorage.setItem(key, value)
removeItem(key: string) {
if (typeof window === 'undefined' || !window.sessionStorage) return
window.sessionStorage.removeItem(key)
src/api/storage.ts
export function createDefaultStorage(): StorageAdapter
src/api/websocket.ts
export interface WebSocketMessage {
src/api/websocket.ts
export type WebSocketEventHandler = (message: WebSocketMessage) => void
src/hooks/useMixIdSession.ts
export interface Session {
src/hooks/useMixIdSession.ts
export interface UseMixIdSessionOptions {
onSessionDeleted?: () => void
onSessionExpired?: () => void
onSessionInvalid?: () => void
heartbeatInterval?: number
checkSessionOnMount?: boolean
src/hooks/useMixIdSession.ts
export function useMixIdSession(options: UseMixIdSessionOptions = {})
src/hooks/useMixIdStatus.ts
export type MixIdSyncStatus = 'connected-ws' | 'connected-rest' | 'disconnected' | 'checking'
src/hooks/useMixIdStatus.ts
export interface UseMixIdStatusReturn {
syncStatus: MixIdSyncStatus
src/hooks/useMixIdStatus.ts
export function useMixIdStatus(): UseMixIdStatusReturn
src/hooks/useMixIdSync.ts
export interface UseMixIdSyncOptions {
onSettingsUpdate?: (settings: any) => void
onDataUpdate?: (dataType: string, data: Record<string, any>) => void
getLocalSettings?: () => any
getLocalData?: (dataType: string) => Promise<Record<string, any>>
saveLocalSettings?: (settings: any) => void | Promise<void>
saveLocalData?: (dataType: string, data: Record<string, any>) => void | Promise<void>
mergeStrategy?: 'remote-wins' | 'local-wins' | 'newer-wins'
src/hooks/useMixIdSync.ts
export function useMixIdSync(options: UseMixIdSyncOptions = {})
src/hooks/useNotifications.ts
export interface Notification {
src/hooks/useNotifications.ts
export function useNotifications()