@tai42/api-client 19.3.0 → 21.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 (401) hide show
  1. package/README.md +29 -0
  2. package/dist/agents.d.ts.map +1 -1
  3. package/dist/agents.js +6 -4
  4. package/dist/agents.js.map +1 -1
  5. package/dist/client/agents-client.d.ts.map +1 -1
  6. package/dist/client/agents-client.js +3 -2
  7. package/dist/client/agents-client.js.map +1 -1
  8. package/dist/client/auth-client.d.ts +143 -90
  9. package/dist/client/auth-client.d.ts.map +1 -1
  10. package/dist/client/auth-client.js +81 -25
  11. package/dist/client/auth-client.js.map +1 -1
  12. package/dist/client/backend-client.d.ts +14 -13
  13. package/dist/client/backend-client.d.ts.map +1 -1
  14. package/dist/client/backend-client.js +7 -3
  15. package/dist/client/backend-client.js.map +1 -1
  16. package/dist/client/backup-client.d.ts +45 -19
  17. package/dist/client/backup-client.d.ts.map +1 -1
  18. package/dist/client/backup-client.js +8 -3
  19. package/dist/client/backup-client.js.map +1 -1
  20. package/dist/client/capabilities-client.d.ts +20 -16
  21. package/dist/client/capabilities-client.d.ts.map +1 -1
  22. package/dist/client/capabilities-client.js +3 -2
  23. package/dist/client/capabilities-client.js.map +1 -1
  24. package/dist/client/channels-client.d.ts.map +1 -1
  25. package/dist/client/channels-client.js +2 -1
  26. package/dist/client/channels-client.js.map +1 -1
  27. package/dist/client/config-client.d.ts +44 -17
  28. package/dist/client/config-client.d.ts.map +1 -1
  29. package/dist/client/config-client.js +10 -4
  30. package/dist/client/config-client.js.map +1 -1
  31. package/dist/client/connectors-client.d.ts +270 -81
  32. package/dist/client/connectors-client.d.ts.map +1 -1
  33. package/dist/client/connectors-client.js +38 -10
  34. package/dist/client/connectors-client.js.map +1 -1
  35. package/dist/client/conversations-client.d.ts +440 -86
  36. package/dist/client/conversations-client.d.ts.map +1 -1
  37. package/dist/client/conversations-client.js +46 -17
  38. package/dist/client/conversations-client.js.map +1 -1
  39. package/dist/client/hooks-client.d.ts +3 -3
  40. package/dist/client/hooks-client.d.ts.map +1 -1
  41. package/dist/client/hooks-client.js +12 -7
  42. package/dist/client/hooks-client.js.map +1 -1
  43. package/dist/client/index.d.ts +2252 -864
  44. package/dist/client/index.d.ts.map +1 -1
  45. package/dist/client/index.js +10 -2
  46. package/dist/client/index.js.map +1 -1
  47. package/dist/client/interactions-client.d.ts +19 -14
  48. package/dist/client/interactions-client.d.ts.map +1 -1
  49. package/dist/client/interactions-client.js +21 -9
  50. package/dist/client/interactions-client.js.map +1 -1
  51. package/dist/client/login-client.d.ts +18 -17
  52. package/dist/client/login-client.d.ts.map +1 -1
  53. package/dist/client/login-client.js +8 -4
  54. package/dist/client/login-client.js.map +1 -1
  55. package/dist/client/manifest-client.d.ts +276 -105
  56. package/dist/client/manifest-client.d.ts.map +1 -1
  57. package/dist/client/manifest-client.js +22 -16
  58. package/dist/client/manifest-client.js.map +1 -1
  59. package/dist/client/marketplace-client.d.ts +181 -51
  60. package/dist/client/marketplace-client.d.ts.map +1 -1
  61. package/dist/client/marketplace-client.js +23 -12
  62. package/dist/client/marketplace-client.js.map +1 -1
  63. package/dist/client/mcp-config-schema-client.d.ts.map +1 -1
  64. package/dist/client/mcp-config-schema-client.js +2 -1
  65. package/dist/client/mcp-config-schema-client.js.map +1 -1
  66. package/dist/client/notifications-client.d.ts +44 -14
  67. package/dist/client/notifications-client.d.ts.map +1 -1
  68. package/dist/client/notifications-client.js +2 -1
  69. package/dist/client/notifications-client.js.map +1 -1
  70. package/dist/client/observability-client.d.ts +78 -38
  71. package/dist/client/observability-client.d.ts.map +1 -1
  72. package/dist/client/observability-client.js +29 -6
  73. package/dist/client/observability-client.js.map +1 -1
  74. package/dist/client/plugins-client.d.ts +8 -6
  75. package/dist/client/plugins-client.d.ts.map +1 -1
  76. package/dist/client/plugins-client.js +2 -1
  77. package/dist/client/plugins-client.js.map +1 -1
  78. package/dist/client/policy-client.d.ts +4 -4
  79. package/dist/client/policy-client.d.ts.map +1 -1
  80. package/dist/client/policy-client.js +11 -4
  81. package/dist/client/policy-client.js.map +1 -1
  82. package/dist/client/presets-client.d.ts +84 -39
  83. package/dist/client/presets-client.d.ts.map +1 -1
  84. package/dist/client/presets-client.js +25 -13
  85. package/dist/client/presets-client.js.map +1 -1
  86. package/dist/client/profiles-client.d.ts +40 -33
  87. package/dist/client/profiles-client.d.ts.map +1 -1
  88. package/dist/client/profiles-client.js +15 -10
  89. package/dist/client/profiles-client.js.map +1 -1
  90. package/dist/client/schedules-client.d.ts +21 -17
  91. package/dist/client/schedules-client.d.ts.map +1 -1
  92. package/dist/client/schedules-client.js +8 -5
  93. package/dist/client/schedules-client.js.map +1 -1
  94. package/dist/client/settings-schema-client.d.ts +1 -1
  95. package/dist/client/settings-schema-client.d.ts.map +1 -1
  96. package/dist/client/settings-schema-client.js +2 -1
  97. package/dist/client/settings-schema-client.js.map +1 -1
  98. package/dist/client/states-client.d.ts +215 -87
  99. package/dist/client/states-client.d.ts.map +1 -1
  100. package/dist/client/states-client.js +98 -37
  101. package/dist/client/states-client.js.map +1 -1
  102. package/dist/client/storage-client.d.ts +5 -5
  103. package/dist/client/storage-client.d.ts.map +1 -1
  104. package/dist/client/storage-client.js +24 -12
  105. package/dist/client/storage-client.js.map +1 -1
  106. package/dist/client/sub-mcp-client.d.ts +3 -1
  107. package/dist/client/sub-mcp-client.d.ts.map +1 -1
  108. package/dist/client/sub-mcp-client.js +9 -4
  109. package/dist/client/sub-mcp-client.js.map +1 -1
  110. package/dist/client/system-client.d.ts +2 -2
  111. package/dist/client/system-client.d.ts.map +1 -1
  112. package/dist/client/system-client.js +2 -1
  113. package/dist/client/system-client.js.map +1 -1
  114. package/dist/client/templates-client.d.ts +65 -6
  115. package/dist/client/templates-client.d.ts.map +1 -1
  116. package/dist/client/templates-client.js +25 -7
  117. package/dist/client/templates-client.js.map +1 -1
  118. package/dist/client/tool-extensions-client.d.ts +41 -16
  119. package/dist/client/tool-extensions-client.d.ts.map +1 -1
  120. package/dist/client/tool-extensions-client.js +6 -4
  121. package/dist/client/tool-extensions-client.js.map +1 -1
  122. package/dist/client/tool-meta-client.d.ts +8 -8
  123. package/dist/client/tool-meta-client.d.ts.map +1 -1
  124. package/dist/client/tool-meta-client.js +12 -8
  125. package/dist/client/tool-meta-client.js.map +1 -1
  126. package/dist/client/tools-client.d.ts +150 -23
  127. package/dist/client/tools-client.d.ts.map +1 -1
  128. package/dist/client/tools-client.js +8 -8
  129. package/dist/client/tools-client.js.map +1 -1
  130. package/dist/client/trigger-links-client.d.ts +11 -9
  131. package/dist/client/trigger-links-client.d.ts.map +1 -1
  132. package/dist/client/trigger-links-client.js +4 -4
  133. package/dist/client/trigger-links-client.js.map +1 -1
  134. package/dist/fleet-report.d.ts +21 -5
  135. package/dist/fleet-report.d.ts.map +1 -1
  136. package/dist/fleet-report.js +31 -6
  137. package/dist/fleet-report.js.map +1 -1
  138. package/dist/generated/api-routes.d.ts +1014 -0
  139. package/dist/generated/api-routes.d.ts.map +1 -0
  140. package/dist/generated/api-routes.js +322 -0
  141. package/dist/generated/api-routes.js.map +1 -0
  142. package/dist/generated/openapi-schemas.d.ts +12425 -0
  143. package/dist/generated/openapi-schemas.d.ts.map +1 -0
  144. package/dist/generated/openapi-schemas.js +671 -0
  145. package/dist/generated/openapi-schemas.js.map +1 -0
  146. package/dist/generated/served-schemas.d.ts +6697 -392
  147. package/dist/generated/served-schemas.d.ts.map +1 -1
  148. package/dist/generated/served-schemas.js +7061 -46
  149. package/dist/generated/served-schemas.js.map +1 -1
  150. package/dist/headers.d.ts +4 -0
  151. package/dist/headers.d.ts.map +1 -0
  152. package/dist/headers.js +4 -0
  153. package/dist/headers.js.map +1 -0
  154. package/dist/http.d.ts.map +1 -1
  155. package/dist/http.js +4 -3
  156. package/dist/http.js.map +1 -1
  157. package/dist/index.d.ts +7 -3
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +3 -0
  160. package/dist/index.js.map +1 -1
  161. package/dist/schemas/api-keys.d.ts +14 -12
  162. package/dist/schemas/api-keys.d.ts.map +1 -1
  163. package/dist/schemas/api-keys.js +9 -23
  164. package/dist/schemas/api-keys.js.map +1 -1
  165. package/dist/schemas/auth-routes.d.ts +34 -29
  166. package/dist/schemas/auth-routes.d.ts.map +1 -1
  167. package/dist/schemas/auth-routes.js +22 -27
  168. package/dist/schemas/auth-routes.js.map +1 -1
  169. package/dist/schemas/backup.d.ts +157 -36
  170. package/dist/schemas/backup.d.ts.map +1 -1
  171. package/dist/schemas/backup.js +27 -26
  172. package/dist/schemas/backup.js.map +1 -1
  173. package/dist/schemas/capabilities.d.ts +32 -22
  174. package/dist/schemas/capabilities.d.ts.map +1 -1
  175. package/dist/schemas/capabilities.js +15 -40
  176. package/dist/schemas/capabilities.js.map +1 -1
  177. package/dist/schemas/channels.d.ts +1 -1
  178. package/dist/schemas/channels.d.ts.map +1 -1
  179. package/dist/schemas/channels.js +2 -5
  180. package/dist/schemas/channels.js.map +1 -1
  181. package/dist/schemas/config.d.ts.map +1 -1
  182. package/dist/schemas/config.js +4 -6
  183. package/dist/schemas/config.js.map +1 -1
  184. package/dist/schemas/connectors.d.ts +381 -185
  185. package/dist/schemas/connectors.d.ts.map +1 -1
  186. package/dist/schemas/connectors.js +54 -101
  187. package/dist/schemas/connectors.js.map +1 -1
  188. package/dist/schemas/conversations.d.ts +970 -241
  189. package/dist/schemas/conversations.d.ts.map +1 -1
  190. package/dist/schemas/conversations.js +40 -134
  191. package/dist/schemas/conversations.js.map +1 -1
  192. package/dist/schemas/extensions.d.ts +9 -6
  193. package/dist/schemas/extensions.d.ts.map +1 -1
  194. package/dist/schemas/extensions.js +6 -4
  195. package/dist/schemas/extensions.js.map +1 -1
  196. package/dist/schemas/fleet.d.ts +153 -99
  197. package/dist/schemas/fleet.d.ts.map +1 -1
  198. package/dist/schemas/fleet.js +41 -51
  199. package/dist/schemas/fleet.js.map +1 -1
  200. package/dist/schemas/hooks.d.ts +34 -34
  201. package/dist/schemas/hooks.d.ts.map +1 -1
  202. package/dist/schemas/hooks.js +15 -34
  203. package/dist/schemas/hooks.js.map +1 -1
  204. package/dist/schemas/index.d.ts +1 -1
  205. package/dist/schemas/index.d.ts.map +1 -1
  206. package/dist/schemas/index.js +1 -1
  207. package/dist/schemas/index.js.map +1 -1
  208. package/dist/schemas/interactions.d.ts +146 -123
  209. package/dist/schemas/interactions.d.ts.map +1 -1
  210. package/dist/schemas/interactions.js +44 -129
  211. package/dist/schemas/interactions.js.map +1 -1
  212. package/dist/schemas/login.d.ts +36 -37
  213. package/dist/schemas/login.d.ts.map +1 -1
  214. package/dist/schemas/login.js +8 -42
  215. package/dist/schemas/login.js.map +1 -1
  216. package/dist/schemas/manifest-mcp.d.ts +61 -35
  217. package/dist/schemas/manifest-mcp.d.ts.map +1 -1
  218. package/dist/schemas/manifest-mcp.js +13 -19
  219. package/dist/schemas/manifest-mcp.js.map +1 -1
  220. package/dist/schemas/marketplace.d.ts +219 -133
  221. package/dist/schemas/marketplace.d.ts.map +1 -1
  222. package/dist/schemas/marketplace.js +35 -120
  223. package/dist/schemas/marketplace.js.map +1 -1
  224. package/dist/schemas/members.d.ts +161 -0
  225. package/dist/schemas/members.d.ts.map +1 -0
  226. package/dist/schemas/members.js +73 -0
  227. package/dist/schemas/members.js.map +1 -0
  228. package/dist/schemas/notifications.d.ts +113 -41
  229. package/dist/schemas/notifications.d.ts.map +1 -1
  230. package/dist/schemas/notifications.js +9 -35
  231. package/dist/schemas/notifications.js.map +1 -1
  232. package/dist/schemas/observability.d.ts +174 -72
  233. package/dist/schemas/observability.d.ts.map +1 -1
  234. package/dist/schemas/observability.js +23 -76
  235. package/dist/schemas/observability.js.map +1 -1
  236. package/dist/schemas/policy.d.ts +11 -11
  237. package/dist/schemas/policy.d.ts.map +1 -1
  238. package/dist/schemas/policy.js +5 -12
  239. package/dist/schemas/policy.js.map +1 -1
  240. package/dist/schemas/presets.d.ts +109 -64
  241. package/dist/schemas/presets.d.ts.map +1 -1
  242. package/dist/schemas/presets.js +12 -48
  243. package/dist/schemas/presets.js.map +1 -1
  244. package/dist/schemas/principals.d.ts +28 -21
  245. package/dist/schemas/principals.d.ts.map +1 -1
  246. package/dist/schemas/principals.js +13 -25
  247. package/dist/schemas/principals.js.map +1 -1
  248. package/dist/schemas/profiles.d.ts +75 -63
  249. package/dist/schemas/profiles.d.ts.map +1 -1
  250. package/dist/schemas/profiles.js +24 -54
  251. package/dist/schemas/profiles.js.map +1 -1
  252. package/dist/schemas/roles.d.ts +22 -22
  253. package/dist/schemas/roles.d.ts.map +1 -1
  254. package/dist/schemas/roles.js +10 -17
  255. package/dist/schemas/roles.js.map +1 -1
  256. package/dist/schemas/schedules.d.ts +21 -15
  257. package/dist/schemas/schedules.d.ts.map +1 -1
  258. package/dist/schemas/schedules.js +4 -13
  259. package/dist/schemas/schedules.js.map +1 -1
  260. package/dist/schemas/served.d.ts +6373 -194
  261. package/dist/schemas/served.d.ts.map +1 -1
  262. package/dist/schemas/served.js +21 -0
  263. package/dist/schemas/served.js.map +1 -1
  264. package/dist/schemas/settings-schema.d.ts +1 -1
  265. package/dist/schemas/settings-schema.d.ts.map +1 -1
  266. package/dist/schemas/settings-schema.js +17 -19
  267. package/dist/schemas/settings-schema.js.map +1 -1
  268. package/dist/schemas/setup.d.ts +6 -6
  269. package/dist/schemas/setup.d.ts.map +1 -1
  270. package/dist/schemas/setup.js +2 -11
  271. package/dist/schemas/setup.js.map +1 -1
  272. package/dist/schemas/states.d.ts +450 -135
  273. package/dist/schemas/states.d.ts.map +1 -1
  274. package/dist/schemas/states.js +76 -140
  275. package/dist/schemas/states.js.map +1 -1
  276. package/dist/schemas/storage.d.ts +7 -8
  277. package/dist/schemas/storage.d.ts.map +1 -1
  278. package/dist/schemas/storage.js +8 -17
  279. package/dist/schemas/storage.js.map +1 -1
  280. package/dist/schemas/studio-plugins.d.ts +24 -18
  281. package/dist/schemas/studio-plugins.d.ts.map +1 -1
  282. package/dist/schemas/studio-plugins.js +5 -19
  283. package/dist/schemas/studio-plugins.js.map +1 -1
  284. package/dist/schemas/sub-mcp.d.ts +11 -8
  285. package/dist/schemas/sub-mcp.d.ts.map +1 -1
  286. package/dist/schemas/sub-mcp.js +10 -19
  287. package/dist/schemas/sub-mcp.js.map +1 -1
  288. package/dist/schemas/system-kinds.d.ts +76 -46
  289. package/dist/schemas/system-kinds.d.ts.map +1 -1
  290. package/dist/schemas/system-kinds.js +11 -28
  291. package/dist/schemas/system-kinds.js.map +1 -1
  292. package/dist/schemas/templates.d.ts +83 -25
  293. package/dist/schemas/templates.d.ts.map +1 -1
  294. package/dist/schemas/templates.js +8 -9
  295. package/dist/schemas/templates.js.map +1 -1
  296. package/dist/schemas/tool-meta.d.ts +15 -15
  297. package/dist/schemas/tool-meta.d.ts.map +1 -1
  298. package/dist/schemas/tool-meta.js +6 -21
  299. package/dist/schemas/tool-meta.js.map +1 -1
  300. package/dist/schemas/tools.d.ts +177 -56
  301. package/dist/schemas/tools.d.ts.map +1 -1
  302. package/dist/schemas/tools.js +20 -41
  303. package/dist/schemas/tools.js.map +1 -1
  304. package/dist/schemas/trigger-links.d.ts +22 -17
  305. package/dist/schemas/trigger-links.d.ts.map +1 -1
  306. package/dist/schemas/trigger-links.js +7 -27
  307. package/dist/schemas/trigger-links.js.map +1 -1
  308. package/dist/tool-runs.d.ts +175 -54
  309. package/dist/tool-runs.d.ts.map +1 -1
  310. package/dist/tool-runs.js +33 -34
  311. package/dist/tool-runs.js.map +1 -1
  312. package/package.json +4 -3
  313. package/src/agents.ts +16 -4
  314. package/src/client/agents-client.ts +3 -2
  315. package/src/client/auth-client.ts +134 -34
  316. package/src/client/backend-client.ts +8 -3
  317. package/src/client/backup-client.ts +8 -3
  318. package/src/client/capabilities-client.ts +4 -2
  319. package/src/client/channels-client.ts +3 -1
  320. package/src/client/config-client.ts +13 -5
  321. package/src/client/connectors-client.ts +91 -16
  322. package/src/client/conversations-client.ts +79 -30
  323. package/src/client/hooks-client.ts +25 -12
  324. package/src/client/index.ts +16 -4
  325. package/src/client/interactions-client.ts +40 -16
  326. package/src/client/login-client.ts +8 -4
  327. package/src/client/manifest-client.ts +48 -24
  328. package/src/client/marketplace-client.ts +23 -12
  329. package/src/client/mcp-config-schema-client.ts +2 -1
  330. package/src/client/notifications-client.ts +2 -1
  331. package/src/client/observability-client.ts +60 -8
  332. package/src/client/plugins-client.ts +2 -1
  333. package/src/client/policy-client.ts +24 -9
  334. package/src/client/presets-client.ts +26 -13
  335. package/src/client/profiles-client.ts +53 -24
  336. package/src/client/schedules-client.ts +14 -20
  337. package/src/client/settings-schema-client.ts +2 -1
  338. package/src/client/states-client.ts +151 -49
  339. package/src/client/storage-client.ts +43 -14
  340. package/src/client/sub-mcp-client.ts +10 -4
  341. package/src/client/system-client.ts +2 -1
  342. package/src/client/templates-client.ts +26 -7
  343. package/src/client/tool-extensions-client.ts +14 -7
  344. package/src/client/tool-meta-client.ts +46 -21
  345. package/src/client/tools-client.ts +13 -8
  346. package/src/client/trigger-links-client.ts +10 -6
  347. package/src/fleet-report.ts +48 -7
  348. package/src/generated/api-routes.ts +327 -0
  349. package/src/generated/openapi-schemas.ts +1508 -0
  350. package/src/generated/served-schemas.ts +7118 -82
  351. package/src/headers.ts +4 -0
  352. package/src/http.ts +4 -3
  353. package/src/index.ts +52 -10
  354. package/src/schemas/api-keys.ts +9 -25
  355. package/src/schemas/auth-routes.ts +27 -28
  356. package/src/schemas/backup.ts +33 -31
  357. package/src/schemas/capabilities.ts +16 -39
  358. package/src/schemas/channels.ts +4 -4
  359. package/src/schemas/config.ts +6 -6
  360. package/src/schemas/connectors.ts +61 -102
  361. package/src/schemas/conversations.ts +43 -133
  362. package/src/schemas/extensions.ts +7 -4
  363. package/src/schemas/fleet.ts +51 -51
  364. package/src/schemas/hooks.ts +18 -37
  365. package/src/schemas/index.ts +1 -1
  366. package/src/schemas/interactions.ts +48 -131
  367. package/src/schemas/login.ts +10 -41
  368. package/src/schemas/manifest-mcp.ts +13 -19
  369. package/src/schemas/marketplace.ts +37 -120
  370. package/src/schemas/members.ts +91 -0
  371. package/src/schemas/notifications.ts +10 -34
  372. package/src/schemas/observability.ts +34 -79
  373. package/src/schemas/policy.ts +5 -12
  374. package/src/schemas/presets.ts +13 -48
  375. package/src/schemas/principals.ts +17 -24
  376. package/src/schemas/profiles.ts +25 -55
  377. package/src/schemas/roles.ts +11 -17
  378. package/src/schemas/schedules.ts +4 -15
  379. package/src/schemas/served.ts +33 -0
  380. package/src/schemas/settings-schema.ts +18 -23
  381. package/src/schemas/setup.ts +4 -10
  382. package/src/schemas/states.ts +88 -139
  383. package/src/schemas/storage.ts +10 -16
  384. package/src/schemas/studio-plugins.ts +8 -19
  385. package/src/schemas/sub-mcp.ts +12 -18
  386. package/src/schemas/system-kinds.ts +12 -29
  387. package/src/schemas/templates.ts +8 -10
  388. package/src/schemas/tool-meta.ts +8 -20
  389. package/src/schemas/tools.ts +22 -45
  390. package/src/schemas/trigger-links.ts +8 -26
  391. package/src/tool-runs.ts +47 -38
  392. package/dist/client/web-entry-gate-client.d.ts +0 -34
  393. package/dist/client/web-entry-gate-client.d.ts.map +0 -1
  394. package/dist/client/web-entry-gate-client.js +0 -25
  395. package/dist/client/web-entry-gate-client.js.map +0 -1
  396. package/dist/schemas/web-entry.d.ts +0 -45
  397. package/dist/schemas/web-entry.d.ts.map +0 -1
  398. package/dist/schemas/web-entry.js +0 -36
  399. package/dist/schemas/web-entry.js.map +0 -1
  400. package/src/client/web-entry-gate-client.ts +0 -45
  401. package/src/schemas/web-entry.ts +0 -46
