@orq-ai/node 4.5.0-rc.8 → 4.5.2

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 (710) hide show
  1. package/README.md +38 -28
  2. package/funcs/agentsList.d.ts +1 -1
  3. package/funcs/agentsList.d.ts.map +1 -1
  4. package/funcs/agentsList.js +5 -3
  5. package/funcs/agentsList.js.map +1 -1
  6. package/funcs/agentsPostV2AgentsA2a.d.ts +18 -0
  7. package/funcs/agentsPostV2AgentsA2a.d.ts.map +1 -0
  8. package/funcs/agentsPostV2AgentsA2a.js +120 -0
  9. package/funcs/agentsPostV2AgentsA2a.js.map +1 -0
  10. package/funcs/agentsPostV2AgentsKeyCardRefresh.d.ts +18 -0
  11. package/funcs/agentsPostV2AgentsKeyCardRefresh.d.ts.map +1 -0
  12. package/funcs/agentsPostV2AgentsKeyCardRefresh.js +124 -0
  13. package/funcs/agentsPostV2AgentsKeyCardRefresh.js.map +1 -0
  14. package/funcs/agentsResponsesGet.d.ts +19 -0
  15. package/funcs/agentsResponsesGet.d.ts.map +1 -0
  16. package/funcs/agentsResponsesGet.js +128 -0
  17. package/funcs/agentsResponsesGet.js.map +1 -0
  18. package/funcs/agentsStream.js +4 -2
  19. package/funcs/agentsStream.js.map +1 -1
  20. package/funcs/agentsStreamRun.js +4 -2
  21. package/funcs/agentsStreamRun.js.map +1 -1
  22. package/funcs/agentsUpdate.d.ts +1 -1
  23. package/funcs/agentsUpdate.d.ts.map +1 -1
  24. package/funcs/agentsUpdate.js.map +1 -1
  25. package/funcs/deploymentsStream.js +4 -2
  26. package/funcs/deploymentsStream.js.map +1 -1
  27. package/funcs/filesCreate.d.ts +1 -1
  28. package/funcs/filesCreate.js +8 -1
  29. package/funcs/filesCreate.js.map +1 -1
  30. package/funcs/routerAudioTranscriptionsCreate.js +7 -0
  31. package/funcs/routerAudioTranscriptionsCreate.js.map +1 -1
  32. package/funcs/routerAudioTranslationsCreate.js +7 -0
  33. package/funcs/routerAudioTranslationsCreate.js.map +1 -1
  34. package/jsr.json +1 -1
  35. package/lib/config.d.ts +3 -3
  36. package/lib/config.js +3 -3
  37. package/lib/config.js.map +1 -1
  38. package/lib/event-streams.d.ts +5 -0
  39. package/lib/event-streams.d.ts.map +1 -1
  40. package/lib/event-streams.js.map +1 -1
  41. package/lib/matchers.d.ts.map +1 -1
  42. package/lib/matchers.js +0 -1
  43. package/lib/matchers.js.map +1 -1
  44. package/lib/security.d.ts.map +1 -1
  45. package/lib/security.js +1 -2
  46. package/lib/security.js.map +1 -1
  47. package/models/components/createagentresponse.d.ts +5 -0
  48. package/models/components/createagentresponse.d.ts.map +1 -1
  49. package/models/components/createagentresponse.js +2 -0
  50. package/models/components/createagentresponse.js.map +1 -1
  51. package/models/components/extendedmessage.d.ts +71 -0
  52. package/models/components/extendedmessage.d.ts.map +1 -0
  53. package/models/components/extendedmessage.js +98 -0
  54. package/models/components/extendedmessage.js.map +1 -0
  55. package/models/components/getagentresponse.d.ts +157 -0
  56. package/models/components/getagentresponse.d.ts.map +1 -0
  57. package/models/components/getagentresponse.js +175 -0
  58. package/models/components/getagentresponse.js.map +1 -0
  59. package/models/components/index.d.ts +3 -0
  60. package/models/components/index.d.ts.map +1 -1
  61. package/models/components/index.js +3 -0
  62. package/models/components/index.js.map +1 -1
  63. package/models/components/partdoneevent.js +1 -1
  64. package/models/components/reasoningpart.js +1 -1
  65. package/models/components/responsedoneevent.d.ts +5 -0
  66. package/models/components/responsedoneevent.d.ts.map +1 -1
  67. package/models/components/responsedoneevent.js +2 -0
  68. package/models/components/responsedoneevent.js.map +1 -1
  69. package/models/components/responsestartedevent.d.ts +5 -0
  70. package/models/components/responsestartedevent.d.ts.map +1 -1
  71. package/models/components/responsestartedevent.js +2 -0
  72. package/models/components/responsestartedevent.js.map +1 -1
  73. package/models/components/telemetry.d.ts +20 -0
  74. package/models/components/telemetry.d.ts.map +1 -0
  75. package/models/components/telemetry.js +57 -0
  76. package/models/components/telemetry.js.map +1 -0
  77. package/models/errors/index.d.ts +2 -0
  78. package/models/errors/index.d.ts.map +1 -1
  79. package/models/errors/index.js +2 -0
  80. package/models/errors/index.js.map +1 -1
  81. package/models/errors/postv2agentsa2a.d.ts +43 -0
  82. package/models/errors/postv2agentsa2a.d.ts.map +1 -0
  83. package/models/errors/postv2agentsa2a.js +94 -0
  84. package/models/errors/postv2agentsa2a.js.map +1 -0
  85. package/models/errors/postv2agentskeycardrefresh.d.ts +43 -0
  86. package/models/errors/postv2agentskeycardrefresh.d.ts.map +1 -0
  87. package/models/errors/postv2agentskeycardrefresh.js +94 -0
  88. package/models/errors/postv2agentskeycardrefresh.js.map +1 -0
  89. package/models/operations/createagentrequest.d.ts +113 -500
  90. package/models/operations/createagentrequest.d.ts.map +1 -1
  91. package/models/operations/createagentrequest.js +103 -343
  92. package/models/operations/createagentrequest.js.map +1 -1
  93. package/models/operations/createagentresponserequest.d.ts +22 -1
  94. package/models/operations/createagentresponserequest.d.ts.map +1 -1
  95. package/models/operations/createagentresponserequest.js +12 -2
  96. package/models/operations/createagentresponserequest.js.map +1 -1
  97. package/models/operations/createannotation.d.ts +1 -1
  98. package/models/operations/createannotation.d.ts.map +1 -1
  99. package/models/operations/createannotation.js +4 -0
  100. package/models/operations/createannotation.js.map +1 -1
  101. package/models/operations/createchatcompletion.d.ts +15 -2
  102. package/models/operations/createchatcompletion.d.ts.map +1 -1
  103. package/models/operations/createchatcompletion.js +3 -1
  104. package/models/operations/createchatcompletion.js.map +1 -1
  105. package/models/operations/createcompletion.d.ts +6 -2
  106. package/models/operations/createcompletion.d.ts.map +1 -1
  107. package/models/operations/createcompletion.js +2 -1
  108. package/models/operations/createcompletion.js.map +1 -1
  109. package/models/operations/createcontact.js +1 -1
  110. package/models/operations/createdataset.js +1 -1
  111. package/models/operations/createdatasetitem.js +4 -4
  112. package/models/operations/createdatasource.js +1 -1
  113. package/models/operations/createeval.js +16 -16
  114. package/models/operations/createfeedback.d.ts +2 -2
  115. package/models/operations/createidentity.js +1 -1
  116. package/models/operations/createprompt.d.ts +33 -32
  117. package/models/operations/createprompt.d.ts.map +1 -1
  118. package/models/operations/createprompt.js +33 -30
  119. package/models/operations/createprompt.js.map +1 -1
  120. package/models/operations/createresponse.d.ts.map +1 -1
  121. package/models/operations/createresponse.js +2 -1
  122. package/models/operations/createresponse.js.map +1 -1
  123. package/models/operations/createtool.js +6 -6
  124. package/models/operations/deploymentinvoke.d.ts +15 -0
  125. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  126. package/models/operations/deploymentinvoke.js +17 -1
  127. package/models/operations/deploymentinvoke.js.map +1 -1
  128. package/models/operations/deployments.d.ts +1 -0
  129. package/models/operations/deployments.d.ts.map +1 -1
  130. package/models/operations/deployments.js +1 -0
  131. package/models/operations/deployments.js.map +1 -1
  132. package/models/operations/deploymentstream.d.ts +15 -0
  133. package/models/operations/deploymentstream.d.ts.map +1 -1
  134. package/models/operations/deploymentstream.js +17 -1
  135. package/models/operations/deploymentstream.js.map +1 -1
  136. package/models/operations/fileget.js +1 -1
  137. package/models/operations/filelist.js +1 -1
  138. package/models/operations/fileupload.js +1 -1
  139. package/models/operations/getagentresponse.d.ts +20 -0
  140. package/models/operations/getagentresponse.d.ts.map +1 -0
  141. package/models/operations/getagentresponse.js +56 -0
  142. package/models/operations/getagentresponse.js.map +1 -0
  143. package/models/operations/getallprompts.d.ts +1 -0
  144. package/models/operations/getallprompts.d.ts.map +1 -1
  145. package/models/operations/getallprompts.js +1 -0
  146. package/models/operations/getallprompts.js.map +1 -1
  147. package/models/operations/getalltools.js +6 -6
  148. package/models/operations/getevals.js +16 -16
  149. package/models/operations/getoneprompt.d.ts +1 -0
  150. package/models/operations/getoneprompt.d.ts.map +1 -1
  151. package/models/operations/getoneprompt.js +1 -0
  152. package/models/operations/getoneprompt.js.map +1 -1
  153. package/models/operations/getpromptversion.d.ts +1 -0
  154. package/models/operations/getpromptversion.d.ts.map +1 -1
  155. package/models/operations/getpromptversion.js +1 -0
  156. package/models/operations/getpromptversion.js.map +1 -1
  157. package/models/operations/index.d.ts +3 -0
  158. package/models/operations/index.d.ts.map +1 -1
  159. package/models/operations/index.js +3 -0
  160. package/models/operations/index.js.map +1 -1
  161. package/models/operations/invokeagent.d.ts +26 -1
  162. package/models/operations/invokeagent.d.ts.map +1 -1
  163. package/models/operations/invokeagent.js +12 -1
  164. package/models/operations/invokeagent.js.map +1 -1
  165. package/models/operations/listagents.d.ts +114 -241
  166. package/models/operations/listagents.d.ts.map +1 -1
  167. package/models/operations/listagents.js +94 -182
  168. package/models/operations/listagents.js.map +1 -1
  169. package/models/operations/listdatasetdatapoints.js +4 -4
  170. package/models/operations/listdatasets.js +1 -1
  171. package/models/operations/listdatasources.js +1 -1
  172. package/models/operations/listidentities.js +1 -1
  173. package/models/operations/listpromptversions.d.ts +1 -0
  174. package/models/operations/listpromptversions.d.ts.map +1 -1
  175. package/models/operations/listpromptversions.js +1 -0
  176. package/models/operations/listpromptversions.js.map +1 -1
  177. package/models/operations/postv2agentsa2a.d.ts +119 -0
  178. package/models/operations/postv2agentsa2a.d.ts.map +1 -0
  179. package/models/operations/postv2agentsa2a.js +147 -0
  180. package/models/operations/postv2agentsa2a.js.map +1 -0
  181. package/models/operations/postv2agentskeycardrefresh.d.ts +35 -0
  182. package/models/operations/postv2agentskeycardrefresh.d.ts.map +1 -0
  183. package/models/operations/postv2agentskeycardrefresh.js +71 -0
  184. package/models/operations/postv2agentskeycardrefresh.js.map +1 -0
  185. package/models/operations/retrieveagentrequest.d.ts +96 -242
  186. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  187. package/models/operations/retrieveagentrequest.js +84 -185
  188. package/models/operations/retrieveagentrequest.js.map +1 -1
  189. package/models/operations/retrievedatapoint.js +4 -4
  190. package/models/operations/retrievedataset.js +1 -1
  191. package/models/operations/retrievedatasource.js +1 -1
  192. package/models/operations/retrieveidentity.js +1 -1
  193. package/models/operations/retrievetool.js +6 -6
  194. package/models/operations/runagent.d.ts +27 -265
  195. package/models/operations/runagent.d.ts.map +1 -1
  196. package/models/operations/runagent.js +26 -163
  197. package/models/operations/runagent.js.map +1 -1
  198. package/models/operations/streamagent.d.ts +22 -1
  199. package/models/operations/streamagent.d.ts.map +1 -1
  200. package/models/operations/streamagent.js +11 -1
  201. package/models/operations/streamagent.js.map +1 -1
  202. package/models/operations/streamrunagent.d.ts +13 -255
  203. package/models/operations/streamrunagent.d.ts.map +1 -1
  204. package/models/operations/streamrunagent.js +15 -152
  205. package/models/operations/streamrunagent.js.map +1 -1
  206. package/models/operations/updateagent.d.ts +190 -507
  207. package/models/operations/updateagent.d.ts.map +1 -1
  208. package/models/operations/updateagent.js +144 -348
  209. package/models/operations/updateagent.js.map +1 -1
  210. package/models/operations/updatedatapoint.js +4 -4
  211. package/models/operations/updatedataset.js +1 -1
  212. package/models/operations/updatedatasource.js +1 -1
  213. package/models/operations/updateeval.d.ts +48 -0
  214. package/models/operations/updateeval.d.ts.map +1 -1
  215. package/models/operations/updateeval.js +60 -20
  216. package/models/operations/updateeval.js.map +1 -1
  217. package/models/operations/updateidentity.js +1 -1
  218. package/models/operations/updatememorystore.d.ts +2 -43
  219. package/models/operations/updatememorystore.d.ts.map +1 -1
  220. package/models/operations/updatememorystore.js +2 -45
  221. package/models/operations/updatememorystore.js.map +1 -1
  222. package/models/operations/updateprompt.d.ts +1 -0
  223. package/models/operations/updateprompt.d.ts.map +1 -1
  224. package/models/operations/updateprompt.js +1 -0
  225. package/models/operations/updateprompt.js.map +1 -1
  226. package/models/operations/updatetool.d.ts +60 -0
  227. package/models/operations/updatetool.d.ts.map +1 -1
  228. package/models/operations/updatetool.js +63 -9
  229. package/models/operations/updatetool.js.map +1 -1
  230. package/package.json +3 -4
  231. package/packages/orq-rc/examples/contactsCreate.example.ts +42 -0
  232. package/packages/orq-rc/src/core.ts +13 -0
  233. package/packages/orq-rc/src/funcs/agentsCreate.ts +161 -0
  234. package/packages/orq-rc/src/funcs/agentsDelete.ts +180 -0
  235. package/packages/orq-rc/src/funcs/agentsInvoke.ts +177 -0
  236. package/packages/orq-rc/src/funcs/agentsList.ts +184 -0
  237. package/packages/orq-rc/src/funcs/agentsPostV2AgentsA2a.ts +178 -0
  238. package/packages/orq-rc/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +187 -0
  239. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +183 -0
  240. package/packages/orq-rc/src/funcs/agentsResponsesGet.ts +182 -0
  241. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +180 -0
  242. package/packages/orq-rc/src/funcs/agentsRun.ts +162 -0
  243. package/packages/orq-rc/src/funcs/agentsStream.ts +204 -0
  244. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +189 -0
  245. package/packages/orq-rc/src/funcs/agentsUpdate.ts +184 -0
  246. package/packages/orq-rc/src/funcs/annotationsCreate.ts +171 -0
  247. package/packages/orq-rc/src/funcs/annotationsDelete.ts +171 -0
  248. package/packages/orq-rc/src/funcs/chunkingParse.ts +160 -0
  249. package/packages/orq-rc/src/funcs/contactsCreate.ts +160 -0
  250. package/packages/orq-rc/src/funcs/datasetsClear.ts +167 -0
  251. package/packages/orq-rc/src/funcs/datasetsCreate.ts +165 -0
  252. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +171 -0
  253. package/packages/orq-rc/src/funcs/datasetsDelete.ts +167 -0
  254. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +182 -0
  255. package/packages/orq-rc/src/funcs/datasetsList.ts +167 -0
  256. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +174 -0
  257. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +175 -0
  258. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +181 -0
  259. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +176 -0
  260. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +179 -0
  261. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +168 -0
  262. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +176 -0
  263. package/packages/orq-rc/src/funcs/deploymentsList.ts +176 -0
  264. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +168 -0
  265. package/packages/orq-rc/src/funcs/deploymentsStream.ts +186 -0
  266. package/packages/orq-rc/src/funcs/evalsAll.ts +173 -0
  267. package/packages/orq-rc/src/funcs/evalsCreate.ts +169 -0
  268. package/packages/orq-rc/src/funcs/evalsDelete.ts +173 -0
  269. package/packages/orq-rc/src/funcs/evalsInvoke.ts +181 -0
  270. package/packages/orq-rc/src/funcs/evalsUpdate.ts +173 -0
  271. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +183 -0
  272. package/packages/orq-rc/src/funcs/feedbackCreate.ts +160 -0
  273. package/packages/orq-rc/src/funcs/filesCreate.ts +198 -0
  274. package/packages/orq-rc/src/funcs/filesDelete.ts +164 -0
  275. package/packages/orq-rc/src/funcs/filesGet.ts +166 -0
  276. package/packages/orq-rc/src/funcs/filesList.ts +167 -0
  277. package/packages/orq-rc/src/funcs/identitiesCreate.ts +165 -0
  278. package/packages/orq-rc/src/funcs/identitiesDelete.ts +176 -0
  279. package/packages/orq-rc/src/funcs/identitiesList.ts +170 -0
  280. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +175 -0
  281. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +176 -0
  282. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +158 -0
  283. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +171 -0
  284. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +166 -0
  285. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +167 -0
  286. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +174 -0
  287. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +170 -0
  288. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +173 -0
  289. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +170 -0
  290. package/packages/orq-rc/src/funcs/knowledgeList.ts +169 -0
  291. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +178 -0
  292. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +171 -0
  293. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +174 -0
  294. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +166 -0
  295. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +173 -0
  296. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +169 -0
  297. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +167 -0
  298. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +164 -0
  299. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +174 -0
  300. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +170 -0
  301. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +162 -0
  302. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +176 -0
  303. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +170 -0
  304. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +168 -0
  305. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +185 -0
  306. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +180 -0
  307. package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
  308. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +184 -0
  309. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +177 -0
  310. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +177 -0
  311. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +179 -0
  312. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +174 -0
  313. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +168 -0
  314. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +180 -0
  315. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +175 -0
  316. package/packages/orq-rc/src/funcs/modelsList.ts +142 -0
  317. package/packages/orq-rc/src/funcs/promptsCreate.ts +160 -0
  318. package/packages/orq-rc/src/funcs/promptsDelete.ts +173 -0
  319. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +181 -0
  320. package/packages/orq-rc/src/funcs/promptsList.ts +167 -0
  321. package/packages/orq-rc/src/funcs/promptsListVersions.ts +173 -0
  322. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +166 -0
  323. package/packages/orq-rc/src/funcs/promptsUpdate.ts +173 -0
  324. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +161 -0
  325. package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +161 -0
  326. package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +273 -0
  327. package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +263 -0
  328. package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +168 -0
  329. package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +168 -0
  330. package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +161 -0
  331. package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +222 -0
  332. package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +160 -0
  333. package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +218 -0
  334. package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +167 -0
  335. package/packages/orq-rc/src/funcs/routerOcr.ts +158 -0
  336. package/packages/orq-rc/src/funcs/routerRerankCreate.ts +160 -0
  337. package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +167 -0
  338. package/packages/orq-rc/src/funcs/toolsCreate.ts +163 -0
  339. package/packages/orq-rc/src/funcs/toolsDelete.ts +167 -0
  340. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +183 -0
  341. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +190 -0
  342. package/packages/orq-rc/src/funcs/toolsList.ts +176 -0
  343. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +166 -0
  344. package/packages/orq-rc/src/funcs/toolsUpdate.ts +176 -0
  345. package/packages/orq-rc/src/hooks/global.ts +44 -0
  346. package/packages/orq-rc/src/hooks/hooks.ts +132 -0
  347. package/packages/orq-rc/src/hooks/index.ts +6 -0
  348. package/packages/orq-rc/src/hooks/registration.ts +15 -0
  349. package/packages/orq-rc/src/hooks/types.ts +112 -0
  350. package/packages/orq-rc/src/index.ts +9 -0
  351. package/packages/orq-rc/src/lib/base64.ts +37 -0
  352. package/packages/orq-rc/src/lib/config.ts +74 -0
  353. package/packages/orq-rc/src/lib/dlv.ts +53 -0
  354. package/packages/orq-rc/src/lib/encodings.ts +497 -0
  355. package/packages/orq-rc/src/lib/env.ts +89 -0
  356. package/packages/orq-rc/src/lib/event-streams.ts +161 -0
  357. package/packages/orq-rc/src/lib/files.ts +82 -0
  358. package/packages/orq-rc/src/lib/http.ts +323 -0
  359. package/packages/orq-rc/src/lib/is-plain-object.ts +43 -0
  360. package/packages/orq-rc/src/lib/logger.ts +9 -0
  361. package/packages/orq-rc/src/lib/matchers.ts +346 -0
  362. package/packages/orq-rc/src/lib/primitives.ts +150 -0
  363. package/packages/orq-rc/src/lib/retries.ts +218 -0
  364. package/packages/orq-rc/src/lib/schemas.ts +91 -0
  365. package/packages/orq-rc/src/lib/sdks.ts +407 -0
  366. package/packages/orq-rc/src/lib/security.ts +263 -0
  367. package/packages/orq-rc/src/lib/url.ts +33 -0
  368. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +99 -0
  369. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +185 -0
  370. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +73 -0
  371. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +91 -0
  372. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +71 -0
  373. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +507 -0
  374. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +165 -0
  375. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +103 -0
  376. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +517 -0
  377. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +807 -0
  378. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +136 -0
  379. package/packages/orq-rc/src/models/components/createagentresponse.ts +305 -0
  380. package/packages/orq-rc/src/models/components/datapart.ts +38 -0
  381. package/packages/orq-rc/src/models/components/errorpart.ts +58 -0
  382. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +66 -0
  383. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +71 -0
  384. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +61 -0
  385. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +67 -0
  386. package/packages/orq-rc/src/models/components/extendedmessage.ts +146 -0
  387. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +87 -0
  388. package/packages/orq-rc/src/models/components/filepart.ts +218 -0
  389. package/packages/orq-rc/src/models/components/getagentresponse.ts +348 -0
  390. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +268 -0
  391. package/packages/orq-rc/src/models/components/index.ts +59 -0
  392. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +3450 -0
  393. package/packages/orq-rc/src/models/components/partdelta.ts +39 -0
  394. package/packages/orq-rc/src/models/components/partdeltaevent.ts +73 -0
  395. package/packages/orq-rc/src/models/components/partdoneevent.ts +139 -0
  396. package/packages/orq-rc/src/models/components/publiccontact.ts +71 -0
  397. package/packages/orq-rc/src/models/components/publicidentity.ts +69 -0
  398. package/packages/orq-rc/src/models/components/reasoningpart.ts +62 -0
  399. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +71 -0
  400. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +66 -0
  401. package/packages/orq-rc/src/models/components/refusalpartschema.ts +64 -0
  402. package/packages/orq-rc/src/models/components/responsedoneevent.ts +324 -0
  403. package/packages/orq-rc/src/models/components/responsefailedevent.ts +72 -0
  404. package/packages/orq-rc/src/models/components/responsestartedevent.ts +97 -0
  405. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +85 -0
  406. package/packages/orq-rc/src/models/components/reviewoutcome.ts +23 -0
  407. package/packages/orq-rc/src/models/components/security.ts +32 -0
  408. package/packages/orq-rc/src/models/components/telemetry.ts +48 -0
  409. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +207 -0
  410. package/packages/orq-rc/src/models/components/textpart.ts +54 -0
  411. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +59 -0
  412. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +106 -0
  413. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +64 -0
  414. package/packages/orq-rc/src/models/components/toolcallpart.ts +51 -0
  415. package/packages/orq-rc/src/models/components/tooldoneevent.ts +77 -0
  416. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +230 -0
  417. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +214 -0
  418. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +200 -0
  419. package/packages/orq-rc/src/models/components/toolfailedevent.ts +77 -0
  420. package/packages/orq-rc/src/models/components/toolresultpart.ts +71 -0
  421. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +78 -0
  422. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +87 -0
  423. package/packages/orq-rc/src/models/components/toolstartedevent.ts +82 -0
  424. package/packages/orq-rc/src/models/errors/apierror.ts +40 -0
  425. package/packages/orq-rc/src/models/errors/createeval.ts +51 -0
  426. package/packages/orq-rc/src/models/errors/createmoderation.ts +84 -0
  427. package/packages/orq-rc/src/models/errors/createtranscription.ts +87 -0
  428. package/packages/orq-rc/src/models/errors/createtranslation.ts +87 -0
  429. package/packages/orq-rc/src/models/errors/deleteagent.ts +51 -0
  430. package/packages/orq-rc/src/models/errors/deleteeval.ts +51 -0
  431. package/packages/orq-rc/src/models/errors/deleteidentity.ts +62 -0
  432. package/packages/orq-rc/src/models/errors/deleteprompt.ts +51 -0
  433. package/packages/orq-rc/src/models/errors/getevals.ts +51 -0
  434. package/packages/orq-rc/src/models/errors/getpromptversion.ts +51 -0
  435. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +51 -0
  436. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +51 -0
  437. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +52 -0
  438. package/packages/orq-rc/src/models/errors/honoapierror.ts +59 -0
  439. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +62 -0
  440. package/packages/orq-rc/src/models/errors/index.ts +35 -0
  441. package/packages/orq-rc/src/models/errors/invokeeval.ts +141 -0
  442. package/packages/orq-rc/src/models/errors/orqerror.ts +35 -0
  443. package/packages/orq-rc/src/models/errors/postv2agentsa2a.ts +96 -0
  444. package/packages/orq-rc/src/models/errors/postv2agentskeycardrefresh.ts +97 -0
  445. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +50 -0
  446. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +51 -0
  447. package/packages/orq-rc/src/models/errors/retrieveidentity.ts +62 -0
  448. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +109 -0
  449. package/packages/orq-rc/src/models/errors/streamagent.ts +51 -0
  450. package/packages/orq-rc/src/models/errors/streamrunagent.ts +51 -0
  451. package/packages/orq-rc/src/models/errors/updateagent.ts +51 -0
  452. package/packages/orq-rc/src/models/errors/updateeval.ts +51 -0
  453. package/packages/orq-rc/src/models/errors/updateidentity.ts +54 -0
  454. package/packages/orq-rc/src/models/errors/updateprompt.ts +51 -0
  455. package/packages/orq-rc/src/models/errors/updatetool.ts +62 -0
  456. package/packages/orq-rc/src/models/operations/cleardataset.ts +39 -0
  457. package/packages/orq-rc/src/models/operations/createagentrequest.ts +6393 -0
  458. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +644 -0
  459. package/packages/orq-rc/src/models/operations/createannotation.ts +166 -0
  460. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +6392 -0
  461. package/packages/orq-rc/src/models/operations/createchunk.ts +222 -0
  462. package/packages/orq-rc/src/models/operations/createcompletion.ts +3418 -0
  463. package/packages/orq-rc/src/models/operations/createcontact.ts +156 -0
  464. package/packages/orq-rc/src/models/operations/createdataset.ts +162 -0
  465. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2551 -0
  466. package/packages/orq-rc/src/models/operations/createdatasource.ts +437 -0
  467. package/packages/orq-rc/src/models/operations/createembedding.ts +947 -0
  468. package/packages/orq-rc/src/models/operations/createeval.ts +4170 -0
  469. package/packages/orq-rc/src/models/operations/createfeedback.ts +144 -0
  470. package/packages/orq-rc/src/models/operations/createidentity.ts +162 -0
  471. package/packages/orq-rc/src/models/operations/createimage.ts +1028 -0
  472. package/packages/orq-rc/src/models/operations/createimageedit.ts +1045 -0
  473. package/packages/orq-rc/src/models/operations/createimagevariation.ts +1067 -0
  474. package/packages/orq-rc/src/models/operations/createknowledge.ts +944 -0
  475. package/packages/orq-rc/src/models/operations/creatememory.ts +142 -0
  476. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +152 -0
  477. package/packages/orq-rc/src/models/operations/creatememorystore.ts +199 -0
  478. package/packages/orq-rc/src/models/operations/createmoderation.ts +664 -0
  479. package/packages/orq-rc/src/models/operations/createprompt.ts +5391 -0
  480. package/packages/orq-rc/src/models/operations/creatererank.ts +890 -0
  481. package/packages/orq-rc/src/models/operations/createresponse.ts +3325 -0
  482. package/packages/orq-rc/src/models/operations/createspeech.ts +700 -0
  483. package/packages/orq-rc/src/models/operations/createtool.ts +2499 -0
  484. package/packages/orq-rc/src/models/operations/createtranscription.ts +955 -0
  485. package/packages/orq-rc/src/models/operations/createtranslation.ts +930 -0
  486. package/packages/orq-rc/src/models/operations/deleteagent.ts +39 -0
  487. package/packages/orq-rc/src/models/operations/deleteannotation.ts +79 -0
  488. package/packages/orq-rc/src/models/operations/deletechunk.ts +53 -0
  489. package/packages/orq-rc/src/models/operations/deletechunks.ts +125 -0
  490. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +46 -0
  491. package/packages/orq-rc/src/models/operations/deletedataset.ts +39 -0
  492. package/packages/orq-rc/src/models/operations/deletedatasource.ts +46 -0
  493. package/packages/orq-rc/src/models/operations/deleteeval.ts +31 -0
  494. package/packages/orq-rc/src/models/operations/deleteidentity.ts +34 -0
  495. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +39 -0
  496. package/packages/orq-rc/src/models/operations/deletememory.ts +46 -0
  497. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +55 -0
  498. package/packages/orq-rc/src/models/operations/deletememorystore.ts +39 -0
  499. package/packages/orq-rc/src/models/operations/deleteprompt.ts +34 -0
  500. package/packages/orq-rc/src/models/operations/deletetool.ts +36 -0
  501. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +2370 -0
  502. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +4525 -0
  503. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +729 -0
  504. package/packages/orq-rc/src/models/operations/deployments.ts +1269 -0
  505. package/packages/orq-rc/src/models/operations/deploymentstream.ts +4653 -0
  506. package/packages/orq-rc/src/models/operations/filedelete.ts +39 -0
  507. package/packages/orq-rc/src/models/operations/fileget.ts +116 -0
  508. package/packages/orq-rc/src/models/operations/filelist.ts +172 -0
  509. package/packages/orq-rc/src/models/operations/fileupload.ts +170 -0
  510. package/packages/orq-rc/src/models/operations/getagentresponse.ts +46 -0
  511. package/packages/orq-rc/src/models/operations/getallmemories.ts +173 -0
  512. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +188 -0
  513. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +200 -0
  514. package/packages/orq-rc/src/models/operations/getallprompts.ts +3165 -0
  515. package/packages/orq-rc/src/models/operations/getalltools.ts +1398 -0
  516. package/packages/orq-rc/src/models/operations/getchunkscount.ts +121 -0
  517. package/packages/orq-rc/src/models/operations/getevals.ts +2842 -0
  518. package/packages/orq-rc/src/models/operations/getonechunk.ts +171 -0
  519. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +652 -0
  520. package/packages/orq-rc/src/models/operations/getoneprompt.ts +3090 -0
  521. package/packages/orq-rc/src/models/operations/getpromptversion.ts +3135 -0
  522. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +162 -0
  523. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +163 -0
  524. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +110 -0
  525. package/packages/orq-rc/src/models/operations/index.ts +116 -0
  526. package/packages/orq-rc/src/models/operations/invokeagent.ts +777 -0
  527. package/packages/orq-rc/src/models/operations/invokeeval.ts +1253 -0
  528. package/packages/orq-rc/src/models/operations/listagents.ts +2754 -0
  529. package/packages/orq-rc/src/models/operations/listchunks.ts +260 -0
  530. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +263 -0
  531. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +1498 -0
  532. package/packages/orq-rc/src/models/operations/listdatasets.ts +205 -0
  533. package/packages/orq-rc/src/models/operations/listdatasources.ts +235 -0
  534. package/packages/orq-rc/src/models/operations/listidentities.ts +275 -0
  535. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +642 -0
  536. package/packages/orq-rc/src/models/operations/listmodels.ts +143 -0
  537. package/packages/orq-rc/src/models/operations/listpromptversions.ts +3210 -0
  538. package/packages/orq-rc/src/models/operations/parse.ts +777 -0
  539. package/packages/orq-rc/src/models/operations/postv2agentsa2a.ts +252 -0
  540. package/packages/orq-rc/src/models/operations/postv2agentskeycardrefresh.ts +100 -0
  541. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +478 -0
  542. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +108 -0
  543. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +2814 -0
  544. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +1402 -0
  545. package/packages/orq-rc/src/models/operations/retrievedataset.ts +150 -0
  546. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +152 -0
  547. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +117 -0
  548. package/packages/orq-rc/src/models/operations/retrievememory.ts +112 -0
  549. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +118 -0
  550. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +144 -0
  551. package/packages/orq-rc/src/models/operations/retrievetool.ts +1379 -0
  552. package/packages/orq-rc/src/models/operations/runagent.ts +4927 -0
  553. package/packages/orq-rc/src/models/operations/searchknowledge.ts +1762 -0
  554. package/packages/orq-rc/src/models/operations/streamagent.ts +668 -0
  555. package/packages/orq-rc/src/models/operations/streamrunagent.ts +5089 -0
  556. package/packages/orq-rc/src/models/operations/updateagent.ts +6824 -0
  557. package/packages/orq-rc/src/models/operations/updatechunk.ts +236 -0
  558. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2555 -0
  559. package/packages/orq-rc/src/models/operations/updatedataset.ts +206 -0
  560. package/packages/orq-rc/src/models/operations/updatedatasource.ts +186 -0
  561. package/packages/orq-rc/src/models/operations/updateeval.ts +4152 -0
  562. package/packages/orq-rc/src/models/operations/updateidentity.ts +189 -0
  563. package/packages/orq-rc/src/models/operations/updateknowledge.ts +1231 -0
  564. package/packages/orq-rc/src/models/operations/updatememory.ts +142 -0
  565. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +159 -0
  566. package/packages/orq-rc/src/models/operations/updatememorystore.ts +188 -0
  567. package/packages/orq-rc/src/models/operations/updateprompt.ts +5473 -0
  568. package/packages/orq-rc/src/models/operations/updatetool.ts +2810 -0
  569. package/packages/orq-rc/src/sdk/agents.ts +234 -0
  570. package/packages/orq-rc/src/sdk/annotations.ts +39 -0
  571. package/packages/orq-rc/src/sdk/audio.ts +25 -0
  572. package/packages/orq-rc/src/sdk/chat.ts +13 -0
  573. package/packages/orq-rc/src/sdk/chunking.ts +27 -0
  574. package/packages/orq-rc/src/sdk/completions.ts +32 -0
  575. package/packages/orq-rc/src/sdk/contacts.ts +27 -0
  576. package/packages/orq-rc/src/sdk/datasets.ts +204 -0
  577. package/packages/orq-rc/src/sdk/deployments.ts +89 -0
  578. package/packages/orq-rc/src/sdk/edits.ts +27 -0
  579. package/packages/orq-rc/src/sdk/embeddings.ts +27 -0
  580. package/packages/orq-rc/src/sdk/evals.ts +84 -0
  581. package/packages/orq-rc/src/sdk/evaluators.ts +27 -0
  582. package/packages/orq-rc/src/sdk/feedback.ts +27 -0
  583. package/packages/orq-rc/src/sdk/files.ts +78 -0
  584. package/packages/orq-rc/src/sdk/generations.ts +27 -0
  585. package/packages/orq-rc/src/sdk/identities.ts +99 -0
  586. package/packages/orq-rc/src/sdk/images.ts +25 -0
  587. package/packages/orq-rc/src/sdk/index.ts +5 -0
  588. package/packages/orq-rc/src/sdk/knowledge.ts +309 -0
  589. package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
  590. package/packages/orq-rc/src/sdk/metrics.ts +27 -0
  591. package/packages/orq-rc/src/sdk/models.ts +25 -0
  592. package/packages/orq-rc/src/sdk/moderations.ts +24 -0
  593. package/packages/orq-rc/src/sdk/orqcompletions.ts +32 -0
  594. package/packages/orq-rc/src/sdk/orqresponses.ts +32 -0
  595. package/packages/orq-rc/src/sdk/prompts.ts +126 -0
  596. package/packages/orq-rc/src/sdk/remoteconfigs.ts +24 -0
  597. package/packages/orq-rc/src/sdk/rerank.ts +27 -0
  598. package/packages/orq-rc/src/sdk/responses.ts +53 -0
  599. package/packages/orq-rc/src/sdk/router.ts +72 -0
  600. package/packages/orq-rc/src/sdk/sdk.ts +115 -0
  601. package/packages/orq-rc/src/sdk/speech.ts +27 -0
  602. package/packages/orq-rc/src/sdk/tools.ts +135 -0
  603. package/packages/orq-rc/src/sdk/transcriptions.ts +24 -0
  604. package/packages/orq-rc/src/sdk/translations.ts +24 -0
  605. package/packages/orq-rc/src/sdk/variations.ts +27 -0
  606. package/packages/orq-rc/src/types/async.ts +68 -0
  607. package/packages/orq-rc/src/types/blobs.ts +32 -0
  608. package/packages/orq-rc/src/types/constdatetime.ts +15 -0
  609. package/packages/orq-rc/src/types/enums.ts +45 -0
  610. package/packages/orq-rc/src/types/fp.ts +50 -0
  611. package/packages/orq-rc/src/types/index.ts +11 -0
  612. package/packages/orq-rc/src/types/operations.ts +105 -0
  613. package/packages/orq-rc/src/types/rfcdate.ts +54 -0
  614. package/packages/orq-rc/src/types/streams.ts +21 -0
  615. package/packages/orq-rc/src/types/unrecognized.ts +35 -0
  616. package/sdk/agents.d.ts +16 -2
  617. package/sdk/agents.d.ts.map +1 -1
  618. package/sdk/agents.js +22 -2
  619. package/sdk/agents.js.map +1 -1
  620. package/sdk/files.d.ts +1 -1
  621. package/sdk/files.js +1 -1
  622. package/sdk/responses.d.ts +8 -0
  623. package/sdk/responses.d.ts.map +1 -1
  624. package/sdk/responses.js +10 -0
  625. package/sdk/responses.js.map +1 -1
  626. package/src/funcs/agentsList.ts +5 -0
  627. package/src/funcs/agentsPostV2AgentsA2a.ts +178 -0
  628. package/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +187 -0
  629. package/src/funcs/agentsResponsesGet.ts +182 -0
  630. package/src/funcs/agentsStream.ts +4 -1
  631. package/src/funcs/agentsStreamRun.ts +4 -1
  632. package/src/funcs/agentsUpdate.ts +2 -2
  633. package/src/funcs/deploymentsStream.ts +4 -1
  634. package/src/funcs/filesCreate.ts +12 -1
  635. package/src/funcs/routerAudioTranscriptionsCreate.ts +11 -0
  636. package/src/funcs/routerAudioTranslationsCreate.ts +11 -0
  637. package/src/lib/config.ts +3 -3
  638. package/src/lib/event-streams.ts +10 -1
  639. package/src/lib/matchers.ts +3 -2
  640. package/src/lib/security.ts +1 -2
  641. package/src/models/components/createagentresponse.ts +6 -0
  642. package/src/models/components/extendedmessage.ts +146 -0
  643. package/src/models/components/getagentresponse.ts +348 -0
  644. package/src/models/components/index.ts +3 -0
  645. package/src/models/components/partdoneevent.ts +1 -1
  646. package/src/models/components/reasoningpart.ts +1 -1
  647. package/src/models/components/responsedoneevent.ts +6 -0
  648. package/src/models/components/responsestartedevent.ts +6 -0
  649. package/src/models/components/telemetry.ts +48 -0
  650. package/src/models/errors/index.ts +2 -0
  651. package/src/models/errors/postv2agentsa2a.ts +96 -0
  652. package/src/models/errors/postv2agentskeycardrefresh.ts +97 -0
  653. package/src/models/operations/createagentrequest.ts +243 -943
  654. package/src/models/operations/createagentresponserequest.ts +37 -2
  655. package/src/models/operations/createannotation.ts +5 -1
  656. package/src/models/operations/createchatcompletion.ts +14 -3
  657. package/src/models/operations/createcompletion.ts +8 -3
  658. package/src/models/operations/createcontact.ts +1 -1
  659. package/src/models/operations/createdataset.ts +1 -1
  660. package/src/models/operations/createdatasetitem.ts +4 -4
  661. package/src/models/operations/createdatasource.ts +1 -1
  662. package/src/models/operations/createeval.ts +16 -16
  663. package/src/models/operations/createfeedback.ts +2 -2
  664. package/src/models/operations/createidentity.ts +1 -1
  665. package/src/models/operations/createprompt.ts +59 -69
  666. package/src/models/operations/createresponse.ts +2 -1
  667. package/src/models/operations/createtool.ts +6 -6
  668. package/src/models/operations/deploymentinvoke.ts +39 -0
  669. package/src/models/operations/deployments.ts +1 -0
  670. package/src/models/operations/deploymentstream.ts +39 -0
  671. package/src/models/operations/fileget.ts +1 -1
  672. package/src/models/operations/filelist.ts +1 -1
  673. package/src/models/operations/fileupload.ts +1 -1
  674. package/src/models/operations/getagentresponse.ts +46 -0
  675. package/src/models/operations/getallprompts.ts +1 -0
  676. package/src/models/operations/getalltools.ts +6 -6
  677. package/src/models/operations/getevals.ts +16 -16
  678. package/src/models/operations/getoneprompt.ts +1 -0
  679. package/src/models/operations/getpromptversion.ts +1 -0
  680. package/src/models/operations/index.ts +3 -0
  681. package/src/models/operations/invokeagent.ts +45 -1
  682. package/src/models/operations/listagents.ts +218 -482
  683. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  684. package/src/models/operations/listdatasets.ts +1 -1
  685. package/src/models/operations/listdatasources.ts +1 -1
  686. package/src/models/operations/listidentities.ts +1 -1
  687. package/src/models/operations/listpromptversions.ts +1 -0
  688. package/src/models/operations/postv2agentsa2a.ts +252 -0
  689. package/src/models/operations/postv2agentskeycardrefresh.ts +100 -0
  690. package/src/models/operations/retrieveagentrequest.ts +207 -497
  691. package/src/models/operations/retrievedatapoint.ts +4 -4
  692. package/src/models/operations/retrievedataset.ts +1 -1
  693. package/src/models/operations/retrievedatasource.ts +1 -1
  694. package/src/models/operations/retrieveidentity.ts +1 -1
  695. package/src/models/operations/retrievetool.ts +6 -6
  696. package/src/models/operations/runagent.ts +69 -493
  697. package/src/models/operations/streamagent.ts +40 -1
  698. package/src/models/operations/streamrunagent.ts +36 -493
  699. package/src/models/operations/updateagent.ts +380 -1003
  700. package/src/models/operations/updatedatapoint.ts +4 -4
  701. package/src/models/operations/updatedataset.ts +1 -1
  702. package/src/models/operations/updatedatasource.ts +1 -1
  703. package/src/models/operations/updateeval.ts +102 -16
  704. package/src/models/operations/updateidentity.ts +1 -1
  705. package/src/models/operations/updatememorystore.ts +3 -61
  706. package/src/models/operations/updateprompt.ts +1 -0
  707. package/src/models/operations/updatetool.ts +121 -7
  708. package/src/sdk/agents.ts +39 -1
  709. package/src/sdk/files.ts +1 -1
  710. package/src/sdk/responses.ts +19 -0
