mtmsdk 0.0.50 → 0.0.52

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 (341) hide show
  1. package/dist/gomtmapi/@tanstack/react-query.gen.d.ts +1 -13
  2. package/dist/gomtmapi/@tanstack/react-query.gen.d.ts.map +1 -1
  3. package/dist/gomtmapi/@tanstack/react-query.gen.js +1 -37
  4. package/dist/gomtmapi/@tanstack/react-query.gen.js.map +1 -1
  5. package/dist/gomtmapi/index.d.ts +2 -2
  6. package/dist/gomtmapi/index.d.ts.map +1 -1
  7. package/dist/gomtmapi/index.js +1 -1
  8. package/dist/gomtmapi/index.js.map +1 -1
  9. package/dist/gomtmapi/schemas.gen.d.ts +0 -57
  10. package/dist/gomtmapi/schemas.gen.d.ts.map +1 -1
  11. package/dist/gomtmapi/schemas.gen.js +0 -60
  12. package/dist/gomtmapi/schemas.gen.js.map +1 -1
  13. package/dist/gomtmapi/sdk.gen.d.ts +1 -13
  14. package/dist/gomtmapi/sdk.gen.d.ts.map +1 -1
  15. package/dist/gomtmapi/sdk.gen.js +0 -26
  16. package/dist/gomtmapi/sdk.gen.js.map +1 -1
  17. package/dist/gomtmapi/types.gen.d.ts +0 -94
  18. package/dist/gomtmapi/types.gen.d.ts.map +1 -1
  19. package/dist/gomtmapi/zod.gen.d.ts +0 -62
  20. package/dist/gomtmapi/zod.gen.d.ts.map +1 -1
  21. package/dist/gomtmapi/zod.gen.js +0 -51
  22. package/dist/gomtmapi/zod.gen.js.map +1 -1
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +1 -4
  26. package/dist/index.js.map +1 -1
  27. package/dist/lib/schema.d.ts +1 -11
  28. package/dist/lib/schema.d.ts.map +1 -1
  29. package/dist/lib/schema.js +0 -9
  30. package/dist/lib/schema.js.map +1 -1
  31. package/dist/mtgate_api/client.gen.d.ts.map +1 -1
  32. package/dist/mtgate_api/client.gen.js +1 -1
  33. package/dist/mtgate_api/client.gen.js.map +1 -1
  34. package/dist/mtgate_api/index.d.ts +2 -2
  35. package/dist/mtgate_api/index.d.ts.map +1 -1
  36. package/dist/mtgate_api/index.js +1 -1
  37. package/dist/mtgate_api/index.js.map +1 -1
  38. package/dist/mtgate_api/sdk.gen.d.ts +0 -8
  39. package/dist/mtgate_api/sdk.gen.d.ts.map +1 -1
  40. package/dist/mtgate_api/sdk.gen.js +1 -29
  41. package/dist/mtgate_api/sdk.gen.js.map +1 -1
  42. package/dist/mtgate_api/types.gen.d.ts +1 -200
  43. package/dist/mtgate_api/types.gen.d.ts.map +1 -1
  44. package/dist/openclaw/gateway.d.ts.map +1 -1
  45. package/dist/openclaw/gateway.js +1 -1
  46. package/dist/openclaw/gateway.js.map +1 -1
  47. package/dist/sbmng/@tanstack/react-query.gen.d.ts +39 -65
  48. package/dist/sbmng/@tanstack/react-query.gen.d.ts.map +1 -1
  49. package/dist/sbmng/@tanstack/react-query.gen.js +19 -65
  50. package/dist/sbmng/@tanstack/react-query.gen.js.map +1 -1
  51. package/dist/sbmng/index.d.ts +2 -2
  52. package/dist/sbmng/index.d.ts.map +1 -1
  53. package/dist/sbmng/index.js +1 -1
  54. package/dist/sbmng/index.js.map +1 -1
  55. package/dist/sbmng/schemas.gen.d.ts +6 -95
  56. package/dist/sbmng/schemas.gen.d.ts.map +1 -1
  57. package/dist/sbmng/schemas.gen.js +7 -139
  58. package/dist/sbmng/schemas.gen.js.map +1 -1
  59. package/dist/sbmng/sdk.gen.d.ts +7 -17
  60. package/dist/sbmng/sdk.gen.d.ts.map +1 -1
  61. package/dist/sbmng/sdk.gen.js +10 -32
  62. package/dist/sbmng/sdk.gen.js.map +1 -1
  63. package/dist/sbmng/types.gen.d.ts +41 -157
  64. package/dist/sbmng/types.gen.d.ts.map +1 -1
  65. package/dist/supabase/supabase-client.d.ts +85 -181
  66. package/dist/supabase/supabase-client.d.ts.map +1 -1
  67. package/dist/supabase/supabase.d.ts +170 -362
  68. package/dist/supabase/supabase.d.ts.map +1 -1
  69. package/dist/supabase/use-sb-query/build-query-opts.d.ts +6 -2
  70. package/dist/supabase/use-sb-query/build-query-opts.d.ts.map +1 -1
  71. package/dist/supabase/use-sb-query/build-query-opts.js +8 -4
  72. package/dist/supabase/use-sb-query/build-query-opts.js.map +1 -1
  73. package/dist/supabase/use-sb-query/use-query.d.ts +9 -6
  74. package/dist/supabase/use-sb-query/use-query.d.ts.map +1 -1
  75. package/dist/supabase/use-sb-query/use-query.js.map +1 -1
  76. package/dist/supabase/use-sb-query/use-rpc-query.d.ts +25 -17
  77. package/dist/supabase/use-sb-query/use-rpc-query.d.ts.map +1 -1
  78. package/dist/supabase/use-sb-query/use-rpc-query.js +48 -26
  79. package/dist/supabase/use-sb-query/use-rpc-query.js.map +1 -1
  80. package/dist/types/database.schemas.d.ts +129 -222
  81. package/dist/types/database.schemas.d.ts.map +1 -1
  82. package/dist/types/database.schemas.js +112 -124
  83. package/dist/types/database.schemas.js.map +1 -1
  84. package/dist/types/database.types.d.ts +85 -181
  85. package/dist/types/database.types.d.ts.map +1 -1
  86. package/dist/types/database.types.js.map +1 -1
  87. package/dist/types/index.d.ts +30 -59
  88. package/dist/types/index.d.ts.map +1 -1
  89. package/dist/types/index.js +16 -3
  90. package/dist/types/index.js.map +1 -1
  91. package/package.json +105 -110
  92. package/src/cloud-account/platform-configs.ts +73 -73
  93. package/src/gomtmapi/@tanstack/react-query.gen.ts +537 -575
  94. package/src/gomtmapi/client/client.gen.ts +311 -311
  95. package/src/gomtmapi/client/index.ts +25 -25
  96. package/src/gomtmapi/client/types.gen.ts +241 -241
  97. package/src/gomtmapi/client/utils.gen.ts +332 -332
  98. package/src/gomtmapi/client.gen.ts +16 -16
  99. package/src/gomtmapi/core/auth.gen.ts +42 -42
  100. package/src/gomtmapi/core/bodySerializer.gen.ts +100 -100
  101. package/src/gomtmapi/core/params.gen.ts +176 -176
  102. package/src/gomtmapi/core/pathSerializer.gen.ts +181 -181
  103. package/src/gomtmapi/core/queryKeySerializer.gen.ts +136 -136
  104. package/src/gomtmapi/core/serverSentEvents.gen.ts +266 -266
  105. package/src/gomtmapi/core/types.gen.ts +118 -118
  106. package/src/gomtmapi/core/utils.gen.ts +143 -143
  107. package/src/gomtmapi/index.ts +4 -4
  108. package/src/gomtmapi/schemas.gen.ts +532 -596
  109. package/src/gomtmapi/sdk.gen.ts +371 -399
  110. package/src/gomtmapi/types.gen.ts +854 -962
  111. package/src/gomtmapi/zod.gen.ts +448 -507
  112. package/src/index.ts +4 -5
  113. package/src/lib/aisdk/types.ts +7 -7
  114. package/src/lib/logger/index.ts +8 -8
  115. package/src/lib/schema.ts +37 -50
  116. package/src/mtgate_api/client/client.gen.ts +311 -311
  117. package/src/mtgate_api/client/index.ts +25 -25
  118. package/src/mtgate_api/client/types.gen.ts +241 -241
  119. package/src/mtgate_api/client/utils.gen.ts +332 -332
  120. package/src/mtgate_api/client.gen.ts +16 -16
  121. package/src/mtgate_api/core/auth.gen.ts +42 -42
  122. package/src/mtgate_api/core/bodySerializer.gen.ts +100 -100
  123. package/src/mtgate_api/core/params.gen.ts +176 -176
  124. package/src/mtgate_api/core/pathSerializer.gen.ts +181 -181
  125. package/src/mtgate_api/core/queryKeySerializer.gen.ts +136 -136
  126. package/src/mtgate_api/core/serverSentEvents.gen.ts +266 -266
  127. package/src/mtgate_api/core/types.gen.ts +118 -118
  128. package/src/mtgate_api/core/utils.gen.ts +143 -143
  129. package/src/mtgate_api/index.ts +4 -4
  130. package/src/mtgate_api/sdk.gen.ts +17 -54
  131. package/src/mtgate_api/types.gen.ts +5 -239
  132. package/src/openclaw/client-info.ts +54 -54
  133. package/src/openclaw/device-auth-utils.ts +26 -26
  134. package/src/openclaw/device-auth.ts +99 -99
  135. package/src/openclaw/device-identity.ts +108 -108
  136. package/src/openclaw/gateway.ts +392 -392
  137. package/src/openclaw/types.ts +518 -518
  138. package/src/sbmng/@tanstack/react-query.gen.ts +2967 -3017
  139. package/src/sbmng/client/client.gen.ts +311 -311
  140. package/src/sbmng/client/index.ts +25 -25
  141. package/src/sbmng/client/types.gen.ts +241 -241
  142. package/src/sbmng/client/utils.gen.ts +332 -332
  143. package/src/sbmng/client.gen.ts +16 -16
  144. package/src/sbmng/core/auth.gen.ts +42 -42
  145. package/src/sbmng/core/bodySerializer.gen.ts +100 -100
  146. package/src/sbmng/core/params.gen.ts +176 -176
  147. package/src/sbmng/core/pathSerializer.gen.ts +181 -181
  148. package/src/sbmng/core/queryKeySerializer.gen.ts +136 -136
  149. package/src/sbmng/core/serverSentEvents.gen.ts +266 -266
  150. package/src/sbmng/core/types.gen.ts +118 -118
  151. package/src/sbmng/core/utils.gen.ts +143 -143
  152. package/src/sbmng/index.ts +4 -4
  153. package/src/sbmng/schemas.gen.ts +9671 -9805
  154. package/src/sbmng/sdk.gen.ts +1755 -1780
  155. package/src/sbmng/types.gen.ts +7886 -8016
  156. package/src/supabase/auth-provider.tsx +67 -67
  157. package/src/supabase/context.tsx +51 -51
  158. package/src/supabase/cursor-pagination.ts +155 -155
  159. package/src/supabase/schema/browser.ts +44 -44
  160. package/src/supabase/schema/index.ts +25 -25
  161. package/src/supabase/supabase-client.ts +30 -30
  162. package/src/supabase/supabase.ts +67 -67
  163. package/src/supabase/use-sb-query/build-query-opts.ts +68 -56
  164. package/src/supabase/use-sb-query/key.ts +57 -57
  165. package/src/supabase/use-sb-query/use-query.ts +352 -340
  166. package/src/supabase/use-sb-query/use-rpc-mutation.ts +83 -83
  167. package/src/supabase/use-sb-query/use-rpc-query.ts +267 -231
  168. package/src/supabase/utils.ts +75 -75
  169. package/src/types/database.schemas.ts +4359 -4378
  170. package/src/types/database.types.ts +4182 -4288
  171. package/src/types/index.ts +85 -102
  172. package/dist/adk/api/client.d.ts +0 -9
  173. package/dist/adk/api/client.d.ts.map +0 -1
  174. package/dist/adk/api/client.js +0 -39
  175. package/dist/adk/api/client.js.map +0 -1
  176. package/dist/adk/core/constants/tool-icons.d.ts +0 -21
  177. package/dist/adk/core/constants/tool-icons.d.ts.map +0 -1
  178. package/dist/adk/core/constants/tool-icons.js +0 -47
  179. package/dist/adk/core/constants/tool-icons.js.map +0 -1
  180. package/dist/adk/core/models/AgentBuilder.d.ts +0 -77
  181. package/dist/adk/core/models/AgentBuilder.d.ts.map +0 -1
  182. package/dist/adk/core/models/AgentBuilder.js +0 -18
  183. package/dist/adk/core/models/AgentBuilder.js.map +0 -1
  184. package/dist/adk/core/models/AgentRunRequest.d.ts +0 -37
  185. package/dist/adk/core/models/AgentRunRequest.d.ts.map +0 -1
  186. package/dist/adk/core/models/AgentRunRequest.js +0 -18
  187. package/dist/adk/core/models/AgentRunRequest.js.map +0 -1
  188. package/dist/adk/core/models/Eval.d.ts +0 -55
  189. package/dist/adk/core/models/Eval.d.ts.map +0 -1
  190. package/dist/adk/core/models/Eval.js +0 -27
  191. package/dist/adk/core/models/Eval.js.map +0 -1
  192. package/dist/adk/core/models/LiveRequest.d.ts +0 -23
  193. package/dist/adk/core/models/LiveRequest.d.ts.map +0 -1
  194. package/dist/adk/core/models/LiveRequest.js +0 -18
  195. package/dist/adk/core/models/LiveRequest.js.map +0 -1
  196. package/dist/adk/core/models/RuntimeConfig.d.ts +0 -32
  197. package/dist/adk/core/models/RuntimeConfig.d.ts.map +0 -1
  198. package/dist/adk/core/models/RuntimeConfig.js +0 -18
  199. package/dist/adk/core/models/RuntimeConfig.js.map +0 -1
  200. package/dist/adk/core/models/Session.d.ts +0 -117
  201. package/dist/adk/core/models/Session.d.ts.map +0 -1
  202. package/dist/adk/core/models/Session.js +0 -31
  203. package/dist/adk/core/models/Session.js.map +0 -1
  204. package/dist/adk/core/models/Trace.d.ts +0 -40
  205. package/dist/adk/core/models/Trace.d.ts.map +0 -1
  206. package/dist/adk/core/models/Trace.js +0 -2
  207. package/dist/adk/core/models/Trace.js.map +0 -1
  208. package/dist/adk/core/models/types.d.ts +0 -338
  209. package/dist/adk/core/models/types.d.ts.map +0 -1
  210. package/dist/adk/core/models/types.js +0 -189
  211. package/dist/adk/core/models/types.js.map +0 -1
  212. package/dist/lib/utils.d.ts +0 -14
  213. package/dist/lib/utils.d.ts.map +0 -1
  214. package/dist/lib/utils.js +0 -45
  215. package/dist/lib/utils.js.map +0 -1
  216. package/dist/mtgate_api/@tanstack/react-query.gen.d.ts +0 -166
  217. package/dist/mtgate_api/@tanstack/react-query.gen.d.ts.map +0 -1
  218. package/dist/mtgate_api/@tanstack/react-query.gen.js +0 -118
  219. package/dist/mtgate_api/@tanstack/react-query.gen.js.map +0 -1
  220. package/dist/mtgate_api/schemas.gen.d.ts +0 -233
  221. package/dist/mtgate_api/schemas.gen.d.ts.map +0 -1
  222. package/dist/mtgate_api/schemas.gen.js +0 -277
  223. package/dist/mtgate_api/schemas.gen.js.map +0 -1
  224. package/dist/mtgate_api/zod.gen.d.ts +0 -321
  225. package/dist/mtgate_api/zod.gen.d.ts.map +0 -1
  226. package/dist/mtgate_api/zod.gen.js +0 -148
  227. package/dist/mtgate_api/zod.gen.js.map +0 -1
  228. package/dist/mtmai_api/@tanstack/react-query.gen.d.ts +0 -949
  229. package/dist/mtmai_api/@tanstack/react-query.gen.d.ts.map +0 -1
  230. package/dist/mtmai_api/@tanstack/react-query.gen.js +0 -917
  231. package/dist/mtmai_api/@tanstack/react-query.gen.js.map +0 -1
  232. package/dist/mtmai_api/client/client.gen.d.ts +0 -3
  233. package/dist/mtmai_api/client/client.gen.d.ts.map +0 -1
  234. package/dist/mtmai_api/client/client.gen.js +0 -236
  235. package/dist/mtmai_api/client/client.gen.js.map +0 -1
  236. package/dist/mtmai_api/client/index.d.ts +0 -9
  237. package/dist/mtmai_api/client/index.d.ts.map +0 -1
  238. package/dist/mtmai_api/client/index.js +0 -7
  239. package/dist/mtmai_api/client/index.js.map +0 -1
  240. package/dist/mtmai_api/client/types.gen.d.ts +0 -118
  241. package/dist/mtmai_api/client/types.gen.d.ts.map +0 -1
  242. package/dist/mtmai_api/client/types.gen.js +0 -3
  243. package/dist/mtmai_api/client/types.gen.js.map +0 -1
  244. package/dist/mtmai_api/client/utils.gen.d.ts +0 -34
  245. package/dist/mtmai_api/client/utils.gen.d.ts.map +0 -1
  246. package/dist/mtmai_api/client/utils.gen.js +0 -232
  247. package/dist/mtmai_api/client/utils.gen.js.map +0 -1
  248. package/dist/mtmai_api/client.gen.d.ts +0 -13
  249. package/dist/mtmai_api/client.gen.d.ts.map +0 -1
  250. package/dist/mtmai_api/client.gen.js +0 -4
  251. package/dist/mtmai_api/client.gen.js.map +0 -1
  252. package/dist/mtmai_api/core/auth.gen.d.ts +0 -19
  253. package/dist/mtmai_api/core/auth.gen.d.ts.map +0 -1
  254. package/dist/mtmai_api/core/auth.gen.js +0 -15
  255. package/dist/mtmai_api/core/auth.gen.js.map +0 -1
  256. package/dist/mtmai_api/core/bodySerializer.gen.d.ts +0 -26
  257. package/dist/mtmai_api/core/bodySerializer.gen.d.ts.map +0 -1
  258. package/dist/mtmai_api/core/bodySerializer.gen.js +0 -58
  259. package/dist/mtmai_api/core/bodySerializer.gen.js.map +0 -1
  260. package/dist/mtmai_api/core/params.gen.d.ts +0 -44
  261. package/dist/mtmai_api/core/params.gen.d.ts.map +0 -1
  262. package/dist/mtmai_api/core/params.gen.js +0 -101
  263. package/dist/mtmai_api/core/params.gen.js.map +0 -1
  264. package/dist/mtmai_api/core/pathSerializer.gen.d.ts +0 -34
  265. package/dist/mtmai_api/core/pathSerializer.gen.d.ts.map +0 -1
  266. package/dist/mtmai_api/core/pathSerializer.gen.js +0 -115
  267. package/dist/mtmai_api/core/pathSerializer.gen.js.map +0 -1
  268. package/dist/mtmai_api/core/queryKeySerializer.gen.d.ts +0 -19
  269. package/dist/mtmai_api/core/queryKeySerializer.gen.d.ts.map +0 -1
  270. package/dist/mtmai_api/core/queryKeySerializer.gen.js +0 -100
  271. package/dist/mtmai_api/core/queryKeySerializer.gen.js.map +0 -1
  272. package/dist/mtmai_api/core/serverSentEvents.gen.d.ts +0 -72
  273. package/dist/mtmai_api/core/serverSentEvents.gen.d.ts.map +0 -1
  274. package/dist/mtmai_api/core/serverSentEvents.gen.js +0 -138
  275. package/dist/mtmai_api/core/serverSentEvents.gen.js.map +0 -1
  276. package/dist/mtmai_api/core/types.gen.d.ts +0 -79
  277. package/dist/mtmai_api/core/types.gen.d.ts.map +0 -1
  278. package/dist/mtmai_api/core/types.gen.js +0 -3
  279. package/dist/mtmai_api/core/types.gen.js.map +0 -1
  280. package/dist/mtmai_api/core/utils.gen.d.ts +0 -20
  281. package/dist/mtmai_api/core/utils.gen.d.ts.map +0 -1
  282. package/dist/mtmai_api/core/utils.gen.js +0 -88
  283. package/dist/mtmai_api/core/utils.gen.js.map +0 -1
  284. package/dist/mtmai_api/index.d.ts +0 -3
  285. package/dist/mtmai_api/index.d.ts.map +0 -1
  286. package/dist/mtmai_api/index.js +0 -4
  287. package/dist/mtmai_api/index.js.map +0 -1
  288. package/dist/mtmai_api/schemas.gen.d.ts +0 -7721
  289. package/dist/mtmai_api/schemas.gen.d.ts.map +0 -1
  290. package/dist/mtmai_api/schemas.gen.js +0 -9774
  291. package/dist/mtmai_api/schemas.gen.js.map +0 -1
  292. package/dist/mtmai_api/sdk.gen.d.ts +0 -282
  293. package/dist/mtmai_api/sdk.gen.d.ts.map +0 -1
  294. package/dist/mtmai_api/sdk.gen.js +0 -404
  295. package/dist/mtmai_api/sdk.gen.js.map +0 -1
  296. package/dist/mtmai_api/types.gen.d.ts +0 -7152
  297. package/dist/mtmai_api/types.gen.d.ts.map +0 -1
  298. package/dist/mtmai_api/types.gen.js +0 -253
  299. package/dist/mtmai_api/types.gen.js.map +0 -1
  300. package/dist/mtmai_api/zod.gen.d.ts +0 -55827
  301. package/dist/mtmai_api/zod.gen.d.ts.map +0 -1
  302. package/dist/mtmai_api/zod.gen.js +0 -4805
  303. package/dist/mtmai_api/zod.gen.js.map +0 -1
  304. package/dist/supabase/use-sb-query/prefetch.d.ts +0 -10
  305. package/dist/supabase/use-sb-query/prefetch.d.ts.map +0 -1
  306. package/dist/supabase/use-sb-query/prefetch.js +0 -14
  307. package/dist/supabase/use-sb-query/prefetch.js.map +0 -1
  308. package/src/adk/api/client.ts +0 -46
  309. package/src/adk/core/constants/tool-icons.ts +0 -51
  310. package/src/adk/core/models/AgentBuilder.ts +0 -80
  311. package/src/adk/core/models/AgentRunRequest.ts +0 -33
  312. package/src/adk/core/models/Eval.ts +0 -70
  313. package/src/adk/core/models/LiveRequest.ts +0 -23
  314. package/src/adk/core/models/RuntimeConfig.ts +0 -33
  315. package/src/adk/core/models/Session.ts +0 -52
  316. package/src/adk/core/models/Trace.ts +0 -42
  317. package/src/adk/core/models/types.ts +0 -255
  318. package/src/lib/utils.ts +0 -54
  319. package/src/mtgate_api/@tanstack/react-query.gen.ts +0 -142
  320. package/src/mtgate_api/schemas.gen.ts +0 -290
  321. package/src/mtgate_api/zod.gen.ts +0 -176
  322. package/src/mtmai_api/@tanstack/react-query.gen.ts +0 -1010
  323. package/src/mtmai_api/client/client.gen.ts +0 -311
  324. package/src/mtmai_api/client/index.ts +0 -25
  325. package/src/mtmai_api/client/types.gen.ts +0 -241
  326. package/src/mtmai_api/client/utils.gen.ts +0 -332
  327. package/src/mtmai_api/client.gen.ts +0 -16
  328. package/src/mtmai_api/core/auth.gen.ts +0 -42
  329. package/src/mtmai_api/core/bodySerializer.gen.ts +0 -100
  330. package/src/mtmai_api/core/params.gen.ts +0 -176
  331. package/src/mtmai_api/core/pathSerializer.gen.ts +0 -181
  332. package/src/mtmai_api/core/queryKeySerializer.gen.ts +0 -136
  333. package/src/mtmai_api/core/serverSentEvents.gen.ts +0 -266
  334. package/src/mtmai_api/core/types.gen.ts +0 -118
  335. package/src/mtmai_api/core/utils.gen.ts +0 -143
  336. package/src/mtmai_api/index.ts +0 -4
  337. package/src/mtmai_api/schemas.gen.ts +0 -9980
  338. package/src/mtmai_api/sdk.gen.ts +0 -471
  339. package/src/mtmai_api/types.gen.ts +0 -7609
  340. package/src/mtmai_api/zod.gen.ts +0 -5101
  341. package/src/supabase/use-sb-query/prefetch.ts +0 -59