@@ -1,9 +1,13 @@
1
1
  /** Preset record, version and validation response schemas. */
2
2
  import { z } from 'zod';
3
3
 
4
+ import * as openapi from '../generated/openapi-schemas';
4
5
  import { presetExtensionElement } from './extensions';
5
6
  import { presetBody } from './served';
6
7
 
8
+ // The extension combos and the version body are hand-typed: the spec publishes a
9
+ // config-bearing element and a version body as open objects.
10
+
7
11
  /** A list of extension COMBOS — each combo an ordered list of elements. */
8
12
  export const presetExtensions = z.array(z.array(presetExtensionElement));
9
13
 
@@ -17,32 +21,13 @@ export const presetExtensions = z.array(z.array(presetExtensionElement));
17
21
  * (`GET /api/tool-meta`), never on the record. A drift throws `ApiSchemaError`;
18
22
  * nothing is coerced.
19
23
  */
20
- export const presetRecord = z.object({
21
- name: z.string(),
22
- base_tool: z.string(),
23
- description: z.string(),
24
- active_version: z.number(),
25
- extensions: presetExtensions,
26
- output_schema: z.record(z.string(), z.unknown()).nullable(),
27
- input_schema: z.record(z.string(), z.unknown()).nullable(),
28
- conflicted: z.boolean(),
29
- // The human-readable cause a row is quarantined (its name collided with a
30
- // foreign tool at boot), or `null` when the row is not conflicted. Rendered
31
- // verbatim; nothing is coerced.
32
- conflicted_reason: z.string().nullable(),
33
- // Sorted preset-name cross-references: `uses` names the presets this one
34
- // composes as tools; `used_by` names the presets that compose this one.
35
- uses: z.array(z.string()),
36
- used_by: z.array(z.string()),
37
- });
24
+ export const presetRecord = openapi.presetRecordView.extend({ extensions: presetExtensions });
38
25
  export type PresetRecord = z.infer<typeof presetRecord>;
