import { CcStream } from '../../../../lib/stream/cc-stream.js'; import type { CcStreamConfig, CcStreamRequestFactory } from '../../../../lib/stream/cc-stream.types.js'; import type { CcRequestParams } from '../../../../types/request.types.js'; import { CcApiStreamCommand } from '../../lib/cc-api-command.js'; import type { IdResolve } from '../../types/resource-id-resolver.types.js'; import type { RequestLocation, StreamRequestsCommandInput } from './stream-requests-command.types.js'; /** * Streams live request locations for an owner, optionally restricted to a single application. * Each emitted batch aggregates the incoming requests by geographic cell over a five-second window. Requests * whose source IP address could not be geolocated are dropped, so a batch can come back empty. * * @endpoint [GET] /v4/stats/organisations/:XXX/requests-live * @group Metrics * @version 4 */ export declare class StreamRequestsCommand extends CcApiStreamCommand { toRequestParams(params: StreamRequestsCommandInput): Partial; createStream(requestFactory: CcStreamRequestFactory, config: CcStreamConfig): RequestsStream; getIdsToResolve(): IdResolve; } /** * SSE stream of live request locations aggregated by geographic cell. */ export declare class RequestsStream extends CcStream { /** * Registers a callback invoked with each batch of aggregated request locations. * * @param callback The function which handles a batch of request locations */ onRequests(callback: (locations: Array) => void): this; } //# sourceMappingURL=stream-requests-command.d.ts.map