@snaptrude/plugin-core 0.0.6 → 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.
@@ -1,3 +1,4 @@
1
+ import { PluginReferenceLineApi } from "./referenceLine";
1
2
  import { PluginSpaceApi } from "./space";
2
3
  import { PluginStoryApi } from "./story";
3
4
  /**
@@ -5,14 +6,18 @@ import { PluginStoryApi } from "./story";
5
6
  *
6
7
  * - {@linkcode PluginEntityApi.space} — Create, query, and delete spaces (rooms/masses)
7
8
  * - {@linkcode PluginEntityApi.story} — Create, query, and update stories (floors)
9
+ * - {@linkcode PluginEntityApi.referenceLine} — Create, query, and delete reference lines
8
10
  */
9
11
  export declare abstract class PluginEntityApi {
10
12
  /** Space (room/mass) operations. See {@linkcode PluginSpaceApi}. */
11
13
  abstract space: PluginSpaceApi;
12
14
  /** Story (floor/storey) operations. See {@linkcode PluginStoryApi}. */
13
15
  abstract story: PluginStoryApi;
16
+ /** Reference line operations. See {@linkcode PluginReferenceLineApi}. */
17
+ abstract referenceLine: PluginReferenceLineApi;
14
18
  constructor();
15
19
  }
20
+ export * from "./referenceLine";
16
21
  export * from "./space";
17
22
  export * from "./story";
