/** @packageDocumentation * @module RPC */ import { IModelRpcProps } from "@itwin/core-common"; import { DescriptorJSON, DescriptorOverrides } from "./content/Descriptor.js"; import { ItemJSON } from "./content/Item.js"; import { ClientDiagnosticsAttribute } from "./Diagnostics.js"; import { InstanceKey } from "./EC.js"; import { NodeKey } from "./hierarchy/Key.js"; import { Node } from "./hierarchy/Node.js"; import { KeySetJSON } from "./KeySet.js"; import { LabelDefinition } from "./LabelDefinition.js"; import { ComputeSelectionRequestOptions, ContentDescriptorRequestOptions, ContentInstanceKeysRequestOptions, ContentRequestOptions, ContentSourcesRequestOptions, DisplayLabelRequestOptions, DisplayLabelsRequestOptions, DistinctValuesRequestOptions, FilterByInstancePathsHierarchyRequestOptions, FilterByTextHierarchyRequestOptions, HierarchyLevelDescriptorRequestOptions, HierarchyRequestOptions, Paged, RequestOptions, SelectionScopeRequestOptions } from "./PresentationManagerOptions.js"; import { ContentSourcesRpcResult, PresentationRpcRequestOptions, PresentationRpcResponse } from "./PresentationRpcInterface.js"; import { RulesetVariableJSON } from "./RulesetVariables.js"; import { SelectionScope } from "./selection/SelectionScope.js"; import { PagedResponse } from "./Utils.js"; import { NodePathElement } from "./hierarchy/NodePathElement.js"; import { DisplayValueGroup } from "./content/Value.js"; /** * 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; /** @internal */ timeout?: number; } /** * 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 { /** Timeout for how long the handler going to wait for RPC request to be fulfilled before throwing a timeout error. */ readonly timeout: number; /** ID that identifies this handler as a client */ readonly clientId: string; constructor(props?: RpcRequestsHandlerProps); private get rpcClient(); private requestWithTimeout; /** * Send the request to backend. We'll wait for the response for `this.timeout` ms, and if we don't get the response by * then, we'll throw an error. */ request & ClientDiagnosticsAttribute, TArg = any>(func: (token: IModelRpcProps, options: PresentationRpcRequestOptions, ...args: TArg[]) => PresentationRpcResponse, options: TOptions, ...additionalOptions: TArg[]): Promise; getNodesCount(options: HierarchyRequestOptions & ClientDiagnosticsAttribute): Promise; getPagedNodes(options: Paged> & ClientDiagnosticsAttribute): Promise>; getNodesDescriptor(options: HierarchyLevelDescriptorRequestOptions & ClientDiagnosticsAttribute): Promise; getNodePaths(options: FilterByInstancePathsHierarchyRequestOptions & ClientDiagnosticsAttribute): Promise; getFilteredNodePaths(options: FilterByTextHierarchyRequestOptions & ClientDiagnosticsAttribute): Promise; getContentSources(options: ContentSourcesRequestOptions & ClientDiagnosticsAttribute): Promise; getContentDescriptor(options: ContentDescriptorRequestOptions & ClientDiagnosticsAttribute): Promise; getContentSetSize(options: ContentRequestOptions & ClientDiagnosticsAttribute): Promise; getPagedContent(options: Paged & ClientDiagnosticsAttribute>): Promise<{ descriptor: DescriptorJSON; contentSet: PagedResponse; } | undefined>; getPagedContentSet(options: Paged & ClientDiagnosticsAttribute>): Promise>; getPagedDistinctValues(options: DistinctValuesRequestOptions & ClientDiagnosticsAttribute): Promise>; getContentInstanceKeys(options: ContentInstanceKeysRequestOptions & ClientDiagnosticsAttribute): Promise<{ total: number; items: KeySetJSON; }>; getDisplayLabelDefinition(options: DisplayLabelRequestOptions & ClientDiagnosticsAttribute): Promise; getPagedDisplayLabelDefinitions(options: DisplayLabelsRequestOptions & ClientDiagnosticsAttribute): Promise>; getSelectionScopes(options: SelectionScopeRequestOptions & ClientDiagnosticsAttribute): Promise; computeSelection(options: ComputeSelectionRequestOptions & ClientDiagnosticsAttribute): Promise; } //# sourceMappingURL=RpcRequestsHandler.d.ts.map