@vertesia/common 0.24.0-dev.202601221707

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 (388) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +53 -0
  3. package/lib/cjs/Progress.js +61 -0
  4. package/lib/cjs/Progress.js.map +1 -0
  5. package/lib/cjs/access-control.js +56 -0
  6. package/lib/cjs/access-control.js.map +1 -0
  7. package/lib/cjs/analytics.js +3 -0
  8. package/lib/cjs/analytics.js.map +1 -0
  9. package/lib/cjs/apikey.js +16 -0
  10. package/lib/cjs/apikey.js.map +1 -0
  11. package/lib/cjs/apps.js +35 -0
  12. package/lib/cjs/apps.js.map +1 -0
  13. package/lib/cjs/ask-user.js +8 -0
  14. package/lib/cjs/ask-user.js.map +1 -0
  15. package/lib/cjs/channels.js +63 -0
  16. package/lib/cjs/channels.js.map +1 -0
  17. package/lib/cjs/common.js +3 -0
  18. package/lib/cjs/common.js.map +1 -0
  19. package/lib/cjs/data-platform.js +127 -0
  20. package/lib/cjs/data-platform.js.map +1 -0
  21. package/lib/cjs/email.js +20 -0
  22. package/lib/cjs/email.js.map +1 -0
  23. package/lib/cjs/environment.js +44 -0
  24. package/lib/cjs/environment.js.map +1 -0
  25. package/lib/cjs/facets.js +3 -0
  26. package/lib/cjs/facets.js.map +1 -0
  27. package/lib/cjs/group.js +5 -0
  28. package/lib/cjs/group.js.map +1 -0
  29. package/lib/cjs/index.js +55 -0
  30. package/lib/cjs/index.js.map +1 -0
  31. package/lib/cjs/integrations.js +14 -0
  32. package/lib/cjs/integrations.js.map +1 -0
  33. package/lib/cjs/interaction.js +97 -0
  34. package/lib/cjs/interaction.js.map +1 -0
  35. package/lib/cjs/json-schema.js +3 -0
  36. package/lib/cjs/json-schema.js.map +1 -0
  37. package/lib/cjs/json.js +3 -0
  38. package/lib/cjs/json.js.map +1 -0
  39. package/lib/cjs/meters.js +13 -0
  40. package/lib/cjs/meters.js.map +1 -0
  41. package/lib/cjs/model_utility.js +6 -0
  42. package/lib/cjs/model_utility.js.map +1 -0
  43. package/lib/cjs/package.json +3 -0
  44. package/lib/cjs/payload.js +3 -0
  45. package/lib/cjs/payload.js.map +1 -0
  46. package/lib/cjs/pending-asks.js +7 -0
  47. package/lib/cjs/pending-asks.js.map +1 -0
  48. package/lib/cjs/project.js +107 -0
  49. package/lib/cjs/project.js.map +1 -0
  50. package/lib/cjs/prompt.js +21 -0
  51. package/lib/cjs/prompt.js.map +1 -0
  52. package/lib/cjs/query.js +3 -0
  53. package/lib/cjs/query.js.map +1 -0
  54. package/lib/cjs/rate-limiter.js +6 -0
  55. package/lib/cjs/rate-limiter.js.map +1 -0
  56. package/lib/cjs/refs.js +14 -0
  57. package/lib/cjs/refs.js.map +1 -0
  58. package/lib/cjs/runs.js +3 -0
  59. package/lib/cjs/runs.js.map +1 -0
  60. package/lib/cjs/skill.js +14 -0
  61. package/lib/cjs/skill.js.map +1 -0
  62. package/lib/cjs/store/activity-catalog.js +3 -0
  63. package/lib/cjs/store/activity-catalog.js.map +1 -0
  64. package/lib/cjs/store/collections.js +9 -0
  65. package/lib/cjs/store/collections.js.map +1 -0
  66. package/lib/cjs/store/common.js +3 -0
  67. package/lib/cjs/store/common.js.map +1 -0
  68. package/lib/cjs/store/conversation-state.js +3 -0
  69. package/lib/cjs/store/conversation-state.js.map +1 -0
  70. package/lib/cjs/store/doc-analyzer.js +3 -0
  71. package/lib/cjs/store/doc-analyzer.js.map +1 -0
  72. package/lib/cjs/store/dsl-workflow.js +5 -0
  73. package/lib/cjs/store/dsl-workflow.js.map +1 -0
  74. package/lib/cjs/store/index.js +30 -0
  75. package/lib/cjs/store/index.js.map +1 -0
  76. package/lib/cjs/store/object-types.js +98 -0
  77. package/lib/cjs/store/object-types.js.map +1 -0
  78. package/lib/cjs/store/schedule.js +32 -0
  79. package/lib/cjs/store/schedule.js.map +1 -0
  80. package/lib/cjs/store/signals.js +3 -0
  81. package/lib/cjs/store/signals.js.map +1 -0
  82. package/lib/cjs/store/store.js +166 -0
  83. package/lib/cjs/store/store.js.map +1 -0
  84. package/lib/cjs/store/temporalio.js +44 -0
  85. package/lib/cjs/store/temporalio.js.map +1 -0
  86. package/lib/cjs/store/worker.js +3 -0
  87. package/lib/cjs/store/worker.js.map +1 -0
  88. package/lib/cjs/store/workflow.js +241 -0
  89. package/lib/cjs/store/workflow.js.map +1 -0
  90. package/lib/cjs/sts-token-types.js +32 -0
  91. package/lib/cjs/sts-token-types.js.map +1 -0
  92. package/lib/cjs/tenant.js +3 -0
  93. package/lib/cjs/tenant.js.map +1 -0
  94. package/lib/cjs/tool-execution.js +6 -0
  95. package/lib/cjs/tool-execution.js.map +1 -0
  96. package/lib/cjs/training.js +14 -0
  97. package/lib/cjs/training.js.map +1 -0
  98. package/lib/cjs/transient-tokens.js +9 -0
  99. package/lib/cjs/transient-tokens.js.map +1 -0
  100. package/lib/cjs/user.js +25 -0
  101. package/lib/cjs/user.js.map +1 -0
  102. package/lib/cjs/utils/auth.js +15 -0
  103. package/lib/cjs/utils/auth.js.map +1 -0
  104. package/lib/cjs/utils/schemas.js +114 -0
  105. package/lib/cjs/utils/schemas.js.map +1 -0
  106. package/lib/cjs/utils/type-helpers.js +3 -0
  107. package/lib/cjs/utils/type-helpers.js.map +1 -0
  108. package/lib/cjs/versions.js +8 -0
  109. package/lib/cjs/versions.js.map +1 -0
  110. package/lib/cjs/workflow-analytics.js +52 -0
  111. package/lib/cjs/workflow-analytics.js.map +1 -0
  112. package/lib/esm/Progress.js +57 -0
  113. package/lib/esm/Progress.js.map +1 -0
  114. package/lib/esm/access-control.js +53 -0
  115. package/lib/esm/access-control.js.map +1 -0
  116. package/lib/esm/analytics.js +2 -0
  117. package/lib/esm/analytics.js.map +1 -0
  118. package/lib/esm/apikey.js +13 -0
  119. package/lib/esm/apikey.js.map +1 -0
  120. package/lib/esm/apps.js +32 -0
  121. package/lib/esm/apps.js.map +1 -0
  122. package/lib/esm/ask-user.js +7 -0
  123. package/lib/esm/ask-user.js.map +1 -0
  124. package/lib/esm/channels.js +57 -0
  125. package/lib/esm/channels.js.map +1 -0
  126. package/lib/esm/common.js +2 -0
  127. package/lib/esm/common.js.map +1 -0
  128. package/lib/esm/data-platform.js +124 -0
  129. package/lib/esm/data-platform.js.map +1 -0
  130. package/lib/esm/email.js +16 -0
  131. package/lib/esm/email.js.map +1 -0
  132. package/lib/esm/environment.js +41 -0
  133. package/lib/esm/environment.js.map +1 -0
  134. package/lib/esm/facets.js +2 -0
  135. package/lib/esm/facets.js.map +1 -0
  136. package/lib/esm/group.js +2 -0
  137. package/lib/esm/group.js.map +1 -0
  138. package/lib/esm/index.js +39 -0
  139. package/lib/esm/index.js.map +1 -0
  140. package/lib/esm/integrations.js +11 -0
  141. package/lib/esm/integrations.js.map +1 -0
  142. package/lib/esm/interaction.js +92 -0
  143. package/lib/esm/interaction.js.map +1 -0
  144. package/lib/esm/json-schema.js +2 -0
  145. package/lib/esm/json-schema.js.map +1 -0
  146. package/lib/esm/json.js +2 -0
  147. package/lib/esm/json.js.map +1 -0
  148. package/lib/esm/meters.js +10 -0
  149. package/lib/esm/meters.js.map +1 -0
  150. package/lib/esm/model_utility.js +2 -0
  151. package/lib/esm/model_utility.js.map +1 -0
  152. package/lib/esm/payload.js +2 -0
  153. package/lib/esm/payload.js.map +1 -0
  154. package/lib/esm/pending-asks.js +6 -0
  155. package/lib/esm/pending-asks.js.map +1 -0
  156. package/lib/esm/project.js +102 -0
  157. package/lib/esm/project.js.map +1 -0
  158. package/lib/esm/prompt.js +18 -0
  159. package/lib/esm/prompt.js.map +1 -0
  160. package/lib/esm/query.js +2 -0
  161. package/lib/esm/query.js.map +1 -0
  162. package/lib/esm/rate-limiter.js +5 -0
  163. package/lib/esm/rate-limiter.js.map +1 -0
  164. package/lib/esm/refs.js +11 -0
  165. package/lib/esm/refs.js.map +1 -0
  166. package/lib/esm/runs.js +2 -0
  167. package/lib/esm/runs.js.map +1 -0
  168. package/lib/esm/skill.js +13 -0
  169. package/lib/esm/skill.js.map +1 -0
  170. package/lib/esm/store/activity-catalog.js +2 -0
  171. package/lib/esm/store/activity-catalog.js.map +1 -0
  172. package/lib/esm/store/collections.js +6 -0
  173. package/lib/esm/store/collections.js.map +1 -0
  174. package/lib/esm/store/common.js +2 -0
  175. package/lib/esm/store/common.js.map +1 -0
  176. package/lib/esm/store/conversation-state.js +2 -0
  177. package/lib/esm/store/conversation-state.js.map +1 -0
  178. package/lib/esm/store/doc-analyzer.js +2 -0
  179. package/lib/esm/store/doc-analyzer.js.map +1 -0
  180. package/lib/esm/store/dsl-workflow.js +2 -0
  181. package/lib/esm/store/dsl-workflow.js.map +1 -0
  182. package/lib/esm/store/index.js +14 -0
  183. package/lib/esm/store/index.js.map +1 -0
  184. package/lib/esm/store/object-types.js +95 -0
  185. package/lib/esm/store/object-types.js.map +1 -0
  186. package/lib/esm/store/schedule.js +29 -0
  187. package/lib/esm/store/schedule.js.map +1 -0
  188. package/lib/esm/store/signals.js +2 -0
  189. package/lib/esm/store/signals.js.map +1 -0
  190. package/lib/esm/store/store.js +160 -0
  191. package/lib/esm/store/store.js.map +1 -0
  192. package/lib/esm/store/temporalio.js +41 -0
  193. package/lib/esm/store/temporalio.js.map +1 -0
  194. package/lib/esm/store/worker.js +2 -0
  195. package/lib/esm/store/worker.js.map +1 -0
  196. package/lib/esm/store/workflow.js +228 -0
  197. package/lib/esm/store/workflow.js.map +1 -0
  198. package/lib/esm/sts-token-types.js +24 -0
  199. package/lib/esm/sts-token-types.js.map +1 -0
  200. package/lib/esm/tenant.js +2 -0
  201. package/lib/esm/tenant.js.map +1 -0
  202. package/lib/esm/tool-execution.js +5 -0
  203. package/lib/esm/tool-execution.js.map +1 -0
  204. package/lib/esm/training.js +11 -0
  205. package/lib/esm/training.js.map +1 -0
  206. package/lib/esm/transient-tokens.js +6 -0
  207. package/lib/esm/transient-tokens.js.map +1 -0
  208. package/lib/esm/user.js +22 -0
  209. package/lib/esm/user.js.map +1 -0
  210. package/lib/esm/utils/auth.js +11 -0
  211. package/lib/esm/utils/auth.js.map +1 -0
  212. package/lib/esm/utils/schemas.js +107 -0
  213. package/lib/esm/utils/schemas.js.map +1 -0
  214. package/lib/esm/utils/type-helpers.js +2 -0
  215. package/lib/esm/utils/type-helpers.js.map +1 -0
  216. package/lib/esm/versions.js +5 -0
  217. package/lib/esm/versions.js.map +1 -0
  218. package/lib/esm/workflow-analytics.js +49 -0
  219. package/lib/esm/workflow-analytics.js.map +1 -0
  220. package/lib/tsconfig.tsbuildinfo +1 -0
  221. package/lib/types/Progress.d.ts +21 -0
  222. package/lib/types/Progress.d.ts.map +1 -0
  223. package/lib/types/access-control.d.ts +73 -0
  224. package/lib/types/access-control.d.ts.map +1 -0
  225. package/lib/types/analytics.d.ts +87 -0
  226. package/lib/types/analytics.d.ts.map +1 -0
  227. package/lib/types/apikey.d.ts +98 -0
  228. package/lib/types/apikey.d.ts.map +1 -0
  229. package/lib/types/apps.d.ts +236 -0
  230. package/lib/types/apps.d.ts.map +1 -0
  231. package/lib/types/ask-user.d.ts +32 -0
  232. package/lib/types/ask-user.d.ts.map +1 -0
  233. package/lib/types/channels.d.ts +21 -0
  234. package/lib/types/channels.d.ts.map +1 -0
  235. package/lib/types/common.d.ts +31 -0
  236. package/lib/types/common.d.ts.map +1 -0
  237. package/lib/types/data-platform.d.ts +860 -0
  238. package/lib/types/data-platform.d.ts.map +1 -0
  239. package/lib/types/email.d.ts +66 -0
  240. package/lib/types/email.d.ts.map +1 -0
  241. package/lib/types/environment.d.ts +106 -0
  242. package/lib/types/environment.d.ts.map +1 -0
  243. package/lib/types/facets.d.ts +34 -0
  244. package/lib/types/facets.d.ts.map +1 -0
  245. package/lib/types/group.d.ts +21 -0
  246. package/lib/types/group.d.ts.map +1 -0
  247. package/lib/types/index.d.ts +39 -0
  248. package/lib/types/index.d.ts.map +1 -0
  249. package/lib/types/integrations.d.ts +60 -0
  250. package/lib/types/integrations.d.ts.map +1 -0
  251. package/lib/types/interaction.d.ts +958 -0
  252. package/lib/types/interaction.d.ts.map +1 -0
  253. package/lib/types/json-schema.d.ts +1 -0
  254. package/lib/types/json-schema.d.ts.map +1 -0
  255. package/lib/types/json.d.ts +1 -0
  256. package/lib/types/json.d.ts.map +1 -0
  257. package/lib/types/meters.d.ts +23 -0
  258. package/lib/types/meters.d.ts.map +1 -0
  259. package/lib/types/model_utility.d.ts +1 -0
  260. package/lib/types/model_utility.d.ts.map +1 -0
  261. package/lib/types/payload.d.ts +60 -0
  262. package/lib/types/payload.d.ts.map +1 -0
  263. package/lib/types/pending-asks.d.ts +93 -0
  264. package/lib/types/pending-asks.d.ts.map +1 -0
  265. package/lib/types/project.d.ts +179 -0
  266. package/lib/types/project.d.ts.map +1 -0
  267. package/lib/types/prompt.d.ts +78 -0
  268. package/lib/types/prompt.d.ts.map +1 -0
  269. package/lib/types/query.d.ts +118 -0
  270. package/lib/types/query.d.ts.map +1 -0
  271. package/lib/types/rate-limiter.d.ts +28 -0
  272. package/lib/types/rate-limiter.d.ts.map +1 -0
  273. package/lib/types/refs.d.ts +22 -0
  274. package/lib/types/refs.d.ts.map +1 -0
  275. package/lib/types/runs.d.ts +32 -0
  276. package/lib/types/runs.d.ts.map +1 -0
  277. package/lib/types/skill.d.ts +78 -0
  278. package/lib/types/skill.d.ts.map +1 -0
  279. package/lib/types/store/activity-catalog.d.ts +26 -0
  280. package/lib/types/store/activity-catalog.d.ts.map +1 -0
  281. package/lib/types/store/collections.d.ts +78 -0
  282. package/lib/types/store/collections.d.ts.map +1 -0
  283. package/lib/types/store/common.d.ts +22 -0
  284. package/lib/types/store/common.d.ts.map +1 -0
  285. package/lib/types/store/conversation-state.d.ts +120 -0
  286. package/lib/types/store/conversation-state.d.ts.map +1 -0
  287. package/lib/types/store/doc-analyzer.d.ts +140 -0
  288. package/lib/types/store/doc-analyzer.d.ts.map +1 -0
  289. package/lib/types/store/dsl-workflow.d.ts +244 -0
  290. package/lib/types/store/dsl-workflow.d.ts.map +1 -0
  291. package/lib/types/store/index.d.ts +13 -0
  292. package/lib/types/store/index.d.ts.map +1 -0
  293. package/lib/types/store/object-types.d.ts +23 -0
  294. package/lib/types/store/object-types.d.ts.map +1 -0
  295. package/lib/types/store/schedule.d.ts +182 -0
  296. package/lib/types/store/schedule.d.ts.map +1 -0
  297. package/lib/types/store/signals.d.ts +24 -0
  298. package/lib/types/store/signals.d.ts.map +1 -0
  299. package/lib/types/store/store.d.ts +407 -0
  300. package/lib/types/store/store.d.ts.map +1 -0
  301. package/lib/types/store/temporalio.d.ts +16 -0
  302. package/lib/types/store/temporalio.d.ts.map +1 -0
  303. package/lib/types/store/worker.d.ts +18 -0
  304. package/lib/types/store/worker.d.ts.map +1 -0
  305. package/lib/types/store/workflow.d.ts +730 -0
  306. package/lib/types/store/workflow.d.ts.map +1 -0
  307. package/lib/types/sts-token-types.d.ts +72 -0
  308. package/lib/types/sts-token-types.d.ts.map +1 -0
  309. package/lib/types/tenant.d.ts +10 -0
  310. package/lib/types/tenant.d.ts.map +1 -0
  311. package/lib/types/tool-execution.d.ts +45 -0
  312. package/lib/types/tool-execution.d.ts.map +1 -0
  313. package/lib/types/training.d.ts +38 -0
  314. package/lib/types/training.d.ts.map +1 -0
  315. package/lib/types/transient-tokens.d.ts +24 -0
  316. package/lib/types/transient-tokens.d.ts.map +1 -0
  317. package/lib/types/user.d.ts +116 -0
  318. package/lib/types/user.d.ts.map +1 -0
  319. package/lib/types/utils/auth.d.ts +3 -0
  320. package/lib/types/utils/auth.d.ts.map +1 -0
  321. package/lib/types/utils/schemas.d.ts +9 -0
  322. package/lib/types/utils/schemas.d.ts.map +1 -0
  323. package/lib/types/utils/type-helpers.d.ts +3 -0
  324. package/lib/types/utils/type-helpers.d.ts.map +1 -0
  325. package/lib/types/versions.d.ts +3 -0
  326. package/lib/types/versions.d.ts.map +1 -0
  327. package/lib/types/workflow-analytics.d.ts +777 -0
  328. package/lib/types/workflow-analytics.d.ts.map +1 -0
  329. package/lib/vertesia-common.js +2 -0
  330. package/lib/vertesia-common.js.map +1 -0
  331. package/package.json +54 -0
  332. package/src/Progress.ts +57 -0
  333. package/src/access-control.ts +98 -0
  334. package/src/analytics.ts +106 -0
  335. package/src/apikey.ts +116 -0
  336. package/src/apps.ts +296 -0
  337. package/src/ask-user.ts +35 -0
  338. package/src/channels.ts +70 -0
  339. package/src/common.ts +37 -0
  340. package/src/data-platform.ts +976 -0
  341. package/src/email.ts +80 -0
  342. package/src/environment.ts +137 -0
  343. package/src/facets.ts +44 -0
  344. package/src/group.ts +26 -0
  345. package/src/index.ts +40 -0
  346. package/src/integrations.ts +72 -0
  347. package/src/interaction.ts +1182 -0
  348. package/src/json-schema.ts +7 -0
  349. package/src/json.ts +4 -0
  350. package/src/meters.ts +30 -0
  351. package/src/model_utility.ts +1 -0
  352. package/src/payload.ts +83 -0
  353. package/src/pending-asks.ts +106 -0
  354. package/src/project.ts +263 -0
  355. package/src/prompt.ts +103 -0
  356. package/src/query.ts +137 -0
  357. package/src/rate-limiter.ts +34 -0
  358. package/src/refs.ts +30 -0
  359. package/src/runs.ts +36 -0
  360. package/src/skill.ts +90 -0
  361. package/src/store/activity-catalog.ts +44 -0
  362. package/src/store/collections.ts +87 -0
  363. package/src/store/common.ts +30 -0
  364. package/src/store/conversation-state.ts +146 -0
  365. package/src/store/doc-analyzer.ts +161 -0
  366. package/src/store/dsl-workflow.ts +288 -0
  367. package/src/store/index.ts +14 -0
  368. package/src/store/ms.d.ts +11 -0
  369. package/src/store/object-types.ts +127 -0
  370. package/src/store/schedule.ts +238 -0
  371. package/src/store/signals.ts +25 -0
  372. package/src/store/store.ts +579 -0
  373. package/src/store/temporalio.ts +54 -0
  374. package/src/store/worker.ts +19 -0
  375. package/src/store/workflow.test.ts +578 -0
  376. package/src/store/workflow.ts +973 -0
  377. package/src/sts-token-types.ts +117 -0
  378. package/src/tenant.ts +10 -0
  379. package/src/tool-execution.ts +47 -0
  380. package/src/training.ts +44 -0
  381. package/src/transient-tokens.ts +30 -0
  382. package/src/user.ts +153 -0
  383. package/src/utils/auth.ts +12 -0
  384. package/src/utils/schemas.ts +108 -0
  385. package/src/utils/type-helpers.ts +6 -0
  386. package/src/versions.ts +3 -0
  387. package/src/workflow-analytics.ts +925 -0
  388. package/tsconfig.dist.json +20 -0
