@snaptrude/plugin-core 0.2.2 → 0.2.4

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 (57) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/index.cjs +17 -2
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.js +15 -2
  5. package/dist/index.js.map +1 -1
  6. package/package.json +1 -1
  7. package/src/api/entity/space.ts +120 -12
  8. package/dist/api/core/geom/arc.d.ts +0 -81
  9. package/dist/api/core/geom/arc.d.ts.map +0 -1
  10. package/dist/api/core/geom/curve.d.ts +0 -70
  11. package/dist/api/core/geom/curve.d.ts.map +0 -1
  12. package/dist/api/core/geom/index.d.ts +0 -32
  13. package/dist/api/core/geom/index.d.ts.map +0 -1
  14. package/dist/api/core/geom/line.d.ts +0 -56
  15. package/dist/api/core/geom/line.d.ts.map +0 -1
  16. package/dist/api/core/geom/profile.d.ts +0 -121
  17. package/dist/api/core/geom/profile.d.ts.map +0 -1
  18. package/dist/api/core/index.d.ts +0 -18
  19. package/dist/api/core/index.d.ts.map +0 -1
  20. package/dist/api/core/math/index.d.ts +0 -18
  21. package/dist/api/core/math/index.d.ts.map +0 -1
  22. package/dist/api/core/math/quat.d.ts +0 -187
  23. package/dist/api/core/math/quat.d.ts.map +0 -1
  24. package/dist/api/core/math/vec3.d.ts +0 -156
  25. package/dist/api/core/math/vec3.d.ts.map +0 -1
  26. package/dist/api/entity/buildableEnvelope.d.ts +0 -233
  27. package/dist/api/entity/buildableEnvelope.d.ts.map +0 -1
  28. package/dist/api/entity/department.d.ts +0 -99
  29. package/dist/api/entity/department.d.ts.map +0 -1
  30. package/dist/api/entity/index.d.ts +0 -33
  31. package/dist/api/entity/index.d.ts.map +0 -1
  32. package/dist/api/entity/referenceLine.d.ts +0 -259
  33. package/dist/api/entity/referenceLine.d.ts.map +0 -1
  34. package/dist/api/entity/space.d.ts +0 -613
  35. package/dist/api/entity/space.d.ts.map +0 -1
  36. package/dist/api/entity/story.d.ts +0 -239
  37. package/dist/api/entity/story.d.ts.map +0 -1
  38. package/dist/api/index.d.ts +0 -30
  39. package/dist/api/index.d.ts.map +0 -1
  40. package/dist/api/tools/copy.d.ts +0 -59
  41. package/dist/api/tools/copy.d.ts.map +0 -1
  42. package/dist/api/tools/index.d.ts +0 -29
  43. package/dist/api/tools/index.d.ts.map +0 -1
  44. package/dist/api/tools/offset.d.ts +0 -43
  45. package/dist/api/tools/offset.d.ts.map +0 -1
  46. package/dist/api/tools/selection.d.ts +0 -48
  47. package/dist/api/tools/selection.d.ts.map +0 -1
  48. package/dist/api/tools/transform.d.ts +0 -114
  49. package/dist/api/tools/transform.d.ts.map +0 -1
  50. package/dist/api/units/index.d.ts +0 -163
  51. package/dist/api/units/index.d.ts.map +0 -1
  52. package/dist/host-utils.d.ts +0 -41
  53. package/dist/host-utils.d.ts.map +0 -1
  54. package/dist/index.d.ts +0 -4
  55. package/dist/index.d.ts.map +0 -1
  56. package/dist/types.d.ts +0 -16
  57. package/dist/types.d.ts.map +0 -1
