UNPKG

@itwin/core-common

Version:

iTwin.js components common to frontend and backend

126 lines 8.54 kB
"use strict"; /*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ /** @packageDocumentation * @module RpcInterface */ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.IModelReadRpcInterface = exports.IModelNotFoundResponse = void 0; const RpcInterface_1 = require("../RpcInterface"); const RpcManager_1 = require("../RpcManager"); const RpcConstants_1 = require("./core/RpcConstants"); const RpcControl_1 = require("./core/RpcControl"); const RpcOperation_1 = require("./core/RpcOperation"); /** Response if the IModelDb was not found at the backend * (if the service has moved) * @public */ class IModelNotFoundResponse extends RpcControl_1.RpcNotFoundResponse { isIModelNotFoundResponse = true; message = "iModel not found"; } exports.IModelNotFoundResponse = IModelNotFoundResponse; /** 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 */ class IModelReadRpcInterface extends RpcInterface_1.RpcInterface { /** Returns the IModelReadRpcInterface instance for the frontend. */ static getClient() { return RpcManager_1.RpcManager.getClientForInterface(IModelReadRpcInterface); } /** Returns the IModelReadRpcInterface instance for a custom RPC routing configuration. */ static getClientForRouting(token) { return RpcManager_1.RpcManager.getClientForInterface(IModelReadRpcInterface, token); } /** The immutable name of the interface. */ static interfaceName = "IModelReadRpcInterface"; /** The semantic version of the interface. */ static interfaceVersion = "3.7.0"; /*=========================================================================================== NOTE: Any add/remove/change to the methods below requires an update of the interface version. NOTE: Please consult the README in this folder for the semantic versioning rules. ===========================================================================================*/ async getConnectionProps(_iModelToken) { return this.forward(arguments); } async queryRows(_iModelToken, _request) { return this.forward(arguments); } async querySubCategories(_iModelToken, _categoryIds) { return this.forward(arguments); } async queryAllUsedSpatialSubCategories(_iModelToken) { return this.forward(arguments); } async queryBlob(_iModelToken, _request) { return this.forward(arguments); } async getModelProps(_iModelToken, _modelIds) { return this.forward(arguments); } async queryModelRanges(_iModelToken, _modelIds) { return this.forward(arguments); } async queryModelExtents(_iModelToken, _modelIds) { return this.forward(arguments); } async queryModelProps(_iModelToken, _params) { return this.forward(arguments); } async getElementProps(_iModelToken, _elementIds) { return this.forward(arguments); } async queryElementProps(_iModelToken, _params) { return this.forward(arguments); } async queryEntityIds(_iModelToken, _params) { return this.forward(arguments); } async getClassHierarchy(_iModelToken, _startClassName) { return this.forward(arguments); } async getAllCodeSpecs(_iModelToken) { return this.forward(arguments); } async getViewStateData(_iModelToken, _viewDefinitionId, _options) { return this.forward(arguments); } async readFontJson(_iModelToken) { return this.forward(arguments); } // eslint-disable-line @typescript-eslint/no-deprecated async getToolTipMessage(_iModelToken, _elementId) { return this.forward(arguments); } /** @deprecated in 3.3.0 - might be removed in next major version. Use ViewStore apis. */ async getViewThumbnail(_iModelToken, _viewId) { return this.forward(arguments); } async getDefaultViewId(_iModelToken) { return this.forward(arguments); } async getCustomViewState3dData(_iModelToken, _options) { return this.forward(arguments); } async hydrateViewState(_iModelToken, _options) { return this.forward(arguments); } async requestSnap(_iModelToken, _sessionId, _props) { return this.forward(arguments); } async cancelSnap(_iModelToken, _sessionId) { return this.forward(arguments); } async getGeometryContainment(_iModelToken, _props) { return this.forward(arguments); } async getMassProperties(_iModelToken, _props) { return this.forward(arguments); } async getMassPropertiesPerCandidate(_iModelToken, _props) { return this.forward(arguments); } // eslint-disable-line @typescript-eslint/no-deprecated async getIModelCoordinatesFromGeoCoordinates(_iModelToken, _props) { return this.forward(arguments); } async getGeoCoordinatesFromIModelCoordinates(_iModelToken, _props) { return this.forward(arguments); } async getGeometrySummary(_iModelToken, _props) { return this.forward(arguments); } async queryTextureData(_iModelToken, _textureLoadProps) { return this.forward(arguments); } async loadElementProps(_iModelToken, _elementIdentifier, _options) { return this.forward(arguments); } async generateElementMeshes(_iModelToken, _props) { return this.forward(arguments); } /** @internal */ async callViewStore(_iModelToken, _version, _forWrite, _methodName, ..._args) { return this.forward(arguments); } } exports.IModelReadRpcInterface = IModelReadRpcInterface; __decorate([ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable) ], IModelReadRpcInterface.prototype, "getConnectionProps", null); __decorate([ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable) ], IModelReadRpcInterface.prototype, "querySubCategories", null); __decorate([ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable) ], IModelReadRpcInterface.prototype, "queryAllUsedSpatialSubCategories", null); __decorate([ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable) ], IModelReadRpcInterface.prototype, "getModelProps", null); __decorate([ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable) ], IModelReadRpcInterface.prototype, "queryModelRanges", null); __decorate([ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable) ], IModelReadRpcInterface.prototype, "queryModelExtents", null); __decorate([ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable) ], IModelReadRpcInterface.prototype, "getClassHierarchy", null); __decorate([ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable) ], IModelReadRpcInterface.prototype, "getViewStateData", null); __decorate([ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable) ], IModelReadRpcInterface.prototype, "getDefaultViewId", null); __decorate([ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable) ], IModelReadRpcInterface.prototype, "getCustomViewState3dData", null); __decorate([ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable) ], IModelReadRpcInterface.prototype, "hydrateViewState", null); __decorate([ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable) ], IModelReadRpcInterface.prototype, "getGeoCoordinatesFromIModelCoordinates", null); //# sourceMappingURL=IModelReadRpcInterface.js.map