import { QueryGltfConversion, ReqCustomization, ReqExport, ResAssetDefinition, ResBase, ResExport, ResGetModelState, ResModelState } from "@shapediver/sdk.geometry-api-sdk-v2"; import { type ITreeNode } from "@shapediver/viewer.shared.node-tree"; import { SettingsEngine } from "@shapediver/viewer.shared.services"; import { type ISettingsSections, type ITaskEventDescription } from "@shapediver/viewer.shared.types"; import { type IExport } from "./dto/IExport"; import { type IOutput } from "./dto/IOutput"; import { type IParameter } from "./dto/IParameter"; /** * Interface defining the Session Engine functionality. * * This interface is only used internally. * For the session API definition, please refer to the {@link ISessionAPI}. */ export interface ISessionEngine { readonly hasStoredSettings: boolean; readonly jwtToken?: string; canUploadGLTF: boolean; exports: { [key: string]: IExport; }; guid?: string; id: string; initialized: boolean; directTextureDownload: boolean; loadSdtf: boolean; modelState?: ResModelState; modelViewUrl: string; outputs: { [key: string]: IOutput; }; parameters: { [key: string]: IParameter; }; refreshJwtToken: (() => Promise) | undefined; settingsEngine: SettingsEngine; ticket?: string; updateCallback: ((newNode?: ITreeNode, oldNode?: ITreeNode) => void) | null; applySettings(response: ResBase, sections?: ISettingsSections): void; canGoBack(): boolean; canGoForward(): boolean; cancelCustomization(): void; close(): Promise; createModelState(parameterValues?: { [key: string]: unknown; }, omitSessionParameterValues?: boolean, image?: (() => string) | (() => Promise) | string | Promise | Blob | File, data?: Record, arScene?: (() => Promise) | ArrayBuffer | (() => Promise) | Blob | File): Promise; customize(force?: boolean, waitForViewportUpdate?: boolean): Promise; customizeParallel(parameterValues: { [key: string]: unknown; }, loadOutputs?: boolean): Promise; customizeWithModelState(modelState: string | ResBase): Promise; getModelState(modelStateId?: string): Promise; goBack(): Promise; goForward(): Promise; init(parameterValues?: { [key: string]: string; }): Promise; loadCachedOutputsParallel(outputMapping: { [key: string]: string; }, taskEventInfo?: ITaskEventDescription, retry?: boolean): Promise<{ [key: string]: ITreeNode | undefined; }>; requestExport(exportId: string, parameters: ReqCustomization, maxWaitTime: number): Promise; requestExports(body: ReqExport, loadOutputs?: boolean, maxWaitMsec?: number): Promise; resetSettings(sections?: ISettingsSections): void; saveDefaultParameterValues(): Promise; saveSettings(json?: unknown): Promise; saveUiProperties(saveInSettings?: boolean): Promise; setJwtToken(token: string): Promise; updateOutputs(taskEventInfo?: ITaskEventDescription, waitForViewportUpdate?: boolean): Promise; uploadFile(parameterId: string, data: File, type: string): Promise; uploadFileParameters(parameterValues?: { [key: string]: string | File | Blob; }): Promise<{ [key: string]: string; }>; uploadGLTF(blob: Blob, conversion?: QueryGltfConversion): Promise; uploadSDTF(arrayBuffers: ArrayBuffer[]): Promise; } /** * Definition used to create a Session Engine. * * This is only used internally. * For the definition of the session creation object, please refer to the {@link SessionCreationDefinition}. */ export type ISessionEngineCreationDefinition = { allowOutputLoading: boolean; buildDate: string; buildVersion: string; directTextureDownload?: boolean; excludeViewports?: string[]; guid?: string; id: string; ignoreUnknownParams?: boolean; jwtToken?: string; loadSdtf: boolean; modelStateId?: string; modelStateValidationMode?: boolean; modelViewUrl: string; throwOnCustomizationError?: boolean; ticket?: string; }; //# sourceMappingURL=ISessionEngine.d.ts.map