@@ -0,0 +1,860 @@
1
+ /**
2
+ * Data Platform Types
3
+ *
4
+ * Types for managing versioned analytical data stores with DuckDB + GCS storage.
5
+ * Supports AI-manageable schemas and multi-table atomic operations.
6
+ */
7
+ import { BaseObject } from './store/common.js';
8
+ /**
9
+ * Supported column data types for DuckDB tables.
10
+ */
11
+ export declare enum DataColumnType {
12
+ STRING = "STRING",
13
+ INTEGER = "INTEGER",
14
+ BIGINT = "BIGINT",
15
+ FLOAT = "FLOAT",
16
+ DOUBLE = "DOUBLE",
17
+ DECIMAL = "DECIMAL",
18
+ BOOLEAN = "BOOLEAN",
19
+ DATE = "DATE",
20
+ TIMESTAMP = "TIMESTAMP",
21
+ JSON = "JSON"
22
+ }
23
+ /**
24
+ * Semantic types that provide AI agents with context about column meaning.
25
+ */
26
+ export declare enum SemanticColumnType {
27
+ EMAIL = "email",
28
+ PHONE = "phone",
29
+ URL = "url",
30
+ CURRENCY = "currency",
31
+ PERCENTAGE = "percentage",
32
+ PERSON_NAME = "person_name",
33
+ ADDRESS = "address",
34
+ COUNTRY = "country",
35
+ DATE_ISO = "date_iso",
36
+ IDENTIFIER = "identifier"
37
+ }
38
+ /**
39
+ * Mapping from DataColumnType to DuckDB SQL types.
40
+ */
41
+ export declare const DATA_COLUMN_TYPE_TO_DUCKDB: Record<DataColumnType, string>;
42
+ /**
43
+ * Column definition for a data table.
44
+ */
45
+ export interface DataColumn {
46
+ /** Column name (must be valid SQL identifier) */
47
+ name: string;
48
+ /** Data type */
49
+ type: DataColumnType;
50
+ /** Human-readable description */
51
+ description?: string;
52
+ /** Whether the column allows NULL values */
53
+ nullable?: boolean;
54
+ /** Default value (SQL expression as string) */
55
+ default?: string;
56
+ /** Whether this is the primary key */
57
+ primary_key?: boolean;
58
+ /** Whether values must be unique */
59
+ unique?: boolean;
60
+ /** Semantic type for AI understanding */
61
+ semantic_type?: SemanticColumnType;
62
+ /** Example values for AI context */
63
+ examples?: string[];
64
+ }
65
+ /**
66
+ * Foreign key constraint definition.
67
+ */
68
+ export interface DataForeignKey {
69
+ /** Column in this table */
70
+ column: string;
71
+ /** Referenced table name */
72
+ references_table: string;
73
+ /** Referenced column name */
74
+ references_column: string;
75
+ /** Action on delete */
76
+ on_delete?: 'CASCADE' | 'SET NULL' | 'NO ACTION';
77
+ }
78
+ /**
79
+ * Index definition for a table.
80
+ */
81
+ export interface DataIndex {
82
+ /** Index name */
83
+ name: string;
84
+ /** Columns included in the index */
85
+ columns: string[];
86
+ /** Whether the index enforces uniqueness */
87
+ unique?: boolean;
88
+ }
89
+ /**
90
+ * Semantic type categorization for tables.
91
+ */
92
+ export type DataTableSemanticType = 'dimension' | 'fact' | 'bridge' | 'staging';
93
+ /**
94
+ * Table definition within a data schema.
95
+ */
96
+ export interface DataTable {
97
+ /** Table name (must be valid SQL identifier) */
98
+ name: string;
99
+ /** Human-readable description */
100
+ description?: string;
101
+ /** Column definitions */
102
+ columns: DataColumn[];
103
+ /** Foreign key constraints */
104
+ foreign_keys?: DataForeignKey[];
105
+ /** Index definitions */
106
+ indexes?: DataIndex[];
107
+ /** Semantic categorization for AI understanding */
108
+ semantic_type?: DataTableSemanticType;
109
+ /** Tags for organization */
110
+ tags: string[];
111
+ /** Current row count (updated after imports) */
112
+ row_count?: number;
113
+ /** Table creation timestamp */
114
+ created_at?: string;
115
+ /** Last modification timestamp */
116
+ updated_at?: string;
117
+ }
118
+ /**
119
+ * Summary view of a data table (for listings).
120
+ */
121
+ export interface DataTableSummary {
122
+ /** Table name */
123
+ name: string;
124
+ /** Human-readable description */
125
+ description?: string;
126
+ /** Semantic categorization for AI understanding */
127
+ semantic_type?: DataTableSemanticType;
128
+ /** Number of columns */
129
+ column_count: number;
130
+ /** Current row count */
131
+ row_count?: number;
132
+ /** Tags for organization */
133
+ tags: string[];
134
+ }
135
+ /**
136
+ * Relationship type between tables.
137
+ */
138
+ export type DataRelationshipType = 'one-to-one' | 'one-to-many' | 'many-to-many';
139
+ /**
140
+ * Semantic relationship between tables for AI understanding.
141
+ */
142
+ export interface DataRelationship {
143
+ /** Relationship name */
144
+ name: string;
145
+ /** Source table */
146
+ from_table: string;
147
+ /** Source column */
148
+ from_column: string;
149
+ /** Target table */
150
+ to_table: string;
151
+ /** Target column */
152
+ to_column: string;
153
+ /** Relationship cardinality */
154
+ relationship_type: DataRelationshipType;
155
+ /** Human-readable description */
156
+ description?: string;
157
+ }
158
+ /**
159
+ * Complete schema definition for a data store.
160
+ */
161
+ export interface DataSchema {
162
+ /** Semantic version (e.g., "1.2.0") */
163
+ version: string;
164
+ /** Schema description */
165
+ description?: string;
166
+ /** Table definitions */
167
+ tables: DataTable[];
168
+ /** Relationship definitions */
169
+ relationships: DataRelationship[];
170
+ /** Last update timestamp */
171
+ updated_at: string;
172
+ /** User/agent who last updated */
173
+ updated_by?: string;
174
+ }
175
+ /**
176
+ * Data store lifecycle status.
177
+ */
178
+ export declare enum DataStoreStatus {
179
+ /** Store is being created */
180
+ CREATING = "creating",
181
+ /** Store is active and usable */
182
+ ACTIVE = "active",
183
+ /** Store encountered an error */
184
+ ERROR = "error",
185
+ /** Store has been archived (soft deleted) */
186
+ ARCHIVED = "archived"
187
+ }
188
+ /**
189
+ * Summary view of a data store (for listings).
190
+ */
191
+ export interface DataStoreItem extends BaseObject {
192
+ /** Current status */
193
+ status: DataStoreStatus;
194
+ /** Current schema version */
195
+ schema_version: string;
196
+ /** Number of tables */
197
+ table_count: number;
198
+ /** Total rows across all tables */
199
+ total_rows: number;
200
+ /** Storage size in bytes */
201
+ storage_bytes: number;
202
+ /** Last import timestamp */
203
+ last_import_at?: string;
204
+ /** Number of versions stored */
205
+ version_count: number;
206
+ /** Tags for organization */
207
+ tags: string[];
208
+ }
209
+ /**
210
+ * Full data store with schema details.
211
+ */
212
+ export interface DataStore extends DataStoreItem {
213
+ /** Complete schema definition */
214
+ schema: DataSchema;
215
+ /** GCS bucket name */
216
+ gcs_bucket: string;
217
+ /** Path prefix within the bucket */
218
+ gcs_path: string;
219
+ }
220
+ /**
221
+ * Table state within a version.
222
+ */
223
+ export interface DataStoreVersionTableState {
224
+ /** Row count at this version */
225
+ row_count: number;
226
+ /** Content checksum */
227
+ checksum: string;
228
+ }
229
+ /**
230
+ * A point-in-time version of a data store.
231
+ */
232
+ export interface DataStoreVersion {
233
+ /** Version ID */
234
+ id: string;
235
+ /** Parent store ID */
236
+ store_id: string;
237
+ /** Commit message */
238
+ message: string;
239
+ /** Schema version at this point */
240
+ schema_version: string;
241
+ /** Table states at this version */
242
+ tables: Record<string, DataStoreVersionTableState>;
243
+ /** Creation timestamp */
244
+ created_at: string;
245
+ /** User/agent who created */
246
+ created_by?: string;
247
+ /** GCS object generation number */
248
+ gcs_generation: number;
249
+ /** Timestamp-based ID used for GCS path (internal) */
250
+ gcs_path_id?: string;
251
+ /** Whether this is a named snapshot */
252
+ is_snapshot?: boolean;
253
+ /** Snapshot name (if is_snapshot) */
254
+ snapshot_name?: string;
255
+ }
256
+ /**
257
+ * Import job status.
258
+ */
259
+ export declare enum ImportStatus {
260
+ /** Job is queued */
261
+ PENDING = "pending",
262
+ /** Job is running */
263
+ PROCESSING = "processing",
264
+ /** Job completed successfully */
265
+ COMPLETED = "completed",
266
+ /** Job failed */
267
+ FAILED = "failed",
268
+ /** Job was rolled back */
269
+ ROLLED_BACK = "rolled_back"
270
+ }
271
+ /**
272
+ * Import job tracking.
273
+ */
274
+ export interface ImportJob {
275
+ /** Job ID */
276
+ id: string;
277
+ /** Parent store ID */
278
+ store_id: string;
279
+ /** Current status */
280
+ status: ImportStatus;
281
+ /** Tables being imported */
282
+ tables: string[];
283
+ /** Import mode */
284
+ mode: 'append' | 'replace';
285
+ /** Commit message */
286
+ message?: string;
287
+ /** Error message (if failed) */
288
+ error?: string;
289
+ /** Total rows imported */
290
+ rows_imported: number;
291
+ /** Job start timestamp */
292
+ started_at: string;
293
+ /** Job completion timestamp */
294
+ completed_at?: string;
295
+ /** Resulting version ID (if completed) */
296
+ version_id?: string;
297
+ /** User/agent who initiated */
298
+ created_by?: string;
299
+ }
300
+ /**
301
+ * Payload for creating a new data store.
302
+ */
303
+ export interface CreateDataStorePayload {
304
+ /** Store name (unique within project) */
305
+ name: string;
306
+ /** Store description */
307
+ description?: string;
308
+ /** Tags for organization */
309
+ tags?: string[];
310
+ }
311
+ /**
312
+ * Payload for creating a new table.
313
+ */
314
+ export interface CreateTablePayload {
315
+ /** Table name */
316
+ name: string;
317
+ /** Table description */
318
+ description?: string;
319
+ /** Column definitions (at least one required) */
320
+ columns: DataColumn[];
321
+ /** Foreign key constraints */
322
+ foreign_keys?: DataForeignKey[];
323
+ /** Index definitions */
324
+ indexes?: DataIndex[];
325
+ /** Semantic type */
326
+ semantic_type?: DataTableSemanticType;
327
+ /** Tags */
328
+ tags?: string[];
329
+ }
330
+ /**
331
+ * Payload for creating multiple tables atomically.
332
+ */
333
+ export interface CreateTablesPayload {
334
+ /** Table definitions to create */
335
+ tables: CreateTablePayload[];
336
+ /** Commit message */
337
+ message: string;
338
+ }
339
+ /**
340
+ * Schema change operation types.
341
+ */
342
+ export type AlterTableOperation = {
343
+ op: 'add_column';
344
+ column: DataColumn;
345
+ } | {
346
+ op: 'drop_column';
347
+ column: string;
348
+ } | {
349
+ op: 'rename_column';
350
+ from: string;
351
+ to: string;
352
+ } | {
353
+ op: 'modify_column';
354
+ column: string;
355
+ updates: Partial<Omit<DataColumn, 'name'>>;
356
+ };
357
+ /**
358
+ * Payload for altering a table schema.
359
+ */
360
+ export interface AlterTablePayload {
361
+ /** List of schema changes to apply */
362
+ changes: AlterTableOperation[];
363
+ }
364
+ /**
365
+ * Payload for AI-driven bulk schema updates.
366
+ */
367
+ export interface UpdateSchemaPayload {
368
+ /** Updated schema description */
369
+ description?: string;
370
+ /** Tables to create or update */
371
+ tables?: CreateTablePayload[];
372
+ /** Relationships to set */
373
+ relationships?: DataRelationship[];
374
+ /** Tables to drop */
375
+ drop_tables?: string[];
376
+ /** Commit message (required) */
377
+ message: string;
378
+ }
379
+ /**
380
+ * Data source for import.
381
+ * - 'inline': data provided directly in the payload
382
+ * - 'gcs': data in Google Cloud Storage (gs://bucket/path)
383
+ * - 'url': data at an HTTPS URL
384
+ * - 'artifact': data from workflow artifact (resolved to GCS by tool)
385
+ */
386
+ export type ImportDataSource = 'inline' | 'gcs' | 'url' | 'artifact';
387
+ /**
388
+ * Data format for external sources.
389
+ */
390
+ export type ImportDataFormat = 'json' | 'csv' | 'parquet';
391
+ /**
392
+ * Table data specification for import.
393
+ */
394
+ export interface ImportTableData {
395
+ /** Where the data comes from */
396
+ source: ImportDataSource;
397
+ /** Inline data (when source is 'inline') */
398
+ data?: Record<string, unknown>[];
399
+ /** URI for external data (gcs: gs://..., url: https://..., artifact: out/file.csv) */
400
+ uri?: string;
401
+ /** Data format for external sources */
402
+ format?: ImportDataFormat;
403
+ }
404
+ /**
405
+ * Payload for importing data into tables.
406
+ */
407
+ export interface ImportDataPayload {
408
+ /** Map of table name to data specification */
409
+ tables: Record<string, ImportTableData>;
410
+ /** Import mode */
411
+ mode: 'append' | 'replace';
412
+ /** Commit message */
413
+ message: string;
414
+ }
415
+ /**
416
+ * Payload for creating a named snapshot.
417
+ */
418
+ export interface CreateSnapshotPayload {
419
+ /** Snapshot name (must be unique within store) */
420
+ name: string;
421
+ /** Snapshot description */
422
+ message: string;
423
+ }
424
+ /**
425
+ * Payload for executing a query.
426
+ */
427
+ export interface QueryPayload {
428
+ /** SQL query (SELECT only) */
429
+ sql: string;
430
+ /** Query parameters (for prepared statements) */
431
+ params?: Record<string, unknown>;
432
+ /** Maximum rows to return */
433
+ limit?: number;
434
+ /** Query against a specific version (optional) */
435
+ version_id?: string;
436
+ }
437
+ /**
438
+ * Column metadata in query results.
439
+ */
440
+ export interface QueryResultColumn {
441
+ /** Column name */
442
+ name: string;
443
+ /** Column type */
444
+ type: string;
445
+ }
446
+ /**
447
+ * Query execution result.
448
+ */
449
+ export interface QueryResult {
450
+ /** Column metadata */
451
+ columns: QueryResultColumn[];
452
+ /** Result rows */
453
+ rows: Record<string, unknown>[];
454
+ /** Number of rows returned */
455
+ row_count: number;
456
+ /** Query execution time in milliseconds */
457
+ execution_time_ms: number;
458
+ /** Error message if query failed (used in batch queries) */
459
+ error?: string;
460
+ }
461
+ /**
462
+ * Simplified column representation for AI agents.
463
+ */
464
+ export interface DataColumnForAI {
465
+ /** Data type */
466
+ type: DataColumnType;
467
+ /** Description */
468
+ description?: string;
469
+ /** Semantic type */
470
+ semantic_type?: SemanticColumnType;
471
+ /** Whether nullable */
472
+ nullable: boolean;
473
+ /** Whether primary key */
474
+ primary_key: boolean;
475
+ /** Example values */
476
+ examples?: string[];
477
+ }
478
+ /**
479
+ * Simplified foreign key representation for AI agents.
480
+ */
481
+ export interface DataForeignKeyForAI {
482
+ /** Column name */
483
+ column: string;
484
+ /** Reference in "table.column" format */
485
+ references: string;
486
+ }
487
+ /**
488
+ * Simplified table representation for AI agents.
489
+ */
490
+ export interface DataTableForAI {
491
+ /** Description */
492
+ description?: string;
493
+ /** Semantic type */
494
+ semantic_type?: DataTableSemanticType;
495
+ /** Columns by name */
496
+ columns: Record<string, DataColumnForAI>;
497
+ /** Foreign keys */
498
+ foreign_keys: DataForeignKeyForAI[];
499
+ }
500
+ /**
501
+ * Simplified relationship representation for AI agents.
502
+ */
503
+ export interface DataRelationshipForAI {
504
+ /** Relationship name */
505
+ name: string;
506
+ /** Source in "table.column" format */
507
+ from: string;
508
+ /** Target in "table.column" format */
509
+ to: string;
510
+ /** Relationship type */
511
+ type: DataRelationshipType;
512
+ /** Description */
513
+ description?: string;
514
+ }
515
+ /**
516
+ * Simplified schema representation optimized for AI agent consumption.
517
+ * Provides semantic context for understanding the data model.
518
+ */
519
+ export interface DataSchemaForAI {
520
+ /** Store name */
521
+ name: string;
522
+ /** Schema version */
523
+ version: string;
524
+ /** Schema description */
525
+ description?: string;
526
+ /** Tables by name */
527
+ tables: Record<string, DataTableForAI>;
528
+ /** Relationships */
529
+ relationships: DataRelationshipForAI[];
530
+ }
531
+ /**
532
+ * Version retention configuration.
533
+ */
534
+ export interface DataStoreRetentionConfig {
535
+ /** Keep versions for this many days */
536
+ retention_days: number;
537
+ /** Named snapshots are exempt from retention */
538
+ snapshots_exempt: boolean;
539
+ }
540
+ /**
541
+ * Default retention configuration: 30 days, snapshots exempt.
542
+ */
543
+ export declare const DEFAULT_RETENTION_CONFIG: DataStoreRetentionConfig;
544
+ /**
545
+ * Dashboard lifecycle status.
546
+ */
547
+ export declare enum DashboardStatus {
548
+ /** Dashboard is active and usable */
549
+ ACTIVE = "active",
550
+ /** Dashboard has been archived (soft deleted) */
551
+ ARCHIVED = "archived"
552
+ }
553
+ /**
554
+ * Named SQL query that maps to a Vega data source.
555
+ * Supports parameterized SQL with {{param_name}} placeholders.
556
+ *
557
+ * @deprecated Use single `query` field on Dashboard instead. Multiple queries
558
+ * prevent cross-panel interactivity. Use JOINs/CTEs in a single query.
559
+ */
560
+ export interface DashboardQuery {
561
+ /** Query name (used as data source reference in Vega specs) */
562
+ name: string;
563
+ /** SQL query (SELECT only). Can include {{param_name}} placeholders for dynamic values. */
564
+ sql: string;
565
+ /** Human-readable description */
566
+ description?: string;
567
+ /** Maximum rows to return */
568
+ limit?: number;
569
+ /** Default values for SQL parameters. Keys are parameter names (without braces). */
570
+ parameters?: Record<string, string>;
571
+ }
572
+ /**
573
+ * Panel position within the dashboard grid.
574
+ *
575
+ * @deprecated Use combined Vega-Lite spec with vconcat/hconcat instead.
576
+ */
577
+ export interface DashboardPanelPosition {
578
+ /** Row index (0-based) */
579
+ row: number;
580
+ /** Column index (0-based) */
581
+ col: number;
582
+ /** Width in grid cells (default: 1) */
583
+ width?: number;
584
+ /** Height in grid cells (default: 1) */
585
+ height?: number;
586
+ }
587
+ /**
588
+ * Dashboard panel with Vega/Vega-Lite visualization.
589
+ *
590
+ * @deprecated Use combined Vega-Lite spec with vconcat/hconcat instead.
591
+ * Combined specs enable cross-panel interactivity (selections filtering other panels).
592
+ */
593
+ export interface DashboardPanel {
594
+ /** Panel ID (auto-generated if not provided) */
595
+ id?: string;
596
+ /** Panel title */
597
+ title: string;
598
+ /** Vega or Vega-Lite specification */
599
+ spec: Record<string, unknown>;
600
+ /** Whether spec is Vega-Lite (default: true) */
601
+ vegaLite?: boolean;
602
+ /** Query names that populate this panel's data sources */
603
+ dataSources: string[];
604
+ /** Position in the dashboard grid */
605
+ position: DashboardPanelPosition;
606
+ }
607
+ /**
608
+ * Dashboard layout configuration.
609
+ *
610
+ * @deprecated Layout is now handled within the Vega-Lite spec via vconcat/hconcat.
611
+ */
612
+ export interface DashboardLayout {
613
+ /** Number of columns in the grid (default: 2) */
614
+ columns: number;
615
+ /** Width of each cell in pixels (default: 600) */
616
+ cellWidth: number;
617
+ /** Height of each cell in pixels (default: 400) */
618
+ cellHeight: number;
619
+ /** Padding between cells in pixels (default: 20) */
620
+ padding: number;
621
+ }
622
+ /**
623
+ * Default layout configuration for dashboards.
624
+ *
625
+ * @deprecated Use combined Vega-Lite spec with vconcat/hconcat instead.
626
+ */
627
+ export declare const DEFAULT_DASHBOARD_LAYOUT: DashboardLayout;
628
+ /**
629
+ * SQL query parameters with default values.
630
+ * Supports {{param_name}} placeholders in SQL that get substituted at runtime.
631
+ */
632
+ export interface DashboardQueryParameters {
633
+ /** Default values for SQL parameters. Keys are parameter names (without braces). */
634
+ defaults: Record<string, string>;
635
+ }
636
+ /**
637
+ * Summary view of a dashboard (for listings).
638
+ */
639
+ export interface DashboardItem extends BaseObject {
640
+ /** Parent data store ID */
641
+ store_id: string;
642
+ /** Current status */
643
+ status: DashboardStatus;
644
+ /** Number of panels (deprecated, kept for backwards compat) */
645
+ panel_count: number;
646
+ /** Number of queries (deprecated, kept for backwards compat) */
647
+ query_count: number;
648
+ /** Last render timestamp */
649
+ last_rendered_at?: string;
650
+ /** Tags for organization */
651
+ tags: string[];
652
+ }
653
+ /**
654
+ * Full dashboard with SQL query and Vega-Lite specification.
655
+ *
656
+ * **New architecture (v2):**
657
+ * - Single `query` field with SQL (use JOINs/CTEs for complex data needs)
658
+ * - Single `spec` field with complete Vega-Lite spec (vconcat/hconcat for multiple panels)
659
+ * - Cross-panel interactivity via Vega selections
660
+ *
661
+ * **Legacy architecture (v1, deprecated):**
662
+ * - Multiple `queries` with named data sources
663
+ * - Multiple `panels` with separate specs and dataSources references
664
+ * - `layout` for grid positioning
665
+ * - No cross-panel interactivity
666
+ */
667
+ export interface Dashboard extends DashboardItem {
668
+ /**
669
+ * SQL query that returns all data for the dashboard.
670
+ * Use JOINs, CTEs, or UNION ALL to combine data from multiple tables.
671
+ * Can include {{param_name}} placeholders for dynamic values.
672
+ */
673
+ query?: string;
674
+ /**
675
+ * Maximum rows to return from the query (default: 10000).
676
+ */
677
+ queryLimit?: number;
678
+ /**
679
+ * Default values for SQL parameters.
680
+ */
681
+ queryParameters?: Record<string, string>;
682
+ /**
683
+ * Complete Vega-Lite specification for the entire dashboard.
684
+ * Use vconcat/hconcat for multiple panels, params for interactivity.
685
+ * Data is injected at runtime from query results.
686
+ */
687
+ spec?: Record<string, unknown>;
688
+ /**
689
+ * @deprecated Use single `query` field instead.
690
+ * Named SQL queries (kept for backwards compatibility).
691
+ */
692
+ queries: DashboardQuery[];
693
+ /**
694
+ * @deprecated Use single `spec` field with vconcat/hconcat instead.
695
+ * Panel definitions (kept for backwards compatibility).
696
+ */
697
+ panels: DashboardPanel[];
698
+ /**
699
+ * @deprecated Layout is now handled within the Vega-Lite spec.
700
+ * Layout configuration (kept for backwards compatibility).
701
+ */
702
+ layout: DashboardLayout;
703
+ /** URL of last rendered image */
704
+ last_render_url?: string;
705
+ }
706
+ /**
707
+ * Payload for creating a new dashboard.
708
+ * Requires query (SQL) and spec (Vega-Lite).
709
+ */
710
+ export interface CreateDashboardPayload {
711
+ /** Dashboard name (unique within store) */
712
+ name: string;
713
+ /** Dashboard summary */
714
+ summary?: string;
715
+ /** SQL query that returns all data for the dashboard */
716
+ query: string;
717
+ /** Maximum rows to return from the query (default: 10000) */
718
+ queryLimit?: number;
719
+ /** Default values for SQL {{param}} placeholders */
720
+ queryParameters?: Record<string, string>;
721
+ /** Complete Vega-Lite specification (use vconcat/hconcat for multiple panels) */
722
+ spec: Record<string, unknown>;
723
+ }
724
+ /**
725
+ * Payload for updating a dashboard.
726
+ */
727
+ export interface UpdateDashboardPayload {
728
+ /** Dashboard name */
729
+ name?: string;
730
+ /** Dashboard summary */
731
+ summary?: string;
732
+ /** SQL query that returns all data for the dashboard */
733
+ query?: string;
734
+ /** Maximum rows to return from the query (default: 10000) */
735
+ queryLimit?: number;
736
+ /** Default values for SQL {{param}} placeholders */
737
+ queryParameters?: Record<string, string>;
738
+ /** Complete Vega-Lite specification (use vconcat/hconcat for multiple panels) */
739
+ spec?: Record<string, unknown>;
740
+ /** Skip auto-version creation */
741
+ skip_versioning?: boolean;
742
+ }
743
+ /**
744
+ * Payload for previewing a dashboard (render without saving).
745
+ */
746
+ export interface PreviewDashboardPayload {
747
+ /** SQL query that returns all data for the dashboard */
748
+ query?: string;
749
+ /** Maximum rows to return from the query (default: 10000) */
750
+ queryLimit?: number;
751
+ /** Default values for SQL parameters */
752
+ queryParameters?: Record<string, string>;
753
+ /** Complete Vega-Lite specification for the entire dashboard */
754
+ spec?: Record<string, unknown>;
755
+ /** @deprecated Use single `query` field instead */
756
+ queries?: DashboardQuery[];
757
+ /** @deprecated Use single `spec` field with vconcat/hconcat instead */
758
+ panels?: DashboardPanel[];
759
+ /** @deprecated Layout is now handled within the Vega-Lite spec */
760
+ layout?: Partial<DashboardLayout>;
761
+ }
762
+ /**
763
+ * Options for rendering a dashboard.
764
+ */
765
+ export interface RenderDashboardOptions {
766
+ /** Scale factor for higher resolution (default: 1) */
767
+ scale?: number;
768
+ /** Force re-render even if cached (default: false) */
769
+ force?: boolean;
770
+ /** Background color (default: white) */
771
+ backgroundColor?: string;
772
+ }
773
+ /**
774
+ * Result of rendering a dashboard.
775
+ */
776
+ export interface RenderDashboardResult {
777
+ /** URL to the rendered PNG image */
778
+ url: string;
779
+ /** When the URL expires (seconds from now) */
780
+ expires_in: number;
781
+ /** When the dashboard was rendered */
782
+ rendered_at: string;
783
+ /** Image width in pixels */
784
+ width: number;
785
+ /** Image height in pixels */
786
+ height: number;
787
+ }
788
+ /**
789
+ * A point-in-time version of a dashboard.
790
+ * Stores full snapshot inline (no external storage needed for small JSON documents).
791
+ */
792
+ export interface DashboardVersion {
793
+ /** Version ID */
794
+ id: string;
795
+ /** Parent dashboard ID */
796
+ dashboard_id: string;
797
+ /** Version number (auto-incremented) */
798
+ version_number: number;
799
+ /** Commit message describing the change */
800
+ message: string;
801
+ /** Snapshot of queries at this version */
802
+ queries: DashboardQuery[];
803
+ /** Snapshot of panels at this version */
804
+ panels: DashboardPanel[];
805
+ /** Snapshot of layout at this version */
806
+ layout: DashboardLayout;
807
+ /** Whether this is the currently active/displayed version */
808
+ is_current: boolean;
809
+ /** Whether this is a named snapshot (protected from TTL cleanup) */
810
+ is_snapshot: boolean;
811
+ /** Snapshot name (if is_snapshot) */
812
+ snapshot_name?: string;
813
+ /** Creation timestamp */
814
+ created_at: string;
815
+ /** User/agent who created this version */
816
+ created_by?: string;
817
+ }
818
+ /**
819
+ * Summary view of a dashboard version (for listings).
820
+ */
821
+ export interface DashboardVersionItem {
822
+ /** Version ID */
823
+ id: string;
824
+ /** Parent dashboard ID */
825
+ dashboard_id: string;
826
+ /** Version number */
827
+ version_number: number;
828
+ /** Commit message */
829
+ message: string;
830
+ /** Whether this is the current version */
831
+ is_current: boolean;
832
+ /** Whether this is a named snapshot */
833
+ is_snapshot: boolean;
834
+ /** Snapshot name (if is_snapshot) */
835
+ snapshot_name?: string;
836
+ /** Number of panels in this version */
837
+ panel_count: number;
838
+ /** Number of queries in this version */
839
+ query_count: number;
840
+ /** Creation timestamp */
841
+ created_at: string;
842
+ /** User/agent who created */
843
+ created_by?: string;
844
+ }
845
+ /**
846
+ * Payload for creating a named snapshot.
847
+ */
848
+ export interface CreateDashboardSnapshotPayload {
849
+ /** Snapshot name (must be unique within dashboard) */
850
+ name: string;
851
+ /** Snapshot description/message */
852
+ message: string;
853
+ }
854
+ /**
855
+ * Payload for promoting a version to current.
856
+ */
857
+ export interface PromoteDashboardVersionPayload {
858
+ /** Commit message for the promotion */
859
+ message?: string;
860
+ }