import { SocketObservable, FilteredDataServerResult, MetadataDetail, RequestServerResult, DataserverParams, RequestParams, Datasource } from '@genesislcap/foundation-comms'; import { PagingMode } from './datasource.types'; /** * Type definition for configuration options used for streams. * @remarks * Used by {@link @genesislcap/grid-pro#GridProServerSideDatasource} constructor to configure options for the stream. * @alpha */ export type ServerSideDatasourceOptions = { createDataserverStreamFunc?: (existingParams?: any) => Promise>; createReqRepRequestFunc?: (existingParams?: any) => Promise; /** * Function to create a polling stream for REQUEST_SERVER resources. * @remarks Returns both the stream and the datasource instance for proper lifecycle management. */ createReqRepStreamFunc?: (params?: any) => Promise<{ stream: SocketObservable; datasource: Datasource; }>; /** * Callback function invoked when a polling update is received. * @remarks Used by REQUEST_SERVER resources to apply updates via applyServerSideTransaction. */ onPollingUpdateFunc?: (result: RequestServerResult) => void; /** * Callback function to reset the previous poll result comparison state. * @remarks Called when the polling stream is destroyed or recreated with new parameters. */ resetPreviousPollResultFunc?: () => void; reloadResourceDataFunc?: (params: any) => Promise; errorHandlerFunc?: (message: string, type: string) => void; /** Called when a server-side load finishes with zero rows. */ onNoDataAvailableFunc?: () => void; /** Called when a server-side load finishes with one or more rows. */ onDataAvailableFunc?: () => void; resourceName: string; resourceParams?: DataserverParams | RequestParams; resourceIndexes?: Map; resourceColDefs?: MetadataDetail[]; maxRows?: number; maxView?: number; rowId?: string; pagination?: boolean; zeroBasedViewNumber?: boolean; pagingMode?: PagingMode | undefined; criteriaOnlyRequest?: boolean; usePolling?: boolean; }; /** * Base datasource error event names. * @public */ export declare const baseDatasourceEventNames: { readonly error: "base-datasource-error"; readonly connected: "base-datasource-connected"; }; /** * Base datasource error event detail. * @public */ export type BaseDatasourceErrorEventDetail = { message: string; type: 'connection' | 'resource-validation' | 'resource-type' | 'metadata' | 'stream' | 'criteria' | 'unknown'; }; /** * Base datasource error event. * @public */ export type BaseDatasourceErrorEvent = CustomEvent; //# sourceMappingURL=base.types.d.ts.map