@snaptrude/plugin-core 0.2.4 → 0.2.5

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/api/core/geom/arc.d.ts +81 -0
  3. package/dist/api/core/geom/arc.d.ts.map +1 -0
  4. package/dist/api/core/geom/curve.d.ts +70 -0
  5. package/dist/api/core/geom/curve.d.ts.map +1 -0
  6. package/dist/api/core/geom/index.d.ts +32 -0
  7. package/dist/api/core/geom/index.d.ts.map +1 -0
  8. package/dist/api/core/geom/line.d.ts +56 -0
  9. package/dist/api/core/geom/line.d.ts.map +1 -0
  10. package/dist/api/core/geom/profile.d.ts +121 -0
  11. package/dist/api/core/geom/profile.d.ts.map +1 -0
  12. package/dist/api/core/index.d.ts +18 -0
  13. package/dist/api/core/index.d.ts.map +1 -0
  14. package/dist/api/core/math/index.d.ts +18 -0
  15. package/dist/api/core/math/index.d.ts.map +1 -0
  16. package/dist/api/core/math/quat.d.ts +187 -0
  17. package/dist/api/core/math/quat.d.ts.map +1 -0
  18. package/dist/api/core/math/vec3.d.ts +156 -0
  19. package/dist/api/core/math/vec3.d.ts.map +1 -0
  20. package/dist/api/entity/buildableEnvelope.d.ts +233 -0
  21. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
  22. package/dist/api/entity/department.d.ts +99 -0
  23. package/dist/api/entity/department.d.ts.map +1 -0
  24. package/dist/api/entity/index.d.ts +33 -0
  25. package/dist/api/entity/index.d.ts.map +1 -0
  26. package/dist/api/entity/referenceLine.d.ts +259 -0
  27. package/dist/api/entity/referenceLine.d.ts.map +1 -0
  28. package/dist/api/entity/space.d.ts +816 -0
  29. package/dist/api/entity/space.d.ts.map +1 -0
  30. package/dist/api/entity/story.d.ts +239 -0
  31. package/dist/api/entity/story.d.ts.map +1 -0
  32. package/dist/api/index.d.ts +30 -0
  33. package/dist/api/index.d.ts.map +1 -0
  34. package/dist/api/tools/copy.d.ts +59 -0
  35. package/dist/api/tools/copy.d.ts.map +1 -0
  36. package/dist/api/tools/index.d.ts +29 -0
  37. package/dist/api/tools/index.d.ts.map +1 -0
  38. package/dist/api/tools/offset.d.ts +43 -0
  39. package/dist/api/tools/offset.d.ts.map +1 -0
  40. package/dist/api/tools/selection.d.ts +48 -0
  41. package/dist/api/tools/selection.d.ts.map +1 -0
  42. package/dist/api/tools/transform.d.ts +114 -0
  43. package/dist/api/tools/transform.d.ts.map +1 -0
  44. package/dist/api/units/index.d.ts +163 -0
  45. package/dist/api/units/index.d.ts.map +1 -0
  46. package/dist/host-utils.d.ts +41 -0
  47. package/dist/host-utils.d.ts.map +1 -0
  48. package/dist/index.d.ts +4 -0
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/types.d.ts +16 -0
  51. package/dist/types.d.ts.map +1 -0
  52. package/package.json +1 -1
