@snaptrude/plugin-core 0.0.0-bimsvg-20260928124803

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 (383) hide show
  1. package/AGENTS.md +231 -0
  2. package/CHANGELOG.md +341 -0
  3. package/CLAUDE.md +11 -0
  4. package/api-manifest.json +9120 -0
  5. package/dist/api/analysis/daylight.d.ts +603 -0
  6. package/dist/api/analysis/daylight.d.ts.map +1 -0
  7. package/dist/api/analysis/heatmaps.d.ts +658 -0
  8. package/dist/api/analysis/heatmaps.d.ts.map +1 -0
  9. package/dist/api/analysis/illuminance.d.ts +145 -0
  10. package/dist/api/analysis/illuminance.d.ts.map +1 -0
  11. package/dist/api/analysis/index.d.ts +59 -0
  12. package/dist/api/analysis/index.d.ts.map +1 -0
  13. package/dist/api/analysis/shadows.d.ts +165 -0
  14. package/dist/api/analysis/shadows.d.ts.map +1 -0
  15. package/dist/api/analysis/solar.d.ts +249 -0
  16. package/dist/api/analysis/solar.d.ts.map +1 -0
  17. package/dist/api/analysis/sunlightHours.d.ts +208 -0
  18. package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
  19. package/dist/api/analysis/sunpath.d.ts +80 -0
  20. package/dist/api/analysis/sunpath.d.ts.map +1 -0
  21. package/dist/api/analysis/weather.d.ts +193 -0
  22. package/dist/api/analysis/weather.d.ts.map +1 -0
  23. package/dist/api/core/buildings.d.ts +427 -0
  24. package/dist/api/core/buildings.d.ts.map +1 -0
  25. package/dist/api/core/camera/index.d.ts +261 -0
  26. package/dist/api/core/camera/index.d.ts.map +1 -0
  27. package/dist/api/core/comment/index.d.ts +333 -0
  28. package/dist/api/core/comment/index.d.ts.map +1 -0
  29. package/dist/api/core/geom/create/index.d.ts +1073 -0
  30. package/dist/api/core/geom/create/index.d.ts.map +1 -0
  31. package/dist/api/core/geom/delete/index.d.ts +78 -0
  32. package/dist/api/core/geom/delete/index.d.ts.map +1 -0
  33. package/dist/api/core/geom/index.d.ts +33 -0
  34. package/dist/api/core/geom/index.d.ts.map +1 -0
  35. package/dist/api/core/geom/query/arc.d.ts +169 -0
  36. package/dist/api/core/geom/query/arc.d.ts.map +1 -0
  37. package/dist/api/core/geom/query/brep.d.ts +514 -0
  38. package/dist/api/core/geom/query/brep.d.ts.map +1 -0
  39. package/dist/api/core/geom/query/circle.d.ts +378 -0
  40. package/dist/api/core/geom/query/circle.d.ts.map +1 -0
  41. package/dist/api/core/geom/query/contour.d.ts +450 -0
  42. package/dist/api/core/geom/query/contour.d.ts.map +1 -0
  43. package/dist/api/core/geom/query/curve.d.ts +918 -0
  44. package/dist/api/core/geom/query/curve.d.ts.map +1 -0
  45. package/dist/api/core/geom/query/edge.d.ts +128 -0
  46. package/dist/api/core/geom/query/edge.d.ts.map +1 -0
  47. package/dist/api/core/geom/query/face.d.ts +363 -0
  48. package/dist/api/core/geom/query/face.d.ts.map +1 -0
  49. package/dist/api/core/geom/query/halfedge.d.ts +206 -0
  50. package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
  51. package/dist/api/core/geom/query/index.d.ts +61 -0
  52. package/dist/api/core/geom/query/index.d.ts.map +1 -0
  53. package/dist/api/core/geom/query/profile.d.ts +410 -0
  54. package/dist/api/core/geom/query/profile.d.ts.map +1 -0
  55. package/dist/api/core/geom/query/vertex.d.ts +187 -0
  56. package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
  57. package/dist/api/core/geom/update/contour.d.ts +272 -0
  58. package/dist/api/core/geom/update/contour.d.ts.map +1 -0
  59. package/dist/api/core/geom/update/curve.d.ts +180 -0
  60. package/dist/api/core/geom/update/curve.d.ts.map +1 -0
  61. package/dist/api/core/geom/update/index.d.ts +27 -0
  62. package/dist/api/core/geom/update/index.d.ts.map +1 -0
  63. package/dist/api/core/geom/update/profile.d.ts +329 -0
  64. package/dist/api/core/geom/update/profile.d.ts.map +1 -0
  65. package/dist/api/core/groups.d.ts +485 -0
  66. package/dist/api/core/groups.d.ts.map +1 -0
  67. package/dist/api/core/handles/index.d.ts +210 -0
  68. package/dist/api/core/handles/index.d.ts.map +1 -0
  69. package/dist/api/core/history/index.d.ts +78 -0
  70. package/dist/api/core/history/index.d.ts.map +1 -0
  71. package/dist/api/core/index.d.ts +97 -0
  72. package/dist/api/core/index.d.ts.map +1 -0
  73. package/dist/api/core/io/export/index.d.ts +134 -0
  74. package/dist/api/core/io/export/index.d.ts.map +1 -0
  75. package/dist/api/core/io/import/index.d.ts +455 -0
  76. package/dist/api/core/io/import/index.d.ts.map +1 -0
  77. package/dist/api/core/io/index.d.ts +40 -0
  78. package/dist/api/core/io/index.d.ts.map +1 -0
  79. package/dist/api/core/io/job/index.d.ts +139 -0
  80. package/dist/api/core/io/job/index.d.ts.map +1 -0
  81. package/dist/api/core/io/query/index.d.ts +74 -0
  82. package/dist/api/core/io/query/index.d.ts.map +1 -0
  83. package/dist/api/core/io/terrain/index.d.ts +341 -0
  84. package/dist/api/core/io/terrain/index.d.ts.map +1 -0
  85. package/dist/api/core/io/underlay/index.d.ts +805 -0
  86. package/dist/api/core/io/underlay/index.d.ts.map +1 -0
  87. package/dist/api/core/layers.d.ts +402 -0
  88. package/dist/api/core/layers.d.ts.map +1 -0
  89. package/dist/api/core/math/index.d.ts +18 -0
  90. package/dist/api/core/math/index.d.ts.map +1 -0
  91. package/dist/api/core/math/quat.d.ts +170 -0
  92. package/dist/api/core/math/quat.d.ts.map +1 -0
  93. package/dist/api/core/math/vec3.d.ts +174 -0
  94. package/dist/api/core/math/vec3.d.ts.map +1 -0
  95. package/dist/api/core/mode/index.d.ts +111 -0
  96. package/dist/api/core/mode/index.d.ts.map +1 -0
  97. package/dist/api/core/project/index.d.ts +466 -0
  98. package/dist/api/core/project/index.d.ts.map +1 -0
  99. package/dist/api/core/proposals/index.d.ts +531 -0
  100. package/dist/api/core/proposals/index.d.ts.map +1 -0
  101. package/dist/api/core/storeys/index.d.ts +265 -0
  102. package/dist/api/core/storeys/index.d.ts.map +1 -0
  103. package/dist/api/core/tags.d.ts +860 -0
  104. package/dist/api/core/tags.d.ts.map +1 -0
  105. package/dist/api/core/units/index.d.ts +175 -0
  106. package/dist/api/core/units/index.d.ts.map +1 -0
  107. package/dist/api/core/user.d.ts +44 -0
  108. package/dist/api/core/user.d.ts.map +1 -0
  109. package/dist/api/core/zoom/index.d.ts +49 -0
  110. package/dist/api/core/zoom/index.d.ts.map +1 -0
  111. package/dist/api/design/boolean/index.d.ts +168 -0
  112. package/dist/api/design/boolean/index.d.ts.map +1 -0
  113. package/dist/api/design/create/bulk-items.d.ts +185 -0
  114. package/dist/api/design/create/bulk-items.d.ts.map +1 -0
  115. package/dist/api/design/create/grids.d.ts +132 -0
  116. package/dist/api/design/create/grids.d.ts.map +1 -0
  117. package/dist/api/design/create/index.d.ts +1747 -0
  118. package/dist/api/design/create/index.d.ts.map +1 -0
  119. package/dist/api/design/create/opening-fields.d.ts +37 -0
  120. package/dist/api/design/create/opening-fields.d.ts.map +1 -0
  121. package/dist/api/design/delete/index.d.ts +70 -0
  122. package/dist/api/design/delete/index.d.ts.map +1 -0
  123. package/dist/api/design/dimensions.d.ts +427 -0
  124. package/dist/api/design/dimensions.d.ts.map +1 -0
  125. package/dist/api/design/doors/index.d.ts +470 -0
  126. package/dist/api/design/doors/index.d.ts.map +1 -0
  127. package/dist/api/design/edit/index.d.ts +49 -0
  128. package/dist/api/design/edit/index.d.ts.map +1 -0
  129. package/dist/api/design/erase/index.d.ts +160 -0
  130. package/dist/api/design/erase/index.d.ts.map +1 -0
  131. package/dist/api/design/family.d.ts +611 -0
  132. package/dist/api/design/family.d.ts.map +1 -0
  133. package/dist/api/design/furniture/index.d.ts +296 -0
  134. package/dist/api/design/furniture/index.d.ts.map +1 -0
  135. package/dist/api/design/grids.d.ts +237 -0
  136. package/dist/api/design/grids.d.ts.map +1 -0
  137. package/dist/api/design/index.d.ts +260 -0
  138. package/dist/api/design/index.d.ts.map +1 -0
  139. package/dist/api/design/lock.d.ts +67 -0
  140. package/dist/api/design/lock.d.ts.map +1 -0
  141. package/dist/api/design/materials/index.d.ts +551 -0
  142. package/dist/api/design/materials/index.d.ts.map +1 -0
  143. package/dist/api/design/query/geometry/index.d.ts +252 -0
  144. package/dist/api/design/query/geometry/index.d.ts.map +1 -0
  145. package/dist/api/design/query/grids.d.ts +287 -0
  146. package/dist/api/design/query/grids.d.ts.map +1 -0
  147. package/dist/api/design/query/index.d.ts +1318 -0
  148. package/dist/api/design/query/index.d.ts.map +1 -0
  149. package/dist/api/design/query/referenceLines.d.ts +45 -0
  150. package/dist/api/design/query/referenceLines.d.ts.map +1 -0
  151. package/dist/api/design/query/spaces.d.ts +394 -0
  152. package/dist/api/design/query/spaces.d.ts.map +1 -0
  153. package/dist/api/design/selection/index.d.ts +282 -0
  154. package/dist/api/design/selection/index.d.ts.map +1 -0
  155. package/dist/api/design/shared.d.ts +38 -0
  156. package/dist/api/design/shared.d.ts.map +1 -0
  157. package/dist/api/design/transform/index.d.ts +249 -0
  158. package/dist/api/design/transform/index.d.ts.map +1 -0
  159. package/dist/api/design/types/index.d.ts +181 -0
  160. package/dist/api/design/types/index.d.ts.map +1 -0
  161. package/dist/api/design/update/index.d.ts +803 -0
  162. package/dist/api/design/update/index.d.ts.map +1 -0
  163. package/dist/api/design/visibility.d.ts +126 -0
  164. package/dist/api/design/visibility.d.ts.map +1 -0
  165. package/dist/api/design/windows/index.d.ts +300 -0
  166. package/dist/api/design/windows/index.d.ts.map +1 -0
  167. package/dist/api/entity/buildableEnvelope.d.ts +265 -0
  168. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
  169. package/dist/api/entity/department.d.ts +1 -0
  170. package/dist/api/entity/department.d.ts.map +1 -0
  171. package/dist/api/entity/index.d.ts +28 -0
  172. package/dist/api/entity/index.d.ts.map +1 -0
  173. package/dist/api/entity/referenceLine.d.ts +210 -0
  174. package/dist/api/entity/referenceLine.d.ts.map +1 -0
  175. package/dist/api/entity/space.d.ts +846 -0
  176. package/dist/api/entity/space.d.ts.map +1 -0
  177. package/dist/api/entity/story.d.ts +476 -0
  178. package/dist/api/entity/story.d.ts.map +1 -0
  179. package/dist/api/index.d.ts +45 -0
  180. package/dist/api/index.d.ts.map +1 -0
  181. package/dist/api/presentation/aiInspiration.d.ts +2400 -0
  182. package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
  183. package/dist/api/presentation/annotate.d.ts +483 -0
  184. package/dist/api/presentation/annotate.d.ts.map +1 -0
  185. package/dist/api/presentation/diagrams.d.ts +184 -0
  186. package/dist/api/presentation/diagrams.d.ts.map +1 -0
  187. package/dist/api/presentation/drawings.d.ts +2900 -0
  188. package/dist/api/presentation/drawings.d.ts.map +1 -0
  189. package/dist/api/presentation/export.d.ts +126 -0
  190. package/dist/api/presentation/export.d.ts.map +1 -0
  191. package/dist/api/presentation/import.d.ts +164 -0
  192. package/dist/api/presentation/import.d.ts.map +1 -0
  193. package/dist/api/presentation/index.d.ts +114 -0
  194. package/dist/api/presentation/index.d.ts.map +1 -0
  195. package/dist/api/presentation/placedViews.d.ts +1232 -0
  196. package/dist/api/presentation/placedViews.d.ts.map +1 -0
  197. package/dist/api/presentation/shapes.d.ts +481 -0
  198. package/dist/api/presentation/shapes.d.ts.map +1 -0
  199. package/dist/api/presentation/sheets.d.ts +643 -0
  200. package/dist/api/presentation/sheets.d.ts.map +1 -0
  201. package/dist/api/presentation/slideshow.d.ts +125 -0
  202. package/dist/api/presentation/slideshow.d.ts.map +1 -0
  203. package/dist/api/presentation/tables.d.ts +81 -0
  204. package/dist/api/presentation/tables.d.ts.map +1 -0
  205. package/dist/api/presentation/viewPresets.d.ts +70 -0
  206. package/dist/api/presentation/viewPresets.d.ts.map +1 -0
  207. package/dist/api/presentation/views.d.ts +741 -0
  208. package/dist/api/presentation/views.d.ts.map +1 -0
  209. package/dist/api/program/adjacency.d.ts +155 -0
  210. package/dist/api/program/adjacency.d.ts.map +1 -0
  211. package/dist/api/program/areas.d.ts +450 -0
  212. package/dist/api/program/areas.d.ts.map +1 -0
  213. package/dist/api/program/classification.d.ts +135 -0
  214. package/dist/api/program/classification.d.ts.map +1 -0
  215. package/dist/api/program/cores.d.ts +78 -0
  216. package/dist/api/program/cores.d.ts.map +1 -0
  217. package/dist/api/program/departments.d.ts +487 -0
  218. package/dist/api/program/departments.d.ts.map +1 -0
  219. package/dist/api/program/index.d.ts +71 -0
  220. package/dist/api/program/index.d.ts.map +1 -0
  221. package/dist/api/program/labels.d.ts +355 -0
  222. package/dist/api/program/labels.d.ts.map +1 -0
  223. package/dist/api/program/layout.d.ts +398 -0
  224. package/dist/api/program/layout.d.ts.map +1 -0
  225. package/dist/api/program/metadata.d.ts +328 -0
  226. package/dist/api/program/metadata.d.ts.map +1 -0
  227. package/dist/api/program/metrics.d.ts +108 -0
  228. package/dist/api/program/metrics.d.ts.map +1 -0
  229. package/dist/api/program/site.d.ts +823 -0
  230. package/dist/api/program/site.d.ts.map +1 -0
  231. package/dist/api/program/spreadsheet.d.ts +2628 -0
  232. package/dist/api/program/spreadsheet.d.ts.map +1 -0
  233. package/dist/api/workspace/index.d.ts +552 -0
  234. package/dist/api/workspace/index.d.ts.map +1 -0
  235. package/dist/errors/codes.d.ts +34 -0
  236. package/dist/errors/codes.d.ts.map +1 -0
  237. package/dist/errors/envelope.d.ts +56 -0
  238. package/dist/errors/envelope.d.ts.map +1 -0
  239. package/dist/errors/index.d.ts +6 -0
  240. package/dist/errors/index.d.ts.map +1 -0
  241. package/dist/errors/plugin-error.d.ts +69 -0
  242. package/dist/errors/plugin-error.d.ts.map +1 -0
  243. package/dist/handles.d.ts +229 -0
  244. package/dist/handles.d.ts.map +1 -0
  245. package/dist/host-utils.d.ts +47 -0
  246. package/dist/host-utils.d.ts.map +1 -0
  247. package/dist/index.cjs +8836 -0
  248. package/dist/index.cjs.map +1 -0
  249. package/dist/index.d.ts +6 -0
  250. package/dist/index.d.ts.map +1 -0
  251. package/dist/index.js +7568 -0
  252. package/dist/index.js.map +1 -0
  253. package/dist/types.d.ts +16 -0
  254. package/dist/types.d.ts.map +1 -0
  255. package/package.json +41 -0
  256. package/scripts/generate-manifest.mjs +238 -0
  257. package/scripts/generate-manifest.test.mjs +292 -0
  258. package/src/api/analysis/daylight.ts +470 -0
  259. package/src/api/analysis/heatmaps.ts +683 -0
  260. package/src/api/analysis/illuminance.ts +155 -0
  261. package/src/api/analysis/index.ts +61 -0
  262. package/src/api/analysis/shadows.ts +183 -0
  263. package/src/api/analysis/solar.ts +237 -0
  264. package/src/api/analysis/sunlightHours.ts +211 -0
  265. package/src/api/analysis/sunpath.ts +83 -0
  266. package/src/api/analysis/weather.ts +179 -0
  267. package/src/api/core/buildings.ts +485 -0
  268. package/src/api/core/camera/index.ts +268 -0
  269. package/src/api/core/comment/index.ts +376 -0
  270. package/src/api/core/geom/create/index.ts +1204 -0
  271. package/src/api/core/geom/delete/index.ts +84 -0
  272. package/src/api/core/geom/index.ts +35 -0
  273. package/src/api/core/geom/query/arc.ts +169 -0
  274. package/src/api/core/geom/query/brep.ts +563 -0
  275. package/src/api/core/geom/query/circle.ts +404 -0
  276. package/src/api/core/geom/query/contour.ts +540 -0
  277. package/src/api/core/geom/query/curve.ts +1078 -0
  278. package/src/api/core/geom/query/edge.ts +130 -0
  279. package/src/api/core/geom/query/face.ts +403 -0
  280. package/src/api/core/geom/query/halfedge.ts +210 -0
  281. package/src/api/core/geom/query/index.ts +63 -0
  282. package/src/api/core/geom/query/profile.ts +473 -0
  283. package/src/api/core/geom/query/vertex.ts +205 -0
  284. package/src/api/core/geom/update/contour.ts +315 -0
  285. package/src/api/core/geom/update/curve.ts +209 -0
  286. package/src/api/core/geom/update/index.ts +29 -0
  287. package/src/api/core/geom/update/profile.ts +377 -0
  288. package/src/api/core/groups.ts +521 -0
  289. package/src/api/core/handles/index.ts +233 -0
  290. package/src/api/core/history/index.ts +84 -0
  291. package/src/api/core/index.ts +99 -0
  292. package/src/api/core/io/export/index.ts +126 -0
  293. package/src/api/core/io/import/index.ts +504 -0
  294. package/src/api/core/io/index.ts +42 -0
  295. package/src/api/core/io/job/index.ts +140 -0
  296. package/src/api/core/io/query/index.ts +71 -0
  297. package/src/api/core/io/terrain/index.ts +360 -0
  298. package/src/api/core/io/underlay/index.ts +705 -0
  299. package/src/api/core/layers.ts +333 -0
  300. package/src/api/core/math/index.ts +20 -0
  301. package/src/api/core/math/quat.ts +172 -0
  302. package/src/api/core/math/vec3.ts +179 -0
  303. package/src/api/core/mode/index.ts +108 -0
  304. package/src/api/core/project/index.ts +479 -0
  305. package/src/api/core/proposals/index.ts +569 -0
  306. package/src/api/core/storeys/index.ts +294 -0
  307. package/src/api/core/tags.ts +911 -0
  308. package/src/api/core/units/index.ts +164 -0
  309. package/src/api/core/user.ts +46 -0
  310. package/src/api/core/zoom/index.ts +51 -0
  311. package/src/api/design/boolean/index.ts +179 -0
  312. package/src/api/design/create/bulk-items.ts +186 -0
  313. package/src/api/design/create/grids.ts +137 -0
  314. package/src/api/design/create/index.ts +1954 -0
  315. package/src/api/design/create/opening-fields.ts +37 -0
  316. package/src/api/design/delete/index.ts +74 -0
  317. package/src/api/design/dimensions.ts +453 -0
  318. package/src/api/design/doors/index.ts +500 -0
  319. package/src/api/design/edit/index.ts +54 -0
  320. package/src/api/design/erase/index.ts +151 -0
  321. package/src/api/design/family.ts +646 -0
  322. package/src/api/design/furniture/index.ts +319 -0
  323. package/src/api/design/grids.ts +237 -0
  324. package/src/api/design/index.ts +274 -0
  325. package/src/api/design/lock.ts +69 -0
  326. package/src/api/design/materials/index.ts +608 -0
  327. package/src/api/design/query/geometry/index.ts +288 -0
  328. package/src/api/design/query/grids.ts +197 -0
  329. package/src/api/design/query/index.ts +1176 -0
  330. package/src/api/design/query/referenceLines.ts +52 -0
  331. package/src/api/design/query/spaces.ts +275 -0
  332. package/src/api/design/selection/index.ts +273 -0
  333. package/src/api/design/shared.ts +40 -0
  334. package/src/api/design/transform/index.ts +254 -0
  335. package/src/api/design/types/index.ts +156 -0
  336. package/src/api/design/update/index.ts +798 -0
  337. package/src/api/design/visibility.ts +143 -0
  338. package/src/api/design/windows/index.ts +333 -0
  339. package/src/api/entity/buildableEnvelope.ts +322 -0
  340. package/src/api/entity/department.ts +0 -0
  341. package/src/api/entity/index.ts +30 -0
  342. package/src/api/entity/referenceLine.ts +235 -0
  343. package/src/api/entity/space.ts +612 -0
  344. package/src/api/entity/story.ts +517 -0
  345. package/src/api/index.ts +47 -0
  346. package/src/api/presentation/aiInspiration.ts +1116 -0
  347. package/src/api/presentation/annotate.ts +417 -0
  348. package/src/api/presentation/diagrams.ts +194 -0
  349. package/src/api/presentation/drawings.ts +529 -0
  350. package/src/api/presentation/export.ts +133 -0
  351. package/src/api/presentation/import.ts +159 -0
  352. package/src/api/presentation/index.ts +129 -0
  353. package/src/api/presentation/placedViews.ts +1203 -0
  354. package/src/api/presentation/shapes.ts +274 -0
  355. package/src/api/presentation/sheets.ts +616 -0
  356. package/src/api/presentation/slideshow.ts +134 -0
  357. package/src/api/presentation/tables.ts +84 -0
  358. package/src/api/presentation/viewPresets.ts +83 -0
  359. package/src/api/presentation/views.ts +698 -0
  360. package/src/api/program/adjacency.ts +164 -0
  361. package/src/api/program/areas.ts +408 -0
  362. package/src/api/program/classification.ts +138 -0
  363. package/src/api/program/cores.ts +83 -0
  364. package/src/api/program/departments.ts +517 -0
  365. package/src/api/program/index.ts +73 -0
  366. package/src/api/program/labels.ts +332 -0
  367. package/src/api/program/layout.ts +422 -0
  368. package/src/api/program/metadata.ts +364 -0
  369. package/src/api/program/metrics.ts +120 -0
  370. package/src/api/program/site.ts +748 -0
  371. package/src/api/program/spreadsheet.ts +2698 -0
  372. package/src/api/workspace/index.ts +612 -0
  373. package/src/errors/codes.ts +136 -0
  374. package/src/errors/envelope.ts +75 -0
  375. package/src/errors/index.ts +21 -0
  376. package/src/errors/plugin-error.ts +134 -0
  377. package/src/handles.ts +282 -0
  378. package/src/host-utils.ts +68 -0
  379. package/src/index.ts +5 -0
  380. package/src/types.ts +16 -0
  381. package/test/errors.test.mjs +184 -0
  382. package/tsconfig.json +22 -0
  383. package/tsup.config.ts +12 -0
