@snaptrude/plugin-core 0.0.5 → 0.0.7

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 (63) hide show
  1. package/dist/api/core/geom/arc.d.ts +50 -1
  2. package/dist/api/core/geom/arc.d.ts.map +1 -1
  3. package/dist/api/core/geom/curve.d.ts +26 -1
  4. package/dist/api/core/geom/curve.d.ts.map +1 -1
  5. package/dist/api/core/geom/index.d.ts +16 -0
  6. package/dist/api/core/geom/index.d.ts.map +1 -1
  7. package/dist/api/core/geom/line.d.ts +35 -1
  8. package/dist/api/core/geom/line.d.ts.map +1 -1
  9. package/dist/api/core/geom/profile.d.ts +66 -2
  10. package/dist/api/core/geom/profile.d.ts.map +1 -1
  11. package/dist/api/core/index.d.ts +8 -0
  12. package/dist/api/core/index.d.ts.map +1 -1
  13. package/dist/api/core/math/index.d.ts +8 -0
  14. package/dist/api/core/math/index.d.ts.map +1 -1
  15. package/dist/api/core/math/quat.d.ts +156 -15
  16. package/dist/api/core/math/quat.d.ts.map +1 -1
  17. package/dist/api/core/math/vec3.d.ts +131 -14
  18. package/dist/api/core/math/vec3.d.ts.map +1 -1
  19. package/dist/api/entity/index.d.ts +13 -0
  20. package/dist/api/entity/index.d.ts.map +1 -1
  21. package/dist/api/entity/referenceLine.d.ts +259 -0
  22. package/dist/api/entity/referenceLine.d.ts.map +1 -0
  23. package/dist/api/entity/space.d.ts +467 -7
  24. package/dist/api/entity/space.d.ts.map +1 -1
  25. package/dist/api/entity/story.d.ts +166 -0
  26. package/dist/api/entity/story.d.ts.map +1 -1
  27. package/dist/api/index.d.ts +14 -0
  28. package/dist/api/index.d.ts.map +1 -1
  29. package/dist/api/tools/index.d.ts +8 -0
  30. package/dist/api/tools/index.d.ts.map +1 -1
  31. package/dist/api/tools/selection.d.ts +37 -0
  32. package/dist/api/tools/selection.d.ts.map +1 -1
  33. package/dist/api/tools/transform.d.ts +82 -0
  34. package/dist/api/tools/transform.d.ts.map +1 -1
  35. package/dist/api/units/index.d.ts +81 -13
  36. package/dist/api/units/index.d.ts.map +1 -1
  37. package/dist/index.cjs +547 -126
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.js +533 -126
  40. package/dist/index.js.map +1 -1
  41. package/dist/types.d.ts +8 -1
  42. package/dist/types.d.ts.map +1 -1
  43. package/package.json +2 -2
  44. package/src/api/core/geom/arc.ts +50 -1
  45. package/src/api/core/geom/curve.ts +26 -1
  46. package/src/api/core/geom/index.ts +16 -0
  47. package/src/api/core/geom/line.ts +35 -1
  48. package/src/api/core/geom/profile.ts +66 -2
  49. package/src/api/core/index.ts +8 -0
  50. package/src/api/core/math/index.ts +8 -0
  51. package/src/api/core/math/quat.ts +156 -15
  52. package/src/api/core/math/vec3.ts +131 -14
  53. package/src/api/entity/index.ts +13 -0
  54. package/src/api/entity/referenceLine.ts +215 -0
  55. package/src/api/entity/space.ts +447 -11
  56. package/src/api/entity/story.ts +166 -0
  57. package/src/api/index.ts +14 -0
  58. package/src/api/tools/index.ts +8 -0
  59. package/src/api/tools/selection.ts +37 -0
  60. package/src/api/tools/transform.ts +82 -0
  61. package/src/api/units/index.ts +81 -13
  62. package/src/types.ts +8 -1
  63. package/tsup.config.ts +0 -1
@@ -1,13 +1,187 @@
1
1
  import * as z from "zod";
2
2
  import { PluginApiReturn } from "../../types";
