@snaptrude/plugin-core 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +130 -48
- package/CHANGELOG.md +111 -0
- package/api-manifest.full.json +3999 -0
- package/api-manifest.json +3845 -0
- package/dist/api/core/buildings.d.ts +427 -0
- package/dist/api/core/buildings.d.ts.map +1 -0
- package/dist/api/core/comment/index.d.ts +230 -0
- package/dist/api/core/comment/index.d.ts.map +1 -0
- package/dist/api/core/geom/create/index.d.ts +247 -0
- package/dist/api/core/geom/create/index.d.ts.map +1 -0
- package/dist/api/core/geom/delete/index.d.ts +72 -0
- package/dist/api/core/geom/delete/index.d.ts.map +1 -0
- package/dist/api/core/geom/index.d.ts +24 -23
- package/dist/api/core/geom/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/arc.d.ts +169 -0
- package/dist/api/core/geom/query/arc.d.ts.map +1 -0
- package/dist/api/core/geom/query/brep.d.ts +402 -0
- package/dist/api/core/geom/query/brep.d.ts.map +1 -0
- package/dist/api/core/geom/query/circle.d.ts +378 -0
- package/dist/api/core/geom/query/circle.d.ts.map +1 -0
- package/dist/api/core/geom/query/contour.d.ts +450 -0
- package/dist/api/core/geom/query/contour.d.ts.map +1 -0
- package/dist/api/core/geom/query/curve.d.ts +918 -0
- package/dist/api/core/geom/query/curve.d.ts.map +1 -0
- package/dist/api/core/geom/query/edge.d.ts +128 -0
- package/dist/api/core/geom/query/edge.d.ts.map +1 -0
- package/dist/api/core/geom/query/face.d.ts +363 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -0
- package/dist/api/core/geom/query/halfedge.d.ts +206 -0
- package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
- package/dist/api/core/geom/query/index.d.ts +61 -0
- package/dist/api/core/geom/query/index.d.ts.map +1 -0
- package/dist/api/core/geom/query/profile.d.ts +410 -0
- package/dist/api/core/geom/query/profile.d.ts.map +1 -0
- package/dist/api/core/geom/query/vertex.d.ts +187 -0
- package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
- package/dist/api/core/geom/update/contour.d.ts +272 -0
- package/dist/api/core/geom/update/contour.d.ts.map +1 -0
- package/dist/api/core/geom/update/curve.d.ts +180 -0
- package/dist/api/core/geom/update/curve.d.ts.map +1 -0
- package/dist/api/core/geom/update/index.d.ts +27 -0
- package/dist/api/core/geom/update/index.d.ts.map +1 -0
- package/dist/api/core/geom/update/profile.d.ts +329 -0
- package/dist/api/core/geom/update/profile.d.ts.map +1 -0
- package/dist/api/core/groups.d.ts +485 -0
- package/dist/api/core/groups.d.ts.map +1 -0
- package/dist/api/core/history/index.d.ts +78 -0
- package/dist/api/core/history/index.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +46 -1
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/layers.d.ts +402 -0
- package/dist/api/core/layers.d.ts.map +1 -0
- package/dist/api/core/math/quat.d.ts +111 -128
- package/dist/api/core/math/quat.d.ts.map +1 -1
- package/dist/api/core/math/vec3.d.ts +120 -102
- package/dist/api/core/math/vec3.d.ts.map +1 -1
- package/dist/api/core/project/index.d.ts +399 -0
- package/dist/api/core/project/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +755 -0
- package/dist/api/core/tags.d.ts.map +1 -0
- package/dist/api/core/units/index.d.ts +175 -0
- package/dist/api/core/units/index.d.ts.map +1 -0
- package/dist/api/core/zoom/index.d.ts +45 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +168 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +828 -0
- package/dist/api/design/create/index.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +63 -0
- package/dist/api/design/delete/index.d.ts.map +1 -0
- package/dist/api/design/doors/index.d.ts +268 -0
- package/dist/api/design/doors/index.d.ts.map +1 -0
- package/dist/api/design/edit/index.d.ts +49 -0
- package/dist/api/design/edit/index.d.ts.map +1 -0
- package/dist/api/design/erase/index.d.ts +160 -0
- package/dist/api/design/erase/index.d.ts.map +1 -0
- package/dist/api/design/furniture/index.d.ts +123 -0
- package/dist/api/design/furniture/index.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +153 -0
- package/dist/api/design/index.d.ts.map +1 -0
- package/dist/api/design/lock.d.ts +41 -0
- package/dist/api/design/lock.d.ts.map +1 -0
- package/dist/api/design/materials/index.d.ts +297 -0
- package/dist/api/design/materials/index.d.ts.map +1 -0
- package/dist/api/design/query/geometry/index.d.ts +140 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +1011 -0
- package/dist/api/design/query/index.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +221 -0
- package/dist/api/design/query/spaces.d.ts.map +1 -0
- package/dist/api/design/selection/index.d.ts +138 -0
- package/dist/api/design/selection/index.d.ts.map +1 -0
- package/dist/api/design/shared.d.ts +38 -0
- package/dist/api/design/shared.d.ts.map +1 -0
- package/dist/api/design/transform/index.d.ts +87 -0
- package/dist/api/design/transform/index.d.ts.map +1 -0
- package/dist/api/design/update/index.d.ts +178 -0
- package/dist/api/design/update/index.d.ts.map +1 -0
- package/dist/api/design/windows/index.d.ts +189 -0
- package/dist/api/design/windows/index.d.ts.map +1 -0
- package/dist/api/entity/buildableEnvelope.d.ts +261 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
- package/dist/api/entity/department.d.ts +0 -98
- package/dist/api/entity/department.d.ts.map +1 -1
- package/dist/api/entity/index.d.ts +9 -9
- package/dist/api/entity/index.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +49 -106
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +482 -249
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +49 -39
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/index.d.ts +17 -12
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +440 -0
- package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +81 -0
- package/dist/api/presentation/diagrams.d.ts.map +1 -0
- package/dist/api/presentation/import.d.ts +113 -0
- package/dist/api/presentation/import.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +46 -0
- package/dist/api/presentation/index.d.ts.map +1 -0
- package/dist/api/presentation/sheets.d.ts +176 -0
- package/dist/api/presentation/sheets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +296 -0
- package/dist/api/presentation/views.d.ts.map +1 -0
- package/dist/api/program/adjacency.d.ts +155 -0
- package/dist/api/program/adjacency.d.ts.map +1 -0
- package/dist/api/program/areas.d.ts +360 -0
- package/dist/api/program/areas.d.ts.map +1 -0
- package/dist/api/program/classification.d.ts +135 -0
- package/dist/api/program/classification.d.ts.map +1 -0
- package/dist/api/program/cores.d.ts +174 -0
- package/dist/api/program/cores.d.ts.map +1 -0
- package/dist/api/program/departments.d.ts +431 -0
- package/dist/api/program/departments.d.ts.map +1 -0
- package/dist/api/program/index.d.ts +69 -0
- package/dist/api/program/index.d.ts.map +1 -0
- package/dist/api/program/layout.d.ts +63 -0
- package/dist/api/program/layout.d.ts.map +1 -0
- package/dist/api/program/metrics.d.ts +108 -0
- package/dist/api/program/metrics.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +367 -0
- package/dist/api/program/site.d.ts.map +1 -0
- package/dist/api/program/spreadsheet.d.ts +2041 -0
- package/dist/api/program/spreadsheet.d.ts.map +1 -0
- package/dist/handles.d.ts +138 -0
- package/dist/handles.d.ts.map +1 -0
- package/dist/host-utils.d.ts +7 -5
- package/dist/host-utils.d.ts.map +1 -1
- package/dist/index.cjs +4001 -904
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3392 -870
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
- package/scripts/generate-manifest.mjs +193 -0
- package/scripts/generate-manifest.test.mjs +193 -0
- package/src/api/core/buildings.ts +485 -0
- package/src/api/core/comment/index.ts +258 -0
- package/src/api/core/geom/create/index.ts +293 -0
- package/src/api/core/geom/delete/index.ts +78 -0
- package/src/api/core/geom/index.ts +24 -23
- package/src/api/core/geom/query/arc.ts +169 -0
- package/src/api/core/geom/query/brep.ts +444 -0
- package/src/api/core/geom/query/circle.ts +404 -0
- package/src/api/core/geom/query/contour.ts +540 -0
- package/src/api/core/geom/query/curve.ts +1078 -0
- package/src/api/core/geom/query/edge.ts +130 -0
- package/src/api/core/geom/query/face.ts +403 -0
- package/src/api/core/geom/query/halfedge.ts +210 -0
- package/src/api/core/geom/query/index.ts +63 -0
- package/src/api/core/geom/query/profile.ts +473 -0
- package/src/api/core/geom/query/vertex.ts +205 -0
- package/src/api/core/geom/update/contour.ts +315 -0
- package/src/api/core/geom/update/curve.ts +209 -0
- package/src/api/core/geom/update/index.ts +29 -0
- package/src/api/core/geom/update/profile.ts +377 -0
- package/src/api/core/groups.ts +521 -0
- package/src/api/core/history/index.ts +84 -0
- package/src/api/core/index.ts +46 -1
- package/src/api/core/layers.ts +333 -0
- package/src/api/core/math/quat.ts +112 -235
- package/src/api/core/math/vec3.ts +124 -159
- package/src/api/core/project/index.ts +418 -0
- package/src/api/core/tags.ts +808 -0
- package/src/api/core/units/index.ts +164 -0
- package/src/api/core/zoom/index.ts +47 -0
- package/src/api/design/boolean/index.ts +179 -0
- package/src/api/design/create/index.ts +886 -0
- package/src/api/design/delete/index.ts +67 -0
- package/src/api/design/doors/index.ts +285 -0
- package/src/api/design/edit/index.ts +54 -0
- package/src/api/design/erase/index.ts +151 -0
- package/src/api/design/furniture/index.ts +130 -0
- package/src/api/design/index.ts +162 -0
- package/src/api/design/lock.ts +42 -0
- package/src/api/design/materials/index.ts +301 -0
- package/src/api/design/query/geometry/index.ts +166 -0
- package/src/api/design/query/index.ts +937 -0
- package/src/api/design/query/spaces.ts +132 -0
- package/src/api/design/selection/index.ts +144 -0
- package/src/api/design/shared.ts +40 -0
- package/src/api/design/transform/index.ts +93 -0
- package/src/api/design/update/index.ts +117 -0
- package/src/api/design/windows/index.ts +207 -0
- package/src/api/entity/buildableEnvelope.ts +318 -0
- package/src/api/entity/department.ts +0 -113
- package/src/api/entity/index.ts +9 -9
- package/src/api/entity/referenceLine.ts +50 -38
- package/src/api/entity/space.ts +285 -226
- package/src/api/entity/story.ts +53 -42
- package/src/api/index.ts +17 -12
- package/src/api/presentation/aiInspiration.ts +362 -0
- package/src/api/presentation/diagrams.ts +84 -0
- package/src/api/presentation/import.ts +112 -0
- package/src/api/presentation/index.ts +48 -0
- package/src/api/presentation/sheets.ts +198 -0
- package/src/api/presentation/views.ts +303 -0
- package/src/api/program/adjacency.ts +164 -0
- package/src/api/program/areas.ts +335 -0
- package/src/api/program/classification.ts +138 -0
- package/src/api/program/cores.ts +171 -0
- package/src/api/program/departments.ts +465 -0
- package/src/api/program/index.ts +71 -0
- package/src/api/program/layout.ts +68 -0
- package/src/api/program/metrics.ts +120 -0
- package/src/api/program/site.ts +326 -0
- package/src/api/program/spreadsheet.ts +2075 -0
- package/src/handles.ts +148 -0
- package/src/host-utils.ts +10 -6
- package/src/index.ts +1 -0
- package/dist/api/core/geom/arc.d.ts +0 -81
- package/dist/api/core/geom/arc.d.ts.map +0 -1
- package/dist/api/core/geom/curve.d.ts +0 -70
- package/dist/api/core/geom/curve.d.ts.map +0 -1
- package/dist/api/core/geom/line.d.ts +0 -56
- package/dist/api/core/geom/line.d.ts.map +0 -1
- package/dist/api/core/geom/profile.d.ts +0 -121
- package/dist/api/core/geom/profile.d.ts.map +0 -1
- package/dist/api/tools/copy.d.ts +0 -59
- package/dist/api/tools/copy.d.ts.map +0 -1
- package/dist/api/tools/index.d.ts +0 -33
- package/dist/api/tools/index.d.ts.map +0 -1
- package/dist/api/tools/material.d.ts +0 -51
- package/dist/api/tools/material.d.ts.map +0 -1
- package/dist/api/tools/offset.d.ts +0 -43
- package/dist/api/tools/offset.d.ts.map +0 -1
- package/dist/api/tools/selection.d.ts +0 -48
- package/dist/api/tools/selection.d.ts.map +0 -1
- package/dist/api/tools/transform.d.ts +0 -114
- package/dist/api/tools/transform.d.ts.map +0 -1
- package/dist/api/units/index.d.ts +0 -163
- package/dist/api/units/index.d.ts.map +0 -1
- package/src/api/core/geom/arc.ts +0 -70
- package/src/api/core/geom/curve.ts +0 -41
- package/src/api/core/geom/line.ts +0 -53
- package/src/api/core/geom/profile.ts +0 -94
- package/src/api/tools/copy.ts +0 -55
- package/src/api/tools/index.ts +0 -39
- package/src/api/tools/material.ts +0 -49
- package/src/api/tools/offset.ts +0 -43
- package/src/api/tools/selection.ts +0 -51
- package/src/api/tools/transform.ts +0 -117
- package/src/api/units/index.ts +0 -163
|
@@ -1,193 +1,14 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
-
import { PluginApiReturn } from "../../types";
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* A **space** is a 3D volume representing a room or mass in the
|
|
7
|
-
* Snaptrude scene. Spaces live on a particular story and carry
|
|
8
|
-
* properties such as name, area, department, and room type.
|
|
9
|
-
*
|
|
10
|
-
* All methods are **host API calls** that return Promises and support
|
|
11
|
-
* undo/redo via Snaptrude's command system.
|
|
12
|
-
*
|
|
13
|
-
* Accessed via `snaptrude.entity.space`.
|
|
14
|
-
*/
|
|
15
|
-
export declare abstract class PluginSpaceApi {
|
|
16
|
-
constructor();
|
|
17
|
-
/**
|
|
18
|
-
* Create a rectangular (box) space.
|
|
19
|
-
*
|
|
20
|
-
* Generates an axis-aligned box with the given dimensions at the
|
|
21
|
-
* specified position. The created space is automatically assigned
|
|
22
|
-
* to the active story and a default department.
|
|
23
|
-
*
|
|
24
|
-
* @param args - An object containing:
|
|
25
|
-
* - {@linkcode PluginSpaceCreateRectangularArgs.position args.position} — Origin
|
|
26
|
-
* position as a {@linkcode PVec3} in Babylon units
|
|
27
|
-
* - {@linkcode PluginSpaceCreateRectangularArgs.dimensions args.dimensions} — Box
|
|
28
|
-
* dimensions `{ width, height, depth }` in Babylon units
|
|
29
|
-
* @returns A {@linkcode PluginSpaceCreateRectangularResult} with the `spaceId`
|
|
30
|
-
* of the created space
|
|
31
|
-
* @throws If space creation fails
|
|
32
|
-
*
|
|
33
|
-
* # Example
|
|
34
|
-
* ```ts
|
|
35
|
-
* const { vec3 } = snaptrude.core.math
|
|
36
|
-
*
|
|
37
|
-
* const { spaceId } = await snaptrude.entity.space.createRectangular({
|
|
38
|
-
* position: vec3.new(0, 0, 0),
|
|
39
|
-
* dimensions: { width: 5, height: 3, depth: 4 },
|
|
40
|
-
* })
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
abstract createRectangular({ position, dimensions, }: PluginSpaceCreateRectangularArgs): PluginApiReturn<PluginSpaceCreateRectangularResult>;
|
|
44
|
-
/**
|
|
45
|
-
* Create a space by extruding a 2D profile.
|
|
46
|
-
*
|
|
47
|
-
* The {@linkcode PluginSpaceCreateFromProfileArgs.profile profile} is extruded
|
|
48
|
-
* upward (along the Y axis) by {@linkcode PluginSpaceCreateFromProfileArgs.extrudeHeight
|
|
49
|
-
* extrudeHeight}, then offset by {@linkcode PluginSpaceCreateFromProfileArgs.position
|
|
50
|
-
* position}. The created space is automatically assigned to the active story
|
|
51
|
-
* and a default department.
|
|
52
|
-
*
|
|
53
|
-
* Use {@linkcode PluginProfileApi.fromLinePoints} to quickly build a profile
|
|
54
|
-
* from a list of points.
|
|
55
|
-
*
|
|
56
|
-
* @param args - An object containing:
|
|
57
|
-
* - {@linkcode PluginSpaceCreateFromProfileArgs.profile args.profile} — A closed
|
|
58
|
-
* {@linkcode PProfile} defining the floor shape
|
|
59
|
-
* - {@linkcode PluginSpaceCreateFromProfileArgs.extrudeHeight args.extrudeHeight} —
|
|
60
|
-
* Extrusion height in Babylon units
|
|
61
|
-
* - {@linkcode PluginSpaceCreateFromProfileArgs.position args.position} — Offset
|
|
62
|
-
* position as a {@linkcode PVec3} in Babylon units
|
|
63
|
-
* @returns A {@linkcode PluginSpaceCreateFromProfileResult} with the `spaceId`
|
|
64
|
-
* of the created space
|
|
65
|
-
* @throws If the profile is invalid or mesh creation fails
|
|
66
|
-
*
|
|
67
|
-
* # Example
|
|
68
|
-
* ```ts
|
|
69
|
-
* const { vec3 } = snaptrude.core.math
|
|
70
|
-
*
|
|
71
|
-
* const profile = await snaptrude.core.geom.profile.fromLinePoints({
|
|
72
|
-
* points: [
|
|
73
|
-
* vec3.new(0, 0, 0),
|
|
74
|
-
* vec3.new(10, 0, 0),
|
|
75
|
-
* vec3.new(10, 0, 8),
|
|
76
|
-
* vec3.new(0, 0, 8),
|
|
77
|
-
* ],
|
|
78
|
-
* })
|
|
79
|
-
*
|
|
80
|
-
* const { spaceId } = await snaptrude.entity.space.createFromProfile({
|
|
81
|
-
* profile,
|
|
82
|
-
* extrudeHeight: 3,
|
|
83
|
-
* position: vec3.new(0, 0, 0),
|
|
84
|
-
* })
|
|
85
|
-
* ```
|
|
86
|
-
*/
|
|
87
|
-
abstract createFromProfile({ profile, extrudeHeight, position, }: PluginSpaceCreateFromProfileArgs): PluginApiReturn<PluginSpaceCreateFromProfileResult>;
|
|
88
|
-
/**
|
|
89
|
-
* Get the IDs of all spaces in the current project.
|
|
90
|
-
*
|
|
91
|
-
* Returns every space (mass that is not a building) across all stories.
|
|
92
|
-
* Use the returned IDs with {@linkcode PluginSpaceApi.get} to query
|
|
93
|
-
* individual space properties.
|
|
94
|
-
*
|
|
95
|
-
* @returns A {@linkcode PluginSpaceGetAllResult} with a `spacesIds` array
|
|
96
|
-
*
|
|
97
|
-
* # Example
|
|
98
|
-
* ```ts
|
|
99
|
-
* const { spacesIds } = await snaptrude.entity.space.getAll()
|
|
100
|
-
* console.log(`Project has ${spacesIds.length} spaces`)
|
|
101
|
-
* ```
|
|
102
|
-
*/
|
|
103
|
-
abstract getAll(): PluginApiReturn<PluginSpaceGetAllResult>;
|
|
104
|
-
/**
|
|
105
|
-
* Get properties of a space by its ID.
|
|
106
|
-
*
|
|
107
|
-
* Only the properties listed in {@linkcode PluginSpaceGetArgs.properties
|
|
108
|
-
* args.properties} are returned — unlisted properties will be `undefined`
|
|
109
|
-
* in the result.
|
|
110
|
-
*
|
|
111
|
-
* @param args - An object containing:
|
|
112
|
-
* - {@linkcode PluginSpaceGetArgs.spaceId args.spaceId} — The unique space ID
|
|
113
|
-
* (as returned by creation methods or {@linkcode PluginSpaceApi.getAll})
|
|
114
|
-
* - {@linkcode PluginSpaceGetArgs.properties args.properties} — Array of property
|
|
115
|
-
* names to retrieve. See {@linkcode PluginSpaceGetProperty} for available values.
|
|
116
|
-
* @returns A partial {@linkcode PluginSpaceGetResult} containing only the requested
|
|
117
|
-
* properties
|
|
118
|
-
* @throws If the space does not exist or the component is not a space/mass
|
|
119
|
-
*
|
|
120
|
-
* # Example
|
|
121
|
-
* ```ts
|
|
122
|
-
* const info = await snaptrude.entity.space.get({
|
|
123
|
-
* spaceId: "some-space-id",
|
|
124
|
-
* properties: ["name", "area", "position"],
|
|
125
|
-
* })
|
|
126
|
-
* console.log(info.name, info.area, info.position)
|
|
127
|
-
* ```
|
|
128
|
-
*/
|
|
129
|
-
abstract get({ spaceId, properties, }: PluginSpaceGetArgs): PluginApiReturn<PluginSpaceGetResult>;
|
|
130
|
-
/**
|
|
131
|
-
* Delete a space by its ID.
|
|
132
|
-
*
|
|
133
|
-
* Permanently removes the space and its associated mesh from the scene.
|
|
134
|
-
* This operation is undoable via Snaptrude's command system.
|
|
135
|
-
*
|
|
136
|
-
* @param args - An object containing:
|
|
137
|
-
* - {@linkcode PluginSpaceDeleteArgs.spaceId args.spaceId} — The unique space ID
|
|
138
|
-
* to delete
|
|
139
|
-
* @throws If the space does not exist or the component is not a space/mass
|
|
140
|
-
*
|
|
141
|
-
* # Example
|
|
142
|
-
* ```ts
|
|
143
|
-
* await snaptrude.entity.space.delete({ spaceId: "some-space-id" })
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
|
-
abstract delete({ spaceId, }: PluginSpaceDeleteArgs): PluginApiReturn<PluginSpaceDeleteResult>;
|
|
147
|
-
/**
|
|
148
|
-
* Update properties of a space by its ID.
|
|
149
|
-
*
|
|
150
|
-
* Only the properties provided in {@linkcode PluginSpaceUpdateArgs.properties
|
|
151
|
-
* args.properties} will be updated — omitted properties remain unchanged.
|
|
152
|
-
* This operation is undoable via Snaptrude's command system.
|
|
153
|
-
*
|
|
154
|
-
* @param args - An object containing:
|
|
155
|
-
* - {@linkcode PluginSpaceUpdateArgs.spaceId args.spaceId} — The unique space ID
|
|
156
|
-
* to update
|
|
157
|
-
* - {@linkcode PluginSpaceUpdateArgs.properties args.properties} — Key/value pairs
|
|
158
|
-
* of properties to update. See {@linkcode PluginSpaceUpdateArgs} for supported fields.
|
|
159
|
-
* @returns A {@linkcode PluginSpaceUpdateResult} echoing back the `spaceId` and
|
|
160
|
-
* the updated property values
|
|
161
|
-
* @throws If the space does not exist or the component is not a space/mass
|
|
162
|
-
*
|
|
163
|
-
* # Example
|
|
164
|
-
* ```ts
|
|
165
|
-
* const result = await snaptrude.entity.space.update({
|
|
166
|
-
* spaceId: "some-space-id",
|
|
167
|
-
* properties: {
|
|
168
|
-
* room_type: "Kitchen",
|
|
169
|
-
* massType: "Room",
|
|
170
|
-
* departmentId: "CORE",
|
|
171
|
-
* },
|
|
172
|
-
* })
|
|
173
|
-
* ```
|
|
174
|
-
*/
|
|
175
|
-
abstract update(args: PluginSpaceUpdateArgs): PluginApiReturn<PluginSpaceUpdateResult>;
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Arguments for {@linkcode PluginSpaceApi.createRectangular}.
|
|
3
|
+
* Arguments for `createRectangular`.
|
|
179
4
|
*
|
|
180
5
|
* | Property | Type | Description |
|
|
181
6
|
* |---|---|---|
|
|
182
|
-
* | `position` | {@linkcode
|
|
7
|
+
* | `position` | {@linkcode Vec3Handle} | Origin position in Babylon units |
|
|
183
8
|
* | `dimensions` | `{ width, height, depth }` | Box dimensions in Babylon units |
|
|
184
9
|
*/
|
|
185
10
|
export declare const PluginSpaceCreateRectangularArgs: z.ZodObject<{
|
|
186
|
-
position: z.
|
|
187
|
-
x: z.ZodNumber;
|
|
188
|
-
y: z.ZodNumber;
|
|
189
|
-
z: z.ZodNumber;
|
|
190
|
-
}, z.core.$strip>;
|
|
11
|
+
position: z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"vec3">, string>>;
|
|
191
12
|
dimensions: z.ZodObject<{
|
|
192
13
|
width: z.ZodNumber;
|
|
193
14
|
height: z.ZodNumber;
|
|
@@ -196,7 +17,7 @@ export declare const PluginSpaceCreateRectangularArgs: z.ZodObject<{
|
|
|
196
17
|
}, z.core.$strip>;
|
|
197
18
|
export type PluginSpaceCreateRectangularArgs = z.infer<typeof PluginSpaceCreateRectangularArgs>;
|
|
198
19
|
/**
|
|
199
|
-
* Result of
|
|
20
|
+
* Result of `createRectangular`.
|
|
200
21
|
*
|
|
201
22
|
* | Property | Type | Description |
|
|
202
23
|
* |---|---|---|
|
|
@@ -207,62 +28,24 @@ export declare const PluginSpaceCreateRectangularResult: z.ZodObject<{
|
|
|
207
28
|
}, z.core.$strip>;
|
|
208
29
|
export type PluginSpaceCreateRectangularResult = z.infer<typeof PluginSpaceCreateRectangularResult>;
|
|
209
30
|
/**
|
|
210
|
-
* Arguments for
|
|
31
|
+
* Arguments for `createFromProfile`.
|
|
211
32
|
*
|
|
212
33
|
* | Property | Type | Description |
|
|
213
34
|
* |---|---|---|
|
|
214
|
-
* | `profile` | {@linkcode
|
|
35
|
+
* | `profile` | {@linkcode ProfileHandle} | Handle to a closed 2D profile (the outer floor shape) |
|
|
36
|
+
* | `innerProfiles` | {@linkcode ProfileHandle}`[]` | Optional profile handles to subtract as holes |
|
|
215
37
|
* | `extrudeHeight` | `number` | Extrusion height in Babylon units |
|
|
216
|
-
* | `position` | {@linkcode
|
|
38
|
+
* | `position` | {@linkcode Vec3Handle} | Offset position in Babylon units |
|
|
217
39
|
*/
|
|
218
40
|
export declare const PluginSpaceCreateFromProfileArgs: z.ZodObject<{
|
|
219
|
-
profile: z.
|
|
220
|
-
|
|
221
|
-
curveType: z.ZodLiteral<"Line">;
|
|
222
|
-
startPoint: z.ZodObject<{
|
|
223
|
-
x: z.ZodNumber;
|
|
224
|
-
y: z.ZodNumber;
|
|
225
|
-
z: z.ZodNumber;
|
|
226
|
-
}, z.core.$strip>;
|
|
227
|
-
endPoint: z.ZodObject<{
|
|
228
|
-
x: z.ZodNumber;
|
|
229
|
-
y: z.ZodNumber;
|
|
230
|
-
z: z.ZodNumber;
|
|
231
|
-
}, z.core.$strip>;
|
|
232
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
233
|
-
curveType: z.ZodLiteral<"Arc">;
|
|
234
|
-
startPoint: z.ZodObject<{
|
|
235
|
-
x: z.ZodNumber;
|
|
236
|
-
y: z.ZodNumber;
|
|
237
|
-
z: z.ZodNumber;
|
|
238
|
-
}, z.core.$strip>;
|
|
239
|
-
endPoint: z.ZodObject<{
|
|
240
|
-
x: z.ZodNumber;
|
|
241
|
-
y: z.ZodNumber;
|
|
242
|
-
z: z.ZodNumber;
|
|
243
|
-
}, z.core.$strip>;
|
|
244
|
-
centrePoint: z.ZodObject<{
|
|
245
|
-
x: z.ZodNumber;
|
|
246
|
-
y: z.ZodNumber;
|
|
247
|
-
z: z.ZodNumber;
|
|
248
|
-
}, z.core.$strip>;
|
|
249
|
-
axis: z.ZodObject<{
|
|
250
|
-
x: z.ZodNumber;
|
|
251
|
-
y: z.ZodNumber;
|
|
252
|
-
z: z.ZodNumber;
|
|
253
|
-
}, z.core.$strip>;
|
|
254
|
-
}, z.core.$strip>], "curveType">>;
|
|
255
|
-
}, z.core.$strip>;
|
|
41
|
+
profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"profile">, string>>;
|
|
42
|
+
innerProfiles: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"profile">, string>>>>;
|
|
256
43
|
extrudeHeight: z.ZodNumber;
|
|
257
|
-
position: z.
|
|
258
|
-
x: z.ZodNumber;
|
|
259
|
-
y: z.ZodNumber;
|
|
260
|
-
z: z.ZodNumber;
|
|
261
|
-
}, z.core.$strip>;
|
|
44
|
+
position: z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"vec3">, string>>;
|
|
262
45
|
}, z.core.$strip>;
|
|
263
46
|
export type PluginSpaceCreateFromProfileArgs = z.infer<typeof PluginSpaceCreateFromProfileArgs>;
|
|
264
47
|
/**
|
|
265
|
-
* Result of
|
|
48
|
+
* Result of `createFromProfile`.
|
|
266
49
|
*
|
|
267
50
|
* | Property | Type | Description |
|
|
268
51
|
* |---|---|---|
|
|
@@ -272,6 +55,32 @@ export declare const PluginSpaceCreateFromProfileResult: z.ZodObject<{
|
|
|
272
55
|
spaceId: z.ZodString;
|
|
273
56
|
}, z.core.$strip>;
|
|
274
57
|
export type PluginSpaceCreateFromProfileResult = z.infer<typeof PluginSpaceCreateFromProfileResult>;
|
|
58
|
+
/**
|
|
59
|
+
* Arguments for `updateGeometryFromProfile`.
|
|
60
|
+
*
|
|
61
|
+
* | Property | Type | Description |
|
|
62
|
+
* |---|---|---|
|
|
63
|
+
* | `spaceId` | `string` | Space to update |
|
|
64
|
+
* | `profile` | {@linkcode ProfileHandle} | Handle to the closed 2D profile defining the new floor shape |
|
|
65
|
+
* | `extrudeHeight` | `number` | New extrusion height in Babylon units |
|
|
66
|
+
*/
|
|
67
|
+
export declare const PluginSpaceUpdateGeometryFromProfileArgs: z.ZodObject<{
|
|
68
|
+
spaceId: z.ZodString;
|
|
69
|
+
profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"profile">, string>>;
|
|
70
|
+
extrudeHeight: z.ZodNumber;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
export type PluginSpaceUpdateGeometryFromProfileArgs = z.infer<typeof PluginSpaceUpdateGeometryFromProfileArgs>;
|
|
73
|
+
/**
|
|
74
|
+
* Result of `updateGeometryFromProfile`.
|
|
75
|
+
*
|
|
76
|
+
* | Property | Type | Description |
|
|
77
|
+
* |---|---|---|
|
|
78
|
+
* | `spaceId` | `string` | Unique ID of the updated space |
|
|
79
|
+
*/
|
|
80
|
+
export declare const PluginSpaceUpdateGeometryFromProfileResult: z.ZodObject<{
|
|
81
|
+
spaceId: z.ZodString;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
export type PluginSpaceUpdateGeometryFromProfileResult = z.infer<typeof PluginSpaceUpdateGeometryFromProfileResult>;
|
|
275
84
|
/**
|
|
276
85
|
* Available properties that can be queried on a space.
|
|
277
86
|
*
|
|
@@ -300,39 +109,52 @@ export type PluginSpaceCreateFromProfileResult = z.infer<typeof PluginSpaceCreat
|
|
|
300
109
|
* **Derived from mesh:**
|
|
301
110
|
* | Value | Return Type | Description |
|
|
302
111
|
* |---|---|---|
|
|
303
|
-
* | `"position"` | {@linkcode
|
|
304
|
-
* | `"absolutePosition"` | {@linkcode
|
|
305
|
-
* | `"rotation"` | {@linkcode
|
|
306
|
-
* | `"rotationQuaternion"` | {@linkcode
|
|
112
|
+
* | `"position"` | {@linkcode Vec3Components} | Local position relative to parent |
|
|
113
|
+
* | `"absolutePosition"` | {@linkcode Vec3Components} | Absolute position in the scene |
|
|
114
|
+
* | `"rotation"` | {@linkcode Vec3Components} | Euler rotation angles (radians) |
|
|
115
|
+
* | `"rotationQuaternion"` | {@linkcode QuatComponents} \| `null` | Quaternion rotation, or `null` if unset |
|
|
307
116
|
*
|
|
308
117
|
* **Derived from brep:**
|
|
309
118
|
* | Value | Return Type | Description |
|
|
310
119
|
* |---|---|---|
|
|
311
|
-
* | `"planPoints"` | {@linkcode
|
|
120
|
+
* | `"planPoints"` | {@linkcode Vec3Components}`[]` | Bottom outer profile points in world space with `y = 0` (2D plan). No closing duplicate point. |
|
|
121
|
+
* | `"profile"` | {@linkcode CurveHandle}`[]` | Bottom outer profile curves in world space, as opaque curve handles. Read coordinates via the `core.geom.curve` read API. |
|
|
122
|
+
* | `"innerProfiles"` | {@linkcode CurveHandle}`[][]` | Inner (hole) profile curve loops in world space — one loop per hole, `[]` when the space has none. Each curve is an opaque handle. |
|
|
123
|
+
* | `"innerPlanPoints"` | {@linkcode Vec3Components}`[][]` | Inner (hole) profile points in world space with `y = 0` — one loop per hole, no closing duplicate, `[]` when none. |
|
|
124
|
+
*
|
|
125
|
+
* **Derived from adjacency manager:**
|
|
126
|
+
* | Value | Return Type | Description |
|
|
127
|
+
* |---|---|---|
|
|
128
|
+
* | `"adjacency"` | `{ spaceId: string; value: number }[]` | Adjacency relationships to other spaces. `value`: `2` = Direct (required), `1` = Indirect or physical contact, `-1` = Restricted; `0` (no relationship) entries are filtered out. Empty when adjacency has never been computed — see `program.adjacency.compute`. |
|
|
312
129
|
*/
|
|
313
130
|
export declare const PluginSpaceGetProperty: z.ZodEnum<{
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
id: "id";
|
|
131
|
+
profile: "profile";
|
|
132
|
+
type: "type";
|
|
317
133
|
position: "position";
|
|
134
|
+
id: "id";
|
|
135
|
+
name: "name";
|
|
318
136
|
height: "height";
|
|
319
137
|
depth: "depth";
|
|
320
|
-
|
|
138
|
+
innerProfiles: "innerProfiles";
|
|
321
139
|
room_type: "room_type";
|
|
322
140
|
area: "area";
|
|
323
141
|
breadth: "breadth";
|
|
324
142
|
massType: "massType";
|
|
325
143
|
spaceType: "spaceType";
|
|
144
|
+
areaClass: "areaClass";
|
|
326
145
|
storey: "storey";
|
|
146
|
+
departmentId: "departmentId";
|
|
327
147
|
departmentName: "departmentName";
|
|
328
148
|
departmentColor: "departmentColor";
|
|
329
149
|
absolutePosition: "absolutePosition";
|
|
330
150
|
rotation: "rotation";
|
|
331
151
|
rotationQuaternion: "rotationQuaternion";
|
|
332
152
|
planPoints: "planPoints";
|
|
153
|
+
innerPlanPoints: "innerPlanPoints";
|
|
154
|
+
adjacency: "adjacency";
|
|
333
155
|
}>;
|
|
334
156
|
/**
|
|
335
|
-
* Arguments for
|
|
157
|
+
* Arguments for `get`.
|
|
336
158
|
*
|
|
337
159
|
* | Property | Type | Description |
|
|
338
160
|
* |---|---|---|
|
|
@@ -342,25 +164,30 @@ export declare const PluginSpaceGetProperty: z.ZodEnum<{
|
|
|
342
164
|
export declare const PluginSpaceGetArgs: z.ZodObject<{
|
|
343
165
|
spaceId: z.ZodString;
|
|
344
166
|
properties: z.ZodArray<z.ZodEnum<{
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
id: "id";
|
|
167
|
+
profile: "profile";
|
|
168
|
+
type: "type";
|
|
348
169
|
position: "position";
|
|
170
|
+
id: "id";
|
|
171
|
+
name: "name";
|
|
349
172
|
height: "height";
|
|
350
173
|
depth: "depth";
|
|
351
|
-
|
|
174
|
+
innerProfiles: "innerProfiles";
|
|
352
175
|
room_type: "room_type";
|
|
353
176
|
area: "area";
|
|
354
177
|
breadth: "breadth";
|
|
355
178
|
massType: "massType";
|
|
356
179
|
spaceType: "spaceType";
|
|
180
|
+
areaClass: "areaClass";
|
|
357
181
|
storey: "storey";
|
|
182
|
+
departmentId: "departmentId";
|
|
358
183
|
departmentName: "departmentName";
|
|
359
184
|
departmentColor: "departmentColor";
|
|
360
185
|
absolutePosition: "absolutePosition";
|
|
361
186
|
rotation: "rotation";
|
|
362
187
|
rotationQuaternion: "rotationQuaternion";
|
|
363
188
|
planPoints: "planPoints";
|
|
189
|
+
innerPlanPoints: "innerPlanPoints";
|
|
190
|
+
adjacency: "adjacency";
|
|
364
191
|
}>>;
|
|
365
192
|
}, z.core.$strip>;
|
|
366
193
|
export type PluginSpaceGetArgs = z.infer<typeof PluginSpaceGetArgs>;
|
|
@@ -394,8 +221,24 @@ export declare const PluginSpaceType: z.ZodEnum<{
|
|
|
394
221
|
Envelope: "Envelope";
|
|
395
222
|
Parking: "Parking";
|
|
396
223
|
}>;
|
|
224
|
+
/** The space-type value union (same-name type alias for positional signatures). */
|
|
225
|
+
export type PluginSpaceType = z.infer<typeof PluginSpaceType>;
|
|
397
226
|
/**
|
|
398
|
-
*
|
|
227
|
+
* Area-class classification of a space (mirrors the internal `AreaClass` enum).
|
|
228
|
+
*
|
|
229
|
+
* | Value | Description |
|
|
230
|
+
* |---|---|
|
|
231
|
+
* | `"NET"` | Net (usable) area |
|
|
232
|
+
* | `"GROSS"` | Gross area |
|
|
233
|
+
* | `"EXCLUDED"` | Excluded from area totals |
|
|
234
|
+
*/
|
|
235
|
+
export declare const PluginAreaClass: z.ZodEnum<{
|
|
236
|
+
NET: "NET";
|
|
237
|
+
GROSS: "GROSS";
|
|
238
|
+
EXCLUDED: "EXCLUDED";
|
|
239
|
+
}>;
|
|
240
|
+
/**
|
|
241
|
+
* Result of `get`.
|
|
399
242
|
*
|
|
400
243
|
* A partial object — only the properties that were requested in
|
|
401
244
|
* {@linkcode PluginSpaceGetArgs.properties} will be present.
|
|
@@ -422,6 +265,11 @@ export declare const PluginSpaceGetResult: z.ZodObject<{
|
|
|
422
265
|
Envelope: "Envelope";
|
|
423
266
|
Parking: "Parking";
|
|
424
267
|
}>>>;
|
|
268
|
+
areaClass: z.ZodOptional<z.ZodEnum<{
|
|
269
|
+
NET: "NET";
|
|
270
|
+
GROSS: "GROSS";
|
|
271
|
+
EXCLUDED: "EXCLUDED";
|
|
272
|
+
}>>;
|
|
425
273
|
storey: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
426
274
|
departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
427
275
|
departmentName: z.ZodOptional<z.ZodString>;
|
|
@@ -452,10 +300,21 @@ export declare const PluginSpaceGetResult: z.ZodObject<{
|
|
|
452
300
|
y: z.ZodNumber;
|
|
453
301
|
z: z.ZodNumber;
|
|
454
302
|
}, z.core.$strip>>>;
|
|
303
|
+
profile: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"arc">, string>>]>>>;
|
|
304
|
+
innerProfiles: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"arc">, string>>]>>>>;
|
|
305
|
+
innerPlanPoints: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
306
|
+
x: z.ZodNumber;
|
|
307
|
+
y: z.ZodNumber;
|
|
308
|
+
z: z.ZodNumber;
|
|
309
|
+
}, z.core.$strip>>>>;
|
|
310
|
+
adjacency: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
311
|
+
spaceId: z.ZodString;
|
|
312
|
+
value: z.ZodNumber;
|
|
313
|
+
}, z.core.$strip>>>;
|
|
455
314
|
}, z.core.$strip>;
|
|
456
315
|
export type PluginSpaceGetResult = z.infer<typeof PluginSpaceGetResult>;
|
|
457
316
|
/**
|
|
458
|
-
* Result of
|
|
317
|
+
* Result of `getAll`.
|
|
459
318
|
*
|
|
460
319
|
* | Property | Type | Description |
|
|
461
320
|
* |---|---|---|
|
|
@@ -466,7 +325,7 @@ export declare const PluginSpaceGetAllResult: z.ZodObject<{
|
|
|
466
325
|
}, z.core.$strip>;
|
|
467
326
|
export type PluginSpaceGetAllResult = z.infer<typeof PluginSpaceGetAllResult>;
|
|
468
327
|
/**
|
|
469
|
-
* Arguments for
|
|
328
|
+
* Arguments for `delete`.
|
|
470
329
|
*
|
|
471
330
|
* | Property | Type | Description |
|
|
472
331
|
* |---|---|---|
|
|
@@ -476,7 +335,7 @@ export declare const PluginSpaceDeleteArgs: z.ZodObject<{
|
|
|
476
335
|
spaceId: z.ZodString;
|
|
477
336
|
}, z.core.$strip>;
|
|
478
337
|
export type PluginSpaceDeleteArgs = z.infer<typeof PluginSpaceDeleteArgs>;
|
|
479
|
-
/** Result type for
|
|
338
|
+
/** Result type for `delete` — returns nothing on success. */
|
|
480
339
|
export type PluginSpaceDeleteResult = void;
|
|
481
340
|
/**
|
|
482
341
|
* Supported mass type values for {@linkcode PluginSpaceUpdateArgs.properties.massType}.
|
|
@@ -512,6 +371,8 @@ export declare const PluginMassType: z.ZodEnum<{
|
|
|
512
371
|
Mass: "Mass";
|
|
513
372
|
Site: "Site";
|
|
514
373
|
}>;
|
|
374
|
+
/** The mass-type value union (same-name type alias for positional signatures). */
|
|
375
|
+
export type PluginMassType = z.infer<typeof PluginMassType>;
|
|
515
376
|
/**
|
|
516
377
|
* Well-known (built-in) department IDs.
|
|
517
378
|
*
|
|
@@ -538,8 +399,10 @@ export declare const PluginDepartmentId: z.ZodUnion<readonly [z.ZodEnum<{
|
|
|
538
399
|
ENVELOPE: "ENVELOPE";
|
|
539
400
|
CORE: "CORE";
|
|
540
401
|
}>, z.ZodUUID]>;
|
|
402
|
+
/** The department-id value union (same-name type alias for positional signatures). */
|
|
403
|
+
export type PluginDepartmentId = z.infer<typeof PluginDepartmentId>;
|
|
541
404
|
/**
|
|
542
|
-
* Arguments for
|
|
405
|
+
* Arguments for `update`.
|
|
543
406
|
*
|
|
544
407
|
* | Property | Type | Description |
|
|
545
408
|
* |---|---|---|
|
|
@@ -579,6 +442,11 @@ export declare const PluginSpaceUpdateArgs: z.ZodObject<{
|
|
|
579
442
|
Envelope: "Envelope";
|
|
580
443
|
Parking: "Parking";
|
|
581
444
|
}>>;
|
|
445
|
+
areaClass: z.ZodOptional<z.ZodEnum<{
|
|
446
|
+
NET: "NET";
|
|
447
|
+
GROSS: "GROSS";
|
|
448
|
+
EXCLUDED: "EXCLUDED";
|
|
449
|
+
}>>;
|
|
582
450
|
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
583
451
|
DEFAULT: "DEFAULT";
|
|
584
452
|
SITE: "SITE";
|
|
@@ -589,7 +457,7 @@ export declare const PluginSpaceUpdateArgs: z.ZodObject<{
|
|
|
589
457
|
}, z.core.$strip>;
|
|
590
458
|
export type PluginSpaceUpdateArgs = z.infer<typeof PluginSpaceUpdateArgs>;
|
|
591
459
|
/**
|
|
592
|
-
* Result of
|
|
460
|
+
* Result of `update`.
|
|
593
461
|
*
|
|
594
462
|
* Echoes back the `spaceId` and the values of properties that were updated.
|
|
595
463
|
* Properties that were not included in the update request will be `undefined`.
|
|
@@ -607,7 +475,372 @@ export declare const PluginSpaceUpdateResult: z.ZodObject<{
|
|
|
607
475
|
room_type: z.ZodOptional<z.ZodString>;
|
|
608
476
|
massType: z.ZodOptional<z.ZodString>;
|
|
609
477
|
spaceType: z.ZodOptional<z.ZodString>;
|
|
478
|
+
areaClass: z.ZodOptional<z.ZodEnum<{
|
|
479
|
+
NET: "NET";
|
|
480
|
+
GROSS: "GROSS";
|
|
481
|
+
EXCLUDED: "EXCLUDED";
|
|
482
|
+
}>>;
|
|
610
483
|
departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
611
484
|
}, z.core.$strip>;
|
|
612
485
|
export type PluginSpaceUpdateResult = z.infer<typeof PluginSpaceUpdateResult>;
|
|
486
|
+
/**
|
|
487
|
+
* A single item for `bulkCreate`.
|
|
488
|
+
*
|
|
489
|
+
* Discriminated on `kind`:
|
|
490
|
+
* - `"rectangular"` — a box defined by `position` + `dimensions` (mirrors
|
|
491
|
+
* {@linkcode PluginSpaceCreateRectangularArgs})
|
|
492
|
+
* - `"profile"` — an extruded `profile` (with optional `innerProfiles`) by
|
|
493
|
+
* `extrudeHeight` at `position` (mirrors {@linkcode PluginSpaceCreateFromProfileArgs})
|
|
494
|
+
*
|
|
495
|
+
* Every item may optionally set `room_type`, `spaceType`, `massType`, and
|
|
496
|
+
* `departmentId`; these are applied within the same single undo step as the
|
|
497
|
+
* creation.
|
|
498
|
+
*/
|
|
499
|
+
export declare const PluginSpaceBulkCreateItem: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
500
|
+
kind: z.ZodLiteral<"rectangular">;
|
|
501
|
+
position: z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"vec3">, string>>;
|
|
502
|
+
dimensions: z.ZodObject<{
|
|
503
|
+
width: z.ZodNumber;
|
|
504
|
+
height: z.ZodNumber;
|
|
505
|
+
depth: z.ZodNumber;
|
|
506
|
+
}, z.core.$strip>;
|
|
507
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
508
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
509
|
+
Room: "Room";
|
|
510
|
+
"Program Block": "Program Block";
|
|
511
|
+
Balcony: "Balcony";
|
|
512
|
+
Road: "Road";
|
|
513
|
+
Garden: "Garden";
|
|
514
|
+
Deck: "Deck";
|
|
515
|
+
Pool: "Pool";
|
|
516
|
+
Walkway: "Walkway";
|
|
517
|
+
Envelope: "Envelope";
|
|
518
|
+
Parking: "Parking";
|
|
519
|
+
}>>;
|
|
520
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
521
|
+
Room: "Room";
|
|
522
|
+
Plinth: "Plinth";
|
|
523
|
+
Void: "Void";
|
|
524
|
+
Pergola: "Pergola";
|
|
525
|
+
Furniture: "Furniture";
|
|
526
|
+
"Facade element": "Facade element";
|
|
527
|
+
"Generic mass": "Generic mass";
|
|
528
|
+
Department: "Department";
|
|
529
|
+
Building: "Building";
|
|
530
|
+
"Revit Import": "Revit Import";
|
|
531
|
+
Mass: "Mass";
|
|
532
|
+
Site: "Site";
|
|
533
|
+
}>>;
|
|
534
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
535
|
+
DEFAULT: "DEFAULT";
|
|
536
|
+
SITE: "SITE";
|
|
537
|
+
ENVELOPE: "ENVELOPE";
|
|
538
|
+
CORE: "CORE";
|
|
539
|
+
}>, z.ZodUUID]>>;
|
|
540
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
541
|
+
kind: z.ZodLiteral<"profile">;
|
|
542
|
+
profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"profile">, string>>;
|
|
543
|
+
innerProfiles: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"profile">, string>>>>;
|
|
544
|
+
extrudeHeight: z.ZodNumber;
|
|
545
|
+
position: z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"vec3">, string>>;
|
|
546
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
547
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
548
|
+
Room: "Room";
|
|
549
|
+
"Program Block": "Program Block";
|
|
550
|
+
Balcony: "Balcony";
|
|
551
|
+
Road: "Road";
|
|
552
|
+
Garden: "Garden";
|
|
553
|
+
Deck: "Deck";
|
|
554
|
+
Pool: "Pool";
|
|
555
|
+
Walkway: "Walkway";
|
|
556
|
+
Envelope: "Envelope";
|
|
557
|
+
Parking: "Parking";
|
|
558
|
+
}>>;
|
|
559
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
560
|
+
Room: "Room";
|
|
561
|
+
Plinth: "Plinth";
|
|
562
|
+
Void: "Void";
|
|
563
|
+
Pergola: "Pergola";
|
|
564
|
+
Furniture: "Furniture";
|
|
565
|
+
"Facade element": "Facade element";
|
|
566
|
+
"Generic mass": "Generic mass";
|
|
567
|
+
Department: "Department";
|
|
568
|
+
Building: "Building";
|
|
569
|
+
"Revit Import": "Revit Import";
|
|
570
|
+
Mass: "Mass";
|
|
571
|
+
Site: "Site";
|
|
572
|
+
}>>;
|
|
573
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
574
|
+
DEFAULT: "DEFAULT";
|
|
575
|
+
SITE: "SITE";
|
|
576
|
+
ENVELOPE: "ENVELOPE";
|
|
577
|
+
CORE: "CORE";
|
|
578
|
+
}>, z.ZodUUID]>>;
|
|
579
|
+
}, z.core.$strip>], "kind">;
|
|
580
|
+
export type PluginSpaceBulkCreateItem = z.infer<typeof PluginSpaceBulkCreateItem>;
|
|
581
|
+
/**
|
|
582
|
+
* Arguments for `bulkCreate`.
|
|
583
|
+
*
|
|
584
|
+
* | Property | Type | Description |
|
|
585
|
+
* |---|---|---|
|
|
586
|
+
* | `items` | {@linkcode PluginSpaceBulkCreateItem}`[]` | Spaces to create |
|
|
587
|
+
*/
|
|
588
|
+
export declare const PluginSpaceBulkCreateArgs: z.ZodObject<{
|
|
589
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
590
|
+
kind: z.ZodLiteral<"rectangular">;
|
|
591
|
+
position: z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"vec3">, string>>;
|
|
592
|
+
dimensions: z.ZodObject<{
|
|
593
|
+
width: z.ZodNumber;
|
|
594
|
+
height: z.ZodNumber;
|
|
595
|
+
depth: z.ZodNumber;
|
|
596
|
+
}, z.core.$strip>;
|
|
597
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
598
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
599
|
+
Room: "Room";
|
|
600
|
+
"Program Block": "Program Block";
|
|
601
|
+
Balcony: "Balcony";
|
|
602
|
+
Road: "Road";
|
|
603
|
+
Garden: "Garden";
|
|
604
|
+
Deck: "Deck";
|
|
605
|
+
Pool: "Pool";
|
|
606
|
+
Walkway: "Walkway";
|
|
607
|
+
Envelope: "Envelope";
|
|
608
|
+
Parking: "Parking";
|
|
609
|
+
}>>;
|
|
610
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
611
|
+
Room: "Room";
|
|
612
|
+
Plinth: "Plinth";
|
|
613
|
+
Void: "Void";
|
|
614
|
+
Pergola: "Pergola";
|
|
615
|
+
Furniture: "Furniture";
|
|
616
|
+
"Facade element": "Facade element";
|
|
617
|
+
"Generic mass": "Generic mass";
|
|
618
|
+
Department: "Department";
|
|
619
|
+
Building: "Building";
|
|
620
|
+
"Revit Import": "Revit Import";
|
|
621
|
+
Mass: "Mass";
|
|
622
|
+
Site: "Site";
|
|
623
|
+
}>>;
|
|
624
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
625
|
+
DEFAULT: "DEFAULT";
|
|
626
|
+
SITE: "SITE";
|
|
627
|
+
ENVELOPE: "ENVELOPE";
|
|
628
|
+
CORE: "CORE";
|
|
629
|
+
}>, z.ZodUUID]>>;
|
|
630
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
631
|
+
kind: z.ZodLiteral<"profile">;
|
|
632
|
+
profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"profile">, string>>;
|
|
633
|
+
innerProfiles: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"profile">, string>>>>;
|
|
634
|
+
extrudeHeight: z.ZodNumber;
|
|
635
|
+
position: z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"vec3">, string>>;
|
|
636
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
637
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
638
|
+
Room: "Room";
|
|
639
|
+
"Program Block": "Program Block";
|
|
640
|
+
Balcony: "Balcony";
|
|
641
|
+
Road: "Road";
|
|
642
|
+
Garden: "Garden";
|
|
643
|
+
Deck: "Deck";
|
|
644
|
+
Pool: "Pool";
|
|
645
|
+
Walkway: "Walkway";
|
|
646
|
+
Envelope: "Envelope";
|
|
647
|
+
Parking: "Parking";
|
|
648
|
+
}>>;
|
|
649
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
650
|
+
Room: "Room";
|
|
651
|
+
Plinth: "Plinth";
|
|
652
|
+
Void: "Void";
|
|
653
|
+
Pergola: "Pergola";
|
|
654
|
+
Furniture: "Furniture";
|
|
655
|
+
"Facade element": "Facade element";
|
|
656
|
+
"Generic mass": "Generic mass";
|
|
657
|
+
Department: "Department";
|
|
658
|
+
Building: "Building";
|
|
659
|
+
"Revit Import": "Revit Import";
|
|
660
|
+
Mass: "Mass";
|
|
661
|
+
Site: "Site";
|
|
662
|
+
}>>;
|
|
663
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
664
|
+
DEFAULT: "DEFAULT";
|
|
665
|
+
SITE: "SITE";
|
|
666
|
+
ENVELOPE: "ENVELOPE";
|
|
667
|
+
CORE: "CORE";
|
|
668
|
+
}>, z.ZodUUID]>>;
|
|
669
|
+
}, z.core.$strip>], "kind">>;
|
|
670
|
+
}, z.core.$strip>;
|
|
671
|
+
export type PluginSpaceBulkCreateArgs = z.infer<typeof PluginSpaceBulkCreateArgs>;
|
|
672
|
+
/**
|
|
673
|
+
* Result of `bulkCreate`.
|
|
674
|
+
*
|
|
675
|
+
* | Property | Type | Description |
|
|
676
|
+
* |---|---|---|
|
|
677
|
+
* | `spaceIds` | `string[]` | IDs of the created spaces, in input order |
|
|
678
|
+
*/
|
|
679
|
+
export declare const PluginSpaceBulkCreateResult: z.ZodObject<{
|
|
680
|
+
spaceIds: z.ZodArray<z.ZodString>;
|
|
681
|
+
}, z.core.$strip>;
|
|
682
|
+
export type PluginSpaceBulkCreateResult = z.infer<typeof PluginSpaceBulkCreateResult>;
|
|
683
|
+
/**
|
|
684
|
+
* A single item for `bulkUpdate`.
|
|
685
|
+
*
|
|
686
|
+
* Targets an existing space by `spaceId`. Geometry fields `profile` and
|
|
687
|
+
* `extrudeHeight` must be supplied **together** (mirrors
|
|
688
|
+
* {@linkcode PluginSpaceUpdateGeometryFromProfileArgs}). Property changes are
|
|
689
|
+
* nested under `properties`, mirroring {@linkcode PluginSpaceUpdateArgs}.
|
|
690
|
+
*
|
|
691
|
+
* | Property | Type | Description |
|
|
692
|
+
* |---|---|---|
|
|
693
|
+
* | `spaceId` | `string` | The space to update |
|
|
694
|
+
* | `profile` | {@linkcode ProfileHandle}`?` | New floor shape handle (requires `extrudeHeight`) |
|
|
695
|
+
* | `extrudeHeight` | `number?` | New extrusion height (requires `profile`) |
|
|
696
|
+
* | `properties` | `object?` | Property changes (same shape as {@linkcode PluginSpaceUpdateArgs.properties}) |
|
|
697
|
+
*/
|
|
698
|
+
export declare const PluginSpaceBulkUpdateItem: z.ZodObject<{
|
|
699
|
+
spaceId: z.ZodString;
|
|
700
|
+
profile: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"profile">, string>>>;
|
|
701
|
+
extrudeHeight: z.ZodOptional<z.ZodNumber>;
|
|
702
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
703
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
704
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
705
|
+
Room: "Room";
|
|
706
|
+
Plinth: "Plinth";
|
|
707
|
+
Void: "Void";
|
|
708
|
+
Pergola: "Pergola";
|
|
709
|
+
Furniture: "Furniture";
|
|
710
|
+
"Facade element": "Facade element";
|
|
711
|
+
"Generic mass": "Generic mass";
|
|
712
|
+
Department: "Department";
|
|
713
|
+
Building: "Building";
|
|
714
|
+
"Revit Import": "Revit Import";
|
|
715
|
+
Mass: "Mass";
|
|
716
|
+
Site: "Site";
|
|
717
|
+
}>>;
|
|
718
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
719
|
+
Room: "Room";
|
|
720
|
+
"Program Block": "Program Block";
|
|
721
|
+
Balcony: "Balcony";
|
|
722
|
+
Road: "Road";
|
|
723
|
+
Garden: "Garden";
|
|
724
|
+
Deck: "Deck";
|
|
725
|
+
Pool: "Pool";
|
|
726
|
+
Walkway: "Walkway";
|
|
727
|
+
Envelope: "Envelope";
|
|
728
|
+
Parking: "Parking";
|
|
729
|
+
}>>;
|
|
730
|
+
areaClass: z.ZodOptional<z.ZodEnum<{
|
|
731
|
+
NET: "NET";
|
|
732
|
+
GROSS: "GROSS";
|
|
733
|
+
EXCLUDED: "EXCLUDED";
|
|
734
|
+
}>>;
|
|
735
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
736
|
+
DEFAULT: "DEFAULT";
|
|
737
|
+
SITE: "SITE";
|
|
738
|
+
ENVELOPE: "ENVELOPE";
|
|
739
|
+
CORE: "CORE";
|
|
740
|
+
}>, z.ZodUUID]>>;
|
|
741
|
+
}, z.core.$strip>>;
|
|
742
|
+
}, z.core.$strip>;
|
|
743
|
+
export type PluginSpaceBulkUpdateItem = z.infer<typeof PluginSpaceBulkUpdateItem>;
|
|
744
|
+
/**
|
|
745
|
+
* Arguments for `bulkUpdate`.
|
|
746
|
+
*
|
|
747
|
+
* | Property | Type | Description |
|
|
748
|
+
* |---|---|---|
|
|
749
|
+
* | `items` | {@linkcode PluginSpaceBulkUpdateItem}`[]` | Spaces to update |
|
|
750
|
+
*/
|
|
751
|
+
export declare const PluginSpaceBulkUpdateArgs: z.ZodObject<{
|
|
752
|
+
items: z.ZodArray<z.ZodObject<{
|
|
753
|
+
spaceId: z.ZodString;
|
|
754
|
+
profile: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../..").Handle<"profile">, string>>>;
|
|
755
|
+
extrudeHeight: z.ZodOptional<z.ZodNumber>;
|
|
756
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
757
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
758
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
759
|
+
Room: "Room";
|
|
760
|
+
Plinth: "Plinth";
|
|
761
|
+
Void: "Void";
|
|
762
|
+
Pergola: "Pergola";
|
|
763
|
+
Furniture: "Furniture";
|
|
764
|
+
"Facade element": "Facade element";
|
|
765
|
+
"Generic mass": "Generic mass";
|
|
766
|
+
Department: "Department";
|
|
767
|
+
Building: "Building";
|
|
768
|
+
"Revit Import": "Revit Import";
|
|
769
|
+
Mass: "Mass";
|
|
770
|
+
Site: "Site";
|
|
771
|
+
}>>;
|
|
772
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
773
|
+
Room: "Room";
|
|
774
|
+
"Program Block": "Program Block";
|
|
775
|
+
Balcony: "Balcony";
|
|
776
|
+
Road: "Road";
|
|
777
|
+
Garden: "Garden";
|
|
778
|
+
Deck: "Deck";
|
|
779
|
+
Pool: "Pool";
|
|
780
|
+
Walkway: "Walkway";
|
|
781
|
+
Envelope: "Envelope";
|
|
782
|
+
Parking: "Parking";
|
|
783
|
+
}>>;
|
|
784
|
+
areaClass: z.ZodOptional<z.ZodEnum<{
|
|
785
|
+
NET: "NET";
|
|
786
|
+
GROSS: "GROSS";
|
|
787
|
+
EXCLUDED: "EXCLUDED";
|
|
788
|
+
}>>;
|
|
789
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
790
|
+
DEFAULT: "DEFAULT";
|
|
791
|
+
SITE: "SITE";
|
|
792
|
+
ENVELOPE: "ENVELOPE";
|
|
793
|
+
CORE: "CORE";
|
|
794
|
+
}>, z.ZodUUID]>>;
|
|
795
|
+
}, z.core.$strip>>;
|
|
796
|
+
}, z.core.$strip>>;
|
|
797
|
+
}, z.core.$strip>;
|
|
798
|
+
export type PluginSpaceBulkUpdateArgs = z.infer<typeof PluginSpaceBulkUpdateArgs>;
|
|
799
|
+
/**
|
|
800
|
+
* Result of `bulkUpdate`.
|
|
801
|
+
*
|
|
802
|
+
* Echoes one {@linkcode PluginSpaceUpdateResult} per item, in input order —
|
|
803
|
+
* the same per-space shape returned by `update`.
|
|
804
|
+
*
|
|
805
|
+
* | Property | Type | Description |
|
|
806
|
+
* |---|---|---|
|
|
807
|
+
* | `spaces` | {@linkcode PluginSpaceUpdateResult}`[]` | Per-item updated values, in input order |
|
|
808
|
+
*/
|
|
809
|
+
export declare const PluginSpaceBulkUpdateResult: z.ZodObject<{
|
|
810
|
+
spaces: z.ZodArray<z.ZodObject<{
|
|
811
|
+
spaceId: z.ZodString;
|
|
812
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
813
|
+
massType: z.ZodOptional<z.ZodString>;
|
|
814
|
+
spaceType: z.ZodOptional<z.ZodString>;
|
|
815
|
+
areaClass: z.ZodOptional<z.ZodEnum<{
|
|
816
|
+
NET: "NET";
|
|
817
|
+
GROSS: "GROSS";
|
|
818
|
+
EXCLUDED: "EXCLUDED";
|
|
819
|
+
}>>;
|
|
820
|
+
departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
821
|
+
}, z.core.$strip>>;
|
|
822
|
+
}, z.core.$strip>;
|
|
823
|
+
export type PluginSpaceBulkUpdateResult = z.infer<typeof PluginSpaceBulkUpdateResult>;
|
|
824
|
+
/**
|
|
825
|
+
* Arguments for `bulkDelete`.
|
|
826
|
+
*
|
|
827
|
+
* | Property | Type | Description |
|
|
828
|
+
* |---|---|---|
|
|
829
|
+
* | `spaceIds` | `string[]` | The space IDs to delete |
|
|
830
|
+
*/
|
|
831
|
+
export declare const PluginSpaceBulkDeleteArgs: z.ZodObject<{
|
|
832
|
+
spaceIds: z.ZodArray<z.ZodString>;
|
|
833
|
+
}, z.core.$strip>;
|
|
834
|
+
export type PluginSpaceBulkDeleteArgs = z.infer<typeof PluginSpaceBulkDeleteArgs>;
|
|
835
|
+
/**
|
|
836
|
+
* Result of `bulkDelete`.
|
|
837
|
+
*
|
|
838
|
+
* | Property | Type | Description |
|
|
839
|
+
* |---|---|---|
|
|
840
|
+
* | `deletedSpaceIds` | `string[]` | The space IDs that were removed |
|
|
841
|
+
*/
|
|
842
|
+
export declare const PluginSpaceBulkDeleteResult: z.ZodObject<{
|
|
843
|
+
deletedSpaceIds: z.ZodArray<z.ZodString>;
|
|
844
|
+
}, z.core.$strip>;
|
|
845
|
+
export type PluginSpaceBulkDeleteResult = z.infer<typeof PluginSpaceBulkDeleteResult>;
|
|
613
846
|
//# sourceMappingURL=space.d.ts.map
|