@vertesia/common 1.6.0-dev.20260923.085325Z → 1.6.0-dev.20261004.085740Z

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 (405) hide show
  1. package/lib/access-control-values.d.ts +2 -2
  2. package/lib/access-control-values.d.ts.map +1 -1
  3. package/lib/access-control-values.js +2 -2
  4. package/lib/access-control-values.js.map +1 -1
  5. package/lib/access-control.d.ts +7 -8
  6. package/lib/access-control.d.ts.map +1 -1
  7. package/lib/access-control.js +5 -0
  8. package/lib/access-control.js.map +1 -1
  9. package/lib/analytics.d.ts +6 -7
  10. package/lib/analytics.d.ts.map +1 -1
  11. package/lib/api-contract/components.generated.json +1389 -45
  12. package/lib/api-schemas/access-control.d.ts +33 -10
  13. package/lib/api-schemas/access-control.d.ts.map +1 -1
  14. package/lib/api-schemas/access-control.js +7 -6
  15. package/lib/api-schemas/access-control.js.map +1 -1
  16. package/lib/api-schemas/account.d.ts +5 -4
  17. package/lib/api-schemas/account.d.ts.map +1 -1
  18. package/lib/api-schemas/account.js.map +1 -1
  19. package/lib/api-schemas/agent-budget.d.ts +15 -0
  20. package/lib/api-schemas/agent-budget.d.ts.map +1 -0
  21. package/lib/api-schemas/agent-budget.js +55 -0
  22. package/lib/api-schemas/agent-budget.js.map +1 -0
  23. package/lib/api-schemas/agent-runs.d.ts +1525 -100
  24. package/lib/api-schemas/agent-runs.d.ts.map +1 -1
  25. package/lib/api-schemas/agent-runs.js +60 -28
  26. package/lib/api-schemas/agent-runs.js.map +1 -1
  27. package/lib/api-schemas/apikey.d.ts +11 -10
  28. package/lib/api-schemas/apikey.d.ts.map +1 -1
  29. package/lib/api-schemas/apikey.js.map +1 -1
  30. package/lib/api-schemas/app-lifecycle.d.ts +13 -0
  31. package/lib/api-schemas/app-lifecycle.d.ts.map +1 -1
  32. package/lib/api-schemas/app-lifecycle.js +4 -0
  33. package/lib/api-schemas/app-lifecycle.js.map +1 -1
  34. package/lib/api-schemas/app-runtime.d.ts +1821 -108
  35. package/lib/api-schemas/app-runtime.d.ts.map +1 -1
  36. package/lib/api-schemas/audit-trail.d.ts +20 -0
  37. package/lib/api-schemas/audit-trail.d.ts.map +1 -1
  38. package/lib/api-schemas/audit-trail.js +7 -1
  39. package/lib/api-schemas/audit-trail.js.map +1 -1
  40. package/lib/api-schemas/content.d.ts +665 -30
  41. package/lib/api-schemas/content.d.ts.map +1 -1
  42. package/lib/api-schemas/content.js +47 -0
  43. package/lib/api-schemas/content.js.map +1 -1
  44. package/lib/api-schemas/cost-analytics.d.ts +18 -0
  45. package/lib/api-schemas/cost-analytics.d.ts.map +1 -1
  46. package/lib/api-schemas/cost-analytics.js +31 -2
  47. package/lib/api-schemas/cost-analytics.js.map +1 -1
  48. package/lib/api-schemas/document-processing.d.ts +381 -18
  49. package/lib/api-schemas/document-processing.d.ts.map +1 -1
  50. package/lib/api-schemas/environment.d.ts +0 -5
  51. package/lib/api-schemas/environment.d.ts.map +1 -1
  52. package/lib/api-schemas/environment.js +0 -1
  53. package/lib/api-schemas/environment.js.map +1 -1
  54. package/lib/api-schemas/events.d.ts +1143 -54
  55. package/lib/api-schemas/events.d.ts.map +1 -1
  56. package/lib/api-schemas/group.d.ts +2 -1
  57. package/lib/api-schemas/group.d.ts.map +1 -1
  58. package/lib/api-schemas/group.js.map +1 -1
  59. package/lib/api-schemas/index.d.ts +1 -0
  60. package/lib/api-schemas/index.d.ts.map +1 -1
  61. package/lib/api-schemas/index.js +1 -0
  62. package/lib/api-schemas/index.js.map +1 -1
  63. package/lib/api-schemas/inference-profile.d.ts +5017 -0
  64. package/lib/api-schemas/inference-profile.d.ts.map +1 -0
  65. package/lib/api-schemas/inference-profile.js +135 -0
  66. package/lib/api-schemas/inference-profile.js.map +1 -0
  67. package/lib/api-schemas/integrations.d.ts +6 -6
  68. package/lib/api-schemas/interaction.d.ts +34391 -703
  69. package/lib/api-schemas/interaction.d.ts.map +1 -1
  70. package/lib/api-schemas/interaction.js +34 -1
  71. package/lib/api-schemas/interaction.js.map +1 -1
  72. package/lib/api-schemas/invites.d.ts +10 -9
  73. package/lib/api-schemas/invites.d.ts.map +1 -1
  74. package/lib/api-schemas/invites.js.map +1 -1
  75. package/lib/api-schemas/process.d.ts +653 -34
  76. package/lib/api-schemas/process.d.ts.map +1 -1
  77. package/lib/api-schemas/process.js +66 -0
  78. package/lib/api-schemas/process.js.map +1 -1
  79. package/lib/api-schemas/project-configuration.d.ts +1323 -62
  80. package/lib/api-schemas/project-configuration.d.ts.map +1 -1
  81. package/lib/api-schemas/project-configuration.js +15 -1
  82. package/lib/api-schemas/project-configuration.js.map +1 -1
  83. package/lib/api-schemas/project.d.ts +2031 -116
  84. package/lib/api-schemas/project.d.ts.map +1 -1
  85. package/lib/api-schemas/project.js +9 -1
  86. package/lib/api-schemas/project.js.map +1 -1
  87. package/lib/api-schemas/quota.d.ts +7 -6
  88. package/lib/api-schemas/quota.d.ts.map +1 -1
  89. package/lib/api-schemas/quota.js.map +1 -1
  90. package/lib/api-schemas/registry.d.ts +27820 -35892
  91. package/lib/api-schemas/registry.d.ts.map +1 -1
  92. package/lib/api-schemas/registry.js +55 -5
  93. package/lib/api-schemas/registry.js.map +1 -1
  94. package/lib/api-schemas/run-budget.d.ts +52 -0
  95. package/lib/api-schemas/run-budget.d.ts.map +1 -0
  96. package/lib/api-schemas/run-budget.js +55 -0
  97. package/lib/api-schemas/run-budget.js.map +1 -0
  98. package/lib/api-schemas/store.d.ts +6388 -338
  99. package/lib/api-schemas/store.d.ts.map +1 -1
  100. package/lib/api-schemas/store.js +11 -0
  101. package/lib/api-schemas/store.js.map +1 -1
  102. package/lib/api-schemas/user.d.ts +9 -8
  103. package/lib/api-schemas/user.d.ts.map +1 -1
  104. package/lib/api-schemas/user.js.map +1 -1
  105. package/lib/api-schemas/view-execution.d.ts +8 -0
  106. package/lib/api-schemas/view-execution.d.ts.map +1 -1
  107. package/lib/api-schemas/views.d.ts +14 -0
  108. package/lib/api-schemas/views.d.ts.map +1 -1
  109. package/lib/api-schemas/workflow-runs.d.ts +335 -12
  110. package/lib/api-schemas/workflow-runs.d.ts.map +1 -1
  111. package/lib/api-schemas/workflow-runs.js +2 -0
  112. package/lib/api-schemas/workflow-runs.js.map +1 -1
  113. package/lib/apikey.d.ts +30 -25
  114. package/lib/apikey.d.ts.map +1 -1
  115. package/lib/apikey.js.map +1 -1
  116. package/lib/apps.d.ts +116 -121
  117. package/lib/apps.d.ts.map +1 -1
  118. package/lib/apps.js.map +1 -1
  119. package/lib/audit-trail.d.ts +17 -18
  120. package/lib/audit-trail.d.ts.map +1 -1
  121. package/lib/audit-trail.js +2 -0
  122. package/lib/audit-trail.js.map +1 -1
  123. package/lib/browser-credentials.d.ts +11 -12
  124. package/lib/browser-credentials.d.ts.map +1 -1
  125. package/lib/common.d.ts +17 -24
  126. package/lib/common.d.ts.map +1 -1
  127. package/lib/content-query.d.ts +3 -4
  128. package/lib/content-query.d.ts.map +1 -1
  129. package/lib/cost-analytics.d.ts +13 -21
  130. package/lib/cost-analytics.d.ts.map +1 -1
  131. package/lib/cost-analytics.js +0 -7
  132. package/lib/cost-analytics.js.map +1 -1
  133. package/lib/data-platform.d.ts +79 -88
  134. package/lib/data-platform.d.ts.map +1 -1
  135. package/lib/data-platform.js.map +1 -1
  136. package/lib/delegation.d.ts +4 -5
  137. package/lib/delegation.d.ts.map +1 -1
  138. package/lib/email.d.ts +15 -17
  139. package/lib/email.d.ts.map +1 -1
  140. package/lib/email.js.map +1 -1
  141. package/lib/embeddings.d.ts +25 -26
  142. package/lib/embeddings.d.ts.map +1 -1
  143. package/lib/environment.d.ts +16 -17
  144. package/lib/environment.d.ts.map +1 -1
  145. package/lib/environment.js.map +1 -1
  146. package/lib/facets.d.ts +3 -4
  147. package/lib/facets.d.ts.map +1 -1
  148. package/lib/group.d.ts +6 -7
  149. package/lib/group.d.ts.map +1 -1
  150. package/lib/group.js.map +1 -1
  151. package/lib/index.d.ts +3 -1
  152. package/lib/index.d.ts.map +1 -1
  153. package/lib/index.js.map +1 -1
  154. package/lib/inference-profile.d.ts +17 -0
  155. package/lib/inference-profile.d.ts.map +1 -0
  156. package/lib/inference-profile.js +2 -0
  157. package/lib/inference-profile.js.map +1 -0
  158. package/lib/integrations.d.ts +19 -20
  159. package/lib/integrations.d.ts.map +1 -1
  160. package/lib/integrations.js.map +1 -1
  161. package/lib/interaction.d.ts +68 -73
  162. package/lib/interaction.d.ts.map +1 -1
  163. package/lib/interaction.js.map +1 -1
  164. package/lib/meters.d.ts +4 -5
  165. package/lib/meters.d.ts.map +1 -1
  166. package/lib/oauth-server.d.ts +40 -41
  167. package/lib/oauth-server.d.ts.map +1 -1
  168. package/lib/oauth.d.ts +9 -10
  169. package/lib/oauth.d.ts.map +1 -1
  170. package/lib/payload.d.ts +11 -14
  171. package/lib/payload.d.ts.map +1 -1
  172. package/lib/pending-asks.d.ts +8 -13
  173. package/lib/pending-asks.d.ts.map +1 -1
  174. package/lib/pending-asks.js +0 -4
  175. package/lib/pending-asks.js.map +1 -1
  176. package/lib/platform-event.d.ts +48 -51
  177. package/lib/platform-event.d.ts.map +1 -1
  178. package/lib/platform-event.js.map +1 -1
  179. package/lib/principal-context.d.ts +3 -3
  180. package/lib/principal-context.d.ts.map +1 -1
  181. package/lib/project.d.ts +42 -43
  182. package/lib/project.d.ts.map +1 -1
  183. package/lib/project.js.map +1 -1
  184. package/lib/prompt.d.ts +14 -16
  185. package/lib/prompt.d.ts.map +1 -1
  186. package/lib/prompt.js.map +1 -1
  187. package/lib/query.d.ts +10 -13
  188. package/lib/query.d.ts.map +1 -1
  189. package/lib/rate-limiter.d.ts +7 -11
  190. package/lib/rate-limiter.d.ts.map +1 -1
  191. package/lib/refs.d.ts +2 -3
  192. package/lib/refs.d.ts.map +1 -1
  193. package/lib/refs.js.map +1 -1
  194. package/lib/roles/types.d.ts +5 -6
  195. package/lib/roles/types.d.ts.map +1 -1
  196. package/lib/roles/types.js.map +1 -1
  197. package/lib/run-budget.d.ts +8 -0
  198. package/lib/run-budget.d.ts.map +1 -0
  199. package/lib/run-budget.js +2 -0
  200. package/lib/run-budget.js.map +1 -0
  201. package/lib/runs.d.ts +9 -10
  202. package/lib/runs.d.ts.map +1 -1
  203. package/lib/secrets.d.ts +20 -21
  204. package/lib/secrets.d.ts.map +1 -1
  205. package/lib/store/agent-approval.d.ts +4 -5
  206. package/lib/store/agent-approval.d.ts.map +1 -1
  207. package/lib/store/agent-approval.js.map +1 -1
  208. package/lib/store/agent-run.d.ts +50 -52
  209. package/lib/store/agent-run.d.ts.map +1 -1
  210. package/lib/store/agent-run.js.map +1 -1
  211. package/lib/store/collections.d.ts +11 -12
  212. package/lib/store/collections.d.ts.map +1 -1
  213. package/lib/store/collections.js.map +1 -1
  214. package/lib/store/conversation-state.d.ts +14 -8
  215. package/lib/store/conversation-state.d.ts.map +1 -1
  216. package/lib/store/doc-analyzer.d.ts +7 -8
  217. package/lib/store/doc-analyzer.d.ts.map +1 -1
  218. package/lib/store/dsl-workflow.d.ts +10 -12
  219. package/lib/store/dsl-workflow.d.ts.map +1 -1
  220. package/lib/store/dsl-workflow.js.map +1 -1
  221. package/lib/store/duration.d.ts +12 -0
  222. package/lib/store/duration.d.ts.map +1 -0
  223. package/lib/store/duration.js +2 -0
  224. package/lib/store/duration.js.map +1 -0
  225. package/lib/store/grounded-extraction.d.ts +6 -7
  226. package/lib/store/grounded-extraction.d.ts.map +1 -1
  227. package/lib/store/intake-policy-schema.generated.d.ts.map +1 -1
  228. package/lib/store/intake-policy-schema.generated.js +143 -2
  229. package/lib/store/intake-policy-schema.generated.js.map +1 -1
  230. package/lib/store/process.d.ts +70 -69
  231. package/lib/store/process.d.ts.map +1 -1
  232. package/lib/store/process.js.map +1 -1
  233. package/lib/store/rendering.d.ts +6 -12
  234. package/lib/store/rendering.d.ts.map +1 -1
  235. package/lib/store/rendering.js +0 -5
  236. package/lib/store/rendering.js.map +1 -1
  237. package/lib/store/signals.d.ts +43 -0
  238. package/lib/store/signals.d.ts.map +1 -1
  239. package/lib/store/signals.js +6 -1
  240. package/lib/store/signals.js.map +1 -1
  241. package/lib/store/store.d.ts +92 -91
  242. package/lib/store/store.d.ts.map +1 -1
  243. package/lib/store/store.js.map +1 -1
  244. package/lib/store/task.d.ts +10 -14
  245. package/lib/store/task.d.ts.map +1 -1
  246. package/lib/store/workflow.d.ts +35 -41
  247. package/lib/store/workflow.d.ts.map +1 -1
  248. package/lib/store/workflow.js.map +1 -1
  249. package/lib/sts-token-types.d.ts +14 -19
  250. package/lib/sts-token-types.d.ts.map +1 -1
  251. package/lib/tools.d.ts +12 -13
  252. package/lib/tools.d.ts.map +1 -1
  253. package/lib/transient-tokens.d.ts +3 -3
  254. package/lib/transient-tokens.d.ts.map +1 -1
  255. package/lib/user.d.ts +17 -20
  256. package/lib/user.d.ts.map +1 -1
  257. package/lib/user.js.map +1 -1
  258. package/lib/vertesia-common.js +2 -2
  259. package/lib/vertesia-common.js.map +1 -1
  260. package/lib/views.d.ts +61 -64
  261. package/lib/views.d.ts.map +1 -1
  262. package/lib/views.js.map +1 -1
  263. package/lib/wire-types.generated.d.ts +11231 -0
  264. package/lib/wire-types.generated.d.ts.map +1 -0
  265. package/lib/wire-types.generated.js +4 -0
  266. package/lib/wire-types.generated.js.map +1 -0
  267. package/lib/workflow-analytics.d.ts +21 -19
  268. package/lib/workflow-analytics.d.ts.map +1 -1
  269. package/lib/workflow-analytics.js +2 -2
  270. package/lib/workflow-analytics.js.map +1 -1
  271. package/package.json +15 -10
  272. package/src/access-control-values.ts +2 -2
  273. package/src/access-control.ts +7 -15
  274. package/src/analytics.ts +6 -13
  275. package/src/api-contract/components.generated.json +1389 -45
  276. package/src/api-schemas/access-control.ts +18 -16
  277. package/src/api-schemas/account.ts +5 -4
  278. package/src/api-schemas/agent-budget.ts +60 -0
  279. package/src/api-schemas/agent-runs.ts +63 -27
  280. package/src/api-schemas/apikey.ts +11 -10
  281. package/src/api-schemas/app-lifecycle.ts +5 -0
  282. package/src/api-schemas/audit-trail.ts +7 -1
  283. package/src/api-schemas/content.ts +55 -0
  284. package/src/api-schemas/cost-analytics.ts +34 -2
  285. package/src/api-schemas/environment.ts +0 -1
  286. package/src/api-schemas/group.ts +2 -1
  287. package/src/api-schemas/index.ts +1 -0
  288. package/src/api-schemas/inference-profile.ts +151 -0
  289. package/src/api-schemas/interaction.ts +40 -1
  290. package/src/api-schemas/invites.ts +10 -9
  291. package/src/api-schemas/process.ts +78 -2
  292. package/src/api-schemas/project-configuration.ts +19 -1
  293. package/src/api-schemas/project.ts +19 -10
  294. package/src/api-schemas/quota.ts +7 -6
  295. package/src/api-schemas/registry.ts +131 -33
  296. package/src/api-schemas/run-budget.ts +60 -0
  297. package/src/api-schemas/store.ts +12 -0
  298. package/src/api-schemas/user.ts +9 -8
  299. package/src/api-schemas/workflow-runs.ts +2 -0
  300. package/src/apikey.ts +30 -39
  301. package/src/apps.ts +116 -239
  302. package/src/audit-trail.ts +18 -33
  303. package/src/browser-credentials.ts +11 -23
  304. package/src/common.ts +17 -37
  305. package/src/content-query.ts +3 -4
  306. package/src/cost-analytics.ts +13 -35
  307. package/src/data-platform.ts +79 -168
  308. package/src/delegation.ts +4 -9
  309. package/src/email.ts +15 -29
  310. package/src/embeddings.ts +25 -51
  311. package/src/environment.ts +16 -33
  312. package/src/facets.ts +3 -4
  313. package/src/group.ts +6 -13
  314. package/src/index.ts +27 -0
  315. package/src/inference-profile.ts +20 -0
  316. package/src/integrations.ts +21 -41
  317. package/src/interaction.ts +68 -137
  318. package/src/meters.ts +4 -9
  319. package/src/oauth-server.ts +40 -81
  320. package/src/oauth.ts +9 -19
  321. package/src/payload.ts +11 -25
  322. package/src/pending-asks.ts +8 -22
  323. package/src/platform-event.ts +48 -97
  324. package/src/principal-context.ts +3 -3
  325. package/src/project.ts +43 -86
  326. package/src/prompt.ts +14 -31
  327. package/src/query.ts +10 -20
  328. package/src/rate-limiter.ts +7 -19
  329. package/src/refs.ts +2 -3
  330. package/src/roles/types.ts +5 -11
  331. package/src/run-budget.ts +8 -0
  332. package/src/runs.ts +9 -19
  333. package/src/secrets.ts +20 -41
  334. package/src/store/agent-approval.ts +4 -9
  335. package/src/store/agent-run.ts +53 -99
  336. package/src/store/collections.ts +11 -23
  337. package/src/store/conversation-state.ts +15 -15
  338. package/src/store/doc-analyzer.ts +7 -15
  339. package/src/store/dsl-workflow.ts +10 -23
  340. package/src/store/duration.ts +45 -0
  341. package/src/store/grounded-extraction.ts +6 -13
  342. package/src/store/intake-policy-schema.generated.ts +148 -2
  343. package/src/store/process.ts +70 -140
  344. package/src/store/rendering.ts +6 -19
  345. package/src/store/signals.ts +48 -0
  346. package/src/store/store.ts +92 -181
  347. package/src/store/task.ts +10 -24
  348. package/src/store/workflow.ts +35 -71
  349. package/src/sts-token-types.ts +14 -33
  350. package/src/tools.ts +12 -25
  351. package/src/transient-tokens.ts +3 -3
  352. package/src/user.ts +17 -39
  353. package/src/views.ts +61 -125
  354. package/src/wire-types.generated.ts +11889 -0
  355. package/src/workflow-analytics.ts +21 -19
  356. package/src/agent-resources.test.ts +0 -89
  357. package/src/api-contract/components.contract.test.ts +0 -99
  358. package/src/api-schemas/access-control.contract.test.ts +0 -209
  359. package/src/api-schemas/account-apikey.test.ts +0 -60
  360. package/src/api-schemas/account.contract.test.ts +0 -319
  361. package/src/api-schemas/adapter-edge-cases.test.ts +0 -499
  362. package/src/api-schemas/agent-communication.contract.test.ts +0 -90
  363. package/src/api-schemas/agent-history.contract.test.ts +0 -42
  364. package/src/api-schemas/agent-runs.contract.test.ts +0 -240
  365. package/src/api-schemas/api-discriminators.test.ts +0 -185
  366. package/src/api-schemas/apikey.contract.test.ts +0 -270
  367. package/src/api-schemas/app-delete-summary.contract.test.ts +0 -67
  368. package/src/api-schemas/bulk-operation.contract.test.ts +0 -39
  369. package/src/api-schemas/bundle-isolation.test.ts +0 -44
  370. package/src/api-schemas/commands.contract.test.ts +0 -51
  371. package/src/api-schemas/cost-analytics.contract.test.ts +0 -64
  372. package/src/api-schemas/dashboard.contract.test.ts +0 -138
  373. package/src/api-schemas/data-store.contract.test.ts +0 -97
  374. package/src/api-schemas/document-processing.contract.test.ts +0 -76
  375. package/src/api-schemas/emit-json-schema.test.ts +0 -36
  376. package/src/api-schemas/environment.contract.test.ts +0 -202
  377. package/src/api-schemas/group.contract.test.ts +0 -205
  378. package/src/api-schemas/indexing.contract.test.ts +0 -122
  379. package/src/api-schemas/interaction.contract.test.ts +0 -307
  380. package/src/api-schemas/invites.contract.test.ts +0 -268
  381. package/src/api-schemas/llumiverse.contract.test.ts +0 -179
  382. package/src/api-schemas/mcp-api-key.contract.test.ts +0 -125
  383. package/src/api-schemas/oauth.contract.test.ts +0 -181
  384. package/src/api-schemas/parameters.test.ts +0 -402
  385. package/src/api-schemas/process.contract.test.ts +0 -115
  386. package/src/api-schemas/project.contract.test.ts +0 -472
  387. package/src/api-schemas/pruning-limits.test.ts +0 -189
  388. package/src/api-schemas/quota.contract.test.ts +0 -147
  389. package/src/api-schemas/registry-groups.test.ts +0 -99
  390. package/src/api-schemas/response-pruning.test.ts +0 -260
  391. package/src/api-schemas/store.contract.test.ts +0 -378
  392. package/src/api-schemas/sts.contract.test.ts +0 -112
  393. package/src/api-schemas/user.contract.test.ts +0 -197
  394. package/src/api-schemas/views.contract.test.ts +0 -112
  395. package/src/api-schemas/zeno-response-contracts.test.ts +0 -380
  396. package/src/apps.test.ts +0 -89
  397. package/src/oauth-scopes.test.ts +0 -15
  398. package/src/roles.test.ts +0 -33
  399. package/src/schema-for-extraction.test.ts +0 -191
  400. package/src/store/agent-approval.test.ts +0 -18
  401. package/src/store/content-type-editing.test.ts +0 -17
  402. package/src/store/ms.d.ts +0 -42
  403. package/src/store/schedule.test.ts +0 -59
  404. package/src/store/workflow.test.ts +0 -640
  405. package/src/versions.test.ts +0 -13