39
26
 
40
27
  export const presetList = z.array(presetRecord);
41
28
 
42
29
  /** `GET /api/presets/{name}` — the record plus the active version's baked kwargs. */
43
- export const presetDetail = presetRecord.extend({
44
- fixed_kwargs: z.record(z.string(), z.unknown()),
45
- });
30
+ export const presetDetail = openapi.presetDetailView.extend({ extensions: presetExtensions });
46
31
  export type PresetDetail = z.infer<typeof presetDetail>;
47
32
 
48
33
  /**
@@ -51,29 +36,19 @@ export type PresetDetail = z.infer<typeof presetDetail>;
51
36
  * label list (kind-agnostic) — the only preset tags that remain, distinct from the
52
37
  * removed record-level categorization and from the tool_meta overlay.
53
38
  */
54
- export const presetVersion = z.object({
55
- version: z.number(),
56
- body: presetBody,
57
- tags: z.array(z.string()),
58
- created_at: z.string(),
59
- is_current: z.boolean(),
60
- });
39
+ export const presetVersion = openapi.documentVersion.extend({ body: presetBody });
61
40
  export type PresetVersion = z.infer<typeof presetVersion>;
62
41
 
63
42
  export const presetVersionList = z.array(presetVersion);
64
43
 
65
44
  /** `POST /api/presets/{name}/rollback` — the re-pointed active version. */