@@ -0,0 +1,860 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ import { ComponentHandle } from "../../handles";
4
+ /**
5
+ * Tags — read and edit the tag catalog and its assignments.
6
+ *
7
+ * A **tag** is a colored label that lives in a **category**; a space carries at
8
+ * most one tag per category. This namespace is the catalog + assignment surface:
9
+ * the categories and tags themselves, which components carry which tags, and the
10
+ * assign/unassign operations. Tags attach to **Mass and Floor spaces only**.
11
+ *
12
+ * **Reserved sentinels.** The built-in **`DEPARTMENT`** category is owned by the
13
+ * program layer — it and the tags inside it are read-only here; create/update/
14
+ * delete reject it and direct you to {@linkcode PluginProgramApi}`.departments`.
15
+ * Every category also has a built-in **`DEFAULT`** tag that cannot be deleted;
16
+ * unassigning resets a component's category slot back to `DEFAULT` (a component
17
+ * is never left with a blank slot).
18
+ *
19
+ * Reads return plain records and never throw for a miss (`get*` return `null`,
20
+ * `list*` return `[]`). Ids are stable public strings.
21
+ *
22
+ * Sub-namespace members typed as optional (`?`) are **authored ahead of the
23
+ * host** — declared so plugins and codegen can see the shape, but kept out of the
24
+ * discovery manifest until the host lands them (at which point they are promoted
25
+ * to required `abstract` members).
26
+ *
27
+ * Accessed via `snaptrude.core.tags`.
28
+ */
29
+ export declare abstract class PluginCoreTagsApi {
30
+ constructor();
31
+ /**
32
+ * List the tag categories.
33
+ *
34
+ * @returns A {@linkcode PluginCoreTagsListCategoriesResult} with a `categories`
35
+ * array (empty when there are none), including the reserved `DEPARTMENT`
36
+ * category.
37
+ *
38
+ * @examplePrompt List all the tag categories
39
+ * @examplePrompt What tag categories do I have?
40
+ * @examplePrompt Show every category and its tags
41
+ *
42
+ * # Example
43
+ * ```ts
44
+ * const { categories } = await snaptrude.core.tags.listCategories()
45
+ * for (const c of categories) console.log(c.name, c.tagIds.length)
46
+ * ```
47
+ */
48
+ abstract listCategories(): PluginApiReturn<PluginCoreTagsListCategoriesResult>;
49
+ /**
50
+ * Get a single tag category by id.
51
+ *
52
+ * @param categoryId - The id of the category to read.
53
+ * @returns The matching {@linkcode PluginCoreTagCategory}, or `null` if no
54
+ * category has that id.
55
+ *
56
+ * @examplePrompt Get the tag category with id cat_3
57
+ * @examplePrompt Look up a category by its id
58
+ * @examplePrompt Which tags are in this category?
59
+ *
60
+ * # Example
61
+ * ```ts
62
+ * const category = await snaptrude.core.tags.getCategory("cat_3")
63
+ * if (category) console.log(category.name, category.tagIds)
64
+ * ```
65
+ */
66
+ abstract getCategory(categoryId: string): PluginApiReturn<PluginCoreTagsGetCategoryResult>;
67
+ /**
68
+ * List tags, optionally within one category.
69
+ *
70
+ * @param categoryId - Optional category filter; omit to list every tag.
71
+ * @returns A {@linkcode PluginCoreTagsListResult} with a `tags` array (empty
72
+ * when there are none).
73
+ *
74
+ * @examplePrompt List every tag in the project
75
+ * @examplePrompt Show the tags in category cat_3
76
+ * @examplePrompt What tags are available?
77
+ *
78
+ * # Example
79
+ * ```ts
80
+ * const { tags } = await snaptrude.core.tags.list("cat_3")
81
+ * for (const t of tags) console.log(t.name, t.color)
82
+ * ```
83
+ */
84
+ abstract list(categoryId?: string): PluginApiReturn<PluginCoreTagsListResult>;
85
+ /**
86
+ * Get a single tag by id.
87
+ *
88
+ * @param tagId - The id of the tag to read.
89
+ * @returns The matching {@linkcode PluginCoreTag}, or `null` if no tag has that
90
+ * id.
91
+ *
92
+ * @examplePrompt Get the tag with id tag_9
93
+ * @examplePrompt Look up a single tag by its id
94
+ * @examplePrompt What color is this tag?
95
+ *
96
+ * # Example
97
+ * ```ts
98
+ * const tag = await snaptrude.core.tags.get("tag_9")
99
+ * if (tag) console.log(tag.name, tag.color)
100
+ * ```
101
+ */
102
+ abstract get(tagId: string): PluginApiReturn<PluginCoreTagsGetResult>;
103
+ /**
104
+ * List the tags carried by a component.
105
+ *
106
+ * Returns one entry per category the component is tagged in, each carrying the
107
+ * category and tag names and the tag color.
108
+ *
109
+ * @param componentId - The `Component.id` to read.
110
+ * @returns A {@linkcode PluginCoreTagsGetTagsForComponentResult} with a `tags`
111
+ * array (empty when the component has none or does not exist).
112
+ *
113
+ * @examplePrompt What tags does this space have?
114
+ * @examplePrompt List the tags on component cmp_42
115
+ * @examplePrompt Show the labels applied to this room
116
+ *
117
+ * # Example
118
+ * ```ts
119
+ * const { tags } = await snaptrude.core.tags.getTagsForComponent("cmp_42")
120
+ * for (const t of tags) console.log(t.categoryName, t.tagName)
121
+ * ```
122
+ *
123
+ * @deprecated Use `core.tags.listForComponent`
124
+ */
125
+ abstract getTagsForComponent(componentId: ComponentHandle): PluginApiReturn<PluginCoreTagsGetTagsForComponentResult>;
126
+ /**
127
+ * List the tags carried by a component.
128
+ *
129
+ * Returns one entry per category the component is tagged in, each carrying the
130
+ * category and tag names and the tag color. Canonical home of the read formerly
131
+ * at `getTagsForComponent` (now deprecated).
132
+ *
133
+ * @param componentId - The `Component.id` to read.
134
+ * @returns A {@linkcode PluginCoreTagsGetTagsForComponentResult} with a `tags`
135
+ * array (empty when the component has none or does not exist).
136
+ *
137
+ * @examplePrompt What tags does this space have?
138
+ * @examplePrompt List the tags on component cmp_42
139
+ * @examplePrompt Show the labels applied to this room
140
+ *
141
+ * # Example
142
+ * ```ts
143
+ * const { tags } = await snaptrude.core.tags.listForComponent("cmp_42")
144
+ * for (const t of tags) console.log(t.categoryName, t.tagName)
145
+ * ```
146
+ */
147
+ abstract listForComponent(componentId: ComponentHandle): PluginApiReturn<PluginCoreTagsGetTagsForComponentResult>;
148
+ /**
149
+ * List the tags carried by many components in one call.
150
+ *
151
+ * The plural of {@linkcode PluginCoreTagsApi.listForComponent}: pass
152
+ * `componentIds` to read specific components (unknown ids are skipped), or
153
+ * omit it to read **every** taggable component (Mass/Floor space) in the
154
+ * project. Each entry carries the component id and its tags — one per tagged
155
+ * category, with the tag's `color` — so a plugin can color every space by a
156
+ * chosen category's tag in a single round-trip.
157
+ *
158
+ * @param componentIds - Optional `Component.id`s to read; omit for all spaces.
159
+ * @returns A {@linkcode PluginCoreTagsListForComponentsResult} with a
160
+ * `components` array, one entry per component (in input order when
161
+ * `componentIds` is given).
162
+ *
163
+ * @performance One round-trip for any number of components — use this instead of a `listForComponent` loop.
164
+ *
165
+ * @examplePrompt Get the tags of every space with their colors
166
+ * @examplePrompt List the tags on all rooms so I can color them by Occupancy
167
+ * @examplePrompt Which tag does each selected space carry?
168
+ *
169
+ * # Example
170
+ * ```ts
171
+ * const { components } = await snaptrude.core.tags.listForComponents()
172
+ * for (const c of components) {
173
+ * const occupancy = c.tags.find((t) => t.categoryName === "Occupancy")
174
+ * if (occupancy) paint(c.componentId, occupancy.color)
175
+ * }
176
+ * ```
177
+ */
178
+ abstract listForComponents(componentIds?: ComponentHandle[]): PluginApiReturn<PluginCoreTagsListForComponentsResult>;
179
+ /**
180
+ * List the components carrying a given tag or category.
181
+ *
182
+ * Provide **exactly one** of `tagId` (components with that specific tag) or
183
+ * `categoryId` (components carrying any non-default tag in that category). With
184
+ * `categoryId`, pass `untagged: true` to instead return the components that have
185
+ * **no** non-default tag in that category. `untagged` is valid only alongside
186
+ * `categoryId`.
187
+ *
188
+ * @param filter - A {@linkcode PluginCoreTagsListComponentsArgs} filter with
189
+ * exactly one of `tagId`, `categoryId`, plus optional `untagged` (with
190
+ * `categoryId`).
191
+ * @returns A {@linkcode PluginCoreTagsListComponentsResult} with a
192
+ * `componentIds` array (empty when none match).
193
+ *
194
+ * @examplePrompt Which spaces have the tag tag_9?
195
+ * @examplePrompt List every component tagged in category cat_3
196
+ * @examplePrompt Which spaces are untagged in the Occupancy category?
197
+ *
198
+ * # Example
199
+ * ```ts
200
+ * const { componentIds } = await snaptrude.core.tags.listComponents({ tagId: "tag_9" })
201
+ * console.log(`${componentIds.length} components`)
202
+ * ```
203
+ */
204
+ abstract listComponents(filter: {
205
+ tagId?: string;
206
+ categoryId?: string;
207
+ untagged?: boolean;
208
+ }): PluginApiReturn<PluginCoreTagsListComponentsResult>;
209
+ /**
210
+ * Create a new tag category.
211
+ *
212
+ * @param name - Display name of the new category.
213
+ * @returns The new {@linkcode PluginCoreTagCategory}.
214
+ * @throws If the name collides with the reserved `DEPARTMENT` category, or the
215
+ * category could not be created.
216
+ *
217
+ * @examplePrompt Create a tag category called Fire Rating
218
+ * @examplePrompt Add a new category named Zone
219
+ * @examplePrompt Make a category for occupancy type
220
+ *
221
+ * # Example
222
+ * ```ts
223
+ * const category = await snaptrude.core.tags.createCategory("Fire Rating")
224
+ * ```
225
+ */
226
+ abstract createCategory(name: string): PluginApiReturn<PluginCoreTagsCreateCategoryResult>;
227
+ /**
228
+ * Rename a tag category.
229
+ *
230
+ * @param categoryId - The id of the category to rename.
231
+ * @param name - The category's new display name.
232
+ * @returns The updated {@linkcode PluginCoreTagCategory}.
233
+ * @throws If no category has the given id, or it is the reserved `DEPARTMENT`
234
+ * category.
235
+ *
236
+ * @examplePrompt Rename category cat_3 to Occupancy
237
+ * @examplePrompt Change the name of this tag category
238
+ * @examplePrompt Update the Zone category's name
239
+ *
240
+ * # Example
241
+ * ```ts
242
+ * const category = await snaptrude.core.tags.updateCategory("cat_3", "Occupancy")
243
+ * ```
244
+ */
245
+ abstract updateCategory(categoryId: string, name: string): PluginApiReturn<PluginCoreTagsUpdateCategoryResult>;
246
+ /**
247
+ * Delete a tag category and all its tags.
248
+ *
249
+ * **Non-undoable.** Every component tagged in this category is reset to the
250
+ * category's `DEFAULT`; the result reports how many tags were removed and how
251
+ * many components were reset.
252
+ *
253
+ * @param categoryId - The id of the category to delete.
254
+ * @returns The impact counts (`deletedTagCount`, `resetComponentCount`).
255
+ * @throws If no category has the given id, or it is the reserved `DEPARTMENT`
256
+ * category.
257
+ *
258
+ * @examplePrompt Delete the Zone tag category
259
+ * @examplePrompt Remove category cat_3 and all its tags
260
+ * @examplePrompt Delete this category
261
+ *
262
+ * # Example
263
+ * ```ts
264
+ * const { deletedTagCount } = await snaptrude.core.tags.deleteCategory("cat_3")
265
+ * ```
266
+ */
267
+ abstract deleteCategory(categoryId: string): PluginApiReturn<PluginCoreTagsDeleteCategoryResult>;
268
+ /**
269
+ * Create a new tag in a category.
270
+ *
271
+ * @param categoryId - The category the new tag belongs to.
272
+ * @param name - Display name of the new tag.
273
+ * @param color - Optional CSS hex color string (auto-assigned if omitted).
274
+ * @returns The new {@linkcode PluginCoreTag}.
275
+ * @throws If no category has the given id, or it is the reserved `DEPARTMENT`
276
+ * category.
277
+ *
278
+ * @examplePrompt Add a tag called 2-hour to the Fire Rating category
279
+ * @examplePrompt Create a red High Priority tag in category cat_3
280
+ * @examplePrompt Make a new tag named Retail
281
+ *
282
+ * # Example
283
+ * ```ts
284
+ * const tag = await snaptrude.core.tags.create("cat_3", "Retail", "#b5e1dc")
285
+ * ```
286
+ */
287
+ abstract create(categoryId: string, name: string, color?: string): PluginApiReturn<PluginCoreTagsCreateResult>;
288
+ /**
289
+ * Update a tag's name and/or color.
290
+ *
291
+ * A **sparse** update: omitted fields are left unchanged.
292
+ *
293
+ * @param tagId - The id of the tag to update.
294
+ * @param options - Any of `name`, `color`; omitted fields are left unchanged.
295
+ * @returns The updated {@linkcode PluginCoreTag}.
296
+ * @throws If no tag has the given id, or it belongs to the reserved
297
+ * `DEPARTMENT` category.
298
+ *
299
+ * @examplePrompt Rename tag tag_9 to Retail
300
+ * @examplePrompt Change this tag's color to #ff8800
301
+ * @examplePrompt Recolor the High Priority tag
302
+ *
303
+ * # Example
304
+ * ```ts
305
+ * const tag = await snaptrude.core.tags.update("tag_9", { name: "Retail" })
306
+ * ```
307
+ */
308
+ abstract update(tagId: string, options?: {
309
+ name?: string;
310
+ color?: string;
311
+ }): PluginApiReturn<PluginCoreTagsUpdateResult>;
312
+ /**
313
+ * Delete a tag.
314
+ *
315
+ * **Non-undoable.** Every component carrying this tag is reset to its
316
+ * category's `DEFAULT`; the result reports how many components were reset. The
317
+ * built-in `DEFAULT` tag of a category cannot be deleted.
318
+ *
319
+ * @param tagId - The id of the tag to delete.
320
+ * @returns The impact count (`resetComponentCount`).
321
+ * @throws If no tag has the given id, it is a `DEFAULT` tag, or it belongs to
322
+ * the reserved `DEPARTMENT` category.
323
+ *
324
+ * @examplePrompt Delete the Retail tag
325
+ * @examplePrompt Remove tag tag_9
326
+ * @examplePrompt Delete this label
327
+ *
328
+ * # Example
329
+ * ```ts
330
+ * const { resetComponentCount } = await snaptrude.core.tags.delete("tag_9")
331
+ * ```
332
+ */
333
+ abstract delete(tagId: string): PluginApiReturn<PluginCoreTagsDeleteResult>;
334
+ /**
335
+ * Assign a tag to components, creating the category and tag if needed.
336
+ *
337
+ * Resolves `tagName` within the category named `categoryName`: if the category
338
+ * or the tag does not exist yet it is created, otherwise the existing one is
339
+ * reused. The resolved tag is then applied to each taggable component (Mass/Floor
340
+ * spaces) — resolve-or-create and assign are **one atomic, undoable action**.
341
+ * Because a component carries one tag per category, this replaces any existing
342
+ * tag from that category. Components that are locked, not taggable, or not found
343
+ * are returned in `skipped` with a reason — never silently dropped. Rejects the
344
+ * reserved `DEPARTMENT` category.
345
+ *
346
+ * @param componentIds - The components to tag (at least one).
347
+ * @param categoryName - The tag category; created if it does not exist (not
348
+ * `DEPARTMENT`).
349
+ * @param tagName - The tag within the category; created if it does not exist,
350
+ * else reused.
351
+ * @returns A {@linkcode PluginCoreTagsAssignResult} — the resolved
352
+ * `categoryId`/`tagId`, whether each was created, and the `assigned`/`skipped`
353
+ * split.
354
+ * @throws If `categoryName` is the reserved `DEPARTMENT` category.
355
+ *
356
+ * @examplePrompt Tag the selected spaces as Retail in the Zone category
357
+ * @examplePrompt Tag these rooms High Priority, creating the tag if it doesn't exist
358
+ * @examplePrompt Put cmp_1 and cmp_2 in Zone / Retail
359
+ *
360
+ * # Example
361
+ * ```ts
362
+ * const { tagId, tagCreated, assigned } = await snaptrude.core.tags.assign(
363
+ * ["cmp_1", "cmp_2"],
364
+ * "Zone",
365
+ * "Retail",
366
+ * )
367
+ * ```
368
+ */
369
+ abstract assign(componentIds: ComponentHandle[], categoryName: string, tagName: string): PluginApiReturn<PluginCoreTagsAssignResult>;
370
+ /**
371
+ * Clear a category's tag from components.
372
+ *
373
+ * Resets each component's slot for the given category back to `DEFAULT` (a
374
+ * component always has a `DEFAULT` — the field is never blanked). Components
375
+ * that are locked, not taggable, or not found are returned in `skipped`.
376
+ *
377
+ * @param categoryId - The category slot to reset to default.
378
+ * @param componentIds - The components to clear (at least one).
379
+ * @returns A {@linkcode PluginCoreAssignOutcome} splitting `assigned` (reset to
380
+ * default) from `skipped`.
381
+ * @throws If no category has the given id.
382
+ *
383
+ * @examplePrompt Remove the Occupancy tag from the selected spaces
384
+ * @examplePrompt Clear category cat_3 on components cmp_1 and cmp_2
385
+ * @examplePrompt Untag these rooms in the Zone category
386
+ *
387
+ * # Example
388
+ * ```ts
389
+ * await snaptrude.core.tags.unassign("cat_3", ["cmp_1", "cmp_2"])
390
+ * ```
391
+ */
392
+ abstract unassign(categoryId: string, componentIds: ComponentHandle[]): PluginApiReturn<PluginCoreTagsUnassignResult>;
393
+ }
394
+ /**
395
+ * A tag category — a named slot that holds a set of mutually-exclusive tags.
396
+ *
397
+ * | Property | Type | Description |
398
+ * |---|---|---|
399
+ * | `id` | `string` | Stable public category id |
400
+ * | `name` | `string` | Display name |
401
+ * | `tagIds` | `string[]` | Ids of the tags in this category |
402
+ */
403
+ export declare const PluginCoreTagCategory: z.ZodObject<{
404
+ id: z.ZodString;
405
+ name: z.ZodString;
406
+ tagIds: z.ZodArray<z.ZodString>;
407
+ }, z.core.$strip>;
408
+ export type PluginCoreTagCategory = z.infer<typeof PluginCoreTagCategory>;
409
+ /**
410
+ * A tag — a colored label within a category.
411
+ *
412
+ * | Property | Type | Description |
413
+ * |---|---|---|
414
+ * | `id` | `string` | Stable public tag id |
415
+ * | `categoryId` | `string` | The id of the category this tag belongs to |
416
+ * | `name` | `string` | Display name |
417
+ * | `color` | `string` | CSS hex color string (e.g. `"#b5e1dc"`) |
418
+ */
419
+ export declare const PluginCoreTag: z.ZodObject<{
420
+ id: z.ZodString;
421
+ categoryId: z.ZodString;
422
+ name: z.ZodString;
423
+ color: z.ZodString;
424
+ }, z.core.$strip>;
425
+ export type PluginCoreTag = z.infer<typeof PluginCoreTag>;
426
+ /**
427
+ * A tag as carried by a component — the category and tag names resolved for
428
+ * display.
429
+ *
430
+ * | Property | Type | Description |
431
+ * |---|---|---|
432
+ * | `categoryId` | `string` | The category's id |
433
+ * | `categoryName` | `string` | The category's display name |
434
+ * | `tagId` | `string` | The tag's id |
435
+ * | `tagName` | `string` | The tag's display name |
436
+ * | `color` | `string` | The tag's CSS hex color string |
437
+ */
438
+ export declare const PluginCoreComponentTag: z.ZodObject<{
439
+ categoryId: z.ZodString;
440
+ categoryName: z.ZodString;
441
+ tagId: z.ZodString;
442
+ tagName: z.ZodString;
443
+ color: z.ZodString;
444
+ }, z.core.$strip>;
445
+ export type PluginCoreComponentTag = z.infer<typeof PluginCoreComponentTag>;
446
+ /**
447
+ * The outcome of an assign/unassign — which components changed and which were
448
+ * skipped (with a reason).
449
+ *
450
+ * | Property | Type | Description |
451
+ * |---|---|---|
452
+ * | `assigned` | `string[]` | Ids of the components that were changed |
453
+ * | `skipped` | `{ id: string; reason: "locked" \| "not-taggable" \| "not-found" }[]` | Components that were not changed, each with a reason |
454
+ */
455
+ export declare const PluginCoreAssignOutcome: z.ZodObject<{
456
+ assigned: z.ZodArray<z.ZodString>;
457
+ skipped: z.ZodArray<z.ZodObject<{
458
+ id: z.ZodString;
459
+ reason: z.ZodEnum<{
460
+ locked: "locked";
461
+ "not-taggable": "not-taggable";
462
+ "not-found": "not-found";
463
+ }>;
464
+ }, z.core.$strip>>;
465
+ }, z.core.$strip>;
466
+ export type PluginCoreAssignOutcome = z.infer<typeof PluginCoreAssignOutcome>;
467
+ /**
468
+ * Result of {@linkcode PluginCoreTagsApi.listCategories}.
469
+ *
470
+ * | Property | Type | Description |
471
+ * |---|---|---|
472
+ * | `categories` | {@linkcode PluginCoreTagCategory}`[]` | Every tag category (including the reserved `DEPARTMENT`) |
473
+ */
474
+ export declare const PluginCoreTagsListCategoriesResult: z.ZodObject<{
475
+ categories: z.ZodArray<z.ZodObject<{
476
+ id: z.ZodString;
477
+ name: z.ZodString;
478
+ tagIds: z.ZodArray<z.ZodString>;
479
+ }, z.core.$strip>>;
480
+ }, z.core.$strip>;
481
+ export type PluginCoreTagsListCategoriesResult = z.infer<typeof PluginCoreTagsListCategoriesResult>;
482
+ /**
483
+ * Arguments for {@linkcode PluginCoreTagsApi.getCategory}.
484
+ *
485
+ * | Property | Type | Description |
486
+ * |---|---|---|
487
+ * | `categoryId` | `string` | The id of the category to read |
488
+ */
489
+ export declare const PluginCoreTagsGetCategoryArgs: z.ZodObject<{
490
+ categoryId: z.ZodString;
491
+ }, z.core.$strip>;
492
+ export type PluginCoreTagsGetCategoryArgs = z.infer<typeof PluginCoreTagsGetCategoryArgs>;
493
+ /**
494
+ * Result of {@linkcode PluginCoreTagsApi.getCategory} — the category, or `null`
495
+ * when no category has the given id.
496
+ */
497
+ export declare const PluginCoreTagsGetCategoryResult: z.ZodNullable<z.ZodObject<{
498
+ id: z.ZodString;
499
+ name: z.ZodString;
500
+ tagIds: z.ZodArray<z.ZodString>;
501
+ }, z.core.$strip>>;
502
+ export type PluginCoreTagsGetCategoryResult = z.infer<typeof PluginCoreTagsGetCategoryResult>;
503
+ /**
504
+ * Arguments for {@linkcode PluginCoreTagsApi.list}.
505
+ *
506
+ * | Property | Type | Description |
507
+ * |---|---|---|
508
+ * | `categoryId` | `string \| undefined` | Optional category filter; omit to list every tag |
509
+ */
510
+ export declare const PluginCoreTagsListArgs: z.ZodObject<{
511
+ categoryId: z.ZodOptional<z.ZodString>;
512
+ }, z.core.$strip>;
513
+ export type PluginCoreTagsListArgs = z.infer<typeof PluginCoreTagsListArgs>;
514
+ /**
515
+ * Result of {@linkcode PluginCoreTagsApi.list}.
516
+ *
517
+ * | Property | Type | Description |
518
+ * |---|---|---|
519
+ * | `tags` | {@linkcode PluginCoreTag}`[]` | The matching tags (empty when none) |
520
+ */
521
+ export declare const PluginCoreTagsListResult: z.ZodObject<{
522
+ tags: z.ZodArray<z.ZodObject<{
523
+ id: z.ZodString;
524
+ categoryId: z.ZodString;
525
+ name: z.ZodString;
526
+ color: z.ZodString;
527
+ }, z.core.$strip>>;
528
+ }, z.core.$strip>;
529
+ export type PluginCoreTagsListResult = z.infer<typeof PluginCoreTagsListResult>;
530
+ /**
531
+ * Arguments for {@linkcode PluginCoreTagsApi.get}.
532
+ *
533
+ * | Property | Type | Description |
534
+ * |---|---|---|
535
+ * | `tagId` | `string` | The id of the tag to read |
536
+ */
537
+ export declare const PluginCoreTagsGetArgs: z.ZodObject<{
538
+ tagId: z.ZodString;
539
+ }, z.core.$strip>;
540
+ export type PluginCoreTagsGetArgs = z.infer<typeof PluginCoreTagsGetArgs>;
541
+ /**
542
+ * Result of {@linkcode PluginCoreTagsApi.get} — the tag, or `null` when no tag
543
+ * has the given id.
544
+ */
545
+ export declare const PluginCoreTagsGetResult: z.ZodNullable<z.ZodObject<{
546
+ id: z.ZodString;
547
+ categoryId: z.ZodString;
548
+ name: z.ZodString;
549
+ color: z.ZodString;
550
+ }, z.core.$strip>>;
551
+ export type PluginCoreTagsGetResult = z.infer<typeof PluginCoreTagsGetResult>;
552
+ /**
553
+ * Arguments for {@linkcode PluginCoreTagsApi.getTagsForComponent}.
554
+ *
555
+ * | Property | Type | Description |
556
+ * |---|---|---|
557
+ * | `componentId` | `ComponentHandle` | The `Component.id` to read |
558
+ */
559
+ export declare const PluginCoreTagsGetTagsForComponentArgs: z.ZodObject<{
560
+ componentId: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
561
+ }, z.core.$strip>;
562
+ export type PluginCoreTagsGetTagsForComponentArgs = z.infer<typeof PluginCoreTagsGetTagsForComponentArgs>;
563
+ /**
564
+ * Result of {@linkcode PluginCoreTagsApi.getTagsForComponent}.
565
+ *
566
+ * | Property | Type | Description |
567
+ * |---|---|---|
568
+ * | `tags` | {@linkcode PluginCoreComponentTag}`[]` | The component's tags, one per tagged category (empty when none) |
569
+ */
570
+ export declare const PluginCoreTagsGetTagsForComponentResult: z.ZodObject<{
571
+ tags: z.ZodArray<z.ZodObject<{
572
+ categoryId: z.ZodString;
573
+ categoryName: z.ZodString;
574
+ tagId: z.ZodString;
575
+ tagName: z.ZodString;
576
+ color: z.ZodString;
577
+ }, z.core.$strip>>;
578
+ }, z.core.$strip>;
579
+ export type PluginCoreTagsGetTagsForComponentResult = z.infer<typeof PluginCoreTagsGetTagsForComponentResult>;
580
+ /**
581
+ * Arguments for {@linkcode PluginCoreTagsApi.listForComponents}.
582
+ *
583
+ * | Property | Type | Description |
584
+ * |---|---|---|
585
+ * | `componentIds` | `ComponentHandle[]?` | Components to read; omit for every taggable component |
586
+ */
587
+ export declare const PluginCoreTagsListForComponentsArgs: z.ZodObject<{
588
+ componentIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>>;
589
+ }, z.core.$strip>;
590
+ export type PluginCoreTagsListForComponentsArgs = z.infer<typeof PluginCoreTagsListForComponentsArgs>;
591
+ /**
592
+ * One component's tags, for {@linkcode PluginCoreTagsApi.listForComponents}.
593
+ *
594
+ * | Property | Type | Description |
595
+ * |---|---|---|
596
+ * | `componentId` | `ComponentHandle` | The component's id |
597
+ * | `tags` | {@linkcode PluginCoreComponentTag}`[]` | Its tags, one per tagged category (empty when none) |
598
+ */
599
+ export declare const PluginCoreComponentTags: z.ZodObject<{
600
+ componentId: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
601
+ tags: z.ZodArray<z.ZodObject<{
602
+ categoryId: z.ZodString;
603
+ categoryName: z.ZodString;
604
+ tagId: z.ZodString;
605
+ tagName: z.ZodString;
606
+ color: z.ZodString;
607
+ }, z.core.$strip>>;
608
+ }, z.core.$strip>;
609
+ export type PluginCoreComponentTags = z.infer<typeof PluginCoreComponentTags>;
610
+ /**
611
+ * Result of {@linkcode PluginCoreTagsApi.listForComponents}.
612
+ *
613
+ * | Property | Type | Description |
614
+ * |---|---|---|
615
+ * | `components` | {@linkcode PluginCoreComponentTags}`[]` | One entry per component |
616
+ */
617
+ export declare const PluginCoreTagsListForComponentsResult: z.ZodObject<{
618
+ components: z.ZodArray<z.ZodObject<{
619
+ componentId: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
620
+ tags: z.ZodArray<z.ZodObject<{
621
+ categoryId: z.ZodString;
622
+ categoryName: z.ZodString;
623
+ tagId: z.ZodString;
624
+ tagName: z.ZodString;
625
+ color: z.ZodString;
626
+ }, z.core.$strip>>;
627
+ }, z.core.$strip>>;
628
+ }, z.core.$strip>;
629
+ export type PluginCoreTagsListForComponentsResult = z.infer<typeof PluginCoreTagsListForComponentsResult>;
630
+ /**
631
+ * Arguments for {@linkcode PluginCoreTagsApi.listComponents}. Provide exactly one
632
+ * of `tagId`, `categoryId`. `untagged` is valid only with `categoryId`.
633
+ *
634
+ * | Property | Type | Description |
635
+ * |---|---|---|
636
+ * | `tagId` | `string \| undefined` | Components carrying this specific tag |
637
+ * | `categoryId` | `string \| undefined` | Components carrying any non-default tag in this category |
638
+ * | `untagged` | `boolean \| undefined` | With `categoryId`, return components with **no** non-default tag in that category instead |
639
+ */
640
+ export declare const PluginCoreTagsListComponentsArgs: z.ZodObject<{
641
+ tagId: z.ZodOptional<z.ZodString>;
642
+ categoryId: z.ZodOptional<z.ZodString>;
643
+ untagged: z.ZodOptional<z.ZodBoolean>;
644
+ }, z.core.$strip>;
645
+ export type PluginCoreTagsListComponentsArgs = z.infer<typeof PluginCoreTagsListComponentsArgs>;
646
+ /**
647
+ * Result of {@linkcode PluginCoreTagsApi.listComponents}.
648
+ *
649
+ * | Property | Type | Description |
650
+ * |---|---|---|
651
+ * | `componentIds` | `ComponentHandle[]` | Ids of the matching components (empty when none) |
652
+ */
653
+ export declare const PluginCoreTagsListComponentsResult: z.ZodObject<{
654
+ componentIds: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
655
+ }, z.core.$strip>;
656
+ export type PluginCoreTagsListComponentsResult = z.infer<typeof PluginCoreTagsListComponentsResult>;
657
+ /**
658
+ * Arguments for {@linkcode PluginCoreTagsApi.createCategory}.
659
+ *
660
+ * | Property | Type | Description |
661
+ * |---|---|---|
662
+ * | `name` | `string` | Display name of the new category |
663
+ */
664
+ export declare const PluginCoreTagsCreateCategoryArgs: z.ZodObject<{
665
+ name: z.ZodString;
666
+ }, z.core.$strip>;
667
+ export type PluginCoreTagsCreateCategoryArgs = z.infer<typeof PluginCoreTagsCreateCategoryArgs>;
668
+ /** Result of {@linkcode PluginCoreTagsApi.createCategory} — the new category. */
669
+ export declare const PluginCoreTagsCreateCategoryResult: z.ZodObject<{
670
+ id: z.ZodString;
671
+ name: z.ZodString;
672
+ tagIds: z.ZodArray<z.ZodString>;
673
+ }, z.core.$strip>;
674
+ export type PluginCoreTagsCreateCategoryResult = z.infer<typeof PluginCoreTagsCreateCategoryResult>;
675
+ /**
676
+ * Arguments for {@linkcode PluginCoreTagsApi.updateCategory}.
677
+ *
678
+ * | Property | Type | Description |
679
+ * |---|---|---|
680
+ * | `categoryId` | `string` | The id of the category to rename |
681
+ * | `name` | `string` | The category's new display name |
682
+ */
683
+ export declare const PluginCoreTagsUpdateCategoryArgs: z.ZodObject<{
684
+ categoryId: z.ZodString;
685
+ name: z.ZodString;
686
+ }, z.core.$strip>;
687
+ export type PluginCoreTagsUpdateCategoryArgs = z.infer<typeof PluginCoreTagsUpdateCategoryArgs>;
688
+ /** Result of {@linkcode PluginCoreTagsApi.updateCategory} — the updated category. */
689
+ export declare const PluginCoreTagsUpdateCategoryResult: z.ZodObject<{
690
+ id: z.ZodString;
691
+ name: z.ZodString;
692
+ tagIds: z.ZodArray<z.ZodString>;
693
+ }, z.core.$strip>;
694
+ export type PluginCoreTagsUpdateCategoryResult = z.infer<typeof PluginCoreTagsUpdateCategoryResult>;
695
+ /**
696
+ * Arguments for {@linkcode PluginCoreTagsApi.deleteCategory}.
697
+ *
698
+ * | Property | Type | Description |
699
+ * |---|---|---|
700
+ * | `categoryId` | `string` | The id of the category to delete |
701
+ */
702
+ export declare const PluginCoreTagsDeleteCategoryArgs: z.ZodObject<{
703
+ categoryId: z.ZodString;
704
+ }, z.core.$strip>;
705
+ export type PluginCoreTagsDeleteCategoryArgs = z.infer<typeof PluginCoreTagsDeleteCategoryArgs>;
706
+ /**
707
+ * Result of {@linkcode PluginCoreTagsApi.deleteCategory} — the impact of the
708
+ * (non-undoable) delete.
709
+ *
710
+ * | Property | Type | Description |
711
+ * |---|---|---|
712
+ * | `deletedTagCount` | `number` | Number of tags removed with the category |
713
+ * | `resetComponentCount` | `number` | Number of components reset to their default |
714
+ */
715
+ export declare const PluginCoreTagsDeleteCategoryResult: z.ZodObject<{
716
+ deletedTagCount: z.ZodNumber;
717
+ resetComponentCount: z.ZodNumber;
718
+ }, z.core.$strip>;
719
+ export type PluginCoreTagsDeleteCategoryResult = z.infer<typeof PluginCoreTagsDeleteCategoryResult>;
720
+ /**
721
+ * Arguments for {@linkcode PluginCoreTagsApi.create}.
722
+ *
723
+ * | Property | Type | Description |
724
+ * |---|---|---|
725
+ * | `categoryId` | `string` | The category the new tag belongs to |
726
+ * | `name` | `string` | Display name of the new tag |
727
+ * | `color` | `string \| undefined` | CSS hex color string (auto-assigned if omitted) |
728
+ */
729
+ export declare const PluginCoreTagsCreateArgs: z.ZodObject<{
730
+ categoryId: z.ZodString;
731
+ name: z.ZodString;
732
+ color: z.ZodOptional<z.ZodString>;
733
+ }, z.core.$strip>;
734
+ export type PluginCoreTagsCreateArgs = z.infer<typeof PluginCoreTagsCreateArgs>;
735
+ /** Result of {@linkcode PluginCoreTagsApi.create} — the new tag. */
736
+ export declare const PluginCoreTagsCreateResult: z.ZodObject<{
737
+ id: z.ZodString;
738
+ categoryId: z.ZodString;
739
+ name: z.ZodString;
740
+ color: z.ZodString;
741
+ }, z.core.$strip>;
742
+ export type PluginCoreTagsCreateResult = z.infer<typeof PluginCoreTagsCreateResult>;
743
+ /**
744
+ * Arguments for {@linkcode PluginCoreTagsApi.update}. Sparse — only the provided
745
+ * fields are changed.
746
+ *
747
+ * | Property | Type | Description |
748
+ * |---|---|---|
749
+ * | `tagId` | `string` | The id of the tag to update |
750
+ * | `name` | `string \| undefined` | New display name (unchanged if omitted) |
751
+ * | `color` | `string \| undefined` | New CSS hex color (unchanged if omitted) |
752
+ */
753
+ export declare const PluginCoreTagsUpdateArgs: z.ZodObject<{
754
+ tagId: z.ZodString;
755
+ name: z.ZodOptional<z.ZodString>;
756
+ color: z.ZodOptional<z.ZodString>;
757
+ }, z.core.$strip>;
758
+ export type PluginCoreTagsUpdateArgs = z.infer<typeof PluginCoreTagsUpdateArgs>;
759
+ /** Result of {@linkcode PluginCoreTagsApi.update} — the updated tag. */
760
+ export declare const PluginCoreTagsUpdateResult: z.ZodObject<{
761
+ id: z.ZodString;
762
+ categoryId: z.ZodString;
763
+ name: z.ZodString;
764
+ color: z.ZodString;
765
+ }, z.core.$strip>;
766
+ export type PluginCoreTagsUpdateResult = z.infer<typeof PluginCoreTagsUpdateResult>;
767
+ /**
768
+ * Arguments for {@linkcode PluginCoreTagsApi.delete}.
769
+ *
770
+ * | Property | Type | Description |
771
+ * |---|---|---|
772
+ * | `tagId` | `string` | The id of the tag to delete |
773
+ */
774
+ export declare const PluginCoreTagsDeleteArgs: z.ZodObject<{
775
+ tagId: z.ZodString;
776
+ }, z.core.$strip>;
777
+ export type PluginCoreTagsDeleteArgs = z.infer<typeof PluginCoreTagsDeleteArgs>;
778
+ /**
779
+ * Result of {@linkcode PluginCoreTagsApi.delete} — the impact of the
780
+ * (non-undoable) delete.
781
+ *
782
+ * | Property | Type | Description |
783
+ * |---|---|---|
784
+ * | `resetComponentCount` | `number` | Number of components reset to their category default |
785
+ */
786
+ export declare const PluginCoreTagsDeleteResult: z.ZodObject<{
787
+ resetComponentCount: z.ZodNumber;
788
+ }, z.core.$strip>;
789
+ export type PluginCoreTagsDeleteResult = z.infer<typeof PluginCoreTagsDeleteResult>;
790
+ /**
791
+ * Arguments for {@linkcode PluginCoreTagsApi.assign}.
792
+ *
793
+ * | Property | Type | Description |
794
+ * |---|---|---|
795
+ * | `componentIds` | `ComponentHandle[]` | The components to tag (at least one) |
796
+ * | `categoryName` | `string` | The tag category; created if it does not exist (not `DEPARTMENT`) |
797
+ * | `tagName` | `string` | The tag within the category; created if it does not exist, else reused |
798
+ */
799
+ export declare const PluginCoreTagsAssignArgs: z.ZodObject<{
800
+ componentIds: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
801
+ categoryName: z.ZodString;
802
+ tagName: z.ZodString;
803
+ }, z.core.$strip>;
804
+ export type PluginCoreTagsAssignArgs = z.infer<typeof PluginCoreTagsAssignArgs>;
805
+ /**
806
+ * Result of {@linkcode PluginCoreTagsApi.assign} — the resolved category/tag, what
807
+ * was created, and the assign outcome.
808
+ *
809
+ * | Property | Type | Description |
810
+ * |---|---|---|
811
+ * | `categoryId` | `string` | Id of the resolved (or newly created) category |
812
+ * | `tagId` | `string` | Id of the resolved (or newly created) tag |
813
+ * | `categoryCreated` | `boolean` | Whether the category was created by this call |
814
+ * | `tagCreated` | `boolean` | Whether the tag was created by this call |
815
+ * | `assigned` | `string[]` | Ids of the components that were tagged |
816
+ * | `skipped` | `{ id: string; reason: "locked" \| "not-taggable" \| "not-found" }[]` | Components not tagged, each with a reason |
817
+ */
818
+ export declare const PluginCoreTagsAssignResult: z.ZodObject<{
819
+ assigned: z.ZodArray<z.ZodString>;
820
+ skipped: z.ZodArray<z.ZodObject<{
821
+ id: z.ZodString;
822
+ reason: z.ZodEnum<{
823
+ locked: "locked";
824
+ "not-taggable": "not-taggable";
825
+ "not-found": "not-found";
826
+ }>;
827
+ }, z.core.$strip>>;
828
+ categoryId: z.ZodString;
829
+ tagId: z.ZodString;
830
+ categoryCreated: z.ZodBoolean;
831
+ tagCreated: z.ZodBoolean;
832
+ }, z.core.$strip>;
833
+ export type PluginCoreTagsAssignResult = z.infer<typeof PluginCoreTagsAssignResult>;
834
+ /**
835
+ * Arguments for {@linkcode PluginCoreTagsApi.unassign}.
836
+ *
837
+ * | Property | Type | Description |
838
+ * |---|---|---|
839
+ * | `categoryId` | `string` | The category slot to reset to default |
840
+ * | `componentIds` | `ComponentHandle[]` | The components to clear (at least one) |
841
+ */
842
+ export declare const PluginCoreTagsUnassignArgs: z.ZodObject<{
843
+ categoryId: z.ZodString;
844
+ componentIds: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
845
+ }, z.core.$strip>;
846
+ export type PluginCoreTagsUnassignArgs = z.infer<typeof PluginCoreTagsUnassignArgs>;
847
+ /** Result of {@linkcode PluginCoreTagsApi.unassign} — the unassign outcome. */
848
+ export declare const PluginCoreTagsUnassignResult: z.ZodObject<{
849
+ assigned: z.ZodArray<z.ZodString>;
850
+ skipped: z.ZodArray<z.ZodObject<{
851
+ id: z.ZodString;
852
+ reason: z.ZodEnum<{
853
+ locked: "locked";
854
+ "not-taggable": "not-taggable";
855
+ "not-found": "not-found";
856
+ }>;
857
+ }, z.core.$strip>>;
858
+ }, z.core.$strip>;
859
+ export type PluginCoreTagsUnassignResult = z.infer<typeof PluginCoreTagsUnassignResult>;
860
+ //# sourceMappingURL=tags.d.ts.map