@snaptrude/plugin-core 0.2.4 → 0.2.6
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/CHANGELOG.md +13 -0
- package/dist/api/core/geom/arc.d.ts +81 -0
- package/dist/api/core/geom/arc.d.ts.map +1 -0
- package/dist/api/core/geom/curve.d.ts +70 -0
- package/dist/api/core/geom/curve.d.ts.map +1 -0
- package/dist/api/core/geom/index.d.ts +32 -0
- package/dist/api/core/geom/index.d.ts.map +1 -0
- package/dist/api/core/geom/line.d.ts +56 -0
- package/dist/api/core/geom/line.d.ts.map +1 -0
- package/dist/api/core/geom/profile.d.ts +121 -0
- package/dist/api/core/geom/profile.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +18 -0
- package/dist/api/core/index.d.ts.map +1 -0
- package/dist/api/core/math/index.d.ts +18 -0
- package/dist/api/core/math/index.d.ts.map +1 -0
- package/dist/api/core/math/quat.d.ts +187 -0
- package/dist/api/core/math/quat.d.ts.map +1 -0
- package/dist/api/core/math/vec3.d.ts +156 -0
- package/dist/api/core/math/vec3.d.ts.map +1 -0
- package/dist/api/entity/buildableEnvelope.d.ts +233 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
- package/dist/api/entity/department.d.ts +99 -0
- package/dist/api/entity/department.d.ts.map +1 -0
- package/dist/api/entity/index.d.ts +33 -0
- package/dist/api/entity/index.d.ts.map +1 -0
- package/dist/api/entity/referenceLine.d.ts +259 -0
- package/dist/api/entity/referenceLine.d.ts.map +1 -0
- package/dist/api/entity/space.d.ts +1490 -0
- package/dist/api/entity/space.d.ts.map +1 -0
- package/dist/api/entity/story.d.ts +239 -0
- package/dist/api/entity/story.d.ts.map +1 -0
- package/dist/api/index.d.ts +30 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/tools/copy.d.ts +59 -0
- package/dist/api/tools/copy.d.ts.map +1 -0
- package/dist/api/tools/index.d.ts +29 -0
- package/dist/api/tools/index.d.ts.map +1 -0
- package/dist/api/tools/offset.d.ts +43 -0
- package/dist/api/tools/offset.d.ts.map +1 -0
- package/dist/api/tools/selection.d.ts +48 -0
- package/dist/api/tools/selection.d.ts.map +1 -0
- package/dist/api/tools/transform.d.ts +114 -0
- package/dist/api/tools/transform.d.ts.map +1 -0
- package/dist/api/units/index.d.ts +163 -0
- package/dist/api/units/index.d.ts.map +1 -0
- package/dist/host-utils.d.ts +41 -0
- package/dist/host-utils.d.ts.map +1 -0
- package/dist/index.cjs +71 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +16 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/api/entity/space.ts +270 -0
|
@@ -0,0 +1,1490 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Space (room/mass) management — create, query, update, and delete spaces.
|
|
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 used as
|
|
48
|
+
* the outer boundary and extruded upward (along the Y axis) by
|
|
49
|
+
* {@linkcode PluginSpaceCreateFromProfileArgs.extrudeHeight extrudeHeight},
|
|
50
|
+
* then offset by {@linkcode PluginSpaceCreateFromProfileArgs.position
|
|
51
|
+
* position}. Optional {@linkcode PluginSpaceCreateFromProfileArgs.innerProfiles
|
|
52
|
+
* innerProfiles} are used as holes inside the outer boundary. The created
|
|
53
|
+
* space is automatically assigned to the active story and a default department.
|
|
54
|
+
*
|
|
55
|
+
* Use {@linkcode PluginProfileApi.fromLinePoints} to quickly build a profile
|
|
56
|
+
* from a list of points.
|
|
57
|
+
*
|
|
58
|
+
* @param args - An object containing:
|
|
59
|
+
* - {@linkcode PluginSpaceCreateFromProfileArgs.profile args.profile} — A closed
|
|
60
|
+
* {@linkcode PProfile} defining the outer floor shape
|
|
61
|
+
* - {@linkcode PluginSpaceCreateFromProfileArgs.innerProfiles args.innerProfiles} —
|
|
62
|
+
* Optional closed {@linkcode PProfile}`[]` loops to subtract as holes
|
|
63
|
+
* - {@linkcode PluginSpaceCreateFromProfileArgs.extrudeHeight args.extrudeHeight} —
|
|
64
|
+
* Extrusion height in Babylon units
|
|
65
|
+
* - {@linkcode PluginSpaceCreateFromProfileArgs.position args.position} — Offset
|
|
66
|
+
* position as a {@linkcode PVec3} in Babylon units
|
|
67
|
+
* @returns A {@linkcode PluginSpaceCreateFromProfileResult} with the `spaceId`
|
|
68
|
+
* of the created space
|
|
69
|
+
* @throws If the profile is invalid or mesh creation fails
|
|
70
|
+
*
|
|
71
|
+
* # Example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const { vec3 } = snaptrude.core.math
|
|
74
|
+
*
|
|
75
|
+
* const outerProfile = await snaptrude.core.geom.profile.fromLinePoints({
|
|
76
|
+
* points: [
|
|
77
|
+
* vec3.new(0, 0, 0),
|
|
78
|
+
* vec3.new(10, 0, 0),
|
|
79
|
+
* vec3.new(10, 0, 8),
|
|
80
|
+
* vec3.new(0, 0, 8),
|
|
81
|
+
* ],
|
|
82
|
+
* })
|
|
83
|
+
* const holeProfile = await snaptrude.core.geom.profile.fromLinePoints({
|
|
84
|
+
* points: [
|
|
85
|
+
* vec3.new(3, 0, 3),
|
|
86
|
+
* vec3.new(7, 0, 3),
|
|
87
|
+
* vec3.new(7, 0, 5),
|
|
88
|
+
* vec3.new(3, 0, 5),
|
|
89
|
+
* ],
|
|
90
|
+
* })
|
|
91
|
+
*
|
|
92
|
+
* const { spaceId } = await snaptrude.entity.space.createFromProfile({
|
|
93
|
+
* profile: outerProfile,
|
|
94
|
+
* innerProfiles: [holeProfile],
|
|
95
|
+
* extrudeHeight: 3,
|
|
96
|
+
* position: vec3.new(0, 0, 0),
|
|
97
|
+
* })
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
abstract createFromProfile({ profile, innerProfiles, extrudeHeight, position, }: PluginSpaceCreateFromProfileArgs): PluginApiReturn<PluginSpaceCreateFromProfileResult>;
|
|
101
|
+
/**
|
|
102
|
+
* Update a space's BRep and mesh geometry by extruding a 2D profile.
|
|
103
|
+
*
|
|
104
|
+
* The {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.profile profile} is
|
|
105
|
+
* extruded upward (along the Y axis) by
|
|
106
|
+
* {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.extrudeHeight extrudeHeight}
|
|
107
|
+
* and applied to the existing space. The space keeps the same `spaceId`,
|
|
108
|
+
* metadata, department, and transform; only its geometry is replaced.
|
|
109
|
+
*
|
|
110
|
+
* Profile points are interpreted in scene coordinates. Profiles returned by
|
|
111
|
+
* {@linkcode PluginSpaceApi.get} with `"profile"` can be passed back directly;
|
|
112
|
+
* `"planPoints"` can be used to construct line-only profiles in the same X/Z
|
|
113
|
+
* plan coordinate space.
|
|
114
|
+
*
|
|
115
|
+
* Use {@linkcode PluginProfileApi.fromLinePoints} to quickly build a profile
|
|
116
|
+
* from a list of points.
|
|
117
|
+
*
|
|
118
|
+
* @param args - An object containing:
|
|
119
|
+
* - {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.spaceId args.spaceId} —
|
|
120
|
+
* The unique space ID to update
|
|
121
|
+
* - {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.profile args.profile} —
|
|
122
|
+
* A closed {@linkcode PProfile} defining the new floor shape
|
|
123
|
+
* - {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.extrudeHeight
|
|
124
|
+
* args.extrudeHeight} — New extrusion height in Babylon units
|
|
125
|
+
* @returns A {@linkcode PluginSpaceUpdateGeometryFromProfileResult} with the
|
|
126
|
+
* `spaceId` of the updated space
|
|
127
|
+
* @throws If the space does not exist, the component is not a space/mass, the
|
|
128
|
+
* height is not positive, or the profile cannot create valid geometry
|
|
129
|
+
*
|
|
130
|
+
* # Example
|
|
131
|
+
* ```ts
|
|
132
|
+
* const { vec3 } = snaptrude.core.math
|
|
133
|
+
*
|
|
134
|
+
* const profile = await snaptrude.core.geom.profile.fromLinePoints({
|
|
135
|
+
* points: [
|
|
136
|
+
* vec3.new(0, 0, 0),
|
|
137
|
+
* vec3.new(12, 0, 0),
|
|
138
|
+
* vec3.new(12, 0, 6),
|
|
139
|
+
* vec3.new(0, 0, 6),
|
|
140
|
+
* ],
|
|
141
|
+
* })
|
|
142
|
+
*
|
|
143
|
+
* const { spaceId } = await snaptrude.entity.space.updateGeometryFromProfile({
|
|
144
|
+
* spaceId: "some-space-id",
|
|
145
|
+
* profile,
|
|
146
|
+
* extrudeHeight: 4,
|
|
147
|
+
* })
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
abstract updateGeometryFromProfile({ spaceId, profile, extrudeHeight, }: PluginSpaceUpdateGeometryFromProfileArgs): PluginApiReturn<PluginSpaceUpdateGeometryFromProfileResult>;
|
|
151
|
+
/**
|
|
152
|
+
* Get the IDs of all spaces in the current project.
|
|
153
|
+
*
|
|
154
|
+
* Returns every space (mass that is not a building) across all stories.
|
|
155
|
+
* Use the returned IDs with {@linkcode PluginSpaceApi.get} to query
|
|
156
|
+
* individual space properties.
|
|
157
|
+
*
|
|
158
|
+
* @returns A {@linkcode PluginSpaceGetAllResult} with a `spacesIds` array
|
|
159
|
+
*
|
|
160
|
+
* # Example
|
|
161
|
+
* ```ts
|
|
162
|
+
* const { spacesIds } = await snaptrude.entity.space.getAll()
|
|
163
|
+
* console.log(`Project has ${spacesIds.length} spaces`)
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
abstract getAll(): PluginApiReturn<PluginSpaceGetAllResult>;
|
|
167
|
+
/**
|
|
168
|
+
* Get properties of a space by its ID.
|
|
169
|
+
*
|
|
170
|
+
* Only the properties listed in {@linkcode PluginSpaceGetArgs.properties
|
|
171
|
+
* args.properties} are returned — unlisted properties will be `undefined`
|
|
172
|
+
* in the result.
|
|
173
|
+
*
|
|
174
|
+
* @param args - An object containing:
|
|
175
|
+
* - {@linkcode PluginSpaceGetArgs.spaceId args.spaceId} — The unique space ID
|
|
176
|
+
* (as returned by creation methods or {@linkcode PluginSpaceApi.getAll})
|
|
177
|
+
* - {@linkcode PluginSpaceGetArgs.properties args.properties} — Array of property
|
|
178
|
+
* names to retrieve. See {@linkcode PluginSpaceGetProperty} for available values.
|
|
179
|
+
* @returns A partial {@linkcode PluginSpaceGetResult} containing only the requested
|
|
180
|
+
* properties
|
|
181
|
+
* @throws If the space does not exist or the component is not a space/mass
|
|
182
|
+
*
|
|
183
|
+
* # Example
|
|
184
|
+
* ```ts
|
|
185
|
+
* const info = await snaptrude.entity.space.get({
|
|
186
|
+
* spaceId: "some-space-id",
|
|
187
|
+
* properties: ["name", "area", "position"],
|
|
188
|
+
* })
|
|
189
|
+
* console.log(info.name, info.area, info.position)
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
abstract get({ spaceId, properties, }: PluginSpaceGetArgs): PluginApiReturn<PluginSpaceGetResult>;
|
|
193
|
+
/**
|
|
194
|
+
* Delete a space by its ID.
|
|
195
|
+
*
|
|
196
|
+
* Permanently removes the space and its associated mesh from the scene.
|
|
197
|
+
* This operation is undoable via Snaptrude's command system.
|
|
198
|
+
*
|
|
199
|
+
* @param args - An object containing:
|
|
200
|
+
* - {@linkcode PluginSpaceDeleteArgs.spaceId args.spaceId} — The unique space ID
|
|
201
|
+
* to delete
|
|
202
|
+
* @throws If the space does not exist or the component is not a space/mass
|
|
203
|
+
*
|
|
204
|
+
* # Example
|
|
205
|
+
* ```ts
|
|
206
|
+
* await snaptrude.entity.space.delete({ spaceId: "some-space-id" })
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
abstract delete({ spaceId, }: PluginSpaceDeleteArgs): PluginApiReturn<PluginSpaceDeleteResult>;
|
|
210
|
+
/**
|
|
211
|
+
* Update properties of a space by its ID.
|
|
212
|
+
*
|
|
213
|
+
* Only the properties provided in {@linkcode PluginSpaceUpdateArgs.properties
|
|
214
|
+
* args.properties} will be updated — omitted properties remain unchanged.
|
|
215
|
+
* This operation is undoable via Snaptrude's command system.
|
|
216
|
+
*
|
|
217
|
+
* @param args - An object containing:
|
|
218
|
+
* - {@linkcode PluginSpaceUpdateArgs.spaceId args.spaceId} — The unique space ID
|
|
219
|
+
* to update
|
|
220
|
+
* - {@linkcode PluginSpaceUpdateArgs.properties args.properties} — Key/value pairs
|
|
221
|
+
* of properties to update. See {@linkcode PluginSpaceUpdateArgs} for supported fields.
|
|
222
|
+
* @returns A {@linkcode PluginSpaceUpdateResult} echoing back the `spaceId` and
|
|
223
|
+
* the updated property values
|
|
224
|
+
* @throws If the space does not exist or the component is not a space/mass
|
|
225
|
+
*
|
|
226
|
+
* # Example
|
|
227
|
+
* ```ts
|
|
228
|
+
* const result = await snaptrude.entity.space.update({
|
|
229
|
+
* spaceId: "some-space-id",
|
|
230
|
+
* properties: {
|
|
231
|
+
* room_type: "Kitchen",
|
|
232
|
+
* massType: "Room",
|
|
233
|
+
* departmentId: "CORE",
|
|
234
|
+
* },
|
|
235
|
+
* })
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
abstract update(args: PluginSpaceUpdateArgs): PluginApiReturn<PluginSpaceUpdateResult>;
|
|
239
|
+
/**
|
|
240
|
+
* Create many spaces in a single undoable operation.
|
|
241
|
+
*
|
|
242
|
+
* Each item is either a rectangular box (`kind: "rectangular"`) or an
|
|
243
|
+
* extruded profile (`kind: "profile"`), and may optionally set `room_type`,
|
|
244
|
+
* `spaceType`, `massType`, and `departmentId`. All creations — and the
|
|
245
|
+
* optional property assignments — are batched into **one** command, so the
|
|
246
|
+
* entire batch is undone/redone in a single step.
|
|
247
|
+
*
|
|
248
|
+
* All items are validated first; if any item is invalid the call **throws**
|
|
249
|
+
* and no spaces are created (nothing is applied) — consistent with the
|
|
250
|
+
* single-item create methods.
|
|
251
|
+
*
|
|
252
|
+
* @param args - {@linkcode PluginSpaceBulkCreateArgs} with an `items` array
|
|
253
|
+
* @returns A {@linkcode PluginSpaceBulkCreateResult} with the `spaceIds` of
|
|
254
|
+
* the created spaces, in input order
|
|
255
|
+
* @throws If any item has invalid dimensions, height, or profile
|
|
256
|
+
*
|
|
257
|
+
* # Example
|
|
258
|
+
* ```ts
|
|
259
|
+
* const { vec3 } = snaptrude.core.math
|
|
260
|
+
*
|
|
261
|
+
* const { spaceIds } = await snaptrude.entity.space.bulkCreate({
|
|
262
|
+
* items: [
|
|
263
|
+
* {
|
|
264
|
+
* kind: "rectangular",
|
|
265
|
+
* position: vec3.new(0, 0, 0),
|
|
266
|
+
* dimensions: { width: 5, height: 3, depth: 4 },
|
|
267
|
+
* spaceType: "Room",
|
|
268
|
+
* departmentId: "CORE",
|
|
269
|
+
* },
|
|
270
|
+
* {
|
|
271
|
+
* kind: "profile",
|
|
272
|
+
* profile: await snaptrude.core.geom.profile.fromLinePoints({
|
|
273
|
+
* points: [vec3.new(0, 0, 0), vec3.new(8, 0, 0), vec3.new(8, 0, 6), vec3.new(0, 0, 6)],
|
|
274
|
+
* }),
|
|
275
|
+
* extrudeHeight: 3,
|
|
276
|
+
* position: vec3.new(10, 0, 0),
|
|
277
|
+
* massType: "Room",
|
|
278
|
+
* },
|
|
279
|
+
* ],
|
|
280
|
+
* })
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
283
|
+
abstract bulkCreate(args: PluginSpaceBulkCreateArgs): PluginApiReturn<PluginSpaceBulkCreateResult>;
|
|
284
|
+
/**
|
|
285
|
+
* Update many existing spaces in a single undoable operation.
|
|
286
|
+
*
|
|
287
|
+
* Each item targets an existing space by `spaceId` and may change its
|
|
288
|
+
* geometry (`profile` + `extrudeHeight`, which must be supplied together) and/or
|
|
289
|
+
* its `properties` (`room_type`, `massType`, `spaceType`, `departmentId` —
|
|
290
|
+
* nested under `properties`, mirroring {@linkcode PluginSpaceApi.update}). All
|
|
291
|
+
* changes are batched into **one** command, so the entire batch is
|
|
292
|
+
* undone/redone in a single step.
|
|
293
|
+
*
|
|
294
|
+
* All items are validated first; if any item is invalid — an unknown
|
|
295
|
+
* `spaceId`, a non-positive height, or supplying only one of
|
|
296
|
+
* `profile`/`extrudeHeight` — the call **throws** and no changes are applied.
|
|
297
|
+
*
|
|
298
|
+
* @param args - {@linkcode PluginSpaceBulkUpdateArgs} with an `items` array
|
|
299
|
+
* @returns A {@linkcode PluginSpaceBulkUpdateResult} echoing one
|
|
300
|
+
* {@linkcode PluginSpaceUpdateResult} per item in `spaces`, in input order
|
|
301
|
+
* @throws If any item targets an unknown space, has a non-positive height, or
|
|
302
|
+
* supplies only one of `profile`/`extrudeHeight`
|
|
303
|
+
*
|
|
304
|
+
* # Example
|
|
305
|
+
* ```ts
|
|
306
|
+
* const { spaces } = await snaptrude.entity.space.bulkUpdate({
|
|
307
|
+
* items: [
|
|
308
|
+
* { spaceId: "space-a", properties: { room_type: "Kitchen", spaceType: "Room" } },
|
|
309
|
+
* { spaceId: "space-b", profile, extrudeHeight: 4 },
|
|
310
|
+
* ],
|
|
311
|
+
* })
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
abstract bulkUpdate(args: PluginSpaceBulkUpdateArgs): PluginApiReturn<PluginSpaceBulkUpdateResult>;
|
|
315
|
+
/**
|
|
316
|
+
* Delete many spaces in a single undoable operation.
|
|
317
|
+
*
|
|
318
|
+
* All deletions are batched into **one** command, so the entire batch is
|
|
319
|
+
* undone/redone in a single step.
|
|
320
|
+
*
|
|
321
|
+
* All IDs are validated first; if any ID is unknown or is not a space the
|
|
322
|
+
* call **throws** and no spaces are deleted — consistent with the single-item
|
|
323
|
+
* {@linkcode PluginSpaceApi.delete}.
|
|
324
|
+
*
|
|
325
|
+
* @param args - {@linkcode PluginSpaceBulkDeleteArgs} with a `spaceIds` array
|
|
326
|
+
* @returns A {@linkcode PluginSpaceBulkDeleteResult} with `deletedSpaceIds`
|
|
327
|
+
* (the removed IDs, in input order)
|
|
328
|
+
* @throws If any ID does not resolve to an existing space
|
|
329
|
+
*
|
|
330
|
+
* # Example
|
|
331
|
+
* ```ts
|
|
332
|
+
* await snaptrude.entity.space.bulkDelete({ spaceIds: ["space-a", "space-b"] })
|
|
333
|
+
* ```
|
|
334
|
+
*/
|
|
335
|
+
abstract bulkDelete(args: PluginSpaceBulkDeleteArgs): PluginApiReturn<PluginSpaceBulkDeleteResult>;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Arguments for {@linkcode PluginSpaceApi.createRectangular}.
|
|
339
|
+
*
|
|
340
|
+
* | Property | Type | Description |
|
|
341
|
+
* |---|---|---|
|
|
342
|
+
* | `position` | {@linkcode PVec3} | Origin position in Babylon units |
|
|
343
|
+
* | `dimensions` | `{ width, height, depth }` | Box dimensions in Babylon units |
|
|
344
|
+
*/
|
|
345
|
+
export declare const PluginSpaceCreateRectangularArgs: z.ZodObject<{
|
|
346
|
+
position: z.ZodObject<{
|
|
347
|
+
x: z.ZodNumber;
|
|
348
|
+
y: z.ZodNumber;
|
|
349
|
+
z: z.ZodNumber;
|
|
350
|
+
}, z.core.$strip>;
|
|
351
|
+
dimensions: z.ZodObject<{
|
|
352
|
+
width: z.ZodNumber;
|
|
353
|
+
height: z.ZodNumber;
|
|
354
|
+
depth: z.ZodNumber;
|
|
355
|
+
}, z.core.$strip>;
|
|
356
|
+
}, z.core.$strip>;
|
|
357
|
+
export type PluginSpaceCreateRectangularArgs = z.infer<typeof PluginSpaceCreateRectangularArgs>;
|
|
358
|
+
/**
|
|
359
|
+
* Result of {@linkcode PluginSpaceApi.createRectangular}.
|
|
360
|
+
*
|
|
361
|
+
* | Property | Type | Description |
|
|
362
|
+
* |---|---|---|
|
|
363
|
+
* | `spaceId` | `string` | Unique ID of the created space |
|
|
364
|
+
*/
|
|
365
|
+
export declare const PluginSpaceCreateRectangularResult: z.ZodObject<{
|
|
366
|
+
spaceId: z.ZodString;
|
|
367
|
+
}, z.core.$strip>;
|
|
368
|
+
export type PluginSpaceCreateRectangularResult = z.infer<typeof PluginSpaceCreateRectangularResult>;
|
|
369
|
+
/**
|
|
370
|
+
* Arguments for {@linkcode PluginSpaceApi.createFromProfile}.
|
|
371
|
+
*
|
|
372
|
+
* | Property | Type | Description |
|
|
373
|
+
* |---|---|---|
|
|
374
|
+
* | `profile` | {@linkcode PProfile} | Closed 2D profile defining the outer floor shape |
|
|
375
|
+
* | `innerProfiles` | {@linkcode PProfile}`[]` | Optional closed profiles to subtract as holes |
|
|
376
|
+
* | `extrudeHeight` | `number` | Extrusion height in Babylon units |
|
|
377
|
+
* | `position` | {@linkcode PVec3} | Offset position in Babylon units |
|
|
378
|
+
*/
|
|
379
|
+
export declare const PluginSpaceCreateFromProfileArgs: z.ZodObject<{
|
|
380
|
+
profile: z.ZodObject<{
|
|
381
|
+
curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
382
|
+
curveType: z.ZodLiteral<"Line">;
|
|
383
|
+
startPoint: z.ZodObject<{
|
|
384
|
+
x: z.ZodNumber;
|
|
385
|
+
y: z.ZodNumber;
|
|
386
|
+
z: z.ZodNumber;
|
|
387
|
+
}, z.core.$strip>;
|
|
388
|
+
endPoint: z.ZodObject<{
|
|
389
|
+
x: z.ZodNumber;
|
|
390
|
+
y: z.ZodNumber;
|
|
391
|
+
z: z.ZodNumber;
|
|
392
|
+
}, z.core.$strip>;
|
|
393
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
394
|
+
curveType: z.ZodLiteral<"Arc">;
|
|
395
|
+
startPoint: z.ZodObject<{
|
|
396
|
+
x: z.ZodNumber;
|
|
397
|
+
y: z.ZodNumber;
|
|
398
|
+
z: z.ZodNumber;
|
|
399
|
+
}, z.core.$strip>;
|
|
400
|
+
endPoint: z.ZodObject<{
|
|
401
|
+
x: z.ZodNumber;
|
|
402
|
+
y: z.ZodNumber;
|
|
403
|
+
z: z.ZodNumber;
|
|
404
|
+
}, z.core.$strip>;
|
|
405
|
+
centrePoint: z.ZodObject<{
|
|
406
|
+
x: z.ZodNumber;
|
|
407
|
+
y: z.ZodNumber;
|
|
408
|
+
z: z.ZodNumber;
|
|
409
|
+
}, z.core.$strip>;
|
|
410
|
+
axis: z.ZodObject<{
|
|
411
|
+
x: z.ZodNumber;
|
|
412
|
+
y: z.ZodNumber;
|
|
413
|
+
z: z.ZodNumber;
|
|
414
|
+
}, z.core.$strip>;
|
|
415
|
+
}, z.core.$strip>], "curveType">>;
|
|
416
|
+
}, z.core.$strip>;
|
|
417
|
+
innerProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
418
|
+
curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
419
|
+
curveType: z.ZodLiteral<"Line">;
|
|
420
|
+
startPoint: z.ZodObject<{
|
|
421
|
+
x: z.ZodNumber;
|
|
422
|
+
y: z.ZodNumber;
|
|
423
|
+
z: z.ZodNumber;
|
|
424
|
+
}, z.core.$strip>;
|
|
425
|
+
endPoint: z.ZodObject<{
|
|
426
|
+
x: z.ZodNumber;
|
|
427
|
+
y: z.ZodNumber;
|
|
428
|
+
z: z.ZodNumber;
|
|
429
|
+
}, z.core.$strip>;
|
|
430
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
431
|
+
curveType: z.ZodLiteral<"Arc">;
|
|
432
|
+
startPoint: z.ZodObject<{
|
|
433
|
+
x: z.ZodNumber;
|
|
434
|
+
y: z.ZodNumber;
|
|
435
|
+
z: z.ZodNumber;
|
|
436
|
+
}, z.core.$strip>;
|
|
437
|
+
endPoint: z.ZodObject<{
|
|
438
|
+
x: z.ZodNumber;
|
|
439
|
+
y: z.ZodNumber;
|
|
440
|
+
z: z.ZodNumber;
|
|
441
|
+
}, z.core.$strip>;
|
|
442
|
+
centrePoint: z.ZodObject<{
|
|
443
|
+
x: z.ZodNumber;
|
|
444
|
+
y: z.ZodNumber;
|
|
445
|
+
z: z.ZodNumber;
|
|
446
|
+
}, z.core.$strip>;
|
|
447
|
+
axis: z.ZodObject<{
|
|
448
|
+
x: z.ZodNumber;
|
|
449
|
+
y: z.ZodNumber;
|
|
450
|
+
z: z.ZodNumber;
|
|
451
|
+
}, z.core.$strip>;
|
|
452
|
+
}, z.core.$strip>], "curveType">>;
|
|
453
|
+
}, z.core.$strip>>>;
|
|
454
|
+
extrudeHeight: z.ZodNumber;
|
|
455
|
+
position: z.ZodObject<{
|
|
456
|
+
x: z.ZodNumber;
|
|
457
|
+
y: z.ZodNumber;
|
|
458
|
+
z: z.ZodNumber;
|
|
459
|
+
}, z.core.$strip>;
|
|
460
|
+
}, z.core.$strip>;
|
|
461
|
+
export type PluginSpaceCreateFromProfileArgs = z.infer<typeof PluginSpaceCreateFromProfileArgs>;
|
|
462
|
+
/**
|
|
463
|
+
* Result of {@linkcode PluginSpaceApi.createFromProfile}.
|
|
464
|
+
*
|
|
465
|
+
* | Property | Type | Description |
|
|
466
|
+
* |---|---|---|
|
|
467
|
+
* | `spaceId` | `string` | Unique ID of the created space |
|
|
468
|
+
*/
|
|
469
|
+
export declare const PluginSpaceCreateFromProfileResult: z.ZodObject<{
|
|
470
|
+
spaceId: z.ZodString;
|
|
471
|
+
}, z.core.$strip>;
|
|
472
|
+
export type PluginSpaceCreateFromProfileResult = z.infer<typeof PluginSpaceCreateFromProfileResult>;
|
|
473
|
+
/**
|
|
474
|
+
* Arguments for {@linkcode PluginSpaceApi.updateGeometryFromProfile}.
|
|
475
|
+
*
|
|
476
|
+
* | Property | Type | Description |
|
|
477
|
+
* |---|---|---|
|
|
478
|
+
* | `spaceId` | `string` | Space to update |
|
|
479
|
+
* | `profile` | {@linkcode PProfile} | Closed 2D profile defining the new floor shape |
|
|
480
|
+
* | `extrudeHeight` | `number` | New extrusion height in Babylon units |
|
|
481
|
+
*/
|
|
482
|
+
export declare const PluginSpaceUpdateGeometryFromProfileArgs: z.ZodObject<{
|
|
483
|
+
spaceId: z.ZodString;
|
|
484
|
+
profile: z.ZodObject<{
|
|
485
|
+
curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
486
|
+
curveType: z.ZodLiteral<"Line">;
|
|
487
|
+
startPoint: z.ZodObject<{
|
|
488
|
+
x: z.ZodNumber;
|
|
489
|
+
y: z.ZodNumber;
|
|
490
|
+
z: z.ZodNumber;
|
|
491
|
+
}, z.core.$strip>;
|
|
492
|
+
endPoint: z.ZodObject<{
|
|
493
|
+
x: z.ZodNumber;
|
|
494
|
+
y: z.ZodNumber;
|
|
495
|
+
z: z.ZodNumber;
|
|
496
|
+
}, z.core.$strip>;
|
|
497
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
498
|
+
curveType: z.ZodLiteral<"Arc">;
|
|
499
|
+
startPoint: z.ZodObject<{
|
|
500
|
+
x: z.ZodNumber;
|
|
501
|
+
y: z.ZodNumber;
|
|
502
|
+
z: z.ZodNumber;
|
|
503
|
+
}, z.core.$strip>;
|
|
504
|
+
endPoint: z.ZodObject<{
|
|
505
|
+
x: z.ZodNumber;
|
|
506
|
+
y: z.ZodNumber;
|
|
507
|
+
z: z.ZodNumber;
|
|
508
|
+
}, z.core.$strip>;
|
|
509
|
+
centrePoint: z.ZodObject<{
|
|
510
|
+
x: z.ZodNumber;
|
|
511
|
+
y: z.ZodNumber;
|
|
512
|
+
z: z.ZodNumber;
|
|
513
|
+
}, z.core.$strip>;
|
|
514
|
+
axis: z.ZodObject<{
|
|
515
|
+
x: z.ZodNumber;
|
|
516
|
+
y: z.ZodNumber;
|
|
517
|
+
z: z.ZodNumber;
|
|
518
|
+
}, z.core.$strip>;
|
|
519
|
+
}, z.core.$strip>], "curveType">>;
|
|
520
|
+
}, z.core.$strip>;
|
|
521
|
+
extrudeHeight: z.ZodNumber;
|
|
522
|
+
}, z.core.$strip>;
|
|
523
|
+
export type PluginSpaceUpdateGeometryFromProfileArgs = z.infer<typeof PluginSpaceUpdateGeometryFromProfileArgs>;
|
|
524
|
+
/**
|
|
525
|
+
* Result of {@linkcode PluginSpaceApi.updateGeometryFromProfile}.
|
|
526
|
+
*
|
|
527
|
+
* | Property | Type | Description |
|
|
528
|
+
* |---|---|---|
|
|
529
|
+
* | `spaceId` | `string` | Unique ID of the updated space |
|
|
530
|
+
*/
|
|
531
|
+
export declare const PluginSpaceUpdateGeometryFromProfileResult: z.ZodObject<{
|
|
532
|
+
spaceId: z.ZodString;
|
|
533
|
+
}, z.core.$strip>;
|
|
534
|
+
export type PluginSpaceUpdateGeometryFromProfileResult = z.infer<typeof PluginSpaceUpdateGeometryFromProfileResult>;
|
|
535
|
+
/**
|
|
536
|
+
* Available properties that can be queried on a space.
|
|
537
|
+
*
|
|
538
|
+
* **Basic:**
|
|
539
|
+
* | Value | Return Type | Description |
|
|
540
|
+
* |---|---|---|
|
|
541
|
+
* | `"id"` | `string` | Unique space identifier |
|
|
542
|
+
* | `"type"` | `string` | Component type |
|
|
543
|
+
* | `"room_type"` | `string` | Room type classification |
|
|
544
|
+
* | `"name"` | `string` | Display name of the space |
|
|
545
|
+
*
|
|
546
|
+
* **Derived from parametric data:**
|
|
547
|
+
* | Value | Return Type | Description |
|
|
548
|
+
* |---|---|---|
|
|
549
|
+
* | `"area"` | `number` | Bottom face area (from `areas_bottomFace`) |
|
|
550
|
+
* | `"breadth"` | `number` | Breadth dimension |
|
|
551
|
+
* | `"depth"` | `number` | Depth dimension |
|
|
552
|
+
* | `"height"` | `number` | Height dimension |
|
|
553
|
+
* | `"massType"` | `string \| null` | Mass type classification |
|
|
554
|
+
* | `"spaceType"` | `string \| null` | Space type classification (Room, Balcony, etc.) |
|
|
555
|
+
* | `"storey"` | `number \| null` | Story the space belongs to |
|
|
556
|
+
* | `"departmentId"` | `string \| null` | Assigned department ID |
|
|
557
|
+
* | `"departmentName"` | `string` | Assigned department name |
|
|
558
|
+
* | `"departmentColor"` | `string` | Assigned department color (hex/CSS) |
|
|
559
|
+
*
|
|
560
|
+
* **Derived from mesh:**
|
|
561
|
+
* | Value | Return Type | Description |
|
|
562
|
+
* |---|---|---|
|
|
563
|
+
* | `"position"` | {@linkcode PVec3} | Local position relative to parent |
|
|
564
|
+
* | `"absolutePosition"` | {@linkcode PVec3} | Absolute position in the scene |
|
|
565
|
+
* | `"rotation"` | {@linkcode PVec3} | Euler rotation angles (radians) |
|
|
566
|
+
* | `"rotationQuaternion"` | {@linkcode PQuat} \| `null` | Quaternion rotation, or `null` if unset |
|
|
567
|
+
*
|
|
568
|
+
* **Derived from brep:**
|
|
569
|
+
* | Value | Return Type | Description |
|
|
570
|
+
* |---|---|---|
|
|
571
|
+
* | `"planPoints"` | {@linkcode PVec3}`[]` | Bottom outer profile points in world space with `y = 0` (2D plan). No closing duplicate point. |
|
|
572
|
+
* | `"profile"` | {@linkcode PProfile} | Bottom outer profile in world space, preserving line/arc curve data. |
|
|
573
|
+
*/
|
|
574
|
+
export declare const PluginSpaceGetProperty: z.ZodEnum<{
|
|
575
|
+
type: "type";
|
|
576
|
+
name: "name";
|
|
577
|
+
departmentId: "departmentId";
|
|
578
|
+
id: "id";
|
|
579
|
+
profile: "profile";
|
|
580
|
+
position: "position";
|
|
581
|
+
height: "height";
|
|
582
|
+
depth: "depth";
|
|
583
|
+
room_type: "room_type";
|
|
584
|
+
area: "area";
|
|
585
|
+
breadth: "breadth";
|
|
586
|
+
massType: "massType";
|
|
587
|
+
spaceType: "spaceType";
|
|
588
|
+
storey: "storey";
|
|
589
|
+
departmentName: "departmentName";
|
|
590
|
+
departmentColor: "departmentColor";
|
|
591
|
+
absolutePosition: "absolutePosition";
|
|
592
|
+
rotation: "rotation";
|
|
593
|
+
rotationQuaternion: "rotationQuaternion";
|
|
594
|
+
planPoints: "planPoints";
|
|
595
|
+
}>;
|
|
596
|
+
/**
|
|
597
|
+
* Arguments for {@linkcode PluginSpaceApi.get}.
|
|
598
|
+
*
|
|
599
|
+
* | Property | Type | Description |
|
|
600
|
+
* |---|---|---|
|
|
601
|
+
* | `spaceId` | `string` | The space ID to query |
|
|
602
|
+
* | `properties` | {@linkcode PluginSpaceGetProperty}`[]` | Properties to retrieve |
|
|
603
|
+
*/
|
|
604
|
+
export declare const PluginSpaceGetArgs: z.ZodObject<{
|
|
605
|
+
spaceId: z.ZodString;
|
|
606
|
+
properties: z.ZodArray<z.ZodEnum<{
|
|
607
|
+
type: "type";
|
|
608
|
+
name: "name";
|
|
609
|
+
departmentId: "departmentId";
|
|
610
|
+
id: "id";
|
|
611
|
+
profile: "profile";
|
|
612
|
+
position: "position";
|
|
613
|
+
height: "height";
|
|
614
|
+
depth: "depth";
|
|
615
|
+
room_type: "room_type";
|
|
616
|
+
area: "area";
|
|
617
|
+
breadth: "breadth";
|
|
618
|
+
massType: "massType";
|
|
619
|
+
spaceType: "spaceType";
|
|
620
|
+
storey: "storey";
|
|
621
|
+
departmentName: "departmentName";
|
|
622
|
+
departmentColor: "departmentColor";
|
|
623
|
+
absolutePosition: "absolutePosition";
|
|
624
|
+
rotation: "rotation";
|
|
625
|
+
rotationQuaternion: "rotationQuaternion";
|
|
626
|
+
planPoints: "planPoints";
|
|
627
|
+
}>>;
|
|
628
|
+
}, z.core.$strip>;
|
|
629
|
+
export type PluginSpaceGetArgs = z.infer<typeof PluginSpaceGetArgs>;
|
|
630
|
+
/**
|
|
631
|
+
* Supported space type values.
|
|
632
|
+
*
|
|
633
|
+
* Mirrors the internal `SpaceType` enum from `spaceType.types.ts`.
|
|
634
|
+
*
|
|
635
|
+
* | Value | Description |
|
|
636
|
+
* |---|---|
|
|
637
|
+
* | `"Room"` | Standard room |
|
|
638
|
+
* | `"Program Block"` | Program/department block |
|
|
639
|
+
* | `"Balcony"` | Balcony space |
|
|
640
|
+
* | `"Road"` | Road |
|
|
641
|
+
* | `"Garden"` | Garden area |
|
|
642
|
+
* | `"Deck"` | Deck |
|
|
643
|
+
* | `"Pool"` | Pool |
|
|
644
|
+
* | `"Walkway"` | Walkway |
|
|
645
|
+
* | `"Envelope"` | Envelope |
|
|
646
|
+
* | `"Parking"` | Parking area |
|
|
647
|
+
*/
|
|
648
|
+
export declare const PluginSpaceType: z.ZodEnum<{
|
|
649
|
+
Room: "Room";
|
|
650
|
+
"Program Block": "Program Block";
|
|
651
|
+
Balcony: "Balcony";
|
|
652
|
+
Road: "Road";
|
|
653
|
+
Garden: "Garden";
|
|
654
|
+
Deck: "Deck";
|
|
655
|
+
Pool: "Pool";
|
|
656
|
+
Walkway: "Walkway";
|
|
657
|
+
Envelope: "Envelope";
|
|
658
|
+
Parking: "Parking";
|
|
659
|
+
}>;
|
|
660
|
+
/**
|
|
661
|
+
* Result of {@linkcode PluginSpaceApi.get}.
|
|
662
|
+
*
|
|
663
|
+
* A partial object — only the properties that were requested in
|
|
664
|
+
* {@linkcode PluginSpaceGetArgs.properties} will be present.
|
|
665
|
+
*/
|
|
666
|
+
export declare const PluginSpaceGetResult: z.ZodObject<{
|
|
667
|
+
id: z.ZodOptional<z.ZodString>;
|
|
668
|
+
type: z.ZodOptional<z.ZodString>;
|
|
669
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
670
|
+
name: z.ZodOptional<z.ZodString>;
|
|
671
|
+
area: z.ZodOptional<z.ZodNumber>;
|
|
672
|
+
breadth: z.ZodOptional<z.ZodNumber>;
|
|
673
|
+
depth: z.ZodOptional<z.ZodNumber>;
|
|
674
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
675
|
+
massType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
676
|
+
spaceType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
677
|
+
Room: "Room";
|
|
678
|
+
"Program Block": "Program Block";
|
|
679
|
+
Balcony: "Balcony";
|
|
680
|
+
Road: "Road";
|
|
681
|
+
Garden: "Garden";
|
|
682
|
+
Deck: "Deck";
|
|
683
|
+
Pool: "Pool";
|
|
684
|
+
Walkway: "Walkway";
|
|
685
|
+
Envelope: "Envelope";
|
|
686
|
+
Parking: "Parking";
|
|
687
|
+
}>>>;
|
|
688
|
+
storey: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
689
|
+
departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
690
|
+
departmentName: z.ZodOptional<z.ZodString>;
|
|
691
|
+
departmentColor: z.ZodOptional<z.ZodString>;
|
|
692
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
693
|
+
x: z.ZodNumber;
|
|
694
|
+
y: z.ZodNumber;
|
|
695
|
+
z: z.ZodNumber;
|
|
696
|
+
}, z.core.$strip>>;
|
|
697
|
+
absolutePosition: z.ZodOptional<z.ZodObject<{
|
|
698
|
+
x: z.ZodNumber;
|
|
699
|
+
y: z.ZodNumber;
|
|
700
|
+
z: z.ZodNumber;
|
|
701
|
+
}, z.core.$strip>>;
|
|
702
|
+
rotation: z.ZodOptional<z.ZodObject<{
|
|
703
|
+
x: z.ZodNumber;
|
|
704
|
+
y: z.ZodNumber;
|
|
705
|
+
z: z.ZodNumber;
|
|
706
|
+
}, z.core.$strip>>;
|
|
707
|
+
rotationQuaternion: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
708
|
+
x: z.ZodNumber;
|
|
709
|
+
y: z.ZodNumber;
|
|
710
|
+
z: z.ZodNumber;
|
|
711
|
+
w: z.ZodNumber;
|
|
712
|
+
}, z.core.$strip>>>;
|
|
713
|
+
planPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
714
|
+
x: z.ZodNumber;
|
|
715
|
+
y: z.ZodNumber;
|
|
716
|
+
z: z.ZodNumber;
|
|
717
|
+
}, z.core.$strip>>>;
|
|
718
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
719
|
+
curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
720
|
+
curveType: z.ZodLiteral<"Line">;
|
|
721
|
+
startPoint: z.ZodObject<{
|
|
722
|
+
x: z.ZodNumber;
|
|
723
|
+
y: z.ZodNumber;
|
|
724
|
+
z: z.ZodNumber;
|
|
725
|
+
}, z.core.$strip>;
|
|
726
|
+
endPoint: z.ZodObject<{
|
|
727
|
+
x: z.ZodNumber;
|
|
728
|
+
y: z.ZodNumber;
|
|
729
|
+
z: z.ZodNumber;
|
|
730
|
+
}, z.core.$strip>;
|
|
731
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
732
|
+
curveType: z.ZodLiteral<"Arc">;
|
|
733
|
+
startPoint: z.ZodObject<{
|
|
734
|
+
x: z.ZodNumber;
|
|
735
|
+
y: z.ZodNumber;
|
|
736
|
+
z: z.ZodNumber;
|
|
737
|
+
}, z.core.$strip>;
|
|
738
|
+
endPoint: z.ZodObject<{
|
|
739
|
+
x: z.ZodNumber;
|
|
740
|
+
y: z.ZodNumber;
|
|
741
|
+
z: z.ZodNumber;
|
|
742
|
+
}, z.core.$strip>;
|
|
743
|
+
centrePoint: z.ZodObject<{
|
|
744
|
+
x: z.ZodNumber;
|
|
745
|
+
y: z.ZodNumber;
|
|
746
|
+
z: z.ZodNumber;
|
|
747
|
+
}, z.core.$strip>;
|
|
748
|
+
axis: z.ZodObject<{
|
|
749
|
+
x: z.ZodNumber;
|
|
750
|
+
y: z.ZodNumber;
|
|
751
|
+
z: z.ZodNumber;
|
|
752
|
+
}, z.core.$strip>;
|
|
753
|
+
}, z.core.$strip>], "curveType">>;
|
|
754
|
+
}, z.core.$strip>>;
|
|
755
|
+
}, z.core.$strip>;
|
|
756
|
+
export type PluginSpaceGetResult = z.infer<typeof PluginSpaceGetResult>;
|
|
757
|
+
/**
|
|
758
|
+
* Result of {@linkcode PluginSpaceApi.getAll}.
|
|
759
|
+
*
|
|
760
|
+
* | Property | Type | Description |
|
|
761
|
+
* |---|---|---|
|
|
762
|
+
* | `spacesIds` | `string[]` | IDs of all spaces in the project |
|
|
763
|
+
*/
|
|
764
|
+
export declare const PluginSpaceGetAllResult: z.ZodObject<{
|
|
765
|
+
spacesIds: z.ZodArray<z.ZodString>;
|
|
766
|
+
}, z.core.$strip>;
|
|
767
|
+
export type PluginSpaceGetAllResult = z.infer<typeof PluginSpaceGetAllResult>;
|
|
768
|
+
/**
|
|
769
|
+
* Arguments for {@linkcode PluginSpaceApi.delete}.
|
|
770
|
+
*
|
|
771
|
+
* | Property | Type | Description |
|
|
772
|
+
* |---|---|---|
|
|
773
|
+
* | `spaceId` | `string` | The space ID to delete |
|
|
774
|
+
*/
|
|
775
|
+
export declare const PluginSpaceDeleteArgs: z.ZodObject<{
|
|
776
|
+
spaceId: z.ZodString;
|
|
777
|
+
}, z.core.$strip>;
|
|
778
|
+
export type PluginSpaceDeleteArgs = z.infer<typeof PluginSpaceDeleteArgs>;
|
|
779
|
+
/** Result type for {@linkcode PluginSpaceApi.delete} — returns nothing on success. */
|
|
780
|
+
export type PluginSpaceDeleteResult = void;
|
|
781
|
+
/**
|
|
782
|
+
* Supported mass type values for {@linkcode PluginSpaceUpdateArgs.properties.massType}.
|
|
783
|
+
*
|
|
784
|
+
* Mirrors the internal `MASS_TYPES` enum.
|
|
785
|
+
*
|
|
786
|
+
* | Value | Description |
|
|
787
|
+
* |---|---|
|
|
788
|
+
* | `"Plinth"` | Plinth mass |
|
|
789
|
+
* | `"Void"` | Void/cut-out |
|
|
790
|
+
* | `"Pergola"` | Pergola structure |
|
|
791
|
+
* | `"Furniture"` | Furniture element |
|
|
792
|
+
* | `"Facade element"` | Facade element |
|
|
793
|
+
* | `"Generic mass"` | Generic mass |
|
|
794
|
+
* | `"Room"` | Room (default for spaces) |
|
|
795
|
+
* | `"Department"` | Department block |
|
|
796
|
+
* | `"Building"` | Building envelope |
|
|
797
|
+
* | `"Revit Import"` | Imported from Revit |
|
|
798
|
+
* | `"Mass"` | Generic mass type |
|
|
799
|
+
* | `"Site"` | Site object |
|
|
800
|
+
*/
|
|
801
|
+
export declare const PluginMassType: z.ZodEnum<{
|
|
802
|
+
Room: "Room";
|
|
803
|
+
Plinth: "Plinth";
|
|
804
|
+
Void: "Void";
|
|
805
|
+
Pergola: "Pergola";
|
|
806
|
+
Furniture: "Furniture";
|
|
807
|
+
"Facade element": "Facade element";
|
|
808
|
+
"Generic mass": "Generic mass";
|
|
809
|
+
Department: "Department";
|
|
810
|
+
Building: "Building";
|
|
811
|
+
"Revit Import": "Revit Import";
|
|
812
|
+
Mass: "Mass";
|
|
813
|
+
Site: "Site";
|
|
814
|
+
}>;
|
|
815
|
+
/**
|
|
816
|
+
* Well-known (built-in) department IDs.
|
|
817
|
+
*
|
|
818
|
+
* | Value | Department |
|
|
819
|
+
* |---|---|
|
|
820
|
+
* | `"DEFAULT"` | Default department |
|
|
821
|
+
* | `"SITE"` | Site department |
|
|
822
|
+
* | `"ENVELOPE"` | Envelope department |
|
|
823
|
+
* | `"CORE"` | Core department |
|
|
824
|
+
*/
|
|
825
|
+
export declare const PluginWellKnownDepartmentId: z.ZodEnum<{
|
|
826
|
+
DEFAULT: "DEFAULT";
|
|
827
|
+
SITE: "SITE";
|
|
828
|
+
ENVELOPE: "ENVELOPE";
|
|
829
|
+
CORE: "CORE";
|
|
830
|
+
}>;
|
|
831
|
+
/**
|
|
832
|
+
* Accepted department ID values — either a {@linkcode PluginWellKnownDepartmentId}
|
|
833
|
+
* or a UUID string for custom (user-created) departments.
|
|
834
|
+
*/
|
|
835
|
+
export declare const PluginDepartmentId: z.ZodUnion<readonly [z.ZodEnum<{
|
|
836
|
+
DEFAULT: "DEFAULT";
|
|
837
|
+
SITE: "SITE";
|
|
838
|
+
ENVELOPE: "ENVELOPE";
|
|
839
|
+
CORE: "CORE";
|
|
840
|
+
}>, z.ZodUUID]>;
|
|
841
|
+
/**
|
|
842
|
+
* Arguments for {@linkcode PluginSpaceApi.update}.
|
|
843
|
+
*
|
|
844
|
+
* | Property | Type | Description |
|
|
845
|
+
* |---|---|---|
|
|
846
|
+
* | `spaceId` | `string` | The space ID to update |
|
|
847
|
+
* | `properties` | `object` | Key/value pairs of properties to update (all optional) |
|
|
848
|
+
* | `properties.room_type` | `string?` | New room type label |
|
|
849
|
+
* | `properties.massType` | {@linkcode PluginMassType}`?` | New mass type |
|
|
850
|
+
* | `properties.departmentId` | {@linkcode PluginDepartmentId}`?` | New department ID |
|
|
851
|
+
*/
|
|
852
|
+
export declare const PluginSpaceUpdateArgs: z.ZodObject<{
|
|
853
|
+
spaceId: z.ZodString;
|
|
854
|
+
properties: z.ZodObject<{
|
|
855
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
856
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
857
|
+
Room: "Room";
|
|
858
|
+
Plinth: "Plinth";
|
|
859
|
+
Void: "Void";
|
|
860
|
+
Pergola: "Pergola";
|
|
861
|
+
Furniture: "Furniture";
|
|
862
|
+
"Facade element": "Facade element";
|
|
863
|
+
"Generic mass": "Generic mass";
|
|
864
|
+
Department: "Department";
|
|
865
|
+
Building: "Building";
|
|
866
|
+
"Revit Import": "Revit Import";
|
|
867
|
+
Mass: "Mass";
|
|
868
|
+
Site: "Site";
|
|
869
|
+
}>>;
|
|
870
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
871
|
+
Room: "Room";
|
|
872
|
+
"Program Block": "Program Block";
|
|
873
|
+
Balcony: "Balcony";
|
|
874
|
+
Road: "Road";
|
|
875
|
+
Garden: "Garden";
|
|
876
|
+
Deck: "Deck";
|
|
877
|
+
Pool: "Pool";
|
|
878
|
+
Walkway: "Walkway";
|
|
879
|
+
Envelope: "Envelope";
|
|
880
|
+
Parking: "Parking";
|
|
881
|
+
}>>;
|
|
882
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
883
|
+
DEFAULT: "DEFAULT";
|
|
884
|
+
SITE: "SITE";
|
|
885
|
+
ENVELOPE: "ENVELOPE";
|
|
886
|
+
CORE: "CORE";
|
|
887
|
+
}>, z.ZodUUID]>>;
|
|
888
|
+
}, z.core.$strip>;
|
|
889
|
+
}, z.core.$strip>;
|
|
890
|
+
export type PluginSpaceUpdateArgs = z.infer<typeof PluginSpaceUpdateArgs>;
|
|
891
|
+
/**
|
|
892
|
+
* Result of {@linkcode PluginSpaceApi.update}.
|
|
893
|
+
*
|
|
894
|
+
* Echoes back the `spaceId` and the values of properties that were updated.
|
|
895
|
+
* Properties that were not included in the update request will be `undefined`.
|
|
896
|
+
*
|
|
897
|
+
* | Property | Type | Description |
|
|
898
|
+
* |---|---|---|
|
|
899
|
+
* | `spaceId` | `string` | The space ID that was updated |
|
|
900
|
+
* | `room_type` | `string?` | Updated room type (if changed) |
|
|
901
|
+
* | `massType` | `string?` | Updated mass type (if changed) |
|
|
902
|
+
* | `spaceType` | `string?` | Updated space type (if changed) |
|
|
903
|
+
* | `departmentId` | `string \| null?` | Updated department ID (if changed) |
|
|
904
|
+
*/
|
|
905
|
+
export declare const PluginSpaceUpdateResult: z.ZodObject<{
|
|
906
|
+
spaceId: z.ZodString;
|
|
907
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
908
|
+
massType: z.ZodOptional<z.ZodString>;
|
|
909
|
+
spaceType: z.ZodOptional<z.ZodString>;
|
|
910
|
+
departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
911
|
+
}, z.core.$strip>;
|
|
912
|
+
export type PluginSpaceUpdateResult = z.infer<typeof PluginSpaceUpdateResult>;
|
|
913
|
+
/**
|
|
914
|
+
* A single item for {@linkcode PluginSpaceApi.bulkCreate}.
|
|
915
|
+
*
|
|
916
|
+
* Discriminated on `kind`:
|
|
917
|
+
* - `"rectangular"` — a box defined by `position` + `dimensions` (mirrors
|
|
918
|
+
* {@linkcode PluginSpaceCreateRectangularArgs})
|
|
919
|
+
* - `"profile"` — an extruded `profile` (with optional `innerProfiles`) by
|
|
920
|
+
* `extrudeHeight` at `position` (mirrors {@linkcode PluginSpaceCreateFromProfileArgs})
|
|
921
|
+
*
|
|
922
|
+
* Every item may optionally set `room_type`, `spaceType`, `massType`, and
|
|
923
|
+
* `departmentId`; these are applied within the same single undo step as the
|
|
924
|
+
* creation.
|
|
925
|
+
*/
|
|
926
|
+
export declare const PluginSpaceBulkCreateItem: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
927
|
+
kind: z.ZodLiteral<"rectangular">;
|
|
928
|
+
position: z.ZodObject<{
|
|
929
|
+
x: z.ZodNumber;
|
|
930
|
+
y: z.ZodNumber;
|
|
931
|
+
z: z.ZodNumber;
|
|
932
|
+
}, z.core.$strip>;
|
|
933
|
+
dimensions: z.ZodObject<{
|
|
934
|
+
width: z.ZodNumber;
|
|
935
|
+
height: z.ZodNumber;
|
|
936
|
+
depth: z.ZodNumber;
|
|
937
|
+
}, z.core.$strip>;
|
|
938
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
939
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
940
|
+
Room: "Room";
|
|
941
|
+
"Program Block": "Program Block";
|
|
942
|
+
Balcony: "Balcony";
|
|
943
|
+
Road: "Road";
|
|
944
|
+
Garden: "Garden";
|
|
945
|
+
Deck: "Deck";
|
|
946
|
+
Pool: "Pool";
|
|
947
|
+
Walkway: "Walkway";
|
|
948
|
+
Envelope: "Envelope";
|
|
949
|
+
Parking: "Parking";
|
|
950
|
+
}>>;
|
|
951
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
952
|
+
Room: "Room";
|
|
953
|
+
Plinth: "Plinth";
|
|
954
|
+
Void: "Void";
|
|
955
|
+
Pergola: "Pergola";
|
|
956
|
+
Furniture: "Furniture";
|
|
957
|
+
"Facade element": "Facade element";
|
|
958
|
+
"Generic mass": "Generic mass";
|
|
959
|
+
Department: "Department";
|
|
960
|
+
Building: "Building";
|
|
961
|
+
"Revit Import": "Revit Import";
|
|
962
|
+
Mass: "Mass";
|
|
963
|
+
Site: "Site";
|
|
964
|
+
}>>;
|
|
965
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
966
|
+
DEFAULT: "DEFAULT";
|
|
967
|
+
SITE: "SITE";
|
|
968
|
+
ENVELOPE: "ENVELOPE";
|
|
969
|
+
CORE: "CORE";
|
|
970
|
+
}>, z.ZodUUID]>>;
|
|
971
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
972
|
+
kind: z.ZodLiteral<"profile">;
|
|
973
|
+
profile: z.ZodObject<{
|
|
974
|
+
curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
975
|
+
curveType: z.ZodLiteral<"Line">;
|
|
976
|
+
startPoint: z.ZodObject<{
|
|
977
|
+
x: z.ZodNumber;
|
|
978
|
+
y: z.ZodNumber;
|
|
979
|
+
z: z.ZodNumber;
|
|
980
|
+
}, z.core.$strip>;
|
|
981
|
+
endPoint: z.ZodObject<{
|
|
982
|
+
x: z.ZodNumber;
|
|
983
|
+
y: z.ZodNumber;
|
|
984
|
+
z: z.ZodNumber;
|
|
985
|
+
}, z.core.$strip>;
|
|
986
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
987
|
+
curveType: z.ZodLiteral<"Arc">;
|
|
988
|
+
startPoint: z.ZodObject<{
|
|
989
|
+
x: z.ZodNumber;
|
|
990
|
+
y: z.ZodNumber;
|
|
991
|
+
z: z.ZodNumber;
|
|
992
|
+
}, z.core.$strip>;
|
|
993
|
+
endPoint: z.ZodObject<{
|
|
994
|
+
x: z.ZodNumber;
|
|
995
|
+
y: z.ZodNumber;
|
|
996
|
+
z: z.ZodNumber;
|
|
997
|
+
}, z.core.$strip>;
|
|
998
|
+
centrePoint: z.ZodObject<{
|
|
999
|
+
x: z.ZodNumber;
|
|
1000
|
+
y: z.ZodNumber;
|
|
1001
|
+
z: z.ZodNumber;
|
|
1002
|
+
}, z.core.$strip>;
|
|
1003
|
+
axis: z.ZodObject<{
|
|
1004
|
+
x: z.ZodNumber;
|
|
1005
|
+
y: z.ZodNumber;
|
|
1006
|
+
z: z.ZodNumber;
|
|
1007
|
+
}, z.core.$strip>;
|
|
1008
|
+
}, z.core.$strip>], "curveType">>;
|
|
1009
|
+
}, z.core.$strip>;
|
|
1010
|
+
innerProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1011
|
+
curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1012
|
+
curveType: z.ZodLiteral<"Line">;
|
|
1013
|
+
startPoint: z.ZodObject<{
|
|
1014
|
+
x: z.ZodNumber;
|
|
1015
|
+
y: z.ZodNumber;
|
|
1016
|
+
z: z.ZodNumber;
|
|
1017
|
+
}, z.core.$strip>;
|
|
1018
|
+
endPoint: z.ZodObject<{
|
|
1019
|
+
x: z.ZodNumber;
|
|
1020
|
+
y: z.ZodNumber;
|
|
1021
|
+
z: z.ZodNumber;
|
|
1022
|
+
}, z.core.$strip>;
|
|
1023
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1024
|
+
curveType: z.ZodLiteral<"Arc">;
|
|
1025
|
+
startPoint: z.ZodObject<{
|
|
1026
|
+
x: z.ZodNumber;
|
|
1027
|
+
y: z.ZodNumber;
|
|
1028
|
+
z: z.ZodNumber;
|
|
1029
|
+
}, z.core.$strip>;
|
|
1030
|
+
endPoint: z.ZodObject<{
|
|
1031
|
+
x: z.ZodNumber;
|
|
1032
|
+
y: z.ZodNumber;
|
|
1033
|
+
z: z.ZodNumber;
|
|
1034
|
+
}, z.core.$strip>;
|
|
1035
|
+
centrePoint: z.ZodObject<{
|
|
1036
|
+
x: z.ZodNumber;
|
|
1037
|
+
y: z.ZodNumber;
|
|
1038
|
+
z: z.ZodNumber;
|
|
1039
|
+
}, z.core.$strip>;
|
|
1040
|
+
axis: z.ZodObject<{
|
|
1041
|
+
x: z.ZodNumber;
|
|
1042
|
+
y: z.ZodNumber;
|
|
1043
|
+
z: z.ZodNumber;
|
|
1044
|
+
}, z.core.$strip>;
|
|
1045
|
+
}, z.core.$strip>], "curveType">>;
|
|
1046
|
+
}, z.core.$strip>>>;
|
|
1047
|
+
extrudeHeight: z.ZodNumber;
|
|
1048
|
+
position: z.ZodObject<{
|
|
1049
|
+
x: z.ZodNumber;
|
|
1050
|
+
y: z.ZodNumber;
|
|
1051
|
+
z: z.ZodNumber;
|
|
1052
|
+
}, z.core.$strip>;
|
|
1053
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
1054
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
1055
|
+
Room: "Room";
|
|
1056
|
+
"Program Block": "Program Block";
|
|
1057
|
+
Balcony: "Balcony";
|
|
1058
|
+
Road: "Road";
|
|
1059
|
+
Garden: "Garden";
|
|
1060
|
+
Deck: "Deck";
|
|
1061
|
+
Pool: "Pool";
|
|
1062
|
+
Walkway: "Walkway";
|
|
1063
|
+
Envelope: "Envelope";
|
|
1064
|
+
Parking: "Parking";
|
|
1065
|
+
}>>;
|
|
1066
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
1067
|
+
Room: "Room";
|
|
1068
|
+
Plinth: "Plinth";
|
|
1069
|
+
Void: "Void";
|
|
1070
|
+
Pergola: "Pergola";
|
|
1071
|
+
Furniture: "Furniture";
|
|
1072
|
+
"Facade element": "Facade element";
|
|
1073
|
+
"Generic mass": "Generic mass";
|
|
1074
|
+
Department: "Department";
|
|
1075
|
+
Building: "Building";
|
|
1076
|
+
"Revit Import": "Revit Import";
|
|
1077
|
+
Mass: "Mass";
|
|
1078
|
+
Site: "Site";
|
|
1079
|
+
}>>;
|
|
1080
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1081
|
+
DEFAULT: "DEFAULT";
|
|
1082
|
+
SITE: "SITE";
|
|
1083
|
+
ENVELOPE: "ENVELOPE";
|
|
1084
|
+
CORE: "CORE";
|
|
1085
|
+
}>, z.ZodUUID]>>;
|
|
1086
|
+
}, z.core.$strip>], "kind">;
|
|
1087
|
+
export type PluginSpaceBulkCreateItem = z.infer<typeof PluginSpaceBulkCreateItem>;
|
|
1088
|
+
/**
|
|
1089
|
+
* Arguments for {@linkcode PluginSpaceApi.bulkCreate}.
|
|
1090
|
+
*
|
|
1091
|
+
* | Property | Type | Description |
|
|
1092
|
+
* |---|---|---|
|
|
1093
|
+
* | `items` | {@linkcode PluginSpaceBulkCreateItem}`[]` | Spaces to create |
|
|
1094
|
+
*/
|
|
1095
|
+
export declare const PluginSpaceBulkCreateArgs: z.ZodObject<{
|
|
1096
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1097
|
+
kind: z.ZodLiteral<"rectangular">;
|
|
1098
|
+
position: z.ZodObject<{
|
|
1099
|
+
x: z.ZodNumber;
|
|
1100
|
+
y: z.ZodNumber;
|
|
1101
|
+
z: z.ZodNumber;
|
|
1102
|
+
}, z.core.$strip>;
|
|
1103
|
+
dimensions: z.ZodObject<{
|
|
1104
|
+
width: z.ZodNumber;
|
|
1105
|
+
height: z.ZodNumber;
|
|
1106
|
+
depth: z.ZodNumber;
|
|
1107
|
+
}, z.core.$strip>;
|
|
1108
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
1109
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
1110
|
+
Room: "Room";
|
|
1111
|
+
"Program Block": "Program Block";
|
|
1112
|
+
Balcony: "Balcony";
|
|
1113
|
+
Road: "Road";
|
|
1114
|
+
Garden: "Garden";
|
|
1115
|
+
Deck: "Deck";
|
|
1116
|
+
Pool: "Pool";
|
|
1117
|
+
Walkway: "Walkway";
|
|
1118
|
+
Envelope: "Envelope";
|
|
1119
|
+
Parking: "Parking";
|
|
1120
|
+
}>>;
|
|
1121
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
1122
|
+
Room: "Room";
|
|
1123
|
+
Plinth: "Plinth";
|
|
1124
|
+
Void: "Void";
|
|
1125
|
+
Pergola: "Pergola";
|
|
1126
|
+
Furniture: "Furniture";
|
|
1127
|
+
"Facade element": "Facade element";
|
|
1128
|
+
"Generic mass": "Generic mass";
|
|
1129
|
+
Department: "Department";
|
|
1130
|
+
Building: "Building";
|
|
1131
|
+
"Revit Import": "Revit Import";
|
|
1132
|
+
Mass: "Mass";
|
|
1133
|
+
Site: "Site";
|
|
1134
|
+
}>>;
|
|
1135
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1136
|
+
DEFAULT: "DEFAULT";
|
|
1137
|
+
SITE: "SITE";
|
|
1138
|
+
ENVELOPE: "ENVELOPE";
|
|
1139
|
+
CORE: "CORE";
|
|
1140
|
+
}>, z.ZodUUID]>>;
|
|
1141
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1142
|
+
kind: z.ZodLiteral<"profile">;
|
|
1143
|
+
profile: z.ZodObject<{
|
|
1144
|
+
curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1145
|
+
curveType: z.ZodLiteral<"Line">;
|
|
1146
|
+
startPoint: z.ZodObject<{
|
|
1147
|
+
x: z.ZodNumber;
|
|
1148
|
+
y: z.ZodNumber;
|
|
1149
|
+
z: z.ZodNumber;
|
|
1150
|
+
}, z.core.$strip>;
|
|
1151
|
+
endPoint: z.ZodObject<{
|
|
1152
|
+
x: z.ZodNumber;
|
|
1153
|
+
y: z.ZodNumber;
|
|
1154
|
+
z: z.ZodNumber;
|
|
1155
|
+
}, z.core.$strip>;
|
|
1156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1157
|
+
curveType: z.ZodLiteral<"Arc">;
|
|
1158
|
+
startPoint: z.ZodObject<{
|
|
1159
|
+
x: z.ZodNumber;
|
|
1160
|
+
y: z.ZodNumber;
|
|
1161
|
+
z: z.ZodNumber;
|
|
1162
|
+
}, z.core.$strip>;
|
|
1163
|
+
endPoint: z.ZodObject<{
|
|
1164
|
+
x: z.ZodNumber;
|
|
1165
|
+
y: z.ZodNumber;
|
|
1166
|
+
z: z.ZodNumber;
|
|
1167
|
+
}, z.core.$strip>;
|
|
1168
|
+
centrePoint: z.ZodObject<{
|
|
1169
|
+
x: z.ZodNumber;
|
|
1170
|
+
y: z.ZodNumber;
|
|
1171
|
+
z: z.ZodNumber;
|
|
1172
|
+
}, z.core.$strip>;
|
|
1173
|
+
axis: z.ZodObject<{
|
|
1174
|
+
x: z.ZodNumber;
|
|
1175
|
+
y: z.ZodNumber;
|
|
1176
|
+
z: z.ZodNumber;
|
|
1177
|
+
}, z.core.$strip>;
|
|
1178
|
+
}, z.core.$strip>], "curveType">>;
|
|
1179
|
+
}, z.core.$strip>;
|
|
1180
|
+
innerProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1181
|
+
curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1182
|
+
curveType: z.ZodLiteral<"Line">;
|
|
1183
|
+
startPoint: z.ZodObject<{
|
|
1184
|
+
x: z.ZodNumber;
|
|
1185
|
+
y: z.ZodNumber;
|
|
1186
|
+
z: z.ZodNumber;
|
|
1187
|
+
}, z.core.$strip>;
|
|
1188
|
+
endPoint: z.ZodObject<{
|
|
1189
|
+
x: z.ZodNumber;
|
|
1190
|
+
y: z.ZodNumber;
|
|
1191
|
+
z: z.ZodNumber;
|
|
1192
|
+
}, z.core.$strip>;
|
|
1193
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1194
|
+
curveType: z.ZodLiteral<"Arc">;
|
|
1195
|
+
startPoint: z.ZodObject<{
|
|
1196
|
+
x: z.ZodNumber;
|
|
1197
|
+
y: z.ZodNumber;
|
|
1198
|
+
z: z.ZodNumber;
|
|
1199
|
+
}, z.core.$strip>;
|
|
1200
|
+
endPoint: z.ZodObject<{
|
|
1201
|
+
x: z.ZodNumber;
|
|
1202
|
+
y: z.ZodNumber;
|
|
1203
|
+
z: z.ZodNumber;
|
|
1204
|
+
}, z.core.$strip>;
|
|
1205
|
+
centrePoint: z.ZodObject<{
|
|
1206
|
+
x: z.ZodNumber;
|
|
1207
|
+
y: z.ZodNumber;
|
|
1208
|
+
z: z.ZodNumber;
|
|
1209
|
+
}, z.core.$strip>;
|
|
1210
|
+
axis: z.ZodObject<{
|
|
1211
|
+
x: z.ZodNumber;
|
|
1212
|
+
y: z.ZodNumber;
|
|
1213
|
+
z: z.ZodNumber;
|
|
1214
|
+
}, z.core.$strip>;
|
|
1215
|
+
}, z.core.$strip>], "curveType">>;
|
|
1216
|
+
}, z.core.$strip>>>;
|
|
1217
|
+
extrudeHeight: z.ZodNumber;
|
|
1218
|
+
position: z.ZodObject<{
|
|
1219
|
+
x: z.ZodNumber;
|
|
1220
|
+
y: z.ZodNumber;
|
|
1221
|
+
z: z.ZodNumber;
|
|
1222
|
+
}, z.core.$strip>;
|
|
1223
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
1224
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
1225
|
+
Room: "Room";
|
|
1226
|
+
"Program Block": "Program Block";
|
|
1227
|
+
Balcony: "Balcony";
|
|
1228
|
+
Road: "Road";
|
|
1229
|
+
Garden: "Garden";
|
|
1230
|
+
Deck: "Deck";
|
|
1231
|
+
Pool: "Pool";
|
|
1232
|
+
Walkway: "Walkway";
|
|
1233
|
+
Envelope: "Envelope";
|
|
1234
|
+
Parking: "Parking";
|
|
1235
|
+
}>>;
|
|
1236
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
1237
|
+
Room: "Room";
|
|
1238
|
+
Plinth: "Plinth";
|
|
1239
|
+
Void: "Void";
|
|
1240
|
+
Pergola: "Pergola";
|
|
1241
|
+
Furniture: "Furniture";
|
|
1242
|
+
"Facade element": "Facade element";
|
|
1243
|
+
"Generic mass": "Generic mass";
|
|
1244
|
+
Department: "Department";
|
|
1245
|
+
Building: "Building";
|
|
1246
|
+
"Revit Import": "Revit Import";
|
|
1247
|
+
Mass: "Mass";
|
|
1248
|
+
Site: "Site";
|
|
1249
|
+
}>>;
|
|
1250
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1251
|
+
DEFAULT: "DEFAULT";
|
|
1252
|
+
SITE: "SITE";
|
|
1253
|
+
ENVELOPE: "ENVELOPE";
|
|
1254
|
+
CORE: "CORE";
|
|
1255
|
+
}>, z.ZodUUID]>>;
|
|
1256
|
+
}, z.core.$strip>], "kind">>;
|
|
1257
|
+
}, z.core.$strip>;
|
|
1258
|
+
export type PluginSpaceBulkCreateArgs = z.infer<typeof PluginSpaceBulkCreateArgs>;
|
|
1259
|
+
/**
|
|
1260
|
+
* Result of {@linkcode PluginSpaceApi.bulkCreate}.
|
|
1261
|
+
*
|
|
1262
|
+
* | Property | Type | Description |
|
|
1263
|
+
* |---|---|---|
|
|
1264
|
+
* | `spaceIds` | `string[]` | IDs of the created spaces, in input order |
|
|
1265
|
+
*/
|
|
1266
|
+
export declare const PluginSpaceBulkCreateResult: z.ZodObject<{
|
|
1267
|
+
spaceIds: z.ZodArray<z.ZodString>;
|
|
1268
|
+
}, z.core.$strip>;
|
|
1269
|
+
export type PluginSpaceBulkCreateResult = z.infer<typeof PluginSpaceBulkCreateResult>;
|
|
1270
|
+
/**
|
|
1271
|
+
* A single item for {@linkcode PluginSpaceApi.bulkUpdate}.
|
|
1272
|
+
*
|
|
1273
|
+
* Targets an existing space by `spaceId`. Geometry fields `profile` and
|
|
1274
|
+
* `extrudeHeight` must be supplied **together** (mirrors
|
|
1275
|
+
* {@linkcode PluginSpaceUpdateGeometryFromProfileArgs}). Property changes are
|
|
1276
|
+
* nested under `properties`, mirroring {@linkcode PluginSpaceUpdateArgs}.
|
|
1277
|
+
*
|
|
1278
|
+
* | Property | Type | Description |
|
|
1279
|
+
* |---|---|---|
|
|
1280
|
+
* | `spaceId` | `string` | The space to update |
|
|
1281
|
+
* | `profile` | {@linkcode PProfile}`?` | New floor shape (requires `extrudeHeight`) |
|
|
1282
|
+
* | `extrudeHeight` | `number?` | New extrusion height (requires `profile`) |
|
|
1283
|
+
* | `properties` | `object?` | Property changes (same shape as {@linkcode PluginSpaceUpdateArgs.properties}) |
|
|
1284
|
+
*/
|
|
1285
|
+
export declare const PluginSpaceBulkUpdateItem: z.ZodObject<{
|
|
1286
|
+
spaceId: z.ZodString;
|
|
1287
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
1288
|
+
curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1289
|
+
curveType: z.ZodLiteral<"Line">;
|
|
1290
|
+
startPoint: z.ZodObject<{
|
|
1291
|
+
x: z.ZodNumber;
|
|
1292
|
+
y: z.ZodNumber;
|
|
1293
|
+
z: z.ZodNumber;
|
|
1294
|
+
}, z.core.$strip>;
|
|
1295
|
+
endPoint: z.ZodObject<{
|
|
1296
|
+
x: z.ZodNumber;
|
|
1297
|
+
y: z.ZodNumber;
|
|
1298
|
+
z: z.ZodNumber;
|
|
1299
|
+
}, z.core.$strip>;
|
|
1300
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1301
|
+
curveType: z.ZodLiteral<"Arc">;
|
|
1302
|
+
startPoint: z.ZodObject<{
|
|
1303
|
+
x: z.ZodNumber;
|
|
1304
|
+
y: z.ZodNumber;
|
|
1305
|
+
z: z.ZodNumber;
|
|
1306
|
+
}, z.core.$strip>;
|
|
1307
|
+
endPoint: z.ZodObject<{
|
|
1308
|
+
x: z.ZodNumber;
|
|
1309
|
+
y: z.ZodNumber;
|
|
1310
|
+
z: z.ZodNumber;
|
|
1311
|
+
}, z.core.$strip>;
|
|
1312
|
+
centrePoint: z.ZodObject<{
|
|
1313
|
+
x: z.ZodNumber;
|
|
1314
|
+
y: z.ZodNumber;
|
|
1315
|
+
z: z.ZodNumber;
|
|
1316
|
+
}, z.core.$strip>;
|
|
1317
|
+
axis: z.ZodObject<{
|
|
1318
|
+
x: z.ZodNumber;
|
|
1319
|
+
y: z.ZodNumber;
|
|
1320
|
+
z: z.ZodNumber;
|
|
1321
|
+
}, z.core.$strip>;
|
|
1322
|
+
}, z.core.$strip>], "curveType">>;
|
|
1323
|
+
}, z.core.$strip>>;
|
|
1324
|
+
extrudeHeight: z.ZodOptional<z.ZodNumber>;
|
|
1325
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
1326
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
1327
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
1328
|
+
Room: "Room";
|
|
1329
|
+
Plinth: "Plinth";
|
|
1330
|
+
Void: "Void";
|
|
1331
|
+
Pergola: "Pergola";
|
|
1332
|
+
Furniture: "Furniture";
|
|
1333
|
+
"Facade element": "Facade element";
|
|
1334
|
+
"Generic mass": "Generic mass";
|
|
1335
|
+
Department: "Department";
|
|
1336
|
+
Building: "Building";
|
|
1337
|
+
"Revit Import": "Revit Import";
|
|
1338
|
+
Mass: "Mass";
|
|
1339
|
+
Site: "Site";
|
|
1340
|
+
}>>;
|
|
1341
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
1342
|
+
Room: "Room";
|
|
1343
|
+
"Program Block": "Program Block";
|
|
1344
|
+
Balcony: "Balcony";
|
|
1345
|
+
Road: "Road";
|
|
1346
|
+
Garden: "Garden";
|
|
1347
|
+
Deck: "Deck";
|
|
1348
|
+
Pool: "Pool";
|
|
1349
|
+
Walkway: "Walkway";
|
|
1350
|
+
Envelope: "Envelope";
|
|
1351
|
+
Parking: "Parking";
|
|
1352
|
+
}>>;
|
|
1353
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1354
|
+
DEFAULT: "DEFAULT";
|
|
1355
|
+
SITE: "SITE";
|
|
1356
|
+
ENVELOPE: "ENVELOPE";
|
|
1357
|
+
CORE: "CORE";
|
|
1358
|
+
}>, z.ZodUUID]>>;
|
|
1359
|
+
}, z.core.$strip>>;
|
|
1360
|
+
}, z.core.$strip>;
|
|
1361
|
+
export type PluginSpaceBulkUpdateItem = z.infer<typeof PluginSpaceBulkUpdateItem>;
|
|
1362
|
+
/**
|
|
1363
|
+
* Arguments for {@linkcode PluginSpaceApi.bulkUpdate}.
|
|
1364
|
+
*
|
|
1365
|
+
* | Property | Type | Description |
|
|
1366
|
+
* |---|---|---|
|
|
1367
|
+
* | `items` | {@linkcode PluginSpaceBulkUpdateItem}`[]` | Spaces to update |
|
|
1368
|
+
*/
|
|
1369
|
+
export declare const PluginSpaceBulkUpdateArgs: z.ZodObject<{
|
|
1370
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1371
|
+
spaceId: z.ZodString;
|
|
1372
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
1373
|
+
curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1374
|
+
curveType: z.ZodLiteral<"Line">;
|
|
1375
|
+
startPoint: z.ZodObject<{
|
|
1376
|
+
x: z.ZodNumber;
|
|
1377
|
+
y: z.ZodNumber;
|
|
1378
|
+
z: z.ZodNumber;
|
|
1379
|
+
}, z.core.$strip>;
|
|
1380
|
+
endPoint: z.ZodObject<{
|
|
1381
|
+
x: z.ZodNumber;
|
|
1382
|
+
y: z.ZodNumber;
|
|
1383
|
+
z: z.ZodNumber;
|
|
1384
|
+
}, z.core.$strip>;
|
|
1385
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1386
|
+
curveType: z.ZodLiteral<"Arc">;
|
|
1387
|
+
startPoint: z.ZodObject<{
|
|
1388
|
+
x: z.ZodNumber;
|
|
1389
|
+
y: z.ZodNumber;
|
|
1390
|
+
z: z.ZodNumber;
|
|
1391
|
+
}, z.core.$strip>;
|
|
1392
|
+
endPoint: z.ZodObject<{
|
|
1393
|
+
x: z.ZodNumber;
|
|
1394
|
+
y: z.ZodNumber;
|
|
1395
|
+
z: z.ZodNumber;
|
|
1396
|
+
}, z.core.$strip>;
|
|
1397
|
+
centrePoint: z.ZodObject<{
|
|
1398
|
+
x: z.ZodNumber;
|
|
1399
|
+
y: z.ZodNumber;
|
|
1400
|
+
z: z.ZodNumber;
|
|
1401
|
+
}, z.core.$strip>;
|
|
1402
|
+
axis: z.ZodObject<{
|
|
1403
|
+
x: z.ZodNumber;
|
|
1404
|
+
y: z.ZodNumber;
|
|
1405
|
+
z: z.ZodNumber;
|
|
1406
|
+
}, z.core.$strip>;
|
|
1407
|
+
}, z.core.$strip>], "curveType">>;
|
|
1408
|
+
}, z.core.$strip>>;
|
|
1409
|
+
extrudeHeight: z.ZodOptional<z.ZodNumber>;
|
|
1410
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
1411
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
1412
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
1413
|
+
Room: "Room";
|
|
1414
|
+
Plinth: "Plinth";
|
|
1415
|
+
Void: "Void";
|
|
1416
|
+
Pergola: "Pergola";
|
|
1417
|
+
Furniture: "Furniture";
|
|
1418
|
+
"Facade element": "Facade element";
|
|
1419
|
+
"Generic mass": "Generic mass";
|
|
1420
|
+
Department: "Department";
|
|
1421
|
+
Building: "Building";
|
|
1422
|
+
"Revit Import": "Revit Import";
|
|
1423
|
+
Mass: "Mass";
|
|
1424
|
+
Site: "Site";
|
|
1425
|
+
}>>;
|
|
1426
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
1427
|
+
Room: "Room";
|
|
1428
|
+
"Program Block": "Program Block";
|
|
1429
|
+
Balcony: "Balcony";
|
|
1430
|
+
Road: "Road";
|
|
1431
|
+
Garden: "Garden";
|
|
1432
|
+
Deck: "Deck";
|
|
1433
|
+
Pool: "Pool";
|
|
1434
|
+
Walkway: "Walkway";
|
|
1435
|
+
Envelope: "Envelope";
|
|
1436
|
+
Parking: "Parking";
|
|
1437
|
+
}>>;
|
|
1438
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1439
|
+
DEFAULT: "DEFAULT";
|
|
1440
|
+
SITE: "SITE";
|
|
1441
|
+
ENVELOPE: "ENVELOPE";
|
|
1442
|
+
CORE: "CORE";
|
|
1443
|
+
}>, z.ZodUUID]>>;
|
|
1444
|
+
}, z.core.$strip>>;
|
|
1445
|
+
}, z.core.$strip>>;
|
|
1446
|
+
}, z.core.$strip>;
|
|
1447
|
+
export type PluginSpaceBulkUpdateArgs = z.infer<typeof PluginSpaceBulkUpdateArgs>;
|
|
1448
|
+
/**
|
|
1449
|
+
* Result of {@linkcode PluginSpaceApi.bulkUpdate}.
|
|
1450
|
+
*
|
|
1451
|
+
* Echoes one {@linkcode PluginSpaceUpdateResult} per item, in input order —
|
|
1452
|
+
* the same per-space shape returned by {@linkcode PluginSpaceApi.update}.
|
|
1453
|
+
*
|
|
1454
|
+
* | Property | Type | Description |
|
|
1455
|
+
* |---|---|---|
|
|
1456
|
+
* | `spaces` | {@linkcode PluginSpaceUpdateResult}`[]` | Per-item updated values, in input order |
|
|
1457
|
+
*/
|
|
1458
|
+
export declare const PluginSpaceBulkUpdateResult: z.ZodObject<{
|
|
1459
|
+
spaces: z.ZodArray<z.ZodObject<{
|
|
1460
|
+
spaceId: z.ZodString;
|
|
1461
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
1462
|
+
massType: z.ZodOptional<z.ZodString>;
|
|
1463
|
+
spaceType: z.ZodOptional<z.ZodString>;
|
|
1464
|
+
departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1465
|
+
}, z.core.$strip>>;
|
|
1466
|
+
}, z.core.$strip>;
|
|
1467
|
+
export type PluginSpaceBulkUpdateResult = z.infer<typeof PluginSpaceBulkUpdateResult>;
|
|
1468
|
+
/**
|
|
1469
|
+
* Arguments for {@linkcode PluginSpaceApi.bulkDelete}.
|
|
1470
|
+
*
|
|
1471
|
+
* | Property | Type | Description |
|
|
1472
|
+
* |---|---|---|
|
|
1473
|
+
* | `spaceIds` | `string[]` | The space IDs to delete |
|
|
1474
|
+
*/
|
|
1475
|
+
export declare const PluginSpaceBulkDeleteArgs: z.ZodObject<{
|
|
1476
|
+
spaceIds: z.ZodArray<z.ZodString>;
|
|
1477
|
+
}, z.core.$strip>;
|
|
1478
|
+
export type PluginSpaceBulkDeleteArgs = z.infer<typeof PluginSpaceBulkDeleteArgs>;
|
|
1479
|
+
/**
|
|
1480
|
+
* Result of {@linkcode PluginSpaceApi.bulkDelete}.
|
|
1481
|
+
*
|
|
1482
|
+
* | Property | Type | Description |
|
|
1483
|
+
* |---|---|---|
|
|
1484
|
+
* | `deletedSpaceIds` | `string[]` | The space IDs that were removed |
|
|
1485
|
+
*/
|
|
1486
|
+
export declare const PluginSpaceBulkDeleteResult: z.ZodObject<{
|
|
1487
|
+
deletedSpaceIds: z.ZodArray<z.ZodString>;
|
|
1488
|
+
}, z.core.$strip>;
|
|
1489
|
+
export type PluginSpaceBulkDeleteResult = z.infer<typeof PluginSpaceBulkDeleteResult>;
|
|
1490
|
+
//# sourceMappingURL=space.d.ts.map
|