@snaptrude/plugin-core 0.0.0-dev-20260708130115 → 0.0.0-dev-20260827135706

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 (261) hide show
  1. package/CHANGELOG.md +152 -1
  2. package/api-manifest.json +3620 -276
  3. package/dist/api/analysis/daylight.d.ts +603 -0
  4. package/dist/api/analysis/daylight.d.ts.map +1 -0
  5. package/dist/api/analysis/heatmaps.d.ts +658 -0
  6. package/dist/api/analysis/heatmaps.d.ts.map +1 -0
  7. package/dist/api/analysis/illuminance.d.ts +145 -0
  8. package/dist/api/analysis/illuminance.d.ts.map +1 -0
  9. package/dist/api/analysis/index.d.ts +59 -0
  10. package/dist/api/analysis/index.d.ts.map +1 -0
  11. package/dist/api/analysis/shadows.d.ts +165 -0
  12. package/dist/api/analysis/shadows.d.ts.map +1 -0
  13. package/dist/api/analysis/solar.d.ts +249 -0
  14. package/dist/api/analysis/solar.d.ts.map +1 -0
  15. package/dist/api/analysis/sunlightHours.d.ts +208 -0
  16. package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
  17. package/dist/api/analysis/sunpath.d.ts +80 -0
  18. package/dist/api/analysis/sunpath.d.ts.map +1 -0
  19. package/dist/api/analysis/weather.d.ts +193 -0
  20. package/dist/api/analysis/weather.d.ts.map +1 -0
  21. package/dist/api/core/camera/index.d.ts +261 -0
  22. package/dist/api/core/camera/index.d.ts.map +1 -0
  23. package/dist/api/core/comment/index.d.ts +105 -2
  24. package/dist/api/core/comment/index.d.ts.map +1 -1
  25. package/dist/api/core/geom/create/index.d.ts +840 -14
  26. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  27. package/dist/api/core/geom/delete/index.d.ts +8 -2
  28. package/dist/api/core/geom/delete/index.d.ts.map +1 -1
  29. package/dist/api/core/geom/query/arc.d.ts +5 -5
  30. package/dist/api/core/geom/query/brep.d.ts +130 -18
  31. package/dist/api/core/geom/query/brep.d.ts.map +1 -1
  32. package/dist/api/core/geom/query/circle.d.ts +18 -18
  33. package/dist/api/core/geom/query/contour.d.ts +20 -20
  34. package/dist/api/core/geom/query/curve.d.ts +49 -49
  35. package/dist/api/core/geom/query/edge.d.ts +5 -5
  36. package/dist/api/core/geom/query/face.d.ts +16 -16
  37. package/dist/api/core/geom/query/halfedge.d.ts +8 -8
  38. package/dist/api/core/geom/query/profile.d.ts +19 -19
  39. package/dist/api/core/geom/query/vertex.d.ts +8 -8
  40. package/dist/api/core/geom/update/contour.d.ts +14 -14
  41. package/dist/api/core/geom/update/curve.d.ts +7 -7
  42. package/dist/api/core/geom/update/profile.d.ts +16 -16
  43. package/dist/api/core/handles/index.d.ts +210 -0
  44. package/dist/api/core/handles/index.d.ts.map +1 -0
  45. package/dist/api/core/index.d.ts +34 -0
  46. package/dist/api/core/index.d.ts.map +1 -1
  47. package/dist/api/core/io/export/index.d.ts +134 -0
  48. package/dist/api/core/io/export/index.d.ts.map +1 -0
  49. package/dist/api/core/io/import/index.d.ts +453 -0
  50. package/dist/api/core/io/import/index.d.ts.map +1 -0
  51. package/dist/api/core/io/index.d.ts +40 -0
  52. package/dist/api/core/io/index.d.ts.map +1 -0
  53. package/dist/api/core/io/job/index.d.ts +139 -0
  54. package/dist/api/core/io/job/index.d.ts.map +1 -0
  55. package/dist/api/core/io/query/index.d.ts +74 -0
  56. package/dist/api/core/io/query/index.d.ts.map +1 -0
  57. package/dist/api/core/io/terrain/index.d.ts +341 -0
  58. package/dist/api/core/io/terrain/index.d.ts.map +1 -0
  59. package/dist/api/core/io/underlay/index.d.ts +805 -0
  60. package/dist/api/core/io/underlay/index.d.ts.map +1 -0
  61. package/dist/api/core/layers.d.ts +7 -7
  62. package/dist/api/core/mode/index.d.ts +99 -0
  63. package/dist/api/core/mode/index.d.ts.map +1 -0
  64. package/dist/api/core/project/index.d.ts +68 -1
  65. package/dist/api/core/project/index.d.ts.map +1 -1
  66. package/dist/api/core/proposals/index.d.ts +531 -0
  67. package/dist/api/core/proposals/index.d.ts.map +1 -0
  68. package/dist/api/core/storeys/index.d.ts +265 -0
  69. package/dist/api/core/storeys/index.d.ts.map +1 -0
  70. package/dist/api/core/tags.d.ts +24 -0
  71. package/dist/api/core/tags.d.ts.map +1 -1
  72. package/dist/api/core/user.d.ts +44 -0
  73. package/dist/api/core/user.d.ts.map +1 -0
  74. package/dist/api/core/zoom/index.d.ts +4 -0
  75. package/dist/api/core/zoom/index.d.ts.map +1 -1
  76. package/dist/api/design/boolean/index.d.ts +4 -4
  77. package/dist/api/design/create/index.d.ts +568 -45
  78. package/dist/api/design/create/index.d.ts.map +1 -1
  79. package/dist/api/design/delete/index.d.ts +3 -0
  80. package/dist/api/design/delete/index.d.ts.map +1 -1
  81. package/dist/api/design/doors/index.d.ts +195 -0
  82. package/dist/api/design/doors/index.d.ts.map +1 -1
  83. package/dist/api/design/edit/index.d.ts +1 -1
  84. package/dist/api/design/erase/index.d.ts +2 -2
  85. package/dist/api/design/family.d.ts +349 -0
  86. package/dist/api/design/family.d.ts.map +1 -0
  87. package/dist/api/design/furniture/index.d.ts +181 -8
  88. package/dist/api/design/furniture/index.d.ts.map +1 -1
  89. package/dist/api/design/index.d.ts +98 -0
  90. package/dist/api/design/index.d.ts.map +1 -1
  91. package/dist/api/design/lock.d.ts +26 -0
  92. package/dist/api/design/lock.d.ts.map +1 -1
  93. package/dist/api/design/materials/index.d.ts +270 -16
  94. package/dist/api/design/materials/index.d.ts.map +1 -1
  95. package/dist/api/design/query/geometry/index.d.ts +112 -0
  96. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  97. package/dist/api/design/query/index.d.ts +282 -11
  98. package/dist/api/design/query/index.d.ts.map +1 -1
  99. package/dist/api/design/query/referenceLines.d.ts +45 -0
  100. package/dist/api/design/query/referenceLines.d.ts.map +1 -0
  101. package/dist/api/design/query/spaces.d.ts +181 -8
  102. package/dist/api/design/query/spaces.d.ts.map +1 -1
  103. package/dist/api/design/selection/index.d.ts +144 -0
  104. package/dist/api/design/selection/index.d.ts.map +1 -1
  105. package/dist/api/design/transform/index.d.ts +172 -10
  106. package/dist/api/design/transform/index.d.ts.map +1 -1
  107. package/dist/api/design/types/index.d.ts +181 -0
  108. package/dist/api/design/types/index.d.ts.map +1 -0
  109. package/dist/api/design/update/index.d.ts +553 -2
  110. package/dist/api/design/update/index.d.ts.map +1 -1
  111. package/dist/api/design/visibility.d.ts +126 -0
  112. package/dist/api/design/visibility.d.ts.map +1 -0
  113. package/dist/api/design/windows/index.d.ts +113 -2
  114. package/dist/api/design/windows/index.d.ts.map +1 -1
  115. package/dist/api/entity/buildableEnvelope.d.ts +4 -0
  116. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
  117. package/dist/api/entity/referenceLine.d.ts +10 -2
  118. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  119. package/dist/api/entity/space.d.ts +21 -21
  120. package/dist/api/entity/story.d.ts +242 -15
  121. package/dist/api/entity/story.d.ts.map +1 -1
  122. package/dist/api/index.d.ts +10 -0
  123. package/dist/api/index.d.ts.map +1 -1
  124. package/dist/api/presentation/aiInspiration.d.ts +25 -25
  125. package/dist/api/presentation/annotate.d.ts +467 -0
  126. package/dist/api/presentation/annotate.d.ts.map +1 -0
  127. package/dist/api/presentation/diagrams.d.ts +111 -8
  128. package/dist/api/presentation/diagrams.d.ts.map +1 -1
  129. package/dist/api/presentation/export.d.ts +108 -0
  130. package/dist/api/presentation/export.d.ts.map +1 -0
  131. package/dist/api/presentation/import.d.ts +55 -4
  132. package/dist/api/presentation/import.d.ts.map +1 -1
  133. package/dist/api/presentation/index.d.ts +58 -1
  134. package/dist/api/presentation/index.d.ts.map +1 -1
  135. package/dist/api/presentation/placedViews.d.ts +1139 -0
  136. package/dist/api/presentation/placedViews.d.ts.map +1 -0
  137. package/dist/api/presentation/shapes.d.ts +481 -0
  138. package/dist/api/presentation/shapes.d.ts.map +1 -0
  139. package/dist/api/presentation/sheets.d.ts +452 -13
  140. package/dist/api/presentation/sheets.d.ts.map +1 -1
  141. package/dist/api/presentation/slideshow.d.ts +125 -0
  142. package/dist/api/presentation/slideshow.d.ts.map +1 -0
  143. package/dist/api/presentation/tables.d.ts +81 -0
  144. package/dist/api/presentation/tables.d.ts.map +1 -0
  145. package/dist/api/presentation/views.d.ts +367 -7
  146. package/dist/api/presentation/views.d.ts.map +1 -1
  147. package/dist/api/program/areas.d.ts +102 -12
  148. package/dist/api/program/areas.d.ts.map +1 -1
  149. package/dist/api/program/cores.d.ts +3 -99
  150. package/dist/api/program/cores.d.ts.map +1 -1
  151. package/dist/api/program/index.d.ts +7 -15
  152. package/dist/api/program/index.d.ts.map +1 -1
  153. package/dist/api/program/layout.d.ts +346 -11
  154. package/dist/api/program/layout.d.ts.map +1 -1
  155. package/dist/api/program/site.d.ts +469 -13
  156. package/dist/api/program/site.d.ts.map +1 -1
  157. package/dist/api/program/spreadsheet.d.ts +365 -41
  158. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  159. package/dist/api/workspace/index.d.ts +505 -0
  160. package/dist/api/workspace/index.d.ts.map +1 -0
  161. package/dist/errors/codes.d.ts +34 -0
  162. package/dist/errors/codes.d.ts.map +1 -0
  163. package/dist/errors/envelope.d.ts +56 -0
  164. package/dist/errors/envelope.d.ts.map +1 -0
  165. package/dist/errors/index.d.ts +6 -0
  166. package/dist/errors/index.d.ts.map +1 -0
  167. package/dist/errors/plugin-error.d.ts +69 -0
  168. package/dist/errors/plugin-error.d.ts.map +1 -0
  169. package/dist/handles.d.ts +97 -25
  170. package/dist/handles.d.ts.map +1 -1
  171. package/dist/host-utils.d.ts +4 -0
  172. package/dist/host-utils.d.ts.map +1 -1
  173. package/dist/index.cjs +4582 -1422
  174. package/dist/index.cjs.map +1 -1
  175. package/dist/index.d.ts +1 -0
  176. package/dist/index.d.ts.map +1 -1
  177. package/dist/index.js +4171 -1411
  178. package/dist/index.js.map +1 -1
  179. package/package.json +4 -2
  180. package/scripts/generate-manifest.mjs +45 -0
  181. package/scripts/generate-manifest.test.mjs +103 -4
  182. package/src/api/analysis/daylight.ts +470 -0
  183. package/src/api/analysis/heatmaps.ts +683 -0
  184. package/src/api/analysis/illuminance.ts +155 -0
  185. package/src/api/analysis/index.ts +61 -0
  186. package/src/api/analysis/shadows.ts +183 -0
  187. package/src/api/analysis/solar.ts +237 -0
  188. package/src/api/analysis/sunlightHours.ts +211 -0
  189. package/src/api/analysis/sunpath.ts +83 -0
  190. package/src/api/analysis/weather.ts +179 -0
  191. package/src/api/core/camera/index.ts +268 -0
  192. package/src/api/core/comment/index.ts +120 -2
  193. package/src/api/core/geom/create/index.ts +912 -1
  194. package/src/api/core/geom/delete/index.ts +6 -0
  195. package/src/api/core/geom/query/brep.ts +119 -0
  196. package/src/api/core/handles/index.ts +233 -0
  197. package/src/api/core/index.ts +34 -0
  198. package/src/api/core/io/export/index.ts +126 -0
  199. package/src/api/core/io/import/index.ts +496 -0
  200. package/src/api/core/io/index.ts +42 -0
  201. package/src/api/core/io/job/index.ts +140 -0
  202. package/src/api/core/io/query/index.ts +71 -0
  203. package/src/api/core/io/terrain/index.ts +360 -0
  204. package/src/api/core/io/underlay/index.ts +705 -0
  205. package/src/api/core/mode/index.ts +96 -0
  206. package/src/api/core/project/index.ts +62 -1
  207. package/src/api/core/proposals/index.ts +569 -0
  208. package/src/api/core/storeys/index.ts +294 -0
  209. package/src/api/core/tags.ts +27 -0
  210. package/src/api/core/user.ts +46 -0
  211. package/src/api/core/zoom/index.ts +4 -0
  212. package/src/api/design/create/index.ts +670 -30
  213. package/src/api/design/delete/index.ts +3 -0
  214. package/src/api/design/doors/index.ts +208 -0
  215. package/src/api/design/erase/index.ts +1 -1
  216. package/src/api/design/family.ts +388 -0
  217. package/src/api/design/furniture/index.ts +197 -8
  218. package/src/api/design/index.ts +102 -0
  219. package/src/api/design/lock.ts +27 -0
  220. package/src/api/design/materials/index.ts +334 -27
  221. package/src/api/design/query/geometry/index.ts +125 -3
  222. package/src/api/design/query/index.ts +217 -7
  223. package/src/api/design/query/referenceLines.ts +52 -0
  224. package/src/api/design/query/spaces.ts +143 -0
  225. package/src/api/design/selection/index.ts +129 -0
  226. package/src/api/design/transform/index.ts +170 -9
  227. package/src/api/design/types/index.ts +156 -0
  228. package/src/api/design/update/index.ts +631 -3
  229. package/src/api/design/visibility.ts +143 -0
  230. package/src/api/design/windows/index.ts +128 -2
  231. package/src/api/entity/buildableEnvelope.ts +4 -0
  232. package/src/api/entity/referenceLine.ts +8 -0
  233. package/src/api/entity/story.ts +259 -15
  234. package/src/api/index.ts +10 -0
  235. package/src/api/presentation/annotate.ts +385 -0
  236. package/src/api/presentation/diagrams.ts +118 -8
  237. package/src/api/presentation/export.ts +108 -0
  238. package/src/api/presentation/import.ts +51 -4
  239. package/src/api/presentation/index.ts +66 -1
  240. package/src/api/presentation/placedViews.ts +1120 -0
  241. package/src/api/presentation/shapes.ts +274 -0
  242. package/src/api/presentation/sheets.ts +400 -13
  243. package/src/api/presentation/slideshow.ts +134 -0
  244. package/src/api/presentation/tables.ts +84 -0
  245. package/src/api/presentation/views.ts +376 -8
  246. package/src/api/program/areas.ts +88 -15
  247. package/src/api/program/cores.ts +3 -91
  248. package/src/api/program/index.ts +7 -15
  249. package/src/api/program/layout.ts +365 -11
  250. package/src/api/program/site.ts +435 -13
  251. package/src/api/program/spreadsheet.ts +376 -35
  252. package/src/api/workspace/index.ts +563 -0
  253. package/src/errors/codes.ts +136 -0
  254. package/src/errors/envelope.ts +75 -0
  255. package/src/errors/index.ts +21 -0
  256. package/src/errors/plugin-error.ts +134 -0
  257. package/src/handles.ts +123 -13
  258. package/src/host-utils.ts +4 -0
  259. package/src/index.ts +1 -0
  260. package/test/errors.test.mjs +184 -0
  261. package/tsconfig.json +7 -2
