/** @packageDocumentation * @module RPC */ import { IDisposable } from "@bentley/bentleyjs-core"; import { IModelRpcProps } from "@bentley/imodeljs-common"; import { DescriptorJSON } from "./content/Descriptor"; import { ItemJSON } from "./content/Item"; import { DisplayValueGroupJSON } from "./content/Value"; import { InstanceKeyJSON } from "./EC"; import { ElementProperties } from "./ElementProperties"; import { NodeKeyJSON } from "./hierarchy/Key"; import { NodeJSON } from "./hierarchy/Node"; import { NodePathElementJSON } from "./hierarchy/NodePathElement"; import { KeySetJSON } from "./KeySet"; import { LabelDefinitionJSON } from "./LabelDefinition"; import { ComputeSelectionRequestOptions, ContentDescriptorRequestOptions, DisplayLabelRequestOptions, DisplayLabelsRequestOptions, DistinctValuesRequestOptions, ElementPropertiesRequestOptions, ExtendedContentRequestOptions, ExtendedHierarchyRequestOptions, HierarchyCompareOptions, Paged, RequestOptions, SelectionScopeRequestOptions } from "./PresentationManagerOptions"; import { PresentationRpcRequestOptions, PresentationRpcResponse } from "./PresentationRpcInterface"; import { RulesetVariableJSON } from "./RulesetVariables"; import { SelectionScope } from "./selection/SelectionScope"; import { HierarchyCompareInfoJSON, PartialHierarchyModificationJSON } from "./Update"; import { PagedResponse } from "./Utils"; /** * Configuration parameters for [[RpcRequestsHandler]]. * * @internal */ export interface RpcRequestsHandlerProps { /** * Optional ID used to identify client that requests data. If not specified, * the handler creates a unique GUID as a client id. * @internal */ clientId?: string; } /** * RPC requests handler that wraps [[PresentationRpcInterface]] and * adds handling for cases when backend needs to be synced with client * state. * * @internal */ export declare class RpcRequestsHandler implements IDisposable { private _maxRequestRepeatCount; /** ID that identifies this handler as a client */ readonly clientId: string; constructor(props?: RpcRequestsHandlerProps); dispose(): void; private get rpcClient(); private requestRepeatedly; /** * Send the request to backend. * * If the backend responds with [[PresentationStatus.BackendTimeout]] or there's an RPC-related error, * the request is repeated up to `this._maxRequestRepeatCount` times. If we fail to get a valid success or error * response from the backend, throw the last encountered error. * * @internal */ request, TArg = any>(func: (token: IModelRpcProps, options: PresentationRpcRequestOptions, ...args: TArg[]) => PresentationRpcResponse, options: TOptions, ...additionalOptions: TArg[]): Promise; getNodesCount(options: ExtendedHierarchyRequestOptions): Promise; getPagedNodes(options: Paged>): Promise>; getNodePaths(options: ExtendedHierarchyRequestOptions, paths: InstanceKeyJSON[][], markedIndex: number): Promise; getFilteredNodePaths(options: ExtendedHierarchyRequestOptions, filterText: string): Promise; getContentDescriptor(options: ContentDescriptorRequestOptions): Promise; getContentSetSize(options: ExtendedContentRequestOptions): Promise; getPagedContent(options: Paged>): Promise<{ descriptor: DescriptorJSON; contentSet: PagedResponse; } | undefined>; getPagedContentSet(options: Paged>): Promise>; getPagedDistinctValues(options: DistinctValuesRequestOptions): Promise>; getElementProperties(options: ElementPropertiesRequestOptions): Promise; getDisplayLabelDefinition(options: DisplayLabelRequestOptions): Promise; getPagedDisplayLabelDefinitions(options: DisplayLabelsRequestOptions): Promise>; getSelectionScopes(options: SelectionScopeRequestOptions): Promise; computeSelection(options: ComputeSelectionRequestOptions): Promise; compareHierarchies(options: HierarchyCompareOptions): Promise; compareHierarchiesPaged(options: HierarchyCompareOptions): Promise; } //# sourceMappingURL=RpcRequestsHandler.d.ts.map