66
- export const presetRollback = z.object({ name: z.string(), active_version: z.number() });
45
+ export const presetRollback = openapi.presetRollbackResult;
67
46
 
68
47
  /** `DELETE /api/presets/{name}` — the removed preset. */
69
- export const presetDeleted = z.object({ name: z.string(), deleted: z.literal(true) });
48
+ export const presetDeleted = openapi.presetDeleteResult;
70
49
 
71
50
  /** `POST /api/presets/{name}/rename` — the re-keyed record identity. */
72
- export const presetRenamed = z.object({
73
- name: z.string(),
74
- renamed_from: z.string(),
75
- active_version: z.number(),
76
- });
51
+ export const presetRenamed = openapi.presetRenameResult;
77
52
  export type PresetRenamed = z.infer<typeof presetRenamed>;
78
53
 
79
54
  /**
@@ -82,10 +57,7 @@ export type PresetRenamed = z.infer<typeof presetRenamed>;
82
57
  * empty list is the clean case; a non-empty list means a rename is blocked until
83
58
  * those presets are updated. A drift throws `ApiSchemaError`.
84
59
  */
85
- export const presetReferees = z.object({
86
- name: z.string(),
87
- referees: z.array(z.string()),
88
- });
60
+ export const presetReferees = openapi.presetRefereesResult;
89
61
  export type PresetReferees = z.infer<typeof presetReferees>;
