import { IServerSideDatasource, IServerSideGetRowsParams } from '@ag-grid-community/core'; import { RequestServerResult, DatasourceOptions } from '@genesislcap/foundation-comms'; import { ServerSideDatasourceOptions } from './base.types'; import { BaseServerSideDatasource } from './server-side.resource-base'; /** * The REQUEST_SERVER IServerSideDatasource implementation, used for SSRM (Server-Side Row Model) in the grid. * @beta */ export declare class ReqRepServerSideDatasource extends BaseServerSideDatasource implements IServerSideDatasource { createReqRepRequestFunc: (existingParams?: any) => Promise; /** * Function to create a polling stream with a separate datasource instance. * @remarks Optional - only set when polling is enabled (!isSnapshot && !disablePolling). */ private createReqRepStreamFunc?; /** * The active polling stream observable. */ private reqRepPollingStream?; /** * Subscription to the polling stream. */ private reqRepPollingSubscription?; /** * Separate datasource instance used exclusively for polling. * @remarks Maintains its own lifecycle independent of the snapshot datasource. */ private reqRepPollingDatasource?; /** * Whether polling is enabled for this datasource. */ private usePolling; /** * Callback to apply polling updates at the parent datasource level. */ private onPollingUpdate?; /** * Callback to reset the previous poll comparison state. */ private resetPreviousPollResult?; /** * Current request parameters used for the active polling stream. * @remarks Used to detect if parameters changed (user scrolled away). */ private currentStreamParams?; /** * Debounced function for creating polling streams. * @remarks Prevents excessive stream recreation during rapid scrolling. */ private debouncedCreateStream; private discoveredTotalRowCount; private currentNextOffset; constructor(options: ServerSideDatasourceOptions); getRows(params: IServerSideGetRowsParams): Promise; /** * Update pagination params based on paging mode */ private updatePaginationParams; /** * Determine if this is the last view/page */ private determineIsLastView; /** * Schedules polling stream creation if enabled. * @remarks * Destroys any existing stream and schedules a new one after the user stops scrolling (debounced). * This prevents excessive stream recreation during rapid scrolling. */ private schedulePollingStream; private applyServerSideData; protected getCorrectRowCount(params: IServerSideGetRowsParams): number; private handleCurrentStreamLoad; /** * Req-rep specific sorting setup that allows any column to be sorted * (unlike dataserver which requires indexed columns only) */ protected setupSorting(params: IServerSideGetRowsParams): Promise; refreshDatasource(params: DatasourceOptions): Promise; destroy(): Promise; /** * Creates a polling stream for the currently loaded data. * @remarks * This method creates a separate datasource instance that polls all currently loaded rows * (from offset 0 to current offset + maxRows). The polling results are sent to the parent * datasource via the `onPollingUpdate` callback for change detection and grid updates. * * The stream will only apply updates if the request params haven't changed (user hasn't * scrolled away or changed filters/sorting). * @param requestParams - The request parameters for the current view */ private createPollingStream; /** * Destroys the current polling stream and associated datasource. * @remarks * Cleans up the polling subscription, destroys the separate polling datasource instance, * and resets the previous poll comparison state. Called when: * - User scrolls to a new page * - Filters or sorting changes * - The datasource is being destroyed */ private destroyPollingStream; private buildRequestDetails; } //# sourceMappingURL=server-side.resource-reqrep.d.ts.map