import { SchemaData, SchemaKind, SchemaVersion } from "./types/sceneObjectSchemas.js"; import { ResourceStylingSchemas, StandardSchemas } from "./types/schemaCategories.js"; /** * Base scene object creation interface. * Contains properties common to all scene objects */ export interface BaseSceneObjectCreate = SchemaVersion> { /** Kind of the scene object (schema name) */ kind: K; /** JSON schema version this object conforms to (SemVer) */ version: V; /** Data that matches the object's JSON schema */ data: SchemaData; /** Optional identifier for the scene object (UUID) */ id?: string; /** Optional display name for the scene object */ displayName?: string; /** Optional number for the scene object's order in lists. */ order?: number; /** Optional stacking order for clients to control rendering sequence. Objects with lower values are typically drawn beneath objects with higher values.*/ displayOrder?: number; /** Optional initial visibility state for the scene object */ visible?: boolean; /** Optional parent Id (UUID) */ parentId?: string; } /** * Resource styling object creation interface. * Used to apply styling options to RepositoryResource objects in a scene. * Requires a relatedId to indicate which object is being styled. * * @example * ```typescript * const expressionStyling: ResourceStylingObjectCreate = { * kind: 'ExpressionStyling', * version: '1.0.0', * relatedId: '', * data: { stylingOptions: { styleType: "Expression", show: 'element.category === "Door"' } } * }; * ``` */ export interface ResourceStylingObjectCreate = SchemaVersion> extends BaseSceneObjectCreate { /** Id of the related scene object this styling applies to (UUID) */ relatedId: string; } /** * Standard scene object creation interface. * Use for most objects, no extra requirements beyond base properties */ export interface StandardObjectCreate = SchemaVersion> extends BaseSceneObjectCreate { } /** * Type representing all possible scene object creates. * Automatically resolves to the appropriate interface based on the schema kind */ export type SceneObjectCreate = SchemaVersion> = K extends ResourceStylingSchemas ? ResourceStylingObjectCreate : K extends StandardSchemas ? StandardObjectCreate : never; /** * Interface for creating multiple scene objects * * @example * ```typescript * const bulkCreate: BulkSceneObjectCreate = { * objects: [ * { kind: 'Layer', version: '1.0.0', data: { ... } }, * { kind: 'View3d', version: '1.0.0', data: { ... } } * ] * }; * ``` */ export interface BulkSceneObjectCreate { objects: SceneObjectCreate[]; } export declare function isSceneObjectCreate(v: unknown): v is SceneObjectCreate;