/** * FE debounce mechanism to avoid spamming invites when users consecutively * link and unlink teams from containers in quick succession. We'll log the * frequency of this occurring and decide whether to move debouncing to the * BE as a productionisation task. * * Uses module-level state rather than a globalThis singleton to avoid polluting * the global scope — a simple in-memory workaround is sufficient here. */ export declare const spaceInviteScheduler: { scheduleInvite: (teamId: string, containerId: string, callback: () => void) => void; cancelInvite: (teamId: string, containerId: string) => boolean; /** * Immediately fires all pending callbacks and clears the queue. * Called automatically on page unload (visibilitychange / beforeunload) * so that debounced invites are not lost when the user navigates away. * * Important: callbacks invoked during page teardown must use * `fetch({ keepalive: true })` or `navigator.sendBeacon` — a regular * `fetch` without `keepalive` may be cancelled by the browser. */ flushAll: () => void; };