@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.
- package/AGENTS.md +231 -0
- package/CHANGELOG.md +341 -0
- package/CLAUDE.md +11 -0
- package/api-manifest.json +9120 -0
- package/dist/api/analysis/daylight.d.ts +603 -0
- package/dist/api/analysis/daylight.d.ts.map +1 -0
- package/dist/api/analysis/heatmaps.d.ts +658 -0
- package/dist/api/analysis/heatmaps.d.ts.map +1 -0
- package/dist/api/analysis/illuminance.d.ts +145 -0
- package/dist/api/analysis/illuminance.d.ts.map +1 -0
- package/dist/api/analysis/index.d.ts +59 -0
- package/dist/api/analysis/index.d.ts.map +1 -0
- package/dist/api/analysis/shadows.d.ts +165 -0
- package/dist/api/analysis/shadows.d.ts.map +1 -0
- package/dist/api/analysis/solar.d.ts +249 -0
- package/dist/api/analysis/solar.d.ts.map +1 -0
- package/dist/api/analysis/sunlightHours.d.ts +208 -0
- package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
- package/dist/api/analysis/sunpath.d.ts +80 -0
- package/dist/api/analysis/sunpath.d.ts.map +1 -0
- package/dist/api/analysis/weather.d.ts +193 -0
- package/dist/api/analysis/weather.d.ts.map +1 -0
- package/dist/api/core/buildings.d.ts +427 -0
- package/dist/api/core/buildings.d.ts.map +1 -0
- package/dist/api/core/camera/index.d.ts +261 -0
- package/dist/api/core/camera/index.d.ts.map +1 -0
- package/dist/api/core/comment/index.d.ts +333 -0
- package/dist/api/core/comment/index.d.ts.map +1 -0
- package/dist/api/core/geom/create/index.d.ts +1073 -0
- package/dist/api/core/geom/create/index.d.ts.map +1 -0
- package/dist/api/core/geom/delete/index.d.ts +78 -0
- package/dist/api/core/geom/delete/index.d.ts.map +1 -0
- package/dist/api/core/geom/index.d.ts +33 -0
- package/dist/api/core/geom/index.d.ts.map +1 -0
- package/dist/api/core/geom/query/arc.d.ts +169 -0
- package/dist/api/core/geom/query/arc.d.ts.map +1 -0
- package/dist/api/core/geom/query/brep.d.ts +514 -0
- package/dist/api/core/geom/query/brep.d.ts.map +1 -0
- package/dist/api/core/geom/query/circle.d.ts +378 -0
- package/dist/api/core/geom/query/circle.d.ts.map +1 -0
- package/dist/api/core/geom/query/contour.d.ts +450 -0
- package/dist/api/core/geom/query/contour.d.ts.map +1 -0
- package/dist/api/core/geom/query/curve.d.ts +918 -0
- package/dist/api/core/geom/query/curve.d.ts.map +1 -0
- package/dist/api/core/geom/query/edge.d.ts +128 -0
- package/dist/api/core/geom/query/edge.d.ts.map +1 -0
- package/dist/api/core/geom/query/face.d.ts +363 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -0
- package/dist/api/core/geom/query/halfedge.d.ts +206 -0
- package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
- package/dist/api/core/geom/query/index.d.ts +61 -0
- package/dist/api/core/geom/query/index.d.ts.map +1 -0
- package/dist/api/core/geom/query/profile.d.ts +410 -0
- package/dist/api/core/geom/query/profile.d.ts.map +1 -0
- package/dist/api/core/geom/query/vertex.d.ts +187 -0
- package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
- package/dist/api/core/geom/update/contour.d.ts +272 -0
- package/dist/api/core/geom/update/contour.d.ts.map +1 -0
- package/dist/api/core/geom/update/curve.d.ts +180 -0
- package/dist/api/core/geom/update/curve.d.ts.map +1 -0
- package/dist/api/core/geom/update/index.d.ts +27 -0
- package/dist/api/core/geom/update/index.d.ts.map +1 -0
- package/dist/api/core/geom/update/profile.d.ts +329 -0
- package/dist/api/core/geom/update/profile.d.ts.map +1 -0
- package/dist/api/core/groups.d.ts +485 -0
- package/dist/api/core/groups.d.ts.map +1 -0
- package/dist/api/core/handles/index.d.ts +210 -0
- package/dist/api/core/handles/index.d.ts.map +1 -0
- package/dist/api/core/history/index.d.ts +78 -0
- package/dist/api/core/history/index.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +97 -0
- package/dist/api/core/index.d.ts.map +1 -0
- package/dist/api/core/io/export/index.d.ts +134 -0
- package/dist/api/core/io/export/index.d.ts.map +1 -0
- package/dist/api/core/io/import/index.d.ts +455 -0
- package/dist/api/core/io/import/index.d.ts.map +1 -0
- package/dist/api/core/io/index.d.ts +40 -0
- package/dist/api/core/io/index.d.ts.map +1 -0
- package/dist/api/core/io/job/index.d.ts +139 -0
- package/dist/api/core/io/job/index.d.ts.map +1 -0
- package/dist/api/core/io/query/index.d.ts +74 -0
- package/dist/api/core/io/query/index.d.ts.map +1 -0
- package/dist/api/core/io/terrain/index.d.ts +341 -0
- package/dist/api/core/io/terrain/index.d.ts.map +1 -0
- package/dist/api/core/io/underlay/index.d.ts +805 -0
- package/dist/api/core/io/underlay/index.d.ts.map +1 -0
- package/dist/api/core/layers.d.ts +402 -0
- package/dist/api/core/layers.d.ts.map +1 -0
- package/dist/api/core/math/index.d.ts +18 -0
- package/dist/api/core/math/index.d.ts.map +1 -0
- package/dist/api/core/math/quat.d.ts +170 -0
- package/dist/api/core/math/quat.d.ts.map +1 -0
- package/dist/api/core/math/vec3.d.ts +174 -0
- package/dist/api/core/math/vec3.d.ts.map +1 -0
- package/dist/api/core/mode/index.d.ts +111 -0
- package/dist/api/core/mode/index.d.ts.map +1 -0
- package/dist/api/core/project/index.d.ts +466 -0
- package/dist/api/core/project/index.d.ts.map +1 -0
- package/dist/api/core/proposals/index.d.ts +531 -0
- package/dist/api/core/proposals/index.d.ts.map +1 -0
- package/dist/api/core/storeys/index.d.ts +265 -0
- package/dist/api/core/storeys/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +860 -0
- package/dist/api/core/tags.d.ts.map +1 -0
- package/dist/api/core/units/index.d.ts +175 -0
- package/dist/api/core/units/index.d.ts.map +1 -0
- package/dist/api/core/user.d.ts +44 -0
- package/dist/api/core/user.d.ts.map +1 -0
- package/dist/api/core/zoom/index.d.ts +49 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +168 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -0
- package/dist/api/design/create/bulk-items.d.ts +185 -0
- package/dist/api/design/create/bulk-items.d.ts.map +1 -0
- package/dist/api/design/create/grids.d.ts +132 -0
- package/dist/api/design/create/grids.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +1747 -0
- package/dist/api/design/create/index.d.ts.map +1 -0
- package/dist/api/design/create/opening-fields.d.ts +37 -0
- package/dist/api/design/create/opening-fields.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +70 -0
- package/dist/api/design/delete/index.d.ts.map +1 -0
- package/dist/api/design/dimensions.d.ts +427 -0
- package/dist/api/design/dimensions.d.ts.map +1 -0
- package/dist/api/design/doors/index.d.ts +470 -0
- package/dist/api/design/doors/index.d.ts.map +1 -0
- package/dist/api/design/edit/index.d.ts +49 -0
- package/dist/api/design/edit/index.d.ts.map +1 -0
- package/dist/api/design/erase/index.d.ts +160 -0
- package/dist/api/design/erase/index.d.ts.map +1 -0
- package/dist/api/design/family.d.ts +611 -0
- package/dist/api/design/family.d.ts.map +1 -0
- package/dist/api/design/furniture/index.d.ts +296 -0
- package/dist/api/design/furniture/index.d.ts.map +1 -0
- package/dist/api/design/grids.d.ts +237 -0
- package/dist/api/design/grids.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +260 -0
- package/dist/api/design/index.d.ts.map +1 -0
- package/dist/api/design/lock.d.ts +67 -0
- package/dist/api/design/lock.d.ts.map +1 -0
- package/dist/api/design/materials/index.d.ts +551 -0
- package/dist/api/design/materials/index.d.ts.map +1 -0
- package/dist/api/design/query/geometry/index.d.ts +252 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -0
- package/dist/api/design/query/grids.d.ts +287 -0
- package/dist/api/design/query/grids.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +1318 -0
- package/dist/api/design/query/index.d.ts.map +1 -0
- package/dist/api/design/query/referenceLines.d.ts +45 -0
- package/dist/api/design/query/referenceLines.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +394 -0
- package/dist/api/design/query/spaces.d.ts.map +1 -0
- package/dist/api/design/selection/index.d.ts +282 -0
- package/dist/api/design/selection/index.d.ts.map +1 -0
- package/dist/api/design/shared.d.ts +38 -0
- package/dist/api/design/shared.d.ts.map +1 -0
- package/dist/api/design/transform/index.d.ts +249 -0
- package/dist/api/design/transform/index.d.ts.map +1 -0
- package/dist/api/design/types/index.d.ts +181 -0
- package/dist/api/design/types/index.d.ts.map +1 -0
- package/dist/api/design/update/index.d.ts +803 -0
- package/dist/api/design/update/index.d.ts.map +1 -0
- package/dist/api/design/visibility.d.ts +126 -0
- package/dist/api/design/visibility.d.ts.map +1 -0
- package/dist/api/design/windows/index.d.ts +300 -0
- package/dist/api/design/windows/index.d.ts.map +1 -0
- package/dist/api/entity/buildableEnvelope.d.ts +265 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
- package/dist/api/entity/department.d.ts +1 -0
- package/dist/api/entity/department.d.ts.map +1 -0
- package/dist/api/entity/index.d.ts +28 -0
- package/dist/api/entity/index.d.ts.map +1 -0
- package/dist/api/entity/referenceLine.d.ts +210 -0
- package/dist/api/entity/referenceLine.d.ts.map +1 -0
- package/dist/api/entity/space.d.ts +846 -0
- package/dist/api/entity/space.d.ts.map +1 -0
- package/dist/api/entity/story.d.ts +476 -0
- package/dist/api/entity/story.d.ts.map +1 -0
- package/dist/api/index.d.ts +45 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/presentation/aiInspiration.d.ts +2400 -0
- package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
- package/dist/api/presentation/annotate.d.ts +483 -0
- package/dist/api/presentation/annotate.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +184 -0
- package/dist/api/presentation/diagrams.d.ts.map +1 -0
- package/dist/api/presentation/drawings.d.ts +2900 -0
- package/dist/api/presentation/drawings.d.ts.map +1 -0
- package/dist/api/presentation/export.d.ts +126 -0
- package/dist/api/presentation/export.d.ts.map +1 -0
- package/dist/api/presentation/import.d.ts +164 -0
- package/dist/api/presentation/import.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +114 -0
- package/dist/api/presentation/index.d.ts.map +1 -0
- package/dist/api/presentation/placedViews.d.ts +1232 -0
- package/dist/api/presentation/placedViews.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +481 -0
- package/dist/api/presentation/shapes.d.ts.map +1 -0
- package/dist/api/presentation/sheets.d.ts +643 -0
- package/dist/api/presentation/sheets.d.ts.map +1 -0
- package/dist/api/presentation/slideshow.d.ts +125 -0
- package/dist/api/presentation/slideshow.d.ts.map +1 -0
- package/dist/api/presentation/tables.d.ts +81 -0
- package/dist/api/presentation/tables.d.ts.map +1 -0
- package/dist/api/presentation/viewPresets.d.ts +70 -0
- package/dist/api/presentation/viewPresets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +741 -0
- package/dist/api/presentation/views.d.ts.map +1 -0
- package/dist/api/program/adjacency.d.ts +155 -0
- package/dist/api/program/adjacency.d.ts.map +1 -0
- package/dist/api/program/areas.d.ts +450 -0
- package/dist/api/program/areas.d.ts.map +1 -0
- package/dist/api/program/classification.d.ts +135 -0
- package/dist/api/program/classification.d.ts.map +1 -0
- package/dist/api/program/cores.d.ts +78 -0
- package/dist/api/program/cores.d.ts.map +1 -0
- package/dist/api/program/departments.d.ts +487 -0
- package/dist/api/program/departments.d.ts.map +1 -0
- package/dist/api/program/index.d.ts +71 -0
- package/dist/api/program/index.d.ts.map +1 -0
- package/dist/api/program/labels.d.ts +355 -0
- package/dist/api/program/labels.d.ts.map +1 -0
- package/dist/api/program/layout.d.ts +398 -0
- package/dist/api/program/layout.d.ts.map +1 -0
- package/dist/api/program/metadata.d.ts +328 -0
- package/dist/api/program/metadata.d.ts.map +1 -0
- package/dist/api/program/metrics.d.ts +108 -0
- package/dist/api/program/metrics.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +823 -0
- package/dist/api/program/site.d.ts.map +1 -0
- package/dist/api/program/spreadsheet.d.ts +2628 -0
- package/dist/api/program/spreadsheet.d.ts.map +1 -0
- package/dist/api/workspace/index.d.ts +552 -0
- package/dist/api/workspace/index.d.ts.map +1 -0
- package/dist/errors/codes.d.ts +34 -0
- package/dist/errors/codes.d.ts.map +1 -0
- package/dist/errors/envelope.d.ts +56 -0
- package/dist/errors/envelope.d.ts.map +1 -0
- package/dist/errors/index.d.ts +6 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/plugin-error.d.ts +69 -0
- package/dist/errors/plugin-error.d.ts.map +1 -0
- package/dist/handles.d.ts +229 -0
- package/dist/handles.d.ts.map +1 -0
- package/dist/host-utils.d.ts +47 -0
- package/dist/host-utils.d.ts.map +1 -0
- package/dist/index.cjs +8836 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7568 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +16 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +41 -0
- package/scripts/generate-manifest.mjs +238 -0
- package/scripts/generate-manifest.test.mjs +292 -0
- package/src/api/analysis/daylight.ts +470 -0
- package/src/api/analysis/heatmaps.ts +683 -0
- package/src/api/analysis/illuminance.ts +155 -0
- package/src/api/analysis/index.ts +61 -0
- package/src/api/analysis/shadows.ts +183 -0
- package/src/api/analysis/solar.ts +237 -0
- package/src/api/analysis/sunlightHours.ts +211 -0
- package/src/api/analysis/sunpath.ts +83 -0
- package/src/api/analysis/weather.ts +179 -0
- package/src/api/core/buildings.ts +485 -0
- package/src/api/core/camera/index.ts +268 -0
- package/src/api/core/comment/index.ts +376 -0
- package/src/api/core/geom/create/index.ts +1204 -0
- package/src/api/core/geom/delete/index.ts +84 -0
- package/src/api/core/geom/index.ts +35 -0
- package/src/api/core/geom/query/arc.ts +169 -0
- package/src/api/core/geom/query/brep.ts +563 -0
- package/src/api/core/geom/query/circle.ts +404 -0
- package/src/api/core/geom/query/contour.ts +540 -0
- package/src/api/core/geom/query/curve.ts +1078 -0
- package/src/api/core/geom/query/edge.ts +130 -0
- package/src/api/core/geom/query/face.ts +403 -0
- package/src/api/core/geom/query/halfedge.ts +210 -0
- package/src/api/core/geom/query/index.ts +63 -0
- package/src/api/core/geom/query/profile.ts +473 -0
- package/src/api/core/geom/query/vertex.ts +205 -0
- package/src/api/core/geom/update/contour.ts +315 -0
- package/src/api/core/geom/update/curve.ts +209 -0
- package/src/api/core/geom/update/index.ts +29 -0
- package/src/api/core/geom/update/profile.ts +377 -0
- package/src/api/core/groups.ts +521 -0
- package/src/api/core/handles/index.ts +233 -0
- package/src/api/core/history/index.ts +84 -0
- package/src/api/core/index.ts +99 -0
- package/src/api/core/io/export/index.ts +126 -0
- package/src/api/core/io/import/index.ts +504 -0
- package/src/api/core/io/index.ts +42 -0
- package/src/api/core/io/job/index.ts +140 -0
- package/src/api/core/io/query/index.ts +71 -0
- package/src/api/core/io/terrain/index.ts +360 -0
- package/src/api/core/io/underlay/index.ts +705 -0
- package/src/api/core/layers.ts +333 -0
- package/src/api/core/math/index.ts +20 -0
- package/src/api/core/math/quat.ts +172 -0
- package/src/api/core/math/vec3.ts +179 -0
- package/src/api/core/mode/index.ts +108 -0
- package/src/api/core/project/index.ts +479 -0
- package/src/api/core/proposals/index.ts +569 -0
- package/src/api/core/storeys/index.ts +294 -0
- package/src/api/core/tags.ts +911 -0
- package/src/api/core/units/index.ts +164 -0
- package/src/api/core/user.ts +46 -0
- package/src/api/core/zoom/index.ts +51 -0
- package/src/api/design/boolean/index.ts +179 -0
- package/src/api/design/create/bulk-items.ts +186 -0
- package/src/api/design/create/grids.ts +137 -0
- package/src/api/design/create/index.ts +1954 -0
- package/src/api/design/create/opening-fields.ts +37 -0
- package/src/api/design/delete/index.ts +74 -0
- package/src/api/design/dimensions.ts +453 -0
- package/src/api/design/doors/index.ts +500 -0
- package/src/api/design/edit/index.ts +54 -0
- package/src/api/design/erase/index.ts +151 -0
- package/src/api/design/family.ts +646 -0
- package/src/api/design/furniture/index.ts +319 -0
- package/src/api/design/grids.ts +237 -0
- package/src/api/design/index.ts +274 -0
- package/src/api/design/lock.ts +69 -0
- package/src/api/design/materials/index.ts +608 -0
- package/src/api/design/query/geometry/index.ts +288 -0
- package/src/api/design/query/grids.ts +197 -0
- package/src/api/design/query/index.ts +1176 -0
- package/src/api/design/query/referenceLines.ts +52 -0
- package/src/api/design/query/spaces.ts +275 -0
- package/src/api/design/selection/index.ts +273 -0
- package/src/api/design/shared.ts +40 -0
- package/src/api/design/transform/index.ts +254 -0
- package/src/api/design/types/index.ts +156 -0
- package/src/api/design/update/index.ts +798 -0
- package/src/api/design/visibility.ts +143 -0
- package/src/api/design/windows/index.ts +333 -0
- package/src/api/entity/buildableEnvelope.ts +322 -0
- package/src/api/entity/department.ts +0 -0
- package/src/api/entity/index.ts +30 -0
- package/src/api/entity/referenceLine.ts +235 -0
- package/src/api/entity/space.ts +612 -0
- package/src/api/entity/story.ts +517 -0
- package/src/api/index.ts +47 -0
- package/src/api/presentation/aiInspiration.ts +1116 -0
- package/src/api/presentation/annotate.ts +417 -0
- package/src/api/presentation/diagrams.ts +194 -0
- package/src/api/presentation/drawings.ts +529 -0
- package/src/api/presentation/export.ts +133 -0
- package/src/api/presentation/import.ts +159 -0
- package/src/api/presentation/index.ts +129 -0
- package/src/api/presentation/placedViews.ts +1203 -0
- package/src/api/presentation/shapes.ts +274 -0
- package/src/api/presentation/sheets.ts +616 -0
- package/src/api/presentation/slideshow.ts +134 -0
- package/src/api/presentation/tables.ts +84 -0
- package/src/api/presentation/viewPresets.ts +83 -0
- package/src/api/presentation/views.ts +698 -0
- package/src/api/program/adjacency.ts +164 -0
- package/src/api/program/areas.ts +408 -0
- package/src/api/program/classification.ts +138 -0
- package/src/api/program/cores.ts +83 -0
- package/src/api/program/departments.ts +517 -0
- package/src/api/program/index.ts +73 -0
- package/src/api/program/labels.ts +332 -0
- package/src/api/program/layout.ts +422 -0
- package/src/api/program/metadata.ts +364 -0
- package/src/api/program/metrics.ts +120 -0
- package/src/api/program/site.ts +748 -0
- package/src/api/program/spreadsheet.ts +2698 -0
- package/src/api/workspace/index.ts +612 -0
- package/src/errors/codes.ts +136 -0
- package/src/errors/envelope.ts +75 -0
- package/src/errors/index.ts +21 -0
- package/src/errors/plugin-error.ts +134 -0
- package/src/handles.ts +282 -0
- package/src/host-utils.ts +68 -0
- package/src/index.ts +5 -0
- package/src/types.ts +16 -0
- package/test/errors.test.mjs +184 -0
- package/tsconfig.json +22 -0
- package/tsup.config.ts +12 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import * as z from "zod"
|
|
2
|
+
import { PluginApiReturn } from "../../types"
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Program classification — the catalog of space-classification options, and a
|
|
6
|
+
* space's display tags.
|
|
7
|
+
*
|
|
8
|
+
* Only the genuinely program-specific reads live here: the selectable
|
|
9
|
+
* space-type / area-class / mass-type options, and a space's tags for display.
|
|
10
|
+
* Reading or changing a *single space's* classification (its type, label, area
|
|
11
|
+
* class, or department) is done through the space reads/writes, not duplicated
|
|
12
|
+
* here. Tag definitions are managed elsewhere — these methods are display-only.
|
|
13
|
+
*
|
|
14
|
+
* Both methods are reads.
|
|
15
|
+
*
|
|
16
|
+
* Accessed via `snaptrude.program.classification`.
|
|
17
|
+
*/
|
|
18
|
+
export abstract class PluginProgramClassificationApi {
|
|
19
|
+
constructor() {}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* List the selectable classification options for spaces.
|
|
23
|
+
*
|
|
24
|
+
* The static catalog (project-independent) of space types, area classes, and
|
|
25
|
+
* mass types a space can be classified as.
|
|
26
|
+
*
|
|
27
|
+
* @returns A {@linkcode PluginProgramClassificationTypesResult} with the
|
|
28
|
+
* `spaceTypes`, `areaClasses`, and `massTypes` option lists.
|
|
29
|
+
*
|
|
30
|
+
* @examplePrompt What space types can I assign?
|
|
31
|
+
* @examplePrompt List the available area classifications
|
|
32
|
+
* @examplePrompt What classification options exist?
|
|
33
|
+
* @examplePrompt Show me the valid space-type values
|
|
34
|
+
*
|
|
35
|
+
* # Example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const { spaceTypes, areaClasses } = await snaptrude.program.classification.listTypes()
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
public abstract listTypes(): PluginApiReturn<PluginProgramClassificationTypesResult>
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* List a space's tags for display, grouped by category.
|
|
44
|
+
*
|
|
45
|
+
* @param id - The id of the space whose tags to read.
|
|
46
|
+
* @returns A {@linkcode PluginProgramClassificationTagsResult} with the space's
|
|
47
|
+
* `tagIds` and `tagsByCategory`.
|
|
48
|
+
*
|
|
49
|
+
* @examplePrompt What tags are on this space?
|
|
50
|
+
* @examplePrompt Show the tags grouped by category for sp_4
|
|
51
|
+
* @examplePrompt List this room's display tags
|
|
52
|
+
* @examplePrompt Which tags does this space have?
|
|
53
|
+
*
|
|
54
|
+
* # Example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const { tagsByCategory } = await snaptrude.program.classification.listTags("sp_4")
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
public abstract listTags(
|
|
60
|
+
id: string,
|
|
61
|
+
): PluginApiReturn<PluginProgramClassificationTagsResult>
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* A selectable classification option.
|
|
66
|
+
*
|
|
67
|
+
* | Property | Type | Description |
|
|
68
|
+
* |---|---|---|
|
|
69
|
+
* | `value` | `string` | Stored value |
|
|
70
|
+
* | `label` | `string` | Display label |
|
|
71
|
+
*/
|
|
72
|
+
export const PluginClassificationOption = z.object({
|
|
73
|
+
value: z.string(),
|
|
74
|
+
label: z.string(),
|
|
75
|
+
})
|
|
76
|
+
export type PluginClassificationOption = z.infer<
|
|
77
|
+
typeof PluginClassificationOption
|
|
78
|
+
>
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Result of {@linkcode PluginProgramClassificationApi.listTypes}.
|
|
82
|
+
*
|
|
83
|
+
* | Property | Type | Description |
|
|
84
|
+
* |---|---|---|
|
|
85
|
+
* | `spaceTypes` | {@linkcode PluginClassificationOption}`[]` | Selectable space types |
|
|
86
|
+
* | `areaClasses` | {@linkcode PluginClassificationOption}`[]` | Selectable area classes (NET/GROSS/EXCLUDED) |
|
|
87
|
+
* | `massTypes` | {@linkcode PluginClassificationOption}`[]` | Selectable mass/object types |
|
|
88
|
+
*/
|
|
89
|
+
export const PluginProgramClassificationTypesResult = z.object({
|
|
90
|
+
spaceTypes: z.array(PluginClassificationOption),
|
|
91
|
+
areaClasses: z.array(PluginClassificationOption),
|
|
92
|
+
massTypes: z.array(PluginClassificationOption),
|
|
93
|
+
})
|
|
94
|
+
export type PluginProgramClassificationTypesResult = z.infer<
|
|
95
|
+
typeof PluginProgramClassificationTypesResult
|
|
96
|
+
>
|
|
97
|
+
|
|
98
|
+
/** Arguments for {@linkcode PluginProgramClassificationApi.listTags}. */
|
|
99
|
+
export const PluginProgramClassificationListTagsArgs = z.object({
|
|
100
|
+
id: z.string(),
|
|
101
|
+
})
|
|
102
|
+
export type PluginProgramClassificationListTagsArgs = z.infer<
|
|
103
|
+
typeof PluginProgramClassificationListTagsArgs
|
|
104
|
+
>
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* A display tag on a space.
|
|
108
|
+
*
|
|
109
|
+
* | Property | Type | Description |
|
|
110
|
+
* |---|---|---|
|
|
111
|
+
* | `tagId` | `string` | Tag id |
|
|
112
|
+
* | `tagName` | `string` | Tag display name |
|
|
113
|
+
* | `color` | `string` | CSS hex color string |
|
|
114
|
+
* | `categoryId` | `string` | Id of the tag's category |
|
|
115
|
+
*/
|
|
116
|
+
export const PluginSpaceTag = z.object({
|
|
117
|
+
tagId: z.string(),
|
|
118
|
+
tagName: z.string(),
|
|
119
|
+
color: z.string(),
|
|
120
|
+
categoryId: z.string(),
|
|
121
|
+
})
|
|
122
|
+
export type PluginSpaceTag = z.infer<typeof PluginSpaceTag>
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Result of {@linkcode PluginProgramClassificationApi.listTags}.
|
|
126
|
+
*
|
|
127
|
+
* | Property | Type | Description |
|
|
128
|
+
* |---|---|---|
|
|
129
|
+
* | `tagIds` | `string[]` | All tag ids on the space |
|
|
130
|
+
* | `tagsByCategory` | `Record<string, `{@linkcode PluginSpaceTag}`>` | Tags keyed by category name |
|
|
131
|
+
*/
|
|
132
|
+
export const PluginProgramClassificationTagsResult = z.object({
|
|
133
|
+
tagIds: z.array(z.string()),
|
|
134
|
+
tagsByCategory: z.record(z.string(), PluginSpaceTag),
|
|
135
|
+
})
|
|
136
|
+
export type PluginProgramClassificationTagsResult = z.infer<
|
|
137
|
+
typeof PluginProgramClassificationTagsResult
|
|
138
|
+
>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as z from "zod"
|
|
2
|
+
import { PluginApiReturn } from "../../types"
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Program cores — the building's vertical-circulation cores (lift / stair / shaft
|
|
6
|
+
* shells).
|
|
7
|
+
*
|
|
8
|
+
* Read the cores in the scene and test whether a space is a core. Both are reads;
|
|
9
|
+
* there is no core-generation trigger on this surface (core geometry is owned by
|
|
10
|
+
* the geometry layer, not here).
|
|
11
|
+
*
|
|
12
|
+
* Accessed via `snaptrude.program.cores`.
|
|
13
|
+
*/
|
|
14
|
+
export abstract class PluginProgramCoresApi {
|
|
15
|
+
constructor() {}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* List the cores currently in the building.
|
|
19
|
+
*
|
|
20
|
+
* @returns A {@linkcode PluginProgramCoresListResult} with each core's id,
|
|
21
|
+
* core group, and storey (empty when there are none).
|
|
22
|
+
*
|
|
23
|
+
* @examplePrompt List the cores in the building
|
|
24
|
+
* @examplePrompt How many cores are placed?
|
|
25
|
+
* @examplePrompt Show me the lift and stair cores
|
|
26
|
+
* @examplePrompt Which storeys have cores?
|
|
27
|
+
*
|
|
28
|
+
* # Example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const { cores } = await snaptrude.program.cores.list()
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
public abstract list(): PluginApiReturn<PluginProgramCoresListResult>
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Test whether a space is a circulation core element.
|
|
37
|
+
*
|
|
38
|
+
* @param id - The id of the space to test.
|
|
39
|
+
* @returns `true` if the space is a core element.
|
|
40
|
+
*
|
|
41
|
+
* @examplePrompt Is this space a core?
|
|
42
|
+
* @examplePrompt Does this mass belong to the core?
|
|
43
|
+
* @examplePrompt Check if space sp_1 is a circulation core
|
|
44
|
+
*
|
|
45
|
+
* # Example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const isCore = await snaptrude.program.cores.isCore("sp_1")
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
public abstract isCore(id: string): PluginApiReturn<boolean>
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A circulation core element in the building.
|
|
55
|
+
*
|
|
56
|
+
* | Property | Type | Description |
|
|
57
|
+
* |---|---|---|
|
|
58
|
+
* | `id` | `string` | Component id of the core element |
|
|
59
|
+
* | `groupId` | `string` | Id of the core group this element belongs to |
|
|
60
|
+
* | `storey` | `number` | Storey (floor number) the element sits on |
|
|
61
|
+
*/
|
|
62
|
+
export const PluginProgramCore = z.object({
|
|
63
|
+
id: z.string(),
|
|
64
|
+
groupId: z.string(),
|
|
65
|
+
storey: z.number(),
|
|
66
|
+
})
|
|
67
|
+
export type PluginProgramCore = z.infer<typeof PluginProgramCore>
|
|
68
|
+
|
|
69
|
+
/** Result of {@linkcode PluginProgramCoresApi.list}. */
|
|
70
|
+
export const PluginProgramCoresListResult = z.object({
|
|
71
|
+
cores: z.array(PluginProgramCore),
|
|
72
|
+
})
|
|
73
|
+
export type PluginProgramCoresListResult = z.infer<
|
|
74
|
+
typeof PluginProgramCoresListResult
|
|
75
|
+
>
|
|
76
|
+
|
|
77
|
+
/** Arguments for {@linkcode PluginProgramCoresApi.isCore}. */
|
|
78
|
+
export const PluginProgramCoresIsCoreArgs = z.object({
|
|
79
|
+
id: z.string(),
|
|
80
|
+
})
|
|
81
|
+
export type PluginProgramCoresIsCoreArgs = z.infer<
|
|
82
|
+
typeof PluginProgramCoresIsCoreArgs
|
|
83
|
+
>
|