@snaptrude/plugin-core 0.11.0-rc.1 → 1.0.0

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 (226) hide show
  1. package/AGENTS.md +4 -0
  2. package/CHANGELOG.md +176 -14
  3. package/api-manifest.json +872 -49
  4. package/dist/api/analysis/daylight.d.ts +5 -5
  5. package/dist/api/analysis/solar.d.ts +2 -2
  6. package/dist/api/core/camera/index.d.ts +447 -0
  7. package/dist/api/core/camera/index.d.ts.map +1 -1
  8. package/dist/api/core/geom/create/index.d.ts +942 -101
  9. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  10. package/dist/api/core/geom/query/brep.d.ts +59 -2
  11. package/dist/api/core/geom/query/brep.d.ts.map +1 -1
  12. package/dist/api/core/geom/query/curve.d.ts +59 -35
  13. package/dist/api/core/geom/query/curve.d.ts.map +1 -1
  14. package/dist/api/core/geom/query/edge.d.ts +2 -2
  15. package/dist/api/core/geom/query/face.d.ts +105 -0
  16. package/dist/api/core/geom/query/face.d.ts.map +1 -1
  17. package/dist/api/core/geom/update/contour.d.ts +10 -2
  18. package/dist/api/core/geom/update/contour.d.ts.map +1 -1
  19. package/dist/api/core/geom/update/curve.d.ts +5 -5
  20. package/dist/api/core/geom/update/profile.d.ts +3 -1
  21. package/dist/api/core/geom/update/profile.d.ts.map +1 -1
  22. package/dist/api/core/handles/index.d.ts +4 -2
  23. package/dist/api/core/handles/index.d.ts.map +1 -1
  24. package/dist/api/core/index.d.ts +4 -4
  25. package/dist/api/core/index.d.ts.map +1 -1
  26. package/dist/api/core/io/import/index.d.ts +3 -1
  27. package/dist/api/core/io/import/index.d.ts.map +1 -1
  28. package/dist/api/core/layers.d.ts +377 -255
  29. package/dist/api/core/layers.d.ts.map +1 -1
  30. package/dist/api/core/mode/index.d.ts +19 -7
  31. package/dist/api/core/mode/index.d.ts.map +1 -1
  32. package/dist/api/core/proposals/index.d.ts +4 -3
  33. package/dist/api/core/proposals/index.d.ts.map +1 -1
  34. package/dist/api/core/storeys/index.d.ts +17 -2
  35. package/dist/api/core/storeys/index.d.ts.map +1 -1
  36. package/dist/api/core/storeys/layers.d.ts +408 -0
  37. package/dist/api/core/storeys/layers.d.ts.map +1 -0
  38. package/dist/api/core/tags.d.ts +84 -3
  39. package/dist/api/core/tags.d.ts.map +1 -1
  40. package/dist/api/core/zoom/index.d.ts +13 -0
  41. package/dist/api/core/zoom/index.d.ts.map +1 -1
  42. package/dist/api/design/bim.d.ts +299 -0
  43. package/dist/api/design/bim.d.ts.map +1 -0
  44. package/dist/api/design/boolean/index.d.ts +2 -0
  45. package/dist/api/design/boolean/index.d.ts.map +1 -1
  46. package/dist/api/design/catalog.d.ts +320 -0
  47. package/dist/api/design/catalog.d.ts.map +1 -0
  48. package/dist/api/design/create/bulk-items.d.ts +269 -0
  49. package/dist/api/design/create/bulk-items.d.ts.map +1 -0
  50. package/dist/api/design/create/grids.d.ts +132 -0
  51. package/dist/api/design/create/grids.d.ts.map +1 -0
  52. package/dist/api/design/create/index.d.ts +753 -102
  53. package/dist/api/design/create/index.d.ts.map +1 -1
  54. package/dist/api/design/create/opening-fields.d.ts +38 -0
  55. package/dist/api/design/create/opening-fields.d.ts.map +1 -0
  56. package/dist/api/design/delete/index.d.ts +7 -20
  57. package/dist/api/design/delete/index.d.ts.map +1 -1
  58. package/dist/api/design/dimensions.d.ts +427 -0
  59. package/dist/api/design/dimensions.d.ts.map +1 -0
  60. package/dist/api/design/doors/index.d.ts +24 -23
  61. package/dist/api/design/doors/index.d.ts.map +1 -1
  62. package/dist/api/design/family.d.ts +1446 -0
  63. package/dist/api/design/family.d.ts.map +1 -0
  64. package/dist/api/design/grids.d.ts +237 -0
  65. package/dist/api/design/grids.d.ts.map +1 -0
  66. package/dist/api/design/index.d.ts +30 -0
  67. package/dist/api/design/index.d.ts.map +1 -1
  68. package/dist/api/design/networks.d.ts +1703 -0
  69. package/dist/api/design/networks.d.ts.map +1 -0
  70. package/dist/api/design/query/geometry/index.d.ts +33 -5
  71. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  72. package/dist/api/design/query/grids.d.ts +287 -0
  73. package/dist/api/design/query/grids.d.ts.map +1 -0
  74. package/dist/api/design/query/index.d.ts +143 -36
  75. package/dist/api/design/query/index.d.ts.map +1 -1
  76. package/dist/api/design/query/spaces.d.ts +5 -66
  77. package/dist/api/design/query/spaces.d.ts.map +1 -1
  78. package/dist/api/design/selection/index.d.ts +12 -12
  79. package/dist/api/design/types/index.d.ts +40 -24
  80. package/dist/api/design/types/index.d.ts.map +1 -1
  81. package/dist/api/design/update/index.d.ts +412 -8
  82. package/dist/api/design/update/index.d.ts.map +1 -1
  83. package/dist/api/design/windows/index.d.ts +8 -8
  84. package/dist/api/design/windows/index.d.ts.map +1 -1
  85. package/dist/api/entity/buildableEnvelope.d.ts +84 -2
  86. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
  87. package/dist/api/entity/referenceLine.d.ts +13 -1
  88. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  89. package/dist/api/entity/space.d.ts +12 -15
  90. package/dist/api/entity/space.d.ts.map +1 -1
  91. package/dist/api/entity/story.d.ts +4 -4
  92. package/dist/api/presentation/aiInspiration.d.ts +24 -24
  93. package/dist/api/presentation/annotate.d.ts +38 -22
  94. package/dist/api/presentation/annotate.d.ts.map +1 -1
  95. package/dist/api/presentation/camera.d.ts +265 -0
  96. package/dist/api/presentation/camera.d.ts.map +1 -0
  97. package/dist/api/presentation/drawingContract.d.ts +32 -0
  98. package/dist/api/presentation/drawingContract.d.ts.map +1 -0
  99. package/dist/api/presentation/drawings.d.ts +3523 -0
  100. package/dist/api/presentation/drawings.d.ts.map +1 -0
  101. package/dist/api/presentation/export.d.ts +23 -5
  102. package/dist/api/presentation/export.d.ts.map +1 -1
  103. package/dist/api/presentation/graphics.d.ts +419 -0
  104. package/dist/api/presentation/graphics.d.ts.map +1 -0
  105. package/dist/api/presentation/index.d.ts +66 -12
  106. package/dist/api/presentation/index.d.ts.map +1 -1
  107. package/dist/api/presentation/placedViews.d.ts +117 -51
  108. package/dist/api/presentation/placedViews.d.ts.map +1 -1
  109. package/dist/api/presentation/sections.d.ts +461 -0
  110. package/dist/api/presentation/sections.d.ts.map +1 -0
  111. package/dist/api/presentation/shapes.d.ts +2 -2
  112. package/dist/api/presentation/sheets.d.ts +175 -37
  113. package/dist/api/presentation/sheets.d.ts.map +1 -1
  114. package/dist/api/presentation/standards.d.ts +590 -0
  115. package/dist/api/presentation/standards.d.ts.map +1 -0
  116. package/dist/api/presentation/viewPresets.d.ts +222 -0
  117. package/dist/api/presentation/viewPresets.d.ts.map +1 -0
  118. package/dist/api/presentation/views.d.ts +144 -9
  119. package/dist/api/presentation/views.d.ts.map +1 -1
  120. package/dist/api/presentation/walkthroughs.d.ts +1350 -0
  121. package/dist/api/presentation/walkthroughs.d.ts.map +1 -0
  122. package/dist/api/program/departments.d.ts +58 -2
  123. package/dist/api/program/departments.d.ts.map +1 -1
  124. package/dist/api/program/index.d.ts +16 -6
  125. package/dist/api/program/index.d.ts.map +1 -1
  126. package/dist/api/program/labels.d.ts +355 -0
  127. package/dist/api/program/labels.d.ts.map +1 -0
  128. package/dist/api/program/metadata.d.ts +328 -0
  129. package/dist/api/program/metadata.d.ts.map +1 -0
  130. package/dist/api/program/site.d.ts +4 -4
  131. package/dist/api/program/spreadsheet.d.ts +267 -4
  132. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  133. package/dist/api/workspace/index.d.ts +49 -2
  134. package/dist/api/workspace/index.d.ts.map +1 -1
  135. package/dist/errors/codes.d.ts +5 -8
  136. package/dist/errors/codes.d.ts.map +1 -1
  137. package/dist/handles.d.ts +32 -3
  138. package/dist/handles.d.ts.map +1 -1
  139. package/dist/index.cjs +6534 -2865
  140. package/dist/index.cjs.map +1 -1
  141. package/dist/index.d.ts +2 -0
  142. package/dist/index.d.ts.map +1 -1
  143. package/dist/index.js +6118 -2857
  144. package/dist/index.js.map +1 -1
  145. package/dist/massParameters.d.ts +287 -0
  146. package/dist/massParameters.d.ts.map +1 -0
  147. package/dist/massParameters.ops.d.ts +138 -0
  148. package/dist/massParameters.ops.d.ts.map +1 -0
  149. package/package.json +2 -1
  150. package/scripts/check-dist-fresh.mjs +22 -0
  151. package/scripts/generate-manifest.mjs +5 -0
  152. package/scripts/generate-manifest.test.mjs +14 -3
  153. package/src/api/core/camera/index.ts +429 -1
  154. package/src/api/core/geom/create/index.ts +1037 -102
  155. package/src/api/core/geom/query/brep.ts +60 -2
  156. package/src/api/core/geom/query/curve.ts +26 -2
  157. package/src/api/core/geom/query/edge.ts +2 -2
  158. package/src/api/core/geom/query/face.ts +109 -4
  159. package/src/api/core/geom/update/contour.ts +10 -2
  160. package/src/api/core/geom/update/profile.ts +2 -0
  161. package/src/api/core/handles/index.ts +3 -2
  162. package/src/api/core/index.ts +4 -4
  163. package/src/api/core/io/import/index.ts +11 -3
  164. package/src/api/core/layers.ts +380 -173
  165. package/src/api/core/mode/index.ts +19 -7
  166. package/src/api/core/proposals/index.ts +4 -3
  167. package/src/api/core/storeys/index.ts +19 -2
  168. package/src/api/core/storeys/layers.ts +339 -0
  169. package/src/api/core/tags.ts +76 -0
  170. package/src/api/core/zoom/index.ts +13 -0
  171. package/src/api/design/bim.ts +210 -0
  172. package/src/api/design/boolean/index.ts +2 -0
  173. package/src/api/design/catalog.ts +203 -0
  174. package/src/api/design/create/bulk-items.ts +294 -0
  175. package/src/api/design/create/grids.ts +137 -0
  176. package/src/api/design/create/index.ts +824 -141
  177. package/src/api/design/create/opening-fields.ts +40 -0
  178. package/src/api/design/delete/index.ts +6 -20
  179. package/src/api/design/dimensions.ts +453 -0
  180. package/src/api/design/doors/index.ts +64 -41
  181. package/src/api/design/family.ts +1342 -0
  182. package/src/api/design/grids.ts +237 -0
  183. package/src/api/design/index.ts +49 -4
  184. package/src/api/design/networks.ts +607 -0
  185. package/src/api/design/query/geometry/index.ts +35 -4
  186. package/src/api/design/query/grids.ts +197 -0
  187. package/src/api/design/query/index.ts +105 -5
  188. package/src/api/design/query/spaces.ts +0 -68
  189. package/src/api/design/types/index.ts +31 -24
  190. package/src/api/design/update/index.ts +398 -4
  191. package/src/api/design/windows/index.ts +40 -22
  192. package/src/api/entity/buildableEnvelope.ts +77 -2
  193. package/src/api/entity/referenceLine.ts +25 -12
  194. package/src/api/entity/space.ts +0 -2
  195. package/src/api/presentation/annotate.ts +90 -58
  196. package/src/api/presentation/camera.ts +289 -0
  197. package/src/api/presentation/drawingContract.ts +70 -0
  198. package/src/api/presentation/drawings.ts +1179 -0
  199. package/src/api/presentation/export.ts +32 -6
  200. package/src/api/presentation/graphics.ts +324 -0
  201. package/src/api/presentation/index.ts +73 -14
  202. package/src/api/presentation/placedViews.ts +120 -57
  203. package/src/api/presentation/sections.ts +420 -0
  204. package/src/api/presentation/sheets.ts +182 -37
  205. package/src/api/presentation/standards.ts +445 -0
  206. package/src/api/presentation/viewPresets.ts +241 -0
  207. package/src/api/presentation/views.ts +81 -10
  208. package/src/api/presentation/walkthroughs.ts +1201 -0
  209. package/src/api/program/departments.ts +54 -2
  210. package/src/api/program/index.ts +16 -6
  211. package/src/api/program/labels.ts +332 -0
  212. package/src/api/program/metadata.ts +364 -0
  213. package/src/api/program/spreadsheet.ts +282 -0
  214. package/src/api/workspace/index.ts +51 -2
  215. package/src/errors/codes.ts +9 -30
  216. package/src/handles.ts +42 -3
  217. package/src/index.ts +2 -0
  218. package/src/massParameters.ops.ts +246 -0
  219. package/src/massParameters.ts +427 -0
  220. package/test/drawingContract.test.mjs +288 -0
  221. package/test/errors.test.mjs +1 -4
  222. package/test/massParameters.test.mjs +952 -0
  223. package/test/paperPensContract.test.mjs +75 -0
  224. package/test/presentationViewSettings.test.mjs +85 -0
  225. package/api-manifest.full.json +0 -6928
  226. package/snaptrude-plugin-core-0.11.0.tgz +0 -0
