/** @packageDocumentation * @module RPC */ import { Id64String } from "@itwin/core-bentley"; import { IModelRpcProps, RpcInterface } from "@itwin/core-common"; import { DescriptorJSON, DescriptorOverrides, SelectClassInfoJSON } from "./content/Descriptor.js"; import { ItemJSON } from "./content/Item.js"; import { DisplayValueGroup } from "./content/Value.js"; import { ClientDiagnostics, ClientDiagnosticsOptions } from "./Diagnostics.js"; import { CompressedClassInfoJSON, InstanceKey } from "./EC.js"; import { ElementProperties } from "./ElementProperties.js"; import { PresentationStatus } from "./Error.js"; import { NodeKey } from "./hierarchy/Key.js"; import { Node } from "./hierarchy/Node.js"; import { NodePathElement } from "./hierarchy/NodePathElement.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, SelectionScopeRequestOptions, SingleElementPropertiesRequestOptions } from "./PresentationManagerOptions.js"; import { RulesetVariableJSON } from "./RulesetVariables.js"; import { SelectionScope } from "./selection/SelectionScope.js"; import { Omit, PagedResponse } from "./Utils.js"; /** * Base options for all presentation RPC requests. * @public */ export type PresentationRpcRequestOptions = Omit & { /** @internal ID of the client requesting data */ clientId?: string; /** RPC request diagnostics options. */ diagnostics?: RpcDiagnosticsOptions; }; /** * Data structure for presentation RPC responses * @public */ export interface PresentationRpcResponseData { /** Response status code */ statusCode: PresentationStatus; /** In case of an error response, the error message */ errorMessage?: string; /** In case of a success response, the result */ result?: TResult; /** Diagnostics response. */ diagnostics?: ClientDiagnostics; } /** * Data structure for RPC diagnostics options. * @public */ export type RpcDiagnosticsOptions = Omit; /** * A promise of [[PresentationRpcResponseData]]. * @public */ export type PresentationRpcResponse = Promise>; /** * Data structure for hierarchy request options. * @public * @deprecated in 5.2 - might be removed in next major version. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md) * package for creating hierarchies. */ export type HierarchyRpcRequestOptions = PresentationRpcRequestOptions>; /** * Data structure for hierarchy level descriptor RPC request options. * @public * @deprecated in 5.2 - might be removed in next major version. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md) * package for creating hierarchies. */ export type HierarchyLevelDescriptorRpcRequestOptions = PresentationRpcRequestOptions>; /** * Data structure for filtering hierarchy by ECInstance paths request options. * @public * @deprecated in 5.2 - might be removed in next major version. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md) * package for creating hierarchies. */ export type FilterByInstancePathsHierarchyRpcRequestOptions = PresentationRpcRequestOptions>; /** * Data structure for filtering hierarchy by text request options. * @public * @deprecated in 5.2 - might be removed in next major version. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md) * package for creating hierarchies. */ export type FilterByTextHierarchyRpcRequestOptions = PresentationRpcRequestOptions>; /** * Data structure for content sources RPC request options. * @public */ export type ContentSourcesRpcRequestOptions = PresentationRpcRequestOptions>; /** * Data structure for content sources RPC response. * @public */ export interface ContentSourcesRpcResult { /** A list of objects containing content source information. */ sources: SelectClassInfoJSON[]; /** An `ECClassId` => [[CompressedClassInfoJSON]] map for deserializing [[sources]]. */ classesMap: { [id: string]: CompressedClassInfoJSON; }; } /** * Data structure for content descriptor RPC request options. * @public */ export type ContentDescriptorRpcRequestOptions = PresentationRpcRequestOptions>; /** * Data structure for content RPC request options. * @public */ export type ContentRpcRequestOptions = PresentationRpcRequestOptions>; /** * Data structure for single element properties RPC request options. * @public */ export type SingleElementPropertiesRpcRequestOptions = PresentationRpcRequestOptions, "contentParser">>; /** * Data structure for distinct values' request options. * @public */ export type DistinctValuesRpcRequestOptions = PresentationRpcRequestOptions>; /** * Data structure for content instance keys' request options. * @public */ export type ContentInstanceKeysRpcRequestOptions = PresentationRpcRequestOptions>; /** * Data structure for label request options. * @public */ export type DisplayLabelRpcRequestOptions = PresentationRpcRequestOptions>; /** * Data structure for labels request options. * @public */ export type DisplayLabelsRpcRequestOptions = PresentationRpcRequestOptions>; /** * Data structure for selection scope request options. * @public * @deprecated in 5.0 - might be removed in next major version. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead. */ export type SelectionScopeRpcRequestOptions = PresentationRpcRequestOptions>; /** * Request options data structure for computing selection based on given selection scope and element IDs. * @public * @deprecated in 5.0 - might be removed in next major version. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead. */ export type ComputeSelectionRpcRequestOptions = PresentationRpcRequestOptions>; /** * Interface used for communication between Presentation backend and frontend. * @public */ export declare class PresentationRpcInterface extends RpcInterface { /** The immutable name of the interface. */ static readonly interfaceName = "PresentationRpcInterface"; /** The semantic version of the interface. */ static interfaceVersion: string; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getNodesCount(_token: IModelRpcProps, _options: HierarchyRpcRequestOptions): PresentationRpcResponse; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getPagedNodes(_token: IModelRpcProps, _options: Paged): PresentationRpcResponse>; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getNodesDescriptor(_token: IModelRpcProps, _options: HierarchyLevelDescriptorRpcRequestOptions): PresentationRpcResponse; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getNodePaths(_token: IModelRpcProps, _options: FilterByInstancePathsHierarchyRpcRequestOptions): PresentationRpcResponse; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getFilteredNodePaths(_token: IModelRpcProps, _options: FilterByTextHierarchyRpcRequestOptions): PresentationRpcResponse; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getContentSources(_token: IModelRpcProps, _options: ContentSourcesRpcRequestOptions): PresentationRpcResponse; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getContentDescriptor(_token: IModelRpcProps, _options: ContentDescriptorRpcRequestOptions): PresentationRpcResponse; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getContentSetSize(_token: IModelRpcProps, _options: ContentRpcRequestOptions): PresentationRpcResponse; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getPagedContent(_token: IModelRpcProps, _options: Paged): PresentationRpcResponse<{ descriptor: DescriptorJSON; contentSet: PagedResponse; } | undefined>; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getPagedContentSet(_token: IModelRpcProps, _options: Paged): PresentationRpcResponse>; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getElementProperties(_token: IModelRpcProps, _options: SingleElementPropertiesRpcRequestOptions): PresentationRpcResponse; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getPagedDistinctValues(_token: IModelRpcProps, _options: DistinctValuesRpcRequestOptions): PresentationRpcResponse>; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getContentInstanceKeys(_token: IModelRpcProps, _options: ContentInstanceKeysRpcRequestOptions): PresentationRpcResponse<{ total: number; items: KeySetJSON; }>; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getDisplayLabelDefinition(_token: IModelRpcProps, _options: DisplayLabelRpcRequestOptions): PresentationRpcResponse; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getPagedDisplayLabelDefinitions(_token: IModelRpcProps, _options: DisplayLabelsRpcRequestOptions): PresentationRpcResponse>; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ getSelectionScopes(_token: IModelRpcProps, _options: SelectionScopeRpcRequestOptions): PresentationRpcResponse; /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */ computeSelection(_token: IModelRpcProps, _options: ComputeSelectionRpcRequestOptions): PresentationRpcResponse; } //# sourceMappingURL=PresentationRpcInterface.d.ts.map