Skip to content

BatchScheduler

Defined in: batch-scheduler.ts:25

Coalesces service calls made within the same window (default: same microtask tick) into a single POST /batch request. Each caller’s promise settles independently from its own BatchResult entry. Queues longer than maxSize split into multiple requests instead of erroring client-side.

new BatchScheduler(rest, options?, refresh?): BatchScheduler

Defined in: batch-scheduler.ts:31

BatchRestDispatcher

number

number

() => Promise<boolean>

Token refresh — entries failing with a per-entry 401 are retried once after a successful refresh.

BatchScheduler

enqueue(call): Promise<unknown>

Defined in: batch-scheduler.ts:41

BatchCall

Promise<unknown>