@@ -0,0 +1,2810 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import {
8
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { ClosedEnum } from "../../types/enums.js";
12
+ import { Result as SafeParseResult } from "../../types/fp.js";
13
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
14
+
15
+ /**
16
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
17
+ */
18
+ export const UpdateToolRequestBodyToolsRequest5Status = {
19
+ Live: "live",
20
+ Draft: "draft",
21
+ Pending: "pending",
22
+ Published: "published",
23
+ } as const;
24
+ /**
25
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
26
+ */
27
+ export type UpdateToolRequestBodyToolsRequest5Status = ClosedEnum<
28
+ typeof UpdateToolRequestBodyToolsRequest5Status
29
+ >;
30
+
31
+ /**
32
+ * The type must be "object"
33
+ */
34
+ export const UpdateToolRequestBodyToolsRequest5CodeToolType = {
35
+ Object: "object",
36
+ } as const;
37
+ /**
38
+ * The type must be "object"
39
+ */
40
+ export type UpdateToolRequestBodyToolsRequest5CodeToolType = ClosedEnum<
41
+ typeof UpdateToolRequestBodyToolsRequest5CodeToolType
42
+ >;
43
+
44
+ /**
45
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
46
+ */
47
+ export type UpdateToolRequestBodyToolsParameters = {
48
+ /**
49
+ * The type must be "object"
50
+ */
51
+ type: UpdateToolRequestBodyToolsRequest5CodeToolType;
52
+ /**
53
+ * The properties of the function parameters
54
+ */
55
+ properties: { [k: string]: any };
56
+ /**
57
+ * Array of required parameter names
58
+ */
59
+ required: Array<string>;
60
+ additionalProperties?: { [k: string]: any } | undefined;
61
+ };
62
+
63
+ export const UpdateToolRequestBodyLanguage = {
64
+ Python: "python",
65
+ } as const;
66
+ export type UpdateToolRequestBodyLanguage = ClosedEnum<
67
+ typeof UpdateToolRequestBodyLanguage
68
+ >;
69
+
70
+ export type UpdateToolRequestBodyCodeTool = {
71
+ /**
72
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
73
+ */
74
+ parameters?: UpdateToolRequestBodyToolsParameters | undefined;
75
+ language: UpdateToolRequestBodyLanguage;
76
+ /**
77
+ * The code to execute.
78
+ */
79
+ code: string;
80
+ };
81
+
82
+ export const UpdateToolRequestBodyToolsRequest5VersionIncrement = {
83
+ Major: "major",
84
+ Minor: "minor",
85
+ Patch: "patch",
86
+ } as const;
87
+ export type UpdateToolRequestBodyToolsRequest5VersionIncrement = ClosedEnum<
88
+ typeof UpdateToolRequestBodyToolsRequest5VersionIncrement
89
+ >;
90
+
91
+ /**
92
+ * Updates an existing code execution tool configuration.
93
+ */
94
+ export type UpdateCodeExecutionTool = {
95
+ /**
96
+ * Entity storage path in the format: `project/folder/subfolder/...`
97
+ *
98
+ * @remarks
99
+ *
100
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
101
+ *
102
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
103
+ */
104
+ path?: string | undefined;
105
+ /**
106
+ * Unique key of the tool as it will be displayed in the UI
107
+ */
108
+ key?: string | undefined;
109
+ /**
110
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
111
+ */
112
+ displayName?: string | undefined;
113
+ /**
114
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
115
+ */
116
+ description?: string | undefined;
117
+ /**
118
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
119
+ */
120
+ status?: UpdateToolRequestBodyToolsRequest5Status | undefined;
121
+ type: "code";
122
+ codeTool?: UpdateToolRequestBodyCodeTool | undefined;
123
+ versionIncrement?:
124
+ | UpdateToolRequestBodyToolsRequest5VersionIncrement
125
+ | undefined;
126
+ versionDescription?: string | undefined;
127
+ };
128
+
129
+ /**
130
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
131
+ */
132
+ export const UpdateToolRequestBodyToolsRequest4Status = {
133
+ Live: "live",
134
+ Draft: "draft",
135
+ Pending: "pending",
136
+ Published: "published",
137
+ } as const;
138
+ /**
139
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
140
+ */
141
+ export type UpdateToolRequestBodyToolsRequest4Status = ClosedEnum<
142
+ typeof UpdateToolRequestBodyToolsRequest4Status
143
+ >;
144
+
145
+ export type UpdateToolRequestBodyHeaders = {
146
+ value: string;
147
+ encrypted?: boolean | undefined;
148
+ };
149
+
150
+ export const UpdateToolRequestBodyToolsRequest4McpType = {
151
+ Object: "object",
152
+ } as const;
153
+ export type UpdateToolRequestBodyToolsRequest4McpType = ClosedEnum<
154
+ typeof UpdateToolRequestBodyToolsRequest4McpType
155
+ >;
156
+
157
+ export type UpdateToolRequestBodyToolsSchema = {
158
+ type: UpdateToolRequestBodyToolsRequest4McpType;
159
+ properties?: { [k: string]: any } | undefined;
160
+ required?: Array<string> | undefined;
161
+ };
162
+
163
+ export type RequestBodyTools = {
164
+ id?: string | undefined;
165
+ name: string;
166
+ description?: string | undefined;
167
+ schema: UpdateToolRequestBodyToolsSchema;
168
+ };
169
+
170
+ /**
171
+ * The connection type used by the MCP server
172
+ */
173
+ export const UpdateToolRequestBodyConnectionType = {
174
+ Http: "http",
175
+ Sse: "sse",
176
+ } as const;
177
+ /**
178
+ * The connection type used by the MCP server
179
+ */
180
+ export type UpdateToolRequestBodyConnectionType = ClosedEnum<
181
+ typeof UpdateToolRequestBodyConnectionType
182
+ >;
183
+
184
+ export type UpdateToolRequestBodyMcp = {
185
+ /**
186
+ * The MCP server URL (cached for execution)
187
+ */
188
+ serverUrl?: string | undefined;
189
+ /**
190
+ * HTTP headers for MCP server requests with encryption support
191
+ */
192
+ headers?: { [k: string]: UpdateToolRequestBodyHeaders } | undefined;
193
+ /**
194
+ * Array of tools available from the MCP server
195
+ */
196
+ tools?: Array<RequestBodyTools> | undefined;
197
+ /**
198
+ * The connection type used by the MCP server
199
+ */
200
+ connectionType?: UpdateToolRequestBodyConnectionType | undefined;
201
+ };
202
+
203
+ export const UpdateToolRequestBodyToolsRequest4VersionIncrement = {
204
+ Major: "major",
205
+ Minor: "minor",
206
+ Patch: "patch",
207
+ } as const;
208
+ export type UpdateToolRequestBodyToolsRequest4VersionIncrement = ClosedEnum<
209
+ typeof UpdateToolRequestBodyToolsRequest4VersionIncrement
210
+ >;
211
+
212
+ /**
213
+ * Updates an existing MCP tool configuration.
214
+ */
215
+ export type UpdateMCPTool = {
216
+ /**
217
+ * Entity storage path in the format: `project/folder/subfolder/...`
218
+ *
219
+ * @remarks
220
+ *
221
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
222
+ *
223
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
224
+ */
225
+ path?: string | undefined;
226
+ /**
227
+ * Unique key of the tool as it will be displayed in the UI
228
+ */
229
+ key?: string | undefined;
230
+ /**
231
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
232
+ */
233
+ displayName?: string | undefined;
234
+ /**
235
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
236
+ */
237
+ description?: string | undefined;
238
+ /**
239
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
240
+ */
241
+ status?: UpdateToolRequestBodyToolsRequest4Status | undefined;
242
+ type: "mcp";
243
+ mcp?: UpdateToolRequestBodyMcp | undefined;
244
+ versionIncrement?:
245
+ | UpdateToolRequestBodyToolsRequest4VersionIncrement
246
+ | undefined;
247
+ versionDescription?: string | undefined;
248
+ };
249
+
250
+ /**
251
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
252
+ */
253
+ export const UpdateToolRequestBodyToolsRequestStatus = {
254
+ Live: "live",
255
+ Draft: "draft",
256
+ Pending: "pending",
257
+ Published: "published",
258
+ } as const;
259
+ /**
260
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
261
+ */
262
+ export type UpdateToolRequestBodyToolsRequestStatus = ClosedEnum<
263
+ typeof UpdateToolRequestBodyToolsRequestStatus
264
+ >;
265
+
266
+ /**
267
+ * The HTTP method to use.
268
+ */
269
+ export const UpdateToolRequestBodyMethod = {
270
+ Get: "GET",
271
+ Post: "POST",
272
+ Put: "PUT",
273
+ Delete: "DELETE",
274
+ } as const;
275
+ /**
276
+ * The HTTP method to use.
277
+ */
278
+ export type UpdateToolRequestBodyMethod = ClosedEnum<
279
+ typeof UpdateToolRequestBodyMethod
280
+ >;
281
+
282
+ export type UpdateToolHeaders2 = {
283
+ value: string;
284
+ encrypted?: boolean | undefined;
285
+ };
286
+
287
+ export type UpdateToolRequestBodyToolsHeaders = UpdateToolHeaders2 | string;
288
+
289
+ /**
290
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
291
+ */
292
+ export type UpdateToolRequestBodyBlueprint = {
293
+ /**
294
+ * The URL to send the request to.
295
+ */
296
+ url: string;
297
+ /**
298
+ * The HTTP method to use.
299
+ */
300
+ method: UpdateToolRequestBodyMethod;
301
+ /**
302
+ * The headers to send with the request. Can be a string value or an object with value and encrypted properties.
303
+ */
304
+ headers?: { [k: string]: UpdateToolHeaders2 | string } | undefined;
305
+ /**
306
+ * The body to send with the request.
307
+ */
308
+ body?: { [k: string]: any } | undefined;
309
+ };
310
+
311
+ /**
312
+ * The type of the argument.
313
+ */
314
+ export const UpdateToolRequestBodyToolsRequest3Type = {
315
+ String: "string",
316
+ Number: "number",
317
+ Boolean: "boolean",
318
+ } as const;
319
+ /**
320
+ * The type of the argument.
321
+ */
322
+ export type UpdateToolRequestBodyToolsRequest3Type = ClosedEnum<
323
+ typeof UpdateToolRequestBodyToolsRequest3Type
324
+ >;
325
+
326
+ /**
327
+ * The default value of the argument.
328
+ */
329
+ export type UpdateToolRequestBodyDefaultValue = string | number | boolean;
330
+
331
+ export type UpdateToolRequestBodyArguments = {
332
+ /**
333
+ * The type of the argument.
334
+ */
335
+ type: UpdateToolRequestBodyToolsRequest3Type;
336
+ /**
337
+ * A description of the argument.
338
+ */
339
+ description: string;
340
+ /**
341
+ * Whether to send the argument to the model. If set to false, the argument will not be sent to the model and needs to be provided by the user or it will be left blank.
342
+ */
343
+ sendToModel?: boolean | undefined;
344
+ /**
345
+ * The default value of the argument.
346
+ */
347
+ defaultValue?: string | number | boolean | undefined;
348
+ };
349
+
350
+ export type UpdateToolRequestBodyHttp = {
351
+ /**
352
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
353
+ */
354
+ blueprint: UpdateToolRequestBodyBlueprint;
355
+ /**
356
+ * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
357
+ */
358
+ arguments?: { [k: string]: UpdateToolRequestBodyArguments } | undefined;
359
+ };
360
+
361
+ export const UpdateToolRequestBodyToolsRequestVersionIncrement = {
362
+ Major: "major",
363
+ Minor: "minor",
364
+ Patch: "patch",
365
+ } as const;
366
+ export type UpdateToolRequestBodyToolsRequestVersionIncrement = ClosedEnum<
367
+ typeof UpdateToolRequestBodyToolsRequestVersionIncrement
368
+ >;
369
+
370
+ /**
371
+ * Updates an existing HTTP tool configuration.
372
+ */
373
+ export type UpdateHTTPTool = {
374
+ /**
375
+ * Entity storage path in the format: `project/folder/subfolder/...`
376
+ *
377
+ * @remarks
378
+ *
379
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
380
+ *
381
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
382
+ */
383
+ path?: string | undefined;
384
+ /**
385
+ * Unique key of the tool as it will be displayed in the UI
386
+ */
387
+ key?: string | undefined;
388
+ /**
389
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
390
+ */
391
+ displayName?: string | undefined;
392
+ /**
393
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
394
+ */
395
+ description?: string | undefined;
396
+ /**
397
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
398
+ */
399
+ status?: UpdateToolRequestBodyToolsRequestStatus | undefined;
400
+ type: "http";
401
+ http?: UpdateToolRequestBodyHttp | undefined;
402
+ versionIncrement?:
403
+ | UpdateToolRequestBodyToolsRequestVersionIncrement
404
+ | undefined;
405
+ versionDescription?: string | undefined;
406
+ };
407
+
408
+ /**
409
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
410
+ */
411
+ export const UpdateToolRequestBodyToolsStatus = {
412
+ Live: "live",
413
+ Draft: "draft",
414
+ Pending: "pending",
415
+ Published: "published",
416
+ } as const;
417
+ /**
418
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
419
+ */
420
+ export type UpdateToolRequestBodyToolsStatus = ClosedEnum<
421
+ typeof UpdateToolRequestBodyToolsStatus
422
+ >;
423
+
424
+ /**
425
+ * The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
426
+ */
427
+ export type UpdateToolRequestBodySchema = {
428
+ /**
429
+ * The JSON Schema type
430
+ */
431
+ type: string;
432
+ /**
433
+ * The properties of the JSON Schema object
434
+ */
435
+ properties: { [k: string]: any };
436
+ /**
437
+ * Array of required property names
438
+ */
439
+ required: Array<string>;
440
+ additionalProperties?: { [k: string]: any } | undefined;
441
+ };
442
+
443
+ export type UpdateToolRequestBodyJsonSchema = {
444
+ /**
445
+ * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
446
+ */
447
+ name: string;
448
+ /**
449
+ * A description of what the response format is for. This will be shown to the user.
450
+ */
451
+ description: string;
452
+ /**
453
+ * The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
454
+ */
455
+ schema: UpdateToolRequestBodySchema;
456
+ /**
457
+ * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. Only compatible with `OpenAI` models.
458
+ */
459
+ strict?: boolean | undefined;
460
+ };
461
+
462
+ export const UpdateToolRequestBodyToolsVersionIncrement = {
463
+ Major: "major",
464
+ Minor: "minor",
465
+ Patch: "patch",
466
+ } as const;
467
+ export type UpdateToolRequestBodyToolsVersionIncrement = ClosedEnum<
468
+ typeof UpdateToolRequestBodyToolsVersionIncrement
469
+ >;
470
+
471
+ /**
472
+ * Updates an existing JSON Schema tool configuration.
473
+ */
474
+ export type UpdateJSONSchemaTool = {
475
+ /**
476
+ * Entity storage path in the format: `project/folder/subfolder/...`
477
+ *
478
+ * @remarks
479
+ *
480
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
481
+ *
482
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
483
+ */
484
+ path?: string | undefined;
485
+ /**
486
+ * Unique key of the tool as it will be displayed in the UI
487
+ */
488
+ key?: string | undefined;
489
+ /**
490
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
491
+ */
492
+ displayName?: string | undefined;
493
+ /**
494
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
495
+ */
496
+ description?: string | undefined;
497
+ /**
498
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
499
+ */
500
+ status?: UpdateToolRequestBodyToolsStatus | undefined;
501
+ type: "json_schema";
502
+ jsonSchema?: UpdateToolRequestBodyJsonSchema | undefined;
503
+ versionIncrement?: UpdateToolRequestBodyToolsVersionIncrement | undefined;
504
+ versionDescription?: string | undefined;
505
+ };
506
+
507
+ /**
508
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
509
+ */
510
+ export const UpdateToolRequestBodyStatus = {
511
+ Live: "live",
512
+ Draft: "draft",
513
+ Pending: "pending",
514
+ Published: "published",
515
+ } as const;
516
+ /**
517
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
518
+ */
519
+ export type UpdateToolRequestBodyStatus = ClosedEnum<
520
+ typeof UpdateToolRequestBodyStatus
521
+ >;
522
+
523
+ /**
524
+ * The type must be "object"
525
+ */
526
+ export const UpdateToolRequestBodyToolsRequest1Type = {
527
+ Object: "object",
528
+ } as const;
529
+ /**
530
+ * The type must be "object"
531
+ */
532
+ export type UpdateToolRequestBodyToolsRequest1Type = ClosedEnum<
533
+ typeof UpdateToolRequestBodyToolsRequest1Type
534
+ >;
535
+
536
+ /**
537
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
538
+ */
539
+ export type UpdateToolRequestBodyParameters = {
540
+ /**
541
+ * The type must be "object"
542
+ */
543
+ type: UpdateToolRequestBodyToolsRequest1Type;
544
+ /**
545
+ * The properties of the function parameters
546
+ */
547
+ properties: { [k: string]: any };
548
+ /**
549
+ * Array of required parameter names
550
+ */
551
+ required: Array<string>;
552
+ additionalProperties?: { [k: string]: any } | undefined;
553
+ };
554
+
555
+ export type UpdateToolRequestBodyFunction = {
556
+ /**
557
+ * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
558
+ */
559
+ name: string;
560
+ /**
561
+ * A description of what the function does, used by the model to choose when and how to call the function.
562
+ */
563
+ description?: string | undefined;
564
+ /**
565
+ * Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Currently only compatible with `OpenAI` models.
566
+ */
567
+ strict?: boolean | undefined;
568
+ /**
569
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
570
+ */
571
+ parameters?: UpdateToolRequestBodyParameters | undefined;
572
+ };
573
+
574
+ export const UpdateToolRequestBodyVersionIncrement = {
575
+ Major: "major",
576
+ Minor: "minor",
577
+ Patch: "patch",
578
+ } as const;
579
+ export type UpdateToolRequestBodyVersionIncrement = ClosedEnum<
580
+ typeof UpdateToolRequestBodyVersionIncrement
581
+ >;
582
+
583
+ /**
584
+ * Updates an existing function tool configuration.
585
+ */
586
+ export type UpdateFunctionTool = {
587
+ /**
588
+ * Entity storage path in the format: `project/folder/subfolder/...`
589
+ *
590
+ * @remarks
591
+ *
592
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
593
+ *
594
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
595
+ */
596
+ path?: string | undefined;
597
+ /**
598
+ * Unique key of the tool as it will be displayed in the UI
599
+ */
600
+ key?: string | undefined;
601
+ /**
602
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
603
+ */
604
+ displayName?: string | undefined;
605
+ /**
606
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
607
+ */
608
+ description?: string | undefined;
609
+ /**
610
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
611
+ */
612
+ status?: UpdateToolRequestBodyStatus | undefined;
613
+ type: "function";
614
+ function?: UpdateToolRequestBodyFunction | undefined;
615
+ versionIncrement?: UpdateToolRequestBodyVersionIncrement | undefined;
616
+ versionDescription?: string | undefined;
617
+ };
618
+
619
+ /**
620
+ * The tool to update
621
+ */
622
+ export type UpdateToolRequestBody =
623
+ | UpdateFunctionTool
624
+ | UpdateJSONSchemaTool
625
+ | UpdateHTTPTool
626
+ | UpdateMCPTool
627
+ | UpdateCodeExecutionTool;
628
+
629
+ export type UpdateToolRequest = {
630
+ toolId: string;
631
+ /**
632
+ * The tool to update
633
+ */
634
+ requestBody?:
635
+ | UpdateFunctionTool
636
+ | UpdateJSONSchemaTool
637
+ | UpdateHTTPTool
638
+ | UpdateMCPTool
639
+ | UpdateCodeExecutionTool
640
+ | undefined;
641
+ };
642
+
643
+ /**
644
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
645
+ */
646
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus = {
647
+ Live: "live",
648
+ Draft: "draft",
649
+ Pending: "pending",
650
+ Published: "published",
651
+ } as const;
652
+ /**
653
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
654
+ */
655
+ export type UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus =
656
+ ClosedEnum<
657
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus
658
+ >;
659
+
660
+ /**
661
+ * The type must be "object"
662
+ */
663
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson5Type = {
664
+ Object: "object",
665
+ } as const;
666
+ /**
667
+ * The type must be "object"
668
+ */
669
+ export type UpdateToolResponseBodyToolsResponse200ApplicationJson5Type =
670
+ ClosedEnum<typeof UpdateToolResponseBodyToolsResponse200ApplicationJson5Type>;
671
+
672
+ /**
673
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
674
+ */
675
+ export type UpdateToolResponseBodyToolsParameters = {
676
+ /**
677
+ * The type must be "object"
678
+ */
679
+ type: UpdateToolResponseBodyToolsResponse200ApplicationJson5Type;
680
+ /**
681
+ * The properties of the function parameters
682
+ */
683
+ properties: { [k: string]: any };
684
+ /**
685
+ * Array of required parameter names
686
+ */
687
+ required: Array<string>;
688
+ additionalProperties?: { [k: string]: any } | undefined;
689
+ };
690
+
691
+ export const UpdateToolResponseBodyLanguage = {
692
+ Python: "python",
693
+ } as const;
694
+ export type UpdateToolResponseBodyLanguage = ClosedEnum<
695
+ typeof UpdateToolResponseBodyLanguage
696
+ >;
697
+
698
+ export type UpdateToolResponseBodyCodeTool = {
699
+ /**
700
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
701
+ */
702
+ parameters?: UpdateToolResponseBodyToolsParameters | undefined;
703
+ language: UpdateToolResponseBodyLanguage;
704
+ /**
705
+ * The code to execute.
706
+ */
707
+ code: string;
708
+ };
709
+
710
+ /**
711
+ * Executes code snippets in a sandboxed environment, currently supporting Python.
712
+ */
713
+ export type UpdateToolResponseBodyCodeExecutionTool = {
714
+ id: string;
715
+ /**
716
+ * Entity storage path in the format: `project/folder/subfolder/...`
717
+ *
718
+ * @remarks
719
+ *
720
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
721
+ *
722
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
723
+ */
724
+ path: string;
725
+ /**
726
+ * Unique key of the tool as it will be displayed in the UI
727
+ */
728
+ key: string;
729
+ /**
730
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
731
+ */
732
+ displayName?: string | undefined;
733
+ /**
734
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
735
+ */
736
+ description: string;
737
+ /**
738
+ * The id of the user that created the tool
739
+ */
740
+ createdById?: string | undefined;
741
+ /**
742
+ * The id of the user that last updated the tool
743
+ */
744
+ updatedById?: string | undefined;
745
+ projectId: string;
746
+ workspaceId: string;
747
+ created: string;
748
+ updated: string;
749
+ /**
750
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
751
+ */
752
+ status: UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus;
753
+ versionHash?: string | undefined;
754
+ type: "code";
755
+ codeTool: UpdateToolResponseBodyCodeTool;
756
+ };
757
+
758
+ /**
759
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
760
+ */
761
+ export const UpdateToolResponseBodyToolsResponse200Status = {
762
+ Live: "live",
763
+ Draft: "draft",
764
+ Pending: "pending",
765
+ Published: "published",
766
+ } as const;
767
+ /**
768
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
769
+ */
770
+ export type UpdateToolResponseBodyToolsResponse200Status = ClosedEnum<
771
+ typeof UpdateToolResponseBodyToolsResponse200Status
772
+ >;
773
+
774
+ export type UpdateToolResponseBodyHeaders = {
775
+ value: string;
776
+ encrypted: boolean;
777
+ };
778
+
779
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson4Type = {
780
+ Object: "object",
781
+ } as const;
782
+ export type UpdateToolResponseBodyToolsResponse200ApplicationJson4Type =
783
+ ClosedEnum<typeof UpdateToolResponseBodyToolsResponse200ApplicationJson4Type>;
784
+
785
+ export type UpdateToolResponseBodyToolsSchema = {
786
+ type: UpdateToolResponseBodyToolsResponse200ApplicationJson4Type;
787
+ properties?: { [k: string]: any } | undefined;
788
+ required?: Array<string> | undefined;
789
+ };
790
+
791
+ export type UpdateToolResponseBodyTools = {
792
+ id: string;
793
+ name: string;
794
+ description?: string | undefined;
795
+ schema: UpdateToolResponseBodyToolsSchema;
796
+ };
797
+
798
+ /**
799
+ * The connection type used by the MCP server
800
+ */
801
+ export const UpdateToolResponseBodyConnectionType = {
802
+ Http: "http",
803
+ Sse: "sse",
804
+ } as const;
805
+ /**
806
+ * The connection type used by the MCP server
807
+ */
808
+ export type UpdateToolResponseBodyConnectionType = ClosedEnum<
809
+ typeof UpdateToolResponseBodyConnectionType
810
+ >;
811
+
812
+ export type UpdateToolResponseBodyMcp = {
813
+ /**
814
+ * The MCP server URL (cached for execution)
815
+ */
816
+ serverUrl: string;
817
+ /**
818
+ * HTTP headers for MCP server requests with encryption support
819
+ */
820
+ headers?: { [k: string]: UpdateToolResponseBodyHeaders } | undefined;
821
+ /**
822
+ * Array of tools available from the MCP server
823
+ */
824
+ tools: Array<UpdateToolResponseBodyTools>;
825
+ /**
826
+ * The connection type used by the MCP server
827
+ */
828
+ connectionType: UpdateToolResponseBodyConnectionType;
829
+ };
830
+
831
+ /**
832
+ * A tool from a Model Context Protocol (MCP) server that provides standardized access to external capabilities.
833
+ */
834
+ export type UpdateToolResponseBodyMCPTool = {
835
+ id: string;
836
+ /**
837
+ * Entity storage path in the format: `project/folder/subfolder/...`
838
+ *
839
+ * @remarks
840
+ *
841
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
842
+ *
843
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
844
+ */
845
+ path: string;
846
+ /**
847
+ * Unique key of the tool as it will be displayed in the UI
848
+ */
849
+ key: string;
850
+ /**
851
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
852
+ */
853
+ displayName?: string | undefined;
854
+ /**
855
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
856
+ */
857
+ description: string;
858
+ /**
859
+ * The id of the user that created the tool
860
+ */
861
+ createdById?: string | undefined;
862
+ /**
863
+ * The id of the user that last updated the tool
864
+ */
865
+ updatedById?: string | undefined;
866
+ projectId: string;
867
+ workspaceId: string;
868
+ created: string;
869
+ updated: string;
870
+ /**
871
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
872
+ */
873
+ status: UpdateToolResponseBodyToolsResponse200Status;
874
+ versionHash?: string | undefined;
875
+ type: "mcp";
876
+ mcp: UpdateToolResponseBodyMcp;
877
+ };
878
+
879
+ /**
880
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
881
+ */
882
+ export const UpdateToolResponseBodyToolsResponseStatus = {
883
+ Live: "live",
884
+ Draft: "draft",
885
+ Pending: "pending",
886
+ Published: "published",
887
+ } as const;
888
+ /**
889
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
890
+ */
891
+ export type UpdateToolResponseBodyToolsResponseStatus = ClosedEnum<
892
+ typeof UpdateToolResponseBodyToolsResponseStatus
893
+ >;
894
+
895
+ /**
896
+ * The HTTP method to use.
897
+ */
898
+ export const UpdateToolResponseBodyMethod = {
899
+ Get: "GET",
900
+ Post: "POST",
901
+ Put: "PUT",
902
+ Delete: "DELETE",
903
+ } as const;
904
+ /**
905
+ * The HTTP method to use.
906
+ */
907
+ export type UpdateToolResponseBodyMethod = ClosedEnum<
908
+ typeof UpdateToolResponseBodyMethod
909
+ >;
910
+
911
+ export type UpdateToolHeadersTools2 = {
912
+ value: string;
913
+ encrypted: boolean;
914
+ };
915
+
916
+ export type UpdateToolResponseBodyToolsHeaders =
917
+ | UpdateToolHeadersTools2
918
+ | string;
919
+
920
+ /**
921
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
922
+ */
923
+ export type UpdateToolResponseBodyBlueprint = {
924
+ /**
925
+ * The URL to send the request to.
926
+ */
927
+ url: string;
928
+ /**
929
+ * The HTTP method to use.
930
+ */
931
+ method: UpdateToolResponseBodyMethod;
932
+ /**
933
+ * The headers to send with the request. Can be a string value or an object with value and encrypted properties.
934
+ */
935
+ headers?: { [k: string]: UpdateToolHeadersTools2 | string } | undefined;
936
+ /**
937
+ * The body to send with the request.
938
+ */
939
+ body?: { [k: string]: any } | undefined;
940
+ };
941
+
942
+ /**
943
+ * The type of the argument.
944
+ */
945
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson3Type = {
946
+ String: "string",
947
+ Number: "number",
948
+ Boolean: "boolean",
949
+ } as const;
950
+ /**
951
+ * The type of the argument.
952
+ */
953
+ export type UpdateToolResponseBodyToolsResponse200ApplicationJson3Type =
954
+ ClosedEnum<typeof UpdateToolResponseBodyToolsResponse200ApplicationJson3Type>;
955
+
956
+ /**
957
+ * The default value of the argument.
958
+ */
959
+ export type UpdateToolResponseBodyDefaultValue = string | number | boolean;
960
+
961
+ export type UpdateToolResponseBodyArguments = {
962
+ /**
963
+ * The type of the argument.
964
+ */
965
+ type: UpdateToolResponseBodyToolsResponse200ApplicationJson3Type;
966
+ /**
967
+ * A description of the argument.
968
+ */
969
+ description: string;
970
+ /**
971
+ * Whether to send the argument to the model. If set to false, the argument will not be sent to the model and needs to be provided by the user or it will be left blank.
972
+ */
973
+ sendToModel: boolean;
974
+ /**
975
+ * The default value of the argument.
976
+ */
977
+ defaultValue?: string | number | boolean | undefined;
978
+ };
979
+
980
+ export type UpdateToolResponseBodyHttp = {
981
+ /**
982
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
983
+ */
984
+ blueprint: UpdateToolResponseBodyBlueprint;
985
+ /**
986
+ * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
987
+ */
988
+ arguments?: { [k: string]: UpdateToolResponseBodyArguments } | undefined;
989
+ };
990
+
991
+ /**
992
+ * Executes HTTP requests to interact with external APIs and web services using customizable blueprints.
993
+ */
994
+ export type UpdateToolResponseBodyHTTPTool = {
995
+ id: string;
996
+ /**
997
+ * Entity storage path in the format: `project/folder/subfolder/...`
998
+ *
999
+ * @remarks
1000
+ *
1001
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
1002
+ *
1003
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
1004
+ */
1005
+ path: string;
1006
+ /**
1007
+ * Unique key of the tool as it will be displayed in the UI
1008
+ */
1009
+ key: string;
1010
+ /**
1011
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
1012
+ */
1013
+ displayName?: string | undefined;
1014
+ /**
1015
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
1016
+ */
1017
+ description: string;
1018
+ /**
1019
+ * The id of the user that created the tool
1020
+ */
1021
+ createdById?: string | undefined;
1022
+ /**
1023
+ * The id of the user that last updated the tool
1024
+ */
1025
+ updatedById?: string | undefined;
1026
+ projectId: string;
1027
+ workspaceId: string;
1028
+ created: string;
1029
+ updated: string;
1030
+ /**
1031
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1032
+ */
1033
+ status: UpdateToolResponseBodyToolsResponseStatus;
1034
+ versionHash?: string | undefined;
1035
+ type: "http";
1036
+ http: UpdateToolResponseBodyHttp;
1037
+ };
1038
+
1039
+ /**
1040
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1041
+ */
1042
+ export const UpdateToolResponseBodyToolsStatus = {
1043
+ Live: "live",
1044
+ Draft: "draft",
1045
+ Pending: "pending",
1046
+ Published: "published",
1047
+ } as const;
1048
+ /**
1049
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1050
+ */
1051
+ export type UpdateToolResponseBodyToolsStatus = ClosedEnum<
1052
+ typeof UpdateToolResponseBodyToolsStatus
1053
+ >;
1054
+
1055
+ /**
1056
+ * The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
1057
+ */
1058
+ export type UpdateToolResponseBodySchema = {
1059
+ /**
1060
+ * The JSON Schema type
1061
+ */
1062
+ type: string;
1063
+ /**
1064
+ * The properties of the JSON Schema object
1065
+ */
1066
+ properties: { [k: string]: any };
1067
+ /**
1068
+ * Array of required property names
1069
+ */
1070
+ required: Array<string>;
1071
+ additionalProperties?: { [k: string]: any } | undefined;
1072
+ };
1073
+
1074
+ export type UpdateToolResponseBodyJsonSchema = {
1075
+ /**
1076
+ * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
1077
+ */
1078
+ name: string;
1079
+ /**
1080
+ * A description of what the response format is for. This will be shown to the user.
1081
+ */
1082
+ description: string;
1083
+ /**
1084
+ * The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
1085
+ */
1086
+ schema: UpdateToolResponseBodySchema;
1087
+ /**
1088
+ * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. Only compatible with `OpenAI` models.
1089
+ */
1090
+ strict?: boolean | undefined;
1091
+ };
1092
+
1093
+ /**
1094
+ * A tool that enforces structured output format using JSON Schema for consistent response formatting.
1095
+ */
1096
+ export type UpdateToolResponseBodyJSONSchemaTool = {
1097
+ id: string;
1098
+ /**
1099
+ * Entity storage path in the format: `project/folder/subfolder/...`
1100
+ *
1101
+ * @remarks
1102
+ *
1103
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
1104
+ *
1105
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
1106
+ */
1107
+ path: string;
1108
+ /**
1109
+ * Unique key of the tool as it will be displayed in the UI
1110
+ */
1111
+ key: string;
1112
+ /**
1113
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
1114
+ */
1115
+ displayName?: string | undefined;
1116
+ /**
1117
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
1118
+ */
1119
+ description: string;
1120
+ /**
1121
+ * The id of the user that created the tool
1122
+ */
1123
+ createdById?: string | undefined;
1124
+ /**
1125
+ * The id of the user that last updated the tool
1126
+ */
1127
+ updatedById?: string | undefined;
1128
+ projectId: string;
1129
+ workspaceId: string;
1130
+ created: string;
1131
+ updated: string;
1132
+ /**
1133
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1134
+ */
1135
+ status: UpdateToolResponseBodyToolsStatus;
1136
+ versionHash?: string | undefined;
1137
+ type: "json_schema";
1138
+ jsonSchema: UpdateToolResponseBodyJsonSchema;
1139
+ };
1140
+
1141
+ /**
1142
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1143
+ */
1144
+ export const UpdateToolResponseBodyStatus = {
1145
+ Live: "live",
1146
+ Draft: "draft",
1147
+ Pending: "pending",
1148
+ Published: "published",
1149
+ } as const;
1150
+ /**
1151
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1152
+ */
1153
+ export type UpdateToolResponseBodyStatus = ClosedEnum<
1154
+ typeof UpdateToolResponseBodyStatus
1155
+ >;
1156
+
1157
+ /**
1158
+ * The type must be "object"
1159
+ */
1160
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson1Type = {
1161
+ Object: "object",
1162
+ } as const;
1163
+ /**
1164
+ * The type must be "object"
1165
+ */
1166
+ export type UpdateToolResponseBodyToolsResponse200ApplicationJson1Type =
1167
+ ClosedEnum<typeof UpdateToolResponseBodyToolsResponse200ApplicationJson1Type>;
1168
+
1169
+ /**
1170
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
1171
+ */
1172
+ export type UpdateToolResponseBodyParameters = {
1173
+ /**
1174
+ * The type must be "object"
1175
+ */
1176
+ type: UpdateToolResponseBodyToolsResponse200ApplicationJson1Type;
1177
+ /**
1178
+ * The properties of the function parameters
1179
+ */
1180
+ properties: { [k: string]: any };
1181
+ /**
1182
+ * Array of required parameter names
1183
+ */
1184
+ required: Array<string>;
1185
+ additionalProperties?: { [k: string]: any } | undefined;
1186
+ };
1187
+
1188
+ export type UpdateToolResponseBodyFunction = {
1189
+ /**
1190
+ * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
1191
+ */
1192
+ name: string;
1193
+ /**
1194
+ * A description of what the function does, used by the model to choose when and how to call the function.
1195
+ */
1196
+ description?: string | undefined;
1197
+ /**
1198
+ * Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Currently only compatible with `OpenAI` models.
1199
+ */
1200
+ strict?: boolean | undefined;
1201
+ /**
1202
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
1203
+ */
1204
+ parameters?: UpdateToolResponseBodyParameters | undefined;
1205
+ };
1206
+
1207
+ /**
1208
+ * A custom function tool that allows the model to call predefined functions with structured parameters.
1209
+ */
1210
+ export type UpdateToolResponseBodyFunctionTool = {
1211
+ id: string;
1212
+ /**
1213
+ * Entity storage path in the format: `project/folder/subfolder/...`
1214
+ *
1215
+ * @remarks
1216
+ *
1217
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
1218
+ *
1219
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
1220
+ */
1221
+ path: string;
1222
+ /**
1223
+ * Unique key of the tool as it will be displayed in the UI
1224
+ */
1225
+ key: string;
1226
+ /**
1227
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
1228
+ */
1229
+ displayName?: string | undefined;
1230
+ /**
1231
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
1232
+ */
1233
+ description: string;
1234
+ /**
1235
+ * The id of the user that created the tool
1236
+ */
1237
+ createdById?: string | undefined;
1238
+ /**
1239
+ * The id of the user that last updated the tool
1240
+ */
1241
+ updatedById?: string | undefined;
1242
+ projectId: string;
1243
+ workspaceId: string;
1244
+ created: string;
1245
+ updated: string;
1246
+ /**
1247
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1248
+ */
1249
+ status: UpdateToolResponseBodyStatus;
1250
+ versionHash?: string | undefined;
1251
+ type: "function";
1252
+ function: UpdateToolResponseBodyFunction;
1253
+ };
1254
+
1255
+ /**
1256
+ * Successfully updated the tool.
1257
+ */
1258
+ export type UpdateToolResponseBody =
1259
+ | UpdateToolResponseBodyFunctionTool
1260
+ | UpdateToolResponseBodyJSONSchemaTool
1261
+ | UpdateToolResponseBodyHTTPTool
1262
+ | UpdateToolResponseBodyMCPTool
1263
+ | UpdateToolResponseBodyCodeExecutionTool;
1264
+
1265
+ /** @internal */
1266
+ export const UpdateToolRequestBodyToolsRequest5Status$outboundSchema:
1267
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest5Status> = z
1268
+ .nativeEnum(UpdateToolRequestBodyToolsRequest5Status);
1269
+
1270
+ /** @internal */
1271
+ export const UpdateToolRequestBodyToolsRequest5CodeToolType$outboundSchema:
1272
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest5CodeToolType> = z
1273
+ .nativeEnum(UpdateToolRequestBodyToolsRequest5CodeToolType);
1274
+
1275
+ /** @internal */
1276
+ export type UpdateToolRequestBodyToolsParameters$Outbound = {
1277
+ type: string;
1278
+ properties: { [k: string]: any };
1279
+ required: Array<string>;
1280
+ [additionalProperties: string]: unknown;
1281
+ };
1282
+
1283
+ /** @internal */
1284
+ export const UpdateToolRequestBodyToolsParameters$outboundSchema: z.ZodType<
1285
+ UpdateToolRequestBodyToolsParameters$Outbound,
1286
+ z.ZodTypeDef,
1287
+ UpdateToolRequestBodyToolsParameters
1288
+ > = z.object({
1289
+ type: UpdateToolRequestBodyToolsRequest5CodeToolType$outboundSchema,
1290
+ properties: z.record(z.any()),
1291
+ required: z.array(z.string()),
1292
+ additionalProperties: z.record(z.any()).optional(),
1293
+ }).transform((v) => {
1294
+ return {
1295
+ ...v.additionalProperties,
1296
+ ...remap$(v, {
1297
+ additionalProperties: null,
1298
+ }),
1299
+ };
1300
+ });
1301
+
1302
+ export function updateToolRequestBodyToolsParametersToJSON(
1303
+ updateToolRequestBodyToolsParameters: UpdateToolRequestBodyToolsParameters,
1304
+ ): string {
1305
+ return JSON.stringify(
1306
+ UpdateToolRequestBodyToolsParameters$outboundSchema.parse(
1307
+ updateToolRequestBodyToolsParameters,
1308
+ ),
1309
+ );
1310
+ }
1311
+
1312
+ /** @internal */
1313
+ export const UpdateToolRequestBodyLanguage$outboundSchema: z.ZodNativeEnum<
1314
+ typeof UpdateToolRequestBodyLanguage
1315
+ > = z.nativeEnum(UpdateToolRequestBodyLanguage);
1316
+
1317
+ /** @internal */
1318
+ export type UpdateToolRequestBodyCodeTool$Outbound = {
1319
+ parameters?: UpdateToolRequestBodyToolsParameters$Outbound | undefined;
1320
+ language: string;
1321
+ code: string;
1322
+ };
1323
+
1324
+ /** @internal */
1325
+ export const UpdateToolRequestBodyCodeTool$outboundSchema: z.ZodType<
1326
+ UpdateToolRequestBodyCodeTool$Outbound,
1327
+ z.ZodTypeDef,
1328
+ UpdateToolRequestBodyCodeTool
1329
+ > = z.object({
1330
+ parameters: z.lazy(() => UpdateToolRequestBodyToolsParameters$outboundSchema)
1331
+ .optional(),
1332
+ language: UpdateToolRequestBodyLanguage$outboundSchema,
1333
+ code: z.string(),
1334
+ });
1335
+
1336
+ export function updateToolRequestBodyCodeToolToJSON(
1337
+ updateToolRequestBodyCodeTool: UpdateToolRequestBodyCodeTool,
1338
+ ): string {
1339
+ return JSON.stringify(
1340
+ UpdateToolRequestBodyCodeTool$outboundSchema.parse(
1341
+ updateToolRequestBodyCodeTool,
1342
+ ),
1343
+ );
1344
+ }
1345
+
1346
+ /** @internal */
1347
+ export const UpdateToolRequestBodyToolsRequest5VersionIncrement$outboundSchema:
1348
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest5VersionIncrement> = z
1349
+ .nativeEnum(UpdateToolRequestBodyToolsRequest5VersionIncrement);
1350
+
1351
+ /** @internal */
1352
+ export type UpdateCodeExecutionTool$Outbound = {
1353
+ path?: string | undefined;
1354
+ key?: string | undefined;
1355
+ display_name?: string | undefined;
1356
+ description?: string | undefined;
1357
+ status: string;
1358
+ type: "code";
1359
+ code_tool?: UpdateToolRequestBodyCodeTool$Outbound | undefined;
1360
+ versionIncrement?: string | undefined;
1361
+ versionDescription?: string | undefined;
1362
+ };
1363
+
1364
+ /** @internal */
1365
+ export const UpdateCodeExecutionTool$outboundSchema: z.ZodType<
1366
+ UpdateCodeExecutionTool$Outbound,
1367
+ z.ZodTypeDef,
1368
+ UpdateCodeExecutionTool
1369
+ > = z.object({
1370
+ path: z.string().optional(),
1371
+ key: z.string().optional(),
1372
+ displayName: z.string().optional(),
1373
+ description: z.string().optional(),
1374
+ status: UpdateToolRequestBodyToolsRequest5Status$outboundSchema.default(
1375
+ "live",
1376
+ ),
1377
+ type: z.literal("code"),
1378
+ codeTool: z.lazy(() => UpdateToolRequestBodyCodeTool$outboundSchema)
1379
+ .optional(),
1380
+ versionIncrement:
1381
+ UpdateToolRequestBodyToolsRequest5VersionIncrement$outboundSchema
1382
+ .optional(),
1383
+ versionDescription: z.string().optional(),
1384
+ }).transform((v) => {
1385
+ return remap$(v, {
1386
+ displayName: "display_name",
1387
+ codeTool: "code_tool",
1388
+ });
1389
+ });
1390
+
1391
+ export function updateCodeExecutionToolToJSON(
1392
+ updateCodeExecutionTool: UpdateCodeExecutionTool,
1393
+ ): string {
1394
+ return JSON.stringify(
1395
+ UpdateCodeExecutionTool$outboundSchema.parse(updateCodeExecutionTool),
1396
+ );
1397
+ }
1398
+
1399
+ /** @internal */
1400
+ export const UpdateToolRequestBodyToolsRequest4Status$outboundSchema:
1401
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest4Status> = z
1402
+ .nativeEnum(UpdateToolRequestBodyToolsRequest4Status);
1403
+
1404
+ /** @internal */
1405
+ export type UpdateToolRequestBodyHeaders$Outbound = {
1406
+ value: string;
1407
+ encrypted: boolean;
1408
+ };
1409
+
1410
+ /** @internal */
1411
+ export const UpdateToolRequestBodyHeaders$outboundSchema: z.ZodType<
1412
+ UpdateToolRequestBodyHeaders$Outbound,
1413
+ z.ZodTypeDef,
1414
+ UpdateToolRequestBodyHeaders
1415
+ > = z.object({
1416
+ value: z.string(),
1417
+ encrypted: z.boolean().default(false),
1418
+ });
1419
+
1420
+ export function updateToolRequestBodyHeadersToJSON(
1421
+ updateToolRequestBodyHeaders: UpdateToolRequestBodyHeaders,
1422
+ ): string {
1423
+ return JSON.stringify(
1424
+ UpdateToolRequestBodyHeaders$outboundSchema.parse(
1425
+ updateToolRequestBodyHeaders,
1426
+ ),
1427
+ );
1428
+ }
1429
+
1430
+ /** @internal */
1431
+ export const UpdateToolRequestBodyToolsRequest4McpType$outboundSchema:
1432
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest4McpType> = z
1433
+ .nativeEnum(UpdateToolRequestBodyToolsRequest4McpType);
1434
+
1435
+ /** @internal */
1436
+ export type UpdateToolRequestBodyToolsSchema$Outbound = {
1437
+ type: string;
1438
+ properties?: { [k: string]: any } | undefined;
1439
+ required?: Array<string> | undefined;
1440
+ };
1441
+
1442
+ /** @internal */
1443
+ export const UpdateToolRequestBodyToolsSchema$outboundSchema: z.ZodType<
1444
+ UpdateToolRequestBodyToolsSchema$Outbound,
1445
+ z.ZodTypeDef,
1446
+ UpdateToolRequestBodyToolsSchema
1447
+ > = z.object({
1448
+ type: UpdateToolRequestBodyToolsRequest4McpType$outboundSchema,
1449
+ properties: z.record(z.any()).optional(),
1450
+ required: z.array(z.string()).optional(),
1451
+ });
1452
+
1453
+ export function updateToolRequestBodyToolsSchemaToJSON(
1454
+ updateToolRequestBodyToolsSchema: UpdateToolRequestBodyToolsSchema,
1455
+ ): string {
1456
+ return JSON.stringify(
1457
+ UpdateToolRequestBodyToolsSchema$outboundSchema.parse(
1458
+ updateToolRequestBodyToolsSchema,
1459
+ ),
1460
+ );
1461
+ }
1462
+
1463
+ /** @internal */
1464
+ export type RequestBodyTools$Outbound = {
1465
+ id: string;
1466
+ name: string;
1467
+ description?: string | undefined;
1468
+ schema: UpdateToolRequestBodyToolsSchema$Outbound;
1469
+ };
1470
+
1471
+ /** @internal */
1472
+ export const RequestBodyTools$outboundSchema: z.ZodType<
1473
+ RequestBodyTools$Outbound,
1474
+ z.ZodTypeDef,
1475
+ RequestBodyTools
1476
+ > = z.object({
1477
+ id: z.string().default("01KKCE2SMPTH46F0V604M3N5YN"),
1478
+ name: z.string(),
1479
+ description: z.string().optional(),
1480
+ schema: z.lazy(() => UpdateToolRequestBodyToolsSchema$outboundSchema),
1481
+ });
1482
+
1483
+ export function requestBodyToolsToJSON(
1484
+ requestBodyTools: RequestBodyTools,
1485
+ ): string {
1486
+ return JSON.stringify(
1487
+ RequestBodyTools$outboundSchema.parse(requestBodyTools),
1488
+ );
1489
+ }
1490
+
1491
+ /** @internal */
1492
+ export const UpdateToolRequestBodyConnectionType$outboundSchema:
1493
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyConnectionType> = z.nativeEnum(
1494
+ UpdateToolRequestBodyConnectionType,
1495
+ );
1496
+
1497
+ /** @internal */
1498
+ export type UpdateToolRequestBodyMcp$Outbound = {
1499
+ server_url?: string | undefined;
1500
+ headers?: { [k: string]: UpdateToolRequestBodyHeaders$Outbound } | undefined;
1501
+ tools?: Array<RequestBodyTools$Outbound> | undefined;
1502
+ connection_type?: string | undefined;
1503
+ };
1504
+
1505
+ /** @internal */
1506
+ export const UpdateToolRequestBodyMcp$outboundSchema: z.ZodType<
1507
+ UpdateToolRequestBodyMcp$Outbound,
1508
+ z.ZodTypeDef,
1509
+ UpdateToolRequestBodyMcp
1510
+ > = z.object({
1511
+ serverUrl: z.string().optional(),
1512
+ headers: z.record(z.lazy(() => UpdateToolRequestBodyHeaders$outboundSchema))
1513
+ .optional(),
1514
+ tools: z.array(z.lazy(() => RequestBodyTools$outboundSchema)).optional(),
1515
+ connectionType: UpdateToolRequestBodyConnectionType$outboundSchema.optional(),
1516
+ }).transform((v) => {
1517
+ return remap$(v, {
1518
+ serverUrl: "server_url",
1519
+ connectionType: "connection_type",
1520
+ });
1521
+ });
1522
+
1523
+ export function updateToolRequestBodyMcpToJSON(
1524
+ updateToolRequestBodyMcp: UpdateToolRequestBodyMcp,
1525
+ ): string {
1526
+ return JSON.stringify(
1527
+ UpdateToolRequestBodyMcp$outboundSchema.parse(updateToolRequestBodyMcp),
1528
+ );
1529
+ }
1530
+
1531
+ /** @internal */
1532
+ export const UpdateToolRequestBodyToolsRequest4VersionIncrement$outboundSchema:
1533
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest4VersionIncrement> = z
1534
+ .nativeEnum(UpdateToolRequestBodyToolsRequest4VersionIncrement);
1535
+
1536
+ /** @internal */
1537
+ export type UpdateMCPTool$Outbound = {
1538
+ path?: string | undefined;
1539
+ key?: string | undefined;
1540
+ display_name?: string | undefined;
1541
+ description?: string | undefined;
1542
+ status: string;
1543
+ type: "mcp";
1544
+ mcp?: UpdateToolRequestBodyMcp$Outbound | undefined;
1545
+ versionIncrement?: string | undefined;
1546
+ versionDescription?: string | undefined;
1547
+ };
1548
+
1549
+ /** @internal */
1550
+ export const UpdateMCPTool$outboundSchema: z.ZodType<
1551
+ UpdateMCPTool$Outbound,
1552
+ z.ZodTypeDef,
1553
+ UpdateMCPTool
1554
+ > = z.object({
1555
+ path: z.string().optional(),
1556
+ key: z.string().optional(),
1557
+ displayName: z.string().optional(),
1558
+ description: z.string().optional(),
1559
+ status: UpdateToolRequestBodyToolsRequest4Status$outboundSchema.default(
1560
+ "live",
1561
+ ),
1562
+ type: z.literal("mcp"),
1563
+ mcp: z.lazy(() => UpdateToolRequestBodyMcp$outboundSchema).optional(),
1564
+ versionIncrement:
1565
+ UpdateToolRequestBodyToolsRequest4VersionIncrement$outboundSchema
1566
+ .optional(),
1567
+ versionDescription: z.string().optional(),
1568
+ }).transform((v) => {
1569
+ return remap$(v, {
1570
+ displayName: "display_name",
1571
+ });
1572
+ });
1573
+
1574
+ export function updateMCPToolToJSON(updateMCPTool: UpdateMCPTool): string {
1575
+ return JSON.stringify(UpdateMCPTool$outboundSchema.parse(updateMCPTool));
1576
+ }
1577
+
1578
+ /** @internal */
1579
+ export const UpdateToolRequestBodyToolsRequestStatus$outboundSchema:
1580
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequestStatus> = z
1581
+ .nativeEnum(UpdateToolRequestBodyToolsRequestStatus);
1582
+
1583
+ /** @internal */
1584
+ export const UpdateToolRequestBodyMethod$outboundSchema: z.ZodNativeEnum<
1585
+ typeof UpdateToolRequestBodyMethod
1586
+ > = z.nativeEnum(UpdateToolRequestBodyMethod);
1587
+
1588
+ /** @internal */
1589
+ export type UpdateToolHeaders2$Outbound = {
1590
+ value: string;
1591
+ encrypted: boolean;
1592
+ };
1593
+
1594
+ /** @internal */
1595
+ export const UpdateToolHeaders2$outboundSchema: z.ZodType<
1596
+ UpdateToolHeaders2$Outbound,
1597
+ z.ZodTypeDef,
1598
+ UpdateToolHeaders2
1599
+ > = z.object({
1600
+ value: z.string(),
1601
+ encrypted: z.boolean().default(false),
1602
+ });
1603
+
1604
+ export function updateToolHeaders2ToJSON(
1605
+ updateToolHeaders2: UpdateToolHeaders2,
1606
+ ): string {
1607
+ return JSON.stringify(
1608
+ UpdateToolHeaders2$outboundSchema.parse(updateToolHeaders2),
1609
+ );
1610
+ }
1611
+
1612
+ /** @internal */
1613
+ export type UpdateToolRequestBodyToolsHeaders$Outbound =
1614
+ | UpdateToolHeaders2$Outbound
1615
+ | string;
1616
+
1617
+ /** @internal */
1618
+ export const UpdateToolRequestBodyToolsHeaders$outboundSchema: z.ZodType<
1619
+ UpdateToolRequestBodyToolsHeaders$Outbound,
1620
+ z.ZodTypeDef,
1621
+ UpdateToolRequestBodyToolsHeaders
1622
+ > = z.union([z.lazy(() => UpdateToolHeaders2$outboundSchema), z.string()]);
1623
+
1624
+ export function updateToolRequestBodyToolsHeadersToJSON(
1625
+ updateToolRequestBodyToolsHeaders: UpdateToolRequestBodyToolsHeaders,
1626
+ ): string {
1627
+ return JSON.stringify(
1628
+ UpdateToolRequestBodyToolsHeaders$outboundSchema.parse(
1629
+ updateToolRequestBodyToolsHeaders,
1630
+ ),
1631
+ );
1632
+ }
1633
+
1634
+ /** @internal */
1635
+ export type UpdateToolRequestBodyBlueprint$Outbound = {
1636
+ url: string;
1637
+ method: string;
1638
+ headers?: { [k: string]: UpdateToolHeaders2$Outbound | string } | undefined;
1639
+ body?: { [k: string]: any } | undefined;
1640
+ };
1641
+
1642
+ /** @internal */
1643
+ export const UpdateToolRequestBodyBlueprint$outboundSchema: z.ZodType<
1644
+ UpdateToolRequestBodyBlueprint$Outbound,
1645
+ z.ZodTypeDef,
1646
+ UpdateToolRequestBodyBlueprint
1647
+ > = z.object({
1648
+ url: z.string(),
1649
+ method: UpdateToolRequestBodyMethod$outboundSchema,
1650
+ headers: z.record(
1651
+ z.union([z.lazy(() => UpdateToolHeaders2$outboundSchema), z.string()]),
1652
+ ).optional(),
1653
+ body: z.record(z.any()).optional(),
1654
+ });
1655
+
1656
+ export function updateToolRequestBodyBlueprintToJSON(
1657
+ updateToolRequestBodyBlueprint: UpdateToolRequestBodyBlueprint,
1658
+ ): string {
1659
+ return JSON.stringify(
1660
+ UpdateToolRequestBodyBlueprint$outboundSchema.parse(
1661
+ updateToolRequestBodyBlueprint,
1662
+ ),
1663
+ );
1664
+ }
1665
+
1666
+ /** @internal */
1667
+ export const UpdateToolRequestBodyToolsRequest3Type$outboundSchema:
1668
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest3Type> = z.nativeEnum(
1669
+ UpdateToolRequestBodyToolsRequest3Type,
1670
+ );
1671
+
1672
+ /** @internal */
1673
+ export type UpdateToolRequestBodyDefaultValue$Outbound =
1674
+ | string
1675
+ | number
1676
+ | boolean;
1677
+
1678
+ /** @internal */
1679
+ export const UpdateToolRequestBodyDefaultValue$outboundSchema: z.ZodType<
1680
+ UpdateToolRequestBodyDefaultValue$Outbound,
1681
+ z.ZodTypeDef,
1682
+ UpdateToolRequestBodyDefaultValue
1683
+ > = z.union([z.string(), z.number(), z.boolean()]);
1684
+
1685
+ export function updateToolRequestBodyDefaultValueToJSON(
1686
+ updateToolRequestBodyDefaultValue: UpdateToolRequestBodyDefaultValue,
1687
+ ): string {
1688
+ return JSON.stringify(
1689
+ UpdateToolRequestBodyDefaultValue$outboundSchema.parse(
1690
+ updateToolRequestBodyDefaultValue,
1691
+ ),
1692
+ );
1693
+ }
1694
+
1695
+ /** @internal */
1696
+ export type UpdateToolRequestBodyArguments$Outbound = {
1697
+ type: string;
1698
+ description: string;
1699
+ send_to_model: boolean;
1700
+ default_value?: string | number | boolean | undefined;
1701
+ };
1702
+
1703
+ /** @internal */
1704
+ export const UpdateToolRequestBodyArguments$outboundSchema: z.ZodType<
1705
+ UpdateToolRequestBodyArguments$Outbound,
1706
+ z.ZodTypeDef,
1707
+ UpdateToolRequestBodyArguments
1708
+ > = z.object({
1709
+ type: UpdateToolRequestBodyToolsRequest3Type$outboundSchema,
1710
+ description: z.string(),
1711
+ sendToModel: z.boolean().default(true),
1712
+ defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
1713
+ }).transform((v) => {
1714
+ return remap$(v, {
1715
+ sendToModel: "send_to_model",
1716
+ defaultValue: "default_value",
1717
+ });
1718
+ });
1719
+
1720
+ export function updateToolRequestBodyArgumentsToJSON(
1721
+ updateToolRequestBodyArguments: UpdateToolRequestBodyArguments,
1722
+ ): string {
1723
+ return JSON.stringify(
1724
+ UpdateToolRequestBodyArguments$outboundSchema.parse(
1725
+ updateToolRequestBodyArguments,
1726
+ ),
1727
+ );
1728
+ }
1729
+
1730
+ /** @internal */
1731
+ export type UpdateToolRequestBodyHttp$Outbound = {
1732
+ blueprint: UpdateToolRequestBodyBlueprint$Outbound;
1733
+ arguments?:
1734
+ | { [k: string]: UpdateToolRequestBodyArguments$Outbound }
1735
+ | undefined;
1736
+ };
1737
+
1738
+ /** @internal */
1739
+ export const UpdateToolRequestBodyHttp$outboundSchema: z.ZodType<
1740
+ UpdateToolRequestBodyHttp$Outbound,
1741
+ z.ZodTypeDef,
1742
+ UpdateToolRequestBodyHttp
1743
+ > = z.object({
1744
+ blueprint: z.lazy(() => UpdateToolRequestBodyBlueprint$outboundSchema),
1745
+ arguments: z.record(
1746
+ z.lazy(() => UpdateToolRequestBodyArguments$outboundSchema),
1747
+ ).optional(),
1748
+ });
1749
+
1750
+ export function updateToolRequestBodyHttpToJSON(
1751
+ updateToolRequestBodyHttp: UpdateToolRequestBodyHttp,
1752
+ ): string {
1753
+ return JSON.stringify(
1754
+ UpdateToolRequestBodyHttp$outboundSchema.parse(updateToolRequestBodyHttp),
1755
+ );
1756
+ }
1757
+
1758
+ /** @internal */
1759
+ export const UpdateToolRequestBodyToolsRequestVersionIncrement$outboundSchema:
1760
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequestVersionIncrement> = z
1761
+ .nativeEnum(UpdateToolRequestBodyToolsRequestVersionIncrement);
1762
+
1763
+ /** @internal */
1764
+ export type UpdateHTTPTool$Outbound = {
1765
+ path?: string | undefined;
1766
+ key?: string | undefined;
1767
+ display_name?: string | undefined;
1768
+ description?: string | undefined;
1769
+ status: string;
1770
+ type: "http";
1771
+ http?: UpdateToolRequestBodyHttp$Outbound | undefined;
1772
+ versionIncrement?: string | undefined;
1773
+ versionDescription?: string | undefined;
1774
+ };
1775
+
1776
+ /** @internal */
1777
+ export const UpdateHTTPTool$outboundSchema: z.ZodType<
1778
+ UpdateHTTPTool$Outbound,
1779
+ z.ZodTypeDef,
1780
+ UpdateHTTPTool
1781
+ > = z.object({
1782
+ path: z.string().optional(),
1783
+ key: z.string().optional(),
1784
+ displayName: z.string().optional(),
1785
+ description: z.string().optional(),
1786
+ status: UpdateToolRequestBodyToolsRequestStatus$outboundSchema.default(
1787
+ "live",
1788
+ ),
1789
+ type: z.literal("http"),
1790
+ http: z.lazy(() => UpdateToolRequestBodyHttp$outboundSchema).optional(),
1791
+ versionIncrement:
1792
+ UpdateToolRequestBodyToolsRequestVersionIncrement$outboundSchema.optional(),
1793
+ versionDescription: z.string().optional(),
1794
+ }).transform((v) => {
1795
+ return remap$(v, {
1796
+ displayName: "display_name",
1797
+ });
1798
+ });
1799
+
1800
+ export function updateHTTPToolToJSON(updateHTTPTool: UpdateHTTPTool): string {
1801
+ return JSON.stringify(UpdateHTTPTool$outboundSchema.parse(updateHTTPTool));
1802
+ }
1803
+
1804
+ /** @internal */
1805
+ export const UpdateToolRequestBodyToolsStatus$outboundSchema: z.ZodNativeEnum<
1806
+ typeof UpdateToolRequestBodyToolsStatus
1807
+ > = z.nativeEnum(UpdateToolRequestBodyToolsStatus);
1808
+
1809
+ /** @internal */
1810
+ export type UpdateToolRequestBodySchema$Outbound = {
1811
+ type: string;
1812
+ properties: { [k: string]: any };
1813
+ required: Array<string>;
1814
+ [additionalProperties: string]: unknown;
1815
+ };
1816
+
1817
+ /** @internal */
1818
+ export const UpdateToolRequestBodySchema$outboundSchema: z.ZodType<
1819
+ UpdateToolRequestBodySchema$Outbound,
1820
+ z.ZodTypeDef,
1821
+ UpdateToolRequestBodySchema
1822
+ > = z.object({
1823
+ type: z.string(),
1824
+ properties: z.record(z.any()),
1825
+ required: z.array(z.string()),
1826
+ additionalProperties: z.record(z.any()).optional(),
1827
+ }).transform((v) => {
1828
+ return {
1829
+ ...v.additionalProperties,
1830
+ ...remap$(v, {
1831
+ additionalProperties: null,
1832
+ }),
1833
+ };
1834
+ });
1835
+
1836
+ export function updateToolRequestBodySchemaToJSON(
1837
+ updateToolRequestBodySchema: UpdateToolRequestBodySchema,
1838
+ ): string {
1839
+ return JSON.stringify(
1840
+ UpdateToolRequestBodySchema$outboundSchema.parse(
1841
+ updateToolRequestBodySchema,
1842
+ ),
1843
+ );
1844
+ }
1845
+
1846
+ /** @internal */
1847
+ export type UpdateToolRequestBodyJsonSchema$Outbound = {
1848
+ name: string;
1849
+ description: string;
1850
+ schema: UpdateToolRequestBodySchema$Outbound;
1851
+ strict?: boolean | undefined;
1852
+ };
1853
+
1854
+ /** @internal */
1855
+ export const UpdateToolRequestBodyJsonSchema$outboundSchema: z.ZodType<
1856
+ UpdateToolRequestBodyJsonSchema$Outbound,
1857
+ z.ZodTypeDef,
1858
+ UpdateToolRequestBodyJsonSchema
1859
+ > = z.object({
1860
+ name: z.string(),
1861
+ description: z.string(),
1862
+ schema: z.lazy(() => UpdateToolRequestBodySchema$outboundSchema),
1863
+ strict: z.boolean().optional(),
1864
+ });
1865
+
1866
+ export function updateToolRequestBodyJsonSchemaToJSON(
1867
+ updateToolRequestBodyJsonSchema: UpdateToolRequestBodyJsonSchema,
1868
+ ): string {
1869
+ return JSON.stringify(
1870
+ UpdateToolRequestBodyJsonSchema$outboundSchema.parse(
1871
+ updateToolRequestBodyJsonSchema,
1872
+ ),
1873
+ );
1874
+ }
1875
+
1876
+ /** @internal */
1877
+ export const UpdateToolRequestBodyToolsVersionIncrement$outboundSchema:
1878
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsVersionIncrement> = z
1879
+ .nativeEnum(UpdateToolRequestBodyToolsVersionIncrement);
1880
+
1881
+ /** @internal */
1882
+ export type UpdateJSONSchemaTool$Outbound = {
1883
+ path?: string | undefined;
1884
+ key?: string | undefined;
1885
+ display_name?: string | undefined;
1886
+ description?: string | undefined;
1887
+ status: string;
1888
+ type: "json_schema";
1889
+ json_schema?: UpdateToolRequestBodyJsonSchema$Outbound | undefined;
1890
+ versionIncrement?: string | undefined;
1891
+ versionDescription?: string | undefined;
1892
+ };
1893
+
1894
+ /** @internal */
1895
+ export const UpdateJSONSchemaTool$outboundSchema: z.ZodType<
1896
+ UpdateJSONSchemaTool$Outbound,
1897
+ z.ZodTypeDef,
1898
+ UpdateJSONSchemaTool
1899
+ > = z.object({
1900
+ path: z.string().optional(),
1901
+ key: z.string().optional(),
1902
+ displayName: z.string().optional(),
1903
+ description: z.string().optional(),
1904
+ status: UpdateToolRequestBodyToolsStatus$outboundSchema.default("live"),
1905
+ type: z.literal("json_schema"),
1906
+ jsonSchema: z.lazy(() => UpdateToolRequestBodyJsonSchema$outboundSchema)
1907
+ .optional(),
1908
+ versionIncrement: UpdateToolRequestBodyToolsVersionIncrement$outboundSchema
1909
+ .optional(),
1910
+ versionDescription: z.string().optional(),
1911
+ }).transform((v) => {
1912
+ return remap$(v, {
1913
+ displayName: "display_name",
1914
+ jsonSchema: "json_schema",
1915
+ });
1916
+ });
1917
+
1918
+ export function updateJSONSchemaToolToJSON(
1919
+ updateJSONSchemaTool: UpdateJSONSchemaTool,
1920
+ ): string {
1921
+ return JSON.stringify(
1922
+ UpdateJSONSchemaTool$outboundSchema.parse(updateJSONSchemaTool),
1923
+ );
1924
+ }
1925
+
1926
+ /** @internal */
1927
+ export const UpdateToolRequestBodyStatus$outboundSchema: z.ZodNativeEnum<
1928
+ typeof UpdateToolRequestBodyStatus
1929
+ > = z.nativeEnum(UpdateToolRequestBodyStatus);
1930
+
1931
+ /** @internal */
1932
+ export const UpdateToolRequestBodyToolsRequest1Type$outboundSchema:
1933
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest1Type> = z.nativeEnum(
1934
+ UpdateToolRequestBodyToolsRequest1Type,
1935
+ );
1936
+
1937
+ /** @internal */
1938
+ export type UpdateToolRequestBodyParameters$Outbound = {
1939
+ type: string;
1940
+ properties: { [k: string]: any };
1941
+ required: Array<string>;
1942
+ [additionalProperties: string]: unknown;
1943
+ };
1944
+
1945
+ /** @internal */
1946
+ export const UpdateToolRequestBodyParameters$outboundSchema: z.ZodType<
1947
+ UpdateToolRequestBodyParameters$Outbound,
1948
+ z.ZodTypeDef,
1949
+ UpdateToolRequestBodyParameters
1950
+ > = z.object({
1951
+ type: UpdateToolRequestBodyToolsRequest1Type$outboundSchema,
1952
+ properties: z.record(z.any()),
1953
+ required: z.array(z.string()),
1954
+ additionalProperties: z.record(z.any()).optional(),
1955
+ }).transform((v) => {
1956
+ return {
1957
+ ...v.additionalProperties,
1958
+ ...remap$(v, {
1959
+ additionalProperties: null,
1960
+ }),
1961
+ };
1962
+ });
1963
+
1964
+ export function updateToolRequestBodyParametersToJSON(
1965
+ updateToolRequestBodyParameters: UpdateToolRequestBodyParameters,
1966
+ ): string {
1967
+ return JSON.stringify(
1968
+ UpdateToolRequestBodyParameters$outboundSchema.parse(
1969
+ updateToolRequestBodyParameters,
1970
+ ),
1971
+ );
1972
+ }
1973
+
1974
+ /** @internal */
1975
+ export type UpdateToolRequestBodyFunction$Outbound = {
1976
+ name: string;
1977
+ description?: string | undefined;
1978
+ strict?: boolean | undefined;
1979
+ parameters?: UpdateToolRequestBodyParameters$Outbound | undefined;
1980
+ };
1981
+
1982
+ /** @internal */
1983
+ export const UpdateToolRequestBodyFunction$outboundSchema: z.ZodType<
1984
+ UpdateToolRequestBodyFunction$Outbound,
1985
+ z.ZodTypeDef,
1986
+ UpdateToolRequestBodyFunction
1987
+ > = z.object({
1988
+ name: z.string(),
1989
+ description: z.string().optional(),
1990
+ strict: z.boolean().optional(),
1991
+ parameters: z.lazy(() => UpdateToolRequestBodyParameters$outboundSchema)
1992
+ .optional(),
1993
+ });
1994
+
1995
+ export function updateToolRequestBodyFunctionToJSON(
1996
+ updateToolRequestBodyFunction: UpdateToolRequestBodyFunction,
1997
+ ): string {
1998
+ return JSON.stringify(
1999
+ UpdateToolRequestBodyFunction$outboundSchema.parse(
2000
+ updateToolRequestBodyFunction,
2001
+ ),
2002
+ );
2003
+ }
2004
+
2005
+ /** @internal */
2006
+ export const UpdateToolRequestBodyVersionIncrement$outboundSchema:
2007
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyVersionIncrement> = z.nativeEnum(
2008
+ UpdateToolRequestBodyVersionIncrement,
2009
+ );
2010
+
2011
+ /** @internal */
2012
+ export type UpdateFunctionTool$Outbound = {
2013
+ path?: string | undefined;
2014
+ key?: string | undefined;
2015
+ display_name?: string | undefined;
2016
+ description?: string | undefined;
2017
+ status: string;
2018
+ type: "function";
2019
+ function?: UpdateToolRequestBodyFunction$Outbound | undefined;
2020
+ versionIncrement?: string | undefined;
2021
+ versionDescription?: string | undefined;
2022
+ };
2023
+
2024
+ /** @internal */
2025
+ export const UpdateFunctionTool$outboundSchema: z.ZodType<
2026
+ UpdateFunctionTool$Outbound,
2027
+ z.ZodTypeDef,
2028
+ UpdateFunctionTool
2029
+ > = z.object({
2030
+ path: z.string().optional(),
2031
+ key: z.string().optional(),
2032
+ displayName: z.string().optional(),
2033
+ description: z.string().optional(),
2034
+ status: UpdateToolRequestBodyStatus$outboundSchema.default("live"),
2035
+ type: z.literal("function"),
2036
+ function: z.lazy(() => UpdateToolRequestBodyFunction$outboundSchema)
2037
+ .optional(),
2038
+ versionIncrement: UpdateToolRequestBodyVersionIncrement$outboundSchema
2039
+ .optional(),
2040
+ versionDescription: z.string().optional(),
2041
+ }).transform((v) => {
2042
+ return remap$(v, {
2043
+ displayName: "display_name",
2044
+ });
2045
+ });
2046
+
2047
+ export function updateFunctionToolToJSON(
2048
+ updateFunctionTool: UpdateFunctionTool,
2049
+ ): string {
2050
+ return JSON.stringify(
2051
+ UpdateFunctionTool$outboundSchema.parse(updateFunctionTool),
2052
+ );
2053
+ }
2054
+
2055
+ /** @internal */
2056
+ export type UpdateToolRequestBody$Outbound =
2057
+ | UpdateFunctionTool$Outbound
2058
+ | UpdateJSONSchemaTool$Outbound
2059
+ | UpdateHTTPTool$Outbound
2060
+ | UpdateMCPTool$Outbound
2061
+ | UpdateCodeExecutionTool$Outbound;
2062
+
2063
+ /** @internal */
2064
+ export const UpdateToolRequestBody$outboundSchema: z.ZodType<
2065
+ UpdateToolRequestBody$Outbound,
2066
+ z.ZodTypeDef,
2067
+ UpdateToolRequestBody
2068
+ > = z.union([
2069
+ z.lazy(() => UpdateFunctionTool$outboundSchema),
2070
+ z.lazy(() => UpdateJSONSchemaTool$outboundSchema),
2071
+ z.lazy(() => UpdateHTTPTool$outboundSchema),
2072
+ z.lazy(() => UpdateMCPTool$outboundSchema),
2073
+ z.lazy(() => UpdateCodeExecutionTool$outboundSchema),
2074
+ ]);
2075
+
2076
+ export function updateToolRequestBodyToJSON(
2077
+ updateToolRequestBody: UpdateToolRequestBody,
2078
+ ): string {
2079
+ return JSON.stringify(
2080
+ UpdateToolRequestBody$outboundSchema.parse(updateToolRequestBody),
2081
+ );
2082
+ }
2083
+
2084
+ /** @internal */
2085
+ export type UpdateToolRequest$Outbound = {
2086
+ tool_id: string;
2087
+ RequestBody?:
2088
+ | UpdateFunctionTool$Outbound
2089
+ | UpdateJSONSchemaTool$Outbound
2090
+ | UpdateHTTPTool$Outbound
2091
+ | UpdateMCPTool$Outbound
2092
+ | UpdateCodeExecutionTool$Outbound
2093
+ | undefined;
2094
+ };
2095
+
2096
+ /** @internal */
2097
+ export const UpdateToolRequest$outboundSchema: z.ZodType<
2098
+ UpdateToolRequest$Outbound,
2099
+ z.ZodTypeDef,
2100
+ UpdateToolRequest
2101
+ > = z.object({
2102
+ toolId: z.string(),
2103
+ requestBody: z.union([
2104
+ z.lazy(() => UpdateFunctionTool$outboundSchema),
2105
+ z.lazy(() => UpdateJSONSchemaTool$outboundSchema),
2106
+ z.lazy(() => UpdateHTTPTool$outboundSchema),
2107
+ z.lazy(() => UpdateMCPTool$outboundSchema),
2108
+ z.lazy(() => UpdateCodeExecutionTool$outboundSchema),
2109
+ ]).optional(),
2110
+ }).transform((v) => {
2111
+ return remap$(v, {
2112
+ toolId: "tool_id",
2113
+ requestBody: "RequestBody",
2114
+ });
2115
+ });
2116
+
2117
+ export function updateToolRequestToJSON(
2118
+ updateToolRequest: UpdateToolRequest,
2119
+ ): string {
2120
+ return JSON.stringify(
2121
+ UpdateToolRequest$outboundSchema.parse(updateToolRequest),
2122
+ );
2123
+ }
2124
+
2125
+ /** @internal */
2126
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema:
2127
+ z.ZodNativeEnum<
2128
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus
2129
+ > = z.nativeEnum(UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus);
2130
+
2131
+ /** @internal */
2132
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema:
2133
+ z.ZodNativeEnum<
2134
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJson5Type
2135
+ > = z.nativeEnum(UpdateToolResponseBodyToolsResponse200ApplicationJson5Type);
2136
+
2137
+ /** @internal */
2138
+ export const UpdateToolResponseBodyToolsParameters$inboundSchema: z.ZodType<
2139
+ UpdateToolResponseBodyToolsParameters,
2140
+ z.ZodTypeDef,
2141
+ unknown
2142
+ > = collectExtraKeys$(
2143
+ z.object({
2144
+ type:
2145
+ UpdateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema,
2146
+ properties: z.record(z.any()),
2147
+ required: z.array(z.string()),
2148
+ }).catchall(z.any()),
2149
+ "additionalProperties",
2150
+ true,
2151
+ );
2152
+
2153
+ export function updateToolResponseBodyToolsParametersFromJSON(
2154
+ jsonString: string,
2155
+ ): SafeParseResult<UpdateToolResponseBodyToolsParameters, SDKValidationError> {
2156
+ return safeParse(
2157
+ jsonString,
2158
+ (x) =>
2159
+ UpdateToolResponseBodyToolsParameters$inboundSchema.parse(JSON.parse(x)),
2160
+ `Failed to parse 'UpdateToolResponseBodyToolsParameters' from JSON`,
2161
+ );
2162
+ }
2163
+
2164
+ /** @internal */
2165
+ export const UpdateToolResponseBodyLanguage$inboundSchema: z.ZodNativeEnum<
2166
+ typeof UpdateToolResponseBodyLanguage
2167
+ > = z.nativeEnum(UpdateToolResponseBodyLanguage);
2168
+
2169
+ /** @internal */
2170
+ export const UpdateToolResponseBodyCodeTool$inboundSchema: z.ZodType<
2171
+ UpdateToolResponseBodyCodeTool,
2172
+ z.ZodTypeDef,
2173
+ unknown
2174
+ > = z.object({
2175
+ parameters: z.lazy(() => UpdateToolResponseBodyToolsParameters$inboundSchema)
2176
+ .optional(),
2177
+ language: UpdateToolResponseBodyLanguage$inboundSchema,
2178
+ code: z.string(),
2179
+ });
2180
+
2181
+ export function updateToolResponseBodyCodeToolFromJSON(
2182
+ jsonString: string,
2183
+ ): SafeParseResult<UpdateToolResponseBodyCodeTool, SDKValidationError> {
2184
+ return safeParse(
2185
+ jsonString,
2186
+ (x) => UpdateToolResponseBodyCodeTool$inboundSchema.parse(JSON.parse(x)),
2187
+ `Failed to parse 'UpdateToolResponseBodyCodeTool' from JSON`,
2188
+ );
2189
+ }
2190
+
2191
+ /** @internal */
2192
+ export const UpdateToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
2193
+ UpdateToolResponseBodyCodeExecutionTool,
2194
+ z.ZodTypeDef,
2195
+ unknown
2196
+ > = z.object({
2197
+ _id: z.string().default("tool_01KKCE2SMERFQ5W0GAANT6B7P0"),
2198
+ path: z.string(),
2199
+ key: z.string(),
2200
+ display_name: z.string().optional(),
2201
+ description: z.string(),
2202
+ created_by_id: z.string().optional(),
2203
+ updated_by_id: z.string().optional(),
2204
+ project_id: z.string(),
2205
+ workspace_id: z.string(),
2206
+ created: z.string(),
2207
+ updated: z.string(),
2208
+ status:
2209
+ UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema
2210
+ .default("live"),
2211
+ version_hash: z.string().optional(),
2212
+ type: z.literal("code"),
2213
+ code_tool: z.lazy(() => UpdateToolResponseBodyCodeTool$inboundSchema),
2214
+ }).transform((v) => {
2215
+ return remap$(v, {
2216
+ "_id": "id",
2217
+ "display_name": "displayName",
2218
+ "created_by_id": "createdById",
2219
+ "updated_by_id": "updatedById",
2220
+ "project_id": "projectId",
2221
+ "workspace_id": "workspaceId",
2222
+ "version_hash": "versionHash",
2223
+ "code_tool": "codeTool",
2224
+ });
2225
+ });
2226
+
2227
+ export function updateToolResponseBodyCodeExecutionToolFromJSON(
2228
+ jsonString: string,
2229
+ ): SafeParseResult<
2230
+ UpdateToolResponseBodyCodeExecutionTool,
2231
+ SDKValidationError
2232
+ > {
2233
+ return safeParse(
2234
+ jsonString,
2235
+ (x) =>
2236
+ UpdateToolResponseBodyCodeExecutionTool$inboundSchema.parse(
2237
+ JSON.parse(x),
2238
+ ),
2239
+ `Failed to parse 'UpdateToolResponseBodyCodeExecutionTool' from JSON`,
2240
+ );
2241
+ }
2242
+
2243
+ /** @internal */
2244
+ export const UpdateToolResponseBodyToolsResponse200Status$inboundSchema:
2245
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyToolsResponse200Status> = z
2246
+ .nativeEnum(UpdateToolResponseBodyToolsResponse200Status);
2247
+
2248
+ /** @internal */
2249
+ export const UpdateToolResponseBodyHeaders$inboundSchema: z.ZodType<
2250
+ UpdateToolResponseBodyHeaders,
2251
+ z.ZodTypeDef,
2252
+ unknown
2253
+ > = z.object({
2254
+ value: z.string(),
2255
+ encrypted: z.boolean().default(false),
2256
+ });
2257
+
2258
+ export function updateToolResponseBodyHeadersFromJSON(
2259
+ jsonString: string,
2260
+ ): SafeParseResult<UpdateToolResponseBodyHeaders, SDKValidationError> {
2261
+ return safeParse(
2262
+ jsonString,
2263
+ (x) => UpdateToolResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)),
2264
+ `Failed to parse 'UpdateToolResponseBodyHeaders' from JSON`,
2265
+ );
2266
+ }
2267
+
2268
+ /** @internal */
2269
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema:
2270
+ z.ZodNativeEnum<
2271
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJson4Type
2272
+ > = z.nativeEnum(UpdateToolResponseBodyToolsResponse200ApplicationJson4Type);
2273
+
2274
+ /** @internal */
2275
+ export const UpdateToolResponseBodyToolsSchema$inboundSchema: z.ZodType<
2276
+ UpdateToolResponseBodyToolsSchema,
2277
+ z.ZodTypeDef,
2278
+ unknown
2279
+ > = z.object({
2280
+ type:
2281
+ UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema,
2282
+ properties: z.record(z.any()).optional(),
2283
+ required: z.array(z.string()).optional(),
2284
+ });
2285
+
2286
+ export function updateToolResponseBodyToolsSchemaFromJSON(
2287
+ jsonString: string,
2288
+ ): SafeParseResult<UpdateToolResponseBodyToolsSchema, SDKValidationError> {
2289
+ return safeParse(
2290
+ jsonString,
2291
+ (x) => UpdateToolResponseBodyToolsSchema$inboundSchema.parse(JSON.parse(x)),
2292
+ `Failed to parse 'UpdateToolResponseBodyToolsSchema' from JSON`,
2293
+ );
2294
+ }
2295
+
2296
+ /** @internal */
2297
+ export const UpdateToolResponseBodyTools$inboundSchema: z.ZodType<
2298
+ UpdateToolResponseBodyTools,
2299
+ z.ZodTypeDef,
2300
+ unknown
2301
+ > = z.object({
2302
+ id: z.string().default("01KKCE2SMDJH37XDGN99PRJ7RV"),
2303
+ name: z.string(),
2304
+ description: z.string().optional(),
2305
+ schema: z.lazy(() => UpdateToolResponseBodyToolsSchema$inboundSchema),
2306
+ });
2307
+
2308
+ export function updateToolResponseBodyToolsFromJSON(
2309
+ jsonString: string,
2310
+ ): SafeParseResult<UpdateToolResponseBodyTools, SDKValidationError> {
2311
+ return safeParse(
2312
+ jsonString,
2313
+ (x) => UpdateToolResponseBodyTools$inboundSchema.parse(JSON.parse(x)),
2314
+ `Failed to parse 'UpdateToolResponseBodyTools' from JSON`,
2315
+ );
2316
+ }
2317
+
2318
+ /** @internal */
2319
+ export const UpdateToolResponseBodyConnectionType$inboundSchema:
2320
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyConnectionType> = z.nativeEnum(
2321
+ UpdateToolResponseBodyConnectionType,
2322
+ );
2323
+
2324
+ /** @internal */
2325
+ export const UpdateToolResponseBodyMcp$inboundSchema: z.ZodType<
2326
+ UpdateToolResponseBodyMcp,
2327
+ z.ZodTypeDef,
2328
+ unknown
2329
+ > = z.object({
2330
+ server_url: z.string(),
2331
+ headers: z.record(z.lazy(() => UpdateToolResponseBodyHeaders$inboundSchema))
2332
+ .optional(),
2333
+ tools: z.array(z.lazy(() => UpdateToolResponseBodyTools$inboundSchema)),
2334
+ connection_type: UpdateToolResponseBodyConnectionType$inboundSchema,
2335
+ }).transform((v) => {
2336
+ return remap$(v, {
2337
+ "server_url": "serverUrl",
2338
+ "connection_type": "connectionType",
2339
+ });
2340
+ });
2341
+
2342
+ export function updateToolResponseBodyMcpFromJSON(
2343
+ jsonString: string,
2344
+ ): SafeParseResult<UpdateToolResponseBodyMcp, SDKValidationError> {
2345
+ return safeParse(
2346
+ jsonString,
2347
+ (x) => UpdateToolResponseBodyMcp$inboundSchema.parse(JSON.parse(x)),
2348
+ `Failed to parse 'UpdateToolResponseBodyMcp' from JSON`,
2349
+ );
2350
+ }
2351
+
2352
+ /** @internal */
2353
+ export const UpdateToolResponseBodyMCPTool$inboundSchema: z.ZodType<
2354
+ UpdateToolResponseBodyMCPTool,
2355
+ z.ZodTypeDef,
2356
+ unknown
2357
+ > = z.object({
2358
+ _id: z.string().default("tool_01KKCE2SMBA8JJ0VAWWEW5BS1B"),
2359
+ path: z.string(),
2360
+ key: z.string(),
2361
+ display_name: z.string().optional(),
2362
+ description: z.string(),
2363
+ created_by_id: z.string().optional(),
2364
+ updated_by_id: z.string().optional(),
2365
+ project_id: z.string(),
2366
+ workspace_id: z.string(),
2367
+ created: z.string(),
2368
+ updated: z.string(),
2369
+ status: UpdateToolResponseBodyToolsResponse200Status$inboundSchema.default(
2370
+ "live",
2371
+ ),
2372
+ version_hash: z.string().optional(),
2373
+ type: z.literal("mcp"),
2374
+ mcp: z.lazy(() => UpdateToolResponseBodyMcp$inboundSchema),
2375
+ }).transform((v) => {
2376
+ return remap$(v, {
2377
+ "_id": "id",
2378
+ "display_name": "displayName",
2379
+ "created_by_id": "createdById",
2380
+ "updated_by_id": "updatedById",
2381
+ "project_id": "projectId",
2382
+ "workspace_id": "workspaceId",
2383
+ "version_hash": "versionHash",
2384
+ });
2385
+ });
2386
+
2387
+ export function updateToolResponseBodyMCPToolFromJSON(
2388
+ jsonString: string,
2389
+ ): SafeParseResult<UpdateToolResponseBodyMCPTool, SDKValidationError> {
2390
+ return safeParse(
2391
+ jsonString,
2392
+ (x) => UpdateToolResponseBodyMCPTool$inboundSchema.parse(JSON.parse(x)),
2393
+ `Failed to parse 'UpdateToolResponseBodyMCPTool' from JSON`,
2394
+ );
2395
+ }
2396
+
2397
+ /** @internal */
2398
+ export const UpdateToolResponseBodyToolsResponseStatus$inboundSchema:
2399
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyToolsResponseStatus> = z
2400
+ .nativeEnum(UpdateToolResponseBodyToolsResponseStatus);
2401
+
2402
+ /** @internal */
2403
+ export const UpdateToolResponseBodyMethod$inboundSchema: z.ZodNativeEnum<
2404
+ typeof UpdateToolResponseBodyMethod
2405
+ > = z.nativeEnum(UpdateToolResponseBodyMethod);
2406
+
2407
+ /** @internal */
2408
+ export const UpdateToolHeadersTools2$inboundSchema: z.ZodType<
2409
+ UpdateToolHeadersTools2,
2410
+ z.ZodTypeDef,
2411
+ unknown
2412
+ > = z.object({
2413
+ value: z.string(),
2414
+ encrypted: z.boolean().default(false),
2415
+ });
2416
+
2417
+ export function updateToolHeadersTools2FromJSON(
2418
+ jsonString: string,
2419
+ ): SafeParseResult<UpdateToolHeadersTools2, SDKValidationError> {
2420
+ return safeParse(
2421
+ jsonString,
2422
+ (x) => UpdateToolHeadersTools2$inboundSchema.parse(JSON.parse(x)),
2423
+ `Failed to parse 'UpdateToolHeadersTools2' from JSON`,
2424
+ );
2425
+ }
2426
+
2427
+ /** @internal */
2428
+ export const UpdateToolResponseBodyToolsHeaders$inboundSchema: z.ZodType<
2429
+ UpdateToolResponseBodyToolsHeaders,
2430
+ z.ZodTypeDef,
2431
+ unknown
2432
+ > = z.union([z.lazy(() => UpdateToolHeadersTools2$inboundSchema), z.string()]);
2433
+
2434
+ export function updateToolResponseBodyToolsHeadersFromJSON(
2435
+ jsonString: string,
2436
+ ): SafeParseResult<UpdateToolResponseBodyToolsHeaders, SDKValidationError> {
2437
+ return safeParse(
2438
+ jsonString,
2439
+ (x) =>
2440
+ UpdateToolResponseBodyToolsHeaders$inboundSchema.parse(JSON.parse(x)),
2441
+ `Failed to parse 'UpdateToolResponseBodyToolsHeaders' from JSON`,
2442
+ );
2443
+ }
2444
+
2445
+ /** @internal */
2446
+ export const UpdateToolResponseBodyBlueprint$inboundSchema: z.ZodType<
2447
+ UpdateToolResponseBodyBlueprint,
2448
+ z.ZodTypeDef,
2449
+ unknown
2450
+ > = z.object({
2451
+ url: z.string(),
2452
+ method: UpdateToolResponseBodyMethod$inboundSchema,
2453
+ headers: z.record(
2454
+ z.union([z.lazy(() => UpdateToolHeadersTools2$inboundSchema), z.string()]),
2455
+ ).optional(),
2456
+ body: z.record(z.any()).optional(),
2457
+ });
2458
+
2459
+ export function updateToolResponseBodyBlueprintFromJSON(
2460
+ jsonString: string,
2461
+ ): SafeParseResult<UpdateToolResponseBodyBlueprint, SDKValidationError> {
2462
+ return safeParse(
2463
+ jsonString,
2464
+ (x) => UpdateToolResponseBodyBlueprint$inboundSchema.parse(JSON.parse(x)),
2465
+ `Failed to parse 'UpdateToolResponseBodyBlueprint' from JSON`,
2466
+ );
2467
+ }
2468
+
2469
+ /** @internal */
2470
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema:
2471
+ z.ZodNativeEnum<
2472
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJson3Type
2473
+ > = z.nativeEnum(UpdateToolResponseBodyToolsResponse200ApplicationJson3Type);
2474
+
2475
+ /** @internal */
2476
+ export const UpdateToolResponseBodyDefaultValue$inboundSchema: z.ZodType<
2477
+ UpdateToolResponseBodyDefaultValue,
2478
+ z.ZodTypeDef,
2479
+ unknown
2480
+ > = z.union([z.string(), z.number(), z.boolean()]);
2481
+
2482
+ export function updateToolResponseBodyDefaultValueFromJSON(
2483
+ jsonString: string,
2484
+ ): SafeParseResult<UpdateToolResponseBodyDefaultValue, SDKValidationError> {
2485
+ return safeParse(
2486
+ jsonString,
2487
+ (x) =>
2488
+ UpdateToolResponseBodyDefaultValue$inboundSchema.parse(JSON.parse(x)),
2489
+ `Failed to parse 'UpdateToolResponseBodyDefaultValue' from JSON`,
2490
+ );
2491
+ }
2492
+
2493
+ /** @internal */
2494
+ export const UpdateToolResponseBodyArguments$inboundSchema: z.ZodType<
2495
+ UpdateToolResponseBodyArguments,
2496
+ z.ZodTypeDef,
2497
+ unknown
2498
+ > = z.object({
2499
+ type:
2500
+ UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema,
2501
+ description: z.string(),
2502
+ send_to_model: z.boolean().default(true),
2503
+ default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
2504
+ }).transform((v) => {
2505
+ return remap$(v, {
2506
+ "send_to_model": "sendToModel",
2507
+ "default_value": "defaultValue",
2508
+ });
2509
+ });
2510
+
2511
+ export function updateToolResponseBodyArgumentsFromJSON(
2512
+ jsonString: string,
2513
+ ): SafeParseResult<UpdateToolResponseBodyArguments, SDKValidationError> {
2514
+ return safeParse(
2515
+ jsonString,
2516
+ (x) => UpdateToolResponseBodyArguments$inboundSchema.parse(JSON.parse(x)),
2517
+ `Failed to parse 'UpdateToolResponseBodyArguments' from JSON`,
2518
+ );
2519
+ }
2520
+
2521
+ /** @internal */
2522
+ export const UpdateToolResponseBodyHttp$inboundSchema: z.ZodType<
2523
+ UpdateToolResponseBodyHttp,
2524
+ z.ZodTypeDef,
2525
+ unknown
2526
+ > = z.object({
2527
+ blueprint: z.lazy(() => UpdateToolResponseBodyBlueprint$inboundSchema),
2528
+ arguments: z.record(
2529
+ z.lazy(() => UpdateToolResponseBodyArguments$inboundSchema),
2530
+ ).optional(),
2531
+ });
2532
+
2533
+ export function updateToolResponseBodyHttpFromJSON(
2534
+ jsonString: string,
2535
+ ): SafeParseResult<UpdateToolResponseBodyHttp, SDKValidationError> {
2536
+ return safeParse(
2537
+ jsonString,
2538
+ (x) => UpdateToolResponseBodyHttp$inboundSchema.parse(JSON.parse(x)),
2539
+ `Failed to parse 'UpdateToolResponseBodyHttp' from JSON`,
2540
+ );
2541
+ }
2542
+
2543
+ /** @internal */
2544
+ export const UpdateToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
2545
+ UpdateToolResponseBodyHTTPTool,
2546
+ z.ZodTypeDef,
2547
+ unknown
2548
+ > = z.object({
2549
+ _id: z.string().default("tool_01KKCE2SM8PT6ZTRWWAFTSS4XJ"),
2550
+ path: z.string(),
2551
+ key: z.string(),
2552
+ display_name: z.string().optional(),
2553
+ description: z.string(),
2554
+ created_by_id: z.string().optional(),
2555
+ updated_by_id: z.string().optional(),
2556
+ project_id: z.string(),
2557
+ workspace_id: z.string(),
2558
+ created: z.string(),
2559
+ updated: z.string(),
2560
+ status: UpdateToolResponseBodyToolsResponseStatus$inboundSchema.default(
2561
+ "live",
2562
+ ),
2563
+ version_hash: z.string().optional(),
2564
+ type: z.literal("http"),
2565
+ http: z.lazy(() => UpdateToolResponseBodyHttp$inboundSchema),
2566
+ }).transform((v) => {
2567
+ return remap$(v, {
2568
+ "_id": "id",
2569
+ "display_name": "displayName",
2570
+ "created_by_id": "createdById",
2571
+ "updated_by_id": "updatedById",
2572
+ "project_id": "projectId",
2573
+ "workspace_id": "workspaceId",
2574
+ "version_hash": "versionHash",
2575
+ });
2576
+ });
2577
+
2578
+ export function updateToolResponseBodyHTTPToolFromJSON(
2579
+ jsonString: string,
2580
+ ): SafeParseResult<UpdateToolResponseBodyHTTPTool, SDKValidationError> {
2581
+ return safeParse(
2582
+ jsonString,
2583
+ (x) => UpdateToolResponseBodyHTTPTool$inboundSchema.parse(JSON.parse(x)),
2584
+ `Failed to parse 'UpdateToolResponseBodyHTTPTool' from JSON`,
2585
+ );
2586
+ }
2587
+
2588
+ /** @internal */
2589
+ export const UpdateToolResponseBodyToolsStatus$inboundSchema: z.ZodNativeEnum<
2590
+ typeof UpdateToolResponseBodyToolsStatus
2591
+ > = z.nativeEnum(UpdateToolResponseBodyToolsStatus);
2592
+
2593
+ /** @internal */
2594
+ export const UpdateToolResponseBodySchema$inboundSchema: z.ZodType<
2595
+ UpdateToolResponseBodySchema,
2596
+ z.ZodTypeDef,
2597
+ unknown
2598
+ > = collectExtraKeys$(
2599
+ z.object({
2600
+ type: z.string(),
2601
+ properties: z.record(z.any()),
2602
+ required: z.array(z.string()),
2603
+ }).catchall(z.any()),
2604
+ "additionalProperties",
2605
+ true,
2606
+ );
2607
+
2608
+ export function updateToolResponseBodySchemaFromJSON(
2609
+ jsonString: string,
2610
+ ): SafeParseResult<UpdateToolResponseBodySchema, SDKValidationError> {
2611
+ return safeParse(
2612
+ jsonString,
2613
+ (x) => UpdateToolResponseBodySchema$inboundSchema.parse(JSON.parse(x)),
2614
+ `Failed to parse 'UpdateToolResponseBodySchema' from JSON`,
2615
+ );
2616
+ }
2617
+
2618
+ /** @internal */
2619
+ export const UpdateToolResponseBodyJsonSchema$inboundSchema: z.ZodType<
2620
+ UpdateToolResponseBodyJsonSchema,
2621
+ z.ZodTypeDef,
2622
+ unknown
2623
+ > = z.object({
2624
+ name: z.string(),
2625
+ description: z.string(),
2626
+ schema: z.lazy(() => UpdateToolResponseBodySchema$inboundSchema),
2627
+ strict: z.boolean().optional(),
2628
+ });
2629
+
2630
+ export function updateToolResponseBodyJsonSchemaFromJSON(
2631
+ jsonString: string,
2632
+ ): SafeParseResult<UpdateToolResponseBodyJsonSchema, SDKValidationError> {
2633
+ return safeParse(
2634
+ jsonString,
2635
+ (x) => UpdateToolResponseBodyJsonSchema$inboundSchema.parse(JSON.parse(x)),
2636
+ `Failed to parse 'UpdateToolResponseBodyJsonSchema' from JSON`,
2637
+ );
2638
+ }
2639
+
2640
+ /** @internal */
2641
+ export const UpdateToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
2642
+ UpdateToolResponseBodyJSONSchemaTool,
2643
+ z.ZodTypeDef,
2644
+ unknown
2645
+ > = z.object({
2646
+ _id: z.string().default("tool_01KKCE2SM64S33QF6GKHWSHAQP"),
2647
+ path: z.string(),
2648
+ key: z.string(),
2649
+ display_name: z.string().optional(),
2650
+ description: z.string(),
2651
+ created_by_id: z.string().optional(),
2652
+ updated_by_id: z.string().optional(),
2653
+ project_id: z.string(),
2654
+ workspace_id: z.string(),
2655
+ created: z.string(),
2656
+ updated: z.string(),
2657
+ status: UpdateToolResponseBodyToolsStatus$inboundSchema.default("live"),
2658
+ version_hash: z.string().optional(),
2659
+ type: z.literal("json_schema"),
2660
+ json_schema: z.lazy(() => UpdateToolResponseBodyJsonSchema$inboundSchema),
2661
+ }).transform((v) => {
2662
+ return remap$(v, {
2663
+ "_id": "id",
2664
+ "display_name": "displayName",
2665
+ "created_by_id": "createdById",
2666
+ "updated_by_id": "updatedById",
2667
+ "project_id": "projectId",
2668
+ "workspace_id": "workspaceId",
2669
+ "version_hash": "versionHash",
2670
+ "json_schema": "jsonSchema",
2671
+ });
2672
+ });
2673
+
2674
+ export function updateToolResponseBodyJSONSchemaToolFromJSON(
2675
+ jsonString: string,
2676
+ ): SafeParseResult<UpdateToolResponseBodyJSONSchemaTool, SDKValidationError> {
2677
+ return safeParse(
2678
+ jsonString,
2679
+ (x) =>
2680
+ UpdateToolResponseBodyJSONSchemaTool$inboundSchema.parse(JSON.parse(x)),
2681
+ `Failed to parse 'UpdateToolResponseBodyJSONSchemaTool' from JSON`,
2682
+ );
2683
+ }
2684
+
2685
+ /** @internal */
2686
+ export const UpdateToolResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
2687
+ typeof UpdateToolResponseBodyStatus
2688
+ > = z.nativeEnum(UpdateToolResponseBodyStatus);
2689
+
2690
+ /** @internal */
2691
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema:
2692
+ z.ZodNativeEnum<
2693
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJson1Type
2694
+ > = z.nativeEnum(UpdateToolResponseBodyToolsResponse200ApplicationJson1Type);
2695
+
2696
+ /** @internal */
2697
+ export const UpdateToolResponseBodyParameters$inboundSchema: z.ZodType<
2698
+ UpdateToolResponseBodyParameters,
2699
+ z.ZodTypeDef,
2700
+ unknown
2701
+ > = collectExtraKeys$(
2702
+ z.object({
2703
+ type:
2704
+ UpdateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema,
2705
+ properties: z.record(z.any()),
2706
+ required: z.array(z.string()),
2707
+ }).catchall(z.any()),
2708
+ "additionalProperties",
2709
+ true,
2710
+ );
2711
+
2712
+ export function updateToolResponseBodyParametersFromJSON(
2713
+ jsonString: string,
2714
+ ): SafeParseResult<UpdateToolResponseBodyParameters, SDKValidationError> {
2715
+ return safeParse(
2716
+ jsonString,
2717
+ (x) => UpdateToolResponseBodyParameters$inboundSchema.parse(JSON.parse(x)),
2718
+ `Failed to parse 'UpdateToolResponseBodyParameters' from JSON`,
2719
+ );
2720
+ }
2721
+
2722
+ /** @internal */
2723
+ export const UpdateToolResponseBodyFunction$inboundSchema: z.ZodType<
2724
+ UpdateToolResponseBodyFunction,
2725
+ z.ZodTypeDef,
2726
+ unknown
2727
+ > = z.object({
2728
+ name: z.string(),
2729
+ description: z.string().optional(),
2730
+ strict: z.boolean().optional(),
2731
+ parameters: z.lazy(() => UpdateToolResponseBodyParameters$inboundSchema)
2732
+ .optional(),
2733
+ });
2734
+
2735
+ export function updateToolResponseBodyFunctionFromJSON(
2736
+ jsonString: string,
2737
+ ): SafeParseResult<UpdateToolResponseBodyFunction, SDKValidationError> {
2738
+ return safeParse(
2739
+ jsonString,
2740
+ (x) => UpdateToolResponseBodyFunction$inboundSchema.parse(JSON.parse(x)),
2741
+ `Failed to parse 'UpdateToolResponseBodyFunction' from JSON`,
2742
+ );
2743
+ }
2744
+
2745
+ /** @internal */
2746
+ export const UpdateToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
2747
+ UpdateToolResponseBodyFunctionTool,
2748
+ z.ZodTypeDef,
2749
+ unknown
2750
+ > = z.object({
2751
+ _id: z.string().default("tool_01KKCE2SM4TBHYTZW1BAPKRNJG"),
2752
+ path: z.string(),
2753
+ key: z.string(),
2754
+ display_name: z.string().optional(),
2755
+ description: z.string(),
2756
+ created_by_id: z.string().optional(),
2757
+ updated_by_id: z.string().optional(),
2758
+ project_id: z.string(),
2759
+ workspace_id: z.string(),
2760
+ created: z.string(),
2761
+ updated: z.string(),
2762
+ status: UpdateToolResponseBodyStatus$inboundSchema.default("live"),
2763
+ version_hash: z.string().optional(),
2764
+ type: z.literal("function"),
2765
+ function: z.lazy(() => UpdateToolResponseBodyFunction$inboundSchema),
2766
+ }).transform((v) => {
2767
+ return remap$(v, {
2768
+ "_id": "id",
2769
+ "display_name": "displayName",
2770
+ "created_by_id": "createdById",
2771
+ "updated_by_id": "updatedById",
2772
+ "project_id": "projectId",
2773
+ "workspace_id": "workspaceId",
2774
+ "version_hash": "versionHash",
2775
+ });
2776
+ });
2777
+
2778
+ export function updateToolResponseBodyFunctionToolFromJSON(
2779
+ jsonString: string,
2780
+ ): SafeParseResult<UpdateToolResponseBodyFunctionTool, SDKValidationError> {
2781
+ return safeParse(
2782
+ jsonString,
2783
+ (x) =>
2784
+ UpdateToolResponseBodyFunctionTool$inboundSchema.parse(JSON.parse(x)),
2785
+ `Failed to parse 'UpdateToolResponseBodyFunctionTool' from JSON`,
2786
+ );
2787
+ }
2788
+
2789
+ /** @internal */
2790
+ export const UpdateToolResponseBody$inboundSchema: z.ZodType<
2791
+ UpdateToolResponseBody,
2792
+ z.ZodTypeDef,
2793
+ unknown
2794
+ > = z.union([
2795
+ z.lazy(() => UpdateToolResponseBodyFunctionTool$inboundSchema),
2796
+ z.lazy(() => UpdateToolResponseBodyJSONSchemaTool$inboundSchema),
2797
+ z.lazy(() => UpdateToolResponseBodyHTTPTool$inboundSchema),
2798
+ z.lazy(() => UpdateToolResponseBodyMCPTool$inboundSchema),
2799
+ z.lazy(() => UpdateToolResponseBodyCodeExecutionTool$inboundSchema),
2800
+ ]);
2801
+
2802
+ export function updateToolResponseBodyFromJSON(
2803
+ jsonString: string,
2804
+ ): SafeParseResult<UpdateToolResponseBody, SDKValidationError> {
2805
+ return safeParse(
2806
+ jsonString,
2807
+ (x) => UpdateToolResponseBody$inboundSchema.parse(JSON.parse(x)),
2808
+ `Failed to parse 'UpdateToolResponseBody' from JSON`,
2809
+ );
2810
+ }