90
62
 
91
63
  /**
@@ -94,10 +66,7 @@ export type PresetReferees = z.infer<typeof presetReferees>;
94
66
  * 200), so `error` carries the server's verbatim message. A drift throws
95
67
  * `ApiSchemaError`.
96
68
  */
97
- export const presetValidation = z.object({
98
- valid: z.boolean(),
99
- error: z.string().nullable(),
100
- });
69
+ export const presetValidation = openapi.presetValidateVerdict;
101
70
  export type PresetValidation = z.infer<typeof presetValidation>;
102
71
 
103
72
  /**
@@ -106,9 +75,5 @@ export type PresetValidation = z.infer<typeof presetValidation>;
106
75
  * response echoes the identity plus the new tag list. A drift throws
107
76
  * `ApiSchemaError`.
108
77
  */
109
- export const presetVersionTags = z.object({
110
- name: z.string(),
111
- version: z.number(),
112
- tags: z.array(z.string()),
113
- });
78
+ export const presetVersionTags = openapi.presetVersionTagsResult;
114
79
  export type PresetVersionTags = z.infer<typeof presetVersionTags>;
@@ -1,41 +1,34 @@
1
1
  /** Principal (identity) reference, row, listing and delete-result schemas. */
2
- import { z } from 'zod';
2
+ import type { z } from 'zod';
3
+
4
+ import * as openapi from '../generated/openapi-schemas';
3
5
 
4
6
  /**
5
7
  * A compact reference to a principal — the owner of a key, or the human behind a
6
8
  * session — carried inline on payloads that name one.
7
9
  */
8
- export const principalRef = z.object({
9
- user_id: z.string(),
10
- kind: z.enum(['human', 'service']),
11
- display_name: z.string(),
12
- });
10
+ export const principalRef = openapi.principalRef;
13
11
  export type PrincipalRef = z.infer<typeof principalRef>;
14
12
 
15
13
  /**
16
- * A principal row (`/api/auth/principals`). `kind` is `human` (logs in
17
- * interactively) or `service` (holds keys only, never logs in). `created_by` is
18
- * the principal that created this one, or `null` for the owner the setup door
19
- * mints. `disabled` turns off every credential the principal owns. `created_at`
20
- * is an ISO-8601 instant.
14
+ * A principal's kind: `human` (logs in interactively) or `service` (holds keys only,
15
+ * never logs in).
16
+ */
17
+ export const principalKind = openapi.principal.shape.kind;
18
+ export type PrincipalKind = z.infer<typeof principalKind>;
19
+
20
+ /**
21
+ * A principal row (`/api/auth/principals`). `created_by` is the principal that created
22
+ * this one, or `null` for the owner the setup door mints. `disabled` turns off every
23
+ * credential the principal owns. `created_at` is an ISO-8601 instant.
21
24
  */