@@ -0,0 +1,328 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ import { ComponentHandle } from "../../handles";
4
+ import { PluginSpreadsheetCell } from "./spreadsheet";
5
+ /**
6
+ * Program metadata — the user-defined **custom columns** of the Program Data
7
+ * sheet and their per-space values.
8
+ *
9
+ * In program mode a **metadata header** is a custom column (e.g. "Department
10
+ * Code", "Occupancy", "Finish Level") added to the Program Data sheet; every
11
+ * space can then carry one **value** per header. This is the same store the
12
+ * Program tab reads and writes — values set here appear in the default Program
13
+ * Data sheet and in every custom sheet that shows the column, and values typed
14
+ * into the sheet are read back here. The store lives in the editor, so **no
15
+ * method in this namespace needs the Program tab open**.
16
+ *
17
+ * Headers are identified by a stable `headerId`. Values are plain cells
18
+ * (`string | number | boolean | null`); `null` clears a value. Departments and
19
+ * labels also carry metadata in the engine, but this namespace covers **spaces**
20
+ * (Mass/Floor components) — the per-space case plugins asked for.
21
+ *
22
+ * Reads never throw for a miss (`get` returns `null`, `list*` return `[]`).
23
+ * Writes are undoable and autosaved.
24
+ *
25
+ * Accessed via `snaptrude.program.metadata`.
26
+ */
27
+ export declare abstract class PluginProgramMetadataApi {
28
+ constructor();
29
+ /**
30
+ * List the metadata headers (custom columns) of the Program Data sheet.
31
+ *
32
+ * @returns A {@linkcode PluginProgramMetadataListHeadersResult} with a
33
+ * `headers` array (empty when the project has no custom columns).
34
+ *
35
+ * @examplePrompt List the custom metadata columns in program mode
36
+ * @examplePrompt What metadata headers does the program sheet have?
37
+ * @examplePrompt Show every custom column with its id
38
+ *
39
+ * # Example
40
+ * ```ts
41
+ * const { headers } = await snaptrude.program.metadata.listHeaders()
42
+ * for (const h of headers) console.log(h.headerId, h.name)
43
+ * ```
44
+ */
45
+ abstract listHeaders(): PluginApiReturn<PluginProgramMetadataListHeadersResult>;
46
+ /**
47
+ * Create a metadata header (a custom column on the Program Data sheet).
48
+ *
49
+ * Header names are unique per sheet: when a header with the same name already
50
+ * exists it is **reused** and returned (no duplicate column is created), so
51
+ * re-running a plugin is safe. The new column is appended after the sheet's
52
+ * existing custom columns.
53
+ *
54
+ * @param name - Column header text (non-empty).
55
+ * @param options - Optional `description` shown in the column's description
56
+ * row.
57
+ * @returns The created (or reused) {@linkcode PluginProgramMetadataHeader}.
58
+ * @throws If `name` is blank.
59
+ *
60
+ * @examplePrompt Add a custom column called Occupancy to the program sheet
61
+ * @examplePrompt Create a metadata header named Department Code
62
+ * @examplePrompt Make a new program-mode column for Finish Level
63
+ *
64
+ * # Example
65
+ * ```ts
66
+ * const header = await snaptrude.program.metadata.createHeader("Occupancy", {
67
+ * description: "People per room",
68
+ * })
69
+ * ```
70
+ */
71
+ abstract createHeader(name: string, options?: {
72
+ description?: string;
73
+ }): PluginApiReturn<PluginProgramMetadataCreateHeaderResult>;
74
+ /**
75
+ * Get one space's metadata values, keyed by header id.
76
+ *
77
+ * @param spaceId - The space (component id) to read.
78
+ * @returns A {@linkcode PluginProgramMetadataRecord} — `values` holds one entry
79
+ * per header the space has a value for — or `null` when no space has that id.
80
+ *
81
+ * @examplePrompt Get the metadata on this space
82
+ * @examplePrompt Read the custom column values for space sp_12
83
+ * @examplePrompt What is this room's Occupancy metadata?
84
+ *
85
+ * # Example
86
+ * ```ts
87
+ * const record = await snaptrude.program.metadata.get("sp_12")
88
+ * if (record) console.log(record.values)
89
+ * ```
90
+ */
91
+ abstract get(spaceId: ComponentHandle): PluginApiReturn<PluginProgramMetadataGetResult>;
92
+ /**
93
+ * List metadata values for many spaces at once.
94
+ *
95
+ * Pass `spaceIds` to read specific spaces (unknown ids are skipped), or omit
96
+ * it to read every space in the project. One host round-trip regardless of
97
+ * the number of spaces — prefer this over calling
98
+ * {@linkcode PluginProgramMetadataApi.get} in a loop.
99
+ *
100
+ * @param spaceIds - Optional space ids to read; omit for all spaces.
101
+ * @returns A {@linkcode PluginProgramMetadataListResult} with one
102
+ * {@linkcode PluginProgramMetadataRecord} per space.
103
+ *
104
+ * @performance One round-trip for any number of spaces — use this instead of a `get` loop.
105
+ *
106
+ * @examplePrompt List the metadata of every space
107
+ * @examplePrompt Read the custom column values for all rooms
108
+ * @examplePrompt Get the metadata for these three spaces in one call
109
+ *
110
+ * # Example
111
+ * ```ts
112
+ * const { records } = await snaptrude.program.metadata.list()
113
+ * const byId = Object.fromEntries(records.map((r) => [r.spaceId, r.values]))
114
+ * ```
115
+ */
116
+ abstract list(spaceIds?: ComponentHandle[]): PluginApiReturn<PluginProgramMetadataListResult>;
117
+ /**
118
+ * Update a space's metadata values (sparse).
119
+ *
120
+ * Only the headers present in `values` change; `null` clears a value. Every
121
+ * key must be an existing `headerId` (create columns first with
122
+ * {@linkcode PluginProgramMetadataApi.createHeader}). Undoable as one step.
123
+ *
124
+ * @param spaceId - The space (component id) to write.
125
+ * @param values - Header id → new cell value (`null` clears).
126
+ * @returns The space's full {@linkcode PluginProgramMetadataRecord} after the
127
+ * write.
128
+ * @throws If the space or any header id does not exist.
129
+ *
130
+ * @examplePrompt Set the Occupancy metadata of this space to 4
131
+ * @examplePrompt Store a department code on the selected rooms
132
+ * @examplePrompt Write custom column values onto space sp_12
133
+ * @examplePrompt Clear the Finish Level metadata on this space
134
+ *
135
+ * # Example
136
+ * ```ts
137
+ * const header = await snaptrude.program.metadata.createHeader("Occupancy")
138
+ * await snaptrude.program.metadata.update("sp_12", { [header.headerId]: 4 })
139
+ * ```
140
+ */
141
+ abstract update(spaceId: ComponentHandle, values: Record<string, PluginSpreadsheetCell>): PluginApiReturn<PluginProgramMetadataUpdateResult>;
142
+ /**
143
+ * Update metadata values on many spaces in one undoable step.
144
+ *
145
+ * The plural of {@linkcode PluginProgramMetadataApi.update}: each item names a
146
+ * space and its sparse `values`. Results are in input order. Capped at 1000
147
+ * items per call.
148
+ *
149
+ * @param items - The spaces and the values to write on each.
150
+ * @returns A {@linkcode PluginProgramMetadataUpdateManyResult} with one record
151
+ * per item, in input order.
152
+ * @throws If any space or header id does not exist (nothing is written).
153
+ *
154
+ * @performance One round-trip and one undo step for up to 1000 spaces — use this instead of an `update` loop.
155
+ *
156
+ * @examplePrompt Fill the Occupancy column for all bedrooms
157
+ * @examplePrompt Write metadata onto every selected space at once
158
+ * @examplePrompt Bulk-update custom column values
159
+ *
160
+ * # Example
161
+ * ```ts
162
+ * await snaptrude.program.metadata.updateMany([
163
+ * { spaceId: "sp_12", values: { [headerId]: 4 } },
164
+ * { spaceId: "sp_13", values: { [headerId]: 2 } },
165
+ * ])
166
+ * ```
167
+ */
168
+ abstract updateMany(items: PluginProgramMetadataUpdateItem[]): PluginApiReturn<PluginProgramMetadataUpdateManyResult>;
169
+ }
170
+ /**
171
+ * A metadata header — one custom column of the Program Data sheet.
172
+ *
173
+ * | Property | Type | Description |
174
+ * |---|---|---|
175
+ * | `headerId` | `string` | Stable header id (the key used in metadata `values`) |
176
+ * | `name` | `string` | Column header text |
177
+ * | `description` | `string` | Column description (`""` when none) |
178
+ * | `columnIndex` | `number` | Zero-based column index on the Program Data sheet |
179
+ */
180
+ export declare const PluginProgramMetadataHeader: z.ZodObject<{
181
+ headerId: z.ZodString;
182
+ name: z.ZodString;
183
+ description: z.ZodString;
184
+ columnIndex: z.ZodNumber;
185
+ }, z.core.$strip>;
186
+ export type PluginProgramMetadataHeader = z.infer<typeof PluginProgramMetadataHeader>;
187
+ /**
188
+ * Result of {@linkcode PluginProgramMetadataApi.listHeaders}.
189
+ *
190
+ * | Property | Type | Description |
191
+ * |---|---|---|
192
+ * | `headers` | {@linkcode PluginProgramMetadataHeader}`[]` | Every custom column, in sheet column order |
193
+ */
194
+ export declare const PluginProgramMetadataListHeadersResult: z.ZodObject<{
195
+ headers: z.ZodArray<z.ZodObject<{
196
+ headerId: z.ZodString;
197
+ name: z.ZodString;
198
+ description: z.ZodString;
199
+ columnIndex: z.ZodNumber;
200
+ }, z.core.$strip>>;
201
+ }, z.core.$strip>;
202
+ export type PluginProgramMetadataListHeadersResult = z.infer<typeof PluginProgramMetadataListHeadersResult>;
203
+ /**
204
+ * Arguments for {@linkcode PluginProgramMetadataApi.createHeader}.
205
+ *
206
+ * | Property | Type | Description |
207
+ * |---|---|---|
208
+ * | `name` | `string` | Column header text (non-empty) |
209
+ * | `description` | `string?` | Column description |
210
+ */
211
+ export declare const PluginProgramMetadataCreateHeaderArgs: z.ZodObject<{
212
+ name: z.ZodString;
213
+ description: z.ZodOptional<z.ZodString>;
214
+ }, z.core.$strip>;
215
+ export type PluginProgramMetadataCreateHeaderArgs = z.infer<typeof PluginProgramMetadataCreateHeaderArgs>;
216
+ /** Result of {@linkcode PluginProgramMetadataApi.createHeader} — the created or reused header. */
217
+ export declare const PluginProgramMetadataCreateHeaderResult: z.ZodObject<{
218
+ headerId: z.ZodString;
219
+ name: z.ZodString;
220
+ description: z.ZodString;
221
+ columnIndex: z.ZodNumber;
222
+ }, z.core.$strip>;
223
+ export type PluginProgramMetadataCreateHeaderResult = z.infer<typeof PluginProgramMetadataCreateHeaderResult>;
224
+ /**
225
+ * One space's metadata values.
226
+ *
227
+ * | Property | Type | Description |
228
+ * |---|---|---|
229
+ * | `spaceId` | `ComponentHandle` | The space's component id |
230
+ * | `values` | `Record<string, cell>` | Header id → value, one entry per header the space has a value for |
231
+ */
232
+ export declare const PluginProgramMetadataRecord: z.ZodObject<{
233
+ spaceId: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
234
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
235
+ }, z.core.$strip>;
236
+ export type PluginProgramMetadataRecord = z.infer<typeof PluginProgramMetadataRecord>;
237
+ /** Arguments for {@linkcode PluginProgramMetadataApi.get}. */
238
+ export declare const PluginProgramMetadataGetArgs: z.ZodObject<{
239
+ spaceId: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
240
+ }, z.core.$strip>;
241
+ export type PluginProgramMetadataGetArgs = z.infer<typeof PluginProgramMetadataGetArgs>;
242
+ /** Result of {@linkcode PluginProgramMetadataApi.get} — the record, or `null` when the space does not exist. */
243
+ export declare const PluginProgramMetadataGetResult: z.ZodNullable<z.ZodObject<{
244
+ spaceId: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
245
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
246
+ }, z.core.$strip>>;
247
+ export type PluginProgramMetadataGetResult = z.infer<typeof PluginProgramMetadataGetResult>;
248
+ /**
249
+ * Arguments for {@linkcode PluginProgramMetadataApi.list}.
250
+ *
251
+ * | Property | Type | Description |
252
+ * |---|---|---|
253
+ * | `spaceIds` | `ComponentHandle[]?` | Spaces to read; omit for every space |
254
+ */
255
+ export declare const PluginProgramMetadataListArgs: z.ZodObject<{
256
+ spaceIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>>;
257
+ }, z.core.$strip>;
258
+ export type PluginProgramMetadataListArgs = z.infer<typeof PluginProgramMetadataListArgs>;
259
+ /**
260
+ * Result of {@linkcode PluginProgramMetadataApi.list}.
261
+ *
262
+ * | Property | Type | Description |
263
+ * |---|---|---|
264
+ * | `records` | {@linkcode PluginProgramMetadataRecord}`[]` | One record per space (unknown ids skipped) |
265
+ */
266
+ export declare const PluginProgramMetadataListResult: z.ZodObject<{
267
+ records: z.ZodArray<z.ZodObject<{
268
+ spaceId: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
269
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
270
+ }, z.core.$strip>>;
271
+ }, z.core.$strip>;
272
+ export type PluginProgramMetadataListResult = z.infer<typeof PluginProgramMetadataListResult>;
273
+ /**
274
+ * Arguments for {@linkcode PluginProgramMetadataApi.update}.
275
+ *
276
+ * | Property | Type | Description |
277
+ * |---|---|---|
278
+ * | `spaceId` | `ComponentHandle` | The space to write |
279
+ * | `values` | `Record<string, cell>` | Header id → new value (`null` clears); at least one entry |
280
+ */
281
+ export declare const PluginProgramMetadataUpdateArgs: z.ZodObject<{
282
+ spaceId: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
283
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
284
+ }, z.core.$strip>;
285
+ export type PluginProgramMetadataUpdateArgs = z.infer<typeof PluginProgramMetadataUpdateArgs>;
286
+ /** Result of {@linkcode PluginProgramMetadataApi.update} — the space's record after the write. */
287
+ export declare const PluginProgramMetadataUpdateResult: z.ZodObject<{
288
+ spaceId: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
289
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
290
+ }, z.core.$strip>;
291
+ export type PluginProgramMetadataUpdateResult = z.infer<typeof PluginProgramMetadataUpdateResult>;
292
+ /** One item of {@linkcode PluginProgramMetadataApi.updateMany} — mirrors the `update` args. */
293
+ export declare const PluginProgramMetadataUpdateItem: z.ZodObject<{
294
+ spaceId: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
295
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
296
+ }, z.core.$strip>;
297
+ export type PluginProgramMetadataUpdateItem = z.infer<typeof PluginProgramMetadataUpdateItem>;
298
+ /** Maximum items per {@linkcode PluginProgramMetadataApi.updateMany} call. */
299
+ export declare const PLUGIN_PROGRAM_METADATA_BATCH_LIMIT = 1000;
300
+ /**
301
+ * Arguments for {@linkcode PluginProgramMetadataApi.updateMany}.
302
+ *
303
+ * | Property | Type | Description |
304
+ * |---|---|---|
305
+ * | `items` | {@linkcode PluginProgramMetadataUpdateItem}`[]` | 1–1000 space updates |
306
+ */
307
+ export declare const PluginProgramMetadataUpdateManyArgs: z.ZodObject<{
308
+ items: z.ZodArray<z.ZodObject<{
309
+ spaceId: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
310
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
311
+ }, z.core.$strip>>;
312
+ }, z.core.$strip>;
313
+ export type PluginProgramMetadataUpdateManyArgs = z.infer<typeof PluginProgramMetadataUpdateManyArgs>;
314
+ /**
315
+ * Result of {@linkcode PluginProgramMetadataApi.updateMany}.
316
+ *
317
+ * | Property | Type | Description |
318
+ * |---|---|---|
319
+ * | `records` | {@linkcode PluginProgramMetadataRecord}`[]` | One record per item, in input order |
320
+ */
321
+ export declare const PluginProgramMetadataUpdateManyResult: z.ZodObject<{
322
+ records: z.ZodArray<z.ZodObject<{
323
+ spaceId: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
324
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
325
+ }, z.core.$strip>>;
326
+ }, z.core.$strip>;
327
+ export type PluginProgramMetadataUpdateManyResult = z.infer<typeof PluginProgramMetadataUpdateManyResult>;
328
+ //# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/api/program/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAErD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,8BAAsB,wBAAwB;;IAG5C;;;;;;;;;;;;;;;OAeG;aACa,WAAW,IAAI,eAAe,CAAC,sCAAsC,CAAC;IAEtF;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;aACa,YAAY,CAC1B,IAAI,EAAE,MAA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,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC;;;;;iBAEhD,CAAA;AACF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACzD,OAAO,qCAAqC,CAC7C,CAAA"}
@@ -703,8 +703,8 @@ export type PluginProgramSiteWeatherResult = z.infer<typeof PluginProgramSiteWea
703
703
  * never appears — the backend synonym resolves to `front`.