@@ -1,5101 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
-
3
- import { z } from 'zod';
4
-
5
- /**
6
- * APIKeyIn
7
- */
8
- export const zApiKeyIn = z.enum([
9
- 'query',
10
- 'header',
11
- 'cookie'
12
- ]);
13
-
14
- /**
15
- * AddSessionToEvalSetRequest
16
- */
17
- export const zAddSessionToEvalSetRequest = z.object({
18
- evalId: z.string(),
19
- sessionId: z.string(),
20
- userId: z.string()
21
- });
22
-
23
- /**
24
- * ApiKeyConfig
25
- *
26
- * Config for authentication with API key.
27
- */
28
- export const zApiKeyConfig = z.object({
29
- apiKeyString: z.optional(z.union([
30
- z.string(),
31
- z.null()
32
- ]))
33
- });
34
-
35
- /**
36
- * AuthConfigGoogleServiceAccountConfig
37
- *
38
- * Config for Google Service Account Authentication.
39
- */
40
- export const zAuthConfigGoogleServiceAccountConfig = z.object({
41
- serviceAccount: z.optional(z.union([
42
- z.string(),
43
- z.null()
44
- ]))
45
- });
46
-
47
- /**
48
- * AuthConfigHttpBasicAuthConfig
49
- *
50
- * Config for HTTP Basic Authentication.
51
- */
52
- export const zAuthConfigHttpBasicAuthConfig = z.object({
53
- credentialSecret: z.optional(z.union([
54
- z.string(),
55
- z.null()
56
- ]))
57
- });
58
-
59
- /**
60
- * AuthConfigOauthConfig
61
- *
62
- * Config for user oauth.
63
- */
64
- export const zAuthConfigOauthConfig = z.object({
65
- accessToken: z.optional(z.union([
66
- z.string(),
67
- z.null()
68
- ])),
69
- serviceAccount: z.optional(z.union([
70
- z.string(),
71
- z.null()
72
- ]))
73
- });
74
-
75
- /**
76
- * AuthConfigOidcConfig
77
- *
78
- * Config for user OIDC auth.
79
- */
80
- export const zAuthConfigOidcConfig = z.object({
81
- idToken: z.optional(z.union([
82
- z.string(),
83
- z.null()
84
- ])),
85
- serviceAccount: z.optional(z.union([
86
- z.string(),
87
- z.null()
88
- ]))
89
- });
90
-
91
- /**
92
- * AuthCredentialTypes
93
- *
94
- * Represents the type of authentication credential.
95
- */
96
- export const zAuthCredentialTypes = z.enum([
97
- 'apiKey',
98
- 'http',
99
- 'oauth2',
100
- 'openIdConnect',
101
- 'serviceAccount'
102
- ]);
103
-
104
- /**
105
- * AuthType
106
- *
107
- * Type of auth scheme.
108
- */
109
- export const zAuthType = z.enum([
110
- 'AUTH_TYPE_UNSPECIFIED',
111
- 'NO_AUTH',
112
- 'API_KEY_AUTH',
113
- 'HTTP_BASIC_AUTH',
114
- 'GOOGLE_SERVICE_ACCOUNT_AUTH',
115
- 'OAUTH',
116
- 'OIDC_AUTH'
117
- ]);
118
-
119
- /**
120
- * AutomaticFunctionCallingConfig
121
- *
122
- * The configuration for automatic function calling.
123
- */
124
- export const zAutomaticFunctionCallingConfig = z.object({
125
- disable: z.optional(z.union([
126
- z.boolean(),
127
- z.null()
128
- ])),
129
- maximumRemoteCalls: z.optional(z.union([
130
- z.int(),
131
- z.null()
132
- ])).default(10),
133
- ignoreCallHistory: z.optional(z.union([
134
- z.boolean(),
135
- z.null()
136
- ]))
137
- });
138
-
139
- /**
140
- * BaseCriterion
141
- *
142
- * Base creterion to use for an Eval Metric.
143
- */
144
- export const zBaseCriterion = z.object({
145
- threshold: z.number()
146
- });
147
-
148
- /**
149
- * Behavior
150
- *
151
- * Defines the function behavior. Defaults to `BLOCKING`.
152
- */
153
- export const zBehavior = z.enum([
154
- 'UNSPECIFIED',
155
- 'BLOCKING',
156
- 'NON_BLOCKING'
157
- ]);
158
-
159
- /**
160
- * Blob
161
- *
162
- * Content blob.
163
- */
164
- export const zBlob = z.object({
165
- displayName: z.optional(z.union([
166
- z.string(),
167
- z.null()
168
- ])),
169
- data: z.optional(z.union([
170
- z.string(),
171
- z.null()
172
- ])),
173
- mimeType: z.optional(z.union([
174
- z.string(),
175
- z.null()
176
- ]))
177
- });
178
-
179
- /**
180
- * Body_builder_build
181
- */
182
- export const zBodyBuilderBuild = z.object({
183
- files: z.array(z.string())
184
- });
185
-
186
- /**
187
- * CacheMetadata
188
- *
189
- * Metadata for context cache associated with LLM responses.
190
- *
191
- * This class stores cache identification, usage tracking, and lifecycle
192
- * information for a particular cache instance.
193
- *
194
- * Token counts (cached and total) are available in the LlmResponse.usage_metadata
195
- * and should be accessed from there to avoid duplication.
196
- *
197
- * Attributes:
198
- * cache_name: The full resource name of the cached content (e.g.,
199
- * 'projects/123/locations/us-central1/cachedContents/456')
200
- * expire_time: Unix timestamp when the cache expires
201
- * fingerprint: Hash of agent configuration (instruction + tools + model)
202
- * invocations_used: Number of invocations this cache has been used for
203
- * cached_contents_count: Number of contents stored in this cache
204
- * created_at: Unix timestamp when the cache was created
205
- */
206
- export const zCacheMetadata = z.object({
207
- cache_name: z.string(),
208
- expire_time: z.number(),
209
- fingerprint: z.string(),
210
- invocations_used: z.int().gte(0),
211
- cached_contents_count: z.int().gte(0),
212
- created_at: z.optional(z.union([
213
- z.number(),
214
- z.null()
215
- ]))
216
- });
217
-
218
- /**
219
- * ChatConfig
220
- *
221
- * 聊天配置
222
- */
223
- export const zChatConfig = z.object({
224
- provider: z.optional(z.string()).default('openai'),
225
- model_name: z.optional(z.string()).default('gpt-4o-mini'),
226
- api_key: z.optional(z.union([
227
- z.string(),
228
- z.null()
229
- ])),
230
- base_url: z.optional(z.union([
231
- z.string(),
232
- z.null()
233
- ])),
234
- max_turns: z.optional(z.int()).default(10),
235
- system_message: z.optional(z.string()).default('你是一个有用的AI助手,可以回答各种问题并提供帮助。')
236
- });
237
-
238
- /**
239
- * ChatRequest
240
- *
241
- * 聊天请求 - 兼容旧API格式
242
- */
243
- export const zChatRequest = z.object({
244
- message: z.string(),
245
- config: z.optional(z.union([
246
- zChatConfig,
247
- z.null()
248
- ]))
249
- });
250
-
251
- /**
252
- * ChatResponse
253
- *
254
- * 聊天响应 - 兼容旧API格式
255
- */
256
- export const zChatResponse = z.object({
257
- message: z.string(),
258
- success: z.optional(z.boolean()).default(true),
259
- error: z.optional(z.union([
260
- z.string(),
261
- z.null()
262
- ]))
263
- });
264
-
265
- /**
266
- * CheckSandboxStatusRequest
267
- */
268
- export const zCheckSandboxStatusRequest = z.object({
269
- sandboxIds: z.array(z.string())
270
- });
271
-
272
- /**
273
- * DynamicRetrievalConfigMode
274
- *
275
- * Config for the dynamic retrieval config mode.
276
- */
277
- export const zDynamicRetrievalConfigMode = z.enum(['MODE_UNSPECIFIED', 'MODE_DYNAMIC']);
278
-
279
- /**
280
- * DynamicRetrievalConfig
281
- *
282
- * Describes the options to customize dynamic retrieval.
283
- */
284
- export const zDynamicRetrievalConfig = z.object({
285
- mode: z.optional(z.union([
286
- zDynamicRetrievalConfigMode,
287
- z.null()
288
- ])),
289
- dynamicThreshold: z.optional(z.union([
290
- z.number(),
291
- z.null()
292
- ]))
293
- });
294
-
295
- /**
296
- * EnterpriseWebSearch
297
- *
298
- * Tool to search public web data, powered by Vertex AI Search and Sec4 compliance.
299
- */
300
- export const zEnterpriseWebSearch = z.record(z.string(), z.never());
301
-
302
- /**
303
- * EvalStatus
304
- */
305
- export const zEvalStatus = z.union([
306
- z.literal(1),
307
- z.literal(2),
308
- z.literal(3)
309
- ]);
310
-
311
- /**
312
- * FeatureSelectionPreference
313
- *
314
- * Options for feature selection preference.
315
- */
316
- export const zFeatureSelectionPreference = z.enum([
317
- 'FEATURE_SELECTION_PREFERENCE_UNSPECIFIED',
318
- 'PRIORITIZE_QUALITY',
319
- 'BALANCED',
320
- 'PRIORITIZE_COST'
321
- ]);
322
-
323
- /**
324
- * FileData
325
- *
326
- * URI based data.
327
- */
328
- export const zFileData = z.object({
329
- displayName: z.optional(z.union([
330
- z.string(),
331
- z.null()
332
- ])),
333
- fileUri: z.optional(z.union([
334
- z.string(),
335
- z.null()
336
- ])),
337
- mimeType: z.optional(z.union([
338
- z.string(),
339
- z.null()
340
- ]))
341
- });
342
-
343
- /**
344
- * FileSource
345
- *
346
- * Source of the File.
347
- */
348
- export const zFileSource = z.enum([
349
- 'SOURCE_UNSPECIFIED',
350
- 'UPLOADED',
351
- 'GENERATED'
352
- ]);
353
-
354
- /**
355
- * FileState
356
- *
357
- * State for the lifecycle of a File.
358
- */
359
- export const zFileState = z.enum([
360
- 'STATE_UNSPECIFIED',
361
- 'PROCESSING',
362
- 'ACTIVE',
363
- 'FAILED'
364
- ]);
365
-
366
- /**
367
- * FileStatus
368
- *
369
- * Status of a File that uses a common error model.
370
- */
371
- export const zFileStatus = z.object({
372
- details: z.optional(z.union([
373
- z.array(z.record(z.string(), z.unknown())),
374
- z.null()
375
- ])),
376
- message: z.optional(z.union([
377
- z.string(),
378
- z.null()
379
- ])),
380
- code: z.optional(z.union([
381
- z.int(),
382
- z.null()
383
- ]))
384
- });
385
-
386
- /**
387
- * File
388
- *
389
- * A file uploaded to the API.
390
- */
391
- export const zFile = z.object({
392
- name: z.optional(z.union([
393
- z.string(),
394
- z.null()
395
- ])),
396
- displayName: z.optional(z.union([
397
- z.string(),
398
- z.null()
399
- ])),
400
- mimeType: z.optional(z.union([
401
- z.string(),
402
- z.null()
403
- ])),
404
- sizeBytes: z.optional(z.union([
405
- z.int(),
406
- z.null()
407
- ])),
408
- createTime: z.optional(z.union([
409
- z.iso.datetime(),
410
- z.null()
411
- ])),
412
- expirationTime: z.optional(z.union([
413
- z.iso.datetime(),
414
- z.null()
415
- ])),
416
- updateTime: z.optional(z.union([
417
- z.iso.datetime(),
418
- z.null()
419
- ])),
420
- sha256Hash: z.optional(z.union([
421
- z.string(),
422
- z.null()
423
- ])),
424
- uri: z.optional(z.union([
425
- z.string(),
426
- z.null()
427
- ])),
428
- downloadUri: z.optional(z.union([
429
- z.string(),
430
- z.null()
431
- ])),
432
- state: z.optional(z.union([
433
- zFileState,
434
- z.null()
435
- ])),
436
- source: z.optional(z.union([
437
- zFileSource,
438
- z.null()
439
- ])),
440
- videoMetadata: z.optional(z.union([
441
- z.record(z.string(), z.unknown()),
442
- z.null()
443
- ])),
444
- error: z.optional(z.union([
445
- zFileStatus,
446
- z.null()
447
- ]))
448
- });
449
-
450
- /**
451
- * FinishReason
452
- *
453
- * Output only. The reason why the model stopped generating tokens.
454
- *
455
- * If empty, the model has not stopped generating the tokens.
456
- */
457
- export const zFinishReason = z.enum([
458
- 'FINISH_REASON_UNSPECIFIED',
459
- 'STOP',
460
- 'MAX_TOKENS',
461
- 'SAFETY',
462
- 'RECITATION',
463
- 'LANGUAGE',
464
- 'OTHER',
465
- 'BLOCKLIST',
466
- 'PROHIBITED_CONTENT',
467
- 'SPII',
468
- 'MALFORMED_FUNCTION_CALL',
469
- 'IMAGE_SAFETY',
470
- 'UNEXPECTED_TOOL_CALL'
471
- ]);
472
-
473
- /**
474
- * FunctionCall
475
- *
476
- * A function call.
477
- */
478
- export const zFunctionCall = z.object({
479
- id: z.optional(z.union([
480
- z.string(),
481
- z.null()
482
- ])),
483
- args: z.optional(z.union([
484
- z.record(z.string(), z.unknown()),
485
- z.null()
486
- ])),
487
- name: z.optional(z.union([
488
- z.string(),
489
- z.null()
490
- ]))
491
- });
492
-
493
- /**
494
- * FunctionCallingConfigMode
495
- *
496
- * Config for the function calling config mode.
497
- */
498
- export const zFunctionCallingConfigMode = z.enum([
499
- 'MODE_UNSPECIFIED',
500
- 'AUTO',
501
- 'ANY',
502
- 'NONE'
503
- ]);
504
-
505
- /**
506
- * FunctionCallingConfig
507
- *
508
- * Function calling config.
509
- */
510
- export const zFunctionCallingConfig = z.object({
511
- mode: z.optional(z.union([
512
- zFunctionCallingConfigMode,
513
- z.null()
514
- ])),
515
- allowedFunctionNames: z.optional(z.union([
516
- z.array(z.string()),
517
- z.null()
518
- ]))
519
- });
520
-
521
- /**
522
- * FunctionResponseScheduling
523
- *
524
- * Specifies how the response should be scheduled in the conversation.
525
- */
526
- export const zFunctionResponseScheduling = z.enum([
527
- 'SCHEDULING_UNSPECIFIED',
528
- 'SILENT',
529
- 'WHEN_IDLE',
530
- 'INTERRUPT'
531
- ]);
532
-
533
- /**
534
- * FunctionResponse
535
- *
536
- * A function response.
537
- */
538
- export const zFunctionResponse = z.object({
539
- willContinue: z.optional(z.union([
540
- z.boolean(),
541
- z.null()
542
- ])),
543
- scheduling: z.optional(z.union([
544
- zFunctionResponseScheduling,
545
- z.null()
546
- ])),
547
- id: z.optional(z.union([
548
- z.string(),
549
- z.null()
550
- ])),
551
- name: z.optional(z.union([
552
- z.string(),
553
- z.null()
554
- ])),
555
- response: z.optional(z.union([
556
- z.record(z.string(), z.unknown()),
557
- z.null()
558
- ]))
559
- });
560
-
561
- /**
562
- * GenerationConfigRoutingConfigAutoRoutingMode
563
- *
564
- * When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference.
565
- */
566
- export const zGenerationConfigRoutingConfigAutoRoutingMode = z.object({
567
- modelRoutingPreference: z.optional(z.union([
568
- z.enum([
569
- 'UNKNOWN',
570
- 'PRIORITIZE_QUALITY',
571
- 'BALANCED',
572
- 'PRIORITIZE_COST'
573
- ]),
574
- z.null()
575
- ]))
576
- });
577
-
578
- /**
579
- * GenerationConfigRoutingConfigManualRoutingMode
580
- *
581
- * When manual routing is set, the specified model will be used directly.
582
- */
583
- export const zGenerationConfigRoutingConfigManualRoutingMode = z.object({
584
- modelName: z.optional(z.union([
585
- z.string(),
586
- z.null()
587
- ]))
588
- });
589
-
590
- /**
591
- * GenerationConfigRoutingConfig
592
- *
593
- * The configuration for routing the request to a specific model.
594
- */
595
- export const zGenerationConfigRoutingConfig = z.object({
596
- autoMode: z.optional(z.union([
597
- zGenerationConfigRoutingConfigAutoRoutingMode,
598
- z.null()
599
- ])),
600
- manualMode: z.optional(z.union([
601
- zGenerationConfigRoutingConfigManualRoutingMode,
602
- z.null()
603
- ]))
604
- });
605
-
606
- /**
607
- * GoogleSearchRetrieval
608
- *
609
- * Tool to retrieve public web data for grounding, powered by Google.
610
- */
611
- export const zGoogleSearchRetrievalInput = z.object({
612
- dynamicRetrievalConfig: z.optional(z.union([
613
- zDynamicRetrievalConfig,
614
- z.null()
615
- ]))
616
- });
617
-
618
- /**
619
- * GoogleSearchRetrieval
620
- *
621
- * Tool to retrieve public web data for grounding, powered by Google.
622
- */
623
- export const zGoogleSearchRetrievalOutput = z.object({
624
- dynamicRetrievalConfig: z.optional(z.union([
625
- zDynamicRetrievalConfig,
626
- z.null()
627
- ]))
628
- });
629
-
630
- /**
631
- * GroundingChunkWeb
632
- *
633
- * Chunk from the web.
634
- */
635
- export const zGroundingChunkWeb = z.object({
636
- domain: z.optional(z.union([
637
- z.string(),
638
- z.null()
639
- ])),
640
- title: z.optional(z.union([
641
- z.string(),
642
- z.null()
643
- ])),
644
- uri: z.optional(z.union([
645
- z.string(),
646
- z.null()
647
- ]))
648
- });
649
-
650
- /**
651
- * HarmBlockMethod
652
- *
653
- * Optional.
654
- *
655
- * Specify if the threshold is used for probability or severity score. If not
656
- * specified, the threshold is used for probability score.
657
- */
658
- export const zHarmBlockMethod = z.enum([
659
- 'HARM_BLOCK_METHOD_UNSPECIFIED',
660
- 'SEVERITY',
661
- 'PROBABILITY'
662
- ]);
663
-
664
- /**
665
- * HarmBlockThreshold
666
- *
667
- * Required. The harm block threshold.
668
- */
669
- export const zHarmBlockThreshold = z.enum([
670
- 'HARM_BLOCK_THRESHOLD_UNSPECIFIED',
671
- 'BLOCK_LOW_AND_ABOVE',
672
- 'BLOCK_MEDIUM_AND_ABOVE',
673
- 'BLOCK_ONLY_HIGH',
674
- 'BLOCK_NONE',
675
- 'OFF'
676
- ]);
677
-
678
- /**
679
- * HarmCategory
680
- *
681
- * Required. Harm category.
682
- */
683
- export const zHarmCategory = z.enum([
684
- 'HARM_CATEGORY_UNSPECIFIED',
685
- 'HARM_CATEGORY_HATE_SPEECH',
686
- 'HARM_CATEGORY_DANGEROUS_CONTENT',
687
- 'HARM_CATEGORY_HARASSMENT',
688
- 'HARM_CATEGORY_SEXUALLY_EXPLICIT',
689
- 'HARM_CATEGORY_CIVIC_INTEGRITY'
690
- ]);
691
-
692
- /**
693
- * HttpCredentials
694
- *
695
- * Represents the secret token value for HTTP authentication, like user name, password, oauth token, etc.
696
- */
697
- export const zHttpCredentials = z.object({
698
- username: z.optional(z.union([
699
- z.string(),
700
- z.null()
701
- ])),
702
- password: z.optional(z.union([
703
- z.string(),
704
- z.null()
705
- ])),
706
- token: z.optional(z.union([
707
- z.string(),
708
- z.null()
709
- ]))
710
- });
711
-
712
- /**
713
- * HttpAuth
714
- *
715
- * The credentials and metadata for HTTP authentication.
716
- */
717
- export const zHttpAuth = z.object({
718
- scheme: z.string(),
719
- credentials: zHttpCredentials
720
- });
721
-
722
- /**
723
- * HttpRetryOptions
724
- *
725
- * HTTP retry options to be used in each of the requests.
726
- */
727
- export const zHttpRetryOptions = z.object({
728
- attempts: z.optional(z.union([
729
- z.int(),
730
- z.null()
731
- ])),
732
- initialDelay: z.optional(z.union([
733
- z.number(),
734
- z.null()
735
- ])),
736
- maxDelay: z.optional(z.union([
737
- z.number(),
738
- z.null()
739
- ])),
740
- expBase: z.optional(z.union([
741
- z.number(),
742
- z.null()
743
- ])),
744
- jitter: z.optional(z.union([
745
- z.number(),
746
- z.null()
747
- ])),
748
- httpStatusCodes: z.optional(z.union([
749
- z.array(z.int()),
750
- z.null()
751
- ]))
752
- });
753
-
754
- /**
755
- * HttpOptions
756
- *
757
- * HTTP options to be used in each of the requests.
758
- */
759
- export const zHttpOptions = z.object({
760
- baseUrl: z.optional(z.union([
761
- z.string(),
762
- z.null()
763
- ])),
764
- apiVersion: z.optional(z.union([
765
- z.string(),
766
- z.null()
767
- ])),
768
- headers: z.optional(z.union([
769
- z.record(z.string(), z.string()),
770
- z.null()
771
- ])),
772
- timeout: z.optional(z.union([
773
- z.int(),
774
- z.null()
775
- ])),
776
- clientArgs: z.optional(z.union([
777
- z.record(z.string(), z.unknown()),
778
- z.null()
779
- ])),
780
- asyncClientArgs: z.optional(z.union([
781
- z.record(z.string(), z.unknown()),
782
- z.null()
783
- ])),
784
- extraBody: z.optional(z.union([
785
- z.record(z.string(), z.unknown()),
786
- z.null()
787
- ])),
788
- retryOptions: z.optional(z.union([
789
- zHttpRetryOptions,
790
- z.null()
791
- ]))
792
- });
793
-
794
- /**
795
- * Interval
796
- *
797
- * Represents a time interval, encoded as a start time (inclusive) and an end time (exclusive).
798
- *
799
- * The start time must be less than or equal to the end time.
800
- * When the start equals the end time, the interval is an empty interval.
801
- * (matches no time)
802
- * When both start and end are unspecified, the interval matches any time.
803
- */
804
- export const zIntervalInput = z.object({
805
- startTime: z.optional(z.union([
806
- z.iso.datetime(),
807
- z.null()
808
- ])),
809
- endTime: z.optional(z.union([
810
- z.iso.datetime(),
811
- z.null()
812
- ]))
813
- });
814
-
815
- /**
816
- * GoogleSearch
817
- *
818
- * Tool to support Google Search in Model. Powered by Google.
819
- */
820
- export const zGoogleSearchInput = z.object({
821
- timeRangeFilter: z.optional(z.union([
822
- zIntervalInput,
823
- z.null()
824
- ]))
825
- });
826
-
827
- /**
828
- * Item
829
- */
830
- export const zItem = z.object({
831
- id: z.int(),
832
- name: z.string(),
833
- description: z.optional(z.union([
834
- z.string(),
835
- z.null()
836
- ])),
837
- price: z.number(),
838
- tags: z.optional(z.array(z.string())).default([])
839
- });
840
-
841
- /**
842
- * Language
843
- *
844
- * Required. Programming language of the `code`.
845
- */
846
- export const zLanguage = z.enum(['LANGUAGE_UNSPECIFIED', 'PYTHON']);
847
-
848
- /**
849
- * ExecutableCode
850
- *
851
- * Code generated by the model that is meant to be executed, and the result returned to the model.
852
- *
853
- * Generated when using the [FunctionDeclaration] tool and
854
- * [FunctionCallingConfig] mode is set to [Mode.CODE].
855
- */
856
- export const zExecutableCode = z.object({
857
- code: z.optional(z.union([
858
- z.string(),
859
- z.null()
860
- ])),
861
- language: z.optional(z.union([
862
- zLanguage,
863
- z.null()
864
- ]))
865
- });
866
-
867
- /**
868
- * LatLng
869
- *
870
- * An object that represents a latitude/longitude pair.
871
- *
872
- * This is expressed as a pair of doubles to represent degrees latitude and
873
- * degrees longitude. Unless specified otherwise, this object must conform to the
874
- * <a href="https://en.wikipedia.org/wiki/World_Geodetic_System#1984_version">
875
- * WGS84 standard</a>. Values must be within normalized ranges.
876
- */
877
- export const zLatLng = z.object({
878
- latitude: z.optional(z.union([
879
- z.number(),
880
- z.null()
881
- ])),
882
- longitude: z.optional(z.union([
883
- z.number(),
884
- z.null()
885
- ]))
886
- });
887
-
888
- /**
889
- * ListEvalResultsResponse
890
- */
891
- export const zListEvalResultsResponse = z.object({
892
- evalResultIds: z.array(z.string())
893
- });
894
-
895
- /**
896
- * ListEvalSetsResponse
897
- */
898
- export const zListEvalSetsResponse = z.object({
899
- evalSetIds: z.array(z.string())
900
- });
901
-
902
- /**
903
- * LiveServerSessionResumptionUpdate
904
- *
905
- * Update of the session resumption state.
906
- *
907
- * Only sent if `session_resumption` was set in the connection config.
908
- */
909
- export const zLiveServerSessionResumptionUpdate = z.object({
910
- newHandle: z.optional(z.union([
911
- z.string(),
912
- z.null()
913
- ])),
914
- resumable: z.optional(z.union([
915
- z.boolean(),
916
- z.null()
917
- ])),
918
- lastConsumedClientMessageIndex: z.optional(z.union([
919
- z.int(),
920
- z.null()
921
- ]))
922
- });
923
-
924
- /**
925
- * LogprobsResultCandidate
926
- *
927
- * Candidate for the logprobs token and score.
928
- */
929
- export const zLogprobsResultCandidate = z.object({
930
- logProbability: z.optional(z.union([
931
- z.number(),
932
- z.null()
933
- ])),
934
- token: z.optional(z.union([
935
- z.string(),
936
- z.null()
937
- ])),
938
- tokenId: z.optional(z.union([
939
- z.int(),
940
- z.null()
941
- ]))
942
- });
943
-
944
- /**
945
- * LogprobsResultTopCandidates
946
- *
947
- * Candidates with top log probabilities at each decoding step.
948
- */
949
- export const zLogprobsResultTopCandidates = z.object({
950
- candidates: z.optional(z.union([
951
- z.array(zLogprobsResultCandidate),
952
- z.null()
953
- ]))
954
- });
955
-
956
- /**
957
- * LogprobsResult
958
- *
959
- * Logprobs Result
960
- */
961
- export const zLogprobsResultInput = z.object({
962
- chosenCandidates: z.optional(z.union([
963
- z.array(zLogprobsResultCandidate),
964
- z.null()
965
- ])),
966
- topCandidates: z.optional(z.union([
967
- z.array(zLogprobsResultTopCandidates),
968
- z.null()
969
- ]))
970
- });
971
-
972
- /**
973
- * LogprobsResult
974
- *
975
- * Logprobs Result
976
- */
977
- export const zLogprobsResultOutput = z.object({
978
- chosenCandidates: z.optional(z.union([
979
- z.array(zLogprobsResultCandidate),
980
- z.null()
981
- ])),
982
- topCandidates: z.optional(z.union([
983
- z.array(zLogprobsResultTopCandidates),
984
- z.null()
985
- ]))
986
- });
987
-
988
- /**
989
- * MediaModality
990
- *
991
- * Server content modalities.
992
- */
993
- export const zMediaModality = z.enum([
994
- 'MODALITY_UNSPECIFIED',
995
- 'TEXT',
996
- 'IMAGE',
997
- 'VIDEO',
998
- 'AUDIO',
999
- 'DOCUMENT'
1000
- ]);
1001
-
1002
- /**
1003
- * MediaResolution
1004
- *
1005
- * The media resolution to use.
1006
- */
1007
- export const zMediaResolution = z.enum([
1008
- 'MEDIA_RESOLUTION_UNSPECIFIED',
1009
- 'MEDIA_RESOLUTION_LOW',
1010
- 'MEDIA_RESOLUTION_MEDIUM',
1011
- 'MEDIA_RESOLUTION_HIGH'
1012
- ]);
1013
-
1014
- /**
1015
- * ModalityTokenCount
1016
- *
1017
- * Represents token counting info for a single modality.
1018
- */
1019
- export const zModalityTokenCount = z.object({
1020
- modality: z.optional(z.union([
1021
- zMediaModality,
1022
- z.null()
1023
- ])),
1024
- tokenCount: z.optional(z.union([
1025
- z.int(),
1026
- z.null()
1027
- ]))
1028
- });
1029
-
1030
- /**
1031
- * ModelSelectionConfig
1032
- *
1033
- * Config for model selection.
1034
- */
1035
- export const zModelSelectionConfig = z.object({
1036
- featureSelectionPreference: z.optional(z.union([
1037
- zFeatureSelectionPreference,
1038
- z.null()
1039
- ]))
1040
- });
1041
-
1042
- /**
1043
- * OAuth2Auth
1044
- *
1045
- * Represents credential value and its metadata for a OAuth2 credential.
1046
- */
1047
- export const zOAuth2Auth = z.object({
1048
- clientId: z.optional(z.union([
1049
- z.string(),
1050
- z.null()
1051
- ])),
1052
- clientSecret: z.optional(z.union([
1053
- z.string(),
1054
- z.null()
1055
- ])),
1056
- authUri: z.optional(z.union([
1057
- z.string(),
1058
- z.null()
1059
- ])),
1060
- state: z.optional(z.union([
1061
- z.string(),
1062
- z.null()
1063
- ])),
1064
- redirectUri: z.optional(z.union([
1065
- z.string(),
1066
- z.null()
1067
- ])),
1068
- authResponseUri: z.optional(z.union([
1069
- z.string(),
1070
- z.null()
1071
- ])),
1072
- authCode: z.optional(z.union([
1073
- z.string(),
1074
- z.null()
1075
- ])),
1076
- accessToken: z.optional(z.union([
1077
- z.string(),
1078
- z.null()
1079
- ])),
1080
- refreshToken: z.optional(z.union([
1081
- z.string(),
1082
- z.null()
1083
- ])),
1084
- expiresAt: z.optional(z.union([
1085
- z.int(),
1086
- z.null()
1087
- ])),
1088
- expiresIn: z.optional(z.union([
1089
- z.int(),
1090
- z.null()
1091
- ])),
1092
- audience: z.optional(z.union([
1093
- z.string(),
1094
- z.null()
1095
- ]))
1096
- });
1097
-
1098
- /**
1099
- * OAuthFlowAuthorizationCode
1100
- */
1101
- export const zOAuthFlowAuthorizationCode = z.object({
1102
- refreshUrl: z.optional(z.union([
1103
- z.string(),
1104
- z.null()
1105
- ])),
1106
- scopes: z.optional(z.record(z.string(), z.string())).default({}),
1107
- authorizationUrl: z.string(),
1108
- tokenUrl: z.string()
1109
- });
1110
-
1111
- /**
1112
- * OAuthFlowClientCredentials
1113
- */
1114
- export const zOAuthFlowClientCredentials = z.object({
1115
- refreshUrl: z.optional(z.union([
1116
- z.string(),
1117
- z.null()
1118
- ])),
1119
- scopes: z.optional(z.record(z.string(), z.string())).default({}),
1120
- tokenUrl: z.string()
1121
- });
1122
-
1123
- /**
1124
- * OAuthFlowImplicit
1125
- */
1126
- export const zOAuthFlowImplicit = z.object({
1127
- refreshUrl: z.optional(z.union([
1128
- z.string(),
1129
- z.null()
1130
- ])),
1131
- scopes: z.optional(z.record(z.string(), z.string())).default({}),
1132
- authorizationUrl: z.string()
1133
- });
1134
-
1135
- /**
1136
- * OAuthFlowPassword
1137
- */
1138
- export const zOAuthFlowPassword = z.object({
1139
- refreshUrl: z.optional(z.union([
1140
- z.string(),
1141
- z.null()
1142
- ])),
1143
- scopes: z.optional(z.record(z.string(), z.string())).default({}),
1144
- tokenUrl: z.string()
1145
- });
1146
-
1147
- /**
1148
- * OAuthFlows
1149
- */
1150
- export const zOAuthFlows = z.object({
1151
- implicit: z.optional(z.union([
1152
- zOAuthFlowImplicit,
1153
- z.null()
1154
- ])),
1155
- password: z.optional(z.union([
1156
- zOAuthFlowPassword,
1157
- z.null()
1158
- ])),
1159
- clientCredentials: z.optional(z.union([
1160
- zOAuthFlowClientCredentials,
1161
- z.null()
1162
- ])),
1163
- authorizationCode: z.optional(z.union([
1164
- zOAuthFlowAuthorizationCode,
1165
- z.null()
1166
- ]))
1167
- });
1168
-
1169
- /**
1170
- * Outcome
1171
- *
1172
- * Required. Outcome of the code execution.
1173
- */
1174
- export const zOutcome = z.enum([
1175
- 'OUTCOME_UNSPECIFIED',
1176
- 'OUTCOME_OK',
1177
- 'OUTCOME_FAILED',
1178
- 'OUTCOME_DEADLINE_EXCEEDED'
1179
- ]);
1180
-
1181
- /**
1182
- * CodeExecutionResult
1183
- *
1184
- * Result of executing the [ExecutableCode].
1185
- *
1186
- * Always follows a `part` containing the [ExecutableCode].
1187
- */
1188
- export const zCodeExecutionResult = z.object({
1189
- outcome: z.optional(z.union([
1190
- zOutcome,
1191
- z.null()
1192
- ])),
1193
- output: z.optional(z.union([
1194
- z.string(),
1195
- z.null()
1196
- ]))
1197
- });
1198
-
1199
- /**
1200
- * PrebuiltVoiceConfig
1201
- *
1202
- * The configuration for the prebuilt speaker to use.
1203
- */
1204
- export const zPrebuiltVoiceConfig = z.object({
1205
- voiceName: z.optional(z.union([
1206
- z.string(),
1207
- z.null()
1208
- ]))
1209
- });
1210
-
1211
- /**
1212
- * RagChunkPageSpan
1213
- *
1214
- * Represents where the chunk starts and ends in the document.
1215
- */
1216
- export const zRagChunkPageSpan = z.object({
1217
- firstPage: z.optional(z.union([
1218
- z.int(),
1219
- z.null()
1220
- ])),
1221
- lastPage: z.optional(z.union([
1222
- z.int(),
1223
- z.null()
1224
- ]))
1225
- });
1226
-
1227
- /**
1228
- * RagChunk
1229
- *
1230
- * A RagChunk includes the content of a chunk of a RagFile, and associated metadata.
1231
- */
1232
- export const zRagChunk = z.object({
1233
- pageSpan: z.optional(z.union([
1234
- zRagChunkPageSpan,
1235
- z.null()
1236
- ])),
1237
- text: z.optional(z.union([
1238
- z.string(),
1239
- z.null()
1240
- ]))
1241
- });
1242
-
1243
- /**
1244
- * GroundingChunkRetrievedContext
1245
- *
1246
- * Chunk from context retrieved by the retrieval tools.
1247
- */
1248
- export const zGroundingChunkRetrievedContextInput = z.object({
1249
- ragChunk: z.optional(z.union([
1250
- zRagChunk,
1251
- z.null()
1252
- ])),
1253
- text: z.optional(z.union([
1254
- z.string(),
1255
- z.null()
1256
- ])),
1257
- title: z.optional(z.union([
1258
- z.string(),
1259
- z.null()
1260
- ])),
1261
- uri: z.optional(z.union([
1262
- z.string(),
1263
- z.null()
1264
- ]))
1265
- });
1266
-
1267
- /**
1268
- * GroundingChunk
1269
- *
1270
- * Grounding chunk.
1271
- */
1272
- export const zGroundingChunkInput = z.object({
1273
- retrievedContext: z.optional(z.union([
1274
- zGroundingChunkRetrievedContextInput,
1275
- z.null()
1276
- ])),
1277
- web: z.optional(z.union([
1278
- zGroundingChunkWeb,
1279
- z.null()
1280
- ]))
1281
- });
1282
-
1283
- /**
1284
- * GroundingChunkRetrievedContext
1285
- *
1286
- * Chunk from context retrieved by the retrieval tools.
1287
- */
1288
- export const zGroundingChunkRetrievedContextOutput = z.object({
1289
- ragChunk: z.optional(z.union([
1290
- zRagChunk,
1291
- z.null()
1292
- ])),
1293
- text: z.optional(z.union([
1294
- z.string(),
1295
- z.null()
1296
- ])),
1297
- title: z.optional(z.union([
1298
- z.string(),
1299
- z.null()
1300
- ])),
1301
- uri: z.optional(z.union([
1302
- z.string(),
1303
- z.null()
1304
- ]))
1305
- });
1306
-
1307
- /**
1308
- * GroundingChunk
1309
- *
1310
- * Grounding chunk.
1311
- */
1312
- export const zGroundingChunkOutput = z.object({
1313
- retrievedContext: z.optional(z.union([
1314
- zGroundingChunkRetrievedContextOutput,
1315
- z.null()
1316
- ])),
1317
- web: z.optional(z.union([
1318
- zGroundingChunkWeb,
1319
- z.null()
1320
- ]))
1321
- });
1322
-
1323
- /**
1324
- * RagRetrievalConfigFilter
1325
- *
1326
- * Config for filters.
1327
- */
1328
- export const zRagRetrievalConfigFilter = z.object({
1329
- metadataFilter: z.optional(z.union([
1330
- z.string(),
1331
- z.null()
1332
- ])),
1333
- vectorDistanceThreshold: z.optional(z.union([
1334
- z.number(),
1335
- z.null()
1336
- ])),
1337
- vectorSimilarityThreshold: z.optional(z.union([
1338
- z.number(),
1339
- z.null()
1340
- ]))
1341
- });
1342
-
1343
- /**
1344
- * RagRetrievalConfigHybridSearch
1345
- *
1346
- * Config for Hybrid Search.
1347
- */
1348
- export const zRagRetrievalConfigHybridSearch = z.object({
1349
- alpha: z.optional(z.union([
1350
- z.number(),
1351
- z.null()
1352
- ]))
1353
- });
1354
-
1355
- /**
1356
- * RagRetrievalConfigRankingLlmRanker
1357
- *
1358
- * Config for LlmRanker.
1359
- */
1360
- export const zRagRetrievalConfigRankingLlmRanker = z.object({
1361
- modelName: z.optional(z.union([
1362
- z.string(),
1363
- z.null()
1364
- ]))
1365
- });
1366
-
1367
- /**
1368
- * RagRetrievalConfigRankingRankService
1369
- *
1370
- * Config for Rank Service.
1371
- */
1372
- export const zRagRetrievalConfigRankingRankService = z.object({
1373
- modelName: z.optional(z.union([
1374
- z.string(),
1375
- z.null()
1376
- ]))
1377
- });
1378
-
1379
- /**
1380
- * RagRetrievalConfigRanking
1381
- *
1382
- * Config for ranking and reranking.
1383
- */
1384
- export const zRagRetrievalConfigRanking = z.object({
1385
- llmRanker: z.optional(z.union([
1386
- zRagRetrievalConfigRankingLlmRanker,
1387
- z.null()
1388
- ])),
1389
- rankService: z.optional(z.union([
1390
- zRagRetrievalConfigRankingRankService,
1391
- z.null()
1392
- ]))
1393
- });
1394
-
1395
- /**
1396
- * RagRetrievalConfig
1397
- *
1398
- * Specifies the context retrieval config.
1399
- */
1400
- export const zRagRetrievalConfigInput = z.object({
1401
- filter: z.optional(z.union([
1402
- zRagRetrievalConfigFilter,
1403
- z.null()
1404
- ])),
1405
- hybridSearch: z.optional(z.union([
1406
- zRagRetrievalConfigHybridSearch,
1407
- z.null()
1408
- ])),
1409
- ranking: z.optional(z.union([
1410
- zRagRetrievalConfigRanking,
1411
- z.null()
1412
- ])),
1413
- topK: z.optional(z.union([
1414
- z.int(),
1415
- z.null()
1416
- ]))
1417
- });
1418
-
1419
- /**
1420
- * RagRetrievalConfig
1421
- *
1422
- * Specifies the context retrieval config.
1423
- */
1424
- export const zRagRetrievalConfigOutput = z.object({
1425
- filter: z.optional(z.union([
1426
- zRagRetrievalConfigFilter,
1427
- z.null()
1428
- ])),
1429
- hybridSearch: z.optional(z.union([
1430
- zRagRetrievalConfigHybridSearch,
1431
- z.null()
1432
- ])),
1433
- ranking: z.optional(z.union([
1434
- zRagRetrievalConfigRanking,
1435
- z.null()
1436
- ])),
1437
- topK: z.optional(z.union([
1438
- z.int(),
1439
- z.null()
1440
- ]))
1441
- });
1442
-
1443
- /**
1444
- * RetrievalConfig
1445
- *
1446
- * Retrieval config.
1447
- */
1448
- export const zRetrievalConfig = z.object({
1449
- latLng: z.optional(z.union([
1450
- zLatLng,
1451
- z.null()
1452
- ])),
1453
- languageCode: z.optional(z.union([
1454
- z.string(),
1455
- z.null()
1456
- ]))
1457
- });
1458
-
1459
- /**
1460
- * RetrievalMetadata
1461
- *
1462
- * Metadata related to retrieval in the grounding flow.
1463
- */
1464
- export const zRetrievalMetadata = z.object({
1465
- googleSearchDynamicRetrievalScore: z.optional(z.union([
1466
- z.number(),
1467
- z.null()
1468
- ]))
1469
- });
1470
-
1471
- /**
1472
- * RubricContent
1473
- *
1474
- * The content of a rubric.
1475
- */
1476
- export const zRubricContent = z.object({
1477
- textProperty: z.union([
1478
- z.string(),
1479
- z.null()
1480
- ])
1481
- });
1482
-
1483
- /**
1484
- * Rubric
1485
- *
1486
- * This class represents a single Rubric.
1487
- */
1488
- export const zRubric = z.object({
1489
- rubricId: z.string(),
1490
- rubricContent: zRubricContent,
1491
- description: z.optional(z.union([
1492
- z.string(),
1493
- z.null()
1494
- ])),
1495
- type: z.optional(z.union([
1496
- z.string(),
1497
- z.null()
1498
- ]))
1499
- });
1500
-
1501
- /**
1502
- * RubricScore
1503
- *
1504
- * The score obtained after applying the rubric to the Agent's response.
1505
- */
1506
- export const zRubricScore = z.object({
1507
- rubricId: z.string(),
1508
- rationale: z.optional(z.union([
1509
- z.string(),
1510
- z.null()
1511
- ])),
1512
- score: z.optional(z.union([
1513
- z.number(),
1514
- z.null()
1515
- ]))
1516
- });
1517
-
1518
- /**
1519
- * EvalMetricResultDetails
1520
- */
1521
- export const zEvalMetricResultDetails = z.object({
1522
- rubricScores: z.optional(z.union([
1523
- z.array(zRubricScore),
1524
- z.null()
1525
- ]))
1526
- });
1527
-
1528
- /**
1529
- * SafetySetting
1530
- *
1531
- * Safety settings.
1532
- */
1533
- export const zSafetySetting = z.object({
1534
- method: z.optional(z.union([
1535
- zHarmBlockMethod,
1536
- z.null()
1537
- ])),
1538
- category: z.optional(z.union([
1539
- zHarmCategory,
1540
- z.null()
1541
- ])),
1542
- threshold: z.optional(z.union([
1543
- zHarmBlockThreshold,
1544
- z.null()
1545
- ]))
1546
- });
1547
-
1548
- /**
1549
- * SandboxStatusInfo
1550
- *
1551
- * 沙盒状态信息
1552
- */
1553
- export const zSandboxStatusInfo = z.object({
1554
- sandboxId: z.string(),
1555
- status: z.string(),
1556
- error: z.optional(z.union([
1557
- z.string(),
1558
- z.null()
1559
- ]))
1560
- });
1561
-
1562
- /**
1563
- * CheckSandboxStatusResponse
1564
- */
1565
- export const zCheckSandboxStatusResponse = z.object({
1566
- results: z.optional(z.array(zSandboxStatusInfo)),
1567
- total_checked: z.int()
1568
- });
1569
-
1570
- /**
1571
- * SearchEntryPoint
1572
- *
1573
- * Google search entry point.
1574
- */
1575
- export const zSearchEntryPoint = z.object({
1576
- renderedContent: z.optional(z.union([
1577
- z.string(),
1578
- z.null()
1579
- ])),
1580
- sdkBlob: z.optional(z.union([
1581
- z.string(),
1582
- z.null()
1583
- ]))
1584
- });
1585
-
1586
- /**
1587
- * SecuritySchemeType
1588
- */
1589
- export const zSecuritySchemeType = z.enum([
1590
- 'apiKey',
1591
- 'http',
1592
- 'oauth2',
1593
- 'openIdConnect'
1594
- ]);
1595
-
1596
- /**
1597
- * APIKey
1598
- */
1599
- export const zApiKey = z.object({
1600
- type: z.optional(zSecuritySchemeType).default('apiKey'),
1601
- description: z.optional(z.union([
1602
- z.string(),
1603
- z.null()
1604
- ])),
1605
- in: zApiKeyIn,
1606
- name: z.string()
1607
- });
1608
-
1609
- /**
1610
- * HTTPBase
1611
- */
1612
- export const zHttpBase = z.object({
1613
- type: z.optional(zSecuritySchemeType).default('http'),
1614
- description: z.optional(z.union([
1615
- z.string(),
1616
- z.null()
1617
- ])),
1618
- scheme: z.string()
1619
- });
1620
-
1621
- /**
1622
- * HTTPBearer
1623
- */
1624
- export const zHttpBearer = z.object({
1625
- type: z.optional(zSecuritySchemeType).default('http'),
1626
- description: z.optional(z.union([
1627
- z.string(),
1628
- z.null()
1629
- ])),
1630
- scheme: z.optional(z.literal('bearer')).default('bearer'),
1631
- bearerFormat: z.optional(z.union([
1632
- z.string(),
1633
- z.null()
1634
- ]))
1635
- });
1636
-
1637
- /**
1638
- * OAuth2
1639
- */
1640
- export const zOAuth2Input = z.object({
1641
- type: z.optional(zSecuritySchemeType).default('oauth2'),
1642
- description: z.optional(z.union([
1643
- z.string(),
1644
- z.null()
1645
- ])),
1646
- flows: zOAuthFlows
1647
- });
1648
-
1649
- /**
1650
- * OAuth2
1651
- */
1652
- export const zOAuth2Output = z.object({
1653
- type: z.optional(zSecuritySchemeType).default('oauth2'),
1654
- description: z.optional(z.union([
1655
- z.string(),
1656
- z.null()
1657
- ])),
1658
- flows: zOAuthFlows
1659
- });
1660
-
1661
- /**
1662
- * OpenIdConnect
1663
- */
1664
- export const zOpenIdConnect = z.object({
1665
- type: z.optional(zSecuritySchemeType).default('openIdConnect'),
1666
- description: z.optional(z.union([
1667
- z.string(),
1668
- z.null()
1669
- ])),
1670
- openIdConnectUrl: z.string()
1671
- });
1672
-
1673
- /**
1674
- * OpenIdConnectWithConfig
1675
- */
1676
- export const zOpenIdConnectWithConfig = z.object({
1677
- type: z.optional(zSecuritySchemeType).default('openIdConnect'),
1678
- description: z.optional(z.union([
1679
- z.string(),
1680
- z.null()
1681
- ])),
1682
- authorization_endpoint: z.string(),
1683
- token_endpoint: z.string(),
1684
- userinfo_endpoint: z.optional(z.union([
1685
- z.string(),
1686
- z.null()
1687
- ])),
1688
- revocation_endpoint: z.optional(z.union([
1689
- z.string(),
1690
- z.null()
1691
- ])),
1692
- token_endpoint_auth_methods_supported: z.optional(z.union([
1693
- z.array(z.string()),
1694
- z.null()
1695
- ])),
1696
- grant_types_supported: z.optional(z.union([
1697
- z.array(z.string()),
1698
- z.null()
1699
- ])),
1700
- scopes: z.optional(z.union([
1701
- z.array(z.string()),
1702
- z.null()
1703
- ]))
1704
- });
1705
-
1706
- /**
1707
- * Segment
1708
- *
1709
- * Segment of the content.
1710
- */
1711
- export const zSegment = z.object({
1712
- endIndex: z.optional(z.union([
1713
- z.int(),
1714
- z.null()
1715
- ])),
1716
- partIndex: z.optional(z.union([
1717
- z.int(),
1718
- z.null()
1719
- ])),
1720
- startIndex: z.optional(z.union([
1721
- z.int(),
1722
- z.null()
1723
- ])),
1724
- text: z.optional(z.union([
1725
- z.string(),
1726
- z.null()
1727
- ]))
1728
- });
1729
-
1730
- /**
1731
- * GroundingSupport
1732
- *
1733
- * Grounding support.
1734
- */
1735
- export const zGroundingSupport = z.object({
1736
- confidenceScores: z.optional(z.union([
1737
- z.array(z.number()),
1738
- z.null()
1739
- ])),
1740
- groundingChunkIndices: z.optional(z.union([
1741
- z.array(z.int()),
1742
- z.null()
1743
- ])),
1744
- segment: z.optional(z.union([
1745
- zSegment,
1746
- z.null()
1747
- ]))
1748
- });
1749
-
1750
- /**
1751
- * GroundingMetadata
1752
- *
1753
- * Metadata returned to client when grounding is enabled.
1754
- */
1755
- export const zGroundingMetadataInput = z.object({
1756
- groundingChunks: z.optional(z.union([
1757
- z.array(zGroundingChunkInput),
1758
- z.null()
1759
- ])),
1760
- groundingSupports: z.optional(z.union([
1761
- z.array(zGroundingSupport),
1762
- z.null()
1763
- ])),
1764
- retrievalMetadata: z.optional(z.union([
1765
- zRetrievalMetadata,
1766
- z.null()
1767
- ])),
1768
- retrievalQueries: z.optional(z.union([
1769
- z.array(z.string()),
1770
- z.null()
1771
- ])),
1772
- searchEntryPoint: z.optional(z.union([
1773
- zSearchEntryPoint,
1774
- z.null()
1775
- ])),
1776
- webSearchQueries: z.optional(z.union([
1777
- z.array(z.string()),
1778
- z.null()
1779
- ]))
1780
- });
1781
-
1782
- /**
1783
- * GroundingMetadata
1784
- *
1785
- * Metadata returned to client when grounding is enabled.
1786
- */
1787
- export const zGroundingMetadataOutput = z.object({
1788
- groundingChunks: z.optional(z.union([
1789
- z.array(zGroundingChunkOutput),
1790
- z.null()
1791
- ])),
1792
- groundingSupports: z.optional(z.union([
1793
- z.array(zGroundingSupport),
1794
- z.null()
1795
- ])),
1796
- retrievalMetadata: z.optional(z.union([
1797
- zRetrievalMetadata,
1798
- z.null()
1799
- ])),
1800
- retrievalQueries: z.optional(z.union([
1801
- z.array(z.string()),
1802
- z.null()
1803
- ])),
1804
- searchEntryPoint: z.optional(z.union([
1805
- zSearchEntryPoint,
1806
- z.null()
1807
- ])),
1808
- webSearchQueries: z.optional(z.union([
1809
- z.array(z.string()),
1810
- z.null()
1811
- ]))
1812
- });
1813
-
1814
- /**
1815
- * ServiceAccountCredential
1816
- *
1817
- * Represents Google Service Account configuration.
1818
- *
1819
- * Attributes:
1820
- * type: The type should be "service_account".
1821
- * project_id: The project ID.
1822
- * private_key_id: The ID of the private key.
1823
- * private_key: The private key.
1824
- * client_email: The client email.
1825
- * client_id: The client ID.
1826
- * auth_uri: The authorization URI.
1827
- * token_uri: The token URI.
1828
- * auth_provider_x509_cert_url: URL for auth provider's X.509 cert.
1829
- * client_x509_cert_url: URL for the client's X.509 cert.
1830
- * universe_domain: The universe domain.
1831
- *
1832
- * Example:
1833
- *
1834
- * config = ServiceAccountCredential(
1835
- * type_="service_account",
1836
- * project_id="your_project_id",
1837
- * private_key_id="your_private_key_id",
1838
- * private_key="-----BEGIN PRIVATE KEY-----...",
1839
- * client_email="...@....iam.gserviceaccount.com",
1840
- * client_id="your_client_id",
1841
- * auth_uri="https://accounts.google.com/o/oauth2/auth",
1842
- * token_uri="https://oauth2.googleapis.com/token",
1843
- * auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
1844
- * client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/...",
1845
- * universe_domain="googleapis.com"
1846
- * )
1847
- *
1848
- *
1849
- * config = ServiceAccountConfig.model_construct(**{
1850
- * ...service account config dict
1851
- * })
1852
- */
1853
- export const zServiceAccountCredential = z.object({
1854
- type: z.optional(z.string()).default(''),
1855
- projectId: z.string(),
1856
- privateKeyId: z.string(),
1857
- privateKey: z.string(),
1858
- clientEmail: z.string(),
1859
- clientId: z.string(),
1860
- authUri: z.string(),
1861
- tokenUri: z.string(),
1862
- authProviderX509CertUrl: z.string(),
1863
- clientX509CertUrl: z.string(),
1864
- universeDomain: z.string()
1865
- });
1866
-
1867
- /**
1868
- * ServiceAccount
1869
- *
1870
- * Represents Google Service Account configuration.
1871
- */
1872
- export const zServiceAccount = z.object({
1873
- serviceAccountCredential: z.optional(z.union([
1874
- zServiceAccountCredential,
1875
- z.null()
1876
- ])),
1877
- scopes: z.array(z.string()),
1878
- useDefaultCredential: z.optional(z.union([
1879
- z.boolean(),
1880
- z.null()
1881
- ])).default(false)
1882
- });
1883
-
1884
- /**
1885
- * AuthCredential
1886
- *
1887
- * Data class representing an authentication credential.
1888
- *
1889
- * To exchange for the actual credential, please use
1890
- * CredentialExchanger.exchange_credential().
1891
- *
1892
- * Examples: API Key Auth
1893
- * AuthCredential(
1894
- * auth_type=AuthCredentialTypes.API_KEY,
1895
- * api_key="1234",
1896
- * )
1897
- *
1898
- * Example: HTTP Auth
1899
- * AuthCredential(
1900
- * auth_type=AuthCredentialTypes.HTTP,
1901
- * http=HttpAuth(
1902
- * scheme="basic",
1903
- * credentials=HttpCredentials(username="user", password="password"),
1904
- * ),
1905
- * )
1906
- *
1907
- * Example: OAuth2 Bearer Token in HTTP Header
1908
- * AuthCredential(
1909
- * auth_type=AuthCredentialTypes.HTTP,
1910
- * http=HttpAuth(
1911
- * scheme="bearer",
1912
- * credentials=HttpCredentials(token="eyAkaknabna...."),
1913
- * ),
1914
- * )
1915
- *
1916
- * Example: OAuth2 Auth with Authorization Code Flow
1917
- * AuthCredential(
1918
- * auth_type=AuthCredentialTypes.OAUTH2,
1919
- * oauth2=OAuth2Auth(
1920
- * client_id="1234",
1921
- * client_secret="secret",
1922
- * ),
1923
- * )
1924
- *
1925
- * Example: OpenID Connect Auth
1926
- * AuthCredential(
1927
- * auth_type=AuthCredentialTypes.OPEN_ID_CONNECT,
1928
- * oauth2=OAuth2Auth(
1929
- * client_id="1234",
1930
- * client_secret="secret",
1931
- * redirect_uri="https://example.com",
1932
- * scopes=["scope1", "scope2"],
1933
- * ),
1934
- * )
1935
- *
1936
- * Example: Auth with resource reference
1937
- * AuthCredential(
1938
- * auth_type=AuthCredentialTypes.API_KEY,
1939
- * resource_ref="projects/1234/locations/us-central1/resources/resource1",
1940
- * )
1941
- */
1942
- export const zAuthCredentialInput = z.object({
1943
- authType: zAuthCredentialTypes,
1944
- resourceRef: z.optional(z.union([
1945
- z.string(),
1946
- z.null()
1947
- ])),
1948
- apiKey: z.optional(z.union([
1949
- z.string(),
1950
- z.null()
1951
- ])),
1952
- http: z.optional(z.union([
1953
- zHttpAuth,
1954
- z.null()
1955
- ])),
1956
- serviceAccount: z.optional(z.union([
1957
- zServiceAccount,
1958
- z.null()
1959
- ])),
1960
- oauth2: z.optional(z.union([
1961
- zOAuth2Auth,
1962
- z.null()
1963
- ]))
1964
- });
1965
-
1966
- /**
1967
- * AuthCredential
1968
- *
1969
- * Data class representing an authentication credential.
1970
- *
1971
- * To exchange for the actual credential, please use
1972
- * CredentialExchanger.exchange_credential().
1973
- *
1974
- * Examples: API Key Auth
1975
- * AuthCredential(
1976
- * auth_type=AuthCredentialTypes.API_KEY,
1977
- * api_key="1234",
1978
- * )
1979
- *
1980
- * Example: HTTP Auth
1981
- * AuthCredential(
1982
- * auth_type=AuthCredentialTypes.HTTP,
1983
- * http=HttpAuth(
1984
- * scheme="basic",
1985
- * credentials=HttpCredentials(username="user", password="password"),
1986
- * ),
1987
- * )
1988
- *
1989
- * Example: OAuth2 Bearer Token in HTTP Header
1990
- * AuthCredential(
1991
- * auth_type=AuthCredentialTypes.HTTP,
1992
- * http=HttpAuth(
1993
- * scheme="bearer",
1994
- * credentials=HttpCredentials(token="eyAkaknabna...."),
1995
- * ),
1996
- * )
1997
- *
1998
- * Example: OAuth2 Auth with Authorization Code Flow
1999
- * AuthCredential(
2000
- * auth_type=AuthCredentialTypes.OAUTH2,
2001
- * oauth2=OAuth2Auth(
2002
- * client_id="1234",
2003
- * client_secret="secret",
2004
- * ),
2005
- * )
2006
- *
2007
- * Example: OpenID Connect Auth
2008
- * AuthCredential(
2009
- * auth_type=AuthCredentialTypes.OPEN_ID_CONNECT,
2010
- * oauth2=OAuth2Auth(
2011
- * client_id="1234",
2012
- * client_secret="secret",
2013
- * redirect_uri="https://example.com",
2014
- * scopes=["scope1", "scope2"],
2015
- * ),
2016
- * )
2017
- *
2018
- * Example: Auth with resource reference
2019
- * AuthCredential(
2020
- * auth_type=AuthCredentialTypes.API_KEY,
2021
- * resource_ref="projects/1234/locations/us-central1/resources/resource1",
2022
- * )
2023
- */
2024
- export const zAuthCredentialOutput = z.object({
2025
- authType: zAuthCredentialTypes,
2026
- resourceRef: z.optional(z.union([
2027
- z.string(),
2028
- z.null()
2029
- ])),
2030
- apiKey: z.optional(z.union([
2031
- z.string(),
2032
- z.null()
2033
- ])),
2034
- http: z.optional(z.union([
2035
- zHttpAuth,
2036
- z.null()
2037
- ])),
2038
- serviceAccount: z.optional(z.union([
2039
- zServiceAccount,
2040
- z.null()
2041
- ])),
2042
- oauth2: z.optional(z.union([
2043
- zOAuth2Auth,
2044
- z.null()
2045
- ]))
2046
- });
2047
-
2048
- /**
2049
- * SessionInput
2050
- *
2051
- * Values that help initialize a Session.
2052
- */
2053
- export const zSessionInput = z.object({
2054
- appName: z.string(),
2055
- userId: z.string(),
2056
- state: z.optional(z.record(z.string(), z.unknown()))
2057
- });
2058
-
2059
- /**
2060
- * StartNapcatRequest
2061
- *
2062
- * 启动Napcat沙盒请求模型
2063
- */
2064
- export const zStartNapcatRequest = z.object({
2065
- sandbox_type: z.string(),
2066
- sandboxId: z.string()
2067
- });
2068
-
2069
- /**
2070
- * StartNapcatResponse
2071
- *
2072
- * 启动Napcat沙盒响应模型
2073
- */
2074
- export const zStartNapcatResponse = z.object({
2075
- sandboxId: z.string(),
2076
- error: z.optional(z.union([
2077
- z.string(),
2078
- z.null()
2079
- ]))
2080
- });
2081
-
2082
- /**
2083
- * ThinkingConfig
2084
- *
2085
- * The thinking features configuration.
2086
- */
2087
- export const zThinkingConfig = z.object({
2088
- includeThoughts: z.optional(z.union([
2089
- z.boolean(),
2090
- z.null()
2091
- ])),
2092
- thinkingBudget: z.optional(z.union([
2093
- z.int(),
2094
- z.null()
2095
- ]))
2096
- });
2097
-
2098
- /**
2099
- * ToolAnnotations
2100
- *
2101
- * Additional properties describing a Tool to clients.
2102
- *
2103
- * NOTE: all properties in ToolAnnotations are **hints**.
2104
- * They are not guaranteed to provide a faithful description of
2105
- * tool behavior (including descriptive properties like `title`).
2106
- *
2107
- * Clients should never make tool use decisions based on ToolAnnotations
2108
- * received from untrusted servers.
2109
- */
2110
- export const zToolAnnotations = z.object({
2111
- title: z.optional(z.union([
2112
- z.string(),
2113
- z.null()
2114
- ])),
2115
- readOnlyHint: z.optional(z.union([
2116
- z.boolean(),
2117
- z.null()
2118
- ])),
2119
- destructiveHint: z.optional(z.union([
2120
- z.boolean(),
2121
- z.null()
2122
- ])),
2123
- idempotentHint: z.optional(z.union([
2124
- z.boolean(),
2125
- z.null()
2126
- ])),
2127
- openWorldHint: z.optional(z.union([
2128
- z.boolean(),
2129
- z.null()
2130
- ]))
2131
- });
2132
-
2133
- /**
2134
- * ToolCodeExecution
2135
- *
2136
- * Tool that executes code generated by the model, and automatically returns the result to the model.
2137
- *
2138
- * See also [ExecutableCode]and [CodeExecutionResult] which are input and output
2139
- * to this tool.
2140
- */
2141
- export const zToolCodeExecution = z.record(z.string(), z.never());
2142
-
2143
- /**
2144
- * ToolConfig
2145
- *
2146
- * Tool config.
2147
- *
2148
- * This config is shared for all tools provided in the request.
2149
- */
2150
- export const zToolConfigInput = z.object({
2151
- functionCallingConfig: z.optional(z.union([
2152
- zFunctionCallingConfig,
2153
- z.null()
2154
- ])),
2155
- retrievalConfig: z.optional(z.union([
2156
- zRetrievalConfig,
2157
- z.null()
2158
- ]))
2159
- });
2160
-
2161
- /**
2162
- * ToolConfig
2163
- *
2164
- * Tool config.
2165
- *
2166
- * This config is shared for all tools provided in the request.
2167
- */
2168
- export const zToolConfigOutput = z.object({
2169
- functionCallingConfig: z.optional(z.union([
2170
- zFunctionCallingConfig,
2171
- z.null()
2172
- ])),
2173
- retrievalConfig: z.optional(z.union([
2174
- zRetrievalConfig,
2175
- z.null()
2176
- ]))
2177
- });
2178
-
2179
- /**
2180
- * ToolConfirmation
2181
- *
2182
- * Represents a tool confirmation configuration.
2183
- */
2184
- export const zToolConfirmation = z.object({
2185
- hint: z.optional(z.string()).default(''),
2186
- confirmed: z.optional(z.boolean()).default(false),
2187
- payload: z.optional(z.union([
2188
- z.unknown(),
2189
- z.null()
2190
- ]))
2191
- });
2192
-
2193
- /**
2194
- * TrafficType
2195
- *
2196
- * Output only.
2197
- *
2198
- * Traffic type. This shows whether a request consumes Pay-As-You-Go or
2199
- * Provisioned Throughput quota.
2200
- */
2201
- export const zTrafficType = z.enum([
2202
- 'TRAFFIC_TYPE_UNSPECIFIED',
2203
- 'ON_DEMAND',
2204
- 'PROVISIONED_THROUGHPUT'
2205
- ]);
2206
-
2207
- /**
2208
- * GenerateContentResponseUsageMetadata
2209
- *
2210
- * Usage metadata about response(s).
2211
- */
2212
- export const zGenerateContentResponseUsageMetadataInput = z.object({
2213
- cacheTokensDetails: z.optional(z.union([
2214
- z.array(zModalityTokenCount),
2215
- z.null()
2216
- ])),
2217
- cachedContentTokenCount: z.optional(z.union([
2218
- z.int(),
2219
- z.null()
2220
- ])),
2221
- candidatesTokenCount: z.optional(z.union([
2222
- z.int(),
2223
- z.null()
2224
- ])),
2225
- candidatesTokensDetails: z.optional(z.union([
2226
- z.array(zModalityTokenCount),
2227
- z.null()
2228
- ])),
2229
- promptTokenCount: z.optional(z.union([
2230
- z.int(),
2231
- z.null()
2232
- ])),
2233
- promptTokensDetails: z.optional(z.union([
2234
- z.array(zModalityTokenCount),
2235
- z.null()
2236
- ])),
2237
- thoughtsTokenCount: z.optional(z.union([
2238
- z.int(),
2239
- z.null()
2240
- ])),
2241
- toolUsePromptTokenCount: z.optional(z.union([
2242
- z.int(),
2243
- z.null()
2244
- ])),
2245
- toolUsePromptTokensDetails: z.optional(z.union([
2246
- z.array(zModalityTokenCount),
2247
- z.null()
2248
- ])),
2249
- totalTokenCount: z.optional(z.union([
2250
- z.int(),
2251
- z.null()
2252
- ])),
2253
- trafficType: z.optional(z.union([
2254
- zTrafficType,
2255
- z.null()
2256
- ]))
2257
- });
2258
-
2259
- /**
2260
- * GenerateContentResponseUsageMetadata
2261
- *
2262
- * Usage metadata about response(s).
2263
- */
2264
- export const zGenerateContentResponseUsageMetadataOutput = z.object({
2265
- cacheTokensDetails: z.optional(z.union([
2266
- z.array(zModalityTokenCount),
2267
- z.null()
2268
- ])),
2269
- cachedContentTokenCount: z.optional(z.union([
2270
- z.int(),
2271
- z.null()
2272
- ])),
2273
- candidatesTokenCount: z.optional(z.union([
2274
- z.int(),
2275
- z.null()
2276
- ])),
2277
- candidatesTokensDetails: z.optional(z.union([
2278
- z.array(zModalityTokenCount),
2279
- z.null()
2280
- ])),
2281
- promptTokenCount: z.optional(z.union([
2282
- z.int(),
2283
- z.null()
2284
- ])),
2285
- promptTokensDetails: z.optional(z.union([
2286
- z.array(zModalityTokenCount),
2287
- z.null()
2288
- ])),
2289
- thoughtsTokenCount: z.optional(z.union([
2290
- z.int(),
2291
- z.null()
2292
- ])),
2293
- toolUsePromptTokenCount: z.optional(z.union([
2294
- z.int(),
2295
- z.null()
2296
- ])),
2297
- toolUsePromptTokensDetails: z.optional(z.union([
2298
- z.array(zModalityTokenCount),
2299
- z.null()
2300
- ])),
2301
- totalTokenCount: z.optional(z.union([
2302
- z.int(),
2303
- z.null()
2304
- ])),
2305
- trafficType: z.optional(z.union([
2306
- zTrafficType,
2307
- z.null()
2308
- ]))
2309
- });
2310
-
2311
- /**
2312
- * Transcription
2313
- *
2314
- * Audio transcription in Server Conent.
2315
- */
2316
- export const zTranscription = z.object({
2317
- text: z.optional(z.union([
2318
- z.string(),
2319
- z.null()
2320
- ])),
2321
- finished: z.optional(z.union([
2322
- z.boolean(),
2323
- z.null()
2324
- ]))
2325
- });
2326
-
2327
- /**
2328
- * Type
2329
- *
2330
- * Optional. The type of the data.
2331
- */
2332
- export const zType = z.enum([
2333
- 'TYPE_UNSPECIFIED',
2334
- 'STRING',
2335
- 'NUMBER',
2336
- 'INTEGER',
2337
- 'BOOLEAN',
2338
- 'ARRAY',
2339
- 'OBJECT',
2340
- 'NULL'
2341
- ]);
2342
-
2343
- /**
2344
- * Schema
2345
- *
2346
- * Schema is used to define the format of input/output data.
2347
- *
2348
- * Represents a select subset of an [OpenAPI 3.0 schema
2349
- * object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
2350
- * be added in the future as needed.
2351
- */
2352
- export const zSchemaInput = z.object({
2353
- additionalProperties: z.optional(z.union([
2354
- z.unknown(),
2355
- z.null()
2356
- ])),
2357
- defs: z.optional(z.union([
2358
- z.record(z.string(), z.lazy((): any => zSchemaInput)),
2359
- z.null()
2360
- ])),
2361
- ref: z.optional(z.union([
2362
- z.string(),
2363
- z.null()
2364
- ])),
2365
- anyOf: z.optional(z.union([
2366
- z.array(z.lazy((): any => zSchemaInput)),
2367
- z.null()
2368
- ])),
2369
- default: z.optional(z.union([
2370
- z.unknown(),
2371
- z.null()
2372
- ])),
2373
- description: z.optional(z.union([
2374
- z.string(),
2375
- z.null()
2376
- ])),
2377
- enum: z.optional(z.union([
2378
- z.array(z.string()),
2379
- z.null()
2380
- ])),
2381
- example: z.optional(z.union([
2382
- z.unknown(),
2383
- z.null()
2384
- ])),
2385
- format: z.optional(z.union([
2386
- z.string(),
2387
- z.null()
2388
- ])),
2389
- items: z.optional(z.union([
2390
- z.lazy((): any => zSchemaInput),
2391
- z.null()
2392
- ])),
2393
- maxItems: z.optional(z.union([
2394
- z.int(),
2395
- z.null()
2396
- ])),
2397
- maxLength: z.optional(z.union([
2398
- z.int(),
2399
- z.null()
2400
- ])),
2401
- maxProperties: z.optional(z.union([
2402
- z.int(),
2403
- z.null()
2404
- ])),
2405
- maximum: z.optional(z.union([
2406
- z.number(),
2407
- z.null()
2408
- ])),
2409
- minItems: z.optional(z.union([
2410
- z.int(),
2411
- z.null()
2412
- ])),
2413
- minLength: z.optional(z.union([
2414
- z.int(),
2415
- z.null()
2416
- ])),
2417
- minProperties: z.optional(z.union([
2418
- z.int(),
2419
- z.null()
2420
- ])),
2421
- minimum: z.optional(z.union([
2422
- z.number(),
2423
- z.null()
2424
- ])),
2425
- nullable: z.optional(z.union([
2426
- z.boolean(),
2427
- z.null()
2428
- ])),
2429
- pattern: z.optional(z.union([
2430
- z.string(),
2431
- z.null()
2432
- ])),
2433
- properties: z.optional(z.union([
2434
- z.record(z.string(), z.lazy((): any => zSchemaInput)),
2435
- z.null()
2436
- ])),
2437
- propertyOrdering: z.optional(z.union([
2438
- z.array(z.string()),
2439
- z.null()
2440
- ])),
2441
- required: z.optional(z.union([
2442
- z.array(z.string()),
2443
- z.null()
2444
- ])),
2445
- title: z.optional(z.union([
2446
- z.string(),
2447
- z.null()
2448
- ])),
2449
- type: z.optional(z.union([
2450
- zType,
2451
- z.null()
2452
- ]))
2453
- });
2454
-
2455
- /**
2456
- * FunctionDeclaration
2457
- *
2458
- * Defines a function that the model can generate JSON inputs for.
2459
- *
2460
- * The inputs are based on `OpenAPI 3.0 specifications
2461
- * <https://spec.openapis.org/oas/v3.0.3>`_.
2462
- */
2463
- export const zFunctionDeclarationInput = z.object({
2464
- behavior: z.optional(z.union([
2465
- zBehavior,
2466
- z.null()
2467
- ])),
2468
- description: z.optional(z.union([
2469
- z.string(),
2470
- z.null()
2471
- ])),
2472
- name: z.optional(z.union([
2473
- z.string(),
2474
- z.null()
2475
- ])),
2476
- parameters: z.optional(z.union([
2477
- zSchemaInput,
2478
- z.null()
2479
- ])),
2480
- parametersJsonSchema: z.optional(z.union([
2481
- z.unknown(),
2482
- z.null()
2483
- ])),
2484
- response: z.optional(z.union([
2485
- zSchemaInput,
2486
- z.null()
2487
- ])),
2488
- responseJsonSchema: z.optional(z.union([
2489
- z.unknown(),
2490
- z.null()
2491
- ]))
2492
- });
2493
-
2494
- /**
2495
- * Schema
2496
- *
2497
- * Schema is used to define the format of input/output data.
2498
- *
2499
- * Represents a select subset of an [OpenAPI 3.0 schema
2500
- * object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
2501
- * be added in the future as needed.
2502
- */
2503
- export const zSchemaOutput = z.object({
2504
- additionalProperties: z.optional(z.union([
2505
- z.unknown(),
2506
- z.null()
2507
- ])),
2508
- defs: z.optional(z.union([
2509
- z.record(z.string(), z.lazy((): any => zSchemaOutput)),
2510
- z.null()
2511
- ])),
2512
- ref: z.optional(z.union([
2513
- z.string(),
2514
- z.null()
2515
- ])),
2516
- anyOf: z.optional(z.union([
2517
- z.array(z.lazy((): any => zSchemaOutput)),
2518
- z.null()
2519
- ])),
2520
- default: z.optional(z.union([
2521
- z.unknown(),
2522
- z.null()
2523
- ])),
2524
- description: z.optional(z.union([
2525
- z.string(),
2526
- z.null()
2527
- ])),
2528
- enum: z.optional(z.union([
2529
- z.array(z.string()),
2530
- z.null()
2531
- ])),
2532
- example: z.optional(z.union([
2533
- z.unknown(),
2534
- z.null()
2535
- ])),
2536
- format: z.optional(z.union([
2537
- z.string(),
2538
- z.null()
2539
- ])),
2540
- items: z.optional(z.union([
2541
- z.lazy((): any => zSchemaOutput),
2542
- z.null()
2543
- ])),
2544
- maxItems: z.optional(z.union([
2545
- z.int(),
2546
- z.null()
2547
- ])),
2548
- maxLength: z.optional(z.union([
2549
- z.int(),
2550
- z.null()
2551
- ])),
2552
- maxProperties: z.optional(z.union([
2553
- z.int(),
2554
- z.null()
2555
- ])),
2556
- maximum: z.optional(z.union([
2557
- z.number(),
2558
- z.null()
2559
- ])),
2560
- minItems: z.optional(z.union([
2561
- z.int(),
2562
- z.null()
2563
- ])),
2564
- minLength: z.optional(z.union([
2565
- z.int(),
2566
- z.null()
2567
- ])),
2568
- minProperties: z.optional(z.union([
2569
- z.int(),
2570
- z.null()
2571
- ])),
2572
- minimum: z.optional(z.union([
2573
- z.number(),
2574
- z.null()
2575
- ])),
2576
- nullable: z.optional(z.union([
2577
- z.boolean(),
2578
- z.null()
2579
- ])),
2580
- pattern: z.optional(z.union([
2581
- z.string(),
2582
- z.null()
2583
- ])),
2584
- properties: z.optional(z.union([
2585
- z.record(z.string(), z.lazy((): any => zSchemaOutput)),
2586
- z.null()
2587
- ])),
2588
- propertyOrdering: z.optional(z.union([
2589
- z.array(z.string()),
2590
- z.null()
2591
- ])),
2592
- required: z.optional(z.union([
2593
- z.array(z.string()),
2594
- z.null()
2595
- ])),
2596
- title: z.optional(z.union([
2597
- z.string(),
2598
- z.null()
2599
- ])),
2600
- type: z.optional(z.union([
2601
- zType,
2602
- z.null()
2603
- ]))
2604
- });
2605
-
2606
- /**
2607
- * FunctionDeclaration
2608
- *
2609
- * Defines a function that the model can generate JSON inputs for.
2610
- *
2611
- * The inputs are based on `OpenAPI 3.0 specifications
2612
- * <https://spec.openapis.org/oas/v3.0.3>`_.
2613
- */
2614
- export const zFunctionDeclarationOutput = z.object({
2615
- behavior: z.optional(z.union([
2616
- zBehavior,
2617
- z.null()
2618
- ])),
2619
- description: z.optional(z.union([
2620
- z.string(),
2621
- z.null()
2622
- ])),
2623
- name: z.optional(z.union([
2624
- z.string(),
2625
- z.null()
2626
- ])),
2627
- parameters: z.optional(z.union([
2628
- zSchemaOutput,
2629
- z.null()
2630
- ])),
2631
- parametersJsonSchema: z.optional(z.union([
2632
- z.unknown(),
2633
- z.null()
2634
- ])),
2635
- response: z.optional(z.union([
2636
- zSchemaOutput,
2637
- z.null()
2638
- ])),
2639
- responseJsonSchema: z.optional(z.union([
2640
- z.unknown(),
2641
- z.null()
2642
- ]))
2643
- });
2644
-
2645
- /**
2646
- * UrlContext
2647
- *
2648
- * Tool to support URL context retrieval.
2649
- */
2650
- export const zUrlContext = z.record(z.string(), z.never());
2651
-
2652
- /**
2653
- * ValidationError
2654
- */
2655
- export const zValidationError = z.object({
2656
- loc: z.array(z.union([z.string(), z.int()])),
2657
- msg: z.string(),
2658
- type: z.string()
2659
- });
2660
-
2661
- /**
2662
- * HTTPValidationError
2663
- */
2664
- export const zHttpValidationError = z.object({
2665
- detail: z.optional(z.array(zValidationError))
2666
- });
2667
-
2668
- /**
2669
- * VertexAISearchDataStoreSpec
2670
- *
2671
- * Define data stores within engine to filter on in a search call and configurations for those data stores.
2672
- *
2673
- * For more information, see
2674
- * https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
2675
- */
2676
- export const zVertexAiSearchDataStoreSpec = z.object({
2677
- dataStore: z.optional(z.union([
2678
- z.string(),
2679
- z.null()
2680
- ])),
2681
- filter: z.optional(z.union([
2682
- z.string(),
2683
- z.null()
2684
- ]))
2685
- });
2686
-
2687
- /**
2688
- * VertexAISearch
2689
- *
2690
- * Retrieve from Vertex AI Search datastore or engine for grounding.
2691
- *
2692
- * datastore and engine are mutually exclusive. See
2693
- * https://cloud.google.com/products/agent-builder
2694
- */
2695
- export const zVertexAiSearch = z.object({
2696
- dataStoreSpecs: z.optional(z.union([
2697
- z.array(zVertexAiSearchDataStoreSpec),
2698
- z.null()
2699
- ])),
2700
- datastore: z.optional(z.union([
2701
- z.string(),
2702
- z.null()
2703
- ])),
2704
- engine: z.optional(z.union([
2705
- z.string(),
2706
- z.null()
2707
- ])),
2708
- filter: z.optional(z.union([
2709
- z.string(),
2710
- z.null()
2711
- ])),
2712
- maxResults: z.optional(z.union([
2713
- z.int(),
2714
- z.null()
2715
- ]))
2716
- });
2717
-
2718
- /**
2719
- * VertexRagStoreRagResource
2720
- *
2721
- * The definition of the Rag resource.
2722
- */
2723
- export const zVertexRagStoreRagResource = z.object({
2724
- ragCorpus: z.optional(z.union([
2725
- z.string(),
2726
- z.null()
2727
- ])),
2728
- ragFileIds: z.optional(z.union([
2729
- z.array(z.string()),
2730
- z.null()
2731
- ]))
2732
- });
2733
-
2734
- /**
2735
- * VertexRagStore
2736
- *
2737
- * Retrieve from Vertex RAG Store for grounding.
2738
- */
2739
- export const zVertexRagStoreInput = z.object({
2740
- ragCorpora: z.optional(z.union([
2741
- z.array(z.string()),
2742
- z.null()
2743
- ])),
2744
- ragResources: z.optional(z.union([
2745
- z.array(zVertexRagStoreRagResource),
2746
- z.null()
2747
- ])),
2748
- ragRetrievalConfig: z.optional(z.union([
2749
- zRagRetrievalConfigInput,
2750
- z.null()
2751
- ])),
2752
- similarityTopK: z.optional(z.union([
2753
- z.int(),
2754
- z.null()
2755
- ])),
2756
- storeContext: z.optional(z.union([
2757
- z.boolean(),
2758
- z.null()
2759
- ])),
2760
- vectorDistanceThreshold: z.optional(z.union([
2761
- z.number(),
2762
- z.null()
2763
- ]))
2764
- });
2765
-
2766
- /**
2767
- * Retrieval
2768
- *
2769
- * Defines a retrieval tool that model can call to access external knowledge.
2770
- */
2771
- export const zRetrievalInput = z.object({
2772
- disableAttribution: z.optional(z.union([
2773
- z.boolean(),
2774
- z.null()
2775
- ])),
2776
- vertexAiSearch: z.optional(z.union([
2777
- zVertexAiSearch,
2778
- z.null()
2779
- ])),
2780
- vertexRagStore: z.optional(z.union([
2781
- zVertexRagStoreInput,
2782
- z.null()
2783
- ]))
2784
- });
2785
-
2786
- /**
2787
- * VertexRagStore
2788
- *
2789
- * Retrieve from Vertex RAG Store for grounding.
2790
- */
2791
- export const zVertexRagStoreOutput = z.object({
2792
- ragCorpora: z.optional(z.union([
2793
- z.array(z.string()),
2794
- z.null()
2795
- ])),
2796
- ragResources: z.optional(z.union([
2797
- z.array(zVertexRagStoreRagResource),
2798
- z.null()
2799
- ])),
2800
- ragRetrievalConfig: z.optional(z.union([
2801
- zRagRetrievalConfigOutput,
2802
- z.null()
2803
- ])),
2804
- similarityTopK: z.optional(z.union([
2805
- z.int(),
2806
- z.null()
2807
- ])),
2808
- storeContext: z.optional(z.union([
2809
- z.boolean(),
2810
- z.null()
2811
- ])),
2812
- vectorDistanceThreshold: z.optional(z.union([
2813
- z.number(),
2814
- z.null()
2815
- ]))
2816
- });
2817
-
2818
- /**
2819
- * Retrieval
2820
- *
2821
- * Defines a retrieval tool that model can call to access external knowledge.
2822
- */
2823
- export const zRetrievalOutput = z.object({
2824
- disableAttribution: z.optional(z.union([
2825
- z.boolean(),
2826
- z.null()
2827
- ])),
2828
- vertexAiSearch: z.optional(z.union([
2829
- zVertexAiSearch,
2830
- z.null()
2831
- ])),
2832
- vertexRagStore: z.optional(z.union([
2833
- zVertexRagStoreOutput,
2834
- z.null()
2835
- ]))
2836
- });
2837
-
2838
- /**
2839
- * VideoMetadata
2840
- *
2841
- * Describes how the video in the Part should be used by the model.
2842
- */
2843
- export const zVideoMetadata = z.object({
2844
- fps: z.optional(z.union([
2845
- z.number(),
2846
- z.null()
2847
- ])),
2848
- endOffset: z.optional(z.union([
2849
- z.string(),
2850
- z.null()
2851
- ])),
2852
- startOffset: z.optional(z.union([
2853
- z.string(),
2854
- z.null()
2855
- ]))
2856
- });
2857
-
2858
- /**
2859
- * Part
2860
- *
2861
- * A datatype containing media content.
2862
- *
2863
- * Exactly one field within a Part should be set, representing the specific type
2864
- * of content being conveyed. Using multiple fields within the same `Part`
2865
- * instance is considered invalid.
2866
- */
2867
- export const zPartInput = z.object({
2868
- videoMetadata: z.optional(z.union([
2869
- zVideoMetadata,
2870
- z.null()
2871
- ])),
2872
- thought: z.optional(z.union([
2873
- z.boolean(),
2874
- z.null()
2875
- ])),
2876
- inlineData: z.optional(z.union([
2877
- zBlob,
2878
- z.null()
2879
- ])),
2880
- fileData: z.optional(z.union([
2881
- zFileData,
2882
- z.null()
2883
- ])),
2884
- thoughtSignature: z.optional(z.union([
2885
- z.string(),
2886
- z.null()
2887
- ])),
2888
- codeExecutionResult: z.optional(z.union([
2889
- zCodeExecutionResult,
2890
- z.null()
2891
- ])),
2892
- executableCode: z.optional(z.union([
2893
- zExecutableCode,
2894
- z.null()
2895
- ])),
2896
- functionCall: z.optional(z.union([
2897
- zFunctionCall,
2898
- z.null()
2899
- ])),
2900
- functionResponse: z.optional(z.union([
2901
- zFunctionResponse,
2902
- z.null()
2903
- ])),
2904
- text: z.optional(z.union([
2905
- z.string(),
2906
- z.null()
2907
- ]))
2908
- });
2909
-
2910
- /**
2911
- * Content
2912
- *
2913
- * Contains the multi-part content of a message.
2914
- */
2915
- export const zContentInput = z.object({
2916
- parts: z.optional(z.union([
2917
- z.array(zPartInput),
2918
- z.null()
2919
- ])),
2920
- role: z.optional(z.union([
2921
- z.string(),
2922
- z.null()
2923
- ]))
2924
- });
2925
-
2926
- /**
2927
- * EventCompaction
2928
- *
2929
- * The compaction of the events.
2930
- */
2931
- export const zEventCompactionInput = z.object({
2932
- startTimestamp: z.number(),
2933
- endTimestamp: z.number(),
2934
- compactedContent: zContentInput
2935
- });
2936
-
2937
- /**
2938
- * IntermediateData
2939
- *
2940
- * Container for intermediate data that an agent would generate as it responds with a final answer.
2941
- */
2942
- export const zIntermediateDataInput = z.object({
2943
- toolUses: z.optional(z.array(zFunctionCall)).default([]),
2944
- toolResponses: z.optional(z.array(zFunctionResponse)).default([]),
2945
- intermediateResponses: z.optional(z.array(z.tuple([z.string(), z.array(zPartInput)]))).default([])
2946
- });
2947
-
2948
- /**
2949
- * InvocationEvent
2950
- *
2951
- * An immutable record representing a specific point in the agent's invocation.
2952
- *
2953
- * It captures agent's replies, requests to use tools (function calls), and tool
2954
- * results.
2955
- *
2956
- * This structure is a simple projection of the actual `Event` datamodel that
2957
- * is intended for the Eval System.
2958
- */
2959
- export const zInvocationEventInput = z.object({
2960
- author: z.string(),
2961
- content: z.union([
2962
- zContentInput,
2963
- z.null()
2964
- ])
2965
- });
2966
-
2967
- /**
2968
- * InvocationEvents
2969
- *
2970
- * A container for events that occur during the course of an invocation.
2971
- */
2972
- export const zInvocationEventsInput = z.object({
2973
- invocationEvents: z.optional(z.array(zInvocationEventInput))
2974
- });
2975
-
2976
- /**
2977
- * Part
2978
- *
2979
- * A datatype containing media content.
2980
- *
2981
- * Exactly one field within a Part should be set, representing the specific type
2982
- * of content being conveyed. Using multiple fields within the same `Part`
2983
- * instance is considered invalid.
2984
- */
2985
- export const zPartOutput = z.object({
2986
- videoMetadata: z.optional(z.union([
2987
- zVideoMetadata,
2988
- z.null()
2989
- ])),
2990
- thought: z.optional(z.union([
2991
- z.boolean(),
2992
- z.null()
2993
- ])),
2994
- inlineData: z.optional(z.union([
2995
- zBlob,
2996
- z.null()
2997
- ])),
2998
- fileData: z.optional(z.union([
2999
- zFileData,
3000
- z.null()
3001
- ])),
3002
- thoughtSignature: z.optional(z.union([
3003
- z.string(),
3004
- z.null()
3005
- ])),
3006
- codeExecutionResult: z.optional(z.union([
3007
- zCodeExecutionResult,
3008
- z.null()
3009
- ])),
3010
- executableCode: z.optional(z.union([
3011
- zExecutableCode,
3012
- z.null()
3013
- ])),
3014
- functionCall: z.optional(z.union([
3015
- zFunctionCall,
3016
- z.null()
3017
- ])),
3018
- functionResponse: z.optional(z.union([
3019
- zFunctionResponse,
3020
- z.null()
3021
- ])),
3022
- text: z.optional(z.union([
3023
- z.string(),
3024
- z.null()
3025
- ]))
3026
- });
3027
-
3028
- /**
3029
- * Content
3030
- *
3031
- * Contains the multi-part content of a message.
3032
- */
3033
- export const zContentOutput = z.object({
3034
- parts: z.optional(z.union([
3035
- z.array(zPartOutput),
3036
- z.null()
3037
- ])),
3038
- role: z.optional(z.union([
3039
- z.string(),
3040
- z.null()
3041
- ]))
3042
- });
3043
-
3044
- /**
3045
- * EventCompaction
3046
- *
3047
- * The compaction of the events.
3048
- */
3049
- export const zEventCompactionOutput = z.object({
3050
- startTimestamp: z.number(),
3051
- endTimestamp: z.number(),
3052
- compactedContent: zContentOutput
3053
- });
3054
-
3055
- /**
3056
- * IntermediateData
3057
- *
3058
- * Container for intermediate data that an agent would generate as it responds with a final answer.
3059
- */
3060
- export const zIntermediateDataOutput = z.object({
3061
- toolUses: z.optional(z.array(zFunctionCall)).default([]),
3062
- toolResponses: z.optional(z.array(zFunctionResponse)).default([]),
3063
- intermediateResponses: z.optional(z.array(z.tuple([z.string(), z.array(zPartOutput)]))).default([])
3064
- });
3065
-
3066
- /**
3067
- * InvocationEvent
3068
- *
3069
- * An immutable record representing a specific point in the agent's invocation.
3070
- *
3071
- * It captures agent's replies, requests to use tools (function calls), and tool
3072
- * results.
3073
- *
3074
- * This structure is a simple projection of the actual `Event` datamodel that
3075
- * is intended for the Eval System.
3076
- */
3077
- export const zInvocationEventOutput = z.object({
3078
- author: z.string(),
3079
- content: z.union([
3080
- zContentOutput,
3081
- z.null()
3082
- ])
3083
- });
3084
-
3085
- /**
3086
- * InvocationEvents
3087
- *
3088
- * A container for events that occur during the course of an invocation.
3089
- */
3090
- export const zInvocationEventsOutput = z.object({
3091
- invocationEvents: z.optional(z.array(zInvocationEventOutput))
3092
- });
3093
-
3094
- /**
3095
- * RunAgentRequest
3096
- */
3097
- export const zRunAgentRequest = z.object({
3098
- appName: z.string(),
3099
- userId: z.string(),
3100
- sessionId: z.string(),
3101
- newMessage: zContentInput,
3102
- streaming: z.optional(z.boolean()).default(false),
3103
- stateDelta: z.optional(z.union([
3104
- z.record(z.string(), z.unknown()),
3105
- z.null()
3106
- ]))
3107
- });
3108
-
3109
- /**
3110
- * VoiceConfig
3111
- *
3112
- * The configuration for the voice to use.
3113
- */
3114
- export const zVoiceConfig = z.object({
3115
- prebuiltVoiceConfig: z.optional(z.union([
3116
- zPrebuiltVoiceConfig,
3117
- z.null()
3118
- ]))
3119
- });
3120
-
3121
- /**
3122
- * SpeakerVoiceConfig
3123
- *
3124
- * The configuration for the speaker to use.
3125
- */
3126
- export const zSpeakerVoiceConfigInput = z.object({
3127
- speaker: z.optional(z.union([
3128
- z.string(),
3129
- z.null()
3130
- ])),
3131
- voiceConfig: z.optional(z.union([
3132
- zVoiceConfig,
3133
- z.null()
3134
- ]))
3135
- });
3136
-
3137
- /**
3138
- * MultiSpeakerVoiceConfig
3139
- *
3140
- * The configuration for the multi-speaker setup.
3141
- */
3142
- export const zMultiSpeakerVoiceConfigInput = z.object({
3143
- speakerVoiceConfigs: z.optional(z.union([
3144
- z.array(zSpeakerVoiceConfigInput),
3145
- z.null()
3146
- ]))
3147
- });
3148
-
3149
- /**
3150
- * SpeakerVoiceConfig
3151
- *
3152
- * The configuration for the speaker to use.
3153
- */
3154
- export const zSpeakerVoiceConfigOutput = z.object({
3155
- speaker: z.optional(z.union([
3156
- z.string(),
3157
- z.null()
3158
- ])),
3159
- voiceConfig: z.optional(z.union([
3160
- zVoiceConfig,
3161
- z.null()
3162
- ]))
3163
- });
3164
-
3165
- /**
3166
- * MultiSpeakerVoiceConfig
3167
- *
3168
- * The configuration for the multi-speaker setup.
3169
- */
3170
- export const zMultiSpeakerVoiceConfigOutput = z.object({
3171
- speakerVoiceConfigs: z.optional(z.union([
3172
- z.array(zSpeakerVoiceConfigOutput),
3173
- z.null()
3174
- ]))
3175
- });
3176
-
3177
- /**
3178
- * SpeechConfig
3179
- *
3180
- * The speech generation configuration.
3181
- */
3182
- export const zSpeechConfigInput = z.object({
3183
- voiceConfig: z.optional(z.union([
3184
- zVoiceConfig,
3185
- z.null()
3186
- ])),
3187
- multiSpeakerVoiceConfig: z.optional(z.union([
3188
- zMultiSpeakerVoiceConfigInput,
3189
- z.null()
3190
- ])),
3191
- languageCode: z.optional(z.union([
3192
- z.string(),
3193
- z.null()
3194
- ]))
3195
- });
3196
-
3197
- /**
3198
- * SpeechConfig
3199
- *
3200
- * The speech generation configuration.
3201
- */
3202
- export const zSpeechConfigOutput = z.object({
3203
- voiceConfig: z.optional(z.union([
3204
- zVoiceConfig,
3205
- z.null()
3206
- ])),
3207
- multiSpeakerVoiceConfig: z.optional(z.union([
3208
- zMultiSpeakerVoiceConfigOutput,
3209
- z.null()
3210
- ])),
3211
- languageCode: z.optional(z.union([
3212
- z.string(),
3213
- z.null()
3214
- ]))
3215
- });
3216
-
3217
- /**
3218
- * AuthConfig
3219
- *
3220
- * The auth config sent by tool asking client to collect auth credentials and
3221
- *
3222
- * adk and client will help to fill in the response
3223
- */
3224
- export const zGoogleAdkAuthAuthToolAuthConfigInput = z.object({
3225
- authScheme: z.union([
3226
- zApiKey,
3227
- zHttpBase,
3228
- zOAuth2Input,
3229
- zOpenIdConnect,
3230
- zHttpBearer,
3231
- zOpenIdConnectWithConfig
3232
- ]),
3233
- rawAuthCredential: z.optional(z.union([
3234
- zAuthCredentialInput,
3235
- z.null()
3236
- ])),
3237
- exchangedAuthCredential: z.optional(z.union([
3238
- zAuthCredentialInput,
3239
- z.null()
3240
- ])),
3241
- credentialKey: z.optional(z.union([
3242
- z.string(),
3243
- z.null()
3244
- ]))
3245
- });
3246
-
3247
- /**
3248
- * EventActions
3249
- *
3250
- * Represents the actions attached to an event.
3251
- */
3252
- export const zEventActionsInput = z.object({
3253
- skipSummarization: z.optional(z.union([
3254
- z.boolean(),
3255
- z.null()
3256
- ])),
3257
- stateDelta: z.optional(z.record(z.string(), z.unknown())),
3258
- artifactDelta: z.optional(z.record(z.string(), z.int())),
3259
- transferToAgent: z.optional(z.union([
3260
- z.string(),
3261
- z.null()
3262
- ])),
3263
- escalate: z.optional(z.union([
3264
- z.boolean(),
3265
- z.null()
3266
- ])),
3267
- requestedAuthConfigs: z.optional(z.record(z.string(), zGoogleAdkAuthAuthToolAuthConfigInput)),
3268
- requestedToolConfirmations: z.optional(z.record(z.string(), zToolConfirmation)),
3269
- compaction: z.optional(z.union([
3270
- zEventCompactionInput,
3271
- z.null()
3272
- ]))
3273
- });
3274
-
3275
- /**
3276
- * Event
3277
- *
3278
- * Represents an event in a conversation between agents and users.
3279
- *
3280
- * It is used to store the content of the conversation, as well as the actions
3281
- * taken by the agents like function calls, etc.
3282
- */
3283
- export const zEventInput = z.object({
3284
- content: z.optional(z.union([
3285
- zContentInput,
3286
- z.null()
3287
- ])),
3288
- groundingMetadata: z.optional(z.union([
3289
- zGroundingMetadataInput,
3290
- z.null()
3291
- ])),
3292
- partial: z.optional(z.union([
3293
- z.boolean(),
3294
- z.null()
3295
- ])),
3296
- turnComplete: z.optional(z.union([
3297
- z.boolean(),
3298
- z.null()
3299
- ])),
3300
- finishReason: z.optional(z.union([
3301
- zFinishReason,
3302
- z.null()
3303
- ])),
3304
- errorCode: z.optional(z.union([
3305
- z.string(),
3306
- z.null()
3307
- ])),
3308
- errorMessage: z.optional(z.union([
3309
- z.string(),
3310
- z.null()
3311
- ])),
3312
- interrupted: z.optional(z.union([
3313
- z.boolean(),
3314
- z.null()
3315
- ])),
3316
- customMetadata: z.optional(z.union([
3317
- z.record(z.string(), z.unknown()),
3318
- z.null()
3319
- ])),
3320
- usageMetadata: z.optional(z.union([
3321
- zGenerateContentResponseUsageMetadataInput,
3322
- z.null()
3323
- ])),
3324
- liveSessionResumptionUpdate: z.optional(z.union([
3325
- zLiveServerSessionResumptionUpdate,
3326
- z.null()
3327
- ])),
3328
- inputTranscription: z.optional(z.union([
3329
- zTranscription,
3330
- z.null()
3331
- ])),
3332
- outputTranscription: z.optional(z.union([
3333
- zTranscription,
3334
- z.null()
3335
- ])),
3336
- avgLogprobs: z.optional(z.union([
3337
- z.number(),
3338
- z.null()
3339
- ])),
3340
- logprobsResult: z.optional(z.union([
3341
- zLogprobsResultInput,
3342
- z.null()
3343
- ])),
3344
- cacheMetadata: z.optional(z.union([
3345
- zCacheMetadata,
3346
- z.null()
3347
- ])),
3348
- invocationId: z.optional(z.string()).default(''),
3349
- author: z.string(),
3350
- actions: z.optional(zEventActionsInput),
3351
- longRunningToolIds: z.optional(z.union([
3352
- z.array(z.string()),
3353
- z.null()
3354
- ])),
3355
- branch: z.optional(z.union([
3356
- z.string(),
3357
- z.null()
3358
- ])),
3359
- id: z.optional(z.string()).default(''),
3360
- timestamp: z.optional(z.number())
3361
- });
3362
-
3363
- /**
3364
- * CreateSessionRequest
3365
- */
3366
- export const zCreateSessionRequest = z.object({
3367
- sessionId: z.optional(z.union([
3368
- z.string(),
3369
- z.null()
3370
- ])),
3371
- state: z.optional(z.union([
3372
- z.record(z.string(), z.unknown()),
3373
- z.null()
3374
- ])),
3375
- events: z.optional(z.union([
3376
- z.array(zEventInput),
3377
- z.null()
3378
- ]))
3379
- });
3380
-
3381
- /**
3382
- * AuthConfig
3383
- *
3384
- * The auth config sent by tool asking client to collect auth credentials and
3385
- *
3386
- * adk and client will help to fill in the response
3387
- */
3388
- export const zGoogleAdkAuthAuthToolAuthConfigOutput = z.object({
3389
- authScheme: z.union([
3390
- zApiKey,
3391
- zHttpBase,
3392
- zOAuth2Output,
3393
- zOpenIdConnect,
3394
- zHttpBearer,
3395
- zOpenIdConnectWithConfig
3396
- ]),
3397
- rawAuthCredential: z.optional(z.union([
3398
- zAuthCredentialOutput,
3399
- z.null()
3400
- ])),
3401
- exchangedAuthCredential: z.optional(z.union([
3402
- zAuthCredentialOutput,
3403
- z.null()
3404
- ])),
3405
- credentialKey: z.optional(z.union([
3406
- z.string(),
3407
- z.null()
3408
- ]))
3409
- });
3410
-
3411
- /**
3412
- * EventActions
3413
- *
3414
- * Represents the actions attached to an event.
3415
- */
3416
- export const zEventActionsOutput = z.object({
3417
- skipSummarization: z.optional(z.union([
3418
- z.boolean(),
3419
- z.null()
3420
- ])),
3421
- stateDelta: z.optional(z.record(z.string(), z.unknown())),
3422
- artifactDelta: z.optional(z.record(z.string(), z.int())),
3423
- transferToAgent: z.optional(z.union([
3424
- z.string(),
3425
- z.null()
3426
- ])),
3427
- escalate: z.optional(z.union([
3428
- z.boolean(),
3429
- z.null()
3430
- ])),
3431
- requestedAuthConfigs: z.optional(z.record(z.string(), zGoogleAdkAuthAuthToolAuthConfigOutput)),
3432
- requestedToolConfirmations: z.optional(z.record(z.string(), zToolConfirmation)),
3433
- compaction: z.optional(z.union([
3434
- zEventCompactionOutput,
3435
- z.null()
3436
- ]))
3437
- });
3438
-
3439
- /**
3440
- * Event
3441
- *
3442
- * Represents an event in a conversation between agents and users.
3443
- *
3444
- * It is used to store the content of the conversation, as well as the actions
3445
- * taken by the agents like function calls, etc.
3446
- */
3447
- export const zEventOutput = z.object({
3448
- content: z.optional(z.union([
3449
- zContentOutput,
3450
- z.null()
3451
- ])),
3452
- groundingMetadata: z.optional(z.union([
3453
- zGroundingMetadataOutput,
3454
- z.null()
3455
- ])),
3456
- partial: z.optional(z.union([
3457
- z.boolean(),
3458
- z.null()
3459
- ])),
3460
- turnComplete: z.optional(z.union([
3461
- z.boolean(),
3462
- z.null()
3463
- ])),
3464
- finishReason: z.optional(z.union([
3465
- zFinishReason,
3466
- z.null()
3467
- ])),
3468
- errorCode: z.optional(z.union([
3469
- z.string(),
3470
- z.null()
3471
- ])),
3472
- errorMessage: z.optional(z.union([
3473
- z.string(),
3474
- z.null()
3475
- ])),
3476
- interrupted: z.optional(z.union([
3477
- z.boolean(),
3478
- z.null()
3479
- ])),
3480
- customMetadata: z.optional(z.union([
3481
- z.record(z.string(), z.unknown()),
3482
- z.null()
3483
- ])),
3484
- usageMetadata: z.optional(z.union([
3485
- zGenerateContentResponseUsageMetadataOutput,
3486
- z.null()
3487
- ])),
3488
- liveSessionResumptionUpdate: z.optional(z.union([
3489
- zLiveServerSessionResumptionUpdate,
3490
- z.null()
3491
- ])),
3492
- inputTranscription: z.optional(z.union([
3493
- zTranscription,
3494
- z.null()
3495
- ])),
3496
- outputTranscription: z.optional(z.union([
3497
- zTranscription,
3498
- z.null()
3499
- ])),
3500
- avgLogprobs: z.optional(z.union([
3501
- z.number(),
3502
- z.null()
3503
- ])),
3504
- logprobsResult: z.optional(z.union([
3505
- zLogprobsResultOutput,
3506
- z.null()
3507
- ])),
3508
- cacheMetadata: z.optional(z.union([
3509
- zCacheMetadata,
3510
- z.null()
3511
- ])),
3512
- invocationId: z.optional(z.string()).default(''),
3513
- author: z.string(),
3514
- actions: z.optional(zEventActionsOutput),
3515
- longRunningToolIds: z.optional(z.union([
3516
- z.array(z.string()),
3517
- z.null()
3518
- ])),
3519
- branch: z.optional(z.union([
3520
- z.string(),
3521
- z.null()
3522
- ])),
3523
- id: z.optional(z.string()).default(''),
3524
- timestamp: z.optional(z.number())
3525
- });
3526
-
3527
- /**
3528
- * Session
3529
- *
3530
- * Represents a series of interactions between a user and agents.
3531
- */
3532
- export const zSession = z.object({
3533
- id: z.string(),
3534
- appName: z.string(),
3535
- userId: z.string(),
3536
- state: z.optional(z.record(z.string(), z.unknown())),
3537
- events: z.optional(z.array(zEventOutput)),
3538
- lastUpdateTime: z.optional(z.number()).default(0)
3539
- });
3540
-
3541
- /**
3542
- * Interval
3543
- *
3544
- * Represents a range of numeric values, e.g. [0 ,1] or (2,3) or [-1, 6).
3545
- */
3546
- export const zGoogleAdkEvaluationEvalMetricsInterval = z.object({
3547
- minValue: z.number(),
3548
- openAtMin: z.optional(z.boolean()).default(false),
3549
- maxValue: z.number(),
3550
- openAtMax: z.optional(z.boolean()).default(false)
3551
- });
3552
-
3553
- /**
3554
- * MetricValueInfo
3555
- *
3556
- * Information about the type of metric value.
3557
- */
3558
- export const zMetricValueInfo = z.object({
3559
- interval: z.optional(z.union([
3560
- zGoogleAdkEvaluationEvalMetricsInterval,
3561
- z.null()
3562
- ]))
3563
- });
3564
-
3565
- /**
3566
- * MetricInfo
3567
- *
3568
- * Information about the metric that are used for Evals.
3569
- */
3570
- export const zMetricInfo = z.object({
3571
- metricName: z.string(),
3572
- description: z.optional(z.string()),
3573
- metricValueInfo: zMetricValueInfo
3574
- });
3575
-
3576
- /**
3577
- * ListMetricsInfoResponse
3578
- */
3579
- export const zListMetricsInfoResponse = z.object({
3580
- metricsInfo: z.array(zMetricInfo)
3581
- });
3582
-
3583
- /**
3584
- * AuthConfig
3585
- *
3586
- * Auth configuration to run the extension.
3587
- */
3588
- export const zGoogleGenaiTypesAuthConfig = z.object({
3589
- apiKeyConfig: z.optional(z.union([
3590
- zApiKeyConfig,
3591
- z.null()
3592
- ])),
3593
- authType: z.optional(z.union([
3594
- zAuthType,
3595
- z.null()
3596
- ])),
3597
- googleServiceAccountConfig: z.optional(z.union([
3598
- zAuthConfigGoogleServiceAccountConfig,
3599
- z.null()
3600
- ])),
3601
- httpBasicAuthConfig: z.optional(z.union([
3602
- zAuthConfigHttpBasicAuthConfig,
3603
- z.null()
3604
- ])),
3605
- oauthConfig: z.optional(z.union([
3606
- zAuthConfigOauthConfig,
3607
- z.null()
3608
- ])),
3609
- oidcConfig: z.optional(z.union([
3610
- zAuthConfigOidcConfig,
3611
- z.null()
3612
- ]))
3613
- });
3614
-
3615
- /**
3616
- * GoogleMaps
3617
- *
3618
- * Tool to support Google Maps in Model.
3619
- */
3620
- export const zGoogleMapsInput = z.object({
3621
- authConfig: z.optional(z.union([
3622
- zGoogleGenaiTypesAuthConfig,
3623
- z.null()
3624
- ]))
3625
- });
3626
-
3627
- /**
3628
- * GoogleMaps
3629
- *
3630
- * Tool to support Google Maps in Model.
3631
- */
3632
- export const zGoogleMapsOutput = z.object({
3633
- authConfig: z.optional(z.union([
3634
- zGoogleGenaiTypesAuthConfig,
3635
- z.null()
3636
- ]))
3637
- });
3638
-
3639
- /**
3640
- * Interval
3641
- *
3642
- * Represents a time interval, encoded as a start time (inclusive) and an end time (exclusive).
3643
- *
3644
- * The start time must be less than or equal to the end time.
3645
- * When the start equals the end time, the interval is an empty interval.
3646
- * (matches no time)
3647
- * When both start and end are unspecified, the interval matches any time.
3648
- */
3649
- export const zGoogleGenaiTypesInterval = z.object({
3650
- startTime: z.optional(z.union([
3651
- z.iso.datetime(),
3652
- z.null()
3653
- ])),
3654
- endTime: z.optional(z.union([
3655
- z.iso.datetime(),
3656
- z.null()
3657
- ]))
3658
- });
3659
-
3660
- /**
3661
- * GoogleSearch
3662
- *
3663
- * Tool to support Google Search in Model. Powered by Google.
3664
- */
3665
- export const zGoogleSearchOutput = z.object({
3666
- timeRangeFilter: z.optional(z.union([
3667
- zGoogleGenaiTypesInterval,
3668
- z.null()
3669
- ]))
3670
- });
3671
-
3672
- /**
3673
- * Tool
3674
- *
3675
- * Tool details of a tool that the model may use to generate a response.
3676
- */
3677
- export const zGoogleGenaiTypesToolInput = z.object({
3678
- functionDeclarations: z.optional(z.union([
3679
- z.array(zFunctionDeclarationInput),
3680
- z.null()
3681
- ])),
3682
- retrieval: z.optional(z.union([
3683
- zRetrievalInput,
3684
- z.null()
3685
- ])),
3686
- googleSearch: z.optional(z.union([
3687
- zGoogleSearchInput,
3688
- z.null()
3689
- ])),
3690
- googleSearchRetrieval: z.optional(z.union([
3691
- zGoogleSearchRetrievalInput,
3692
- z.null()
3693
- ])),
3694
- enterpriseWebSearch: z.optional(z.union([
3695
- zEnterpriseWebSearch,
3696
- z.null()
3697
- ])),
3698
- googleMaps: z.optional(z.union([
3699
- zGoogleMapsInput,
3700
- z.null()
3701
- ])),
3702
- urlContext: z.optional(z.union([
3703
- zUrlContext,
3704
- z.null()
3705
- ])),
3706
- codeExecution: z.optional(z.union([
3707
- zToolCodeExecution,
3708
- z.null()
3709
- ]))
3710
- });
3711
-
3712
- /**
3713
- * Tool
3714
- *
3715
- * Tool details of a tool that the model may use to generate a response.
3716
- */
3717
- export const zGoogleGenaiTypesToolOutput = z.object({
3718
- functionDeclarations: z.optional(z.union([
3719
- z.array(zFunctionDeclarationOutput),
3720
- z.null()
3721
- ])),
3722
- retrieval: z.optional(z.union([
3723
- zRetrievalOutput,
3724
- z.null()
3725
- ])),
3726
- googleSearch: z.optional(z.union([
3727
- zGoogleSearchOutput,
3728
- z.null()
3729
- ])),
3730
- googleSearchRetrieval: z.optional(z.union([
3731
- zGoogleSearchRetrievalOutput,
3732
- z.null()
3733
- ])),
3734
- enterpriseWebSearch: z.optional(z.union([
3735
- zEnterpriseWebSearch,
3736
- z.null()
3737
- ])),
3738
- googleMaps: z.optional(z.union([
3739
- zGoogleMapsOutput,
3740
- z.null()
3741
- ])),
3742
- urlContext: z.optional(z.union([
3743
- zUrlContext,
3744
- z.null()
3745
- ])),
3746
- codeExecution: z.optional(z.union([
3747
- zToolCodeExecution,
3748
- z.null()
3749
- ]))
3750
- });
3751
-
3752
- /**
3753
- * Tool
3754
- *
3755
- * Definition for a tool the client can call.
3756
- */
3757
- export const zMcpTypesTool = z.object({
3758
- name: z.string(),
3759
- description: z.optional(z.union([
3760
- z.string(),
3761
- z.null()
3762
- ])),
3763
- inputSchema: z.record(z.string(), z.unknown()),
3764
- annotations: z.optional(z.union([
3765
- zToolAnnotations,
3766
- z.null()
3767
- ]))
3768
- });
3769
-
3770
- /**
3771
- * AgentDetails
3772
- *
3773
- * Details about the individual agent in the App.
3774
- *
3775
- * This could be a root agent or the sub-agents in the Agent Tree.
3776
- */
3777
- export const zAgentDetailsInput = z.object({
3778
- name: z.string(),
3779
- instructions: z.optional(z.string()).default(''),
3780
- toolDeclarations: z.optional(z.array(z.union([zGoogleGenaiTypesToolInput, zMcpTypesTool])))
3781
- });
3782
-
3783
- /**
3784
- * AgentDetails
3785
- *
3786
- * Details about the individual agent in the App.
3787
- *
3788
- * This could be a root agent or the sub-agents in the Agent Tree.
3789
- */
3790
- export const zAgentDetailsOutput = z.object({
3791
- name: z.string(),
3792
- instructions: z.optional(z.string()).default(''),
3793
- toolDeclarations: z.optional(z.array(z.union([zGoogleGenaiTypesToolOutput, zMcpTypesTool])))
3794
- });
3795
-
3796
- /**
3797
- * AppDetails
3798
- *
3799
- * Contains details about the App (the agentic system).
3800
- *
3801
- * This structure is only a projection of the acutal app. Only details
3802
- * that are relevant to the Eval System are captured here.
3803
- */
3804
- export const zAppDetailsInput = z.object({
3805
- agentDetails: z.optional(z.record(z.string(), zAgentDetailsInput))
3806
- });
3807
-
3808
- /**
3809
- * AppDetails
3810
- *
3811
- * Contains details about the App (the agentic system).
3812
- *
3813
- * This structure is only a projection of the acutal app. Only details
3814
- * that are relevant to the Eval System are captured here.
3815
- */
3816
- export const zAppDetailsOutput = z.object({
3817
- agentDetails: z.optional(z.record(z.string(), zAgentDetailsOutput))
3818
- });
3819
-
3820
- /**
3821
- * GenerateContentConfig
3822
- *
3823
- * Optional model configuration parameters.
3824
- *
3825
- * For more information, see `Content generation parameters
3826
- * <https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters>`_.
3827
- */
3828
- export const zGenerateContentConfigInput = z.object({
3829
- httpOptions: z.optional(z.union([
3830
- zHttpOptions,
3831
- z.null()
3832
- ])),
3833
- systemInstruction: z.optional(z.union([
3834
- zContentInput,
3835
- z.array(z.union([
3836
- zFile,
3837
- zPartInput,
3838
- z.string()
3839
- ])),
3840
- zFile,
3841
- zPartInput,
3842
- z.string(),
3843
- z.null()
3844
- ])),
3845
- temperature: z.optional(z.union([
3846
- z.number(),
3847
- z.null()
3848
- ])),
3849
- topP: z.optional(z.union([
3850
- z.number(),
3851
- z.null()
3852
- ])),
3853
- topK: z.optional(z.union([
3854
- z.number(),
3855
- z.null()
3856
- ])),
3857
- candidateCount: z.optional(z.union([
3858
- z.int(),
3859
- z.null()
3860
- ])),
3861
- maxOutputTokens: z.optional(z.union([
3862
- z.int(),
3863
- z.null()
3864
- ])),
3865
- stopSequences: z.optional(z.union([
3866
- z.array(z.string()),
3867
- z.null()
3868
- ])),
3869
- responseLogprobs: z.optional(z.union([
3870
- z.boolean(),
3871
- z.null()
3872
- ])),
3873
- logprobs: z.optional(z.union([
3874
- z.int(),
3875
- z.null()
3876
- ])),
3877
- presencePenalty: z.optional(z.union([
3878
- z.number(),
3879
- z.null()
3880
- ])),
3881
- frequencyPenalty: z.optional(z.union([
3882
- z.number(),
3883
- z.null()
3884
- ])),
3885
- seed: z.optional(z.union([
3886
- z.int(),
3887
- z.null()
3888
- ])),
3889
- responseMimeType: z.optional(z.union([
3890
- z.string(),
3891
- z.null()
3892
- ])),
3893
- responseSchema: z.optional(z.union([
3894
- z.record(z.string(), z.unknown()),
3895
- zSchemaInput,
3896
- z.null()
3897
- ])),
3898
- responseJsonSchema: z.optional(z.union([
3899
- z.unknown(),
3900
- z.null()
3901
- ])),
3902
- routingConfig: z.optional(z.union([
3903
- zGenerationConfigRoutingConfig,
3904
- z.null()
3905
- ])),
3906
- modelSelectionConfig: z.optional(z.union([
3907
- zModelSelectionConfig,
3908
- z.null()
3909
- ])),
3910
- safetySettings: z.optional(z.union([
3911
- z.array(zSafetySetting),
3912
- z.null()
3913
- ])),
3914
- tools: z.optional(z.union([
3915
- z.array(z.union([zGoogleGenaiTypesToolInput, zMcpTypesTool])),
3916
- z.null()
3917
- ])),
3918
- toolConfig: z.optional(z.union([
3919
- zToolConfigInput,
3920
- z.null()
3921
- ])),
3922
- labels: z.optional(z.union([
3923
- z.record(z.string(), z.string()),
3924
- z.null()
3925
- ])),
3926
- cachedContent: z.optional(z.union([
3927
- z.string(),
3928
- z.null()
3929
- ])),
3930
- responseModalities: z.optional(z.union([
3931
- z.array(z.string()),
3932
- z.null()
3933
- ])),
3934
- mediaResolution: z.optional(z.union([
3935
- zMediaResolution,
3936
- z.null()
3937
- ])),
3938
- speechConfig: z.optional(z.union([
3939
- zSpeechConfigInput,
3940
- z.string(),
3941
- z.null()
3942
- ])),
3943
- audioTimestamp: z.optional(z.union([
3944
- z.boolean(),
3945
- z.null()
3946
- ])),
3947
- automaticFunctionCalling: z.optional(z.union([
3948
- zAutomaticFunctionCallingConfig,
3949
- z.null()
3950
- ])),
3951
- thinkingConfig: z.optional(z.union([
3952
- zThinkingConfig,
3953
- z.null()
3954
- ]))
3955
- });
3956
-
3957
- /**
3958
- * GenerateContentConfig
3959
- *
3960
- * Optional model configuration parameters.
3961
- *
3962
- * For more information, see `Content generation parameters
3963
- * <https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters>`_.
3964
- */
3965
- export const zGenerateContentConfigOutput = z.object({
3966
- httpOptions: z.optional(z.union([
3967
- zHttpOptions,
3968
- z.null()
3969
- ])),
3970
- systemInstruction: z.optional(z.union([
3971
- zContentOutput,
3972
- z.array(z.union([
3973
- zFile,
3974
- zPartOutput,
3975
- z.string()
3976
- ])),
3977
- zFile,
3978
- zPartOutput,
3979
- z.string(),
3980
- z.null()
3981
- ])),
3982
- temperature: z.optional(z.union([
3983
- z.number(),
3984
- z.null()
3985
- ])),
3986
- topP: z.optional(z.union([
3987
- z.number(),
3988
- z.null()
3989
- ])),
3990
- topK: z.optional(z.union([
3991
- z.number(),
3992
- z.null()
3993
- ])),
3994
- candidateCount: z.optional(z.union([
3995
- z.int(),
3996
- z.null()
3997
- ])),
3998
- maxOutputTokens: z.optional(z.union([
3999
- z.int(),
4000
- z.null()
4001
- ])),
4002
- stopSequences: z.optional(z.union([
4003
- z.array(z.string()),
4004
- z.null()
4005
- ])),
4006
- responseLogprobs: z.optional(z.union([
4007
- z.boolean(),
4008
- z.null()
4009
- ])),
4010
- logprobs: z.optional(z.union([
4011
- z.int(),
4012
- z.null()
4013
- ])),
4014
- presencePenalty: z.optional(z.union([
4015
- z.number(),
4016
- z.null()
4017
- ])),
4018
- frequencyPenalty: z.optional(z.union([
4019
- z.number(),
4020
- z.null()
4021
- ])),
4022
- seed: z.optional(z.union([
4023
- z.int(),
4024
- z.null()
4025
- ])),
4026
- responseMimeType: z.optional(z.union([
4027
- z.string(),
4028
- z.null()
4029
- ])),
4030
- responseSchema: z.optional(z.union([
4031
- z.record(z.string(), z.unknown()),
4032
- zSchemaOutput,
4033
- z.null()
4034
- ])),
4035
- responseJsonSchema: z.optional(z.union([
4036
- z.unknown(),
4037
- z.null()
4038
- ])),
4039
- routingConfig: z.optional(z.union([
4040
- zGenerationConfigRoutingConfig,
4041
- z.null()
4042
- ])),
4043
- modelSelectionConfig: z.optional(z.union([
4044
- zModelSelectionConfig,
4045
- z.null()
4046
- ])),
4047
- safetySettings: z.optional(z.union([
4048
- z.array(zSafetySetting),
4049
- z.null()
4050
- ])),
4051
- tools: z.optional(z.union([
4052
- z.array(z.union([zGoogleGenaiTypesToolOutput, zMcpTypesTool])),
4053
- z.null()
4054
- ])),
4055
- toolConfig: z.optional(z.union([
4056
- zToolConfigOutput,
4057
- z.null()
4058
- ])),
4059
- labels: z.optional(z.union([
4060
- z.record(z.string(), z.string()),
4061
- z.null()
4062
- ])),
4063
- cachedContent: z.optional(z.union([
4064
- z.string(),
4065
- z.null()
4066
- ])),
4067
- responseModalities: z.optional(z.union([
4068
- z.array(z.string()),
4069
- z.null()
4070
- ])),
4071
- mediaResolution: z.optional(z.union([
4072
- zMediaResolution,
4073
- z.null()
4074
- ])),
4075
- speechConfig: z.optional(z.union([
4076
- zSpeechConfigOutput,
4077
- z.string(),
4078
- z.null()
4079
- ])),
4080
- audioTimestamp: z.optional(z.union([
4081
- z.boolean(),
4082
- z.null()
4083
- ])),
4084
- automaticFunctionCalling: z.optional(z.union([
4085
- zAutomaticFunctionCallingConfig,
4086
- z.null()
4087
- ])),
4088
- thinkingConfig: z.optional(z.union([
4089
- zThinkingConfig,
4090
- z.null()
4091
- ]))
4092
- });
4093
-
4094
- /**
4095
- * Invocation
4096
- *
4097
- * Represents a single invocation.
4098
- */
4099
- export const zInvocationInput = z.object({
4100
- invocationId: z.optional(z.string()).default(''),
4101
- userContent: zContentInput,
4102
- finalResponse: z.optional(z.union([
4103
- zContentInput,
4104
- z.null()
4105
- ])),
4106
- intermediateData: z.optional(z.union([
4107
- zIntermediateDataInput,
4108
- zInvocationEventsInput,
4109
- z.null()
4110
- ])),
4111
- creationTimestamp: z.optional(z.number()).default(0),
4112
- rubrics: z.optional(z.union([
4113
- z.array(zRubric),
4114
- z.null()
4115
- ])),
4116
- appDetails: z.optional(z.union([
4117
- zAppDetailsInput,
4118
- z.null()
4119
- ]))
4120
- });
4121
-
4122
- /**
4123
- * EvalCase
4124
- *
4125
- * An eval case.
4126
- */
4127
- export const zEvalCaseInput = z.object({
4128
- evalId: z.string(),
4129
- conversation: z.array(zInvocationInput),
4130
- sessionInput: z.optional(z.union([
4131
- zSessionInput,
4132
- z.null()
4133
- ])),
4134
- creationTimestamp: z.optional(z.number()).default(0),
4135
- rubrics: z.optional(z.union([
4136
- z.array(zRubric),
4137
- z.null()
4138
- ]))
4139
- });
4140
-
4141
- /**
4142
- * EvalSet
4143
- *
4144
- * A set of eval cases.
4145
- */
4146
- export const zEvalSetInput = z.object({
4147
- eval_set_id: z.string(),
4148
- name: z.optional(z.union([
4149
- z.string(),
4150
- z.null()
4151
- ])),
4152
- description: z.optional(z.union([
4153
- z.string(),
4154
- z.null()
4155
- ])),
4156
- eval_cases: z.array(zEvalCaseInput),
4157
- creation_timestamp: z.optional(z.number()).default(0)
4158
- });
4159
-
4160
- /**
4161
- * CreateEvalSetRequest
4162
- */
4163
- export const zCreateEvalSetRequest = z.object({
4164
- evalSet: zEvalSetInput
4165
- });
4166
-
4167
- /**
4168
- * Invocation
4169
- *
4170
- * Represents a single invocation.
4171
- */
4172
- export const zInvocationOutput = z.object({
4173
- invocationId: z.optional(z.string()).default(''),
4174
- userContent: zContentOutput,
4175
- finalResponse: z.optional(z.union([
4176
- zContentOutput,
4177
- z.null()
4178
- ])),
4179
- intermediateData: z.optional(z.union([
4180
- zIntermediateDataOutput,
4181
- zInvocationEventsOutput,
4182
- z.null()
4183
- ])),
4184
- creationTimestamp: z.optional(z.number()).default(0),
4185
- rubrics: z.optional(z.union([
4186
- z.array(zRubric),
4187
- z.null()
4188
- ])),
4189
- appDetails: z.optional(z.union([
4190
- zAppDetailsOutput,
4191
- z.null()
4192
- ]))
4193
- });
4194
-
4195
- /**
4196
- * EvalCase
4197
- *
4198
- * An eval case.
4199
- */
4200
- export const zEvalCaseOutput = z.object({
4201
- evalId: z.string(),
4202
- conversation: z.array(zInvocationOutput),
4203
- sessionInput: z.optional(z.union([
4204
- zSessionInput,
4205
- z.null()
4206
- ])),
4207
- creationTimestamp: z.optional(z.number()).default(0),
4208
- rubrics: z.optional(z.union([
4209
- z.array(zRubric),
4210
- z.null()
4211
- ]))
4212
- });
4213
-
4214
- /**
4215
- * EvalSet
4216
- *
4217
- * A set of eval cases.
4218
- */
4219
- export const zEvalSetOutput = z.object({
4220
- eval_set_id: z.string(),
4221
- name: z.optional(z.union([
4222
- z.string(),
4223
- z.null()
4224
- ])),
4225
- description: z.optional(z.union([
4226
- z.string(),
4227
- z.null()
4228
- ])),
4229
- eval_cases: z.array(zEvalCaseOutput),
4230
- creation_timestamp: z.optional(z.number()).default(0)
4231
- });
4232
-
4233
- /**
4234
- * JudgeModelOptions
4235
- *
4236
- * Options for an eval metric's judge model.
4237
- */
4238
- export const zJudgeModelOptionsInput = z.object({
4239
- judgeModel: z.optional(z.string()).default('gemini-2.5-flash'),
4240
- judgeModelConfig: z.optional(z.union([
4241
- zGenerateContentConfigInput,
4242
- z.null()
4243
- ])),
4244
- numSamples: z.optional(z.int()).default(5)
4245
- });
4246
-
4247
- /**
4248
- * EvalMetric
4249
- *
4250
- * A metric used to evaluate a particular aspect of an eval case.
4251
- */
4252
- export const zEvalMetricInput = z.object({
4253
- metricName: z.string(),
4254
- threshold: z.number(),
4255
- judgeModelOptions: z.optional(z.union([
4256
- zJudgeModelOptionsInput,
4257
- z.null()
4258
- ])),
4259
- criterion: z.optional(z.union([
4260
- zBaseCriterion,
4261
- z.null()
4262
- ]))
4263
- });
4264
-
4265
- /**
4266
- * JudgeModelOptions
4267
- *
4268
- * Options for an eval metric's judge model.
4269
- */
4270
- export const zJudgeModelOptionsOutput = z.object({
4271
- judgeModel: z.optional(z.string()).default('gemini-2.5-flash'),
4272
- judgeModelConfig: z.optional(z.union([
4273
- zGenerateContentConfigOutput,
4274
- z.null()
4275
- ])),
4276
- numSamples: z.optional(z.int()).default(5)
4277
- });
4278
-
4279
- /**
4280
- * EvalMetric
4281
- *
4282
- * A metric used to evaluate a particular aspect of an eval case.
4283
- */
4284
- export const zEvalMetricOutput = z.object({
4285
- metricName: z.string(),
4286
- threshold: z.number(),
4287
- judgeModelOptions: z.optional(z.union([
4288
- zJudgeModelOptionsOutput,
4289
- z.null()
4290
- ])),
4291
- criterion: z.optional(z.union([
4292
- zBaseCriterion,
4293
- z.null()
4294
- ]))
4295
- });
4296
-
4297
- /**
4298
- * EvalMetricResult
4299
- *
4300
- * The actual computed score/value of a particular EvalMetric.
4301
- */
4302
- export const zEvalMetricResult = z.object({
4303
- metricName: z.string(),
4304
- threshold: z.number(),
4305
- judgeModelOptions: z.optional(z.union([
4306
- zJudgeModelOptionsOutput,
4307
- z.null()
4308
- ])),
4309
- criterion: z.optional(z.union([
4310
- zBaseCriterion,
4311
- z.null()
4312
- ])),
4313
- score: z.optional(z.union([
4314
- z.number(),
4315
- z.null()
4316
- ])),
4317
- evalStatus: zEvalStatus,
4318
- details: z.optional(zEvalMetricResultDetails)
4319
- });
4320
-
4321
- /**
4322
- * EvalMetricResultPerInvocation
4323
- *
4324
- * Eval metric results per invocation.
4325
- */
4326
- export const zEvalMetricResultPerInvocation = z.object({
4327
- actualInvocation: zInvocationOutput,
4328
- expectedInvocation: zInvocationOutput,
4329
- evalMetricResults: z.optional(z.array(zEvalMetricResult)).default([])
4330
- });
4331
-
4332
- /**
4333
- * EvalCaseResult
4334
- *
4335
- * Case level evaluation results.
4336
- */
4337
- export const zEvalCaseResult = z.object({
4338
- evalSetFile: z.optional(z.union([
4339
- z.string(),
4340
- z.null()
4341
- ])),
4342
- evalSetId: z.optional(z.string()).default(''),
4343
- evalId: z.optional(z.string()).default(''),
4344
- finalEvalStatus: zEvalStatus,
4345
- evalMetricResults: z.optional(z.union([
4346
- z.array(z.tuple([zEvalMetricOutput, zEvalMetricResult])),
4347
- z.null()
4348
- ])),
4349
- overallEvalMetricResults: z.array(zEvalMetricResult),
4350
- evalMetricResultPerInvocation: z.array(zEvalMetricResultPerInvocation),
4351
- sessionId: z.string(),
4352
- sessionDetails: z.optional(z.union([
4353
- zSession,
4354
- z.null()
4355
- ])),
4356
- userId: z.optional(z.union([
4357
- z.string(),
4358
- z.null()
4359
- ]))
4360
- });
4361
-
4362
- /**
4363
- * EvalResult
4364
- *
4365
- * This class has no field intentionally.
4366
- *
4367
- * The goal here is to just give a new name to the class to align with the API
4368
- * endpoint.
4369
- */
4370
- export const zEvalResult = z.object({
4371
- evalSetResultId: z.string(),
4372
- evalSetResultName: z.optional(z.union([
4373
- z.string(),
4374
- z.null()
4375
- ])),
4376
- evalSetId: z.string(),
4377
- evalCaseResults: z.optional(z.array(zEvalCaseResult)),
4378
- creationTimestamp: z.optional(z.number()).default(0)
4379
- });
4380
-
4381
- /**
4382
- * EvalSetResult
4383
- *
4384
- * Eval set level evaluation results.
4385
- */
4386
- export const zEvalSetResult = z.object({
4387
- evalSetResultId: z.string(),
4388
- evalSetResultName: z.optional(z.union([
4389
- z.string(),
4390
- z.null()
4391
- ])),
4392
- evalSetId: z.string(),
4393
- evalCaseResults: z.optional(z.array(zEvalCaseResult)),
4394
- creationTimestamp: z.optional(z.number()).default(0)
4395
- });
4396
-
4397
- /**
4398
- * RunEvalRequest
4399
- */
4400
- export const zRunEvalRequest = z.object({
4401
- evalIds: z.optional(z.array(z.string())),
4402
- evalCaseIds: z.optional(z.array(z.string())),
4403
- evalMetrics: z.array(zEvalMetricInput)
4404
- });
4405
-
4406
- /**
4407
- * RunEvalResult
4408
- */
4409
- export const zRunEvalResult = z.object({
4410
- evalSetFile: z.string(),
4411
- evalSetId: z.string(),
4412
- evalId: z.string(),
4413
- finalEvalStatus: zEvalStatus,
4414
- evalMetricResults: z.optional(z.array(z.tuple([zEvalMetricOutput, zEvalMetricResult]))).default([]),
4415
- overallEvalMetricResults: z.array(zEvalMetricResult),
4416
- evalMetricResultPerInvocation: z.array(zEvalMetricResultPerInvocation),
4417
- userId: z.string(),
4418
- sessionId: z.string()
4419
- });
4420
-
4421
- /**
4422
- * RunEvalResponse
4423
- */
4424
- export const zRunEvalResponse = z.object({
4425
- runEvalResults: z.array(zRunEvalResult)
4426
- });
4427
-
4428
- export const zListAppsData = z.object({
4429
- body: z.optional(z.never()),
4430
- path: z.optional(z.never()),
4431
- query: z.optional(z.never())
4432
- });
4433
-
4434
- /**
4435
- * Response List Apps
4436
- *
4437
- * Successful Response
4438
- */
4439
- export const zListAppsResponse = z.array(z.string());
4440
-
4441
- export const zDebugGetTraceDictData = z.object({
4442
- body: z.optional(z.never()),
4443
- path: z.object({
4444
- event_id: z.string()
4445
- }),
4446
- query: z.optional(z.never())
4447
- });
4448
-
4449
- export const zDebugGetSessionTraceData = z.object({
4450
- body: z.optional(z.never()),
4451
- path: z.object({
4452
- session_id: z.string()
4453
- }),
4454
- query: z.optional(z.never())
4455
- });
4456
-
4457
- export const zDeleteSessionData = z.object({
4458
- body: z.optional(z.never()),
4459
- path: z.object({
4460
- app_name: z.string(),
4461
- user_id: z.string(),
4462
- session_id: z.string()
4463
- }),
4464
- query: z.optional(z.never())
4465
- });
4466
-
4467
- /**
4468
- * Response Delete Session
4469
- *
4470
- * Successful Response
4471
- */
4472
- export const zDeleteSessionResponse = z.null();
4473
-
4474
- export const zGetSessionData = z.object({
4475
- body: z.optional(z.never()),
4476
- path: z.object({
4477
- app_name: z.string(),
4478
- user_id: z.string(),
4479
- session_id: z.string()
4480
- }),
4481
- query: z.optional(z.never())
4482
- });
4483
-
4484
- /**
4485
- * Successful Response
4486
- */
4487
- export const zGetSessionResponse = zSession;
4488
-
4489
- export const zCreateSessionWithIdData = z.object({
4490
- body: z.optional(z.union([
4491
- z.record(z.string(), z.unknown()),
4492
- z.null()
4493
- ])),
4494
- path: z.object({
4495
- app_name: z.string(),
4496
- user_id: z.string(),
4497
- session_id: z.string()
4498
- }),
4499
- query: z.optional(z.never())
4500
- });
4501
-
4502
- /**
4503
- * Successful Response
4504
- */
4505
- export const zCreateSessionWithIdResponse = zSession;
4506
-
4507
- export const zListSessionsData = z.object({
4508
- body: z.optional(z.never()),
4509
- path: z.object({
4510
- app_name: z.string(),
4511
- user_id: z.string()
4512
- }),
4513
- query: z.optional(z.never())
4514
- });
4515
-
4516
- /**
4517
- * Response List Sessions
4518
- *
4519
- * Successful Response
4520
- */
4521
- export const zListSessionsResponse = z.array(zSession);
4522
-
4523
- export const zCreateSessionData = z.object({
4524
- body: z.optional(z.union([
4525
- zCreateSessionRequest,
4526
- z.null()
4527
- ])),
4528
- path: z.object({
4529
- app_name: z.string(),
4530
- user_id: z.string()
4531
- }),
4532
- query: z.optional(z.never())
4533
- });
4534
-
4535
- /**
4536
- * Successful Response
4537
- */
4538
- export const zCreateSessionResponse = zSession;
4539
-
4540
- export const zEvaluationListEvalSetsData = z.object({
4541
- body: z.optional(z.never()),
4542
- path: z.object({
4543
- app_name: z.string()
4544
- }),
4545
- query: z.optional(z.never())
4546
- });
4547
-
4548
- /**
4549
- * Successful Response
4550
- */
4551
- export const zEvaluationListEvalSetsResponse = zListEvalSetsResponse;
4552
-
4553
- export const zEvaluationCreateEvalSetData = z.object({
4554
- body: zCreateEvalSetRequest,
4555
- path: z.object({
4556
- app_name: z.string()
4557
- }),
4558
- query: z.optional(z.never())
4559
- });
4560
-
4561
- /**
4562
- * Successful Response
4563
- */
4564
- export const zEvaluationCreateEvalSetResponse = zEvalSetOutput;
4565
-
4566
- export const zEvaluationCreateEvalSetLegacyData = z.object({
4567
- body: z.optional(z.never()),
4568
- path: z.object({
4569
- app_name: z.string(),
4570
- eval_set_id: z.string()
4571
- }),
4572
- query: z.optional(z.never())
4573
- });
4574
-
4575
- export const zEvaluationListEvalSetsLegacyData = z.object({
4576
- body: z.optional(z.never()),
4577
- path: z.object({
4578
- app_name: z.string()
4579
- }),
4580
- query: z.optional(z.never())
4581
- });
4582
-
4583
- /**
4584
- * Response Evaluation-List Eval Sets Legacy
4585
- *
4586
- * Successful Response
4587
- */
4588
- export const zEvaluationListEvalSetsLegacyResponse = z.array(z.string());
4589
-
4590
- export const zEvaluationAddSessionToEvalSetData = z.object({
4591
- body: zAddSessionToEvalSetRequest,
4592
- path: z.object({
4593
- app_name: z.string(),
4594
- eval_set_id: z.string()
4595
- }),
4596
- query: z.optional(z.never())
4597
- });
4598
-
4599
- export const zEvaluationListEvalsInEvalSetData = z.object({
4600
- body: z.optional(z.never()),
4601
- path: z.object({
4602
- app_name: z.string(),
4603
- eval_set_id: z.string()
4604
- }),
4605
- query: z.optional(z.never())
4606
- });
4607
-
4608
- /**
4609
- * Response Evaluation-List Evals In Eval Set
4610
- *
4611
- * Successful Response
4612
- */
4613
- export const zEvaluationListEvalsInEvalSetResponse = z.array(z.string());
4614
-
4615
- export const zEvaluationDeleteEvalData = z.object({
4616
- body: z.optional(z.never()),
4617
- path: z.object({
4618
- app_name: z.string(),
4619
- eval_set_id: z.string(),
4620
- eval_case_id: z.string()
4621
- }),
4622
- query: z.optional(z.never())
4623
- });
4624
-
4625
- /**
4626
- * Response Evaluation-Delete Eval
4627
- *
4628
- * Successful Response
4629
- */
4630
- export const zEvaluationDeleteEvalResponse = z.null();
4631
-
4632
- export const zEvaluationGetEvalData = z.object({
4633
- body: z.optional(z.never()),
4634
- path: z.object({
4635
- app_name: z.string(),
4636
- eval_set_id: z.string(),
4637
- eval_case_id: z.string()
4638
- }),
4639
- query: z.optional(z.never())
4640
- });
4641
-
4642
- /**
4643
- * Successful Response
4644
- */
4645
- export const zEvaluationGetEvalResponse = zEvalCaseOutput;
4646
-
4647
- export const zEvaluationUpdateEvalData = z.object({
4648
- body: zEvalCaseInput,
4649
- path: z.object({
4650
- app_name: z.string(),
4651
- eval_set_id: z.string(),
4652
- eval_case_id: z.string()
4653
- }),
4654
- query: z.optional(z.never())
4655
- });
4656
-
4657
- export const zEvaluationRunEvalLegacyData = z.object({
4658
- body: zRunEvalRequest,
4659
- path: z.object({
4660
- app_name: z.string(),
4661
- eval_set_id: z.string()
4662
- }),
4663
- query: z.optional(z.never())
4664
- });
4665
-
4666
- /**
4667
- * Response Evaluation-Run Eval Legacy
4668
- *
4669
- * Successful Response
4670
- */
4671
- export const zEvaluationRunEvalLegacyResponse = z.array(zRunEvalResult);
4672
-
4673
- export const zEvaluationRunEvalData = z.object({
4674
- body: zRunEvalRequest,
4675
- path: z.object({
4676
- app_name: z.string(),
4677
- eval_set_id: z.string()
4678
- }),
4679
- query: z.optional(z.never())
4680
- });
4681
-
4682
- /**
4683
- * Successful Response
4684
- */
4685
- export const zEvaluationRunEvalResponse = zRunEvalResponse;
4686
-
4687
- export const zEvaluationGetEvalResultData = z.object({
4688
- body: z.optional(z.never()),
4689
- path: z.object({
4690
- app_name: z.string(),
4691
- eval_result_id: z.string()
4692
- }),
4693
- query: z.optional(z.never())
4694
- });
4695
-
4696
- /**
4697
- * Successful Response
4698
- */
4699
- export const zEvaluationGetEvalResultResponse = zEvalResult;
4700
-
4701
- export const zEvaluationGetEvalResultLegacyData = z.object({
4702
- body: z.optional(z.never()),
4703
- path: z.object({
4704
- app_name: z.string(),
4705
- eval_result_id: z.string()
4706
- }),
4707
- query: z.optional(z.never())
4708
- });
4709
-
4710
- /**
4711
- * Successful Response
4712
- */
4713
- export const zEvaluationGetEvalResultLegacyResponse = zEvalSetResult;
4714
-
4715
- export const zEvaluationListEvalResultsData = z.object({
4716
- body: z.optional(z.never()),
4717
- path: z.object({
4718
- app_name: z.string()
4719
- }),
4720
- query: z.optional(z.never())
4721
- });
4722
-
4723
- /**
4724
- * Successful Response
4725
- */
4726
- export const zEvaluationListEvalResultsResponse = zListEvalResultsResponse;
4727
-
4728
- export const zEvaluationListEvalResultsLegacyData = z.object({
4729
- body: z.optional(z.never()),
4730
- path: z.object({
4731
- app_name: z.string()
4732
- }),
4733
- query: z.optional(z.never())
4734
- });
4735
-
4736
- /**
4737
- * Response Evaluation-List Eval Results Legacy
4738
- *
4739
- * Successful Response
4740
- */
4741
- export const zEvaluationListEvalResultsLegacyResponse = z.array(z.string());
4742
-
4743
- export const zEvaluationListMetricsInfoData = z.object({
4744
- body: z.optional(z.never()),
4745
- path: z.object({
4746
- app_name: z.string()
4747
- }),
4748
- query: z.optional(z.never())
4749
- });
4750
-
4751
- /**
4752
- * Successful Response
4753
- */
4754
- export const zEvaluationListMetricsInfoResponse = zListMetricsInfoResponse;
4755
-
4756
- export const zDeleteArtifactData = z.object({
4757
- body: z.optional(z.never()),
4758
- path: z.object({
4759
- app_name: z.string(),
4760
- user_id: z.string(),
4761
- session_id: z.string(),
4762
- artifact_name: z.string()
4763
- }),
4764
- query: z.optional(z.never())
4765
- });
4766
-
4767
- /**
4768
- * Response Delete Artifact
4769
- *
4770
- * Successful Response
4771
- */
4772
- export const zDeleteArtifactResponse = z.null();
4773
-
4774
- export const zLoadArtifactData = z.object({
4775
- body: z.optional(z.never()),
4776
- path: z.object({
4777
- app_name: z.string(),
4778
- user_id: z.string(),
4779
- session_id: z.string(),
4780
- artifact_name: z.string()
4781
- }),
4782
- query: z.optional(z.object({
4783
- version: z.optional(z.union([
4784
- z.int(),
4785
- z.null()
4786
- ]))
4787
- }))
4788
- });
4789
-
4790
- /**
4791
- * Response Load Artifact
4792
- *
4793
- * Successful Response
4794
- */
4795
- export const zLoadArtifactResponse = z.union([
4796
- zPartOutput,
4797
- z.null()
4798
- ]);
4799
-
4800
- export const zLoadArtifactVersionData = z.object({
4801
- body: z.optional(z.never()),
4802
- path: z.object({
4803
- app_name: z.string(),
4804
- user_id: z.string(),
4805
- session_id: z.string(),
4806
- artifact_name: z.string(),
4807
- version_id: z.int()
4808
- }),
4809
- query: z.optional(z.never())
4810
- });
4811
-
4812
- /**
4813
- * Response Load Artifact Version
4814
- *
4815
- * Successful Response
4816
- */
4817
- export const zLoadArtifactVersionResponse = z.union([
4818
- zPartOutput,
4819
- z.null()
4820
- ]);
4821
-
4822
- export const zListArtifactNamesData = z.object({
4823
- body: z.optional(z.never()),
4824
- path: z.object({
4825
- app_name: z.string(),
4826
- user_id: z.string(),
4827
- session_id: z.string()
4828
- }),
4829
- query: z.optional(z.never())
4830
- });
4831
-
4832
- /**
4833
- * Response List Artifact Names
4834
- *
4835
- * Successful Response
4836
- */
4837
- export const zListArtifactNamesResponse = z.array(z.string());
4838
-
4839
- export const zListArtifactVersionsData = z.object({
4840
- body: z.optional(z.never()),
4841
- path: z.object({
4842
- app_name: z.string(),
4843
- user_id: z.string(),
4844
- session_id: z.string(),
4845
- artifact_name: z.string()
4846
- }),
4847
- query: z.optional(z.never())
4848
- });
4849
-
4850
- /**
4851
- * Response List Artifact Versions
4852
- *
4853
- * Successful Response
4854
- */
4855
- export const zListArtifactVersionsResponse = z.array(z.int());
4856
-
4857
- export const zRunAgentData = z.object({
4858
- body: zRunAgentRequest,
4859
- path: z.optional(z.never()),
4860
- query: z.optional(z.never())
4861
- });
4862
-
4863
- /**
4864
- * Response Run Agent
4865
- *
4866
- * Successful Response
4867
- */
4868
- export const zRunAgentResponse = z.array(zEventOutput);
4869
-
4870
- export const zRunAgentSseData = z.object({
4871
- body: zRunAgentRequest,
4872
- path: z.optional(z.never()),
4873
- query: z.optional(z.never())
4874
- });
4875
-
4876
- export const zDebugGetEventGraphData = z.object({
4877
- body: z.optional(z.never()),
4878
- path: z.object({
4879
- app_name: z.string(),
4880
- user_id: z.string(),
4881
- session_id: z.string(),
4882
- event_id: z.string()
4883
- }),
4884
- query: z.optional(z.never())
4885
- });
4886
-
4887
- export const zRedirectRootToDevUiData = z.object({
4888
- body: z.optional(z.never()),
4889
- path: z.optional(z.never()),
4890
- query: z.optional(z.never())
4891
- });
4892
-
4893
- export const zRedirectDevUiAddSlashData = z.object({
4894
- body: z.optional(z.never()),
4895
- path: z.optional(z.never()),
4896
- query: z.optional(z.never())
4897
- });
4898
-
4899
- export const zBuilderBuildData = z.object({
4900
- body: zBodyBuilderBuild,
4901
- path: z.optional(z.never()),
4902
- query: z.optional(z.never())
4903
- });
4904
-
4905
- /**
4906
- * Response Builder Build
4907
- *
4908
- * Successful Response
4909
- */
4910
- export const zBuilderBuildResponse = z.boolean();
4911
-
4912
- export const zGetAgentBuilderData = z.object({
4913
- body: z.optional(z.never()),
4914
- path: z.object({
4915
- app_name: z.string()
4916
- }),
4917
- query: z.optional(z.object({
4918
- file_path: z.optional(z.union([
4919
- z.string(),
4920
- z.null()
4921
- ]))
4922
- }))
4923
- });
4924
-
4925
- /**
4926
- * Successful Response
4927
- */
4928
- export const zGetAgentBuilderResponse = z.string();
4929
-
4930
- export const zChatAgentGetChatConfigData = z.object({
4931
- body: z.optional(z.never()),
4932
- path: z.optional(z.never()),
4933
- query: z.optional(z.never())
4934
- });
4935
-
4936
- /**
4937
- * Successful Response
4938
- */
4939
- export const zChatAgentGetChatConfigResponse = zChatConfig;
4940
-
4941
- export const zChatAgentUpdateChatConfigData = z.object({
4942
- body: zChatConfig,
4943
- path: z.optional(z.never()),
4944
- query: z.optional(z.never())
4945
- });
4946
-
4947
- /**
4948
- * Successful Response
4949
- */
4950
- export const zChatAgentUpdateChatConfigResponse = zChatConfig;
4951
-
4952
- export const zChatAgentGetProvidersData = z.object({
4953
- body: z.optional(z.never()),
4954
- path: z.optional(z.never()),
4955
- query: z.optional(z.never())
4956
- });
4957
-
4958
- export const zChatAgentValidateApiKeyData = z.object({
4959
- body: z.record(z.string(), z.unknown()),
4960
- path: z.optional(z.never()),
4961
- query: z.optional(z.never())
4962
- });
4963
-
4964
- export const zChatAgentExportConfigData = z.object({
4965
- body: z.optional(z.never()),
4966
- path: z.optional(z.never()),
4967
- query: z.optional(z.never())
4968
- });
4969
-
4970
- export const zChatAgentImportConfigData = z.object({
4971
- body: z.record(z.string(), z.unknown()),
4972
- path: z.optional(z.never()),
4973
- query: z.optional(z.never())
4974
- });
4975
-
4976
- export const zChatAgentChatData = z.object({
4977
- body: zChatRequest,
4978
- path: z.optional(z.never()),
4979
- query: z.optional(z.never())
4980
- });
4981
-
4982
- /**
4983
- * Successful Response
4984
- */
4985
- export const zChatAgentChatResponse = zChatResponse;
4986
-
4987
- export const zListItemsData = z.object({
4988
- body: z.optional(z.never()),
4989
- path: z.optional(z.never()),
4990
- query: z.optional(z.object({
4991
- skip: z.optional(z.int()).default(0),
4992
- limit: z.optional(z.int()).default(10)
4993
- }))
4994
- });
4995
-
4996
- /**
4997
- * Response List Items
4998
- *
4999
- * Successful Response
5000
- */
5001
- export const zListItemsResponse = z.array(zItem);
5002
-
5003
- export const zCreateItemData = z.object({
5004
- body: zItem,
5005
- path: z.optional(z.never()),
5006
- query: z.optional(z.never())
5007
- });
5008
-
5009
- /**
5010
- * Successful Response
5011
- */
5012
- export const zCreateItemResponse = zItem;
5013
-
5014
- export const zDeleteItemData = z.object({
5015
- body: z.optional(z.never()),
5016
- path: z.object({
5017
- item_id: z.int()
5018
- }),
5019
- query: z.optional(z.never())
5020
- });
5021
-
5022
- export const zGetItemData = z.object({
5023
- body: z.optional(z.never()),
5024
- path: z.object({
5025
- item_id: z.int()
5026
- }),
5027
- query: z.optional(z.never())
5028
- });
5029
-
5030
- /**
5031
- * Successful Response
5032
- */
5033
- export const zGetItemResponse = zItem;
5034
-
5035
- export const zUpdateItemData = z.object({
5036
- body: zItem,
5037
- path: z.object({
5038
- item_id: z.int()
5039
- }),
5040
- query: z.optional(z.never())
5041
- });
5042
-
5043
- /**
5044
- * Successful Response
5045
- */
5046
- export const zUpdateItemResponse = zItem;
5047
-
5048
- export const zSearchItemsData = z.object({
5049
- body: z.optional(z.never()),
5050
- path: z.optional(z.never()),
5051
- query: z.optional(z.object({
5052
- q: z.optional(z.union([
5053
- z.string(),
5054
- z.null()
5055
- ])),
5056
- min_price: z.optional(z.union([
5057
- z.number(),
5058
- z.null()
5059
- ])),
5060
- max_price: z.optional(z.union([
5061
- z.number(),
5062
- z.null()
5063
- ])),
5064
- tags: z.optional(z.array(z.string())).default([])
5065
- }))
5066
- });
5067
-
5068
- /**
5069
- * Response Search Items
5070
- *
5071
- * Successful Response
5072
- */
5073
- export const zSearchItemsResponse = z.array(zItem);
5074
-
5075
- export const zAgentsAgentrunData = z.object({
5076
- body: zRunAgentRequest,
5077
- path: z.optional(z.never()),
5078
- query: z.optional(z.never())
5079
- });
5080
-
5081
- export const zSandboxStartNapcatSandboxData = z.object({
5082
- body: zStartNapcatRequest,
5083
- path: z.optional(z.never()),
5084
- query: z.optional(z.never())
5085
- });
5086
-
5087
- /**
5088
- * Successful Response
5089
- */
5090
- export const zSandboxStartNapcatSandboxResponse = zStartNapcatResponse;
5091
-
5092
- export const zSandboxCheckSandboxStatusData = z.object({
5093
- body: zCheckSandboxStatusRequest,
5094
- path: z.optional(z.never()),
5095
- query: z.optional(z.never())
5096
- });
5097
-
5098
- /**
5099
- * Successful Response
5100
- */
5101
- export const zSandboxCheckSandboxStatusResponse = zCheckSandboxStatusResponse;