UNPKG

@itwin/core-backend

Version:
45 lines 2.16 kB
/** @packageDocumentation * @module RpcInterface */ import { AccessToken } from "@itwin/core-bentley"; import { BriefcaseProps, IModelConnectionProps, IModelRpcOpenProps, IModelRpcProps, RpcActivity, SyncMode } from "@itwin/core-common"; import { IModelDb } from "../IModelDb"; /** @internal */ export interface DownloadAndOpenArgs { activity: RpcActivity; tokenProps: IModelRpcOpenProps; syncMode: SyncMode; fileNameResolvers?: ((arg: BriefcaseProps) => string)[]; timeout?: number; forceDownload?: boolean; } /** * Utility to open the iModel for RPC interfaces * @internal */ export declare class RpcBriefcaseUtility { private static downloadAndOpen; private static _briefcasePromises; private static openBriefcase; /** find a previously opened iModel for RPC. * @param accessToken necessary (only) for V2 checkpoints to refresh access token in daemon if it has expired. We use the accessToken of the current RPC request * to refresh the daemon, even though it will be used for all authorized users. * @param the IModelRpcProps to locate the opened iModel. */ static findOpenIModel(accessToken: AccessToken, iModel: IModelRpcProps): Promise<IModelDb>; static open(args: DownloadAndOpenArgs & { syncMode: SyncMode.FixedVersion; }): Promise<IModelDb>; /** * @deprecated in 4.4.0 - will not be removed until after 2026-06-13. Only `SyncMode.FixedVersion` should be used in RPC backends */ static open(args: DownloadAndOpenArgs & { syncMode: Exclude<SyncMode, "FixedVersion">; }): Promise<IModelDb>; static openWithTimeout(activity: RpcActivity, tokenProps: IModelRpcOpenProps, syncMode: SyncMode.FixedVersion, timeout?: number): Promise<IModelConnectionProps>; /** * @deprecated in 4.4.0 - will not be removed until after 2026-06-13. Only `SyncMode.FixedVersion` should be used in RPC backends */ static openWithTimeout(activity: RpcActivity, tokenProps: IModelRpcOpenProps, syncMode: Exclude<SyncMode, "FixedVersion">, timeout?: number): Promise<IModelConnectionProps>; } //# sourceMappingURL=RpcBriefcaseUtility.d.ts.map