@itwin/core-common
Version:
iTwin.js components common to frontend and backend
59 lines • 3.85 kB
JavaScript
;
/*---------------------------------------------------------------------------------------------
* 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.SnapshotIModelRpcInterface = void 0;
const RpcInterface_1 = require("../RpcInterface");
const RpcManager_1 = require("../RpcManager");
const RpcOperation_1 = require("./core/RpcOperation");
const unknownIModelId = (req) => ({ iModelId: "undefined", key: req.parameters[0] });
/** The RPC interface for working with *snapshot* iModels.
* This interface is intended for desktop and mobile products. Web products are discouraged from registering this interface.
* @internal
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Check [[IpcAppFunctions]] or [[CheckpointConnection]] for replacements.
*/
class SnapshotIModelRpcInterface extends RpcInterface_1.RpcInterface {
/** Returns the SnapshotIModelRpcInterface client instance for the frontend. */
static getClient() { return RpcManager_1.RpcManager.getClientForInterface(SnapshotIModelRpcInterface); }
/** Returns the SnapshotIModelRpcInterface client instance for a custom RPC routing configuration. */
static getClientForRouting(token) { return RpcManager_1.RpcManager.getClientForInterface(SnapshotIModelRpcInterface, token); }
/** The immutable name of the interface. */
static interfaceName = "SnapshotIModelRpcInterface";
/** The version of the interface. */
static interfaceVersion = "2.0.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.
===========================================================================================*/
/**
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[IpcAppFunctions.openSnapshot]] in IPC applications, no replacement for Web applications.
*/
async openFile(_filePath, _opts) { return this.forward(arguments); }
/**
* @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [[CheckpointConnection.openRemote]].
*/
async openRemote(_key, _opts) { return this.forward(arguments); }
/**
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[IpcAppFunctions.closeIModel]] in IPC applications, no replacement for Web applications.
*/
async close(_iModelRpcProps) { return this.forward(arguments); }
}
exports.SnapshotIModelRpcInterface = SnapshotIModelRpcInterface;
__decorate([
RpcOperation_1.RpcOperation.setRoutingProps(unknownIModelId)
], SnapshotIModelRpcInterface.prototype, "openFile", null);
__decorate([
RpcOperation_1.RpcOperation.setRoutingProps(unknownIModelId)
], SnapshotIModelRpcInterface.prototype, "openRemote", null);
//# sourceMappingURL=SnapshotIModelRpcInterface.js.map