@@ -7,78 +7,13 @@ import type {
7
7
  StatelessExecutionOptions,
8
8
  ToolUse,
9
9
  } from '@llumiverse/common';
10
- import type { z } from 'zod';
11
- import type {
12
- AgentResourceActionSchema,
13
- AgentResourceReferenceSchema,
14
- AgentResourceTypeSchema,
15
- AgentRunnerOptionsSchema,
16
- AsyncCompletionModeSchema,
17
- AsyncCompletionOptionsSchema,
18
- AsyncConversationExecutionPayloadSchema,
19
- AsyncExecutionPayloadSchema,
20
- AsyncExecutionResultSchema,
21
- AsyncInteractionExecutionPayloadSchema,
22
- CachePolicySchema,
23
- CatalogInteractionRefSchema,
24
- ConversationStripOptionsSchema,
25
- ConversationVisibilitySchema,
26
- ExecutionRunInteractionSchema,
27
- ExecutionRunRefSchema,
28
- ExecutionRunWorkflowSchema,
29
- GeneratedInteractionDefinitionSchema,
30
- GeneratedInteractionPromptSegmentSchema,
31
- GeneratedInteractionPromptTemplateSchema,
32
- GeneratedTestDataRecordSchema,
33
- GenerateInteractionPayloadSchema,
34
- GenerateTestDataPayloadSchema,
35
- ImprovePromptPayloadConfigSchema,
36
- ImprovePromptPayloadSchema,
37
- InCodeInteractionSchema,
38
- InCodePromptSchema,
39
- InitialToolCallSchema,
40
- InteractionCreatePayloadSchema,
41
- InteractionEndpointQuerySchema,
42
- InteractionEndpointSchema,
43
- InteractionExecutionErrorSchema,
44
- InteractionExecutionPayloadSchema,
45
- InteractionForkPayloadSchema,
46
- InteractionNameSchema,
47
- InteractionPublishPayloadSchema,
48
- InteractionRefSchema,
49
- InteractionRefWithSchemaSchema,
50
- InteractionSchema,
51
- InteractionsExportPayloadSchema,
52
- InteractionTagsSchema,
53
- InteractionUpdatePayloadSchema,
54
- InteractionVisibilitySchema,
55
- NamedInteractionExecutionPayloadSchema,
56
- PromptImprovementResponseSchema,
57
- PromptModalitiesSchema,
58
- RateLimitRequestPayloadSchema,
59
- RateLimitRequestResponseSchema,
60
- ResolvedCatalogInteractionSchema,
61
- ResolvedEnvironmentInfoSchema,
62
- ResolvedInteractionExecutionInfoSchema,
63
- ResolvedRuntimeConfigSchema,
64
- ResultStorageOptionsSchema,
65
- RunSourceSchema,
66
- SchemaRefSchema,
67
- SkillContextTriggersSchema,
68
- StreamingOptionsSchema,
69
- StreamingTelemetryContextSchema,
70
- ToolResultMetaSchema,
71
- ToolResultSchema,
72
- ToolResultsPayloadSchema,
73
- UpdateExecutionRunPayloadSchema,
74
- UserMessagePayloadSchema,
75
- } from './api-schemas/interaction.js';
76
- import type { InteractionExecutionConfigurationSchema } from './api-schemas/store.js';
77
10
  import type { ExecutionEnvironmentRef } from './environment.js';