@@ -0,0 +1,145 @@
1
+ import { PluginApiReturn } from "../../types";
2
+ import { PluginAnalysisComputeResult, PluginAnalysisJobStateResult } from "./sunlightHours";
3
+ /**
4
+ * Analysis illuminance — the daylight illuminance (lux) heatmap study.
5
+ *
6
+ * Computes interior daylight illuminance over a date range and renders the
7
+ * result as a heatmap on the scene. **Pro-gated**: every method that starts
8
+ * a run throws when the workspace is not on a Pro plan.
9
+ *
10
+ * Like {@linkcode PluginAnalysisSunlightHoursApi} (`analysis.sunlightHours`),
11
+ * this is an **asynchronous backend job**:
12
+ *
13
+ * 1. {@linkcode PluginAnalysisIlluminanceApi.compute} starts the job and
14
+ * returns immediately.
15
+ * 2. Poll {@linkcode PluginAnalysisIlluminanceApi.get} until `status` is
16
+ * `"active"` (heatmap rendered) — a run typically takes minutes. There is
17
+ * no completion event; polling is the pattern.
18
+ * 3. {@linkcode PluginAnalysisIlluminanceApi.cancel} aborts an in-flight
19
+ * run; {@linkcode PluginAnalysisIlluminanceApi.reset} clears a rendered
20
+ * heatmap.
21
+ *
22
+ * Illuminance analyses BIM slab and roof objects (floors, roofs, …) — walls
23
+ * or bare Masses are not enough — and requires the 3D view. Heatmaps are invalidated by
24
+ * scene-mutating edits. Dates cross as ISO 8601 date strings
25
+ * (`"YYYY-MM-DD"`).
26
+ *
27
+ * Accessed via `snaptrude.analysis.illuminance`.
28
+ */
29
+ export declare abstract class PluginAnalysisIlluminanceApi {
30
+ constructor();
31
+ /**
32
+ * Start a daylight-illuminance run for a date range.
33
+ *
34
+ * Starts the backend job and **returns immediately** — it does not wait
35
+ * for the heatmap. Poll {@linkcode PluginAnalysisIlluminanceApi.get} until
36
+ * `status` is `"active"`. Starting a new run while one is in flight
37
+ * replaces it. Shadows and the heatmap analyses are mutually exclusive in
38
+ * the product: starting a run disables real-time shadows and resets/cancels
39
+ * any {@linkcode PluginAnalysisSunlightHoursApi}
40
+ * (`analysis.sunlightHours`) study.
41
+ *
42
+ * @param startDate - Start of the study range, ISO date `"YYYY-MM-DD"`.
43
+ * @param endDate - End of the study range, ISO date `"YYYY-MM-DD"` (on or
44
+ * after `startDate`).
45
+ * @returns A {@linkcode PluginAnalysisComputeResult} — `{ success: true }`
46
+ * when the job was started. The `{ success: false, error }` arm is
47
+ * reserved — not yet emitted (start failures currently throw).
48
+ * @throws When the workspace is not on a **Pro** plan (illuminance is a
49
+ * Pro feature).
50
+ * @throws When the project has no geo-located site/terrain (no location to
51
+ * compute daylight for — there is no fallback location).
52
+ * @throws When the scene has no slab or roof BIM object to analyse (walls
53
+ * or bare Masses are not enough) or the editor is not in the 3D view.
54
+ * @throws When a date is not a parseable ISO date or the range is inverted.
55
+ * @throws When plugin writes are disabled.
56
+ *
57
+ * @examplePrompt Run a daylight illuminance analysis for December
58
+ * @examplePrompt Compute the lux levels inside the building for winter
59
+ * @examplePrompt How much daylight do the interior floors get?
60
+ *
61
+ * # Example
62
+ * ```ts
63
+ * const { success } = await snaptrude.analysis.illuminance.compute(
64
+ * "2026-12-01",
65
+ * "2026-12-31",
66
+ * )
67
+ * // poll until the heatmap is rendered
68
+ * let job = await snaptrude.analysis.illuminance.get()
69
+ * while (job?.status === "running") {
70
+ * await new Promise((r) => setTimeout(r, 5000))
71
+ * job = await snaptrude.analysis.illuminance.get()
72
+ * }
73
+ * ```
74
+ */
75
+ abstract compute(startDate: string, endDate: string): PluginApiReturn<PluginAnalysisComputeResult>;
76
+ /**
77
+ * Get the state of the illuminance study.
78
+ *
79
+ * The polling read for the async job started by
80
+ * {@linkcode PluginAnalysisIlluminanceApi.compute}. `status` values:
81
+ *
82
+ * | Status | Meaning |
83
+ * |---|---|
84
+ * | `"running"` | A run is in flight — keep polling |
85
+ * | `"active"` | The heatmap is rendered on the scene |
86
+ * | `"inactive"` | A previous run exists but its heatmap is not showing |
87
+ *
88
+ * @returns A {@linkcode PluginAnalysisJobStateResult} with the `status` and
89
+ * the run's ISO `startDate`/`endDate`, or `null` when no run result is
90
+ * available (the study never ran, was cancelled, or the last run failed).
91
+ *
92
+ * @examplePrompt Is the illuminance analysis done?
93
+ * @examplePrompt Check the status of the daylight lux run
94
+ * @examplePrompt What date range was the illuminance heatmap computed for?
95
+ *
96
+ * # Example
97
+ * ```ts
98
+ * const job = await snaptrude.analysis.illuminance.get()
99
+ * if (job?.status === "active") console.log(job.startDate, job.endDate)
100
+ * ```
101
+ */
102
+ abstract get(): PluginApiReturn<PluginAnalysisJobStateResult>;
103
+ /**
104
+ * Cancel the in-flight illuminance run.
105
+ *
106
+ * Aborts the backend job. A no-op (returns `false`) when nothing is
107
+ * running.
108
+ *
109
+ * @returns `true` when a run was cancelled, `false` when nothing was
110
+ * running.
111
+ * @throws When plugin writes are disabled.
112
+ *
113
+ * @examplePrompt Cancel the illuminance analysis
114
+ * @examplePrompt Stop the running daylight computation
115
+ * @examplePrompt Abort the lux study
116
+ *
117
+ * # Example
118
+ * ```ts
119
+ * await snaptrude.analysis.illuminance.cancel()
120
+ * ```
121
+ */
122
+ abstract cancel(): PluginApiReturn<boolean>;
123
+ /**
124
+ * Clear the illuminance heatmap from the scene.
125
+ *
126
+ * Un-applies the rendered heatmap and restores the normal material view.
127
+ * A no-op (returns `false`) when no heatmap is showing. Does not cancel an
128
+ * in-flight run — use {@linkcode PluginAnalysisIlluminanceApi.cancel}.
129
+ *
130
+ * @returns `true` when a heatmap was cleared, `false` when none was
131
+ * showing.
132
+ * @throws When plugin writes are disabled.
133
+ *
134
+ * @examplePrompt Clear the illuminance heatmap
135
+ * @examplePrompt Remove the daylight lux colours from the model
136
+ * @examplePrompt Reset the illuminance analysis view
137
+ *
138
+ * # Example
139
+ * ```ts
140
+ * await snaptrude.analysis.illuminance.reset()
141
+ * ```
142
+ */
143
+ abstract reset(): PluginApiReturn<boolean>;
144
+ }
145
+ //# sourceMappingURL=illuminance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"illuminance.d.ts","sourceRoot":"","sources":["../../../src/api/analysis/illuminance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,iBAAiB,CAAA;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,8BAAsB,4BAA4B;;IAGhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;aACa,OAAO,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,eAAe,CAAC,2BAA2B,CAAC;IAE/C;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;aACa,GAAG,IAAI,eAAe,CAAC,4BAA4B,CAAC;IAEpE;;;;;;;;;;;;;;;;;;OAkBG;aACa,MAAM,IAAI,eAAe,CAAC,OAAO,CAAC;IAElD;;;;;;;;;;;;;;;;;;;OAmBG;aACa,KAAK,IAAI,eAAe,CAAC,OAAO,CAAC;CAClD"}
@@ -0,0 +1,59 @@
1
+ import { PluginAnalysisSunpathApi } from "./sunpath";
2
+ import { PluginAnalysisShadowsApi } from "./shadows";
3
+ import { PluginAnalysisSunlightHoursApi } from "./sunlightHours";
4
+ import { PluginAnalysisIlluminanceApi } from "./illuminance";
5
+ import { PluginAnalysisHeatmapsApi } from "./heatmaps";
6
+ import { PluginAnalysisWeatherApi } from "./weather";
7
+ import { PluginAnalysisSolarApi } from "./solar";
8
+ import { PluginAnalysisDaylightApi } from "./daylight";
9
+ /**
10
+ * Sustainability-analysis APIs.
11
+ *
12
+ * Analysis is the environmental-performance layer: sun and daylight studies
13
+ * computed for the project's geo-located site. The synchronous visual
14
+ * overlays (sun-path diagram, real-time shadows) toggle instantly; the
15
+ * heatmap studies (direct sunlight hours, daylight illuminance) are
16
+ * asynchronous backend jobs — start them, poll their state, and cancel or
17
+ * clear them. Shadows and the heatmap analyses are **mutually exclusive**
18
+ * (enabling one resets the other), exactly as in the sustainability sidebar.
19
+ * Site inputs (location, true north) are read via `program.site`.
20
+ *
21
+ * - {@linkcode PluginAnalysisApi.sunpath} — Toggle & query the sun-path diagram overlay
22
+ * - {@linkcode PluginAnalysisApi.shadows} — Toggle real-time shadows and scrub the sun's date-time
23
+ * - {@linkcode PluginAnalysisApi.sunlightHours} — Direct-sunlight-hours heatmap job (start / poll / cancel / clear)
24
+ * - {@linkcode PluginAnalysisApi.illuminance} — Daylight-illuminance heatmap job, Pro-gated (start / poll / cancel / clear)
25
+ * - {@linkcode PluginAnalysisApi.heatmaps} — Render plugin-computed scalar data as a heatmap (per-space / grid)
26
+ * - {@linkcode PluginAnalysisApi.weather} — Read the site's typical-year weather series (numeric, paged)
27
+ * - {@linkcode PluginAnalysisApi.solar} — Sample solar exposure at caller-chosen points (numeric)
28
+ * - {@linkcode PluginAnalysisApi.daylight} — Standards-grade annual daylight metrics (IES LM-83, numeric)
29
+ *
30
+ * Accessed via `snaptrude.analysis`.
31
+ */
32
+ export declare abstract class PluginAnalysisApi {
33
+ /** Sun-path diagram overlay — enable/disable/isActive. See {@linkcode PluginAnalysisSunpathApi}. */
34
+ abstract sunpath: PluginAnalysisSunpathApi;
35
+ /** Real-time sun shadows + sun date-time. See {@linkcode PluginAnalysisShadowsApi}. */
36
+ abstract shadows: PluginAnalysisShadowsApi;
37
+ /** Direct-sunlight-hours heatmap job. See {@linkcode PluginAnalysisSunlightHoursApi}. */
38
+ abstract sunlightHours: PluginAnalysisSunlightHoursApi;
39
+ /** Daylight-illuminance heatmap job (Pro). See {@linkcode PluginAnalysisIlluminanceApi}. */
40
+ abstract illuminance: PluginAnalysisIlluminanceApi;
41
+ /** Plugin-supplied scalar-data heatmaps. See {@linkcode PluginAnalysisHeatmapsApi}. */
42
+ abstract heatmaps: PluginAnalysisHeatmapsApi;
43
+ /** Site typical-year weather series (numeric, paged). See {@linkcode PluginAnalysisWeatherApi}. */
44
+ abstract weather: PluginAnalysisWeatherApi;
45
+ /** Per-point solar exposure sampling (numeric). See {@linkcode PluginAnalysisSolarApi}. */
46
+ abstract solar: PluginAnalysisSolarApi;
47
+ /** IES LM-83 annual daylight metrics (numeric). See {@linkcode PluginAnalysisDaylightApi}. */
48
+ abstract daylight: PluginAnalysisDaylightApi;
49
+ constructor();
50
+ }
51
+ export * from "./sunpath";
52
+ export * from "./shadows";
53
+ export * from "./sunlightHours";
54
+ export * from "./illuminance";
55
+ export * from "./heatmaps";
56
+ export * from "./weather";
57
+ export * from "./solar";
58
+ export * from "./daylight";
59
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/analysis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAEtD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,8BAAsB,iBAAiB;IACrC,oGAAoG;IACpG,SAAgB,OAAO,EAAE,wBAAwB,CAAA;IACjD,uFAAuF;IACvF,SAAgB,OAAO,EAAE,wBAAwB,CAAA;IACjD,yFAAyF;IACzF,SAAgB,aAAa,EAAE,8BAA8B,CAAA;IAC7D,4FAA4F;IAC5F,SAAgB,WAAW,EAAE,4BAA4B,CAAA;IACzD,uFAAuF;IACvF,SAAgB,QAAQ,EAAE,yBAAyB,CAAA;IACnD,mGAAmG;IACnG,SAAgB,OAAO,EAAE,wBAAwB,CAAA;IACjD,2FAA2F;IAC3F,SAAgB,KAAK,EAAE,sBAAsB,CAAA;IAC7C,8FAA8F;IAC9F,SAAgB,QAAQ,EAAE,yBAAyB,CAAA;;CAGpD;AAED,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA"}
@@ -0,0 +1,165 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ /**
4
+ * Analysis shadows — real-time sun shadows in the scene.
5
+ *
6
+ * Shadows are cast for the sun position at a specific date and time at the
7
+ * project's geographic location. The date-time crosses this API as an **ISO
8
+ * 8601 date-time string** in the project's local time (e.g.
9
+ * `"2026-06-21T14:30"`); the engine snaps the time **down** to its half-hour
10
+ * grid (`14:59` → `14:30`); seconds, if provided, are discarded. The
11
+ * timezone is derived from the site location by the engine — do not append
12
+ * a UTC offset.
13
+ *
14
+ * Methods that position the sun **throw** when the project has no geo-located
15
+ * site/terrain — there is no fallback location. Set the site location first;
16
+ * read it via `program.site.getLocation`.
17
+ *
18
+ * Accessed via `snaptrude.analysis.shadows`.
19
+ */
20
+ export declare abstract class PluginAnalysisShadowsApi {
21
+ constructor();
22
+ /**
23
+ * Turn real-time sun shadows ON, optionally at a specific date and time.
24
+ *
25
+ * Without `options.dateTime` the shadows use the current stored sun
26
+ * position; with it, the sun is moved first (same as
27
+ * {@linkcode PluginAnalysisShadowsApi.setDateTime}). Enabling shadows
28
+ * resets any active heatmap analysis (`sunlightHours` / `illuminance`) —
29
+ * they are mutually exclusive in the product.
30
+ *
31
+ * @param options - Optional `dateTime`: ISO 8601 local date-time to
32
+ * position the sun at (snapped to the engine's half-hour grid).
33
+ * @returns `true` — shadows are enabled after the call.
34
+ * @throws When the project has no geo-located site/terrain.
35
+ * @throws When `options.dateTime` is not a parseable ISO date-time.
36
+ * @throws When plugin writes are disabled.
37
+ *
38
+ * @examplePrompt Turn on shadows
39
+ * @examplePrompt Show the shadows at 3pm on June 21st
40
+ * @examplePrompt Enable sun shadows for the summer solstice afternoon
41
+ *
42
+ * # Example
43
+ * ```ts
44
+ * await snaptrude.analysis.shadows.enable({ dateTime: "2026-06-21T15:00" })
45
+ * ```
46
+ */
47
+ abstract enable(options?: PluginAnalysisShadowsEnableOptions): PluginApiReturn<boolean>;
48
+ /**
49
+ * Turn real-time sun shadows OFF.
50
+ *
51
+ * A no-op (returns `false`) when shadows are already off. The stored sun
52
+ * date-time is kept for the next enable.
53
+ *
54
+ * @returns `false` — shadows are disabled after the call.
55
+ * @throws When plugin writes are disabled.
56
+ *
57
+ * @examplePrompt Turn off shadows
58
+ * @examplePrompt Hide the sun shadows
59
+ * @examplePrompt Disable shadow rendering in the scene
60
+ *
61
+ * # Example
62
+ * ```ts
63
+ * await snaptrude.analysis.shadows.disable()
64
+ * ```
65
+ */
66
+ abstract disable(): PluginApiReturn<boolean>;
67
+ /**
68
+ * Whether real-time sun shadows are currently enabled.
69
+ *
70
+ * A pure read — never mutates, never throws.
71
+ *
72
+ * @returns `true` when shadows are rendering.
73
+ *
74
+ * @examplePrompt Are shadows on?
75
+ * @examplePrompt Check whether sun shadows are enabled
76
+ * @examplePrompt Is the scene showing shadows right now?
77
+ *
78
+ * # Example
79
+ * ```ts
80
+ * const on = await snaptrude.analysis.shadows.isEnabled()
81
+ * ```
82
+ */
83
+ abstract isEnabled(): PluginApiReturn<boolean>;
84
+ /**
85
+ * Move the sun to a specific date and time.
86
+ *
87
+ * Takes an ISO 8601 date-time string in the project's local time; the
88
+ * engine snaps the time down to its half-hour grid and re-renders the shadows
89
+ * (when they are enabled). The engine stores no year — only the month, day,
90
+ * and time are applied, and the returned date-time always carries the
91
+ * **current year** (setting `"2020-12-21T09:30"` returns
92
+ * `"2026-12-21T09:30"` in 2026). Paired with
93
+ * {@linkcode PluginAnalysisShadowsApi.getDateTime}.
94
+ *
95
+ * @param dateTime - ISO 8601 local date-time, e.g. `"2026-12-21T09:30"`.
96
+ * @returns A {@linkcode PluginAnalysisShadowsDateTimeResult} — the applied
97
+ * ISO date-time after half-hour snapping.
98
+ * @throws When the project has no geo-located site/terrain.
99
+ * @throws When `dateTime` is not a parseable ISO date-time.
100
+ * @throws When plugin writes are disabled.
101
+ *
102
+ * @examplePrompt Set the shadow time to 9:30 am on the winter solstice
103
+ * @examplePrompt Move the sun to noon on March 1st
104
+ * @examplePrompt Change the shadow study date to December 21
105
+ *
106
+ * # Example
107
+ * ```ts
108
+ * const applied = await snaptrude.analysis.shadows.setDateTime("2026-12-21T09:30")
109
+ * console.log(applied) // "2026-12-21T09:30" (snapped to the half-hour grid)
110
+ * ```
111
+ */
112
+ abstract setDateTime(dateTime: string): PluginApiReturn<PluginAnalysisShadowsDateTimeResult>;
113
+ /**
114
+ * Get the sun's current date and time.
115
+ *
116
+ * Returns the stored sun position as an ISO 8601 local date-time string —
117
+ * the value shadows render at (whether or not they are enabled). The engine
118
+ * stores no year, so the returned string always carries the **current
119
+ * year**, whatever year was passed to
120
+ * {@linkcode PluginAnalysisShadowsApi.setDateTime} (its pair).
121
+ *
122
+ * @returns A {@linkcode PluginAnalysisShadowsDateTimeResult} — the current
123
+ * ISO local date-time of the sun.
124
+ *
125
+ * @examplePrompt What date and time are the shadows set to?
126
+ * @examplePrompt Get the current sun position date
127
+ * @examplePrompt Which time of day is the shadow study showing?
128
+ *
129
+ * # Example
130
+ * ```ts
131
+ * const dateTime = await snaptrude.analysis.shadows.getDateTime()
132
+ * ```
133
+ */
134
+ abstract getDateTime(): PluginApiReturn<PluginAnalysisShadowsDateTimeResult>;
135
+ }
136
+ /**
137
+ * Options for {@linkcode PluginAnalysisShadowsApi.enable}.
138
+ *
139
+ * | Property | Type | Description |
140
+ * |---|---|---|
141
+ * | `dateTime` | `string \| undefined` | ISO 8601 local date-time to position the sun at (snapped to the half-hour grid) |
142
+ */
143
+ export declare const PluginAnalysisShadowsEnableOptions: z.ZodObject<{
144
+ dateTime: z.ZodOptional<z.ZodString>;
145
+ }, z.core.$strip>;
146
+ export type PluginAnalysisShadowsEnableOptions = z.infer<typeof PluginAnalysisShadowsEnableOptions>;
147
+ /**
148
+ * Arguments for {@linkcode PluginAnalysisShadowsApi.setDateTime}.
149
+ *
150
+ * | Property | Type | Description |
151
+ * |---|---|---|
152
+ * | `dateTime` | `string` | ISO 8601 local date-time, e.g. `"2026-06-21T14:30"` |
153
+ */
154
+ export declare const PluginAnalysisShadowsSetDateTimeArgs: z.ZodObject<{
155
+ dateTime: z.ZodString;
156
+ }, z.core.$strip>;
157
+ export type PluginAnalysisShadowsSetDateTimeArgs = z.infer<typeof PluginAnalysisShadowsSetDateTimeArgs>;
158
+ /**
159
+ * Result of {@linkcode PluginAnalysisShadowsApi.setDateTime} /
160
+ * {@linkcode PluginAnalysisShadowsApi.getDateTime} — the sun's ISO 8601
161
+ * local date-time (minute precision, on the engine's half-hour grid).
162
+ */
163
+ export declare const PluginAnalysisShadowsDateTimeResult: z.ZodString;
164
+ export type PluginAnalysisShadowsDateTimeResult = z.infer<typeof PluginAnalysisShadowsDateTimeResult>;
165
+ //# sourceMappingURL=shadows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/api/analysis/shadows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;;;;;;GAgBG;AACH,8BAAsB,wBAAwB;;IAG5C;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;aACa,MAAM,CACpB,OAAO,CAAC,EAAE,kCAAkC,GAC3C,eAAe,CAAC,OAAO,CAAC;IAE3B;;;;;;;;;;;;;;;;;OAiBG;aACa,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC;IAEnD;;;;;;;;;;;;;;;OAeG;aACa,SAAS,IAAI,eAAe,CAAC,OAAO,CAAC;IAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;aACa,WAAW,CACzB,QAAQ,EAAE,MAAM,GACf,eAAe,CAAC,mCAAmC,CAAC;IAEvD;;;;;;;;;;;;;;;;;;;;OAoBG;aACa,WAAW,IAAI,eAAe,CAAC,mCAAmC,CAAC;CACpF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC;;iBAE7C,CAAA;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,kCAAkC,CAC1C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC;;iBAE/C,CAAA;AACF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,oCAAoC,CAC5C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,aAAa,CAAA;AAC7D,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA"}
@@ -0,0 +1,249 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ /**
4
+ * Analysis solar — sample solar exposure at caller-chosen points.
5
+ *
6
+ * Unlike the heatmap studies (which raster the model's own surfaces), this
7
+ * samples solar exposure at **points you supply** — an instant (sun visible? /
8
+ * irradiance now) or aggregated over a date range (shaded fraction / cumulative
9
+ * irradiance). Positions are **world plan-space** coordinates, the same units
10
+ * and frame as plugin geometry reads; the backend echoes them verbatim and
11
+ * never re-projects.
12
+ *
13
+ * Raw numbers only: this renders no heatmap, mutates no geometry, and writes no
14
+ * save commands — visualization is the plugin's job. Large grids run as a job
15
+ * (`status: "running"` until complete); every result carries `modelRevision` +
16
+ * `inputHash` so the caller can mark it stale after a geometry change.
17
+ *
18
+ * Accessed via `snaptrude.analysis.solar`.
19
+ */
20
+ export declare abstract class PluginAnalysisSolarApi {
21
+ constructor();
22
+ /**
23
+ * Sample solar exposure at a set of points.
24
+ *
25
+ * Provide **exactly one** timing mode: `dateTime` (a single instant →
26
+ * `mode: "instant"`, results in `W/m²`), or `startDate` + `endDate` (a range
27
+ * → `mode: "range"`, results aggregated in `kWh/m²`). `results` is paged —
28
+ * follow `nextCursor` until it is `null`. Each point's optional `normal`
29
+ * gives plane-of-array irradiance; omit it for a horizontal sample.
30
+ *
31
+ * @param args - {@linkcode PluginSolarSampleGridArgs}: the `points`, exactly
32
+ * one timing mode (`dateTime` XOR `startDate`+`endDate`), and an optional
33
+ * `includeHourlyArtifact` to attach a downloadable per-hour series.
34
+ * @returns A {@linkcode PluginSolarSampleGridResult} — the run `status`,
35
+ * `mode`/`units`, provenance (`weather`, `modelRevision`, `inputHash`),
36
+ * this page of `results`, an optional `hourlyArtifact`, and `nextCursor`.
37
+ * @throws When the project has no geo-located site (no location to sample
38
+ * solar exposure for).
39
+ *
40
+ * @examplePrompt What's the irradiance at these facade points at noon on June 21?
41
+ * @examplePrompt How shaded are these balcony points across the summer?
42
+ * @examplePrompt Sample direct sun visibility at these roof points right now
43
+ *
44
+ * # Example
45
+ * ```ts
46
+ * const grid = await snaptrude.analysis.solar.sampleGrid({
47
+ * points: [
48
+ * { id: "a", position: [0, 3, 0] },
49
+ * { id: "b", position: [5, 3, 0], normal: [0, 0, 1] },
50
+ * ],
51
+ * dateTime: "2026-06-21T12:00:00+05:30",
52
+ * })
53
+ * for (const r of grid.results) {
54
+ * console.log(r.id, r.directSunVisible, r.totalIrradiance, grid.units)
55
+ * }
56
+ * ```
57
+ */
58
+ abstract sampleGrid(args: PluginSolarSampleGridArgs): PluginApiReturn<PluginSolarSampleGridResult>;
59
+ }
60
+ /**
61
+ * Status of a {@linkcode PluginAnalysisSolarApi.sampleGrid} run.
62
+ *
63
+ * | Value | Meaning |
64
+ * |---|---|
65
+ * | `"running"` | The job is in flight — poll again |
66
+ * | `"complete"` | Results are final |
67
+ * | `"cancelled"` | The run was cancelled |
68
+ * | `"failed"` | The run failed |
69
+ */
70
+ export declare const PluginSolarRunStatus: z.ZodEnum<{
71
+ complete: "complete";
72
+ failed: "failed";
73
+ running: "running";
74
+ cancelled: "cancelled";
75
+ }>;
76
+ export type PluginSolarRunStatus = z.infer<typeof PluginSolarRunStatus>;
77
+ /**
78
+ * Timing mode of the run — chosen by which timing args were supplied.
79
+ *
80
+ * | Value | Meaning |
81
+ * |---|---|
82
+ * | `"instant"` | Single `dateTime` — irradiance in `W/m²` |
83
+ * | `"range"` | `startDate`+`endDate` — irradiance aggregated in `kWh/m²` |
84
+ */
85
+ export declare const PluginSolarSampleMode: z.ZodEnum<{
86
+ range: "range";
87
+ instant: "instant";
88
+ }>;
89
+ export type PluginSolarSampleMode = z.infer<typeof PluginSolarSampleMode>;
90
+ /**
91
+ * Irradiance units of the results — `W/m²` (instant) or `kWh/m²` (range).
92
+ */
93
+ export declare const PluginSolarUnits: z.ZodEnum<{
94
+ "W/m2": "W/m2";
95
+ "kWh/m2": "kWh/m2";
96
+ }>;
97
+ export type PluginSolarUnits = z.infer<typeof PluginSolarUnits>;
98
+ /**
99
+ * Downloadable per-hour artifact (present only when `includeHourlyArtifact`).
100
+ *
101
+ * | Property | Type | Description |
102
+ * |---|---|---|
103
+ * | `url` | `string` | Signed download URL |
104
+ * | `format` | `"parquet" \| "csv-gz"` | File format |
105
+ * | `expiresAt` | `string` | ISO 8601 expiry of the signed URL |
106
+ */
107
+ export declare const PluginSolarHourlyArtifact: z.ZodObject<{
108
+ url: z.ZodString;
109
+ format: z.ZodEnum<{
110
+ parquet: "parquet";
111
+ "csv-gz": "csv-gz";
112
+ }>;
113
+ expiresAt: z.ZodString;
114
+ }, z.core.$strip>;
115
+ export type PluginSolarHourlyArtifact = z.infer<typeof PluginSolarHourlyArtifact>;
116
+ /**
117
+ * A caller-supplied point to sample.
118
+ *
119
+ * | Property | Type | Description |
120
+ * |---|---|---|
121
+ * | `id` | `string` | Caller-chosen id, echoed back verbatim on the result |
122
+ * | `position` | `[number, number, number]` | World plan-space `[x, y, z]` |
123
+ * | `normal` | `[number, number, number]`? | Surface normal for plane-of-array; omit = horizontal |
124
+ */
125
+ export declare const PluginSolarSamplePoint: z.ZodObject<{
126
+ id: z.ZodString;
127
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
128
+ normal: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
129
+ }, z.core.$strip>;
130
+ export type PluginSolarSamplePoint = z.infer<typeof PluginSolarSamplePoint>;
131
+ /**
132
+ * Arguments for {@linkcode PluginAnalysisSolarApi.sampleGrid}.
133
+ *
134
+ * Provide **exactly one** timing mode: `dateTime` (instant) XOR
135
+ * `startDate`+`endDate` (range).
136
+ *
137
+ * | Property | Type | Description |
138
+ * |---|---|---|
139
+ * | `points` | {@linkcode PluginSolarSamplePoint}`[]` | Points to sample |
140
+ * | `dateTime` | `string`? | Instant mode: local ISO 8601 with offset |
141
+ * | `startDate` | `string`? | Range mode: inclusive start `"YYYY-MM-DD"` |
142
+ * | `endDate` | `string`? | Range mode: inclusive end `"YYYY-MM-DD"` |
143
+ * | `includeHourlyArtifact` | `boolean`? | Attach a downloadable per-hour series |
144
+ */
145
+ export declare const PluginSolarSampleGridArgs: z.ZodObject<{
146
+ points: z.ZodArray<z.ZodObject<{
147
+ id: z.ZodString;
148
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
149
+ normal: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
150
+ }, z.core.$strip>>;
151
+ dateTime: z.ZodOptional<z.ZodString>;
152
+ startDate: z.ZodOptional<z.ZodString>;
153
+ endDate: z.ZodOptional<z.ZodString>;
154
+ includeHourlyArtifact: z.ZodOptional<z.ZodBoolean>;
155
+ }, z.core.$strip>;
156
+ export type PluginSolarSampleGridArgs = z.infer<typeof PluginSolarSampleGridArgs>;
157
+ /**
158
+ * One sampled point's result. Irradiance fields are in the enclosing result's
159
+ * `units` and are omitted when the backend did not compute them.
160
+ *
161
+ * | Property | Type | Description |
162
+ * |---|---|---|
163
+ * | `id` | `string` | The point's caller-chosen id |
164
+ * | `directSunVisible` | `boolean` | Instant mode: sun disc visible from the point |
165
+ * | `shadeFraction` | `number` | `0`..`1`; range mode: fraction of sun-up hours shaded |
166
+ * | `directIrradiance` | `number`? | Direct component, in the result's `units` |
167
+ * | `diffuseIrradiance` | `number`? | Diffuse component, in the result's `units` |
168
+ * | `totalIrradiance` | `number`? | Total (direct + diffuse), in the result's `units` |
169
+ */
170
+ export declare const PluginSolarSampleResult: z.ZodObject<{
171
+ id: z.ZodString;
172
+ directSunVisible: z.ZodBoolean;
173
+ shadeFraction: z.ZodNumber;
174
+ directIrradiance: z.ZodOptional<z.ZodNumber>;
175
+ diffuseIrradiance: z.ZodOptional<z.ZodNumber>;
176
+ totalIrradiance: z.ZodOptional<z.ZodNumber>;
177
+ }, z.core.$strip>;
178
+ export type PluginSolarSampleResult = z.infer<typeof PluginSolarSampleResult>;
179
+ /**
180
+ * Result of {@linkcode PluginAnalysisSolarApi.sampleGrid} — one page.
181
+ *
182
+ * | Property | Type | Description |
183
+ * |---|---|---|
184
+ * | `status` | {@linkcode PluginSolarRunStatus} | Run status |
185
+ * | `mode` | {@linkcode PluginSolarSampleMode} | `"instant"` or `"range"` |
186
+ * | `coordinateSystem` | `"world-plan-space"` | Echo of the input frame |
187
+ * | `modelRevision` | `string` | Geometry revision sampled against (staleness key) |
188
+ * | `inputHash` | `string` | Hash of points+dates+geometry (staleness key) |
189
+ * | `units` | {@linkcode PluginSolarUnits} | `"W/m2"` (instant) or `"kWh/m2"` (range) |
190
+ * | `sunUpHours` | `number` | Sun-up hours over the sampled window |
191
+ * | `weather` | {@linkcode PluginWeatherSourceMeta} \| `null` | Resolved weather file, or `null` |
192
+ * | `weatherQuality` | `string[]` | Deduped quality flags present in the consumed rows |
193
+ * | `results` | {@linkcode PluginSolarSampleResult}`[]` | This page of per-point results |
194
+ * | `hourlyArtifact` | {@linkcode PluginSolarHourlyArtifact} \| `null` | Per-hour download, or `null` |
195
+ * | `nextCursor` | `string \| null` | Next page cursor; `null` = last page |
196
+ */
197
+ export declare const PluginSolarSampleGridResult: z.ZodObject<{
198
+ status: z.ZodEnum<{
199
+ complete: "complete";
200
+ failed: "failed";
201
+ running: "running";
202
+ cancelled: "cancelled";
203
+ }>;
204
+ mode: z.ZodEnum<{
205
+ range: "range";
206
+ instant: "instant";
207
+ }>;
208
+ coordinateSystem: z.ZodLiteral<"world-plan-space">;
209
+ modelRevision: z.ZodString;
210
+ inputHash: z.ZodString;
211
+ units: z.ZodEnum<{
212
+ "W/m2": "W/m2";
213
+ "kWh/m2": "kWh/m2";
214
+ }>;
215
+ sunUpHours: z.ZodNumber;
216
+ weather: z.ZodNullable<z.ZodObject<{
217
+ weatherFileId: z.ZodString;
218
+ station: z.ZodString;
219
+ sourceId: z.ZodString;
220
+ distanceKm: z.ZodNullable<z.ZodNumber>;
221
+ selectionMethod: z.ZodEnum<{
222
+ "nearest-station": "nearest-station";
223
+ "user-upload": "user-upload";
224
+ "project-override": "project-override";
225
+ }>;
226
+ checksum: z.ZodString;
227
+ windReferenceHeightM: z.ZodNumber;
228
+ }, z.core.$strip>>;
229
+ weatherQuality: z.ZodArray<z.ZodString>;
230
+ results: z.ZodArray<z.ZodObject<{
231
+ id: z.ZodString;
232
+ directSunVisible: z.ZodBoolean;
233
+ shadeFraction: z.ZodNumber;
234
+ directIrradiance: z.ZodOptional<z.ZodNumber>;
235
+ diffuseIrradiance: z.ZodOptional<z.ZodNumber>;
236
+ totalIrradiance: z.ZodOptional<z.ZodNumber>;
237
+ }, z.core.$strip>>;
238
+ hourlyArtifact: z.ZodNullable<z.ZodObject<{
239
+ url: z.ZodString;
240
+ format: z.ZodEnum<{
241
+ parquet: "parquet";
242
+ "csv-gz": "csv-gz";
243
+ }>;
244
+ expiresAt: z.ZodString;
245
+ }, z.core.$strip>>;
246
+ nextCursor: z.ZodNullable<z.ZodString>;
247
+ }, z.core.$strip>;
248
+ export type PluginSolarSampleGridResult = z.infer<typeof PluginSolarSampleGridResult>;
249
+ //# sourceMappingURL=solar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solar.d.ts","sourceRoot":"","sources":["../../../src/api/analysis/solar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAG7C;;;;;;;;;;;;;;;;GAgBG;AACH,8BAAsB,sBAAsB;;IAG1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;aACa,UAAU,CACxB,IAAI,EAAE,yBAAyB,GAC9B,eAAe,CAAC,2BAA2B,CAAC;CAChD;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;;;;;EAK/B,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;EAA+B,CAAA;AACjE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;EAA6B,CAAA;AAC1D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE/D;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB;;;;;;;iBAIpC,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,yBAAyB,CACjC,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB;;;;iBAIjC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;iBA0BlC,CAAA;AACJ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,yBAAyB,CACjC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB;;;;;;;iBAOlC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAatC,CAAA;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,2BAA2B,CACnC,CAAA"}