claritykit-svelte
Version:
A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility
36 lines • 1.21 kB
TypeScript
import type { EventPayload } from '../types';
/**
* Creates an event capture for staging.captures table
* This implements the event sourcing pattern for database operations
*/
export declare function createEventCapture(event: EventPayload): Promise<void>;
/**
* Batch create multiple event captures
*/
export declare function createBatchEventCapture(events: EventPayload[]): Promise<void>;
/**
* Get failed events from localStorage
*/
export declare function getFailedEvents(): any[];
/**
* Retry failed events
*/
export declare function retryFailedEvents(): Promise<void>;
/**
* Clear all failed events
*/
export declare function clearFailedEvents(): void;
/**
* Subscribe to real-time event updates via SSE
*/
export declare function subscribeToEvents(entityType: string, entityId: string, callback: (event: any) => void): EventSource;
/**
* Create an optimistic update event
* Used for immediate UI updates before server confirmation
*/
export declare function createOptimisticEvent(event: EventPayload): EventPayload;
/**
* Validate event payload before sending
*/
export declare function validateEventPayload(event: EventPayload): boolean;
//# sourceMappingURL=event-capture.d.ts.map