11
+ import type { InferenceProfileSnapshot } from './inference-profile.js';
78
12
  import type { ProjectRef } from './project.js';
79
13
  import type { PopulatedPromptSegmentDef } from './prompt.js';
80
14
  import type { TextArtifactReference } from './store/conversation-state.js';
81
15
  import type { AccountRef } from './user.js';
16
+ import type * as Wire from './wire-types.generated.js';
82
17
 
83
18
  /**
84
19
  * `RunDataStorageLevel` and `ConfigModes` live in `./interaction-values.js` so the API schemas can
@@ -87,13 +22,13 @@ import type { AccountRef } from './user.js';
87
22
  */
88
23
  export * from './interaction-values.js';
89
24
 
90
- export type InteractionExecutionError = z.infer<typeof InteractionExecutionErrorSchema>;
25
+ export type InteractionExecutionError = Wire.InteractionExecutionError;
91
26
 
92
27
  /**
93
28
  * Configuration for stripping large data from conversation history
94
29
  * to prevent JSON serialization issues and reduce storage bloat.
95
30
  */
96
- export type ConversationStripOptions = z.infer<typeof ConversationStripOptionsSchema>;
31
+ export type ConversationStripOptions = Wire.ConversationStripOptions;
97
32
 
98
33
  // ------------------ in code interactions -----------------