18
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/entity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;GAKG;AACH,8BAAsB,eAAe;IACnC,oEAAoE;IACpE,SAAgB,KAAK,EAAE,cAAc,CAAA;IACrC,uEAAuE;IACvE,SAAgB,KAAK,EAAE,cAAc,CAAA;;CAGtC;AAED,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/entity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;GAMG;AACH,8BAAsB,eAAe;IACnC,oEAAoE;IACpE,SAAgB,KAAK,EAAE,cAAc,CAAA;IACrC,uEAAuE;IACvE,SAAgB,KAAK,EAAE,cAAc,CAAA;IACrC,yEAAyE;IACzE,SAAgB,aAAa,EAAE,sBAAsB,CAAA;;CAGtD;AAED,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
@@ -0,0 +1,259 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ /**
4
+ * Reference line management — create, query, and delete reference lines.
5
+ *
6
+ * A **reference line** is a 2D guide line (or arc) in the Snaptrude scene,
7
+ * typically used for grid lines and alignment guides. Reference lines
8
+ * carry properties such as grid tags, labels, and line styles.
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.referenceLine`.
14
+ */
15
+ export declare abstract class PluginReferenceLineApi {
16
+ constructor();
17
+ /**
18
+ * Create multiple reference lines from a profile.
19
+ *
20
+ * Each {@linkcode PCurve} in the given {@linkcode PProfile} becomes
21
+ * a separate reference line. Uses `ReferenceLineConstructor.createFromProfile`
22
+ * internally.
23
+ *
24
+ * @param args - An object containing:
25
+ * - {@linkcode PluginReferenceLineCreateMultiArgs.profile args.profile} — A
26
+ * {@linkcode PProfile} whose curves define the reference lines to create
27
+ * @returns A {@linkcode PluginReferenceLineCreateMultiResult} with the
28
+ * `referenceLineIds` of the created reference lines
29
+ * @throws If reference line creation fails
30
+ *
31
+ * # Example
32
+ * ```ts
33
+ * const { vec3 } = snaptrude.core.math
34
+ *
35
+ * const l1 = snaptrude.core.geom.line.new(vec3.new(0, 0, 0), vec3.new(10, 0, 0))
36
+ * const l2 = snaptrude.core.geom.line.new(vec3.new(10, 0, 0), vec3.new(10, 0, 10))
37
+ * const profile = snaptrude.core.geom.profile.new([l1, l2])
38
+ *
39
+ * const { referenceLineIds } = await snaptrude.entity.referenceLine.createMulti({
40
+ * profile,
41
+ * })
42
+ * ```
43
+ */
44
+ abstract createMulti(args: PluginReferenceLineCreateMultiArgs): PluginApiReturn<PluginReferenceLineCreateMultiResult>;
45
+ /**
46
+ * Get properties of a reference line by its ID.
47
+ *
48
+ * Only the properties listed in {@linkcode PluginReferenceLineGetArgs.properties
49
+ * args.properties} are returned — unlisted properties will be `undefined`
50
+ * in the result.
51
+ *
52
+ * @param args - An object containing:
53
+ * - {@linkcode PluginReferenceLineGetArgs.referenceLineId args.referenceLineId} —
54
+ * The unique reference line ID
55
+ * - {@linkcode PluginReferenceLineGetArgs.properties args.properties} — Array of
56
+ * property names to retrieve. See {@linkcode PluginReferenceLineGetProperty}.
57
+ * @returns A partial {@linkcode PluginReferenceLineGetResult} containing only the
58
+ * requested properties
59
+ * @throws If the reference line does not exist
60
+ *
61
+ * # Example
62
+ * ```ts
63
+ * const result = await snaptrude.entity.referenceLine.get({
64
+ * referenceLineId: "some-ref-line-id",
65
+ * properties: ["curve"],
66
+ * })
67
+ * console.log(result.curve) // PCurve
68
+ * ```
69
+ */
70
+ abstract get(args: PluginReferenceLineGetArgs): PluginApiReturn<PluginReferenceLineGetResult>;
71
+ /**
72
+ * Get the IDs of all reference lines in the current project.
73
+ *
74
+ * Returns every reference line across all stories.
75
+ * Use the returned IDs with {@linkcode PluginReferenceLineApi.get} to query
76
+ * individual reference line properties.
77
+ *
78
+ * @returns A {@linkcode PluginReferenceLineGetAllResult} with a
79
+ * `referenceLineIds` array
80
+ *
81
+ * # Example
82
+ * ```ts
83
+ * const { referenceLineIds } = await snaptrude.entity.referenceLine.getAll()
84
+ * console.log(`Project has ${referenceLineIds.length} reference lines`)
85
+ * ```
86
+ */
87
+ abstract getAll(): PluginApiReturn<PluginReferenceLineGetAllResult>;
88
+ /**
89
+ * Delete a reference line by its ID.
90
+ *
91
+ * Permanently removes the reference line and its associated mesh from
92
+ * the scene. This operation is undoable via Snaptrude's command system.
93
+ *
94
+ * @param args - An object containing:
95
+ * - {@linkcode PluginReferenceLineDeleteArgs.referenceLineId args.referenceLineId} —
96
+ * The unique reference line ID to delete
97
+ * @throws If the reference line does not exist
98
+ *
99
+ * # Example
100
+ * ```ts
101
+ * await snaptrude.entity.referenceLine.delete({
102
+ * referenceLineId: "some-ref-line-id",
103
+ * })
104
+ * ```
105
+ */
106
+ abstract delete(args: PluginReferenceLineDeleteArgs): PluginApiReturn<PluginReferenceLineDeleteResult>;
107
+ }
108
+ /**
109
+ * Arguments for {@linkcode PluginReferenceLineApi.createMulti}.
110
+ *
111
+ * | Property | Type | Description |
112
+ * |---|---|---|
113
+ * | `profile` | {@linkcode PProfile} | Profile whose curves define reference lines |
114
+ */
115
+ export declare const PluginReferenceLineCreateMultiArgs: z.ZodObject<{
116
+ profile: z.ZodObject<{
117
+ curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
118
+ curveType: z.ZodLiteral<"Line">;
119
+ startPoint: z.ZodObject<{
120
+ x: z.ZodNumber;
121
+ y: z.ZodNumber;
122
+ z: z.ZodNumber;
123
+ }, z.core.$strip>;
124
+ endPoint: z.ZodObject<{
125
+ x: z.ZodNumber;
126
+ y: z.ZodNumber;
127
+ z: z.ZodNumber;
128
+ }, z.core.$strip>;
129
+ }, z.core.$strip>, z.ZodObject<{
130
+ curveType: z.ZodLiteral<"Arc">;
131
+ startPoint: z.ZodObject<{
132
+ x: z.ZodNumber;
133
+ y: z.ZodNumber;
134
+ z: z.ZodNumber;
135
+ }, z.core.$strip>;
136
+ endPoint: z.ZodObject<{
137
+ x: z.ZodNumber;
138
+ y: z.ZodNumber;
139
+ z: z.ZodNumber;
140
+ }, z.core.$strip>;
141
+ centrePoint: z.ZodObject<{
142
+ x: z.ZodNumber;
143
+ y: z.ZodNumber;
144
+ z: z.ZodNumber;
145
+ }, z.core.$strip>;
146
+ axis: z.ZodObject<{
147
+ x: z.ZodNumber;
148
+ y: z.ZodNumber;
149
+ z: z.ZodNumber;
150
+ }, z.core.$strip>;
151
+ }, z.core.$strip>], "curveType">>;
152
+ }, z.core.$strip>;
153
+ }, z.core.$strip>;
154
+ export type PluginReferenceLineCreateMultiArgs = z.infer<typeof PluginReferenceLineCreateMultiArgs>;
155
+ /**
156
+ * Result of {@linkcode PluginReferenceLineApi.createMulti}.
157
+ *
158
+ * | Property | Type | Description |
159
+ * |---|---|---|
160
+ * | `referenceLineIds` | `string[]` | IDs of the created reference lines |
161
+ */
162
+ export declare const PluginReferenceLineCreateMultiResult: z.ZodObject<{
163
+ referenceLineIds: z.ZodArray<z.ZodString>;
164
+ }, z.core.$strip>;
165
+ export type PluginReferenceLineCreateMultiResult = z.infer<typeof PluginReferenceLineCreateMultiResult>;
166
+ /**
167
+ * Available properties that can be queried on a reference line.
168
+ *
169
+ * | Value | Return Type | Description |
170
+ * |---|---|---|
171
+ * | `"curve"` | {@linkcode PCurve} | The curve geometry of the reference line |
172
+ */
173
+ export declare const PluginReferenceLineGetProperty: z.ZodEnum<{
174
+ curve: "curve";
175
+ }>;
176
+ /**
177
+ * Arguments for {@linkcode PluginReferenceLineApi.get}.
178
+ *
179
+ * | Property | Type | Description |
180
+ * |---|---|---|
181
+ * | `referenceLineId` | `string` | The reference line ID to query |
182
+ * | `properties` | {@linkcode PluginReferenceLineGetProperty}`[]` | Properties to retrieve |
183
+ */
184
+ export declare const PluginReferenceLineGetArgs: z.ZodObject<{
185
+ referenceLineId: z.ZodString;
186
+ properties: z.ZodArray<z.ZodEnum<{
187
+ curve: "curve";
188
+ }>>;
189
+ }, z.core.$strip>;
190
+ export type PluginReferenceLineGetArgs = z.infer<typeof PluginReferenceLineGetArgs>;
191
+ /**
192
+ * Result of {@linkcode PluginReferenceLineApi.get}.
193
+ *
194
+ * A partial object — only the properties that were requested in
195
+ * {@linkcode PluginReferenceLineGetArgs.properties} will be present.
196
+ */
197
+ export declare const PluginReferenceLineGetResult: z.ZodObject<{
198
+ curve: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
199
+ curveType: z.ZodLiteral<"Line">;
200
+ startPoint: z.ZodObject<{
201
+ x: z.ZodNumber;
202
+ y: z.ZodNumber;
203
+ z: z.ZodNumber;
204
+ }, z.core.$strip>;
205
+ endPoint: z.ZodObject<{
206
+ x: z.ZodNumber;
207
+ y: z.ZodNumber;
208
+ z: z.ZodNumber;
209
+ }, z.core.$strip>;
210
+ }, z.core.$strip>, z.ZodObject<{
211
+ curveType: z.ZodLiteral<"Arc">;
212
+ startPoint: z.ZodObject<{
213
+ x: z.ZodNumber;
214
+ y: z.ZodNumber;
215
+ z: z.ZodNumber;
216
+ }, z.core.$strip>;
217
+ endPoint: z.ZodObject<{
218
+ x: z.ZodNumber;
219
+ y: z.ZodNumber;
220
+ z: z.ZodNumber;
221
+ }, z.core.$strip>;
222
+ centrePoint: z.ZodObject<{
223
+ x: z.ZodNumber;
224
+ y: z.ZodNumber;
225
+ z: z.ZodNumber;
226
+ }, z.core.$strip>;
227
+ axis: z.ZodObject<{
228
+ x: z.ZodNumber;
229
+ y: z.ZodNumber;
230
+ z: z.ZodNumber;
231
+ }, z.core.$strip>;
232
+ }, z.core.$strip>], "curveType">>;
233
+ }, z.core.$strip>;
234
+ export type PluginReferenceLineGetResult = z.infer<typeof PluginReferenceLineGetResult>;
235
+ /**
236
+ * Result of {@linkcode PluginReferenceLineApi.getAll}.
237
+ *
238
+ * | Property | Type | Description |
239
+ * |---|---|---|
240
+ * | `referenceLineIds` | `string[]` | IDs of all reference lines in the project |
241
+ */
242
+ export declare const PluginReferenceLineGetAllResult: z.ZodObject<{
243
+ referenceLineIds: z.ZodArray<z.ZodString>;
244
+ }, z.core.$strip>;
245
+ export type PluginReferenceLineGetAllResult = z.infer<typeof PluginReferenceLineGetAllResult>;
246
+ /**
247
+ * Arguments for {@linkcode PluginReferenceLineApi.delete}.
248
+ *
249
+ * | Property | Type | Description |
250
+ * |---|---|---|
251
+ * | `referenceLineId` | `string` | The reference line ID to delete |
252
+ */
253
+ export declare const PluginReferenceLineDeleteArgs: z.ZodObject<{
254
+ referenceLineId: z.ZodString;
255
+ }, z.core.$strip>;
256
+ export type PluginReferenceLineDeleteArgs = z.infer<typeof PluginReferenceLineDeleteArgs>;
257
+ /** Result type for {@linkcode PluginReferenceLineApi.delete} — returns nothing on success. */
258
+ export type PluginReferenceLineDeleteResult = void;
259
+ //# sourceMappingURL=referenceLine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"referenceLine.d.ts","sourceRoot":"","sources":["../../../src/api/entity/referenceLine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAI7C;;;;;;;;;;;GAWG;AACH,8BAAsB,sBAAsB;;IAG1C;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;aACa,WAAW,CACzB,IAAI,EAAE,kCAAkC,GACvC,eAAe,CAAC,oCAAoC,CAAC;IAExD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;aACa,GAAG,CACjB,IAAI,EAAE,0BAA0B,GAC/B,eAAe,CAAC,4BAA4B,CAAC;IAEhD;;;;;;;;;;;;;;;OAeG;aACa,MAAM,IAAI,eAAe,CAAC,+BAA+B,CAAC;IAE1E;;;;;;;;;;;;;;;;;OAiBG;aACa,MAAM,CACpB,IAAI,EAAE,6BAA6B,GAClC,eAAe,CAAC,+BAA+B,CAAC;CACpD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE7C,CAAA;AAEF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAEnG;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC;;iBAE/C,CAAA;AAEF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAA;AAEvG;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;EAEzC,CAAA;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;;;iBAGrC,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI7B,CAAA;AAEZ,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEvF;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;;iBAE1C,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;iBAExC,CAAA;AAEF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEzF,8FAA8F;AAC9F,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAAA"}
@@ -144,6 +144,35 @@ export declare abstract class PluginSpaceApi {
144
144
  * ```
145
145
  */
146
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>;
147
176
  }
148
177
  /**
149
178
  * Arguments for {@linkcode PluginSpaceApi.createRectangular}.
@@ -246,30 +275,61 @@ export type PluginSpaceCreateFromProfileResult = z.infer<typeof PluginSpaceCreat
246
275
  /**
247
276
  * Available properties that can be queried on a space.
248
277
  *
278
+ * **Basic:**
249
279
  * | Value | Return Type | Description |
250
280
  * |---|---|---|
251
281
  * | `"id"` | `string` | Unique space identifier |
252
282
  * | `"type"` | `string` | Component type |
253
283
  * | `"room_type"` | `string` | Room type classification |
254
284
  * | `"name"` | `string` | Display name of the space |
255
- * | `"area"` | `number` | Bottom (floor) area |
256
- * | `"department"` | `string` | Assigned department name |
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
+ * |---|---|---|
257
303
  * | `"position"` | {@linkcode PVec3} | Local position relative to parent |
258
304
  * | `"absolutePosition"` | {@linkcode PVec3} | Absolute position in the scene |
259
305
  * | `"rotation"` | {@linkcode PVec3} | Euler rotation angles (radians) |
260
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. |
261
312
  */
262
313
  export declare const PluginSpaceGetProperty: z.ZodEnum<{
263
314
  position: "position";
315
+ height: "height";
316
+ depth: "depth";
264
317
  id: "id";
265
318
  type: "type";
266
319
  room_type: "room_type";
267
320
  name: "name";
268
321
  area: "area";
269
- department: "department";
322
+ breadth: "breadth";
323
+ massType: "massType";
324
+ spaceType: "spaceType";
325
+ storey: "storey";
326
+ departmentId: "departmentId";
327
+ departmentName: "departmentName";
328
+ departmentColor: "departmentColor";
270
329
  absolutePosition: "absolutePosition";
271
330
  rotation: "rotation";
272
331
  rotationQuaternion: "rotationQuaternion";
332
+ planPoints: "planPoints";
273
333
  }>;
274
334
  /**
275
335
  * Arguments for {@linkcode PluginSpaceApi.get}.
@@ -283,18 +343,53 @@ export declare const PluginSpaceGetArgs: z.ZodObject<{
283
343
  spaceId: z.ZodString;
284
344
  properties: z.ZodArray<z.ZodEnum<{
285
345
  position: "position";
346
+ height: "height";
347
+ depth: "depth";
286
348
  id: "id";
287
349
  type: "type";
288
350
  room_type: "room_type";
289
351
  name: "name";
290
352
  area: "area";
291
- department: "department";
353
+ breadth: "breadth";
354
+ massType: "massType";
355
+ spaceType: "spaceType";
356
+ storey: "storey";
357
+ departmentId: "departmentId";
358
+ departmentName: "departmentName";
359
+ departmentColor: "departmentColor";
292
360
  absolutePosition: "absolutePosition";
293
361
  rotation: "rotation";
294
362
  rotationQuaternion: "rotationQuaternion";
363
+ planPoints: "planPoints";
295
364
  }>>;
296
365
  }, z.core.$strip>;
297
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
+ }>;
298
393
  /**
299
394
  * Result of {@linkcode PluginSpaceApi.get}.
300
395
  *
@@ -307,7 +402,24 @@ export declare const PluginSpaceGetResult: z.ZodObject<{
307
402
  room_type: z.ZodOptional<z.ZodString>;
308
403
  name: z.ZodOptional<z.ZodString>;
309
404
  area: z.ZodOptional<z.ZodNumber>;
310
- 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>;
311
423
  position: z.ZodOptional<z.ZodObject<{
312
424
  x: z.ZodNumber;
313
425
  y: z.ZodNumber;
@@ -329,6 +441,11 @@ export declare const PluginSpaceGetResult: z.ZodObject<{
329
441
  z: z.ZodNumber;
330
442
  w: z.ZodNumber;
331
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>>>;
332
449
  }, z.core.$strip>;
333
450
  export type PluginSpaceGetResult = z.infer<typeof PluginSpaceGetResult>;
334
451
  /**
@@ -355,4 +472,134 @@ export declare const PluginSpaceDeleteArgs: z.ZodObject<{
355
472
  export type PluginSpaceDeleteArgs = z.infer<typeof PluginSpaceDeleteArgs>;
356
473
  /** Result type for {@linkcode PluginSpaceApi.delete} — returns nothing on success. */
357
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>;
358
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;;;;;;;;;;;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,CAAC;IAEzF;;;;;;;;;;;;;;OAcG;aACa,MAAM,IAAI,eAAe,CAAC,uBAAuB,CAAC;IAElE;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;aACa,GAAG,CAAC,EAClB,OAAO,EACP,UAAU,GACX,EAAE,kBAAkB,GAAG,eAAe,CAAC,oBAAoB,CAAC;IAE7D;;;;;;;;;;;;;;;OAeG;aACa,MAAM,CAAC,EACrB,OAAO,GACR,EAAE,qBAAqB,GAAG,eAAe,CAAC,uBAAuB,CAAC;CACpE;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;iBAO3C,CAAA;AAEF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAE/F;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC;;iBAE7C,CAAA;AAEF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAEnG;;;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