UNPKG

@itwin/imodels-client-authoring

Version:

iModels API client wrapper for applications that author iModels.

25 lines 1.91 kB
import { IModel, IModelOperations as ManagementIModelOperations } from "@itwin/imodels-client-management"; import { IModelsClient } from "../../IModelsClient"; import { OperationOptions } from "../OperationOptions"; import { CreateIModelFromBaselineParams } from "./IModelOperationParams"; export declare class IModelOperations<TOptions extends OperationOptions> extends ManagementIModelOperations<TOptions> { private _baselineFileOperations; constructor(options: TOptions, iModelsClient: IModelsClient); /** * Creates an iModel from Baseline file with specified properties. Wraps the * {@link https://developer.bentley.com/apis/imodels-v2/operations/create-imodel/ Create iModel} operation from iModels API. * Internally it creates an iModel instance, uploads the Baseline file, confirms Baseline * file upload and then repeatedly queries the Baseline file state until the iModel is initialized. The execution of * this method can take up to several minutes due to waiting for initialization to complete. It also depends on the * Baseline file size - the larger the file, the longer the upload will take. * @param {CreateIModelFromBaselineParams} params parameters for this operation. See {@link CreateIModelFromBaselineParams}. * @returns {Promise<IModel>} newly created iModel. See {@link IModel}. * @throws an error that implements `iModelsError` interface with code {@link IModelsErrorCode.BaselineFileInitializationFailed} if * Baseline file initialization failed or {@link IModelsErrorCode.BaselineFileInitializationTimedOut} if the operation did not complete in time. * See {@link IModelsErrorCode}. */ createFromBaseline(params: CreateIModelFromBaselineParams): Promise<IModel>; private getCreateIModelFromBaselineRequestBody; private waitForBaselineFileInitialization; } //# sourceMappingURL=IModelOperations.d.ts.map