99
34
  /**
@@ -102,7 +37,7 @@ export type ConversationStripOptions = z.infer<typeof ConversationStripOptionsSc
102
37
  * Stored interactions can use `oid:` prefix.
103
38
  * If no prefix is used it fallback on `oid:`.
104
39
  */
105
- export type CatalogInteractionRef = z.infer<typeof CatalogInteractionRefSchema>;
40
+ export type CatalogInteractionRef = Wire.CatalogInteractionRef;
106
41
 
107
42
  export interface CatalogTagQuery {
108
43
  tag?: string;
@@ -121,35 +56,30 @@ export interface ExecuteInteractionByEndpointHeaders {
121
56
  'x-interaction-tag'?: string;
122
57
  }
123
58
 
124
- export interface ResolveInteractionQuery {
125
- environment?: string;
126
- model?: string;
127
- hasImage?: boolean;
128
- hasVideo?: boolean;
129
- }
59
+ export type ResolveInteractionQuery = Wire.ResolveInteractionQuery;
130
60
 
131
- export type InCodePrompt = z.infer<typeof InCodePromptSchema>;
132
- export type InCodeInteraction = z.infer<typeof InCodeInteractionSchema>;
133
- export type ResolvedCatalogInteraction = z.infer<typeof ResolvedCatalogInteractionSchema>;
61
+ export type InCodePrompt = Wire.InCodePrompt;
62
+ export type InCodeInteraction = Wire.InCodeInteraction;
63
+ export type ResolvedCatalogInteraction = Wire.ResolvedCatalogInteraction;
134
64
  export type InteractionSpec = Omit<InCodeInteraction, 'id' | 'runtime' | 'type' | 'published' | 'version'>;
135
65
  // ---------------------------------------------------------
136
66
 
137
67
  /**
138
68
  * The payload to query the interaction endpoints
139
69
  */
140
- export type InteractionEndpointQuery = z.infer<typeof InteractionEndpointQuerySchema>;
70
+ export type InteractionEndpointQuery = Wire.InteractionEndpointQuery;
141
71
 
142
72
  /**
143
73
  * A description of an interaction endpoint.
144
74
  */
145
- export type InteractionEndpoint = z.infer<typeof InteractionEndpointSchema>;
75
+ export type InteractionEndpoint = Wire.InteractionEndpoint;
146
76
 
147
- export type InteractionTags = z.infer<typeof InteractionTagsSchema>;
77
+ export type InteractionTags = Wire.InteractionTags;
148
78
 
149
- export type InteractionRef = z.infer<typeof InteractionRefSchema>;
79
+ export type InteractionRef = Wire.InteractionRef;
150
80
 
151
81
  /** An interaction reduced to the fields a name picker needs. */
152
- export type InteractionName = z.infer<typeof InteractionNameSchema>;
82
+ export type InteractionName = Wire.InteractionName;
153
83
 
154
84
  /**
155
85
  * An interaction reference carrying the schemas an export needs to reconstruct it.
@@ -159,9 +89,9 @@ export type InteractionName = z.infer<typeof InteractionNameSchema>;
159
89
  * canonical alias — the alias publishes as a bare reference, with no members to omit — and the
160
90
  * interface also overstated each prompt template, which an export populates with `inputSchema` alone.
161
91
  */
162
- export type InteractionRefWithSchema = z.infer<typeof InteractionRefWithSchemaSchema>;
92
+ export type InteractionRefWithSchema = Wire.InteractionRefWithSchema;
163
93
 
164
- export type InteractionsExportPayload = z.infer<typeof InteractionsExportPayloadSchema>;
94
+ export type InteractionsExportPayload = Wire.InteractionsExportPayload;
165
95
 
166
96
  export enum InteractionStatus {
167
97
  draft = 'draft',
@@ -182,16 +112,16 @@ export enum ExecutionRunStatus {
182
112
  * Schema can be stored or specified as a reference to an external schema.
183
113
  * We only support "store:" references for now
184
114
  */
185
- export type SchemaRef = z.infer<typeof SchemaRefSchema>;
186
- export type CachePolicy = z.infer<typeof CachePolicySchema>;
187
- export type InteractionVisibility = z.infer<typeof InteractionVisibilitySchema>;
188
- export type Interaction = z.infer<typeof InteractionSchema>;
115
+ export type SchemaRef = Wire.SchemaRef;
116
+ export type CachePolicy = Wire.CachePolicy;
117
+ export type InteractionVisibility = Wire.InteractionVisibility;
118
+ export type Interaction = Wire.Interaction;
189
119
 
190
- export type InteractionCreatePayload = z.infer<typeof InteractionCreatePayloadSchema>;
120
+ export type InteractionCreatePayload = Wire.InteractionCreatePayload;
191
121
 
192
- export type InteractionUpdatePayload = z.infer<typeof InteractionUpdatePayloadSchema>;
122
+ export type InteractionUpdatePayload = Wire.InteractionUpdatePayload;
193
123
 
194
- export type InteractionPublishPayload = z.infer<typeof InteractionPublishPayloadSchema>;
124
+ export type InteractionPublishPayload = Wire.InteractionPublishPayload;
195
125
 
196
126
  export interface InteractionDeletePayload {
197
127
  /**
@@ -203,13 +133,13 @@ export interface InteractionDeletePayload {
203
133
  cascade?: boolean;
204
134
  }
205
135
 
206
- export type InteractionForkPayload = z.infer<typeof InteractionForkPayloadSchema>;
136
+ export type InteractionForkPayload = Wire.InteractionForkPayload;
207
137
 
208
- export type InteractionExecutionPayload = z.infer<typeof InteractionExecutionPayloadSchema>;
138
+ export type InteractionExecutionPayload = Wire.InteractionExecutionPayload;
209
139
 
210
- export type NamedInteractionExecutionPayload = z.infer<typeof NamedInteractionExecutionPayloadSchema>;
140
+ export type NamedInteractionExecutionPayload = Wire.NamedInteractionExecutionPayload;
211
141
 
212
- export type ConversationVisibility = z.infer<typeof ConversationVisibilitySchema>;
142
+ export type ConversationVisibility = Wire.ConversationVisibility;
213
143
 
214
144
  /**
215
145
  * Defines the scope for agent search operations.
@@ -225,13 +155,13 @@ export enum AgentSearchScope {
225
155
  * Context triggers for auto-injection of skills.
226
156
  * When these conditions match, the skill is automatically injected into the agent context.
227
157
  */
228
- export type SkillContextTriggers = z.infer<typeof SkillContextTriggersSchema>;
158
+ export type SkillContextTriggers = Wire.SkillContextTriggers;
229
159
 
230
160
  /**
231
161
  * Configuration options for Agent Runner functionality.
232
162
  * These options control how interactions are exposed and executed in the Agent Runner.
233
163
  */
234
- export type AgentRunnerOptions = z.infer<typeof AgentRunnerOptionsSchema>;
164
+ export type AgentRunnerOptions = Wire.AgentRunnerOptions;
235
165
 
236
166
  // ================= User Communication Channels ====================
237
167
  // Import for local use
@@ -253,50 +183,50 @@ export {
253
183
  * A tool invocation executed before the first model turn of a conversation.
254
184
  * Results are injected into the initial context so the agent starts with them in hand.
255
185
  */
256
- export type InitialToolCall = z.infer<typeof InitialToolCallSchema>;
186
+ export type InitialToolCall = Wire.InitialToolCall;
257
187
 
258
- export type AsyncConversationExecutionPayload = z.infer<typeof AsyncConversationExecutionPayloadSchema>;
188
+ export type AsyncConversationExecutionPayload = Wire.AsyncConversationExecutionPayload;
259
189
 
260
- export type AsyncInteractionExecutionPayload = z.infer<typeof AsyncInteractionExecutionPayloadSchema>;
190
+ export type AsyncInteractionExecutionPayload = Wire.AsyncInteractionExecutionPayload;
261
191
 
262
192
  /**
263
193
  * @discriminator type
264
194
  */
265
- export type AsyncExecutionPayload = z.infer<typeof AsyncExecutionPayloadSchema>;
195
+ export type AsyncExecutionPayload = Wire.AsyncExecutionPayload;
266
196
 
267
- export type AsyncExecutionResult = z.infer<typeof AsyncExecutionResultSchema>;
197
+ export type AsyncExecutionResult = Wire.AsyncExecutionResult;
268
198
 
269
199
  /**
270
200
  * Telemetry context for streaming mode.
271
201
  * Contains info not available in current_state needed to send LlmCallEvent.
272
202
  */
273
- export type StreamingTelemetryContext = z.infer<typeof StreamingTelemetryContextSchema>;
203
+ export type StreamingTelemetryContext = Wire.StreamingTelemetryContext;
274
204
 
275
205
  /**
276
206
  * Options for storing inference results to cloud storage
277
207
  */
278
- export type ResultStorageOptions = z.infer<typeof ResultStorageOptionsSchema>;
208
+ export type ResultStorageOptions = Wire.ResultStorageOptions;
279
209
 
280
- export type AsyncCompletionMode = z.infer<typeof AsyncCompletionModeSchema>;
210
+ export type AsyncCompletionMode = Wire.AsyncCompletionMode;
281
211
 
282
212
  /**
283
213
  * Streaming-specific options (only needed when stream=true)
284
214
  */
285
- export type StreamingOptions = z.infer<typeof StreamingOptionsSchema>;
215
+ export type StreamingOptions = Wire.StreamingOptions;
286
216
 
287
217
  /**
288
218
  * Options for async completion and/or streaming LLM responses
289
219
  */
290
- export type AsyncCompletionOptions = z.infer<typeof AsyncCompletionOptionsSchema>;
220
+ export type AsyncCompletionOptions = Wire.AsyncCompletionOptions;
291
221
 
292
222
  /**
293
223
  * The kinds of Vertesia resource an agent tool can report having created, updated, or deleted.
294
224
  * Restricted to resources that have a real detail route to navigate to — do not emit a reference
295
225
  * for a mutation with no meaningful navigation target. Add new kinds only once their route exists.
296
226
  */
297
- export type AgentResourceType = z.infer<typeof AgentResourceTypeSchema>;
227
+ export type AgentResourceType = Wire.AgentResourceType;
298
228
 
299
- export type AgentResourceAction = z.infer<typeof AgentResourceActionSchema>;
229
+ export type AgentResourceAction = Wire.AgentResourceAction;
300
230
 
301
231
  /**
302
232
  * A navigable reference to a resource an agent tool mutated. Tools return these as tool-result
@@ -304,13 +234,13 @@ export type AgentResourceAction = z.infer<typeof AgentResourceActionSchema>;
304
234
  * tool's completed lifecycle message so the UI can render deterministic deep links and an
305
235
  * end-of-turn "resources changed" summary — independent of any link the model writes in prose.
306
236
  */
307
- export type AgentResourceReference = z.infer<typeof AgentResourceReferenceSchema>;
237
+ export type AgentResourceReference = Wire.AgentResourceReference;
308
238
 
309
239
  /**
310
240
  * Metadata a tool executor may attach to its result. Kept as an open record for forward
311
241
  * compatibility while typing the fields the runtime interprets.
312
242
  */
313
- export type ToolResultMeta = z.infer<typeof ToolResultMetaSchema>;
243
+ export type ToolResultMeta = Wire.ToolResultMeta;
314
244
 
315
245
  export interface ToolResultContent {
316
246
  content: string;
@@ -376,14 +306,14 @@ export function normalizeAgentResources(value: unknown): AgentResourceReference[
376
306
  return result;
377
307
  }
378
308
 
379
- export type ToolResult = z.infer<typeof ToolResultSchema>;
309
+ export type ToolResult = Wire.ToolResult;
380
310
 
381
311
  /**
382
312
  * The payload to sent the tool responses back to the target LLM
383
313
  */
384
- export type ToolResultsPayload = z.infer<typeof ToolResultsPayloadSchema>;
314
+ export type ToolResultsPayload = Wire.ToolResultsPayload;
385
315
 
386
- export type UserMessagePayload = z.infer<typeof UserMessagePayloadSchema>;
316
+ export type UserMessagePayload = Wire.UserMessagePayload;
387
317
 
388
318
  // ================= end async execution payloads ====================
389
319
 
@@ -397,9 +327,9 @@ export enum RunSourceTypes {
397
327
  schedule = 'schedule',
398
328
  }
399
329
 
400
- export type RunSource = z.infer<typeof RunSourceSchema>;
330
+ export type RunSource = Wire.RunSource;
401
331
 
402
- export type ExecutionRunInteraction = z.infer<typeof ExecutionRunInteractionSchema>;
332
+ export type ExecutionRunInteraction = Wire.ExecutionRunInteraction;
403
333
 
404
334
  export interface BaseExecutionRun<P = unknown> {
405
335
  readonly id: string;
@@ -449,6 +379,7 @@ export interface BaseExecutionRun<P = unknown> {
449
379
  account: AccountRef;
450
380
  project: ProjectRef;
451
381
  config: InteractionExecutionConfiguration;
382
+ inference_profile?: InferenceProfileSnapshot;
452
383
  error?: InteractionExecutionError;
453
384
  source: RunSource;
454
385
 
@@ -477,9 +408,9 @@ export interface PopulatedExecutionRun<P = unknown> extends BaseExecutionRun<P>
477
408
  interaction?: ExecutionRunInteraction;
478
409
  }
479
410
 
480
- export type ExecutionRunWorkflow = z.infer<typeof ExecutionRunWorkflowSchema>;
411
+ export type ExecutionRunWorkflow = Wire.ExecutionRunWorkflow;
481
412
 
482
- export type PromptModalities = z.infer<typeof PromptModalitiesSchema>;
413
+ export type PromptModalities = Wire.PromptModalities;
483
414
 
484
415
  export interface InteractionExecutionResult<P = unknown>
485
416
  extends Omit<ExecutionRun<P>, 'account' | 'project' | 'interaction'> {
@@ -491,31 +422,31 @@ export interface InteractionExecutionResult<P = unknown>
491
422
  options?: StatelessExecutionOptions;
492
423
  }
493
424
 
494
- export type ExecutionRunRef = z.infer<typeof ExecutionRunRefSchema>;
425
+ export type ExecutionRunRef = Wire.ExecutionRunRef;
495
426
 
496
- export type InteractionExecutionConfiguration = z.infer<typeof InteractionExecutionConfigurationSchema>;
427
+ export type InteractionExecutionConfiguration = Wire.InteractionExecutionConfiguration;
497
428
 
498
- export type GenerateInteractionPayload = z.infer<typeof GenerateInteractionPayloadSchema>;
429
+ export type GenerateInteractionPayload = Wire.GenerateInteractionPayload;
499
430
 
500
- export type GenerateTestDataPayload = z.infer<typeof GenerateTestDataPayloadSchema>;
431
+ export type GenerateTestDataPayload = Wire.GenerateTestDataPayload;
501
432
 
502
- export type GeneratedTestDataRecord = z.infer<typeof GeneratedTestDataRecordSchema>;
433
+ export type GeneratedTestDataRecord = Wire.GeneratedTestDataRecord;
503
434
 
504
- export type ImprovePromptPayloadConfig = z.infer<typeof ImprovePromptPayloadConfigSchema>;
435
+ export type ImprovePromptPayloadConfig = Wire.ImprovePromptPayloadConfig;
505
436
 
506
- export type ImprovePromptPayload = z.infer<typeof ImprovePromptPayloadSchema>;
437
+ export type ImprovePromptPayload = Wire.ImprovePromptPayload;
507
438
 
508
- export type GeneratedInteractionPromptTemplate = z.infer<typeof GeneratedInteractionPromptTemplateSchema>;
439
+ export type GeneratedInteractionPromptTemplate = Wire.GeneratedInteractionPromptTemplate;
509
440
 
510
- export type GeneratedInteractionPromptSegment = z.infer<typeof GeneratedInteractionPromptSegmentSchema>;
441
+ export type GeneratedInteractionPromptSegment = Wire.GeneratedInteractionPromptSegment;
511
442
 
512
- export type GeneratedInteractionDefinition = z.infer<typeof GeneratedInteractionDefinitionSchema>;
443
+ export type GeneratedInteractionDefinition = Wire.GeneratedInteractionDefinition;
513
444
 
514
- export type PromptImprovementResponse = z.infer<typeof PromptImprovementResponseSchema>;
445
+ export type PromptImprovementResponse = Wire.PromptImprovementResponse;
515
446
 
516
- export type RateLimitRequestPayload = z.infer<typeof RateLimitRequestPayloadSchema>;
447
+ export type RateLimitRequestPayload = Wire.RateLimitRequestPayload;
517
448
 
518
- export type RateLimitRequestResponse = z.infer<typeof RateLimitRequestResponseSchema>;
449
+ export type RateLimitRequestResponse = Wire.RateLimitRequestResponse;
519
450
 
520
451
  /**
521
452
  * Source of the resolved model configuration
@@ -540,22 +471,22 @@ export enum ModelSource {
540
471
  /**
541
472
  * Resolved environment information
542
473
  */
543
- export type ResolvedEnvironmentInfo = z.infer<typeof ResolvedEnvironmentInfoSchema>;
474
+ export type ResolvedEnvironmentInfo = Wire.ResolvedEnvironmentInfo;
544
475
 
545
476
  /**
546
477
  * Resolved runtime configuration for an interaction
547
478
  */
548
- export type ResolvedRuntimeConfig = z.infer<typeof ResolvedRuntimeConfigSchema>;
479
+ export type ResolvedRuntimeConfig = Wire.ResolvedRuntimeConfig;
549
480
 
550
481
  /**
551
482
  * Resolved execution info for an interaction.
552
483
  * Contains the interaction ID, basic metadata, and the resolved runtime configuration
553
484
  * (environment, model) that would be used at execution time.
554
485
  */
555
- export type ResolvedInteractionExecutionInfo = z.infer<typeof ResolvedInteractionExecutionInfoSchema>;
486
+ export type ResolvedInteractionExecutionInfo = Wire.ResolvedInteractionExecutionInfo;
556
487
 
557
488
  export interface PopulatedInteraction extends Omit<Interaction, 'prompts'> {
558
489
  prompts: PopulatedPromptSegmentDef[];
559
490
  }
560
491
 
561
- export type UpdateExecutionRunPayload = z.infer<typeof UpdateExecutionRunPayloadSchema>;
492
+ export type UpdateExecutionRunPayload = Wire.UpdateExecutionRunPayload;
package/src/meters.ts CHANGED
@@ -1,9 +1,4 @@
1
- import type { z } from 'zod';
2
- import type {
3
- StripeBillingDisabledSchema,
4
- StripeBillingEnabledSchema,
5
- StripeBillingStatusResponseSchema,
6
- } from './api-schemas/account.js';
1
+ import type * as Wire from './wire-types.generated.js';
7
2
 
8
3
  interface MeterAdjustment {
9
4
  meter: string;
@@ -23,8 +18,8 @@ export interface AdjustMetersMeterWorkflowParams {
23
18
  * generated client two unrelated optionals with no way to tell which was populated. Narrowing on
24
19
  * `status` now tells TypeScript which fields exist.
25
20
  */
26
- export type StripeBillingStatusResponse = z.infer<typeof StripeBillingStatusResponseSchema>;
21
+ export type StripeBillingStatusResponse = Wire.StripeBillingStatusResponse;
27
22
 
28
- export type StripeBillingEnabled = z.infer<typeof StripeBillingEnabledSchema>;
23
+ export type StripeBillingEnabled = Wire.StripeBillingEnabled;
29
24
 
30
- export type StripeBillingDisabled = z.infer<typeof StripeBillingDisabledSchema>;
25
+ export type StripeBillingDisabled = Wire.StripeBillingDisabled;
@@ -1,105 +1,64 @@
1
- import type { z } from 'zod';
2
- import type {
3
- ApproveOAuthAuthorizationRequestPayloadSchema,
4
- BulkRevokeOAuthGrantsPayloadSchema,
5
- CreateOAuthAuthorizationRequestPayloadSchema,
6
- CreateOAuthClientPayloadSchema,
7
- ListOAuthGrantsQuerySchema,
8
- OAuthAuthorizationDecisionResponseSchema,
9
- OAuthAuthorizationRequestGeneratedAppSchema,
10
- OAuthAuthorizationRequestSchema,
11
- OAuthAuthorizationRequestStatusSchema,
12
- OAuthAuthorizationServerMetadataSchema,
13
- OAuthAuthorizeQuerySchema,
14
- OAuthClientCreateResponseSchema,
15
- OAuthClientDataSchema,
16
- OAuthClientDisplayMetadataSchema,
17
- OAuthClientRegistrationModeSchema,
18
- OAuthClientSchema,
19
- OAuthClientScopeMetadataSchema,
20
- OAuthClientStatusSchema,
21
- OAuthClientTypeSchema,
22
- OAuthDeviceAuthorizationRequestSchema,
23
- OAuthDeviceAuthorizationResponseSchema,
24
- OAuthGrantableScopesResponseSchema,
25
- OAuthGrantListResponseSchema,
26
- OAuthGrantRevokeResponseSchema,
27
- OAuthGrantSchema,
28
- OAuthGrantSortFieldSchema,
29
- OAuthGrantSortOrderSchema,
30
- OAuthGrantStatusSchema,
31
- OAuthGrantTypeSchema,
32
- OAuthLoginDecisionResponseSchema,
33
- OAuthLoginPayloadSchema,
34
- OAuthLoginUserNotFoundResponseSchema,
35
- OAuthProjectBindingModeSchema,
36
- OAuthRegistrationSourceSchema,
37
- OAuthResponseTypeSchema,
38
- OAuthTokenEndpointAuthMethodSchema,
39
- OAuthTokenResponseSchema,
40
- RevokeOAuthGrantQuerySchema,
41
- UpdateOAuthClientPayloadSchema,
42
- } from './api-schemas/oauth-server.js';
1
+ import type * as Wire from './wire-types.generated.js';
43
2
 
44
3
  /**
45
4
  * These public OAuth wire types are inferred from `./api-schemas/oauth-server.js` — the same
46
5
  * contracts used for runtime parsing and OpenAPI components.
47
6
  */
48
- export type OAuthClientType = z.infer<typeof OAuthClientTypeSchema>;
49
- export type OAuthClientStatus = z.infer<typeof OAuthClientStatusSchema>;
50
- export type OAuthRegistrationSource = z.infer<typeof OAuthRegistrationSourceSchema>;
51
- export type OAuthProjectBindingMode = z.infer<typeof OAuthProjectBindingModeSchema>;
52
- export type OAuthTokenEndpointAuthMethod = z.infer<typeof OAuthTokenEndpointAuthMethodSchema>;
53
- export type OAuthGrantType = z.infer<typeof OAuthGrantTypeSchema>;
54
- export type OAuthResponseType = z.infer<typeof OAuthResponseTypeSchema>;
55
- export type OAuthAuthorizationRequestStatus = z.infer<typeof OAuthAuthorizationRequestStatusSchema>;
56
- export type OAuthClientRegistrationMode = z.infer<typeof OAuthClientRegistrationModeSchema>;
57
- export type OAuthGrantStatus = z.infer<typeof OAuthGrantStatusSchema>;
58
- export type OAuthGrantSortField = z.infer<typeof OAuthGrantSortFieldSchema>;
59
- export type OAuthGrantSortOrder = z.infer<typeof OAuthGrantSortOrderSchema>;
7
+ export type OAuthClientType = Wire.OAuthClientType;
8
+ export type OAuthClientStatus = Wire.OAuthClientStatus;
9
+ export type OAuthRegistrationSource = Wire.OAuthRegistrationSource;
10
+ export type OAuthProjectBindingMode = Wire.OAuthProjectBindingMode;
11
+ export type OAuthTokenEndpointAuthMethod = Wire.OAuthTokenEndpointAuthMethod;
12
+ export type OAuthGrantType = Wire.OAuthGrantType;
13
+ export type OAuthResponseType = Wire.OAuthResponseType;
14
+ export type OAuthAuthorizationRequestStatus = Wire.OAuthAuthorizationRequestStatus;
15
+ export type OAuthClientRegistrationMode = Wire.OAuthClientRegistrationMode;
16
+ export type OAuthGrantStatus = Wire.OAuthGrantStatus;
17
+ export type OAuthGrantSortField = Wire.OAuthGrantSortField;
18
+ export type OAuthGrantSortOrder = Wire.OAuthGrantSortOrder;
60
19
 
61
20
  /** An OAuth client's registration, without the id the server issues for it. */
62
- export type OAuthClientData = z.infer<typeof OAuthClientDataSchema>;
21
+ export type OAuthClientData = Wire.OAuthClientData;
63
22
 
64
- export type OAuthClient = z.infer<typeof OAuthClientSchema>;
23
+ export type OAuthClient = Wire.OAuthClient;
65
24
 
66
25
  /** The read shape plus the client secret, which is returned by the create call and never again. */
67
- export type OAuthClientCreateResponse = z.infer<typeof OAuthClientCreateResponseSchema>;
26
+ export type OAuthClientCreateResponse = Wire.OAuthClientCreateResponse;
68
27
 
69
- export type OAuthClientScopeMetadata = z.infer<typeof OAuthClientScopeMetadataSchema>;
28
+ export type OAuthClientScopeMetadata = Wire.OAuthClientScopeMetadata;
70
29
 
71
- export type OAuthGrant = z.infer<typeof OAuthGrantSchema>;
30
+ export type OAuthGrant = Wire.OAuthGrant;
72
31
 
73
- export type ListOAuthGrantsQuery = z.infer<typeof ListOAuthGrantsQuerySchema>;
32
+ export type ListOAuthGrantsQuery = Wire.ListOAuthGrantsQuery;
74
33
 
75
34
  /** Whether revoking a grant also withdraws the stored consent behind it. */
76
- export type RevokeOAuthGrantQuery = z.infer<typeof RevokeOAuthGrantQuerySchema>;
35
+ export type RevokeOAuthGrantQuery = Wire.RevokeOAuthGrantQuery;
77
36
 
78
- export type OAuthGrantListResponse = z.infer<typeof OAuthGrantListResponseSchema>;
37
+ export type OAuthGrantListResponse = Wire.OAuthGrantListResponse;
79
38
 
80
- export type BulkRevokeOAuthGrantsPayload = z.infer<typeof BulkRevokeOAuthGrantsPayloadSchema>;
39
+ export type BulkRevokeOAuthGrantsPayload = Wire.BulkRevokeOAuthGrantsPayload;
81
40
 
82
- export type OAuthGrantRevokeResponse = z.infer<typeof OAuthGrantRevokeResponseSchema>;
41
+ export type OAuthGrantRevokeResponse = Wire.OAuthGrantRevokeResponse;
83
42
 
84
- export type CreateOAuthClientPayload = z.infer<typeof CreateOAuthClientPayloadSchema>;
43
+ export type CreateOAuthClientPayload = Wire.CreateOAuthClientPayload;
85
44
 
86
- export type UpdateOAuthClientPayload = z.infer<typeof UpdateOAuthClientPayloadSchema>;
45
+ export type UpdateOAuthClientPayload = Wire.UpdateOAuthClientPayload;
87
46
 
88
- export type OAuthAuthorizationServerMetadata = z.infer<typeof OAuthAuthorizationServerMetadataSchema>;
89
- export type OAuthClientDisplayMetadata = z.infer<typeof OAuthClientDisplayMetadataSchema>;
90
- export type OAuthAuthorizeQuery = z.infer<typeof OAuthAuthorizeQuerySchema>;
91
- export type CreateOAuthAuthorizationRequestPayload = z.infer<typeof CreateOAuthAuthorizationRequestPayloadSchema>;
92
- export type OAuthAuthorizationRequest = z.infer<typeof OAuthAuthorizationRequestSchema>;
93
- export type ApproveOAuthAuthorizationRequestPayload = z.infer<typeof ApproveOAuthAuthorizationRequestPayloadSchema>;
94
- export type OAuthGrantableScopesResponse = z.infer<typeof OAuthGrantableScopesResponseSchema>;
95
- export type OAuthAuthorizationDecisionResponse = z.infer<typeof OAuthAuthorizationDecisionResponseSchema>;
96
- export type OAuthDeviceAuthorizationRequest = z.infer<typeof OAuthDeviceAuthorizationRequestSchema>;
97
- export type OAuthDeviceAuthorizationResponse = z.infer<typeof OAuthDeviceAuthorizationResponseSchema>;
98
- export type OAuthTokenResponse = z.infer<typeof OAuthTokenResponseSchema>;
47
+ export type OAuthAuthorizationServerMetadata = Wire.OAuthAuthorizationServerMetadata;
48
+ export type OAuthClientDisplayMetadata = Wire.OAuthClientDisplayMetadata;
49
+ export type OAuthAuthorizeQuery = Wire.OAuthAuthorizeQuery;
50
+ export type CreateOAuthAuthorizationRequestPayload = Wire.CreateOAuthAuthorizationRequestPayload;
51
+ export type OAuthAuthorizationRequest = Wire.OAuthAuthorizationRequest;
52
+ export type ApproveOAuthAuthorizationRequestPayload = Wire.ApproveOAuthAuthorizationRequestPayload;
53
+ export type OAuthGrantableScopesResponse = Wire.OAuthGrantableScopesResponse;
54
+ export type OAuthAuthorizationDecisionResponse = Wire.OAuthAuthorizationDecisionResponse;
55
+ export type OAuthDeviceAuthorizationRequest = Wire.OAuthDeviceAuthorizationRequest;
56
+ export type OAuthDeviceAuthorizationResponse = Wire.OAuthDeviceAuthorizationResponse;
57
+ export type OAuthTokenResponse = Wire.OAuthTokenResponse;
99
58
 
100
- export type OAuthAuthorizationRequestGeneratedApp = z.infer<typeof OAuthAuthorizationRequestGeneratedAppSchema>;
59
+ export type OAuthAuthorizationRequestGeneratedApp = Wire.OAuthAuthorizationRequestGeneratedApp;
101
60
 
102
- export type OAuthLoginPayload = z.infer<typeof OAuthLoginPayloadSchema>;
103
- export type OAuthLoginDecisionResponse = z.infer<typeof OAuthLoginDecisionResponseSchema>;
61
+ export type OAuthLoginPayload = Wire.OAuthLoginPayload;
62
+ export type OAuthLoginDecisionResponse = Wire.OAuthLoginDecisionResponse;
104
63
 
105
- export type OAuthLoginUserNotFoundResponse = z.infer<typeof OAuthLoginUserNotFoundResponseSchema>;
64
+ export type OAuthLoginUserNotFoundResponse = Wire.OAuthLoginUserNotFoundResponse;
package/src/oauth.ts CHANGED
@@ -1,14 +1,4 @@
1
- import type { z } from 'zod';
2
- import type {
3
- CreateOAuthProviderPayloadSchema,
4
- OAuthProviderAccessTokenResponseSchema,
5
- OAuthProviderAuthorizeResponseSchema,
6
- OAuthProviderAuthStatusSchema,
7
- OAuthProviderDataSchema,
8
- OAuthProviderExchangePayloadSchema,
9
- OAuthProviderSchema,
10
- UpdateOAuthProviderPayloadSchema,
11
- } from './api-schemas/oauth.js';
1
+ import type * as Wire from './wire-types.generated.js';
12
2
 
13
3
  /**
14
4
  * OAuth Provider types for generic, project-level OAuth 2.0 integration.
@@ -23,38 +13,38 @@ import type {
23
13
  * OAuth Provider data stored in MongoDB.
24
14
  * Represents the configuration for an OAuth 2.0 provider at the project level.
25
15
  */
26
- export type OAuthProviderData = z.infer<typeof OAuthProviderDataSchema>;
16
+ export type OAuthProviderData = Wire.OAuthProviderData;
27
17
 
28
18
  /**
29
19
  * OAuth Provider as returned by the API (with id).
30
20
  */
31
- export type OAuthProvider = z.infer<typeof OAuthProviderSchema>;
21
+ export type OAuthProvider = Wire.OAuthProvider;
32
22
 
33
23
  /**
34
24
  * Payload for creating an OAuth Provider.
35
25
  * The client_secret is accepted as plaintext on create and stored encrypted.
36
26
  */
37
- export type CreateOAuthProviderPayload = z.infer<typeof CreateOAuthProviderPayloadSchema>;
27
+ export type CreateOAuthProviderPayload = Wire.CreateOAuthProviderPayload;
38
28
 
39
29
  /**
40
30
  * Payload for updating an OAuth Provider.
41
31
  * All fields are optional — only provided fields are updated.
42
32
  * To clear the client_secret, set it to an empty string.
43
33
  */
44
- export type UpdateOAuthProviderPayload = z.infer<typeof UpdateOAuthProviderPayloadSchema>;
34
+ export type UpdateOAuthProviderPayload = Wire.UpdateOAuthProviderPayload;
45
35
 
46
36
  /**
47
37
  * OAuth authentication status for a user against an OAuth Provider.
48
38
  */
49
- export type OAuthProviderAuthStatus = z.infer<typeof OAuthProviderAuthStatusSchema>;
39
+ export type OAuthProviderAuthStatus = Wire.OAuthProviderAuthStatus;
50
40
 
51
41
  /**
52
42
  * Response from the OAuth authorize endpoint.
53
43
  * For authorization_code flow: contains authorization_url and state for browser redirect.
54
44
  * For client_credentials flow: contains connected=true (token was fetched server-side, no redirect needed).
55
45
  */
56
- export type OAuthProviderAuthorizeResponse = z.infer<typeof OAuthProviderAuthorizeResponseSchema>;
46
+ export type OAuthProviderAuthorizeResponse = Wire.OAuthProviderAuthorizeResponse;
57
47
 
58
- export type OAuthProviderAccessTokenResponse = z.infer<typeof OAuthProviderAccessTokenResponseSchema>;
48
+ export type OAuthProviderAccessTokenResponse = Wire.OAuthProviderAccessTokenResponse;
59
49
 
60
- export type OAuthProviderExchangePayload = z.infer<typeof OAuthProviderExchangePayloadSchema>;
50
+ export type OAuthProviderExchangePayload = Wire.OAuthProviderExchangePayload;