@itwin/core-common
Version:
iTwin.js components common to frontend and backend
55 lines • 3.59 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;
};
import { RpcInterface } from "../RpcInterface";
import { RpcManager } from "../RpcManager";
import { RpcOperation } from "./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.
*/
export class SnapshotIModelRpcInterface extends RpcInterface {
/** Returns the SnapshotIModelRpcInterface client instance for the frontend. */
static getClient() { return RpcManager.getClientForInterface(SnapshotIModelRpcInterface); }
/** Returns the SnapshotIModelRpcInterface client instance for a custom RPC routing configuration. */
static getClientForRouting(token) { return 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); }
}
__decorate([
RpcOperation.setRoutingProps(unknownIModelId)
], SnapshotIModelRpcInterface.prototype, "openFile", null);
__decorate([
RpcOperation.setRoutingProps(unknownIModelId)
], SnapshotIModelRpcInterface.prototype, "openRemote", null);
//# sourceMappingURL=SnapshotIModelRpcInterface.js.map