UNPKG

@itwin/core-common

Version:

iTwin.js components common to frontend and backend

103 lines 7.98 kB
/** @packageDocumentation * @module RpcInterface */ import { CompressedId64Set, GuidString, Id64String, IModelStatus } from "@itwin/core-bentley"; import { Range3dProps } from "@itwin/core-geometry"; import { CodeProps } from "../Code"; import { DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse } from "../ConcurrentQuery"; import { ElementMeshRequestProps } from "../ElementMesh"; import { ElementLoadOptions, ElementProps } from "../ElementProps"; import { EntityQueryParams } from "../EntityProps"; import { FontMapProps } from "../Fonts"; import { GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, IModelCoordinatesRequestProps, IModelCoordinatesResponseProps } from "../GeoCoordinateServices"; import { GeometryContainmentRequestProps, GeometryContainmentResponseProps } from "../GeometryContainment"; import { GeometrySummaryRequestProps } from "../GeometrySummary"; import { IModelConnectionProps, IModelRpcOpenProps, IModelRpcProps } from "../IModel"; import { MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps } from "../MassProperties"; import { ModelProps } from "../ModelProps"; import { RpcInterface } from "../RpcInterface"; import { SnapRequestProps, SnapResponseProps } from "../internal/Snapping"; import { TextureData, TextureLoadProps } from "../TextureProps"; import { CustomViewState3dCreatorOptions, CustomViewState3dProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, SubCategoryResultRow, ViewStateLoadProps, ViewStateProps } from "../ViewProps"; import { RpcNotFoundResponse } from "./core/RpcControl"; import { RpcRoutingToken } from "./core/RpcRoutingToken"; /** Response if the IModelDb was not found at the backend * (if the service has moved) * @public */ export declare class IModelNotFoundResponse extends RpcNotFoundResponse { isIModelNotFoundResponse: boolean; message: string; } /** Describes the volume of geometry contained with a [GeometricModel]($backend) as returned by * [IModelConnection.Models.queryExtents]($frontend) and [IModelDb.Models.queryExtents]($backend). * @public */ export interface ModelExtentsProps { /** The Id of the model, or [Id64.invalid]($bentley) if the input model Id was not a well-formed [Id64String]($bentley). */ id: Id64String; /** The volume of geometry contained within the model. * This range will be null (@see [Range3d.isNull]($geometry)) if [[status]] is not [IModelStatus.Success]($bentley) or the model contains no geometry. */ extents: Range3dProps; /** A status code indicating what if any error occurred obtaining the model's extents. For example: * - [IModelStatus.InvalidId]($bentley) if the input model Id was not a well-formed [Id64String]($bentley); * - [IModelStatus.NotFound]($bentley) if no model with the specified Id exists in the [[IModel]]; * - [IModelStatus.WrongModel]($bentley) if the specified model is not a [GeometricModel]($backend); or * - [IModelStatus.Success]($bentley) if the extents were successfully obtained. * * If `status` is anything other than [IModelStatus.Success]($bentley), [[extents]] will be a null range. */ status: IModelStatus; } /** The RPC interface for reading from an iModel. * All operations only require read-only access. * This interface is not normally used directly. See IModelConnection for higher-level and more convenient API for accessing iModels from a frontend. * @internal */ export declare abstract class IModelReadRpcInterface extends RpcInterface { /** Returns the IModelReadRpcInterface instance for the frontend. */ static getClient(): IModelReadRpcInterface; /** Returns the IModelReadRpcInterface instance for a custom RPC routing configuration. */ static getClientForRouting(token: RpcRoutingToken): IModelReadRpcInterface; /** The immutable name of the interface. */ static readonly interfaceName = "IModelReadRpcInterface"; /** The semantic version of the interface. */ static interfaceVersion: string; getConnectionProps(_iModelToken: IModelRpcOpenProps): Promise<IModelConnectionProps>; queryRows(_iModelToken: IModelRpcProps, _request: DbQueryRequest): Promise<DbQueryResponse>; querySubCategories(_iModelToken: IModelRpcProps, _categoryIds: CompressedId64Set): Promise<SubCategoryResultRow[]>; queryAllUsedSpatialSubCategories(_iModelToken: IModelRpcProps): Promise<SubCategoryResultRow[]>; queryBlob(_iModelToken: IModelRpcProps, _request: DbBlobRequest): Promise<DbBlobResponse>; getModelProps(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<ModelProps[]>; queryModelRanges(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<Range3dProps[]>; queryModelExtents(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<ModelExtentsProps[]>; queryModelProps(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<ModelProps[]>; getElementProps(_iModelToken: IModelRpcProps, _elementIds: Id64String[]): Promise<ElementProps[]>; queryElementProps(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<ElementProps[]>; queryEntityIds(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<Id64String[]>; getClassHierarchy(_iModelToken: IModelRpcProps, _startClassName: string): Promise<string[]>; getAllCodeSpecs(_iModelToken: IModelRpcProps): Promise<any[]>; getViewStateData(_iModelToken: IModelRpcProps, _viewDefinitionId: string, _options?: ViewStateLoadProps): Promise<ViewStateProps>; readFontJson(_iModelToken: IModelRpcProps): Promise<FontMapProps>; getToolTipMessage(_iModelToken: IModelRpcProps, _elementId: string): Promise<string[]>; /** @deprecated in 3.3.0 - might be removed in next major version. Use ViewStore apis. */ getViewThumbnail(_iModelToken: IModelRpcProps, _viewId: string): Promise<Uint8Array>; getDefaultViewId(_iModelToken: IModelRpcProps): Promise<Id64String>; getCustomViewState3dData(_iModelToken: IModelRpcProps, _options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps>; hydrateViewState(_iModelToken: IModelRpcProps, _options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps>; requestSnap(_iModelToken: IModelRpcProps, _sessionId: string, _props: SnapRequestProps): Promise<SnapResponseProps>; cancelSnap(_iModelToken: IModelRpcProps, _sessionId: string): Promise<void>; getGeometryContainment(_iModelToken: IModelRpcProps, _props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps>; getMassProperties(_iModelToken: IModelRpcProps, _props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps>; getMassPropertiesPerCandidate(_iModelToken: IModelRpcProps, _props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]>; getIModelCoordinatesFromGeoCoordinates(_iModelToken: IModelRpcProps, _props: IModelCoordinatesRequestProps): Promise<IModelCoordinatesResponseProps>; getGeoCoordinatesFromIModelCoordinates(_iModelToken: IModelRpcProps, _props: GeoCoordinatesRequestProps): Promise<GeoCoordinatesResponseProps>; getGeometrySummary(_iModelToken: IModelRpcProps, _props: GeometrySummaryRequestProps): Promise<string>; queryTextureData(_iModelToken: IModelRpcProps, _textureLoadProps: TextureLoadProps): Promise<TextureData | undefined>; loadElementProps(_iModelToken: IModelRpcProps, _elementIdentifier: Id64String | GuidString | CodeProps, _options?: ElementLoadOptions): Promise<ElementProps | undefined>; generateElementMeshes(_iModelToken: IModelRpcProps, _props: ElementMeshRequestProps): Promise<Uint8Array>; /** @internal */ callViewStore(_iModelToken: IModelRpcProps, _version: string, _forWrite: boolean, _methodName: string, ..._args: any[]): Promise<any>; } //# sourceMappingURL=IModelReadRpcInterface.d.ts.map