@snaptrude/plugin-core 0.0.0-dev-20260708130115

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 (241) hide show
  1. package/AGENTS.md +227 -0
  2. package/CHANGELOG.md +119 -0
  3. package/CLAUDE.md +11 -0
  4. package/api-manifest.json +5004 -0
  5. package/dist/api/core/buildings.d.ts +427 -0
  6. package/dist/api/core/buildings.d.ts.map +1 -0
  7. package/dist/api/core/comment/index.d.ts +230 -0
  8. package/dist/api/core/comment/index.d.ts.map +1 -0
  9. package/dist/api/core/geom/create/index.d.ts +247 -0
  10. package/dist/api/core/geom/create/index.d.ts.map +1 -0
  11. package/dist/api/core/geom/delete/index.d.ts +72 -0
  12. package/dist/api/core/geom/delete/index.d.ts.map +1 -0
  13. package/dist/api/core/geom/index.d.ts +33 -0
  14. package/dist/api/core/geom/index.d.ts.map +1 -0
  15. package/dist/api/core/geom/query/arc.d.ts +169 -0
  16. package/dist/api/core/geom/query/arc.d.ts.map +1 -0
  17. package/dist/api/core/geom/query/brep.d.ts +402 -0
  18. package/dist/api/core/geom/query/brep.d.ts.map +1 -0
  19. package/dist/api/core/geom/query/circle.d.ts +378 -0
  20. package/dist/api/core/geom/query/circle.d.ts.map +1 -0
  21. package/dist/api/core/geom/query/contour.d.ts +450 -0
  22. package/dist/api/core/geom/query/contour.d.ts.map +1 -0
  23. package/dist/api/core/geom/query/curve.d.ts +918 -0
  24. package/dist/api/core/geom/query/curve.d.ts.map +1 -0
  25. package/dist/api/core/geom/query/edge.d.ts +128 -0
  26. package/dist/api/core/geom/query/edge.d.ts.map +1 -0
  27. package/dist/api/core/geom/query/face.d.ts +363 -0
  28. package/dist/api/core/geom/query/face.d.ts.map +1 -0
  29. package/dist/api/core/geom/query/halfedge.d.ts +206 -0
  30. package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
  31. package/dist/api/core/geom/query/index.d.ts +61 -0
  32. package/dist/api/core/geom/query/index.d.ts.map +1 -0
  33. package/dist/api/core/geom/query/profile.d.ts +410 -0
  34. package/dist/api/core/geom/query/profile.d.ts.map +1 -0
  35. package/dist/api/core/geom/query/vertex.d.ts +187 -0
  36. package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
  37. package/dist/api/core/geom/update/contour.d.ts +272 -0
  38. package/dist/api/core/geom/update/contour.d.ts.map +1 -0
  39. package/dist/api/core/geom/update/curve.d.ts +180 -0
  40. package/dist/api/core/geom/update/curve.d.ts.map +1 -0
  41. package/dist/api/core/geom/update/index.d.ts +27 -0
  42. package/dist/api/core/geom/update/index.d.ts.map +1 -0
  43. package/dist/api/core/geom/update/profile.d.ts +329 -0
  44. package/dist/api/core/geom/update/profile.d.ts.map +1 -0
  45. package/dist/api/core/groups.d.ts +485 -0
  46. package/dist/api/core/groups.d.ts.map +1 -0
  47. package/dist/api/core/history/index.d.ts +78 -0
  48. package/dist/api/core/history/index.d.ts.map +1 -0
  49. package/dist/api/core/index.d.ts +63 -0
  50. package/dist/api/core/index.d.ts.map +1 -0
  51. package/dist/api/core/layers.d.ts +402 -0
  52. package/dist/api/core/layers.d.ts.map +1 -0
  53. package/dist/api/core/math/index.d.ts +18 -0
  54. package/dist/api/core/math/index.d.ts.map +1 -0
  55. package/dist/api/core/math/quat.d.ts +170 -0
  56. package/dist/api/core/math/quat.d.ts.map +1 -0
  57. package/dist/api/core/math/vec3.d.ts +174 -0
  58. package/dist/api/core/math/vec3.d.ts.map +1 -0
  59. package/dist/api/core/project/index.d.ts +399 -0
  60. package/dist/api/core/project/index.d.ts.map +1 -0
  61. package/dist/api/core/tags.d.ts +755 -0
  62. package/dist/api/core/tags.d.ts.map +1 -0
  63. package/dist/api/core/units/index.d.ts +175 -0
  64. package/dist/api/core/units/index.d.ts.map +1 -0
  65. package/dist/api/core/zoom/index.d.ts +45 -0
  66. package/dist/api/core/zoom/index.d.ts.map +1 -0
  67. package/dist/api/design/boolean/index.d.ts +168 -0
  68. package/dist/api/design/boolean/index.d.ts.map +1 -0
  69. package/dist/api/design/create/index.d.ts +828 -0
  70. package/dist/api/design/create/index.d.ts.map +1 -0
  71. package/dist/api/design/delete/index.d.ts +63 -0
  72. package/dist/api/design/delete/index.d.ts.map +1 -0
  73. package/dist/api/design/doors/index.d.ts +268 -0
  74. package/dist/api/design/doors/index.d.ts.map +1 -0
  75. package/dist/api/design/edit/index.d.ts +49 -0
  76. package/dist/api/design/edit/index.d.ts.map +1 -0
  77. package/dist/api/design/erase/index.d.ts +160 -0
  78. package/dist/api/design/erase/index.d.ts.map +1 -0
  79. package/dist/api/design/furniture/index.d.ts +123 -0
  80. package/dist/api/design/furniture/index.d.ts.map +1 -0
  81. package/dist/api/design/index.d.ts +153 -0
  82. package/dist/api/design/index.d.ts.map +1 -0
  83. package/dist/api/design/lock.d.ts +41 -0
  84. package/dist/api/design/lock.d.ts.map +1 -0
  85. package/dist/api/design/materials/index.d.ts +297 -0
  86. package/dist/api/design/materials/index.d.ts.map +1 -0
  87. package/dist/api/design/query/geometry/index.d.ts +140 -0
  88. package/dist/api/design/query/geometry/index.d.ts.map +1 -0
  89. package/dist/api/design/query/index.d.ts +1011 -0
  90. package/dist/api/design/query/index.d.ts.map +1 -0
  91. package/dist/api/design/query/spaces.d.ts +221 -0
  92. package/dist/api/design/query/spaces.d.ts.map +1 -0
  93. package/dist/api/design/selection/index.d.ts +138 -0
  94. package/dist/api/design/selection/index.d.ts.map +1 -0
  95. package/dist/api/design/shared.d.ts +38 -0
  96. package/dist/api/design/shared.d.ts.map +1 -0
  97. package/dist/api/design/transform/index.d.ts +87 -0
  98. package/dist/api/design/transform/index.d.ts.map +1 -0
  99. package/dist/api/design/update/index.d.ts +178 -0
  100. package/dist/api/design/update/index.d.ts.map +1 -0
  101. package/dist/api/design/windows/index.d.ts +189 -0
  102. package/dist/api/design/windows/index.d.ts.map +1 -0
  103. package/dist/api/entity/buildableEnvelope.d.ts +261 -0
  104. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
  105. package/dist/api/entity/department.d.ts +1 -0
  106. package/dist/api/entity/department.d.ts.map +1 -0
  107. package/dist/api/entity/index.d.ts +28 -0
  108. package/dist/api/entity/index.d.ts.map +1 -0
  109. package/dist/api/entity/referenceLine.d.ts +202 -0
  110. package/dist/api/entity/referenceLine.d.ts.map +1 -0
  111. package/dist/api/entity/space.d.ts +846 -0
  112. package/dist/api/entity/space.d.ts.map +1 -0
  113. package/dist/api/entity/story.d.ts +249 -0
  114. package/dist/api/entity/story.d.ts.map +1 -0
  115. package/dist/api/index.d.ts +35 -0
  116. package/dist/api/index.d.ts.map +1 -0
  117. package/dist/api/presentation/aiInspiration.d.ts +2400 -0
  118. package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
  119. package/dist/api/presentation/diagrams.d.ts +81 -0
  120. package/dist/api/presentation/diagrams.d.ts.map +1 -0
  121. package/dist/api/presentation/import.d.ts +113 -0
  122. package/dist/api/presentation/import.d.ts.map +1 -0
  123. package/dist/api/presentation/index.d.ts +45 -0
  124. package/dist/api/presentation/index.d.ts.map +1 -0
  125. package/dist/api/presentation/sheets.d.ts +176 -0
  126. package/dist/api/presentation/sheets.d.ts.map +1 -0
  127. package/dist/api/presentation/views.d.ts +296 -0
  128. package/dist/api/presentation/views.d.ts.map +1 -0
  129. package/dist/api/program/adjacency.d.ts +155 -0
  130. package/dist/api/program/adjacency.d.ts.map +1 -0
  131. package/dist/api/program/areas.d.ts +360 -0
  132. package/dist/api/program/areas.d.ts.map +1 -0
  133. package/dist/api/program/classification.d.ts +135 -0
  134. package/dist/api/program/classification.d.ts.map +1 -0
  135. package/dist/api/program/cores.d.ts +174 -0
  136. package/dist/api/program/cores.d.ts.map +1 -0
  137. package/dist/api/program/departments.d.ts +431 -0
  138. package/dist/api/program/departments.d.ts.map +1 -0
  139. package/dist/api/program/index.d.ts +69 -0
  140. package/dist/api/program/index.d.ts.map +1 -0
  141. package/dist/api/program/layout.d.ts +63 -0
  142. package/dist/api/program/layout.d.ts.map +1 -0
  143. package/dist/api/program/metrics.d.ts +108 -0
  144. package/dist/api/program/metrics.d.ts.map +1 -0
  145. package/dist/api/program/site.d.ts +367 -0
  146. package/dist/api/program/site.d.ts.map +1 -0
  147. package/dist/api/program/spreadsheet.d.ts +2041 -0
  148. package/dist/api/program/spreadsheet.d.ts.map +1 -0
  149. package/dist/handles.d.ts +138 -0
  150. package/dist/handles.d.ts.map +1 -0
  151. package/dist/host-utils.d.ts +43 -0
  152. package/dist/host-utils.d.ts.map +1 -0
  153. package/dist/index.cjs +4597 -0
  154. package/dist/index.cjs.map +1 -0
  155. package/dist/index.d.ts +5 -0
  156. package/dist/index.d.ts.map +1 -0
  157. package/dist/index.js +3870 -0
  158. package/dist/index.js.map +1 -0
  159. package/dist/types.d.ts +16 -0
  160. package/dist/types.d.ts.map +1 -0
  161. package/package.json +39 -0
  162. package/scripts/generate-manifest.mjs +193 -0
  163. package/scripts/generate-manifest.test.mjs +193 -0
  164. package/src/api/core/buildings.ts +485 -0
  165. package/src/api/core/comment/index.ts +258 -0
  166. package/src/api/core/geom/create/index.ts +293 -0
  167. package/src/api/core/geom/delete/index.ts +78 -0
  168. package/src/api/core/geom/index.ts +35 -0
  169. package/src/api/core/geom/query/arc.ts +169 -0
  170. package/src/api/core/geom/query/brep.ts +444 -0
  171. package/src/api/core/geom/query/circle.ts +404 -0
  172. package/src/api/core/geom/query/contour.ts +540 -0
  173. package/src/api/core/geom/query/curve.ts +1078 -0
  174. package/src/api/core/geom/query/edge.ts +130 -0
  175. package/src/api/core/geom/query/face.ts +403 -0
  176. package/src/api/core/geom/query/halfedge.ts +210 -0
  177. package/src/api/core/geom/query/index.ts +63 -0
  178. package/src/api/core/geom/query/profile.ts +473 -0
  179. package/src/api/core/geom/query/vertex.ts +205 -0
  180. package/src/api/core/geom/update/contour.ts +315 -0
  181. package/src/api/core/geom/update/curve.ts +209 -0
  182. package/src/api/core/geom/update/index.ts +29 -0
  183. package/src/api/core/geom/update/profile.ts +377 -0
  184. package/src/api/core/groups.ts +521 -0
  185. package/src/api/core/history/index.ts +84 -0
  186. package/src/api/core/index.ts +65 -0
  187. package/src/api/core/layers.ts +333 -0
  188. package/src/api/core/math/index.ts +20 -0
  189. package/src/api/core/math/quat.ts +172 -0
  190. package/src/api/core/math/vec3.ts +179 -0
  191. package/src/api/core/project/index.ts +418 -0
  192. package/src/api/core/tags.ts +808 -0
  193. package/src/api/core/units/index.ts +164 -0
  194. package/src/api/core/zoom/index.ts +47 -0
  195. package/src/api/design/boolean/index.ts +179 -0
  196. package/src/api/design/create/index.ts +886 -0
  197. package/src/api/design/delete/index.ts +67 -0
  198. package/src/api/design/doors/index.ts +285 -0
  199. package/src/api/design/edit/index.ts +54 -0
  200. package/src/api/design/erase/index.ts +151 -0
  201. package/src/api/design/furniture/index.ts +130 -0
  202. package/src/api/design/index.ts +162 -0
  203. package/src/api/design/lock.ts +42 -0
  204. package/src/api/design/materials/index.ts +301 -0
  205. package/src/api/design/query/geometry/index.ts +166 -0
  206. package/src/api/design/query/index.ts +937 -0
  207. package/src/api/design/query/spaces.ts +132 -0
  208. package/src/api/design/selection/index.ts +144 -0
  209. package/src/api/design/shared.ts +40 -0
  210. package/src/api/design/transform/index.ts +93 -0
  211. package/src/api/design/update/index.ts +117 -0
  212. package/src/api/design/windows/index.ts +207 -0
  213. package/src/api/entity/buildableEnvelope.ts +318 -0
  214. package/src/api/entity/department.ts +0 -0
  215. package/src/api/entity/index.ts +30 -0
  216. package/src/api/entity/referenceLine.ts +227 -0
  217. package/src/api/entity/space.ts +612 -0
  218. package/src/api/entity/story.ts +273 -0
  219. package/src/api/index.ts +37 -0
  220. package/src/api/presentation/aiInspiration.ts +1116 -0
  221. package/src/api/presentation/diagrams.ts +84 -0
  222. package/src/api/presentation/import.ts +112 -0
  223. package/src/api/presentation/index.ts +47 -0
  224. package/src/api/presentation/sheets.ts +198 -0
  225. package/src/api/presentation/views.ts +303 -0
  226. package/src/api/program/adjacency.ts +164 -0
  227. package/src/api/program/areas.ts +335 -0
  228. package/src/api/program/classification.ts +138 -0
  229. package/src/api/program/cores.ts +171 -0
  230. package/src/api/program/departments.ts +465 -0
  231. package/src/api/program/index.ts +71 -0
  232. package/src/api/program/layout.ts +68 -0
  233. package/src/api/program/metrics.ts +120 -0
  234. package/src/api/program/site.ts +326 -0
  235. package/src/api/program/spreadsheet.ts +2075 -0
  236. package/src/handles.ts +148 -0
  237. package/src/host-utils.ts +64 -0
  238. package/src/index.ts +4 -0
  239. package/src/types.ts +16 -0
  240. package/tsconfig.json +17 -0
  241. package/tsup.config.ts +12 -0
