import type { QueueItem } from './queue'; import TransportQueue from './queue'; import type { Services, TransportOptions } from './types'; import type { ITransport } from './transport-base'; /** * Creates a wrapper around transport to provide auto-batching functionality. If you use the default of 0ms then this transport will join * together all calls that happen inside the current call stack and join them into a batch call. */ declare class TransportBatch extends TransportQueue { basePath: string; host: string; timeoutMs: number; services: Services; isQueueing: boolean; nextTickTimer: number | boolean; /** * @param transport - Instance of the transport class to wrap. * @param baseUrl - (optional) Base URL for batch requests. This should be an absolute URL. * @param options - (optional) Transport options */ constructor(transport: ITransport, baseUrl?: string | null, options?: TransportOptions | null); protected shouldQueue(item: QueueItem): boolean; private batchCallFailure; private batchCallSuccess; runBatches: () => void; private emptyQueueIntoServiceGroups; /** * Runs a batch call for a number of sub calls * * @param serviceGroup - serviceGroup * @param callList - call list */ private runBatchCall; protected addToQueue(item: QueueItem): void; } export default TransportBatch;