import { ResGetModelState, ResModelState } from "@shapediver/sdk.geometry-api-sdk-v2"; import { type ITreeNode } from "@shapediver/viewer.shared.node-tree"; import { SessionEngineCore } from "../SessionEngineCore"; /** * Manager responsible for model states. * * The manager is created by the SessionEngineCore and can be accessed * via the `modelStateManager` property. */ export declare class ModelStateManager { private readonly _converter; private readonly _httpClient; private readonly _sessionEngineCore; private _modelState?; private _modelStateId?; private _modelStateValidationMode?; constructor(sessionEngineCore: SessionEngineCore); get modelState(): ResModelState | undefined; set modelState(value: ResModelState | undefined); get modelStateId(): string | undefined; set modelStateId(value: string | undefined); get modelStateValidationMode(): boolean | undefined; set modelStateValidationMode(value: boolean | undefined); /** * Creates a new model state with the given parameter values and optional image and data. * * @param parameterValues Key-value pairs of parameter IDs and their corresponding values * @param omitSessionParameterValues Whether to omit parameters that have not been explicitly set in the session * @param image Optional image to associate with the model state * @param data Optional additional data to associate with the model state * @param arScene Optional AR scene to associate with the model state * @param retry Whether to retry the request in case of failure * @returns Promise with the ID of the created model state */ createModelState(parameterValues?: { [key: string]: unknown; }, omitSessionParameterValues?: boolean, image?: (() => string) | (() => Promise) | string | Promise | Blob | File, data?: Record, arScene?: (() => Promise) | ArrayBuffer | (() => Promise) | Blob | File, retry?: boolean): Promise; /** * Customizes the session using the provided model state. * * @param modelState The model state ID or the model state response object * @param retry Whether to retry the request in case of failure * @returns Promise with the root tree node of the customized session */ customizeWithModelState(modelState: string | ResGetModelState, retry?: boolean): Promise; /** * Retrieves a model state by its ID. * * @param modelStateId The ID of the model state to retrieve. If undefined, the current model state ID is used. * @returns Promise with the model state information */ getModelState(modelStateId?: string): Promise; } //# sourceMappingURL=ModelStateManager.d.ts.map