@@ -0,0 +1,360 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ import { ComponentHandle } from "../../handles";
4
+ /**
5
+ * Program areas — the FAR / built-up-area rollup for the active program.
6
+ *
7
+ * This is the zoning-compliance lens on the model: carpet / built-up / excluded
8
+ * area totals, the site area, and the achieved-vs-target **FAR** (Floor Area
9
+ * Ratio). It complements {@linkcode PluginProgramMetricsApi}, which is the
10
+ * department-allocation lens (targets vs allocated area per department); this
11
+ * namespace is the whole-program area/FAR summary and its groupings.
12
+ *
13
+ * `achievedFar` is **derived and read-only** — computed from built-up area and
14
+ * site area. `targetFar` is the goal you set (via {@linkcode
15
+ * PluginProgramAreasApi.update}); the two are the same ratio, one measured and
16
+ * one intended. The surface speaks **FAR only** — there is no FSI alias.
17
+ *
18
+ * Reads return plain records and never throw. The write member typed as optional
19
+ * (`?`) is **authored ahead of the host** — declared so plugins and codegen can
20
+ * see the shape, but kept out of the discovery manifest until the host lands it
21
+ * (at which point it is promoted to a required `abstract` member).
22
+ *
23
+ * Accessed via `snaptrude.program.areas`.
24
+ */
25
+ export declare abstract class PluginProgramAreasApi {
26
+ constructor();
27
+ /**
28
+ * Get the program area summary.
29
+ *
30
+ * Returns the whole-program totals — carpet / built-up / excluded area, site
31
+ * area, and achieved vs target FAR — with the area unit they are reported in.
32
+ *
33
+ * @returns A {@linkcode PluginProgramAreaSummary}. `achievedFar` is `null` when
34
+ * the site area or target FAR is not set.
35
+ *
36
+ * @examplePrompt What's my FAR right now?
37
+ * @examplePrompt Give me the program area summary
38
+ * @examplePrompt How much built-up area have I used against the site area?
39
+ * @examplePrompt Am I within my FAR target?
40
+ *
41
+ * # Example
42
+ * ```ts
43
+ * const s = await snaptrude.program.areas.get()
44
+ * console.log(s.builtUp, s.siteArea, s.achievedFar, s.targetFar, s.areaUnit)
45
+ * ```
46
+ */
47
+ abstract get(): PluginApiReturn<PluginProgramAreasGetResult>;
48
+ /**
49
+ * List the program area rollup grouped by a facet.
50
+ *
51
+ * Breaks the program's area totals into buckets — by label, storey, building,
52
+ * department, or tag category.
53
+ *
54
+ * @param groupBy - The facet to group by (a {@linkcode PluginProgramAreaGroupBy}).
55
+ * @param categoryId - The tag category to group by (required when `groupBy` is
56
+ * `"tagCategories"`).
57
+ * @returns A {@linkcode PluginProgramAreasListResult} with a `groups` array
58
+ * (empty when the program has no spaces).
59
+ *
60
+ * @examplePrompt Break down the area by storey
61
+ * @examplePrompt Show the area rollup per department
62
+ * @examplePrompt Group the built-up area by building
63
+ *
64
+ * # Example
65
+ * ```ts
66
+ * const { groups } = await snaptrude.program.areas.list("storeys")
67
+ * for (const g of groups) console.log(g.name, g.builtUp, g.count)
68
+ * ```
69
+ */
70
+ abstract list(groupBy: PluginProgramAreaGroupBy, categoryId?: string): PluginApiReturn<PluginProgramAreasListResult>;
71
+ /**
72
+ * List the spaces that make up one area group.
73
+ *
74
+ * Drills into a single bucket returned by {@linkcode
75
+ * PluginProgramAreasApi.list} and returns its member spaces with their per-space
76
+ * area figures.
77
+ *
78
+ * @param groupBy - The same facet used to produce the group (a {@linkcode
79
+ * PluginProgramAreaGroupBy}).
80
+ * @param groupId - The id of the group to expand.
81
+ * @param categoryId - The tag category context (required when `groupBy` is
82
+ * `"tagCategories"`).
83
+ * @returns A {@linkcode PluginProgramAreasListMembersResult} with a `members`
84
+ * array (empty when the group is missing or empty).
85
+ *
86
+ * @examplePrompt List the spaces on this storey with their areas
87
+ * @examplePrompt What rooms are in the Bedrooms department bucket?
88
+ * @examplePrompt Break the storey area down into individual spaces
89
+ *
90
+ * # Example
91
+ * ```ts
92
+ * const { members } = await snaptrude.program.areas.listMembers("storeys", "st_2")
93
+ * for (const m of members) console.log(m.label, m.carpet)
94
+ * ```
95
+ */
96
+ abstract listMembers(groupBy: PluginProgramAreaGroupBy, groupId: string, categoryId?: string): PluginApiReturn<PluginProgramAreasListMembersResult>;
97
+ /**
98
+ * Update the program's FAR settings.
99
+ *
100
+ * A **sparse** update of the program-level FAR inputs — target FAR, the site
101
+ * area, and the allowed deviation. This is a **non-undoable settings write**
102
+ * (persisted with the project). `achievedFar` recomputes from these.
103
+ *
104
+ * @param options - Any of `targetFar`, `siteArea`, `deviation`; omitted fields
105
+ * are left unchanged.
106
+ * @returns The recomputed {@linkcode PluginProgramAreaSummary}.
107
+ * @throws If a value is out of range.
108
+ *
109
+ * @examplePrompt Set the target FAR to 2.5
110
+ * @examplePrompt Override the site area to 5000
111
+ * @examplePrompt Allow a 10 percent FAR deviation
112
+ *
113
+ * # Example
114
+ * ```ts
115
+ * const s = await snaptrude.program.areas.update({ targetFar: 2.5 })
116
+ * console.log(s.achievedFar, s.targetFar)
117
+ * ```
118
+ */
119
+ abstract update(options?: {
120
+ targetFar?: number;
121
+ siteArea?: number;
122
+ deviation?: number;
123
+ }): PluginApiReturn<PluginProgramAreasUpdateResult>;
124
+ }
125
+ /**
126
+ * The whole-program area / FAR summary. All area figures are in `areaUnit`;
127
+ * ratios (`achievedFar`, `targetFar`, `deviation`) are unitless.
128
+ *
129
+ * | Property | Type | Description |
130
+ * |---|---|---|
131
+ * | `count` | `number` | Number of spaces in the program (a count, not an area) |
132
+ * | `hiddenCount` | `number` | Number of those spaces that are currently hidden |
133
+ * | `carpet` | `number` | Total carpet area in `areaUnit` |
134
+ * | `builtUp` | `number` | Total built-up area in `areaUnit` |
135
+ * | `excluded` | `number` | Total excluded area in `areaUnit` |
136
+ * | `farBuiltUp` | `number` | Built-up area that counts toward FAR, in `areaUnit` |
137
+ * | `siteArea` | `number` | Site/plot area in `areaUnit` |
138
+ * | `achievedFar` | `number \| null` | Derived FAR (`farBuiltUp / siteArea`); `null` when site area or target FAR is unset |
139
+ * | `targetFar` | `number` | The target FAR goal (set via `update`) |
140
+ * | `deviation` | `number` | Allowed FAR deviation, as a percentage |
141
+ * | `areaUnit` | `"ft2" \| "m2"` | The unit every area figure above is reported in |
142
+ */
143
+ export declare const PluginProgramAreaSummary: z.ZodObject<{
144
+ count: z.ZodNumber;
145
+ hiddenCount: z.ZodNumber;
146
+ carpet: z.ZodNumber;
147
+ builtUp: z.ZodNumber;
148
+ excluded: z.ZodNumber;
149
+ farBuiltUp: z.ZodNumber;
150
+ siteArea: z.ZodNumber;
151
+ achievedFar: z.ZodNullable<z.ZodNumber>;
152
+ targetFar: z.ZodNumber;
153
+ deviation: z.ZodNumber;
154
+ areaUnit: z.ZodEnum<{
155
+ ft2: "ft2";
156
+ m2: "m2";
157
+ }>;
158
+ }, z.core.$strip>;
159
+ export type PluginProgramAreaSummary = z.infer<typeof PluginProgramAreaSummary>;
160
+ /**
161
+ * One bucket of the area rollup. Carpet / built-up / excluded figures are in the
162
+ * program's area unit (see {@linkcode PluginProgramAreaSummary.areaUnit});
163
+ * `targetArea` is in `targetUnit`.
164
+ *
165
+ * | Property | Type | Description |
166
+ * |---|---|---|
167
+ * | `groupId` | `string` | Stable id of the group (e.g. storey id, department id) |
168
+ * | `name` | `string` | Display name of the group |
169
+ * | `color` | `string` | CSS hex color string for the group |
170
+ * | `carpet` | `number` | Carpet area for this group |
171
+ * | `builtUp` | `number` | Built-up area for this group |
172
+ * | `excluded` | `number` | Excluded area for this group |
173
+ * | `count` | `number` | Number of spaces in this group |
174
+ * | `targetArea` | `number` | Target area for this group, in `targetUnit` |
175
+ * | `targetUnit` | `"ft2" \| "m2"` | The unit `targetArea` is reported in |
176
+ */
177
+ export declare const PluginProgramAreaGroup: z.ZodObject<{
178
+ groupId: z.ZodString;
179
+ name: z.ZodString;
180
+ color: z.ZodString;
181
+ carpet: z.ZodNumber;
182
+ builtUp: z.ZodNumber;
183
+ excluded: z.ZodNumber;
184
+ count: z.ZodNumber;
185
+ targetArea: z.ZodNumber;
186
+ targetUnit: z.ZodEnum<{
187
+ ft2: "ft2";
188
+ m2: "m2";
189
+ }>;
190
+ }, z.core.$strip>;
191
+ export type PluginProgramAreaGroup = z.infer<typeof PluginProgramAreaGroup>;
192
+ /**
193
+ * A single space within an area group. Area figures are in the program's area
194
+ * unit (see {@linkcode PluginProgramAreaSummary.areaUnit}).
195
+ *
196
+ * | Property | Type | Description |
197
+ * |---|---|---|
198
+ * | `id` | `ComponentHandle` | `Component.id` of the space (never a mesh handle) |
199
+ * | `label` | `string` | Display label of the space |
200
+ * | `carpet` | `number` | Carpet area of the space |
201
+ * | `builtUp` | `number` | Built-up area of the space |
202
+ * | `excluded` | `number` | Excluded area of the space |
203
+ * | `isVisible` | `boolean` | Whether the space is currently visible |
204
+ */
205
+ export declare const PluginProgramAreaMember: z.ZodObject<{
206
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
207
+ label: z.ZodString;
208
+ carpet: z.ZodNumber;
209
+ builtUp: z.ZodNumber;
210
+ excluded: z.ZodNumber;
211
+ isVisible: z.ZodBoolean;
212
+ }, z.core.$strip>;
213
+ export type PluginProgramAreaMember = z.infer<typeof PluginProgramAreaMember>;
214
+ /** The facet to group the area rollup by. */
215
+ export declare const PluginProgramAreaGroupBy: z.ZodEnum<{
216
+ buildings: "buildings";
217
+ storeys: "storeys";
218
+ departments: "departments";
219
+ labels: "labels";
220
+ tagCategories: "tagCategories";
221
+ }>;
222
+ export type PluginProgramAreaGroupBy = z.infer<typeof PluginProgramAreaGroupBy>;
223
+ /** Result of {@linkcode PluginProgramAreasApi.get} — the program area summary. */
224
+ export declare const PluginProgramAreasGetResult: z.ZodObject<{
225
+ count: z.ZodNumber;
226
+ hiddenCount: z.ZodNumber;
227
+ carpet: z.ZodNumber;
228
+ builtUp: z.ZodNumber;
229
+ excluded: z.ZodNumber;
230
+ farBuiltUp: z.ZodNumber;
231
+ siteArea: z.ZodNumber;
232
+ achievedFar: z.ZodNullable<z.ZodNumber>;
233
+ targetFar: z.ZodNumber;
234
+ deviation: z.ZodNumber;
235
+ areaUnit: z.ZodEnum<{
236
+ ft2: "ft2";
237
+ m2: "m2";
238
+ }>;
239
+ }, z.core.$strip>;
240
+ export type PluginProgramAreasGetResult = z.infer<typeof PluginProgramAreasGetResult>;
241
+ /**
242
+ * Arguments for {@linkcode PluginProgramAreasApi.list}.
243
+ *
244
+ * | Property | Type | Description |
245
+ * |---|---|---|
246
+ * | `groupBy` | {@linkcode PluginProgramAreaGroupBy} | The facet to group by |
247
+ * | `categoryId` | `string \| undefined` | Tag category to group by; required when `groupBy` is `"tagCategories"` |
248
+ */
249
+ export declare const PluginProgramAreasListArgs: z.ZodObject<{
250
+ groupBy: z.ZodEnum<{
251
+ buildings: "buildings";
252
+ storeys: "storeys";
253
+ departments: "departments";
254
+ labels: "labels";
255
+ tagCategories: "tagCategories";
256
+ }>;
257
+ categoryId: z.ZodOptional<z.ZodString>;
258
+ }, z.core.$strip>;
259
+ export type PluginProgramAreasListArgs = z.infer<typeof PluginProgramAreasListArgs>;
260
+ /**
261
+ * Result of {@linkcode PluginProgramAreasApi.list}.
262
+ *
263
+ * | Property | Type | Description |
264
+ * |---|---|---|
265
+ * | `groups` | {@linkcode PluginProgramAreaGroup}`[]` | The area buckets (empty when the program has no spaces) |
266
+ */
267
+ export declare const PluginProgramAreasListResult: z.ZodObject<{
268
+ groups: z.ZodArray<z.ZodObject<{
269
+ groupId: z.ZodString;
270
+ name: z.ZodString;
271
+ color: z.ZodString;
272
+ carpet: z.ZodNumber;
273
+ builtUp: z.ZodNumber;
274
+ excluded: z.ZodNumber;
275
+ count: z.ZodNumber;
276
+ targetArea: z.ZodNumber;
277
+ targetUnit: z.ZodEnum<{
278
+ ft2: "ft2";
279
+ m2: "m2";
280
+ }>;
281
+ }, z.core.$strip>>;
282
+ }, z.core.$strip>;
283
+ export type PluginProgramAreasListResult = z.infer<typeof PluginProgramAreasListResult>;
284
+ /**
285
+ * Arguments for {@linkcode PluginProgramAreasApi.listMembers}.
286
+ *
287
+ * | Property | Type | Description |
288
+ * |---|---|---|
289
+ * | `groupBy` | {@linkcode PluginProgramAreaGroupBy} | The facet the group came from |
290
+ * | `groupId` | `string` | The id of the group to expand |
291
+ * | `categoryId` | `string \| undefined` | Tag category context; required when `groupBy` is `"tagCategories"` |
292
+ */
293
+ export declare const PluginProgramAreasListMembersArgs: z.ZodObject<{
294
+ groupBy: z.ZodEnum<{
295
+ buildings: "buildings";
296
+ storeys: "storeys";
297
+ departments: "departments";
298
+ labels: "labels";
299
+ tagCategories: "tagCategories";
300
+ }>;
301
+ groupId: z.ZodString;
302
+ categoryId: z.ZodOptional<z.ZodString>;
303
+ }, z.core.$strip>;
304
+ export type PluginProgramAreasListMembersArgs = z.infer<typeof PluginProgramAreasListMembersArgs>;
305
+ /**
306
+ * Result of {@linkcode PluginProgramAreasApi.listMembers}.
307
+ *
308
+ * | Property | Type | Description |
309
+ * |---|---|---|
310
+ * | `members` | {@linkcode PluginProgramAreaMember}`[]` | The group's member spaces (empty when missing or empty) |
311
+ */
312
+ export declare const PluginProgramAreasListMembersResult: z.ZodObject<{
313
+ members: z.ZodArray<z.ZodObject<{
314
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
315
+ label: z.ZodString;
316
+ carpet: z.ZodNumber;
317
+ builtUp: z.ZodNumber;
318
+ excluded: z.ZodNumber;
319
+ isVisible: z.ZodBoolean;
320
+ }, z.core.$strip>>;
321
+ }, z.core.$strip>;
322
+ export type PluginProgramAreasListMembersResult = z.infer<typeof PluginProgramAreasListMembersResult>;
323
+ /**
324
+ * Arguments for {@linkcode PluginProgramAreasApi.update}. Sparse — only the
325
+ * provided fields are changed.
326
+ *
327
+ * | Property | Type | Description |
328
+ * |---|---|---|
329
+ * | `targetFar` | `number \| undefined` | New target FAR (≥ 0) |
330
+ * | `siteArea` | `number \| undefined` | Site-area override (> 0), in the program's area unit |
331
+ * | `deviation` | `number \| undefined` | Allowed FAR deviation percentage (0–100) |
332
+ */
333
+ export declare const PluginProgramAreasUpdateArgs: z.ZodObject<{
334
+ targetFar: z.ZodOptional<z.ZodNumber>;
335
+ siteArea: z.ZodOptional<z.ZodNumber>;
336
+ deviation: z.ZodOptional<z.ZodNumber>;
337
+ }, z.core.$strip>;
338
+ export type PluginProgramAreasUpdateArgs = z.infer<typeof PluginProgramAreasUpdateArgs>;
339
+ /**
340
+ * Result of {@linkcode PluginProgramAreasApi.update} — the recomputed program
341
+ * area summary.
342
+ */
343
+ export declare const PluginProgramAreasUpdateResult: z.ZodObject<{
344
+ count: z.ZodNumber;
345
+ hiddenCount: z.ZodNumber;
346
+ carpet: z.ZodNumber;
347
+ builtUp: z.ZodNumber;
348
+ excluded: z.ZodNumber;
349
+ farBuiltUp: z.ZodNumber;
350
+ siteArea: z.ZodNumber;
351
+ achievedFar: z.ZodNullable<z.ZodNumber>;
352
+ targetFar: z.ZodNumber;
353
+ deviation: z.ZodNumber;
354
+ areaUnit: z.ZodEnum<{
355
+ ft2: "ft2";
356
+ m2: "m2";
357
+ }>;
358
+ }, z.core.$strip>;
359
+ export type PluginProgramAreasUpdateResult = z.infer<typeof PluginProgramAreasUpdateResult>;
360
+ //# sourceMappingURL=areas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"areas.d.ts","sourceRoot":"","sources":["../../../src/api/program/areas.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,135 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ /**
4
+ * Program classification — the catalog of space-classification options, and a
5
+ * space's display tags.
6
+ *
7
+ * Only the genuinely program-specific reads live here: the selectable
8
+ * space-type / area-class / mass-type options, and a space's tags for display.
9
+ * Reading or changing a *single space's* classification (its type, label, area
10
+ * class, or department) is done through the space reads/writes, not duplicated
11
+ * here. Tag definitions are managed elsewhere — these methods are display-only.
12
+ *
13
+ * Both methods are reads.
14
+ *
15
+ * Accessed via `snaptrude.program.classification`.
16
+ */
17
+ export declare abstract class PluginProgramClassificationApi {
18
+ constructor();
19
+ /**
20
+ * List the selectable classification options for spaces.
21
+ *
22
+ * The static catalog (project-independent) of space types, area classes, and
23
+ * mass types a space can be classified as.
24
+ *
25
+ * @returns A {@linkcode PluginProgramClassificationTypesResult} with the
26
+ * `spaceTypes`, `areaClasses`, and `massTypes` option lists.
27
+ *
28
+ * @examplePrompt What space types can I assign?
29
+ * @examplePrompt List the available area classifications
30
+ * @examplePrompt What classification options exist?
31
+ * @examplePrompt Show me the valid space-type values
32
+ *
33
+ * # Example
34
+ * ```ts
35
+ * const { spaceTypes, areaClasses } = await snaptrude.program.classification.listTypes()
36
+ * ```
37
+ */
38
+ abstract listTypes(): PluginApiReturn<PluginProgramClassificationTypesResult>;
39
+ /**
40
+ * List a space's tags for display, grouped by category.
41
+ *
42
+ * @param id - The id of the space whose tags to read.
43
+ * @returns A {@linkcode PluginProgramClassificationTagsResult} with the space's
44
+ * `tagIds` and `tagsByCategory`.
45
+ *
46
+ * @examplePrompt What tags are on this space?
47
+ * @examplePrompt Show the tags grouped by category for sp_4
48
+ * @examplePrompt List this room's display tags
49
+ * @examplePrompt Which tags does this space have?
50
+ *
51
+ * # Example
52
+ * ```ts
53
+ * const { tagsByCategory } = await snaptrude.program.classification.listTags("sp_4")
54
+ * ```
55
+ */
56
+ abstract listTags(id: string): PluginApiReturn<PluginProgramClassificationTagsResult>;
57
+ }
58
+ /**
59
+ * A selectable classification option.
60
+ *
61
+ * | Property | Type | Description |
62
+ * |---|---|---|
63
+ * | `value` | `string` | Stored value |
64
+ * | `label` | `string` | Display label |
65
+ */
66
+ export declare const PluginClassificationOption: z.ZodObject<{
67
+ value: z.ZodString;
68
+ label: z.ZodString;
69
+ }, z.core.$strip>;
70
+ export type PluginClassificationOption = z.infer<typeof PluginClassificationOption>;
71
+ /**
72
+ * Result of {@linkcode PluginProgramClassificationApi.listTypes}.
73
+ *
74
+ * | Property | Type | Description |
75
+ * |---|---|---|
76
+ * | `spaceTypes` | {@linkcode PluginClassificationOption}`[]` | Selectable space types |
77
+ * | `areaClasses` | {@linkcode PluginClassificationOption}`[]` | Selectable area classes (NET/GROSS/EXCLUDED) |
78
+ * | `massTypes` | {@linkcode PluginClassificationOption}`[]` | Selectable mass/object types |
79
+ */
80
+ export declare const PluginProgramClassificationTypesResult: z.ZodObject<{
81
+ spaceTypes: z.ZodArray<z.ZodObject<{
82
+ value: z.ZodString;
83
+ label: z.ZodString;
84
+ }, z.core.$strip>>;
85
+ areaClasses: z.ZodArray<z.ZodObject<{
86
+ value: z.ZodString;
87
+ label: z.ZodString;
88
+ }, z.core.$strip>>;
89
+ massTypes: z.ZodArray<z.ZodObject<{
90
+ value: z.ZodString;
91
+ label: z.ZodString;
92
+ }, z.core.$strip>>;
93
+ }, z.core.$strip>;
94
+ export type PluginProgramClassificationTypesResult = z.infer<typeof PluginProgramClassificationTypesResult>;
95
+ /** Arguments for {@linkcode PluginProgramClassificationApi.listTags}. */
96
+ export declare const PluginProgramClassificationListTagsArgs: z.ZodObject<{
97
+ id: z.ZodString;
98
+ }, z.core.$strip>;
99
+ export type PluginProgramClassificationListTagsArgs = z.infer<typeof PluginProgramClassificationListTagsArgs>;
100
+ /**
101
+ * A display tag on a space.
102
+ *
103
+ * | Property | Type | Description |
104
+ * |---|---|---|
105
+ * | `tagId` | `string` | Tag id |
106
+ * | `tagName` | `string` | Tag display name |
107
+ * | `color` | `string` | CSS hex color string |
108
+ * | `categoryId` | `string` | Id of the tag's category |
109
+ */
110
+ export declare const PluginSpaceTag: z.ZodObject<{
111
+ tagId: z.ZodString;
112
+ tagName: z.ZodString;
113
+ color: z.ZodString;
114
+ categoryId: z.ZodString;
115
+ }, z.core.$strip>;
116
+ export type PluginSpaceTag = z.infer<typeof PluginSpaceTag>;
117
+ /**
118
+ * Result of {@linkcode PluginProgramClassificationApi.listTags}.
119
+ *
120
+ * | Property | Type | Description |
121
+ * |---|---|---|
122
+ * | `tagIds` | `string[]` | All tag ids on the space |
123
+ * | `tagsByCategory` | `Record<string, `{@linkcode PluginSpaceTag}`>` | Tags keyed by category name |
124
+ */
125
+ export declare const PluginProgramClassificationTagsResult: z.ZodObject<{
126
+ tagIds: z.ZodArray<z.ZodString>;
127
+ tagsByCategory: z.ZodRecord<z.ZodString, z.ZodObject<{
128
+ tagId: z.ZodString;
129
+ tagName: z.ZodString;
130
+ color: z.ZodString;
131
+ categoryId: z.ZodString;
132
+ }, z.core.$strip>>;
133
+ }, z.core.$strip>;
134
+ export type PluginProgramClassificationTagsResult = z.infer<typeof PluginProgramClassificationTagsResult>;
135
+ //# sourceMappingURL=classification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classification.d.ts","sourceRoot":"","sources":["../../../src/api/program/classification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;;;GAaG;AACH,8BAAsB,8BAA8B;;IAGlD;;;;;;;;;;;;;;;;;;OAkBG;aACa,SAAS,IAAI,eAAe,CAAC,sCAAsC,CAAC;IAEpF;;;;;;;;;;;;;;;;OAgBG;aACa,QAAQ,CACtB,EAAE,EAAE,MAAM,GACT,eAAe,CAAC,qCAAqC,CAAC;CAC1D;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;iBAIjD,CAAA;AACF,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAC1D,OAAO,sCAAsC,CAC9C,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,uCAAuC;;iBAElD,CAAA;AACF,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAC3D,OAAO,uCAAuC,CAC/C,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;;;;;iBAKzB,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC;;;;;;;;iBAGhD,CAAA;AACF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACzD,OAAO,qCAAqC,CAC7C,CAAA"}
@@ -0,0 +1,174 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ /**
4
+ * Program cores — the building's vertical-circulation cores (lift / stair / shaft
5
+ * shells).
6
+ *
7
+ * Read the cores in the scene, test whether a space is a core, and trigger core
8
+ * generation from a layout. `create` is a **thin trigger**: the program hands a
9
+ * core layout to the core-generation engine, which authors the geometry — the
10
+ * core geometry itself is owned by the geometry layer, not here (the exact
11
+ * layout ↔ engine payload is coordinated with the geometry owner).
12
+ *
13
+ * `list`/`isCore` are reads; `create` triggers generation.
14
+ *
15
+ * Accessed via `snaptrude.program.cores`.
16
+ */
17
+ export declare abstract class PluginProgramCoresApi {
18
+ constructor();
19
+ /**
20
+ * List the cores currently in the building.
21
+ *
22
+ * @returns A {@linkcode PluginProgramCoresListResult} with each core's id,
23
+ * core group, and storey (empty when there are none).
24
+ *
25
+ * @examplePrompt List the cores in the building
26
+ * @examplePrompt How many cores are placed?
27
+ * @examplePrompt Show me the lift and stair cores
28
+ * @examplePrompt Which storeys have cores?
29
+ *
30
+ * # Example
31
+ * ```ts
32
+ * const { cores } = await snaptrude.program.cores.list()
33
+ * ```
34
+ */
35
+ abstract list(): PluginApiReturn<PluginProgramCoresListResult>;
36
+ /**
37
+ * Test whether a space is a circulation core element.
38
+ *
39
+ * @param id - The id of the space to test.
40
+ * @returns `true` if the space is a core element.
41
+ *
42
+ * @examplePrompt Is this space a core?
43
+ * @examplePrompt Does this mass belong to the core?
44
+ * @examplePrompt Check if space sp_1 is a circulation core
45
+ *
46
+ * # Example
47
+ * ```ts
48
+ * const isCore = await snaptrude.program.cores.isCore("sp_1")
49
+ * ```
50
+ */
51
+ abstract isCore(id: string): PluginApiReturn<boolean>;
52
+ /**
53
+ * Generate core geometry from a layout (thin trigger).
54
+ *
55
+ * Hands the core layout to the core-generation engine and returns how many core
56
+ * elements were created. The geometry is authored by the engine, not here.
57
+ * _(Authored ahead — optional until the host's geometry adapter lands; the
58
+ * reads {@linkcode PluginProgramCoresApi.list}/{@linkcode PluginProgramCoresApi.isCore}
59
+ * are live.)_
60
+ *
61
+ * @param cores - The {@linkcode PluginProgramCoreSpec} layout of cores to
62
+ * generate.
63
+ * @param lengthUnit - Unit of the spec dimensions (default project unit).
64
+ * @returns A {@linkcode PluginProgramCoresCreateResult} with the created count.
65
+ * @throws If the layout could not be realized.
66
+ *
67
+ * @examplePrompt Generate the building cores from this layout
68
+ * @examplePrompt Place the elevator and stair cores
69
+ * @examplePrompt Create the service core shells
70
+ *
71
+ * # Example
72
+ * ```ts
73
+ * await snaptrude.program.cores.create([
74
+ * { type: "lift", position: { x: 0, y: 0, z: 0 }, width: 3, depth: 4 },
75
+ * ])
76
+ * ```
77
+ */
78
+ create?: (cores: PluginProgramCoreSpec[], lengthUnit?: "mm" | "m" | "ft") => PluginApiReturn<PluginProgramCoresCreateResult>;
79
+ }
80
+ /**
81
+ * A circulation core element in the building.
82
+ *
83
+ * | Property | Type | Description |
84
+ * |---|---|---|
85
+ * | `id` | `string` | Component id of the core element |
86
+ * | `groupId` | `string` | Id of the core group this element belongs to |
87
+ * | `storey` | `number` | Storey (floor number) the element sits on |
88
+ */
89
+ export declare const PluginProgramCore: z.ZodObject<{
90
+ id: z.ZodString;
91
+ groupId: z.ZodString;
92
+ storey: z.ZodNumber;
93
+ }, z.core.$strip>;
94
+ export type PluginProgramCore = z.infer<typeof PluginProgramCore>;
95
+ /** Result of {@linkcode PluginProgramCoresApi.list}. */
96
+ export declare const PluginProgramCoresListResult: z.ZodObject<{
97
+ cores: z.ZodArray<z.ZodObject<{
98
+ id: z.ZodString;
99
+ groupId: z.ZodString;
100
+ storey: z.ZodNumber;
101
+ }, z.core.$strip>>;
102
+ }, z.core.$strip>;
103
+ export type PluginProgramCoresListResult = z.infer<typeof PluginProgramCoresListResult>;
104
+ /** Arguments for {@linkcode PluginProgramCoresApi.isCore}. */
105
+ export declare const PluginProgramCoresIsCoreArgs: z.ZodObject<{
106
+ id: z.ZodString;
107
+ }, z.core.$strip>;
108
+ export type PluginProgramCoresIsCoreArgs = z.infer<typeof PluginProgramCoresIsCoreArgs>;
109
+ /**
110
+ * One core to generate. The geometry layer interprets this layout (the exact
111
+ * fields are coordinated with the geometry owner).
112
+ *
113
+ * | Property | Type | Description |
114
+ * |---|---|---|
115
+ * | `type` | `string \| undefined` | Core kind (e.g. `"lift"`, `"stair"`, `"shaft"`) |
116
+ * | `position` | `{ x; y; z }` | Base position of the core |
117
+ * | `width` | `number` | Core width, in `lengthUnit` |
118
+ * | `depth` | `number` | Core depth, in `lengthUnit` |
119
+ * | `fromStorey` | `number \| undefined` | First storey the core spans |
120
+ * | `toStorey` | `number \| undefined` | Last storey the core spans |
121
+ */
122
+ export declare const PluginProgramCoreSpec: z.ZodObject<{
123
+ type: z.ZodOptional<z.ZodString>;
124
+ position: z.ZodObject<{
125
+ x: z.ZodNumber;
126
+ y: z.ZodNumber;
127
+ z: z.ZodNumber;
128
+ }, z.core.$strip>;
129
+ width: z.ZodNumber;
130
+ depth: z.ZodNumber;
131
+ fromStorey: z.ZodOptional<z.ZodNumber>;
132
+ toStorey: z.ZodOptional<z.ZodNumber>;
133
+ }, z.core.$strip>;
134
+ export type PluginProgramCoreSpec = z.infer<typeof PluginProgramCoreSpec>;
135
+ /**
136
+ * Arguments for {@linkcode PluginProgramCoresApi.create}.
137
+ *
138
+ * | Property | Type | Description |
139
+ * |---|---|---|
140
+ * | `cores` | {@linkcode PluginProgramCoreSpec}`[]` | The cores to generate |
141
+ * | `lengthUnit` | `"mm" \| "m" \| "ft" \| undefined` | Unit of the spec dimensions (default project unit) |
142
+ */
143
+ export declare const PluginProgramCoresCreateArgs: z.ZodObject<{
144
+ cores: z.ZodArray<z.ZodObject<{
145
+ type: z.ZodOptional<z.ZodString>;
146
+ position: z.ZodObject<{
147
+ x: z.ZodNumber;
148
+ y: z.ZodNumber;
149
+ z: z.ZodNumber;
150
+ }, z.core.$strip>;
151
+ width: z.ZodNumber;
152
+ depth: z.ZodNumber;
153
+ fromStorey: z.ZodOptional<z.ZodNumber>;
154
+ toStorey: z.ZodOptional<z.ZodNumber>;
155
+ }, z.core.$strip>>;
156
+ lengthUnit: z.ZodOptional<z.ZodEnum<{
157
+ ft: "ft";
158
+ m: "m";
159
+ mm: "mm";
160
+ }>>;
161
+ }, z.core.$strip>;
162
+ export type PluginProgramCoresCreateArgs = z.infer<typeof PluginProgramCoresCreateArgs>;
163
+ /**
164
+ * Result of {@linkcode PluginProgramCoresApi.create}.
165
+ *
166
+ * | Property | Type | Description |
167
+ * |---|---|---|
168
+ * | `createdCount` | `number` | Number of core elements created |
169
+ */
170
+ export declare const PluginProgramCoresCreateResult: z.ZodObject<{
171
+ createdCount: z.ZodNumber;
172
+ }, z.core.$strip>;
173
+ export type PluginProgramCoresCreateResult = z.infer<typeof PluginProgramCoresCreateResult>;
174
+ //# sourceMappingURL=cores.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cores.d.ts","sourceRoot":"","sources":["../../../src/api/program/cores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;;;GAaG;AACH,8BAAsB,qBAAqB;;IAGzC;;;;;;;;;;;;;;;OAeG;aACa,IAAI,IAAI,eAAe,CAAC,4BAA4B,CAAC;IAErE;;;;;;;;;;;;;;OAcG;aACa,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC;IAE5D;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACI,MAAM,CAAC,EAAE,CACd,KAAK,EAAE,qBAAqB,EAAE,EAC9B,UAAU,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,IAAI,KAC3B,eAAe,CAAC,8BAA8B,CAAC,CAAA;CACrD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEjE,wDAAwD;AACxD,eAAO,MAAM,4BAA4B;;;;;;iBAEvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA;AAED,8DAA8D;AAC9D,eAAO,MAAM,4BAA4B;;iBAEvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;iBAOhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;iBAGvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAA"}