@snaptrude/plugin-core 0.0.0-dev-20260911064951 → 0.0.0-dev-20260921132444
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +4 -0
- package/CHANGELOG.md +35 -1
- package/dist/api/core/mode/index.d.ts +19 -7
- package/dist/api/core/mode/index.d.ts.map +1 -1
- package/dist/api/core/tags.d.ts +81 -0
- package/dist/api/core/tags.d.ts.map +1 -1
- package/dist/api/design/create/grids.d.ts +132 -0
- package/dist/api/design/create/grids.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +109 -1
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +73 -5
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/grids.d.ts +237 -0
- package/dist/api/design/grids.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +4 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/query/grids.d.ts +287 -0
- package/dist/api/design/query/grids.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +29 -0
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +74 -0
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/program/departments.d.ts +58 -2
- package/dist/api/program/departments.d.ts.map +1 -1
- package/dist/api/program/index.d.ts +16 -6
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/labels.d.ts +355 -0
- package/dist/api/program/labels.d.ts.map +1 -0
- package/dist/api/program/metadata.d.ts +328 -0
- package/dist/api/program/metadata.d.ts.map +1 -0
- package/dist/api/program/spreadsheet.d.ts +263 -0
- package/dist/api/program/spreadsheet.d.ts.map +1 -1
- package/dist/api/workspace/index.d.ts +49 -2
- package/dist/api/workspace/index.d.ts.map +1 -1
- package/dist/index.cjs +2365 -1908
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2294 -1908
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/core/mode/index.ts +19 -7
- package/src/api/core/tags.ts +76 -0
- package/src/api/design/create/grids.ts +137 -0
- package/src/api/design/create/index.ts +131 -0
- package/src/api/design/family.ts +51 -4
- package/src/api/design/grids.ts +237 -0
- package/src/api/design/index.ts +5 -0
- package/src/api/design/query/grids.ts +197 -0
- package/src/api/design/query/index.ts +27 -0
- package/src/api/design/update/index.ts +53 -0
- package/src/api/program/departments.ts +54 -2
- package/src/api/program/index.ts +16 -6
- package/src/api/program/labels.ts +332 -0
- package/src/api/program/metadata.ts +364 -0
- package/src/api/program/spreadsheet.ts +282 -0
- package/src/api/workspace/index.ts +51 -2
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Visual properties of grid lines — the group's defaults and any per-line
|
|
5
|
+
* overrides share this shape (values mirror the engine's `GridLineProps`).
|
|
6
|
+
*
|
|
7
|
+
* | Property | Type | Description |
|
|
8
|
+
* |---|---|---|
|
|
9
|
+
* | `style` | {@linkcode PluginReferenceLineStyle} | Line style (`"SOLID"` \| `"DASHED"` \| `"DOT_DASH"`) |
|
|
10
|
+
* | `weight` | `number` | Line weight |
|
|
11
|
+
* | `color` | `string` | Line color as a `#rrggbb` hex string |
|
|
12
|
+
* | `showStart` | `boolean` | Whether the start-end tag bubble is shown |
|
|
13
|
+
* | `showEnd` | `boolean` | Whether the end-end tag bubble is shown |
|
|
14
|
+
*/
|
|
15
|
+
export declare const PluginGridLineProps: z.ZodObject<{
|
|
16
|
+
style: z.ZodEnum<{
|
|
17
|
+
SOLID: "SOLID";
|
|
18
|
+
DASHED: "DASHED";
|
|
19
|
+
DOT_DASH: "DOT_DASH";
|
|
20
|
+
}>;
|
|
21
|
+
weight: z.ZodNumber;
|
|
22
|
+
color: z.ZodString;
|
|
23
|
+
showStart: z.ZodBoolean;
|
|
24
|
+
showEnd: z.ZodBoolean;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type PluginGridLineProps = z.infer<typeof PluginGridLineProps>;
|
|
27
|
+
/**
|
|
28
|
+
* One grid line within a wing.
|
|
29
|
+
*
|
|
30
|
+
* | Property | Type | Description |
|
|
31
|
+
* |---|---|---|
|
|
32
|
+
* | `curve` | {@linkcode CurveHandle} | The line's geometry in **world space** (a line or arc; read coordinates via `core.geom.curve`) |
|
|
33
|
+
* | `tag` | `string` | The line's grid tag (e.g. `"A"`, `"3"`) |
|
|
34
|
+
* | `visible` | `boolean` | Persisted per-line visibility |
|
|
35
|
+
* | `props` | {@linkcode PluginGridLineProps} | **Effective** visual properties (group defaults merged with this line's overrides) |
|
|
36
|
+
* | `overrides` | `Partial<`{@linkcode PluginGridLineProps}`>`? | This line's raw overrides, when any exist |
|
|
37
|
+
*/
|
|
38
|
+
export declare const PluginGridLineRecord: z.ZodObject<{
|
|
39
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>]>;
|
|
40
|
+
tag: z.ZodString;
|
|
41
|
+
visible: z.ZodBoolean;
|
|
42
|
+
props: z.ZodObject<{
|
|
43
|
+
style: z.ZodEnum<{
|
|
44
|
+
SOLID: "SOLID";
|
|
45
|
+
DASHED: "DASHED";
|
|
46
|
+
DOT_DASH: "DOT_DASH";
|
|
47
|
+
}>;
|
|
48
|
+
weight: z.ZodNumber;
|
|
49
|
+
color: z.ZodString;
|
|
50
|
+
showStart: z.ZodBoolean;
|
|
51
|
+
showEnd: z.ZodBoolean;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
overrides: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
SOLID: "SOLID";
|
|
56
|
+
DASHED: "DASHED";
|
|
57
|
+
DOT_DASH: "DOT_DASH";
|
|
58
|
+
}>>;
|
|
59
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
color: z.ZodOptional<z.ZodString>;
|
|
61
|
+
showStart: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
+
showEnd: z.ZodOptional<z.ZodBoolean>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
export type PluginGridLineRecord = z.infer<typeof PluginGridLineRecord>;
|
|
66
|
+
/**
|
|
67
|
+
* One wing of a grid — a family of parallel lines sharing a local frame.
|
|
68
|
+
* `spacing` and `span` are measured along the wing's local axes in
|
|
69
|
+
* Snaptrude units; line addresses used by mutating APIs are
|
|
70
|
+
* `{ wing, line }` index pairs into these arrays.
|
|
71
|
+
*
|
|
72
|
+
* | Property | Type | Description |
|
|
73
|
+
* |---|---|---|
|
|
74
|
+
* | `spacing` | `number` | Nominal spacing between adjacent lines (Snaptrude units) |
|
|
75
|
+
* | `tagStart` | `string` | First tag of the wing's deterministic tag sequence |
|
|
76
|
+
* | `span` | `{ min: number; max: number }`? | Explicit family length along the wing's line axis, when baked |
|
|
77
|
+
* | `lines` | {@linkcode PluginGridLineRecord}`[]` | The wing's lines, in wing order (index = the `line` address) |
|
|
78
|
+
*/
|
|
79
|
+
export declare const PluginGridWingRecord: z.ZodObject<{
|
|
80
|
+
spacing: z.ZodNumber;
|
|
81
|
+
tagStart: z.ZodString;
|
|
82
|
+
span: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
min: z.ZodNumber;
|
|
84
|
+
max: z.ZodNumber;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
87
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>]>;
|
|
88
|
+
tag: z.ZodString;
|
|
89
|
+
visible: z.ZodBoolean;
|
|
90
|
+
props: z.ZodObject<{
|
|
91
|
+
style: z.ZodEnum<{
|
|
92
|
+
SOLID: "SOLID";
|
|
93
|
+
DASHED: "DASHED";
|
|
94
|
+
DOT_DASH: "DOT_DASH";
|
|
95
|
+
}>;
|
|
96
|
+
weight: z.ZodNumber;
|
|
97
|
+
color: z.ZodString;
|
|
98
|
+
showStart: z.ZodBoolean;
|
|
99
|
+
showEnd: z.ZodBoolean;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
overrides: z.ZodOptional<z.ZodObject<{
|
|
102
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
103
|
+
SOLID: "SOLID";
|
|
104
|
+
DASHED: "DASHED";
|
|
105
|
+
DOT_DASH: "DOT_DASH";
|
|
106
|
+
}>>;
|
|
107
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
color: z.ZodOptional<z.ZodString>;
|
|
109
|
+
showStart: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
showEnd: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
export type PluginGridWingRecord = z.infer<typeof PluginGridWingRecord>;
|
|
115
|
+
/**
|
|
116
|
+
* Per-storey 2D-plan visibility of a grid.
|
|
117
|
+
*
|
|
118
|
+
* | Property | Type | Description |
|
|
119
|
+
* |---|---|---|
|
|
120
|
+
* | `activeStorey` | `number` | The storey the grid belongs to |
|
|
121
|
+
* | `disabledOnStoreys` | `number[]` | Storeys on whose 2D plan the grid is hidden |
|
|
122
|
+
*/
|
|
123
|
+
export declare const PluginGridStoreyVisibility: z.ZodObject<{
|
|
124
|
+
activeStorey: z.ZodNumber;
|
|
125
|
+
disabledOnStoreys: z.ZodArray<z.ZodNumber>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
export type PluginGridStoreyVisibility = z.infer<typeof PluginGridStoreyVisibility>;
|
|
128
|
+
/**
|
|
129
|
+
* Property names readable via {@linkcode PluginDesignQueryGridsApi.get}.
|
|
130
|
+
*
|
|
131
|
+
* | Value | Description |
|
|
132
|
+
* |---|---|
|
|
133
|
+
* | `"angle"` | World rotation about +Y, in **degrees** |
|
|
134
|
+
* | `"props"` | Group-level default line properties |
|
|
135
|
+
* | `"storeyVisibility"` | Active storey + storeys where the grid is hidden in 2D |
|
|
136
|
+
* | `"wings"` | Full wing/line structure with world-space curve handles |
|
|
137
|
+
* | `"bounds"` | World-space axis-aligned bounding box of the grid geometry |
|
|
138
|
+
*/
|
|
139
|
+
export declare const PluginGridGetProperty: z.ZodEnum<{
|
|
140
|
+
angle: "angle";
|
|
141
|
+
props: "props";
|
|
142
|
+
storeyVisibility: "storeyVisibility";
|
|
143
|
+
wings: "wings";
|
|
144
|
+
bounds: "bounds";
|
|
145
|
+
}>;
|
|
146
|
+
export type PluginGridGetProperty = z.infer<typeof PluginGridGetProperty>;
|
|
147
|
+
/**
|
|
148
|
+
* Arguments for {@linkcode PluginDesignQueryGridsApi.get}.
|
|
149
|
+
*
|
|
150
|
+
* | Property | Type | Description |
|
|
151
|
+
* |---|---|---|
|
|
152
|
+
* | `gridId` | `string` | The grid group ID to query |
|
|
153
|
+
* | `properties` | {@linkcode PluginGridGetProperty}`[]` | Properties to retrieve |
|
|
154
|
+
*/
|
|
155
|
+
export declare const PluginGridGetArgs: z.ZodObject<{
|
|
156
|
+
gridId: z.ZodString;
|
|
157
|
+
properties: z.ZodArray<z.ZodEnum<{
|
|
158
|
+
angle: "angle";
|
|
159
|
+
props: "props";
|
|
160
|
+
storeyVisibility: "storeyVisibility";
|
|
161
|
+
wings: "wings";
|
|
162
|
+
bounds: "bounds";
|
|
163
|
+
}>>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export type PluginGridGetArgs = z.infer<typeof PluginGridGetArgs>;
|
|
166
|
+
/**
|
|
167
|
+
* Result of {@linkcode PluginDesignQueryGridsApi.get} — only the requested
|
|
168
|
+
* properties are present.
|
|
169
|
+
*/
|
|
170
|
+
export declare const PluginGridGetResult: z.ZodObject<{
|
|
171
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
props: z.ZodOptional<z.ZodObject<{
|
|
173
|
+
style: z.ZodEnum<{
|
|
174
|
+
SOLID: "SOLID";
|
|
175
|
+
DASHED: "DASHED";
|
|
176
|
+
DOT_DASH: "DOT_DASH";
|
|
177
|
+
}>;
|
|
178
|
+
weight: z.ZodNumber;
|
|
179
|
+
color: z.ZodString;
|
|
180
|
+
showStart: z.ZodBoolean;
|
|
181
|
+
showEnd: z.ZodBoolean;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
storeyVisibility: z.ZodOptional<z.ZodObject<{
|
|
184
|
+
activeStorey: z.ZodNumber;
|
|
185
|
+
disabledOnStoreys: z.ZodArray<z.ZodNumber>;
|
|
186
|
+
}, z.core.$strip>>;
|
|
187
|
+
wings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
188
|
+
spacing: z.ZodNumber;
|
|
189
|
+
tagStart: z.ZodString;
|
|
190
|
+
span: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
min: z.ZodNumber;
|
|
192
|
+
max: z.ZodNumber;
|
|
193
|
+
}, z.core.$strip>>;
|
|
194
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
195
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>]>;
|
|
196
|
+
tag: z.ZodString;
|
|
197
|
+
visible: z.ZodBoolean;
|
|
198
|
+
props: z.ZodObject<{
|
|
199
|
+
style: z.ZodEnum<{
|
|
200
|
+
SOLID: "SOLID";
|
|
201
|
+
DASHED: "DASHED";
|
|
202
|
+
DOT_DASH: "DOT_DASH";
|
|
203
|
+
}>;
|
|
204
|
+
weight: z.ZodNumber;
|
|
205
|
+
color: z.ZodString;
|
|
206
|
+
showStart: z.ZodBoolean;
|
|
207
|
+
showEnd: z.ZodBoolean;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
overrides: z.ZodOptional<z.ZodObject<{
|
|
210
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
211
|
+
SOLID: "SOLID";
|
|
212
|
+
DASHED: "DASHED";
|
|
213
|
+
DOT_DASH: "DOT_DASH";
|
|
214
|
+
}>>;
|
|
215
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
color: z.ZodOptional<z.ZodString>;
|
|
217
|
+
showStart: z.ZodOptional<z.ZodBoolean>;
|
|
218
|
+
showEnd: z.ZodOptional<z.ZodBoolean>;
|
|
219
|
+
}, z.core.$strip>>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
}, z.core.$strip>>>;
|
|
222
|
+
bounds: z.ZodOptional<z.ZodObject<{
|
|
223
|
+
min: z.ZodObject<{
|
|
224
|
+
x: z.ZodNumber;
|
|
225
|
+
y: z.ZodNumber;
|
|
226
|
+
z: z.ZodNumber;
|
|
227
|
+
}, z.core.$strip>;
|
|
228
|
+
max: z.ZodObject<{
|
|
229
|
+
x: z.ZodNumber;
|
|
230
|
+
y: z.ZodNumber;
|
|
231
|
+
z: z.ZodNumber;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
}, z.core.$strip>>;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
export type PluginGridGetResult = z.infer<typeof PluginGridGetResult>;
|
|
236
|
+
/**
|
|
237
|
+
* `design.query.grids.*` — structural-grid-specific reads.
|
|
238
|
+
*
|
|
239
|
+
* A **grid** (grid group) is a structural/documentation grid: one or more
|
|
240
|
+
* *wings* (families of parallel lines with a shared local frame), each holding
|
|
241
|
+
* tagged grid *lines* (straight lines, or a lone arc). Enumerate grids with
|
|
242
|
+
* `design.query.listGrids`; read an individual grid's structure here.
|
|
243
|
+
*
|
|
244
|
+
* Lines have no stable identity of their own — mutating APIs address them
|
|
245
|
+
* positionally as `{ wing, line }` index pairs into the `wings` arrays
|
|
246
|
+
* returned by {@linkcode get}. Structural edits (adding/removing lines,
|
|
247
|
+
* count changes) re-index lines; re-query after mutating.
|
|
248
|
+
*
|
|
249
|
+
* Accessed via `snaptrude.design.query.grids`.
|
|
250
|
+
*/
|
|
251
|
+
export declare abstract class PluginDesignQueryGridsApi {
|
|
252
|
+
constructor();
|
|
253
|
+
/**
|
|
254
|
+
* Get properties of a grid by its ID.
|
|
255
|
+
*
|
|
256
|
+
* Only the properties listed in `properties` are returned — unlisted
|
|
257
|
+
* properties will be `undefined` in the result. `wings` is the heavy
|
|
258
|
+
* read (it registers a world-space {@linkcode CurveHandle} per line);
|
|
259
|
+
* request it only when the geometry is needed.
|
|
260
|
+
*
|
|
261
|
+
* Units: `angle` is in **degrees** (positive = CCW about +Y); `spacing`,
|
|
262
|
+
* `span`, `bounds`, and curve coordinates are in **Snaptrude units**,
|
|
263
|
+
* world space.
|
|
264
|
+
*
|
|
265
|
+
* @param gridId - The unique grid group ID
|
|
266
|
+
* @param properties - Array of property names to retrieve. See
|
|
267
|
+
* {@linkcode PluginGridGetProperty}.
|
|
268
|
+
* @returns A partial {@linkcode PluginGridGetResult} containing only the
|
|
269
|
+
* requested properties
|
|
270
|
+
* @throws If the grid does not exist
|
|
271
|
+
*
|
|
272
|
+
* @examplePrompt What is the spacing of this grid?
|
|
273
|
+
* @examplePrompt Read the grid line tags on this structural grid
|
|
274
|
+
* @examplePrompt Get the geometry of every line in this grid
|
|
275
|
+
* @examplePrompt Which storeys is this grid hidden on?
|
|
276
|
+
*
|
|
277
|
+
* # Example
|
|
278
|
+
* ```ts
|
|
279
|
+
* const [grid] = await snaptrude.design.query.listGrids()
|
|
280
|
+
* const { wings } = await snaptrude.design.query.grids.get(grid, ["wings"])
|
|
281
|
+
* // wings[0].lines[0].curve is an opaque CurveHandle in world space;
|
|
282
|
+
* // read its coordinates via `snaptrude.core.geom.curve`.
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
abstract get(gridId: string, properties: z.infer<typeof PluginGridGetProperty>[]): PluginApiReturn<PluginGridGetResult>;
|
|
286
|
+
}
|
|
287
|
+
//# sourceMappingURL=grids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grids.d.ts","sourceRoot":"","sources":["../../../../src/api/design/query/grids.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAQhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;iBAM9B,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM/B,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK/B,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAMnF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB;;;;;;EAMhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;iBAG5B,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEjE;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQpB,CAAA;AACZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAMrE;;;;;;;;;;;;;;GAcG;AACH,8BAAsB,yBAAyB;;IAG7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;aACa,GAAG,CACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,EAAE,GAClD,eAAe,CAAC,mBAAmB,CAAC;CACxC"}
|
|
@@ -4,6 +4,7 @@ import { ComponentHandle, BBoxComponents } from "../../../handles";
|
|
|
4
4
|
import { PluginDesignQueryGeometryApi } from "./geometry";
|
|
5
5
|
import { PluginDesignQuerySpacesApi } from "./spaces";
|
|
6
6
|
import { PluginDesignQueryReferenceLinesApi } from "./referenceLines";
|
|
7
|
+
import { PluginDesignQueryGridsApi } from "./grids";
|
|
7
8
|
/**
|
|
8
9
|
* The kind of a BIM entity — the discovery/filter vocabulary for the whole
|
|
9
10
|
* `design.query.*` surface. Values are clean `lowerCamel` tokens; the host maps
|
|
@@ -30,6 +31,7 @@ import { PluginDesignQueryReferenceLinesApi } from "./referenceLines";
|
|
|
30
31
|
* | `"mullion"` | Curtain-wall mullion |
|
|
31
32
|
* | `"panel"` | Curtain-wall panel |
|
|
32
33
|
* | `"parametricComponent"` | A placed parametric family instance (native or Revit-imported). Its geometry is rebuilt from `design.family` parameters, so read and drive it through `design.family.getParameters` / `setParameters` rather than editing its meshes. |
|
|
34
|
+
* | `"grid"` | Structural grid group |
|
|
33
35
|
*/
|
|
34
36
|
export declare const PluginEntityType: z.ZodEnum<{
|
|
35
37
|
mass: "mass";
|
|
@@ -50,6 +52,7 @@ export declare const PluginEntityType: z.ZodEnum<{
|
|
|
50
52
|
mullion: "mullion";
|
|
51
53
|
panel: "panel";
|
|
52
54
|
parametricComponent: "parametricComponent";
|
|
55
|
+
grid: "grid";
|
|
53
56
|
}>;
|
|
54
57
|
export type PluginEntityType = z.infer<typeof PluginEntityType>;
|
|
55
58
|
/**
|
|
@@ -97,6 +100,7 @@ export declare const PluginEntityFilter: z.ZodObject<{
|
|
|
97
100
|
mullion: "mullion";
|
|
98
101
|
panel: "panel";
|
|
99
102
|
parametricComponent: "parametricComponent";
|
|
103
|
+
grid: "grid";
|
|
100
104
|
}>>>;
|
|
101
105
|
storeys: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
102
106
|
buildingIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -177,6 +181,7 @@ export declare const PluginDesignQueryListByTypeArgs: z.ZodObject<{
|
|
|
177
181
|
mullion: "mullion";
|
|
178
182
|
panel: "panel";
|
|
179
183
|
parametricComponent: "parametricComponent";
|
|
184
|
+
grid: "grid";
|
|
180
185
|
}>>>;
|
|
181
186
|
storeys: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
182
187
|
buildingIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -250,6 +255,7 @@ export declare const PluginDesignQueryListByTypeArgs: z.ZodObject<{
|
|
|
250
255
|
mullion: "mullion";
|
|
251
256
|
panel: "panel";
|
|
252
257
|
parametricComponent: "parametricComponent";
|
|
258
|
+
grid: "grid";
|
|
253
259
|
}>;
|
|
254
260
|
}, z.core.$strip>;
|
|
255
261
|
export type PluginDesignQueryListByTypeArgs = z.infer<typeof PluginDesignQueryListByTypeArgs>;
|
|
@@ -314,6 +320,7 @@ export declare const PluginEntityProperties: z.ZodObject<{
|
|
|
314
320
|
mullion: "mullion";
|
|
315
321
|
panel: "panel";
|
|
316
322
|
parametricComponent: "parametricComponent";
|
|
323
|
+
grid: "grid";
|
|
317
324
|
}>>;
|
|
318
325
|
label: z.ZodOptional<z.ZodString>;
|
|
319
326
|
storey: z.ZodOptional<z.ZodNumber>;
|
|
@@ -505,6 +512,8 @@ export declare abstract class PluginDesignQueryApi {
|
|
|
505
512
|
abstract spaces: PluginDesignQuerySpacesApi;
|
|
506
513
|
/** Reference-line-specific reads. See {@linkcode PluginDesignQueryReferenceLinesApi}. */
|
|
507
514
|
abstract referenceLines: PluginDesignQueryReferenceLinesApi;
|
|
515
|
+
/** Structural-grid-specific reads. See {@linkcode PluginDesignQueryGridsApi}. */
|
|
516
|
+
abstract grids: PluginDesignQueryGridsApi;
|
|
508
517
|
constructor();
|
|
509
518
|
/**
|
|
510
519
|
* List **all** BIM entities in the project matching the filter.
|
|
@@ -866,6 +875,24 @@ export declare abstract class PluginDesignQueryApi {
|
|
|
866
875
|
* ```
|
|
867
876
|
*/
|
|
868
877
|
abstract listMullions(filter?: PluginEntityFilter): PluginApiReturn<ComponentHandle[]>;
|
|
878
|
+
/**
|
|
879
|
+
* List all the structural grids (grid groups) in the project, optionally
|
|
880
|
+
* filtered by storey, building, selection state, or region.
|
|
881
|
+
*
|
|
882
|
+
* @param filter - an optional {@linkcode PluginEntityFilter}
|
|
883
|
+
* @returns grid-group {@linkcode ComponentHandle}`[]`
|
|
884
|
+
*
|
|
885
|
+
* @examplePrompt List all the structural grids in the model
|
|
886
|
+
* @examplePrompt How many grids are on the ground floor?
|
|
887
|
+
* @examplePrompt Show the grids on this storey
|
|
888
|
+
* @examplePrompt Which grids are currently selected?
|
|
889
|
+
*
|
|
890
|
+
* # Example
|
|
891
|
+
* ```ts
|
|
892
|
+
* const groundFloorGrids = await snaptrude.design.query.listGrids({ storeys: [1] })
|
|
893
|
+
* ```
|
|
894
|
+
*/
|
|
895
|
+
abstract listGrids(filter?: PluginEntityFilter): PluginApiReturn<ComponentHandle[]>;
|
|
869
896
|
/**
|
|
870
897
|
* Look an entity up by id — returns the same handle if it still resolves live,
|
|
871
898
|
* else `null`. A cheap validity probe (distinct from {@linkcode PluginDesignQueryApi.exists}).
|
|
@@ -1233,6 +1260,7 @@ export declare const PluginStoreyOutlineOptions: z.ZodObject<{
|
|
|
1233
1260
|
mullion: "mullion";
|
|
1234
1261
|
panel: "panel";
|
|
1235
1262
|
parametricComponent: "parametricComponent";
|
|
1263
|
+
grid: "grid";
|
|
1236
1264
|
}>>>;
|
|
1237
1265
|
minArea: z.ZodDefault<z.ZodNumber>;
|
|
1238
1266
|
}, z.core.$strip>;
|
|
@@ -1286,4 +1314,5 @@ export type PluginStoreyOutlineResult = z.infer<typeof PluginStoreyOutlineResult
|
|
|
1286
1314
|
export * from "./geometry";
|
|
1287
1315
|
export * from "./spaces";
|
|
1288
1316
|
export * from "./referenceLines";
|
|
1317
|
+
export * from "./grids";
|
|
1289
1318
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/query/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAQlE,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AACrD,OAAO,EAAE,kCAAkC,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/query/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;iBAUhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,4DAA4D;AAC5D,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;iBAKpC,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,yBAAyB,CACjC,CAAA;AAED,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA"}
|
|
@@ -278,6 +278,53 @@ export declare const PluginDesignSetStoreyArgs: z.ZodObject<{
|
|
|
278
278
|
storey: z.ZodNumber;
|
|
279
279
|
}, z.core.$strip>;
|
|
280
280
|
export type PluginDesignSetStoreyArgs = z.infer<typeof PluginDesignSetStoreyArgs>;
|
|
281
|
+
/**
|
|
282
|
+
* The sparse GROUP-LEVEL patch accepted by {@linkcode PluginDesignUpdateApi.grid}.
|
|
283
|
+
* Only provided fields change. Wing- and line-level updates live on the grids
|
|
284
|
+
* entity family: `design.grids.updateWings` / `design.grids.updateLines`.
|
|
285
|
+
*/
|
|
286
|
+
export declare const PluginGridPatch: z.ZodObject<{
|
|
287
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
288
|
+
props: z.ZodOptional<z.ZodObject<{
|
|
289
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
290
|
+
SOLID: "SOLID";
|
|
291
|
+
DASHED: "DASHED";
|
|
292
|
+
DOT_DASH: "DOT_DASH";
|
|
293
|
+
}>>;
|
|
294
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
295
|
+
color: z.ZodOptional<z.ZodString>;
|
|
296
|
+
showStart: z.ZodOptional<z.ZodBoolean>;
|
|
297
|
+
showEnd: z.ZodOptional<z.ZodBoolean>;
|
|
298
|
+
}, z.core.$strip>>;
|
|
299
|
+
storeyVisibility: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
300
|
+
storey: z.ZodNumber;
|
|
301
|
+
visible: z.ZodBoolean;
|
|
302
|
+
}, z.core.$strip>>>;
|
|
303
|
+
}, z.core.$strip>;
|
|
304
|
+
export type PluginGridPatch = z.infer<typeof PluginGridPatch>;
|
|
305
|
+
/** Arguments for {@linkcode PluginDesignUpdateApi.grid}. */
|
|
306
|
+
export declare const PluginDesignUpdateGridArgs: z.ZodObject<{
|
|
307
|
+
grid: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
308
|
+
patch: z.ZodObject<{
|
|
309
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
310
|
+
props: z.ZodOptional<z.ZodObject<{
|
|
311
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
312
|
+
SOLID: "SOLID";
|
|
313
|
+
DASHED: "DASHED";
|
|
314
|
+
DOT_DASH: "DOT_DASH";
|
|
315
|
+
}>>;
|
|
316
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
317
|
+
color: z.ZodOptional<z.ZodString>;
|
|
318
|
+
showStart: z.ZodOptional<z.ZodBoolean>;
|
|
319
|
+
showEnd: z.ZodOptional<z.ZodBoolean>;
|
|
320
|
+
}, z.core.$strip>>;
|
|
321
|
+
storeyVisibility: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
322
|
+
storey: z.ZodNumber;
|
|
323
|
+
visible: z.ZodBoolean;
|
|
324
|
+
}, z.core.$strip>>>;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
}, z.core.$strip>;
|
|
327
|
+
export type PluginDesignUpdateGridArgs = z.infer<typeof PluginDesignUpdateGridArgs>;
|
|
281
328
|
/**
|
|
282
329
|
* `snaptrude.design.update` — edit existing scene entities (properties + geometry).
|
|
283
330
|
*
|
|
@@ -325,6 +372,33 @@ export declare abstract class PluginDesignUpdateApi {
|
|
|
325
372
|
* ```
|
|
326
373
|
*/
|
|
327
374
|
abstract setLabel(component: ComponentHandle, label: string): PluginApiReturn<boolean>;
|
|
375
|
+
/**
|
|
376
|
+
* Update a structural grid's **group-level** fields with a sparse patch —
|
|
377
|
+
* default line styling, absolute angle, and per-storey 2D visibility. Only
|
|
378
|
+
* provided fields change. Wing- and line-level updates live on the grids
|
|
379
|
+
* entity family: {@linkcode PluginDesignGridsApi.updateWings} /
|
|
380
|
+
* {@linkcode PluginDesignGridsApi.updateLines}.
|
|
381
|
+
*
|
|
382
|
+
* Every change routes through the exact setters the native panel uses —
|
|
383
|
+
* each changed field commits its own undoable command, identical to editing
|
|
384
|
+
* that field in the panel. `angle` is an absolute target in degrees (CCW
|
|
385
|
+
* about +Y).
|
|
386
|
+
*
|
|
387
|
+
* @param grid - The grid group to update
|
|
388
|
+
* @param patch - The sparse {@linkcode PluginGridPatch}
|
|
389
|
+
* @returns `true` once applied
|
|
390
|
+
*
|
|
391
|
+
* @examplePrompt Rotate the grid to 45 degrees
|
|
392
|
+
* @examplePrompt Make this grid's lines dashed and grey
|
|
393
|
+
* @examplePrompt Hide this grid on storey 3's plan
|
|
394
|
+
*
|
|
395
|
+
* # Example
|
|
396
|
+
* ```ts
|
|
397
|
+
* const [grid] = await snaptrude.design.query.listGrids()
|
|
398
|
+
* await snaptrude.design.update.grid(grid, { angle: 45, props: { style: "DASHED" } })
|
|
399
|
+
* ```
|
|
400
|
+
*/
|
|
401
|
+
abstract grid(grid: ComponentHandle, patch: PluginGridPatch): PluginApiReturn<boolean>;
|
|
328
402
|
/**
|
|
329
403
|
* Update a single space (room) — change its properties (room label, space
|
|
330
404
|
* type, mass type, area class, department) and/or replace its geometry by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/update/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,M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;;;;;;;;;;;;;;;;;;;;;;;OAmCG;aACa,SAAS,CACvB,UAAU,EAAE,eAAe,EAAE,EAC7B,MAAM,EAAE,MAAM,GACb,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;aACa,iBAAiB,CAC/B,mBAAmB,EAAE,MAAM,EAC3B,WAAW,EAAE,oCAAoC,EAAE,EACnD,UAAU,EAAE,IAAI,GAAG,GAAG,EACtB,QAAQ,EAAE,kCAAkC,EAAE,EAC9C,WAAW,EAAE,kCAAkC,EAC/C,YAAY,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,MAAM,EACjB,iBAAiB,CAAC,EAAE,MAAM,GACzB,eAAe,CAAC,mCAAmC,CAAC;CACxD"}
|
|
@@ -6,7 +6,7 @@ import { ComponentHandle } from "../../handles";
|
|
|
6
6
|
* Program departments — read the department groupings of the active program.
|
|
7
7
|
*
|
|
8
8
|
* In program mode a **department** is a named, colored grouping of spaces with an
|
|
9
|
-
* optional area **target
|
|
9
|
+
* optional gross area **target** and a unit **count** target. This is the program-planning view of departments
|
|
10
10
|
* (their identity, color, and target area); the underlying space geometry is read
|
|
11
11
|
* and edited through the geometry namespaces, not here.
|
|
12
12
|
*
|
|
@@ -180,6 +180,29 @@ export declare abstract class PluginProgramDepartmentsApi {
|
|
|
180
180
|
* ```
|
|
181
181
|
*/
|
|
182
182
|
abstract setTargetArea(departmentId: string, targetArea: number, units?: PluginAreaUnit): PluginApiReturn<PluginProgramDepartmentsSetTargetAreaResult>;
|
|
183
|
+
/**
|
|
184
|
+
* Set a department's target unit count.
|
|
185
|
+
*
|
|
186
|
+
* The number of units (program blocks) the department is planned for — the
|
|
187
|
+
* count twin of {@linkcode PluginProgramDepartmentsApi.setTargetArea}, stored
|
|
188
|
+
* beside the gross area target on the department. Read it back from
|
|
189
|
+
* {@linkcode PluginProgramDepartmentsApi.get} (`targetCount`).
|
|
190
|
+
*
|
|
191
|
+
* @param departmentId - The id of the department whose count to set.
|
|
192
|
+
* @param targetCount - The target number of units (a non-negative integer).
|
|
193
|
+
* @returns The updated {@linkcode PluginProgramDepartment} with its `units`.
|
|
194
|
+
* @throws If no department has the given id.
|
|
195
|
+
*
|
|
196
|
+
* @examplePrompt Set the Bedrooms department unit count to 12
|
|
197
|
+
* @examplePrompt The program needs 4 clinic blocks — update the department count
|
|
198
|
+
* @examplePrompt Update the target count for department dep_123
|
|
199
|
+
*
|
|
200
|
+
* # Example
|
|
201
|
+
* ```ts
|
|
202
|
+
* await snaptrude.program.departments.setTargetCount("dep_123", 12)
|
|
203
|
+
* ```
|
|
204
|
+
*/
|
|
205
|
+
abstract setTargetCount(departmentId: string, targetCount: number): PluginApiReturn<PluginProgramDepartmentsSetTargetCountResult>;
|
|
183
206
|
/**
|
|
184
207
|
* Delete a department.
|
|
185
208
|
*
|
|
@@ -213,13 +236,15 @@ export declare abstract class PluginProgramDepartmentsApi {
|
|
|
213
236
|
* | `id` | `string` | Unique department id |
|
|
214
237
|
* | `name` | `string` | Display name |
|
|
215
238
|
* | `color` | `string` | CSS hex color string (e.g. `"#b5e1dc"`) |
|
|
216
|
-
* | `targetArea` | `number \| null` |
|
|
239
|
+
* | `targetArea` | `number \| null` | Gross target area in the response's `units`, or `null` if no target is set |
|
|
240
|
+
* | `targetCount` | `number` | Target number of units / program blocks (`0` when unset) |
|
|
217
241
|
*/
|
|
218
242
|
export declare const PluginProgramDepartment: z.ZodObject<{
|
|
219
243
|
id: z.ZodString;
|
|
220
244
|
name: z.ZodString;
|
|
221
245
|
color: z.ZodString;
|
|
222
246
|
targetArea: z.ZodNullable<z.ZodNumber>;
|
|
247
|
+
targetCount: z.ZodNumber;
|
|
223
248
|
}, z.core.$strip>;
|
|
224
249
|
export type PluginProgramDepartment = z.infer<typeof PluginProgramDepartment>;
|
|
225
250
|
/**
|
|
@@ -241,6 +266,7 @@ export declare const PluginProgramDepartmentsListResult: z.ZodObject<{
|
|
|
241
266
|
name: z.ZodString;
|
|
242
267
|
color: z.ZodString;
|
|
243
268
|
targetArea: z.ZodNullable<z.ZodNumber>;
|
|
269
|
+
targetCount: z.ZodNumber;
|
|
244
270
|
}, z.core.$strip>>;
|
|
245
271
|
}, z.core.$strip>;
|
|
246
272
|
export type PluginProgramDepartmentsListResult = z.infer<typeof PluginProgramDepartmentsListResult>;
|
|
@@ -265,6 +291,7 @@ export declare const PluginProgramDepartmentsGetResult: z.ZodNullable<z.ZodObjec
|
|
|
265
291
|
name: z.ZodString;
|
|
266
292
|
color: z.ZodString;
|
|
267
293
|
targetArea: z.ZodNullable<z.ZodNumber>;
|
|
294
|
+
targetCount: z.ZodNumber;
|
|
268
295
|
units: z.ZodEnum<{
|
|
269
296
|
ft2: "ft2";
|
|
270
297
|
m2: "m2";
|
|
@@ -281,6 +308,7 @@ export declare const PluginProgramDepartmentRecord: z.ZodObject<{
|
|
|
281
308
|
name: z.ZodString;
|
|
282
309
|
color: z.ZodString;
|
|
283
310
|
targetArea: z.ZodNullable<z.ZodNumber>;
|
|
311
|
+
targetCount: z.ZodNumber;
|
|
284
312
|
units: z.ZodEnum<{
|
|
285
313
|
ft2: "ft2";
|
|
286
314
|
m2: "m2";
|
|
@@ -330,6 +358,7 @@ export declare const PluginProgramDepartmentsUpdateResult: z.ZodObject<{
|
|
|
330
358
|
name: z.ZodString;
|
|
331
359
|
color: z.ZodString;
|
|
332
360
|
targetArea: z.ZodNullable<z.ZodNumber>;
|
|
361
|
+
targetCount: z.ZodNumber;
|
|
333
362
|
units: z.ZodEnum<{
|
|
334
363
|
ft2: "ft2";
|
|
335
364
|
m2: "m2";
|
|
@@ -398,12 +427,39 @@ export declare const PluginProgramDepartmentsSetTargetAreaResult: z.ZodObject<{
|
|
|
398
427
|
name: z.ZodString;
|
|
399
428
|
color: z.ZodString;
|
|
400
429
|
targetArea: z.ZodNullable<z.ZodNumber>;
|
|
430
|
+
targetCount: z.ZodNumber;
|
|
401
431
|
units: z.ZodEnum<{
|
|
402
432
|
ft2: "ft2";
|
|
403
433
|
m2: "m2";
|
|
404
434
|
}>;
|
|
405
435
|
}, z.core.$strip>;
|
|
406
436
|
export type PluginProgramDepartmentsSetTargetAreaResult = z.infer<typeof PluginProgramDepartmentsSetTargetAreaResult>;
|
|
437
|
+
/**
|
|
438
|
+
* Arguments for {@linkcode PluginProgramDepartmentsApi.setTargetCount}.
|
|
439
|
+
*
|
|
440
|
+
* | Property | Type | Description |
|
|
441
|
+
* |---|---|---|
|
|
442
|
+
* | `departmentId` | `string` | The id of the department whose count to set |
|
|
443
|
+
* | `targetCount` | `number` | Target number of units (non-negative integer) |
|
|
444
|
+
*/
|
|
445
|
+
export declare const PluginProgramDepartmentsSetTargetCountArgs: z.ZodObject<{
|
|
446
|
+
departmentId: z.ZodString;
|
|
447
|
+
targetCount: z.ZodNumber;
|
|
448
|
+
}, z.core.$strip>;
|
|
449
|
+
export type PluginProgramDepartmentsSetTargetCountArgs = z.infer<typeof PluginProgramDepartmentsSetTargetCountArgs>;
|
|
450
|
+
/** Result of {@linkcode PluginProgramDepartmentsApi.setTargetCount} — the updated record with `units`. */
|
|
451
|
+
export declare const PluginProgramDepartmentsSetTargetCountResult: z.ZodObject<{
|
|
452
|
+
id: z.ZodString;
|
|
453
|
+
name: z.ZodString;
|
|
454
|
+
color: z.ZodString;
|
|
455
|
+
targetArea: z.ZodNullable<z.ZodNumber>;
|
|
456
|
+
targetCount: z.ZodNumber;
|
|
457
|
+
units: z.ZodEnum<{
|
|
458
|
+
ft2: "ft2";
|
|
459
|
+
m2: "m2";
|
|
460
|
+
}>;
|
|
461
|
+
}, z.core.$strip>;
|
|
462
|
+
export type PluginProgramDepartmentsSetTargetCountResult = z.infer<typeof PluginProgramDepartmentsSetTargetCountResult>;
|
|
407
463
|
/**
|
|
408
464
|
* Arguments for {@linkcode PluginProgramDepartmentsApi.delete}.
|
|
409
465
|
*
|