@@ -0,0 +1,816 @@
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
+ /**
241
+ * Arguments for {@linkcode PluginSpaceApi.createRectangular}.
242
+ *
243
+ * | Property | Type | Description |
244
+ * |---|---|---|
245
+ * | `position` | {@linkcode PVec3} | Origin position in Babylon units |
246
+ * | `dimensions` | `{ width, height, depth }` | Box dimensions in Babylon units |
247
+ */
248
+ export declare const PluginSpaceCreateRectangularArgs: z.ZodObject<{
249
+ position: z.ZodObject<{
250
+ x: z.ZodNumber;
251
+ y: z.ZodNumber;
252
+ z: z.ZodNumber;
253
+ }, z.core.$strip>;
254
+ dimensions: z.ZodObject<{
255
+ width: z.ZodNumber;
256
+ height: z.ZodNumber;
257
+ depth: z.ZodNumber;
258
+ }, z.core.$strip>;
259
+ }, z.core.$strip>;
260
+ export type PluginSpaceCreateRectangularArgs = z.infer<typeof PluginSpaceCreateRectangularArgs>;
261
+ /**
262
+ * Result of {@linkcode PluginSpaceApi.createRectangular}.
263
+ *
264
+ * | Property | Type | Description |
265
+ * |---|---|---|
266
+ * | `spaceId` | `string` | Unique ID of the created space |
267
+ */
268
+ export declare const PluginSpaceCreateRectangularResult: z.ZodObject<{
269
+ spaceId: z.ZodString;
270
+ }, z.core.$strip>;
271
+ export type PluginSpaceCreateRectangularResult = z.infer<typeof PluginSpaceCreateRectangularResult>;
272
+ /**
273
+ * Arguments for {@linkcode PluginSpaceApi.createFromProfile}.
274
+ *
275
+ * | Property | Type | Description |
276
+ * |---|---|---|
277
+ * | `profile` | {@linkcode PProfile} | Closed 2D profile defining the outer floor shape |
278
+ * | `innerProfiles` | {@linkcode PProfile}`[]` | Optional closed profiles to subtract as holes |
279
+ * | `extrudeHeight` | `number` | Extrusion height in Babylon units |
280
+ * | `position` | {@linkcode PVec3} | Offset position in Babylon units |
281
+ */
282
+ export declare const PluginSpaceCreateFromProfileArgs: z.ZodObject<{
283
+ profile: z.ZodObject<{
284
+ curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
285
+ curveType: z.ZodLiteral<"Line">;
286
+ startPoint: z.ZodObject<{
287
+ x: z.ZodNumber;
288
+ y: z.ZodNumber;
289
+ z: z.ZodNumber;
290
+ }, z.core.$strip>;
291
+ endPoint: z.ZodObject<{
292
+ x: z.ZodNumber;
293
+ y: z.ZodNumber;
294
+ z: z.ZodNumber;
295
+ }, z.core.$strip>;
296
+ }, z.core.$strip>, z.ZodObject<{
297
+ curveType: z.ZodLiteral<"Arc">;
298
+ startPoint: z.ZodObject<{
299
+ x: z.ZodNumber;
300
+ y: z.ZodNumber;
301
+ z: z.ZodNumber;
302
+ }, z.core.$strip>;
303
+ endPoint: z.ZodObject<{
304
+ x: z.ZodNumber;
305
+ y: z.ZodNumber;
306
+ z: z.ZodNumber;
307
+ }, z.core.$strip>;
308
+ centrePoint: z.ZodObject<{
309
+ x: z.ZodNumber;
310
+ y: z.ZodNumber;
311
+ z: z.ZodNumber;
312
+ }, z.core.$strip>;
313
+ axis: z.ZodObject<{
314
+ x: z.ZodNumber;
315
+ y: z.ZodNumber;
316
+ z: z.ZodNumber;
317
+ }, z.core.$strip>;
318
+ }, z.core.$strip>], "curveType">>;
319
+ }, z.core.$strip>;
320
+ innerProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
321
+ curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
322
+ curveType: z.ZodLiteral<"Line">;
323
+ startPoint: z.ZodObject<{
324
+ x: z.ZodNumber;
325
+ y: z.ZodNumber;
326
+ z: z.ZodNumber;
327
+ }, z.core.$strip>;
328
+ endPoint: z.ZodObject<{
329
+ x: z.ZodNumber;
330
+ y: z.ZodNumber;
331
+ z: z.ZodNumber;
332
+ }, z.core.$strip>;
333
+ }, z.core.$strip>, z.ZodObject<{
334
+ curveType: z.ZodLiteral<"Arc">;
335
+ startPoint: z.ZodObject<{
336
+ x: z.ZodNumber;
337
+ y: z.ZodNumber;
338
+ z: z.ZodNumber;
339
+ }, z.core.$strip>;
340
+ endPoint: z.ZodObject<{
341
+ x: z.ZodNumber;
342
+ y: z.ZodNumber;
343
+ z: z.ZodNumber;
344
+ }, z.core.$strip>;
345
+ centrePoint: z.ZodObject<{
346
+ x: z.ZodNumber;
347
+ y: z.ZodNumber;
348
+ z: z.ZodNumber;
349
+ }, z.core.$strip>;
350
+ axis: z.ZodObject<{
351
+ x: z.ZodNumber;
352
+ y: z.ZodNumber;
353
+ z: z.ZodNumber;
354
+ }, z.core.$strip>;
355
+ }, z.core.$strip>], "curveType">>;
356
+ }, z.core.$strip>>>;
357
+ extrudeHeight: z.ZodNumber;
358
+ position: z.ZodObject<{
359
+ x: z.ZodNumber;
360
+ y: z.ZodNumber;
361
+ z: z.ZodNumber;
362
+ }, z.core.$strip>;
363
+ }, z.core.$strip>;
364
+ export type PluginSpaceCreateFromProfileArgs = z.infer<typeof PluginSpaceCreateFromProfileArgs>;
365
+ /**
366
+ * Result of {@linkcode PluginSpaceApi.createFromProfile}.
367
+ *
368
+ * | Property | Type | Description |
369
+ * |---|---|---|
370
+ * | `spaceId` | `string` | Unique ID of the created space |
371
+ */
372
+ export declare const PluginSpaceCreateFromProfileResult: z.ZodObject<{
373
+ spaceId: z.ZodString;
374
+ }, z.core.$strip>;
375
+ export type PluginSpaceCreateFromProfileResult = z.infer<typeof PluginSpaceCreateFromProfileResult>;
376
+ /**
377
+ * Arguments for {@linkcode PluginSpaceApi.updateGeometryFromProfile}.
378
+ *
379
+ * | Property | Type | Description |
380
+ * |---|---|---|
381
+ * | `spaceId` | `string` | Space to update |
382
+ * | `profile` | {@linkcode PProfile} | Closed 2D profile defining the new floor shape |
383
+ * | `extrudeHeight` | `number` | New extrusion height in Babylon units |
384
+ */
385
+ export declare const PluginSpaceUpdateGeometryFromProfileArgs: z.ZodObject<{
386
+ spaceId: z.ZodString;
387
+ profile: z.ZodObject<{
388
+ curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
389
+ curveType: z.ZodLiteral<"Line">;
390
+ startPoint: z.ZodObject<{
391
+ x: z.ZodNumber;
392
+ y: z.ZodNumber;
393
+ z: z.ZodNumber;
394
+ }, z.core.$strip>;
395
+ endPoint: z.ZodObject<{
396
+ x: z.ZodNumber;
397
+ y: z.ZodNumber;
398
+ z: z.ZodNumber;
399
+ }, z.core.$strip>;
400
+ }, z.core.$strip>, z.ZodObject<{
401
+ curveType: z.ZodLiteral<"Arc">;
402
+ startPoint: z.ZodObject<{
403
+ x: z.ZodNumber;
404
+ y: z.ZodNumber;
405
+ z: z.ZodNumber;
406
+ }, z.core.$strip>;
407
+ endPoint: z.ZodObject<{
408
+ x: z.ZodNumber;
409
+ y: z.ZodNumber;
410
+ z: z.ZodNumber;
411
+ }, z.core.$strip>;
412
+ centrePoint: z.ZodObject<{
413
+ x: z.ZodNumber;
414
+ y: z.ZodNumber;
415
+ z: z.ZodNumber;
416
+ }, z.core.$strip>;
417
+ axis: z.ZodObject<{
418
+ x: z.ZodNumber;
419
+ y: z.ZodNumber;
420
+ z: z.ZodNumber;
421
+ }, z.core.$strip>;
422
+ }, z.core.$strip>], "curveType">>;
423
+ }, z.core.$strip>;
424
+ extrudeHeight: z.ZodNumber;
425
+ }, z.core.$strip>;
426
+ export type PluginSpaceUpdateGeometryFromProfileArgs = z.infer<typeof PluginSpaceUpdateGeometryFromProfileArgs>;
427
+ /**
428
+ * Result of {@linkcode PluginSpaceApi.updateGeometryFromProfile}.
429
+ *
430
+ * | Property | Type | Description |
431
+ * |---|---|---|
432
+ * | `spaceId` | `string` | Unique ID of the updated space |
433
+ */
434
+ export declare const PluginSpaceUpdateGeometryFromProfileResult: z.ZodObject<{
435
+ spaceId: z.ZodString;
436
+ }, z.core.$strip>;
437
+ export type PluginSpaceUpdateGeometryFromProfileResult = z.infer<typeof PluginSpaceUpdateGeometryFromProfileResult>;
438
+ /**
439
+ * Available properties that can be queried on a space.
440
+ *
441
+ * **Basic:**
442
+ * | Value | Return Type | Description |
443
+ * |---|---|---|
444
+ * | `"id"` | `string` | Unique space identifier |
445
+ * | `"type"` | `string` | Component type |
446
+ * | `"room_type"` | `string` | Room type classification |
447
+ * | `"name"` | `string` | Display name of the space |
448
+ *
449
+ * **Derived from parametric data:**
450
+ * | Value | Return Type | Description |
451
+ * |---|---|---|
452
+ * | `"area"` | `number` | Bottom face area (from `areas_bottomFace`) |
453
+ * | `"breadth"` | `number` | Breadth dimension |
454
+ * | `"depth"` | `number` | Depth dimension |
455
+ * | `"height"` | `number` | Height dimension |
456
+ * | `"massType"` | `string \| null` | Mass type classification |
457
+ * | `"spaceType"` | `string \| null` | Space type classification (Room, Balcony, etc.) |
458
+ * | `"storey"` | `number \| null` | Story the space belongs to |
459
+ * | `"departmentId"` | `string \| null` | Assigned department ID |
460
+ * | `"departmentName"` | `string` | Assigned department name |
461
+ * | `"departmentColor"` | `string` | Assigned department color (hex/CSS) |
462
+ *
463
+ * **Derived from mesh:**
464
+ * | Value | Return Type | Description |
465
+ * |---|---|---|
466
+ * | `"position"` | {@linkcode PVec3} | Local position relative to parent |
467
+ * | `"absolutePosition"` | {@linkcode PVec3} | Absolute position in the scene |
468
+ * | `"rotation"` | {@linkcode PVec3} | Euler rotation angles (radians) |
469
+ * | `"rotationQuaternion"` | {@linkcode PQuat} \| `null` | Quaternion rotation, or `null` if unset |
470
+ *
471
+ * **Derived from brep:**
472
+ * | Value | Return Type | Description |
473
+ * |---|---|---|
474
+ * | `"planPoints"` | {@linkcode PVec3}`[]` | Bottom outer profile points in world space with `y = 0` (2D plan). No closing duplicate point. |
475
+ * | `"profile"` | {@linkcode PProfile} | Bottom outer profile in world space, preserving line/arc curve data. |
476
+ */
477
+ export declare const PluginSpaceGetProperty: z.ZodEnum<{
478
+ type: "type";
479
+ name: "name";
480
+ departmentId: "departmentId";
481
+ id: "id";
482
+ profile: "profile";
483
+ position: "position";
484
+ height: "height";
485
+ depth: "depth";
486
+ room_type: "room_type";
487
+ area: "area";
488
+ breadth: "breadth";
489
+ massType: "massType";
490
+ spaceType: "spaceType";
491
+ storey: "storey";
492
+ departmentName: "departmentName";
493
+ departmentColor: "departmentColor";
494
+ absolutePosition: "absolutePosition";
495
+ rotation: "rotation";
496
+ rotationQuaternion: "rotationQuaternion";
497
+ planPoints: "planPoints";
498
+ }>;
499
+ /**
500
+ * Arguments for {@linkcode PluginSpaceApi.get}.
501
+ *
502
+ * | Property | Type | Description |
503
+ * |---|---|---|
504
+ * | `spaceId` | `string` | The space ID to query |
505
+ * | `properties` | {@linkcode PluginSpaceGetProperty}`[]` | Properties to retrieve |
506
+ */
507
+ export declare const PluginSpaceGetArgs: z.ZodObject<{
508
+ spaceId: z.ZodString;
509
+ properties: z.ZodArray<z.ZodEnum<{
510
+ type: "type";
511
+ name: "name";
512
+ departmentId: "departmentId";
513
+ id: "id";
514
+ profile: "profile";
515
+ position: "position";
516
+ height: "height";
517
+ depth: "depth";
518
+ room_type: "room_type";
519
+ area: "area";
520
+ breadth: "breadth";
521
+ massType: "massType";
522
+ spaceType: "spaceType";
523
+ storey: "storey";
524
+ departmentName: "departmentName";
525
+ departmentColor: "departmentColor";
526
+ absolutePosition: "absolutePosition";
527
+ rotation: "rotation";
528
+ rotationQuaternion: "rotationQuaternion";
529
+ planPoints: "planPoints";
530
+ }>>;
531
+ }, z.core.$strip>;
532
+ export type PluginSpaceGetArgs = z.infer<typeof PluginSpaceGetArgs>;
533
+ /**
534
+ * Supported space type values.
535
+ *
536
+ * Mirrors the internal `SpaceType` enum from `spaceType.types.ts`.
537
+ *
538
+ * | Value | Description |
539
+ * |---|---|
540
+ * | `"Room"` | Standard room |
541
+ * | `"Program Block"` | Program/department block |
542
+ * | `"Balcony"` | Balcony space |
543
+ * | `"Road"` | Road |
544
+ * | `"Garden"` | Garden area |
545
+ * | `"Deck"` | Deck |
546
+ * | `"Pool"` | Pool |
547
+ * | `"Walkway"` | Walkway |
548
+ * | `"Envelope"` | Envelope |
549
+ * | `"Parking"` | Parking area |
550
+ */
551
+ export declare const PluginSpaceType: z.ZodEnum<{
552
+ Room: "Room";
553
+ "Program Block": "Program Block";
554
+ Balcony: "Balcony";
555
+ Road: "Road";
556
+ Garden: "Garden";
557
+ Deck: "Deck";
558
+ Pool: "Pool";
559
+ Walkway: "Walkway";
560
+ Envelope: "Envelope";
561
+ Parking: "Parking";
562
+ }>;
563
+ /**
564
+ * Result of {@linkcode PluginSpaceApi.get}.
565
+ *
566
+ * A partial object — only the properties that were requested in
567
+ * {@linkcode PluginSpaceGetArgs.properties} will be present.
568
+ */
569
+ export declare const PluginSpaceGetResult: z.ZodObject<{
570
+ id: z.ZodOptional<z.ZodString>;
571
+ type: z.ZodOptional<z.ZodString>;
572
+ room_type: z.ZodOptional<z.ZodString>;
573
+ name: z.ZodOptional<z.ZodString>;
574
+ area: z.ZodOptional<z.ZodNumber>;
575
+ breadth: z.ZodOptional<z.ZodNumber>;
576
+ depth: z.ZodOptional<z.ZodNumber>;
577
+ height: z.ZodOptional<z.ZodNumber>;
578
+ massType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
579
+ spaceType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
580
+ Room: "Room";
581
+ "Program Block": "Program Block";
582
+ Balcony: "Balcony";
583
+ Road: "Road";
584
+ Garden: "Garden";
585
+ Deck: "Deck";
586
+ Pool: "Pool";
587
+ Walkway: "Walkway";
588
+ Envelope: "Envelope";
589
+ Parking: "Parking";
590
+ }>>>;
591
+ storey: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
592
+ departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
593
+ departmentName: z.ZodOptional<z.ZodString>;
594
+ departmentColor: z.ZodOptional<z.ZodString>;
595
+ position: z.ZodOptional<z.ZodObject<{
596
+ x: z.ZodNumber;
597
+ y: z.ZodNumber;
598
+ z: z.ZodNumber;
599
+ }, z.core.$strip>>;
600
+ absolutePosition: z.ZodOptional<z.ZodObject<{
601
+ x: z.ZodNumber;
602
+ y: z.ZodNumber;
603
+ z: z.ZodNumber;
604
+ }, z.core.$strip>>;
605
+ rotation: z.ZodOptional<z.ZodObject<{
606
+ x: z.ZodNumber;
607
+ y: z.ZodNumber;
608
+ z: z.ZodNumber;
609
+ }, z.core.$strip>>;
610
+ rotationQuaternion: z.ZodOptional<z.ZodNullable<z.ZodObject<{
611
+ x: z.ZodNumber;
612
+ y: z.ZodNumber;
613
+ z: z.ZodNumber;
614
+ w: z.ZodNumber;
615
+ }, z.core.$strip>>>;
616
+ planPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
617
+ x: z.ZodNumber;
618
+ y: z.ZodNumber;
619
+ z: z.ZodNumber;
620
+ }, z.core.$strip>>>;
621
+ profile: z.ZodOptional<z.ZodObject<{
622
+ curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
623
+ curveType: z.ZodLiteral<"Line">;
624
+ startPoint: z.ZodObject<{
625
+ x: z.ZodNumber;
626
+ y: z.ZodNumber;
627
+ z: z.ZodNumber;
628
+ }, z.core.$strip>;
629
+ endPoint: z.ZodObject<{
630
+ x: z.ZodNumber;
631
+ y: z.ZodNumber;
632
+ z: z.ZodNumber;
633
+ }, z.core.$strip>;
634
+ }, z.core.$strip>, z.ZodObject<{
635
+ curveType: z.ZodLiteral<"Arc">;
636
+ startPoint: z.ZodObject<{
637
+ x: z.ZodNumber;
638
+ y: z.ZodNumber;
639
+ z: z.ZodNumber;
640
+ }, z.core.$strip>;
641
+ endPoint: z.ZodObject<{
642
+ x: z.ZodNumber;
643
+ y: z.ZodNumber;
644
+ z: z.ZodNumber;
645
+ }, z.core.$strip>;
646
+ centrePoint: z.ZodObject<{
647
+ x: z.ZodNumber;
648
+ y: z.ZodNumber;
649
+ z: z.ZodNumber;
650
+ }, z.core.$strip>;
651
+ axis: z.ZodObject<{
652
+ x: z.ZodNumber;
653
+ y: z.ZodNumber;
654
+ z: z.ZodNumber;
655
+ }, z.core.$strip>;
656
+ }, z.core.$strip>], "curveType">>;
657
+ }, z.core.$strip>>;
658
+ }, z.core.$strip>;
659
+ export type PluginSpaceGetResult = z.infer<typeof PluginSpaceGetResult>;
660
+ /**
661
+ * Result of {@linkcode PluginSpaceApi.getAll}.
662
+ *
663
+ * | Property | Type | Description |
664
+ * |---|---|---|
665
+ * | `spacesIds` | `string[]` | IDs of all spaces in the project |
666
+ */
667
+ export declare const PluginSpaceGetAllResult: z.ZodObject<{
668
+ spacesIds: z.ZodArray<z.ZodString>;
669
+ }, z.core.$strip>;
670
+ export type PluginSpaceGetAllResult = z.infer<typeof PluginSpaceGetAllResult>;
671
+ /**
672
+ * Arguments for {@linkcode PluginSpaceApi.delete}.
673
+ *
674
+ * | Property | Type | Description |
675
+ * |---|---|---|
676
+ * | `spaceId` | `string` | The space ID to delete |
677
+ */
678
+ export declare const PluginSpaceDeleteArgs: z.ZodObject<{
679
+ spaceId: z.ZodString;
680
+ }, z.core.$strip>;
681
+ export type PluginSpaceDeleteArgs = z.infer<typeof PluginSpaceDeleteArgs>;
682
+ /** Result type for {@linkcode PluginSpaceApi.delete} — returns nothing on success. */
683
+ export type PluginSpaceDeleteResult = void;
684
+ /**
685
+ * Supported mass type values for {@linkcode PluginSpaceUpdateArgs.properties.massType}.
686
+ *
687
+ * Mirrors the internal `MASS_TYPES` enum.
688
+ *
689
+ * | Value | Description |
690
+ * |---|---|
691
+ * | `"Plinth"` | Plinth mass |
692
+ * | `"Void"` | Void/cut-out |
693
+ * | `"Pergola"` | Pergola structure |
694
+ * | `"Furniture"` | Furniture element |
695
+ * | `"Facade element"` | Facade element |
696
+ * | `"Generic mass"` | Generic mass |
697
+ * | `"Room"` | Room (default for spaces) |
698
+ * | `"Department"` | Department block |
699
+ * | `"Building"` | Building envelope |
700
+ * | `"Revit Import"` | Imported from Revit |
701
+ * | `"Mass"` | Generic mass type |
702
+ * | `"Site"` | Site object |
703
+ */
704
+ export declare const PluginMassType: 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
+ /**
719
+ * Well-known (built-in) department IDs.
720
+ *
721
+ * | Value | Department |
722
+ * |---|---|
723
+ * | `"DEFAULT"` | Default department |
724
+ * | `"SITE"` | Site department |
725
+ * | `"ENVELOPE"` | Envelope department |
726
+ * | `"CORE"` | Core department |
727
+ */
728
+ export declare const PluginWellKnownDepartmentId: z.ZodEnum<{
729
+ DEFAULT: "DEFAULT";
730
+ SITE: "SITE";
731
+ ENVELOPE: "ENVELOPE";
732
+ CORE: "CORE";
733
+ }>;
734
+ /**
735
+ * Accepted department ID values — either a {@linkcode PluginWellKnownDepartmentId}
736
+ * or a UUID string for custom (user-created) departments.
737
+ */
738
+ export declare const PluginDepartmentId: z.ZodUnion<readonly [z.ZodEnum<{
739
+ DEFAULT: "DEFAULT";
740
+ SITE: "SITE";
741
+ ENVELOPE: "ENVELOPE";
742
+ CORE: "CORE";
743
+ }>, z.ZodUUID]>;
744
+ /**
745
+ * Arguments for {@linkcode PluginSpaceApi.update}.
746
+ *
747
+ * | Property | Type | Description |
748
+ * |---|---|---|
749
+ * | `spaceId` | `string` | The space ID to update |
750
+ * | `properties` | `object` | Key/value pairs of properties to update (all optional) |
751
+ * | `properties.room_type` | `string?` | New room type label |
752
+ * | `properties.massType` | {@linkcode PluginMassType}`?` | New mass type |
753
+ * | `properties.departmentId` | {@linkcode PluginDepartmentId}`?` | New department ID |
754
+ */
755
+ export declare const PluginSpaceUpdateArgs: z.ZodObject<{
756
+ spaceId: z.ZodString;
757
+ properties: z.ZodObject<{
758
+ room_type: z.ZodOptional<z.ZodString>;
759
+ massType: z.ZodOptional<z.ZodEnum<{
760
+ Room: "Room";
761
+ Plinth: "Plinth";
762
+ Void: "Void";
763
+ Pergola: "Pergola";
764
+ Furniture: "Furniture";
765
+ "Facade element": "Facade element";
766
+ "Generic mass": "Generic mass";
767
+ Department: "Department";
768
+ Building: "Building";
769
+ "Revit Import": "Revit Import";
770
+ Mass: "Mass";
771
+ Site: "Site";
772
+ }>>;
773
+ spaceType: z.ZodOptional<z.ZodEnum<{
774
+ Room: "Room";
775
+ "Program Block": "Program Block";
776
+ Balcony: "Balcony";
777
+ Road: "Road";
778
+ Garden: "Garden";
779
+ Deck: "Deck";
780
+ Pool: "Pool";
781
+ Walkway: "Walkway";
782
+ Envelope: "Envelope";
783
+ Parking: "Parking";
784
+ }>>;
785
+ departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
786
+ DEFAULT: "DEFAULT";
787
+ SITE: "SITE";
788
+ ENVELOPE: "ENVELOPE";
789
+ CORE: "CORE";
790
+ }>, z.ZodUUID]>>;
791
+ }, z.core.$strip>;
792
+ }, z.core.$strip>;
793
+ export type PluginSpaceUpdateArgs = z.infer<typeof PluginSpaceUpdateArgs>;
794
+ /**
795
+ * Result of {@linkcode PluginSpaceApi.update}.
796
+ *
797
+ * Echoes back the `spaceId` and the values of properties that were updated.
798
+ * Properties that were not included in the update request will be `undefined`.
799
+ *
800
+ * | Property | Type | Description |
801
+ * |---|---|---|
802
+ * | `spaceId` | `string` | The space ID that was updated |
803
+ * | `room_type` | `string?` | Updated room type (if changed) |
804
+ * | `massType` | `string?` | Updated mass type (if changed) |
805
+ * | `spaceType` | `string?` | Updated space type (if changed) |
806
+ * | `departmentId` | `string \| null?` | Updated department ID (if changed) |
807
+ */
808
+ export declare const PluginSpaceUpdateResult: z.ZodObject<{
809
+ spaceId: z.ZodString;
810
+ room_type: z.ZodOptional<z.ZodString>;
811
+ massType: z.ZodOptional<z.ZodString>;
812
+ spaceType: z.ZodOptional<z.ZodString>;
813
+ departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
814
+ }, z.core.$strip>;
815
+ export type PluginSpaceUpdateResult = z.infer<typeof PluginSpaceUpdateResult>;
816
+ //# sourceMappingURL=space.d.ts.map