22
- export const principal = z.object({
23
- user_id: z.string(),
24
- kind: z.enum(['human', 'service']),
25
- display_name: z.string(),
26
- created_by: z.string().nullable(),
27
- disabled: z.boolean(),
28
- created_at: z.string(),
29
- });
25
+ export const principal = openapi.principal;
30
26
  export type Principal = z.infer<typeof principal>;
31
27
 
32
28
  /** The principals listing (`GET /api/auth/principals`). */
33
- export const principalList = z.array(principal);
29
+ export const principalList = openapi.principalListing;
34
30
  export type PrincipalList = z.infer<typeof principalList>;
35
31
 
36
32
  /** The delete result (`DELETE /api/auth/principals/{user_id}`). */
37
- export const principalDeleted = z.object({
38
- user_id: z.string(),
39
- deleted: z.boolean(),
40
- });
33
+ export const principalDeleted = openapi.principalDeleted;
41
34
  export type PrincipalDeleted = z.infer<typeof principalDeleted>;
@@ -1,6 +1,7 @@
1
1
  /** Settings-profile record, version, diff and apply response schemas. */
2
- import { z } from 'zod';
2
+ import type { z } from 'zod';
3
3
 
4
+ import * as openapi from '../generated/openapi-schemas';
4
5
  import { fleetReportFanout } from './fleet';
5
6
 
6
7
  // The admin-only `/api/config/profiles/*` surface. Secrets ride the wire in the
@@ -13,40 +14,30 @@ import { fleetReportFanout } from './fleet';
13
14
  * (No `last_modified`: the list carries identity, not history — version metadata
14
15
  * is the `/versions` surface — so the list renders no last-modified column.)
15
16
  */
16
- export const settingsProfileSummary = z.object({
17
- name: z.string(),
18
- description: z.string(),
19
- });
17
+ export const settingsProfileSummary = openapi.profileSummary;
20
18
  export type SettingsProfileSummary = z.infer<typeof settingsProfileSummary>;
21
- export const settingsProfileList = z.array(settingsProfileSummary);
19
+ export const settingsProfileList = openapi.profileListResponse;
22
20
 
23
21
  /**
24
22
  * `GET /api/config/profiles/{name}` and each version body — the stored profile
25
23
  * document (action=secret). `env` carries REAL values; `secret_keys` is the
26
24
  * per-profile secret-marks band folded into the secret-mask union for masking.
27
25
  */
28
- export const settingsProfileBody = z.object({
29
- description: z.string(),
30
- env: z.record(z.string(), z.string()),
31
- secret_keys: z.array(z.string()),
32
- });
26
+ export const settingsProfileBody = openapi.settingsProfileBody;
33
27
  export type SettingsProfileBody = z.infer<typeof settingsProfileBody>;
34
28
 
35
29
  /** `PUT /api/config/profiles/{name}` — a minimal save ack; `version` is the new store version. */
36
- export const settingsProfileSaved = z.object({
37
- ok: z.literal(true),
38
- version: z.number().optional(),
39
- });
30
+ export const settingsProfileSaved = openapi.profileWriteResult;
40
31
  export type SettingsProfileSaved = z.infer<typeof settingsProfileSaved>;
41
32
 
42
33
  /** `DELETE /api/config/profiles/{name}` — a minimal removal ack. */
43
- export const settingsProfileDeleted = z.object({ ok: z.literal(true) });
34
+ export const settingsProfileDeleted = openapi.okResult;
44
35
 
45
- /** `POST /api/config/profiles/{name}/rollback` — the restore ack; `version` is the resulting active version. */
46
- export const settingsProfileRollback = z.object({
47
- ok: z.literal(true),
48
- version: z.number(),
49
- });
36
+ /**
37
+ * `POST /api/config/profiles/{name}/rollback` — the restore ack; `version` is the resulting
38
+ * active version.
39
+ */
40
+ export const settingsProfileRollback = openapi.profileWriteResult;
50
41
  export type SettingsProfileRollback = z.infer<typeof settingsProfileRollback>;
51
42
 
52
43
  /**
@@ -55,13 +46,7 @@ export type SettingsProfileRollback = z.infer<typeof settingsProfileRollback>;
55
46
  * JsonDiff); `recycle_keys`/`refused_keys` are the diff's recycle-class and
56
47
  * boundary-refused key names, called out in the UI before apply.
57
48
  */
58
- export const settingsProfileDiff = z.object({
59
- added: z.array(z.string()),
60
- removed: z.array(z.string()),
61
- changed: z.array(z.object({ key: z.string(), old: z.string(), new: z.string() })),
62
- recycle_keys: z.array(z.string()),
63
- refused_keys: z.array(z.string()),
64
- });
49
+ export const settingsProfileDiff = openapi.profileDiff;
65
50
  export type SettingsProfileDiff = z.infer<typeof settingsProfileDiff>;
66
51
 
67
52
  /**
@@ -73,24 +58,16 @@ export type SettingsProfileDiff = z.infer<typeof settingsProfileDiff>;
73
58
  * the `self-deferred` status literal when the diff has serve-affecting recycle keys;
74
59
  * `fresh` is the per-kind list of NEW ready lives observed since the pre-apply snapshot
75
60
  * (each `{name, kind, generation}`), evidence of fresh capacity and never claimed as any
76
- * target's successor; `refused` is `[]` on success by construction (populated
77
- * `{key, reason}` only on a refusal), the populated refusal surfaces being the diff
78
- * preview and the refusal error report. `fanout` is the mode-wrapped fleet broadcast,
79
- * parsed EXPLICITLY so a failed propagation reaches the shared fleet-report handler. A
80
- * drift throws `ApiSchemaError`.
61
+ * target's successor; `refused` is `[]` on success by construction (the refused key
62
+ * names only on a refusal), the populated refusal surfaces being the diff preview and
63
+ * the refusal error report; `recycle_stopped` names the target a stopped recycle roll
64
+ * halted at, or is `null` when the roll ran to its end; `awaiting_respawn` names the
65
+ * workers (name + keys) still awaiting a respawn after the apply (empty when the roll
66
+ * converged). `fanout` is the mode-wrapped fleet broadcast, parsed EXPLICITLY so a failed
67
+ * propagation reaches the shared fleet-report handler. A drift throws `ApiSchemaError`.
81
68
  */
