FanfareSDK Client API
TheFanfareSDK interface is the main entry point for all SDK operations. It is returned by the init() function.
Interface Definition
Core Methods
restore()
Restores saved session and participation state from storage.RestoreResult containing session and active experiences
resume()
Resumes active operations (polling, watching) after restore.getActiveExperiences()
Returns lists of IDs for all active participations.on()
Subscribes to SDK events. Returns an unsubscribe function.destroy()
Cleans up the SDK instance. Should be called when the SDK is no longer needed.- Stops all queue polling
- Stops all auction watching
- Flushes pending beacon events
- Closes tab sync channels
- Removes all event listeners
Modules
auth
Authentication and session management.queues
Virtual waiting room operations.| Method | Description |
|---|---|
get(queueId) | Fetch queue details |
enter(queueId, metadata?) | Enter the queue |
leave(queueId) | Leave the queue |
status(queueId) | Get current status in queue |
startPolling(queueId, interval?) | Start polling for position updates |
stopPolling(queueId) | Stop polling |
isPolling(queueId) | Check if polling is active |
getActiveQueues() | Get all active queue participations |
draws
Lottery-style draw operations.auctions
Real-time auction operations.waitlists
Notification signup operations.timedReleases
Time-window based access operations.experiences
Journey orchestration operations.beacon
Client-side analytics tracking.Type Definitions
For complete type definitions, see:- Types Reference - All exported types
- Errors - Error types and codes