704
704
  */
705
705
  export declare const PluginProgramSiteEdgeRole: z.ZodEnum<{
706
- front: "front";
707
706
  side: "side";
707
+ front: "front";
708
708
  rear: "rear";
709
709
  }>;
710
710
  export type PluginProgramSiteEdgeRole = z.infer<typeof PluginProgramSiteEdgeRole>;
@@ -733,8 +733,8 @@ export declare const PluginProgramSiteEdge: z.ZodObject<{
733
733
  }, z.core.$strip>;
734
734
  lengthMeters: z.ZodNumber;
735
735
  role: z.ZodEnum<{
736
- front: "front";
737
736
  side: "side";
737
+ front: "front";
738
738
  rear: "rear";
739
739
  }>;
740
740
  roleSource: z.ZodEnum<{
@@ -772,8 +772,8 @@ export declare const PluginProgramSiteEdgesEntry: z.ZodObject<{
772
772
  }, z.core.$strip>;
773
773
  lengthMeters: z.ZodNumber;
774
774
  role: z.ZodEnum<{
775
- front: "front";
776
775
  side: "side";
776
+ front: "front";
777
777
  rear: "rear";
778
778
  }>;
779
779
  roleSource: z.ZodEnum<{
@@ -807,8 +807,8 @@ export declare const PluginProgramSiteListEdgesResult: z.ZodObject<{
807
807
  }, z.core.$strip>;
808
808
  lengthMeters: z.ZodNumber;
809
809
  role: z.ZodEnum<{
810
- front: "front";
811
810
  side: "side";
811
+ front: "front";
812
812
  rear: "rear";
813
813
  }>;
814
814
  roleSource: z.ZodEnum<{