3
+ /**
4
+ * Space (room/mass) management — create, query, 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
+ */
3
15
  export declare abstract class PluginSpaceApi {
4
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
+ */
5
43
  abstract createRectangular({ position, dimensions, }: PluginSpaceCreateRectangularArgs): PluginApiReturn<PluginSpaceCreateRectangularResult>;
44
+ /**
45
+ * Create a space by extruding a 2D profile.
46
+ *
47
+ * The {@linkcode PluginSpaceCreateFromProfileArgs.profile profile} is extruded
48
+ * upward (along the Y axis) by {@linkcode PluginSpaceCreateFromProfileArgs.extrudeHeight
49
+ * extrudeHeight}, then offset by {@linkcode PluginSpaceCreateFromProfileArgs.position
50
+ * position}. The created space is automatically assigned to the active story
51
+ * and a default department.
52
+ *
53
+ * Use {@linkcode PluginProfileApi.fromLinePoints} to quickly build a profile
54
+ * from a list of points.
55
+ *
56
+ * @param args - An object containing:
57
+ * - {@linkcode PluginSpaceCreateFromProfileArgs.profile args.profile} — A closed
58
+ * {@linkcode PProfile} defining the floor shape
59
+ * - {@linkcode PluginSpaceCreateFromProfileArgs.extrudeHeight args.extrudeHeight} —
60
+ * Extrusion height in Babylon units
61
+ * - {@linkcode PluginSpaceCreateFromProfileArgs.position args.position} — Offset
62
+ * position as a {@linkcode PVec3} in Babylon units
63
+ * @returns A {@linkcode PluginSpaceCreateFromProfileResult} with the `spaceId`
64
+ * of the created space
65
+ * @throws If the profile is invalid or mesh creation fails
66
+ *
67
+ * # Example
68
+ * ```ts
69
+ * const { vec3 } = snaptrude.core.math
70
+ *
71
+ * const profile = await snaptrude.core.geom.profile.fromLinePoints({
72
+ * points: [
73
+ * vec3.new(0, 0, 0),
74
+ * vec3.new(10, 0, 0),
75
+ * vec3.new(10, 0, 8),
76
+ * vec3.new(0, 0, 8),
77
+ * ],
78
+ * })
79
+ *
80
+ * const { spaceId } = await snaptrude.entity.space.createFromProfile({
81
+ * profile,
82
+ * extrudeHeight: 3,
83
+ * position: vec3.new(0, 0, 0),
84
+ * })
85
+ * ```
86
+ */
6
87
  abstract createFromProfile({ profile, extrudeHeight, position, }: PluginSpaceCreateFromProfileArgs): PluginApiReturn<PluginSpaceCreateFromProfileResult>;
88
+ /**
89
+ * Get the IDs of all spaces in the current project.
90
+ *
91
+ * Returns every space (mass that is not a building) across all stories.
92
+ * Use the returned IDs with {@linkcode PluginSpaceApi.get} to query
93
+ * individual space properties.
94
+ *
95
+ * @returns A {@linkcode PluginSpaceGetAllResult} with a `spacesIds` array
96
+ *
97
+ * # Example
98
+ * ```ts
99
+ * const { spacesIds } = await snaptrude.entity.space.getAll()
100
+ * console.log(`Project has ${spacesIds.length} spaces`)
101
+ * ```
102
+ */
7
103
  abstract getAll(): PluginApiReturn<PluginSpaceGetAllResult>;
104
+ /**
105
+ * Get properties of a space by its ID.
106
+ *
107
+ * Only the properties listed in {@linkcode PluginSpaceGetArgs.properties
108
+ * args.properties} are returned — unlisted properties will be `undefined`
109
+ * in the result.
110
+ *
111
+ * @param args - An object containing:
112
+ * - {@linkcode PluginSpaceGetArgs.spaceId args.spaceId} — The unique space ID
113
+ * (as returned by creation methods or {@linkcode PluginSpaceApi.getAll})
114
+ * - {@linkcode PluginSpaceGetArgs.properties args.properties} — Array of property
115
+ * names to retrieve. See {@linkcode PluginSpaceGetProperty} for available values.
116
+ * @returns A partial {@linkcode PluginSpaceGetResult} containing only the requested
117
+ * properties
118
+ * @throws If the space does not exist or the component is not a space/mass
119
+ *
120
+ * # Example
121
+ * ```ts
122
+ * const info = await snaptrude.entity.space.get({
123
+ * spaceId: "some-space-id",
124
+ * properties: ["name", "area", "position"],
125
+ * })
126
+ * console.log(info.name, info.area, info.position)
127
+ * ```
128
+ */
8
129
  abstract get({ spaceId, properties, }: PluginSpaceGetArgs): PluginApiReturn<PluginSpaceGetResult>;
9
- abstract deleteById({ spaceId, }: PluginSpaceDeleteByIdArgs): PluginApiReturn<PluginSpaceDeleteByIdResult>;
130
+ /**
131
+ * Delete a space by its ID.
132
+ *
133
+ * Permanently removes the space and its associated mesh from the scene.
134
+ * This operation is undoable via Snaptrude's command system.
135
+ *
136
+ * @param args - An object containing:
137
+ * - {@linkcode PluginSpaceDeleteArgs.spaceId args.spaceId} — The unique space ID
138
+ * to delete
139
+ * @throws If the space does not exist or the component is not a space/mass
140
+ *
141
+ * # Example
142
+ * ```ts
143
+ * await snaptrude.entity.space.delete({ spaceId: "some-space-id" })
144
+ * ```
145
+ */
146
+ abstract delete({ spaceId, }: PluginSpaceDeleteArgs): PluginApiReturn<PluginSpaceDeleteResult>;
147
+ /**
148
+ * Update properties of a space by its ID.
149
+ *
150
+ * Only the properties provided in {@linkcode PluginSpaceUpdateArgs.properties
151
+ * args.properties} will be updated — omitted properties remain unchanged.
152
+ * This operation is undoable via Snaptrude's command system.
153
+ *
154
+ * @param args - An object containing:
155
+ * - {@linkcode PluginSpaceUpdateArgs.spaceId args.spaceId} — The unique space ID
156
+ * to update
157
+ * - {@linkcode PluginSpaceUpdateArgs.properties args.properties} — Key/value pairs
158
+ * of properties to update. See {@linkcode PluginSpaceUpdateArgs} for supported fields.
159
+ * @returns A {@linkcode PluginSpaceUpdateResult} echoing back the `spaceId` and
160
+ * the updated property values
161
+ * @throws If the space does not exist or the component is not a space/mass
162
+ *
163
+ * # Example
164
+ * ```ts
165
+ * const result = await snaptrude.entity.space.update({
166
+ * spaceId: "some-space-id",
167
+ * properties: {
168
+ * room_type: "Kitchen",
169
+ * massType: "Room",
170
+ * departmentId: "CORE",
171
+ * },
172
+ * })
173
+ * ```
174
+ */
175
+ abstract update(args: PluginSpaceUpdateArgs): PluginApiReturn<PluginSpaceUpdateResult>;
10
176
  }
