import { ValidationMessage } from "./validation.js"; /** * Types of validation targets. */ export declare enum GeometryFileTargetType { /** * Validation target is a node within the file. */ Node = "node", /** * Validation target is the whole file. */ File = "file" } /** * Target within the geometry file. */ export interface GeometryFileTarget { index: number; name?: string; type: GeometryFileTargetType; } /** * Validation message for a specific target in the geometry file. */ export type GeometryFileValidationMessage = ValidationMessage & { target: GeometryFileTarget; }; /** * Result of a geometry file validation process. */ export interface GeometryFileValidationResult { /** * Defines wether the uploaded file confirms all dc-engine standards and can * be used to create a custom geometry */ isValid: boolean; /** * List of all error and warning notes from the validation process */ validationMessages: GeometryFileValidationMessage[]; /** * Dictionary of the extracted stage data where the key is the `id` of the stage * * The value is `undefined` if the uploaded file does not confirm all dc-engine * geometry standards */ stages?: Record; /** * To avoid uploading the file multiple times. This temporary ID can be used * for further steps (e.g. geometry creation) * * Note: The temporary file can only be used once to create a final geometry */ temporaryFileId: string; } /** * Node information from a uploaded glTF model */ export interface GeometryFileNodeData { name: string; /** * The index of the node within the glTF model. * * This is mainly used for referencing (e.g. `GeometryFileValidationMessage`). */ nodeIndex: number; mesh?: MeshData; children: GeometryFileNodeData[]; } /** * Mesh information from a uploaded glTF model */ export interface MeshData { vertexCount: number; hasNormals: boolean; hasUVs: boolean; hasVertexColors: boolean; /** The name of the material that is used by this mesh */ material?: string; } /** * Extracted stage information from a uploaded glTF model */ export interface GeometryFileStageData { normalVector?: [number, number, number]; uvColor: [number, number, number, number]; } /** * Validates a glTF 2.0 file for DREAMCOMPOSER® compatibility. * * @param file The glTF 2.0 file that should be validated * @param auth The authorisation information. * @param baseUrl The base url. * @returns Detailed information about the validation status */ export declare function validateGeometryFile(file: File, auth?: import("../methods/auth.js").Auth, baseUrl?: string): Promise;