@@ -1,613 +0,0 @@
1
- import * as z from "zod";
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
- */
15
- export declare abstract class PluginSpaceApi {
16
- constructor();
17
- /**
18
- * Create a rectangular (box) space.
19
- *
20
- * Generates an axis-aligned box with the given dimensions at the
21
- * specified position. The created space is automatically assigned
22
- * to the active story and a default department.
23
- *
24
- * @param args - An object containing:
25
- * - {@linkcode PluginSpaceCreateRectangularArgs.position args.position} — Origin
26
- * position as a {@linkcode PVec3} in Babylon units
27
- * - {@linkcode PluginSpaceCreateRectangularArgs.dimensions args.dimensions} — Box
28
- * dimensions `{ width, height, depth }` in Babylon units
29
- * @returns A {@linkcode PluginSpaceCreateRectangularResult} with the `spaceId`
30
- * of the created space
31
- * @throws If space creation fails
32
- *
33
- * # Example
34
- * ```ts
35
- * const { vec3 } = snaptrude.core.math
36
- *
37
- * const { spaceId } = await snaptrude.entity.space.createRectangular({
38
- * position: vec3.new(0, 0, 0),
39
- * dimensions: { width: 5, height: 3, depth: 4 },
40
- * })
41
- * ```
42
- */
43
- abstract createRectangular({ position, dimensions, }: PluginSpaceCreateRectangularArgs): PluginApiReturn<PluginSpaceCreateRectangularResult>;
44
- /**
45
- * Create a space by extruding a 2D profile.
46
- *
47
- * The {@linkcode PluginSpaceCreateFromProfileArgs.profile profile} is extruded
48
- * upward (along the Y axis) by {@linkcode PluginSpaceCreateFromProfileArgs.extrudeHeight
49
- * extrudeHeight}, then offset by {@linkcode PluginSpaceCreateFromProfileArgs.position
50
- * position}. The created space is automatically assigned to the active story
51
- * and a default department.
52
- *
53
- * Use {@linkcode PluginProfileApi.fromLinePoints} to quickly build a profile
54
- * from a list of points.
55
- *
56
- * @param args - An object containing:
57
- * - {@linkcode PluginSpaceCreateFromProfileArgs.profile args.profile} — A closed
58
- * {@linkcode PProfile} defining the floor shape
59
- * - {@linkcode PluginSpaceCreateFromProfileArgs.extrudeHeight args.extrudeHeight} —
60
- * Extrusion height in Babylon units
61
- * - {@linkcode PluginSpaceCreateFromProfileArgs.position args.position} — Offset
62
- * position as a {@linkcode PVec3} in Babylon units
63
- * @returns A {@linkcode PluginSpaceCreateFromProfileResult} with the `spaceId`
64
- * of the created space
65
- * @throws If the profile is invalid or mesh creation fails
66
- *
67
- * # Example
68
- * ```ts
69
- * const { vec3 } = snaptrude.core.math
70
- *
71
- * const profile = await snaptrude.core.geom.profile.fromLinePoints({
72
- * points: [
73
- * vec3.new(0, 0, 0),
74
- * vec3.new(10, 0, 0),
75
- * vec3.new(10, 0, 8),
76
- * vec3.new(0, 0, 8),
77
- * ],
78
- * })
79
- *
80
- * const { spaceId } = await snaptrude.entity.space.createFromProfile({
81
- * profile,
82
- * extrudeHeight: 3,
83
- * position: vec3.new(0, 0, 0),
84
- * })
85
- * ```
86
- */
87
- abstract createFromProfile({ profile, extrudeHeight, position, }: PluginSpaceCreateFromProfileArgs): PluginApiReturn<PluginSpaceCreateFromProfileResult>;
88
- /**
89
- * Get the IDs of all spaces in the current project.
90
- *
91
- * Returns every space (mass that is not a building) across all stories.
92
- * Use the returned IDs with {@linkcode PluginSpaceApi.get} to query
93
- * individual space properties.
94
- *
95
- * @returns A {@linkcode PluginSpaceGetAllResult} with a `spacesIds` array
96
- *
97
- * # Example
98
- * ```ts
99
- * const { spacesIds } = await snaptrude.entity.space.getAll()
100
- * console.log(`Project has ${spacesIds.length} spaces`)
101
- * ```
102
- */
103
- abstract getAll(): PluginApiReturn<PluginSpaceGetAllResult>;
104
- /**
105
- * Get properties of a space by its ID.
106
- *
107
- * Only the properties listed in {@linkcode PluginSpaceGetArgs.properties
108
- * args.properties} are returned — unlisted properties will be `undefined`
109
- * in the result.
110
- *
111
- * @param args - An object containing:
112
- * - {@linkcode PluginSpaceGetArgs.spaceId args.spaceId} — The unique space ID
113
- * (as returned by creation methods or {@linkcode PluginSpaceApi.getAll})
114
- * - {@linkcode PluginSpaceGetArgs.properties args.properties} — Array of property
115
- * names to retrieve. See {@linkcode PluginSpaceGetProperty} for available values.
116
- * @returns A partial {@linkcode PluginSpaceGetResult} containing only the requested
117
- * properties
118
- * @throws If the space does not exist or the component is not a space/mass
119
- *
120
- * # Example
121
- * ```ts
122
- * const info = await snaptrude.entity.space.get({
123
- * spaceId: "some-space-id",
124
- * properties: ["name", "area", "position"],
125
- * })
126
- * console.log(info.name, info.area, info.position)
127
- * ```
128
- */
129
- abstract get({ spaceId, properties, }: PluginSpaceGetArgs): PluginApiReturn<PluginSpaceGetResult>;
130
- /**
131
- * Delete a space by its ID.
132
- *
133
- * Permanently removes the space and its associated mesh from the scene.
134
- * This operation is undoable via Snaptrude's command system.
135
- *
136
- * @param args - An object containing:
137
- * - {@linkcode PluginSpaceDeleteArgs.spaceId args.spaceId} — The unique space ID
138
- * to delete
139
- * @throws If the space does not exist or the component is not a space/mass
140
- *
141
- * # Example
142
- * ```ts
143
- * await snaptrude.entity.space.delete({ spaceId: "some-space-id" })
144
- * ```
145
- */
146
- abstract delete({ spaceId, }: PluginSpaceDeleteArgs): PluginApiReturn<PluginSpaceDeleteResult>;
147
- /**
148
- * Update properties of a space by its ID.
149
- *
150
- * Only the properties provided in {@linkcode PluginSpaceUpdateArgs.properties
151
- * args.properties} will be updated — omitted properties remain unchanged.
152
- * This operation is undoable via Snaptrude's command system.
153
- *
154
- * @param args - An object containing:
155
- * - {@linkcode PluginSpaceUpdateArgs.spaceId args.spaceId} — The unique space ID
156
- * to update
157
- * - {@linkcode PluginSpaceUpdateArgs.properties args.properties} — Key/value pairs
158
- * of properties to update. See {@linkcode PluginSpaceUpdateArgs} for supported fields.
159
- * @returns A {@linkcode PluginSpaceUpdateResult} echoing back the `spaceId` and
160
- * the updated property values
161
- * @throws If the space does not exist or the component is not a space/mass
162
- *
163
- * # Example
164
- * ```ts
165
- * const result = await snaptrude.entity.space.update({
166
- * spaceId: "some-space-id",
167
- * properties: {
168
- * room_type: "Kitchen",
169
- * massType: "Room",
170
- * departmentId: "CORE",
171
- * },
172
- * })
173
- * ```
174
- */
175
- abstract update(args: PluginSpaceUpdateArgs): PluginApiReturn<PluginSpaceUpdateResult>;
176
- }
177
- /**
178
- * Arguments for {@linkcode PluginSpaceApi.createRectangular}.
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
- */
185
- export declare const PluginSpaceCreateRectangularArgs: z.ZodObject<{
186
- position: z.ZodObject<{
187
- x: z.ZodNumber;
188
- y: z.ZodNumber;
189
- z: z.ZodNumber;
190
- }, z.core.$strip>;
191
- dimensions: z.ZodObject<{
192
- width: z.ZodNumber;
193
- height: z.ZodNumber;
194
- depth: z.ZodNumber;
195
- }, z.core.$strip>;
196
- }, z.core.$strip>;
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
- */
205
- export declare const PluginSpaceCreateRectangularResult: z.ZodObject<{
206
- spaceId: z.ZodString;
207
- }, z.core.$strip>;
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
- */
218
- export declare const PluginSpaceCreateFromProfileArgs: z.ZodObject<{
219
- profile: z.ZodObject<{
220
- curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
221
- curveType: z.ZodLiteral<"Line">;
222
- startPoint: z.ZodObject<{
223
- x: z.ZodNumber;
224
- y: z.ZodNumber;
225
- z: z.ZodNumber;
226
- }, z.core.$strip>;
227
- endPoint: z.ZodObject<{
228
- x: z.ZodNumber;
229
- y: z.ZodNumber;
230
- z: z.ZodNumber;
231
- }, z.core.$strip>;
232
- }, z.core.$strip>, z.ZodObject<{
233
- curveType: z.ZodLiteral<"Arc">;
234
- startPoint: z.ZodObject<{
235
- x: z.ZodNumber;
236
- y: z.ZodNumber;
237
- z: z.ZodNumber;
238
- }, z.core.$strip>;
239
- endPoint: z.ZodObject<{
240
- x: z.ZodNumber;
241
- y: z.ZodNumber;
242
- z: z.ZodNumber;
243
- }, z.core.$strip>;
244
- centrePoint: z.ZodObject<{
245
- x: z.ZodNumber;
246
- y: z.ZodNumber;
247
- z: z.ZodNumber;
248
- }, z.core.$strip>;
249
- axis: z.ZodObject<{
250
- x: z.ZodNumber;
251
- y: z.ZodNumber;
252
- z: z.ZodNumber;
253
- }, z.core.$strip>;
254
- }, z.core.$strip>], "curveType">>;
255
- }, z.core.$strip>;
256
- extrudeHeight: z.ZodNumber;
257
- position: z.ZodObject<{
258
- x: z.ZodNumber;
259
- y: z.ZodNumber;
260
- z: z.ZodNumber;
261
- }, z.core.$strip>;
262
- }, z.core.$strip>;
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
- */
271
- export declare const PluginSpaceCreateFromProfileResult: z.ZodObject<{
272
- spaceId: z.ZodString;
273
- }, z.core.$strip>;
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
- */
313
- export declare const PluginSpaceGetProperty: z.ZodEnum<{
314
- type: "type";
315
- name: "name";
316
- departmentId: "departmentId";
317
- id: "id";
318
- position: "position";
319
- height: "height";
320
- depth: "depth";
321
- room_type: "room_type";
322
- area: "area";
323
- breadth: "breadth";
324
- massType: "massType";
325
- spaceType: "spaceType";
326
- storey: "storey";
327
- departmentName: "departmentName";
328
- departmentColor: "departmentColor";
329
- absolutePosition: "absolutePosition";
330
- rotation: "rotation";
331
- rotationQuaternion: "rotationQuaternion";
332
- planPoints: "planPoints";
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
- */
342
- export declare const PluginSpaceGetArgs: z.ZodObject<{
343
- spaceId: z.ZodString;
344
- properties: z.ZodArray<z.ZodEnum<{
345
- type: "type";
346
- name: "name";
347
- departmentId: "departmentId";
348
- id: "id";
349
- position: "position";
350
- height: "height";
351
- depth: "depth";
352
- room_type: "room_type";
353
- area: "area";
354
- breadth: "breadth";
355
- massType: "massType";
356
- spaceType: "spaceType";
357
- storey: "storey";
358
- departmentName: "departmentName";
359
- departmentColor: "departmentColor";
360
- absolutePosition: "absolutePosition";
361
- rotation: "rotation";
362
- rotationQuaternion: "rotationQuaternion";
363
- planPoints: "planPoints";
364
- }>>;
365
- }, z.core.$strip>;
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
- * | `"Envelope"` | Envelope |
383
- * | `"Parking"` | Parking area |
384
- */
385
- export declare const PluginSpaceType: z.ZodEnum<{
386
- Room: "Room";
387
- "Program Block": "Program Block";
388
- Balcony: "Balcony";
389
- Road: "Road";
390
- Garden: "Garden";
391
- Deck: "Deck";
392
- Pool: "Pool";
393
- Walkway: "Walkway";
394
- Envelope: "Envelope";
395
- Parking: "Parking";
396
- }>;
397
- /**
398
- * Result of {@linkcode PluginSpaceApi.get}.
399
- *
400
- * A partial object — only the properties that were requested in
401
- * {@linkcode PluginSpaceGetArgs.properties} will be present.
402
- */
403
- export declare const PluginSpaceGetResult: z.ZodObject<{
404
- id: z.ZodOptional<z.ZodString>;
405
- type: z.ZodOptional<z.ZodString>;
406
- room_type: z.ZodOptional<z.ZodString>;
407
- name: z.ZodOptional<z.ZodString>;
408
- area: z.ZodOptional<z.ZodNumber>;
409
- breadth: z.ZodOptional<z.ZodNumber>;
410
- depth: z.ZodOptional<z.ZodNumber>;
411
- height: z.ZodOptional<z.ZodNumber>;
412
- massType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
413
- spaceType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
414
- Room: "Room";
415
- "Program Block": "Program Block";
416
- Balcony: "Balcony";
417
- Road: "Road";
418
- Garden: "Garden";
419
- Deck: "Deck";
420
- Pool: "Pool";
421
- Walkway: "Walkway";
422
- Envelope: "Envelope";
423
- Parking: "Parking";
424
- }>>>;
425
- storey: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
426
- departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
427
- departmentName: z.ZodOptional<z.ZodString>;
428
- departmentColor: z.ZodOptional<z.ZodString>;
429
- position: z.ZodOptional<z.ZodObject<{
430
- x: z.ZodNumber;
431
- y: z.ZodNumber;
432
- z: z.ZodNumber;
433
- }, z.core.$strip>>;
434
- absolutePosition: z.ZodOptional<z.ZodObject<{
435
- x: z.ZodNumber;
436
- y: z.ZodNumber;
437
- z: z.ZodNumber;
438
- }, z.core.$strip>>;
439
- rotation: z.ZodOptional<z.ZodObject<{
440
- x: z.ZodNumber;
441
- y: z.ZodNumber;
442
- z: z.ZodNumber;
443
- }, z.core.$strip>>;
444
- rotationQuaternion: z.ZodOptional<z.ZodNullable<z.ZodObject<{
445
- x: z.ZodNumber;
446
- y: z.ZodNumber;
447
- z: z.ZodNumber;
448
- w: z.ZodNumber;
449
- }, z.core.$strip>>>;
450
- planPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
451
- x: z.ZodNumber;
452
- y: z.ZodNumber;
453
- z: z.ZodNumber;
454
- }, z.core.$strip>>>;
455
- }, z.core.$strip>;
456
- export type PluginSpaceGetResult = z.infer<typeof PluginSpaceGetResult>;
457
- /**
458
- * Result of {@linkcode PluginSpaceApi.getAll}.
459
- *
460
- * | Property | Type | Description |
461
- * |---|---|---|
462
- * | `spacesIds` | `string[]` | IDs of all spaces in the project |
463
- */
464
- export declare const PluginSpaceGetAllResult: z.ZodObject<{
465
- spacesIds: z.ZodArray<z.ZodString>;
466
- }, z.core.$strip>;
467
- export type PluginSpaceGetAllResult = z.infer<typeof PluginSpaceGetAllResult>;
468
- /**
469
- * Arguments for {@linkcode PluginSpaceApi.delete}.
470
- *
471
- * | Property | Type | Description |
472
- * |---|---|---|
473
- * | `spaceId` | `string` | The space ID to delete |
474
- */
475
- export declare const PluginSpaceDeleteArgs: z.ZodObject<{
476
- spaceId: z.ZodString;
477
- }, z.core.$strip>;
478
- export type PluginSpaceDeleteArgs = z.infer<typeof PluginSpaceDeleteArgs>;
479
- /** Result type for {@linkcode PluginSpaceApi.delete} — returns nothing on success. */
480
- export type PluginSpaceDeleteResult = void;
481
- /**
482
- * Supported mass type values for {@linkcode PluginSpaceUpdateArgs.properties.massType}.
483
- *
484
- * Mirrors the internal `MASS_TYPES` enum.
485
- *
486
- * | Value | Description |
487
- * |---|---|
488
- * | `"Plinth"` | Plinth mass |
489
- * | `"Void"` | Void/cut-out |
490
- * | `"Pergola"` | Pergola structure |
491
- * | `"Furniture"` | Furniture element |
492
- * | `"Facade element"` | Facade element |
493
- * | `"Generic mass"` | Generic mass |
494
- * | `"Room"` | Room (default for spaces) |
495
- * | `"Department"` | Department block |
496
- * | `"Building"` | Building envelope |
497
- * | `"Revit Import"` | Imported from Revit |
498
- * | `"Mass"` | Generic mass type |
499
- * | `"Site"` | Site object |
500
- */
501
- export declare const PluginMassType: z.ZodEnum<{
502
- Room: "Room";
503
- Plinth: "Plinth";
504
- Void: "Void";
505
- Pergola: "Pergola";
506
- Furniture: "Furniture";
507
- "Facade element": "Facade element";
508
- "Generic mass": "Generic mass";
509
- Department: "Department";
510
- Building: "Building";
511
- "Revit Import": "Revit Import";
512
- Mass: "Mass";
513
- Site: "Site";
514
- }>;
515
- /**
516
- * Well-known (built-in) department IDs.
517
- *
518
- * | Value | Department |
519
- * |---|---|
520
- * | `"DEFAULT"` | Default department |
521
- * | `"SITE"` | Site department |
522
- * | `"ENVELOPE"` | Envelope department |
523
- * | `"CORE"` | Core department |
524
- */
525
- export declare const PluginWellKnownDepartmentId: z.ZodEnum<{
526
- DEFAULT: "DEFAULT";
527
- SITE: "SITE";
528
- ENVELOPE: "ENVELOPE";
529
- CORE: "CORE";
530
- }>;
531
- /**
532
- * Accepted department ID values — either a {@linkcode PluginWellKnownDepartmentId}
533
- * or a UUID string for custom (user-created) departments.
534
- */
535
- export declare const PluginDepartmentId: z.ZodUnion<readonly [z.ZodEnum<{
536
- DEFAULT: "DEFAULT";
537
- SITE: "SITE";
538
- ENVELOPE: "ENVELOPE";
539
- CORE: "CORE";
540
- }>, z.ZodUUID]>;
541
- /**
542
- * Arguments for {@linkcode PluginSpaceApi.update}.
543
- *
544
- * | Property | Type | Description |
545
- * |---|---|---|
546
- * | `spaceId` | `string` | The space ID to update |
547
- * | `properties` | `object` | Key/value pairs of properties to update (all optional) |
548
- * | `properties.room_type` | `string?` | New room type label |
549
- * | `properties.massType` | {@linkcode PluginMassType}`?` | New mass type |
550
- * | `properties.departmentId` | {@linkcode PluginDepartmentId}`?` | New department ID |
551
- */
552
- export declare const PluginSpaceUpdateArgs: z.ZodObject<{
553
- spaceId: z.ZodString;
554
- properties: z.ZodObject<{
555
- room_type: z.ZodOptional<z.ZodString>;
556
- massType: z.ZodOptional<z.ZodEnum<{
557
- Room: "Room";
558
- Plinth: "Plinth";
559
- Void: "Void";
560
- Pergola: "Pergola";
561
- Furniture: "Furniture";
562
- "Facade element": "Facade element";
563
- "Generic mass": "Generic mass";
564
- Department: "Department";
565
- Building: "Building";
566
- "Revit Import": "Revit Import";
567
- Mass: "Mass";
568
- Site: "Site";
569
- }>>;
570
- spaceType: z.ZodOptional<z.ZodEnum<{
571
- Room: "Room";
572
- "Program Block": "Program Block";
573
- Balcony: "Balcony";
574
- Road: "Road";
575
- Garden: "Garden";
576
- Deck: "Deck";
577
- Pool: "Pool";
578
- Walkway: "Walkway";
579
- Envelope: "Envelope";
580
- Parking: "Parking";
581
- }>>;
582
- departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
583
- DEFAULT: "DEFAULT";
584
- SITE: "SITE";
585
- ENVELOPE: "ENVELOPE";
586
- CORE: "CORE";
587
- }>, z.ZodUUID]>>;
588
- }, z.core.$strip>;
589
- }, z.core.$strip>;
590
- export type PluginSpaceUpdateArgs = z.infer<typeof PluginSpaceUpdateArgs>;
591
- /**
592
- * Result of {@linkcode PluginSpaceApi.update}.
593
- *
594
- * Echoes back the `spaceId` and the values of properties that were updated.
595
- * Properties that were not included in the update request will be `undefined`.
596
- *
597
- * | Property | Type | Description |
598
- * |---|---|---|
599
- * | `spaceId` | `string` | The space ID that was updated |
600
- * | `room_type` | `string?` | Updated room type (if changed) |
601
- * | `massType` | `string?` | Updated mass type (if changed) |
602
- * | `spaceType` | `string?` | Updated space type (if changed) |
603
- * | `departmentId` | `string \| null?` | Updated department ID (if changed) |
604
- */
605
- export declare const PluginSpaceUpdateResult: z.ZodObject<{
606
- spaceId: z.ZodString;
607
- room_type: z.ZodOptional<z.ZodString>;
608
- massType: z.ZodOptional<z.ZodString>;
609
- spaceType: z.ZodOptional<z.ZodString>;
610
- departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
611
- }, z.core.$strip>;
612
- export type PluginSpaceUpdateResult = z.infer<typeof PluginSpaceUpdateResult>;
613
- //# sourceMappingURL=space.d.ts.map
@@ -1 +0,0 @@
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;;;;;;;;;;;GAWG;AACH,8BAAsB,cAAc;;IAGlC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;aACa,iBAAiB,CAAC,EAChC,QAAQ,EACR,UAAU,GACX,EAAE,gCAAgC,GAAG,eAAe,CAAC,kCAAkC,CAAC;IAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;aACa,iBAAiB,CAAC,EAChC,OAAO,EACP,aAAa,EACb,QAAQ,GACT,EAAE,gCAAgC,GAAG,eAAe,CAAC,kCAAkC,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