82
- export const profileApplyResponse = z.object({
83
- hot: z.array(z.string()),
84
- recycle: z.array(
85
- z.object({
86
- name: z.string(),
87
- kind: z.string(),
88
- status: z.string(),
89
- generation_before: z.number(),
90
- }),
91
- ),
92
- fresh: z.array(z.object({ name: z.string(), kind: z.string(), generation: z.number() })),
93
- refused: z.array(z.object({ key: z.string(), reason: z.string() })),
69
+ // The fan-out is hand-typed: the spec publishes it as one object with optional fields.
70
+ export const profileApplyResponse = openapi.profileApplyResponse.extend({
94
71
  fanout: fleetReportFanout,
95
72
  });
96
73
  export type ProfileApplyResponse = z.infer<typeof profileApplyResponse>;
@@ -100,21 +77,14 @@ export type ProfileApplyResponse = z.infer<typeof profileApplyResponse>;
100
77
  * no bodies), the generic versioned-store row minus `body`. `is_current` flags the
101
78
  * active pointer.
102
79
  */
103
- export const settingsProfileVersionMeta = z.object({
104
- version: z.number(),
105
- tags: z.array(z.string()),
106
- created_at: z.string(),
107
- is_current: z.boolean(),
108
- });
80
+ export const settingsProfileVersionMeta = openapi.profileVersionSummary;
109
81
  export type SettingsProfileVersionMeta = z.infer<typeof settingsProfileVersionMeta>;
110
- export const settingsProfileVersionList = z.array(settingsProfileVersionMeta);
82
+ export const settingsProfileVersionList = openapi.profileVersionListResponse;
111
83
 
112
84
  /**
113
85
  * `GET /api/config/profiles/{name}/versions/{version}` — one immutable version WITH
114
86
  * its `body` (action=secret; body rendered masked per the secret-mask union). The generic
115
87
  * versioned-store row shape.
116
88
  */
117
- export const settingsProfileVersion = settingsProfileVersionMeta.extend({
118
- body: settingsProfileBody,
119
- });
89
+ export const settingsProfileVersion = openapi.profileVersionView;
120
90
  export type SettingsProfileVersion = z.infer<typeof settingsProfileVersion>;
@@ -1,34 +1,32 @@
1
1
  /** Role grant, version and audit response schemas. */
2
2
  import { z } from 'zod';
3
3
 
4
+ import * as openapi from '../generated/openapi-schemas';
4
5
  import { roleBody } from './served';
5
6
  import { jsonValue } from './shared';
6
7
 
7
8
  /** A role's per-tag ACCESS LEVEL: `none` (no access), `read`, or `write`. */
8
- export const grantLevel = z.enum(['none', 'read', 'write']);
9
+ export const grantLevel = roleBody.shape.grants.valueType;
9
10
  export type GrantLevel = z.infer<typeof grantLevel>;
10
11
 
11
12
  /** A role's editable grant map: feature-group TAG name → the role's access level. */
12
- export const roleGrants = z.record(z.string(), grantLevel);
13
+ export const roleGrants = roleBody.shape.grants;
13
14
  export type RoleGrants = z.infer<typeof roleGrants>;
14
15
 
15
- export const roleList = z.array(roleBody);
16
+ export const roleList = openapi.roleDefinitionList;
16
17
 
17
18
  /** `DELETE /api/auth/roles/{name}` — the deleted role's name. */
18
- export const roleDeleted = z.object({ name: z.string(), deleted: z.boolean() });
19
+ export const roleDeleted = openapi.roleDeleted;
20
+
21
+ // The version and audit bodies are hand-typed: the spec publishes a version body as an open
22
+ // object.
19
23
 
20
24
  /**
21
25
  * One immutable role-version row (`GET /api/auth/roles/{name}/versions` →
22
26
  * `versions`). `body` is the role body at that version; `is_current` flags the
23
27
  * active pointer. Mirrors the generic versioned-store row shape.
24
28
  */
25
- export const roleVersion = z.object({
26
- version: z.number(),
27
- body: roleBody,
28
- tags: z.array(z.string()),
29
- created_at: z.string(),
30
- is_current: z.boolean(),
31
- });
29
+ export const roleVersion = openapi.documentVersion.extend({ body: roleBody });
32
30
  export type RoleVersion = z.infer<typeof roleVersion>;
33
31
 
34
32
  /**
@@ -36,22 +34,18 @@ export type RoleVersion = z.infer<typeof roleVersion>;
36
34
  * `audit`). Its `body` carries the mutation kind, the actor, and the before/after
37
35
  * role bodies (both `null` for a create's `before` / a delete's `after`).
38
36
  */
39
- export const roleAuditEvent = z.object({
40
- version: z.number(),
37
+ export const roleAuditEvent = openapi.documentVersion.extend({
41
38
  body: z.object({
42
39
  action: z.string(),
43
40
  actor: z.string().nullable(),
44
41
  before: jsonValue.nullable(),
45
42
  after: jsonValue.nullable(),
46
43
  }),
47
- tags: z.array(z.string()),
48
- created_at: z.string(),
49
- is_current: z.boolean(),
50
44
  });
51
45
  export type RoleAuditEvent = z.infer<typeof roleAuditEvent>;
52
46
 
53
47
  /** `GET /api/auth/roles/{name}/versions` — the append-only history + audit trail. */
54
- export const roleVersions = z.object({
48
+ export const roleVersions = openapi.roleVersionsView.extend({
55
49
  versions: z.array(roleVersion),
56
50
  audit: z.array(roleAuditEvent),
57
51
  });
@@ -1,23 +1,12 @@
1
1
  /** Schedule listing and server-clock response schemas. */
2
2
  import { z } from 'zod';
3
3
 
4
+ import * as openapi from '../generated/openapi-schemas';
4
5
  import { jsonValue } from './shared';
5
6
 
6
- // The skeleton returns opaque backend-tool results; the table reads a few known
7
- // fields and passes the rest through untouched.
8
-
9
- export const scheduleItem = z
10
- .object({
11
- name: z.string(),
12
- enabled: z.boolean().optional(),
13
- schedule: jsonValue.optional(),
14
- target: jsonValue.optional(),
15
- args: z.array(jsonValue).optional(),
16
- kwargs: z.record(z.string(), jsonValue).optional(),
17
- })
18
- .loose();
19
- export const scheduleList = z.array(scheduleItem);
20
- export type ScheduleItem = z.infer<typeof scheduleItem>;
7
+ // The listing is the generated `ScheduleListRow` array the server publishes (name, tool,
8
+ // typed cadence, enabled, next run, an optional backend error — never tool arguments).
9
+ export const scheduleList = openapi.scheduleListResponse;
21
10
 
22
11
  export const serverDateTime = z
23
12
  .object({
@@ -22,6 +22,10 @@ export const presetBody = generated.presetBody;
22
22
  export type PresetBody = z.input<typeof presetBody>;
23
23
  export const conversationRoute = generated.conversationRoute;
24
24
  export type ConversationRoute = z.infer<typeof conversationRoute>;
25
+ export const apiConversationRouteCreate = generated.apiConversationRouteCreate;
26
+ export type ApiConversationRouteCreate = z.input<typeof apiConversationRouteCreate>;
27
+ export const channelConversationRouteCreate = generated.channelConversationRouteCreate;
28
+ export type ChannelConversationRouteCreate = z.input<typeof channelConversationRouteCreate>;
25
29
  export const conversationRouteCreate = generated.conversationRouteCreate;
26
30
  export type ConversationRouteCreate = z.input<typeof conversationRouteCreate>;
27
31
  export const targetConversationConfig = generated.targetConversationConfig;
@@ -44,7 +48,36 @@ export const templateReconcile = generated.stateTemplateReconcile;
44
48
  export type TemplateReconcile = z.infer<typeof templateReconcile>;
45
49
  export const templateDeclarations = generated.stateTemplateDeclarations;
46
50
  export type TemplateDeclarations = z.infer<typeof templateDeclarations>;
51
+ export const stateTemplateParameter = generated.stateTemplateParameter;
52
+ export type StateTemplateParameter = z.infer<typeof stateTemplateParameter>;
53
+ export const stateRegimeRule = generated.stateRegimeRule;
54
+ export type StateRegimeRule = z.infer<typeof stateRegimeRule>;
55
+ export const stateTemplateTrace = generated.stateTemplateTrace;
56
+ export type StateTemplateTrace = z.infer<typeof stateTemplateTrace>;
47
57
  export const policyBody = generated.accessPolicy;
48
58
  export type PolicyBody = z.infer<typeof policyBody>;
49
59
  export const roleBody = generated.roleDefinition;
50
60
  export type RoleBody = z.infer<typeof roleBody>;
61
+ export const settingsProfileName = generated.settingsProfileName;
62
+ export type SettingsProfileName = z.infer<typeof settingsProfileName>;
63
+ export const previousProfileName = generated.previousProfileName;
64
+ export type PreviousProfileName = z.infer<typeof previousProfileName>;
65
+ export const scheduleCreate = generated.scheduleCreate;
66
+ export type ScheduleCreate = z.input<typeof scheduleCreate>;
67
+ export const scheduleListRow = generated.scheduleListRow;
68
+ export type ScheduleListRow = z.infer<typeof scheduleListRow>;
69
+ export const scheduleRecord = generated.scheduleRecord;
70
+ export type ScheduleRecord = z.infer<typeof scheduleRecord>;
71
+
72
+ /**
73
+ * The platform constants the contract serves, read instead of re-spelled: the reserved
74
+ * person subject kind (`PERSON_KIND`), the same-origin served-media route prefix
75
+ * (`MEDIA_ROUTE_PREFIX`) and the stored-media id grammar (`MEDIA_ID_PATTERN`, a regular
76
+ * expression matched against a whole id).
77
+ */
78
+ export const servedConstants = generated.servedConstants;
79
+ export type ServedConstants = typeof servedConstants;
80
+ /** The conformance vectors of the platform rules a browser mirrors. */
81
+ export const servedVectors = generated.servedVectors;
82
+ /** Each served document as JSON Schema, with the `$defs` it references. */
83
+ export const servedDocumentsJson = generated.servedDocumentsJson;
@@ -1,32 +1,27 @@
1
1
  /** Declarative settings-form schema response. */
2
2
  import { z } from 'zod';
3
3
 
4
+ import * as openapi from '../generated/openapi-schemas';
4
5
  import { jsonValue } from './shared';
5
6
 
6
7
  // The settings form is auto-rendered from a declarative group/field description
7
- // the skeleton emits from its typed settings models.
8
+ // the skeleton emits from its typed settings models. Each field is hand-typed: the spec
9
+ // publishes a field as an open object.
8
10
 
9
- export const settingsSchema = z.object({
10
- groups: z.array(
11
- z.object({
12
- name: z.string(),
13
- module: z.string(),
14
- qualname: z.string(),
15
- fields: z.array(
16
- z.object({
17
- name: z.string(),
18
- env_var: z.string(),
19
- type: z.string(),
20
- default: jsonValue.nullable(),
21
- required: z.boolean(),
22
- secret: z.boolean(),
23
- description: z.string().nullable(),
24
- nested_group: z.string().nullable(),
25
- default_namespace_var: z.string().nullable(),
26
- value: jsonValue.nullable(),
27
- }),
28
- ),
29
- }),
30
- ),
11
+ const settingsField = z.object({
12
+ name: z.string(),
13
+ env_var: z.string(),
14
+ type: z.string(),
15
+ default: jsonValue.nullable(),
16
+ required: z.boolean(),
17
+ secret: z.boolean(),
18
+ description: z.string().nullable(),
19
+ nested_group: z.string().nullable(),
20
+ default_namespace_var: z.string().nullable(),
21
+ value: jsonValue.nullable(),
22
+ });
23
+
24
+ export const settingsSchema = openapi.settingsSchemaView.extend({
25
+ groups: z.array(openapi.settingsGroupView.extend({ fields: z.array(settingsField) })),
31
26
  });
32
27
  export type SettingsSchema = z.infer<typeof settingsSchema>;
@@ -1,5 +1,7 @@
1
1
  /** Setup-door (`POST /api/setup`) request-body and result schemas. */
2
- import { z } from 'zod';
2
+ import type { z } from 'zod';
3
+
4
+ import * as openapi from '../generated/openapi-schemas';
3
5
 
4
6
  /**
5
7
  * The result of a successful `POST /api/setup`, returned exactly ONCE. `api_key`
@@ -8,15 +10,7 @@ import { z } from 'zod';
8
10
  * `invite_token` and `login_path` are set only when the attachment was an invite
9
11
  * the operator completes later.
10
12
  */
11
- export const setupResult = z.object({
12
- owner_user_id: z.string(),
13
- key_user_id: z.string(),
14
- api_key: z.string().min(1),
15
- key_fingerprint: z.string(),
16
- login_attached: z.boolean(),
17
- invite_token: z.string().nullable().optional(),
18
- login_path: z.string().nullable().optional(),
19
- });
13
+ export const setupResult = openapi.setupResult;
20
14
  export type SetupResult = z.infer<typeof setupResult>;
21
15
 
22
16
  /**