177
+ /**
178
+ * Arguments for {@linkcode PluginSpaceApi.createRectangular}.
179
+ *
180
+ * | Property | Type | Description |
181
+ * |---|---|---|
182
+ * | `position` | {@linkcode PVec3} | Origin position in Babylon units |
183
+ * | `dimensions` | `{ width, height, depth }` | Box dimensions in Babylon units |
184
+ */
11
185
  export declare const PluginSpaceCreateRectangularArgs: z.ZodObject<{
12
186
  position: z.ZodObject<{
13
187
  x: z.ZodNumber;
@@ -21,10 +195,26 @@ export declare const PluginSpaceCreateRectangularArgs: z.ZodObject<{
21
195
  }, z.core.$strip>;
22
196
  }, z.core.$strip>;
23
197
  export type PluginSpaceCreateRectangularArgs = z.infer<typeof PluginSpaceCreateRectangularArgs>;
198
+ /**
199
+ * Result of {@linkcode PluginSpaceApi.createRectangular}.
200
+ *
201
+ * | Property | Type | Description |
202
+ * |---|---|---|
203
+ * | `spaceId` | `string` | Unique ID of the created space |
204
+ */
24
205
  export declare const PluginSpaceCreateRectangularResult: z.ZodObject<{
25
206
  spaceId: z.ZodString;
26
207
  }, z.core.$strip>;
27
208
  export type PluginSpaceCreateRectangularResult = z.infer<typeof PluginSpaceCreateRectangularResult>;
209
+ /**
210
+ * Arguments for {@linkcode PluginSpaceApi.createFromProfile}.
211
+ *
212
+ * | Property | Type | Description |
213
+ * |---|---|---|
214
+ * | `profile` | {@linkcode PProfile} | Closed 2D profile defining the floor shape |
215
+ * | `extrudeHeight` | `number` | Extrusion height in Babylon units |
216
+ * | `position` | {@linkcode PVec3} | Offset position in Babylon units |
217
+ */
28
218
  export declare const PluginSpaceCreateFromProfileArgs: z.ZodObject<{
29
219
  profile: z.ZodObject<{
30
220
  curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -71,45 +261,165 @@ export declare const PluginSpaceCreateFromProfileArgs: z.ZodObject<{
71
261
  }, z.core.$strip>;
72
262
  }, z.core.$strip>;
73
263
  export type PluginSpaceCreateFromProfileArgs = z.infer<typeof PluginSpaceCreateFromProfileArgs>;
264
+ /**
265
+ * Result of {@linkcode PluginSpaceApi.createFromProfile}.
266
+ *
267
+ * | Property | Type | Description |
268
+ * |---|---|---|
269
+ * | `spaceId` | `string` | Unique ID of the created space |
270
+ */
74
271
  export declare const PluginSpaceCreateFromProfileResult: z.ZodObject<{
75
272
  spaceId: z.ZodString;
76
273
  }, z.core.$strip>;
77
274
  export type PluginSpaceCreateFromProfileResult = z.infer<typeof PluginSpaceCreateFromProfileResult>;
275
+ /**
276
+ * Available properties that can be queried on a space.
277
+ *
278
+ * **Basic:**
279
+ * | Value | Return Type | Description |
280
+ * |---|---|---|
281
+ * | `"id"` | `string` | Unique space identifier |
282
+ * | `"type"` | `string` | Component type |
283
+ * | `"room_type"` | `string` | Room type classification |
284
+ * | `"name"` | `string` | Display name of the space |
285
+ *
286
+ * **Derived from parametric data:**
287
+ * | Value | Return Type | Description |
288
+ * |---|---|---|
289
+ * | `"area"` | `number` | Bottom face area (from `areas_bottomFace`) |
290
+ * | `"breadth"` | `number` | Breadth dimension |
291
+ * | `"depth"` | `number` | Depth dimension |
292
+ * | `"height"` | `number` | Height dimension |
293
+ * | `"massType"` | `string \| null` | Mass type classification |
294
+ * | `"spaceType"` | `string \| null` | Space type classification (Room, Balcony, etc.) |
295
+ * | `"storey"` | `number \| null` | Story the space belongs to |
296
+ * | `"departmentId"` | `string \| null` | Assigned department ID |
297
+ * | `"departmentName"` | `string` | Assigned department name |
298
+ * | `"departmentColor"` | `string` | Assigned department color (hex/CSS) |
299
+ *
300
+ * **Derived from mesh:**
301
+ * | Value | Return Type | Description |
302
+ * |---|---|---|
303
+ * | `"position"` | {@linkcode PVec3} | Local position relative to parent |
304
+ * | `"absolutePosition"` | {@linkcode PVec3} | Absolute position in the scene |
305
+ * | `"rotation"` | {@linkcode PVec3} | Euler rotation angles (radians) |
306
+ * | `"rotationQuaternion"` | {@linkcode PQuat} \| `null` | Quaternion rotation, or `null` if unset |
307
+ *
308
+ * **Derived from brep:**
309
+ * | Value | Return Type | Description |
310
+ * |---|---|---|
311
+ * | `"planPoints"` | {@linkcode PVec3}`[]` | Bottom outer profile points in world space with `y = 0` (2D plan). No closing duplicate point. |
312
+ */
78
313
  export declare const PluginSpaceGetProperty: z.ZodEnum<{
79
314
  position: "position";
315
+ height: "height";
316
+ depth: "depth";
80
317
  id: "id";
81
318
  type: "type";
82
319
  room_type: "room_type";
83
320
  name: "name";
84
321
  area: "area";
85
- department: "department";
322
+ breadth: "breadth";
323
+ massType: "massType";
324
+ spaceType: "spaceType";
325
+ storey: "storey";
326
+ departmentId: "departmentId";
327
+ departmentName: "departmentName";
328
+ departmentColor: "departmentColor";
86
329
  absolutePosition: "absolutePosition";
87
330
  rotation: "rotation";
88
331
  rotationQuaternion: "rotationQuaternion";
332
+ planPoints: "planPoints";
89
333
  }>;
334
+ /**
335
+ * Arguments for {@linkcode PluginSpaceApi.get}.
336
+ *
337
+ * | Property | Type | Description |
338
+ * |---|---|---|
339
+ * | `spaceId` | `string` | The space ID to query |
340
+ * | `properties` | {@linkcode PluginSpaceGetProperty}`[]` | Properties to retrieve |
341
+ */
90
342
  export declare const PluginSpaceGetArgs: z.ZodObject<{
91
343
  spaceId: z.ZodString;
92
344
  properties: z.ZodArray<z.ZodEnum<{
93
345
  position: "position";
346
+ height: "height";
347
+ depth: "depth";
94
348
  id: "id";
95
349
  type: "type";
96
350
  room_type: "room_type";
97
351
  name: "name";
98
352
  area: "area";
99
- department: "department";
353
+ breadth: "breadth";
354
+ massType: "massType";
355
+ spaceType: "spaceType";
356
+ storey: "storey";
357
+ departmentId: "departmentId";
358
+ departmentName: "departmentName";
359
+ departmentColor: "departmentColor";
100
360
  absolutePosition: "absolutePosition";
101
361
  rotation: "rotation";
102
362
  rotationQuaternion: "rotationQuaternion";
363
+ planPoints: "planPoints";
103
364
  }>>;
104
365
  }, z.core.$strip>;
105
366
  export type PluginSpaceGetArgs = z.infer<typeof PluginSpaceGetArgs>;
367
+ /**
368
+ * Supported space type values.
369
+ *
370
+ * Mirrors the internal `SpaceType` enum from `spaceType.types.ts`.
371
+ *
372
+ * | Value | Description |
373
+ * |---|---|
374
+ * | `"Room"` | Standard room |
375
+ * | `"Program Block"` | Program/department block |
376
+ * | `"Balcony"` | Balcony space |
377
+ * | `"Road"` | Road |
378
+ * | `"Garden"` | Garden area |
379
+ * | `"Deck"` | Deck |
380
+ * | `"Pool"` | Pool |
381
+ * | `"Walkway"` | Walkway |
382
+ */
383
+ export declare const PluginSpaceType: z.ZodEnum<{
384
+ Room: "Room";
385
+ "Program Block": "Program Block";
386
+ Balcony: "Balcony";
387
+ Road: "Road";
388
+ Garden: "Garden";
389
+ Deck: "Deck";
390
+ Pool: "Pool";
391
+ Walkway: "Walkway";
392
+ }>;
393
+ /**
394
+ * Result of {@linkcode PluginSpaceApi.get}.
395
+ *
396
+ * A partial object — only the properties that were requested in
397
+ * {@linkcode PluginSpaceGetArgs.properties} will be present.
398
+ */
106
399
  export declare const PluginSpaceGetResult: z.ZodObject<{
107
400
  id: z.ZodOptional<z.ZodString>;
108
401
  type: z.ZodOptional<z.ZodString>;
109
402
  room_type: z.ZodOptional<z.ZodString>;
110
403
  name: z.ZodOptional<z.ZodString>;
111
404
  area: z.ZodOptional<z.ZodNumber>;
112
- department: z.ZodOptional<z.ZodString>;
405
+ breadth: z.ZodOptional<z.ZodNumber>;
406
+ depth: z.ZodOptional<z.ZodNumber>;
407
+ height: z.ZodOptional<z.ZodNumber>;
408
+ massType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
409
+ spaceType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
410
+ Room: "Room";
411
+ "Program Block": "Program Block";
412
+ Balcony: "Balcony";
413
+ Road: "Road";
414
+ Garden: "Garden";
415
+ Deck: "Deck";
416
+ Pool: "Pool";
417
+ Walkway: "Walkway";
418
+ }>>>;
419
+ storey: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
420
+ departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
421
+ departmentName: z.ZodOptional<z.ZodString>;
422
+ departmentColor: z.ZodOptional<z.ZodString>;
113
423
  position: z.ZodOptional<z.ZodObject<{
114
424
  x: z.ZodNumber;
115
425
  y: z.ZodNumber;
@@ -131,15 +441,165 @@ export declare const PluginSpaceGetResult: z.ZodObject<{
131
441
  z: z.ZodNumber;
132
442
  w: z.ZodNumber;
133
443
  }, z.core.$strip>>>;
444
+ planPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
445
+ x: z.ZodNumber;
446
+ y: z.ZodNumber;
447
+ z: z.ZodNumber;
448
+ }, z.core.$strip>>>;
134
449
  }, z.core.$strip>;
135
450
  export type PluginSpaceGetResult = z.infer<typeof PluginSpaceGetResult>;
451
+ /**
452
+ * Result of {@linkcode PluginSpaceApi.getAll}.
453
+ *
454
+ * | Property | Type | Description |
455
+ * |---|---|---|
456
+ * | `spacesIds` | `string[]` | IDs of all spaces in the project |
457
+ */
136
458
  export declare const PluginSpaceGetAllResult: z.ZodObject<{
137
459
  spacesIds: z.ZodArray<z.ZodString>;
138
460
  }, z.core.$strip>;
139
461
  export type PluginSpaceGetAllResult = z.infer<typeof PluginSpaceGetAllResult>;
140
- export declare const PluginSpaceDeleteByIdArgs: z.ZodObject<{
462
+ /**
463
+ * Arguments for {@linkcode PluginSpaceApi.delete}.
464
+ *
465
+ * | Property | Type | Description |
466
+ * |---|---|---|
467
+ * | `spaceId` | `string` | The space ID to delete |
468
+ */
469
+ export declare const PluginSpaceDeleteArgs: z.ZodObject<{
141
470
  spaceId: z.ZodString;
142
471
  }, z.core.$strip>;
143
- export type PluginSpaceDeleteByIdArgs = z.infer<typeof PluginSpaceDeleteByIdArgs>;
144
- export type PluginSpaceDeleteByIdResult = void;
472
+ export type PluginSpaceDeleteArgs = z.infer<typeof PluginSpaceDeleteArgs>;
473
+ /** Result type for {@linkcode PluginSpaceApi.delete} — returns nothing on success. */
474
+ export type PluginSpaceDeleteResult = void;
475
+ /**
476
+ * Supported mass type values for {@linkcode PluginSpaceUpdateArgs.properties.massType}.
477
+ *
478
+ * Mirrors the internal `MASS_TYPES` enum.
479
+ *
480
+ * | Value | Description |
481
+ * |---|---|
482
+ * | `"Plinth"` | Plinth mass |
483
+ * | `"Void"` | Void/cut-out |
484
+ * | `"Pergola"` | Pergola structure |
485
+ * | `"Furniture"` | Furniture element |
486
+ * | `"Facade element"` | Facade element |
487
+ * | `"Generic mass"` | Generic mass |
488
+ * | `"Room"` | Room (default for spaces) |
489
+ * | `"Department"` | Department block |
490
+ * | `"Building"` | Building envelope |
491
+ * | `"Revit Import"` | Imported from Revit |
492
+ * | `"Mass"` | Generic mass type |
493
+ * | `"Site"` | Site object |
494
+ */
495
+ export declare const PluginMassType: z.ZodEnum<{
496
+ Room: "Room";
497
+ Plinth: "Plinth";
498
+ Void: "Void";
499
+ Pergola: "Pergola";
500
+ Furniture: "Furniture";
501
+ "Facade element": "Facade element";
502
+ "Generic mass": "Generic mass";
503
+ Department: "Department";
504
+ Building: "Building";
505
+ "Revit Import": "Revit Import";
506
+ Mass: "Mass";
507
+ Site: "Site";
508
+ }>;
509
+ /**
510
+ * Well-known (built-in) department IDs.
511
+ *
512
+ * | Value | Department |
513
+ * |---|---|
514
+ * | `"DEFAULT"` | Default department |
515
+ * | `"SITE"` | Site department |
516
+ * | `"ENVELOPE"` | Envelope department |
517
+ * | `"CORE"` | Core department |
518
+ */
519
+ export declare const PluginWellKnownDepartmentId: z.ZodEnum<{
520
+ DEFAULT: "DEFAULT";
521
+ SITE: "SITE";
522
+ ENVELOPE: "ENVELOPE";
523
+ CORE: "CORE";
524
+ }>;
525
+ /**
526
+ * Accepted department ID values — either a {@linkcode PluginWellKnownDepartmentId}
527
+ * or a UUID string for custom (user-created) departments.
528
+ */
529
+ export declare const PluginDepartmentId: z.ZodUnion<readonly [z.ZodEnum<{
530
+ DEFAULT: "DEFAULT";
531
+ SITE: "SITE";
532
+ ENVELOPE: "ENVELOPE";
533
+ CORE: "CORE";
534
+ }>, z.ZodUUID]>;
535
+ /**
536
+ * Arguments for {@linkcode PluginSpaceApi.update}.
537
+ *
538
+ * | Property | Type | Description |
539
+ * |---|---|---|
540
+ * | `spaceId` | `string` | The space ID to update |
541
+ * | `properties` | `object` | Key/value pairs of properties to update (all optional) |
542
+ * | `properties.room_type` | `string?` | New room type label |
543
+ * | `properties.massType` | {@linkcode PluginMassType}`?` | New mass type |
544
+ * | `properties.departmentId` | {@linkcode PluginDepartmentId}`?` | New department ID |
545
+ */
546
+ export declare const PluginSpaceUpdateArgs: z.ZodObject<{
547
+ spaceId: z.ZodString;
548
+ properties: z.ZodObject<{
549
+ room_type: z.ZodOptional<z.ZodString>;
550
+ massType: z.ZodOptional<z.ZodEnum<{
551
+ Room: "Room";
552
+ Plinth: "Plinth";
553
+ Void: "Void";
554
+ Pergola: "Pergola";
555
+ Furniture: "Furniture";
556
+ "Facade element": "Facade element";
557
+ "Generic mass": "Generic mass";
558
+ Department: "Department";
559
+ Building: "Building";
560
+ "Revit Import": "Revit Import";
561
+ Mass: "Mass";
562
+ Site: "Site";
563
+ }>>;
564
+ spaceType: z.ZodOptional<z.ZodEnum<{
565
+ Room: "Room";
566
+ "Program Block": "Program Block";
567
+ Balcony: "Balcony";
568
+ Road: "Road";
569
+ Garden: "Garden";
570
+ Deck: "Deck";
571
+ Pool: "Pool";
572
+ Walkway: "Walkway";
573
+ }>>;
574
+ departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
575
+ DEFAULT: "DEFAULT";
576
+ SITE: "SITE";
577
+ ENVELOPE: "ENVELOPE";
578
+ CORE: "CORE";
579
+ }>, z.ZodUUID]>>;
580
+ }, z.core.$strip>;
581
+ }, z.core.$strip>;
582
+ export type PluginSpaceUpdateArgs = z.infer<typeof PluginSpaceUpdateArgs>;
583
+ /**
584
+ * Result of {@linkcode PluginSpaceApi.update}.
585
+ *
586
+ * Echoes back the `spaceId` and the values of properties that were updated.
587
+ * Properties that were not included in the update request will be `undefined`.
588
+ *
589
+ * | Property | Type | Description |
590
+ * |---|---|---|
591
+ * | `spaceId` | `string` | The space ID that was updated |
592
+ * | `room_type` | `string?` | Updated room type (if changed) |
593
+ * | `massType` | `string?` | Updated mass type (if changed) |
594
+ * | `spaceType` | `string?` | Updated space type (if changed) |
595
+ * | `departmentId` | `string \| null?` | Updated department ID (if changed) |
596
+ */
597
+ export declare const PluginSpaceUpdateResult: z.ZodObject<{
598
+ spaceId: z.ZodString;
599
+ room_type: z.ZodOptional<z.ZodString>;
600
+ massType: z.ZodOptional<z.ZodString>;
601
+ spaceType: z.ZodOptional<z.ZodString>;
602
+ departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
603
+ }, z.core.$strip>;
604
+ export type PluginSpaceUpdateResult = z.infer<typeof PluginSpaceUpdateResult>;
145
605
  //# sourceMappingURL=space.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../src/api/entity/space.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAK7C,8BAAsB,cAAc;;aAGlB,iBAAiB,CAAC,EAChC,QAAQ,EACR,UAAU,GACX,EAAE,gCAAgC,GAAG,eAAe,CAAC,kCAAkC,CAAC;aAEzE,iBAAiB,CAAC,EAChC,OAAO,EACP,aAAa,EACb,QAAQ,GACT,EAAE,gCAAgC,GAAG,eAAe,CAAC,kCAAkC,CAAC;aAEzE,MAAM,IAAI,eAAe,CAAC,uBAAuB,CAAC;aAElD,GAAG,CAAC,EAClB,OAAO,EACP,UAAU,GACX,EAAE,kBAAkB,GAAG,eAAe,CAAC,oBAAoB,CAAC;aAE7C,UAAU,CAAC,EACzB,OAAO,GACR,EAAE,yBAAyB,GAAG,eAAe,CAAC,2BAA2B,CAAC;CAC5E;AAED,eAAO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