@orq-ai/node 4.5.0-rc.9 → 4.5.3

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,2499 @@
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 CreateToolRequestBodyToolsRequestStatus = {
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 CreateToolRequestBodyToolsRequestStatus = ClosedEnum<
28
+ typeof CreateToolRequestBodyToolsRequestStatus
29
+ >;
30
+
31
+ /**
32
+ * The type must be "object"
33
+ */
34
+ export const CreateToolRequestBodyToolsRequest5CodeToolType = {
35
+ Object: "object",
36
+ } as const;
37
+ /**
38
+ * The type must be "object"
39
+ */
40
+ export type CreateToolRequestBodyToolsRequest5CodeToolType = ClosedEnum<
41
+ typeof CreateToolRequestBodyToolsRequest5CodeToolType
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 CreateToolRequestBodyParameters = {
48
+ /**
49
+ * The type must be "object"
50
+ */
51
+ type: CreateToolRequestBodyToolsRequest5CodeToolType;
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 RequestBodyLanguage = {
64
+ Python: "python",
65
+ } as const;
66
+ export type RequestBodyLanguage = ClosedEnum<typeof RequestBodyLanguage>;
67
+
68
+ export type RequestBodyCodeTool = {
69
+ /**
70
+ * 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.
71
+ */
72
+ parameters?: CreateToolRequestBodyParameters | undefined;
73
+ language: RequestBodyLanguage;
74
+ /**
75
+ * The code to execute.
76
+ */
77
+ code: string;
78
+ };
79
+
80
+ /**
81
+ * Executes code snippets in a sandboxed environment, currently supporting Python.
82
+ */
83
+ export type RequestBodyCodeExecutionTool = {
84
+ /**
85
+ * Entity storage path in the format: `project/folder/subfolder/...`
86
+ *
87
+ * @remarks
88
+ *
89
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
90
+ *
91
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
92
+ */
93
+ path: string;
94
+ /**
95
+ * Unique key of the tool as it will be displayed in the UI
96
+ */
97
+ key: string;
98
+ /**
99
+ * 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.
100
+ */
101
+ displayName?: string | undefined;
102
+ /**
103
+ * 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.
104
+ */
105
+ description: string;
106
+ /**
107
+ * 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.
108
+ */
109
+ status?: CreateToolRequestBodyToolsRequestStatus | undefined;
110
+ type: "code";
111
+ codeTool: RequestBodyCodeTool;
112
+ };
113
+
114
+ /**
115
+ * 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.
116
+ */
117
+ export const CreateToolRequestBodyToolsStatus = {
118
+ Live: "live",
119
+ Draft: "draft",
120
+ Pending: "pending",
121
+ Published: "published",
122
+ } as const;
123
+ /**
124
+ * 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.
125
+ */
126
+ export type CreateToolRequestBodyToolsStatus = ClosedEnum<
127
+ typeof CreateToolRequestBodyToolsStatus
128
+ >;
129
+
130
+ export type RequestBodyHeaders = {
131
+ value: string;
132
+ encrypted?: boolean | undefined;
133
+ };
134
+
135
+ /**
136
+ * The connection type used by the MCP server
137
+ */
138
+ export const RequestBodyConnectionType = {
139
+ Http: "http",
140
+ Sse: "sse",
141
+ } as const;
142
+ /**
143
+ * The connection type used by the MCP server
144
+ */
145
+ export type RequestBodyConnectionType = ClosedEnum<
146
+ typeof RequestBodyConnectionType
147
+ >;
148
+
149
+ export type RequestBodyMcp = {
150
+ /**
151
+ * The MCP server URL (cached for execution)
152
+ */
153
+ serverUrl: string;
154
+ /**
155
+ * HTTP headers for MCP server requests with encryption support
156
+ */
157
+ headers?: { [k: string]: RequestBodyHeaders } | undefined;
158
+ /**
159
+ * The connection type used by the MCP server
160
+ */
161
+ connectionType: RequestBodyConnectionType;
162
+ };
163
+
164
+ /**
165
+ * A tool from a Model Context Protocol (MCP) server that provides standardized access to external capabilities.
166
+ */
167
+ export type RequestBodyMCPTool = {
168
+ /**
169
+ * Entity storage path in the format: `project/folder/subfolder/...`
170
+ *
171
+ * @remarks
172
+ *
173
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
174
+ *
175
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
176
+ */
177
+ path: string;
178
+ /**
179
+ * Unique key of the tool as it will be displayed in the UI
180
+ */
181
+ key: string;
182
+ /**
183
+ * 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.
184
+ */
185
+ displayName?: string | undefined;
186
+ /**
187
+ * 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.
188
+ */
189
+ description: string;
190
+ /**
191
+ * 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.
192
+ */
193
+ status?: CreateToolRequestBodyToolsStatus | undefined;
194
+ type: "mcp";
195
+ mcp: RequestBodyMcp;
196
+ };
197
+
198
+ /**
199
+ * 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.
200
+ */
201
+ export const CreateToolRequestBodyStatus = {
202
+ Live: "live",
203
+ Draft: "draft",
204
+ Pending: "pending",
205
+ Published: "published",
206
+ } as const;
207
+ /**
208
+ * 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.
209
+ */
210
+ export type CreateToolRequestBodyStatus = ClosedEnum<
211
+ typeof CreateToolRequestBodyStatus
212
+ >;
213
+
214
+ /**
215
+ * The HTTP method to use.
216
+ */
217
+ export const CreateToolRequestBodyMethod = {
218
+ Get: "GET",
219
+ Post: "POST",
220
+ Put: "PUT",
221
+ Delete: "DELETE",
222
+ } as const;
223
+ /**
224
+ * The HTTP method to use.
225
+ */
226
+ export type CreateToolRequestBodyMethod = ClosedEnum<
227
+ typeof CreateToolRequestBodyMethod
228
+ >;
229
+
230
+ export type CreateToolHeaders2 = {
231
+ value: string;
232
+ encrypted?: boolean | undefined;
233
+ };
234
+
235
+ export type CreateToolRequestBodyHeaders = CreateToolHeaders2 | string;
236
+
237
+ /**
238
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
239
+ */
240
+ export type RequestBodyBlueprint = {
241
+ /**
242
+ * The URL to send the request to.
243
+ */
244
+ url: string;
245
+ /**
246
+ * The HTTP method to use.
247
+ */
248
+ method: CreateToolRequestBodyMethod;
249
+ /**
250
+ * The headers to send with the request. Can be a string value or an object with value and encrypted properties.
251
+ */
252
+ headers?: { [k: string]: CreateToolHeaders2 | string } | undefined;
253
+ /**
254
+ * The body to send with the request.
255
+ */
256
+ body?: { [k: string]: any } | undefined;
257
+ };
258
+
259
+ /**
260
+ * The type of the argument.
261
+ */
262
+ export const CreateToolRequestBodyToolsRequest3Type = {
263
+ String: "string",
264
+ Number: "number",
265
+ Boolean: "boolean",
266
+ } as const;
267
+ /**
268
+ * The type of the argument.
269
+ */
270
+ export type CreateToolRequestBodyToolsRequest3Type = ClosedEnum<
271
+ typeof CreateToolRequestBodyToolsRequest3Type
272
+ >;
273
+
274
+ /**
275
+ * The default value of the argument.
276
+ */
277
+ export type RequestBodyDefaultValue = string | number | boolean;
278
+
279
+ export type RequestBodyArguments = {
280
+ /**
281
+ * The type of the argument.
282
+ */
283
+ type: CreateToolRequestBodyToolsRequest3Type;
284
+ /**
285
+ * A description of the argument.
286
+ */
287
+ description: string;
288
+ /**
289
+ * 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.
290
+ */
291
+ sendToModel?: boolean | undefined;
292
+ /**
293
+ * The default value of the argument.
294
+ */
295
+ defaultValue?: string | number | boolean | undefined;
296
+ };
297
+
298
+ export type CreateToolRequestBodyHttp = {
299
+ /**
300
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
301
+ */
302
+ blueprint: RequestBodyBlueprint;
303
+ /**
304
+ * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
305
+ */
306
+ arguments?: { [k: string]: RequestBodyArguments } | undefined;
307
+ };
308
+
309
+ /**
310
+ * Executes HTTP requests to interact with external APIs and web services using customizable blueprints.
311
+ */
312
+ export type RequestBodyHTTPTool = {
313
+ /**
314
+ * Entity storage path in the format: `project/folder/subfolder/...`
315
+ *
316
+ * @remarks
317
+ *
318
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
319
+ *
320
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
321
+ */
322
+ path: string;
323
+ /**
324
+ * Unique key of the tool as it will be displayed in the UI
325
+ */
326
+ key: string;
327
+ /**
328
+ * 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.
329
+ */
330
+ displayName?: string | undefined;
331
+ /**
332
+ * 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.
333
+ */
334
+ description: string;
335
+ /**
336
+ * 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.
337
+ */
338
+ status?: CreateToolRequestBodyStatus | undefined;
339
+ type: "http";
340
+ http: CreateToolRequestBodyHttp;
341
+ };
342
+
343
+ /**
344
+ * 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.
345
+ */
346
+ export const RequestBodyStatus = {
347
+ Live: "live",
348
+ Draft: "draft",
349
+ Pending: "pending",
350
+ Published: "published",
351
+ } as const;
352
+ /**
353
+ * 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.
354
+ */
355
+ export type RequestBodyStatus = ClosedEnum<typeof RequestBodyStatus>;
356
+
357
+ /**
358
+ * 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.
359
+ */
360
+ export type RequestBodySchema = {
361
+ /**
362
+ * The JSON Schema type
363
+ */
364
+ type: string;
365
+ /**
366
+ * The properties of the JSON Schema object
367
+ */
368
+ properties: { [k: string]: any };
369
+ /**
370
+ * Array of required property names
371
+ */
372
+ required: Array<string>;
373
+ additionalProperties?: { [k: string]: any } | undefined;
374
+ };
375
+
376
+ export type RequestBodyJsonSchema = {
377
+ /**
378
+ * 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.
379
+ */
380
+ name: string;
381
+ /**
382
+ * A description of what the response format is for. This will be shown to the user.
383
+ */
384
+ description: string;
385
+ /**
386
+ * 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.
387
+ */
388
+ schema: RequestBodySchema;
389
+ /**
390
+ * 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.
391
+ */
392
+ strict?: boolean | undefined;
393
+ };
394
+
395
+ /**
396
+ * A tool that enforces structured output format using JSON Schema for consistent response formatting.
397
+ */
398
+ export type RequestBodyJSONSchemaTool = {
399
+ /**
400
+ * Entity storage path in the format: `project/folder/subfolder/...`
401
+ *
402
+ * @remarks
403
+ *
404
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
405
+ *
406
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
407
+ */
408
+ path: string;
409
+ /**
410
+ * Unique key of the tool as it will be displayed in the UI
411
+ */
412
+ key: string;
413
+ /**
414
+ * 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.
415
+ */
416
+ displayName?: string | undefined;
417
+ /**
418
+ * 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.
419
+ */
420
+ description: string;
421
+ /**
422
+ * 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.
423
+ */
424
+ status?: RequestBodyStatus | undefined;
425
+ type: "json_schema";
426
+ jsonSchema: RequestBodyJsonSchema;
427
+ };
428
+
429
+ /**
430
+ * 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.
431
+ */
432
+ export const CreateToolRequestBodyToolsRequest1Status = {
433
+ Live: "live",
434
+ Draft: "draft",
435
+ Pending: "pending",
436
+ Published: "published",
437
+ } as const;
438
+ /**
439
+ * 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.
440
+ */
441
+ export type CreateToolRequestBodyToolsRequest1Status = ClosedEnum<
442
+ typeof CreateToolRequestBodyToolsRequest1Status
443
+ >;
444
+
445
+ /**
446
+ * The type must be "object"
447
+ */
448
+ export const CreateToolRequestBodyToolsRequest1Type = {
449
+ Object: "object",
450
+ } as const;
451
+ /**
452
+ * The type must be "object"
453
+ */
454
+ export type CreateToolRequestBodyToolsRequest1Type = ClosedEnum<
455
+ typeof CreateToolRequestBodyToolsRequest1Type
456
+ >;
457
+
458
+ /**
459
+ * 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.
460
+ */
461
+ export type RequestBodyParameters = {
462
+ /**
463
+ * The type must be "object"
464
+ */
465
+ type: CreateToolRequestBodyToolsRequest1Type;
466
+ /**
467
+ * The properties of the function parameters
468
+ */
469
+ properties: { [k: string]: any };
470
+ /**
471
+ * Array of required parameter names
472
+ */
473
+ required: Array<string>;
474
+ additionalProperties?: { [k: string]: any } | undefined;
475
+ };
476
+
477
+ export type RequestBodyFunction = {
478
+ /**
479
+ * 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.
480
+ */
481
+ name: string;
482
+ /**
483
+ * A description of what the function does, used by the model to choose when and how to call the function.
484
+ */
485
+ description?: string | undefined;
486
+ /**
487
+ * 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.
488
+ */
489
+ strict?: boolean | undefined;
490
+ /**
491
+ * 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.
492
+ */
493
+ parameters?: RequestBodyParameters | undefined;
494
+ };
495
+
496
+ /**
497
+ * A custom function tool that allows the model to call predefined functions with structured parameters.
498
+ */
499
+ export type RequestBodyFunctionTool = {
500
+ /**
501
+ * Entity storage path in the format: `project/folder/subfolder/...`
502
+ *
503
+ * @remarks
504
+ *
505
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
506
+ *
507
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
508
+ */
509
+ path: string;
510
+ /**
511
+ * Unique key of the tool as it will be displayed in the UI
512
+ */
513
+ key: string;
514
+ /**
515
+ * 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.
516
+ */
517
+ displayName?: string | undefined;
518
+ /**
519
+ * 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.
520
+ */
521
+ description: string;
522
+ /**
523
+ * 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.
524
+ */
525
+ status?: CreateToolRequestBodyToolsRequest1Status | undefined;
526
+ type: "function";
527
+ function: RequestBodyFunction;
528
+ };
529
+
530
+ /**
531
+ * The tool to create
532
+ */
533
+ export type CreateToolRequestBody =
534
+ | RequestBodyFunctionTool
535
+ | RequestBodyJSONSchemaTool
536
+ | RequestBodyHTTPTool
537
+ | RequestBodyMCPTool
538
+ | RequestBodyCodeExecutionTool;
539
+
540
+ /**
541
+ * 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.
542
+ */
543
+ export const CreateToolResponseBodyToolsResponse200Status = {
544
+ Live: "live",
545
+ Draft: "draft",
546
+ Pending: "pending",
547
+ Published: "published",
548
+ } as const;
549
+ /**
550
+ * 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.
551
+ */
552
+ export type CreateToolResponseBodyToolsResponse200Status = ClosedEnum<
553
+ typeof CreateToolResponseBodyToolsResponse200Status
554
+ >;
555
+
556
+ /**
557
+ * The type must be "object"
558
+ */
559
+ export const CreateToolResponseBodyToolsResponse200ApplicationJson5Type = {
560
+ Object: "object",
561
+ } as const;
562
+ /**
563
+ * The type must be "object"
564
+ */
565
+ export type CreateToolResponseBodyToolsResponse200ApplicationJson5Type =
566
+ ClosedEnum<typeof CreateToolResponseBodyToolsResponse200ApplicationJson5Type>;
567
+
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
+ export type CreateToolResponseBodyParameters = {
572
+ /**
573
+ * The type must be "object"
574
+ */
575
+ type: CreateToolResponseBodyToolsResponse200ApplicationJson5Type;
576
+ /**
577
+ * The properties of the function parameters
578
+ */
579
+ properties: { [k: string]: any };
580
+ /**
581
+ * Array of required parameter names
582
+ */
583
+ required: Array<string>;
584
+ additionalProperties?: { [k: string]: any } | undefined;
585
+ };
586
+
587
+ export const ResponseBodyLanguage = {
588
+ Python: "python",
589
+ } as const;
590
+ export type ResponseBodyLanguage = ClosedEnum<typeof ResponseBodyLanguage>;
591
+
592
+ export type ResponseBodyCodeTool = {
593
+ /**
594
+ * 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.
595
+ */
596
+ parameters?: CreateToolResponseBodyParameters | undefined;
597
+ language: ResponseBodyLanguage;
598
+ /**
599
+ * The code to execute.
600
+ */
601
+ code: string;
602
+ };
603
+
604
+ /**
605
+ * Executes code snippets in a sandboxed environment, currently supporting Python.
606
+ */
607
+ export type ResponseBodyCodeExecutionTool = {
608
+ id: string;
609
+ /**
610
+ * Entity storage path in the format: `project/folder/subfolder/...`
611
+ *
612
+ * @remarks
613
+ *
614
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
615
+ *
616
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
617
+ */
618
+ path: string;
619
+ /**
620
+ * Unique key of the tool as it will be displayed in the UI
621
+ */
622
+ key: string;
623
+ /**
624
+ * 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.
625
+ */
626
+ displayName?: string | undefined;
627
+ /**
628
+ * 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.
629
+ */
630
+ description: string;
631
+ /**
632
+ * The id of the user that created the tool
633
+ */
634
+ createdById?: string | undefined;
635
+ /**
636
+ * The id of the user that last updated the tool
637
+ */
638
+ updatedById?: string | undefined;
639
+ projectId: string;
640
+ workspaceId: string;
641
+ created: string;
642
+ updated: string;
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
+ status: CreateToolResponseBodyToolsResponse200Status;
647
+ versionHash?: string | undefined;
648
+ type: "code";
649
+ codeTool: ResponseBodyCodeTool;
650
+ };
651
+
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 const CreateToolResponseBodyToolsResponseStatus = {
656
+ Live: "live",
657
+ Draft: "draft",
658
+ Pending: "pending",
659
+ Published: "published",
660
+ } as const;
661
+ /**
662
+ * 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.
663
+ */
664
+ export type CreateToolResponseBodyToolsResponseStatus = ClosedEnum<
665
+ typeof CreateToolResponseBodyToolsResponseStatus
666
+ >;
667
+
668
+ export type ResponseBodyHeaders = {
669
+ value: string;
670
+ encrypted: boolean;
671
+ };
672
+
673
+ export const CreateToolResponseBodyToolsResponse200ApplicationJson4Type = {
674
+ Object: "object",
675
+ } as const;
676
+ export type CreateToolResponseBodyToolsResponse200ApplicationJson4Type =
677
+ ClosedEnum<typeof CreateToolResponseBodyToolsResponse200ApplicationJson4Type>;
678
+
679
+ export type CreateToolResponseBodySchema = {
680
+ type: CreateToolResponseBodyToolsResponse200ApplicationJson4Type;
681
+ properties?: { [k: string]: any } | undefined;
682
+ required?: Array<string> | undefined;
683
+ };
684
+
685
+ export type ResponseBodyTools = {
686
+ id: string;
687
+ name: string;
688
+ description?: string | undefined;
689
+ schema: CreateToolResponseBodySchema;
690
+ };
691
+
692
+ /**
693
+ * The connection type used by the MCP server
694
+ */
695
+ export const ResponseBodyConnectionType = {
696
+ Http: "http",
697
+ Sse: "sse",
698
+ } as const;
699
+ /**
700
+ * The connection type used by the MCP server
701
+ */
702
+ export type ResponseBodyConnectionType = ClosedEnum<
703
+ typeof ResponseBodyConnectionType
704
+ >;
705
+
706
+ export type ResponseBodyMcp = {
707
+ /**
708
+ * The MCP server URL (cached for execution)
709
+ */
710
+ serverUrl: string;
711
+ /**
712
+ * HTTP headers for MCP server requests with encryption support
713
+ */
714
+ headers?: { [k: string]: ResponseBodyHeaders } | undefined;
715
+ /**
716
+ * Array of tools available from the MCP server
717
+ */
718
+ tools: Array<ResponseBodyTools>;
719
+ /**
720
+ * The connection type used by the MCP server
721
+ */
722
+ connectionType: ResponseBodyConnectionType;
723
+ };
724
+
725
+ /**
726
+ * A tool from a Model Context Protocol (MCP) server that provides standardized access to external capabilities.
727
+ */
728
+ export type ResponseBodyMCPTool = {
729
+ id: string;
730
+ /**
731
+ * Entity storage path in the format: `project/folder/subfolder/...`
732
+ *
733
+ * @remarks
734
+ *
735
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
736
+ *
737
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
738
+ */
739
+ path: string;
740
+ /**
741
+ * Unique key of the tool as it will be displayed in the UI
742
+ */
743
+ key: string;
744
+ /**
745
+ * 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.
746
+ */
747
+ displayName?: string | undefined;
748
+ /**
749
+ * 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.
750
+ */
751
+ description: string;
752
+ /**
753
+ * The id of the user that created the tool
754
+ */
755
+ createdById?: string | undefined;
756
+ /**
757
+ * The id of the user that last updated the tool
758
+ */
759
+ updatedById?: string | undefined;
760
+ projectId: string;
761
+ workspaceId: string;
762
+ created: string;
763
+ updated: string;
764
+ /**
765
+ * 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.
766
+ */
767
+ status: CreateToolResponseBodyToolsResponseStatus;
768
+ versionHash?: string | undefined;
769
+ type: "mcp";
770
+ mcp: ResponseBodyMcp;
771
+ };
772
+
773
+ /**
774
+ * 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.
775
+ */
776
+ export const CreateToolResponseBodyToolsStatus = {
777
+ Live: "live",
778
+ Draft: "draft",
779
+ Pending: "pending",
780
+ Published: "published",
781
+ } as const;
782
+ /**
783
+ * 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.
784
+ */
785
+ export type CreateToolResponseBodyToolsStatus = ClosedEnum<
786
+ typeof CreateToolResponseBodyToolsStatus
787
+ >;
788
+
789
+ /**
790
+ * The HTTP method to use.
791
+ */
792
+ export const CreateToolResponseBodyMethod = {
793
+ Get: "GET",
794
+ Post: "POST",
795
+ Put: "PUT",
796
+ Delete: "DELETE",
797
+ } as const;
798
+ /**
799
+ * The HTTP method to use.
800
+ */
801
+ export type CreateToolResponseBodyMethod = ClosedEnum<
802
+ typeof CreateToolResponseBodyMethod
803
+ >;
804
+
805
+ export type CreateToolHeadersTools2 = {
806
+ value: string;
807
+ encrypted: boolean;
808
+ };
809
+
810
+ export type CreateToolResponseBodyHeaders = CreateToolHeadersTools2 | string;
811
+
812
+ /**
813
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
814
+ */
815
+ export type ResponseBodyBlueprint = {
816
+ /**
817
+ * The URL to send the request to.
818
+ */
819
+ url: string;
820
+ /**
821
+ * The HTTP method to use.
822
+ */
823
+ method: CreateToolResponseBodyMethod;
824
+ /**
825
+ * The headers to send with the request. Can be a string value or an object with value and encrypted properties.
826
+ */
827
+ headers?: { [k: string]: CreateToolHeadersTools2 | string } | undefined;
828
+ /**
829
+ * The body to send with the request.
830
+ */
831
+ body?: { [k: string]: any } | undefined;
832
+ };
833
+
834
+ /**
835
+ * The type of the argument.
836
+ */
837
+ export const CreateToolResponseBodyToolsResponse200ApplicationJson3Type = {
838
+ String: "string",
839
+ Number: "number",
840
+ Boolean: "boolean",
841
+ } as const;
842
+ /**
843
+ * The type of the argument.
844
+ */
845
+ export type CreateToolResponseBodyToolsResponse200ApplicationJson3Type =
846
+ ClosedEnum<typeof CreateToolResponseBodyToolsResponse200ApplicationJson3Type>;
847
+
848
+ /**
849
+ * The default value of the argument.
850
+ */
851
+ export type ResponseBodyDefaultValue = string | number | boolean;
852
+
853
+ export type ResponseBodyArguments = {
854
+ /**
855
+ * The type of the argument.
856
+ */
857
+ type: CreateToolResponseBodyToolsResponse200ApplicationJson3Type;
858
+ /**
859
+ * A description of the argument.
860
+ */
861
+ description: string;
862
+ /**
863
+ * 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.
864
+ */
865
+ sendToModel: boolean;
866
+ /**
867
+ * The default value of the argument.
868
+ */
869
+ defaultValue?: string | number | boolean | undefined;
870
+ };
871
+
872
+ export type CreateToolResponseBodyHttp = {
873
+ /**
874
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
875
+ */
876
+ blueprint: ResponseBodyBlueprint;
877
+ /**
878
+ * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
879
+ */
880
+ arguments?: { [k: string]: ResponseBodyArguments } | undefined;
881
+ };
882
+
883
+ /**
884
+ * Executes HTTP requests to interact with external APIs and web services using customizable blueprints.
885
+ */
886
+ export type ResponseBodyHTTPTool = {
887
+ id: string;
888
+ /**
889
+ * Entity storage path in the format: `project/folder/subfolder/...`
890
+ *
891
+ * @remarks
892
+ *
893
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
894
+ *
895
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
896
+ */
897
+ path: string;
898
+ /**
899
+ * Unique key of the tool as it will be displayed in the UI
900
+ */
901
+ key: string;
902
+ /**
903
+ * 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.
904
+ */
905
+ displayName?: string | undefined;
906
+ /**
907
+ * 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.
908
+ */
909
+ description: string;
910
+ /**
911
+ * The id of the user that created the tool
912
+ */
913
+ createdById?: string | undefined;
914
+ /**
915
+ * The id of the user that last updated the tool
916
+ */
917
+ updatedById?: string | undefined;
918
+ projectId: string;
919
+ workspaceId: string;
920
+ created: string;
921
+ updated: string;
922
+ /**
923
+ * 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.
924
+ */
925
+ status: CreateToolResponseBodyToolsStatus;
926
+ versionHash?: string | undefined;
927
+ type: "http";
928
+ http: CreateToolResponseBodyHttp;
929
+ };
930
+
931
+ /**
932
+ * 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.
933
+ */
934
+ export const CreateToolResponseBodyStatus = {
935
+ Live: "live",
936
+ Draft: "draft",
937
+ Pending: "pending",
938
+ Published: "published",
939
+ } as const;
940
+ /**
941
+ * 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.
942
+ */
943
+ export type CreateToolResponseBodyStatus = ClosedEnum<
944
+ typeof CreateToolResponseBodyStatus
945
+ >;
946
+
947
+ /**
948
+ * 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.
949
+ */
950
+ export type ResponseBodySchema = {
951
+ /**
952
+ * The JSON Schema type
953
+ */
954
+ type: string;
955
+ /**
956
+ * The properties of the JSON Schema object
957
+ */
958
+ properties: { [k: string]: any };
959
+ /**
960
+ * Array of required property names
961
+ */
962
+ required: Array<string>;
963
+ additionalProperties?: { [k: string]: any } | undefined;
964
+ };
965
+
966
+ export type ResponseBodyJsonSchema = {
967
+ /**
968
+ * 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.
969
+ */
970
+ name: string;
971
+ /**
972
+ * A description of what the response format is for. This will be shown to the user.
973
+ */
974
+ description: string;
975
+ /**
976
+ * 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.
977
+ */
978
+ schema: ResponseBodySchema;
979
+ /**
980
+ * 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.
981
+ */
982
+ strict?: boolean | undefined;
983
+ };
984
+
985
+ /**
986
+ * A tool that enforces structured output format using JSON Schema for consistent response formatting.
987
+ */
988
+ export type ResponseBodyJSONSchemaTool = {
989
+ id: string;
990
+ /**
991
+ * Entity storage path in the format: `project/folder/subfolder/...`
992
+ *
993
+ * @remarks
994
+ *
995
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
996
+ *
997
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
998
+ */
999
+ path: string;
1000
+ /**
1001
+ * Unique key of the tool as it will be displayed in the UI
1002
+ */
1003
+ key: string;
1004
+ /**
1005
+ * 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.
1006
+ */
1007
+ displayName?: string | undefined;
1008
+ /**
1009
+ * 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.
1010
+ */
1011
+ description: string;
1012
+ /**
1013
+ * The id of the user that created the tool
1014
+ */
1015
+ createdById?: string | undefined;
1016
+ /**
1017
+ * The id of the user that last updated the tool
1018
+ */
1019
+ updatedById?: string | undefined;
1020
+ projectId: string;
1021
+ workspaceId: string;
1022
+ created: string;
1023
+ updated: string;
1024
+ /**
1025
+ * 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.
1026
+ */
1027
+ status: CreateToolResponseBodyStatus;
1028
+ versionHash?: string | undefined;
1029
+ type: "json_schema";
1030
+ jsonSchema: ResponseBodyJsonSchema;
1031
+ };
1032
+
1033
+ /**
1034
+ * 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.
1035
+ */
1036
+ export const ResponseBodyStatus = {
1037
+ Live: "live",
1038
+ Draft: "draft",
1039
+ Pending: "pending",
1040
+ Published: "published",
1041
+ } as const;
1042
+ /**
1043
+ * 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.
1044
+ */
1045
+ export type ResponseBodyStatus = ClosedEnum<typeof ResponseBodyStatus>;
1046
+
1047
+ /**
1048
+ * The type must be "object"
1049
+ */
1050
+ export const CreateToolResponseBodyToolsResponse200ApplicationJson1Type = {
1051
+ Object: "object",
1052
+ } as const;
1053
+ /**
1054
+ * The type must be "object"
1055
+ */
1056
+ export type CreateToolResponseBodyToolsResponse200ApplicationJson1Type =
1057
+ ClosedEnum<typeof CreateToolResponseBodyToolsResponse200ApplicationJson1Type>;
1058
+
1059
+ /**
1060
+ * 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.
1061
+ */
1062
+ export type ResponseBodyParameters = {
1063
+ /**
1064
+ * The type must be "object"
1065
+ */
1066
+ type: CreateToolResponseBodyToolsResponse200ApplicationJson1Type;
1067
+ /**
1068
+ * The properties of the function parameters
1069
+ */
1070
+ properties: { [k: string]: any };
1071
+ /**
1072
+ * Array of required parameter names
1073
+ */
1074
+ required: Array<string>;
1075
+ additionalProperties?: { [k: string]: any } | undefined;
1076
+ };
1077
+
1078
+ export type CreateToolResponseBodyFunction = {
1079
+ /**
1080
+ * 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.
1081
+ */
1082
+ name: string;
1083
+ /**
1084
+ * A description of what the function does, used by the model to choose when and how to call the function.
1085
+ */
1086
+ description?: string | undefined;
1087
+ /**
1088
+ * 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.
1089
+ */
1090
+ strict?: boolean | undefined;
1091
+ /**
1092
+ * 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.
1093
+ */
1094
+ parameters?: ResponseBodyParameters | undefined;
1095
+ };
1096
+
1097
+ /**
1098
+ * A custom function tool that allows the model to call predefined functions with structured parameters.
1099
+ */
1100
+ export type ResponseBodyFunctionTool = {
1101
+ id: string;
1102
+ /**
1103
+ * Entity storage path in the format: `project/folder/subfolder/...`
1104
+ *
1105
+ * @remarks
1106
+ *
1107
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
1108
+ *
1109
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
1110
+ */
1111
+ path: string;
1112
+ /**
1113
+ * Unique key of the tool as it will be displayed in the UI
1114
+ */
1115
+ key: string;
1116
+ /**
1117
+ * 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.
1118
+ */
1119
+ displayName?: string | undefined;
1120
+ /**
1121
+ * 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.
1122
+ */
1123
+ description: string;
1124
+ /**
1125
+ * The id of the user that created the tool
1126
+ */
1127
+ createdById?: string | undefined;
1128
+ /**
1129
+ * The id of the user that last updated the tool
1130
+ */
1131
+ updatedById?: string | undefined;
1132
+ projectId: string;
1133
+ workspaceId: string;
1134
+ created: string;
1135
+ updated: string;
1136
+ /**
1137
+ * 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.
1138
+ */
1139
+ status: ResponseBodyStatus;
1140
+ versionHash?: string | undefined;
1141
+ type: "function";
1142
+ function: CreateToolResponseBodyFunction;
1143
+ };
1144
+
1145
+ /**
1146
+ * Successfully created the tool.
1147
+ */
1148
+ export type CreateToolResponseBody =
1149
+ | ResponseBodyFunctionTool
1150
+ | ResponseBodyJSONSchemaTool
1151
+ | ResponseBodyHTTPTool
1152
+ | ResponseBodyMCPTool
1153
+ | ResponseBodyCodeExecutionTool;
1154
+
1155
+ /** @internal */
1156
+ export const CreateToolRequestBodyToolsRequestStatus$outboundSchema:
1157
+ z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequestStatus> = z
1158
+ .nativeEnum(CreateToolRequestBodyToolsRequestStatus);
1159
+
1160
+ /** @internal */
1161
+ export const CreateToolRequestBodyToolsRequest5CodeToolType$outboundSchema:
1162
+ z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest5CodeToolType> = z
1163
+ .nativeEnum(CreateToolRequestBodyToolsRequest5CodeToolType);
1164
+
1165
+ /** @internal */
1166
+ export type CreateToolRequestBodyParameters$Outbound = {
1167
+ type: string;
1168
+ properties: { [k: string]: any };
1169
+ required: Array<string>;
1170
+ [additionalProperties: string]: unknown;
1171
+ };
1172
+
1173
+ /** @internal */
1174
+ export const CreateToolRequestBodyParameters$outboundSchema: z.ZodType<
1175
+ CreateToolRequestBodyParameters$Outbound,
1176
+ z.ZodTypeDef,
1177
+ CreateToolRequestBodyParameters
1178
+ > = z.object({
1179
+ type: CreateToolRequestBodyToolsRequest5CodeToolType$outboundSchema,
1180
+ properties: z.record(z.any()),
1181
+ required: z.array(z.string()),
1182
+ additionalProperties: z.record(z.any()).optional(),
1183
+ }).transform((v) => {
1184
+ return {
1185
+ ...v.additionalProperties,
1186
+ ...remap$(v, {
1187
+ additionalProperties: null,
1188
+ }),
1189
+ };
1190
+ });
1191
+
1192
+ export function createToolRequestBodyParametersToJSON(
1193
+ createToolRequestBodyParameters: CreateToolRequestBodyParameters,
1194
+ ): string {
1195
+ return JSON.stringify(
1196
+ CreateToolRequestBodyParameters$outboundSchema.parse(
1197
+ createToolRequestBodyParameters,
1198
+ ),
1199
+ );
1200
+ }
1201
+
1202
+ /** @internal */
1203
+ export const RequestBodyLanguage$outboundSchema: z.ZodNativeEnum<
1204
+ typeof RequestBodyLanguage
1205
+ > = z.nativeEnum(RequestBodyLanguage);
1206
+
1207
+ /** @internal */
1208
+ export type RequestBodyCodeTool$Outbound = {
1209
+ parameters?: CreateToolRequestBodyParameters$Outbound | undefined;
1210
+ language: string;
1211
+ code: string;
1212
+ };
1213
+
1214
+ /** @internal */
1215
+ export const RequestBodyCodeTool$outboundSchema: z.ZodType<
1216
+ RequestBodyCodeTool$Outbound,
1217
+ z.ZodTypeDef,
1218
+ RequestBodyCodeTool
1219
+ > = z.object({
1220
+ parameters: z.lazy(() => CreateToolRequestBodyParameters$outboundSchema)
1221
+ .optional(),
1222
+ language: RequestBodyLanguage$outboundSchema,
1223
+ code: z.string(),
1224
+ });
1225
+
1226
+ export function requestBodyCodeToolToJSON(
1227
+ requestBodyCodeTool: RequestBodyCodeTool,
1228
+ ): string {
1229
+ return JSON.stringify(
1230
+ RequestBodyCodeTool$outboundSchema.parse(requestBodyCodeTool),
1231
+ );
1232
+ }
1233
+
1234
+ /** @internal */
1235
+ export type RequestBodyCodeExecutionTool$Outbound = {
1236
+ path: string;
1237
+ key: string;
1238
+ display_name?: string | undefined;
1239
+ description: string;
1240
+ status: string;
1241
+ type: "code";
1242
+ code_tool: RequestBodyCodeTool$Outbound;
1243
+ };
1244
+
1245
+ /** @internal */
1246
+ export const RequestBodyCodeExecutionTool$outboundSchema: z.ZodType<
1247
+ RequestBodyCodeExecutionTool$Outbound,
1248
+ z.ZodTypeDef,
1249
+ RequestBodyCodeExecutionTool
1250
+ > = z.object({
1251
+ path: z.string(),
1252
+ key: z.string(),
1253
+ displayName: z.string().optional(),
1254
+ description: z.string(),
1255
+ status: CreateToolRequestBodyToolsRequestStatus$outboundSchema.default(
1256
+ "live",
1257
+ ),
1258
+ type: z.literal("code"),
1259
+ codeTool: z.lazy(() => RequestBodyCodeTool$outboundSchema),
1260
+ }).transform((v) => {
1261
+ return remap$(v, {
1262
+ displayName: "display_name",
1263
+ codeTool: "code_tool",
1264
+ });
1265
+ });
1266
+
1267
+ export function requestBodyCodeExecutionToolToJSON(
1268
+ requestBodyCodeExecutionTool: RequestBodyCodeExecutionTool,
1269
+ ): string {
1270
+ return JSON.stringify(
1271
+ RequestBodyCodeExecutionTool$outboundSchema.parse(
1272
+ requestBodyCodeExecutionTool,
1273
+ ),
1274
+ );
1275
+ }
1276
+
1277
+ /** @internal */
1278
+ export const CreateToolRequestBodyToolsStatus$outboundSchema: z.ZodNativeEnum<
1279
+ typeof CreateToolRequestBodyToolsStatus
1280
+ > = z.nativeEnum(CreateToolRequestBodyToolsStatus);
1281
+
1282
+ /** @internal */
1283
+ export type RequestBodyHeaders$Outbound = {
1284
+ value: string;
1285
+ encrypted: boolean;
1286
+ };
1287
+
1288
+ /** @internal */
1289
+ export const RequestBodyHeaders$outboundSchema: z.ZodType<
1290
+ RequestBodyHeaders$Outbound,
1291
+ z.ZodTypeDef,
1292
+ RequestBodyHeaders
1293
+ > = z.object({
1294
+ value: z.string(),
1295
+ encrypted: z.boolean().default(false),
1296
+ });
1297
+
1298
+ export function requestBodyHeadersToJSON(
1299
+ requestBodyHeaders: RequestBodyHeaders,
1300
+ ): string {
1301
+ return JSON.stringify(
1302
+ RequestBodyHeaders$outboundSchema.parse(requestBodyHeaders),
1303
+ );
1304
+ }
1305
+
1306
+ /** @internal */
1307
+ export const RequestBodyConnectionType$outboundSchema: z.ZodNativeEnum<
1308
+ typeof RequestBodyConnectionType
1309
+ > = z.nativeEnum(RequestBodyConnectionType);
1310
+
1311
+ /** @internal */
1312
+ export type RequestBodyMcp$Outbound = {
1313
+ server_url: string;
1314
+ headers?: { [k: string]: RequestBodyHeaders$Outbound } | undefined;
1315
+ connection_type: string;
1316
+ };
1317
+
1318
+ /** @internal */
1319
+ export const RequestBodyMcp$outboundSchema: z.ZodType<
1320
+ RequestBodyMcp$Outbound,
1321
+ z.ZodTypeDef,
1322
+ RequestBodyMcp
1323
+ > = z.object({
1324
+ serverUrl: z.string(),
1325
+ headers: z.record(z.lazy(() => RequestBodyHeaders$outboundSchema)).optional(),
1326
+ connectionType: RequestBodyConnectionType$outboundSchema,
1327
+ }).transform((v) => {
1328
+ return remap$(v, {
1329
+ serverUrl: "server_url",
1330
+ connectionType: "connection_type",
1331
+ });
1332
+ });
1333
+
1334
+ export function requestBodyMcpToJSON(requestBodyMcp: RequestBodyMcp): string {
1335
+ return JSON.stringify(RequestBodyMcp$outboundSchema.parse(requestBodyMcp));
1336
+ }
1337
+
1338
+ /** @internal */
1339
+ export type RequestBodyMCPTool$Outbound = {
1340
+ path: string;
1341
+ key: string;
1342
+ display_name?: string | undefined;
1343
+ description: string;
1344
+ status: string;
1345
+ type: "mcp";
1346
+ mcp: RequestBodyMcp$Outbound;
1347
+ };
1348
+
1349
+ /** @internal */
1350
+ export const RequestBodyMCPTool$outboundSchema: z.ZodType<
1351
+ RequestBodyMCPTool$Outbound,
1352
+ z.ZodTypeDef,
1353
+ RequestBodyMCPTool
1354
+ > = z.object({
1355
+ path: z.string(),
1356
+ key: z.string(),
1357
+ displayName: z.string().optional(),
1358
+ description: z.string(),
1359
+ status: CreateToolRequestBodyToolsStatus$outboundSchema.default("live"),
1360
+ type: z.literal("mcp"),
1361
+ mcp: z.lazy(() => RequestBodyMcp$outboundSchema),
1362
+ }).transform((v) => {
1363
+ return remap$(v, {
1364
+ displayName: "display_name",
1365
+ });
1366
+ });
1367
+
1368
+ export function requestBodyMCPToolToJSON(
1369
+ requestBodyMCPTool: RequestBodyMCPTool,
1370
+ ): string {
1371
+ return JSON.stringify(
1372
+ RequestBodyMCPTool$outboundSchema.parse(requestBodyMCPTool),
1373
+ );
1374
+ }
1375
+
1376
+ /** @internal */
1377
+ export const CreateToolRequestBodyStatus$outboundSchema: z.ZodNativeEnum<
1378
+ typeof CreateToolRequestBodyStatus
1379
+ > = z.nativeEnum(CreateToolRequestBodyStatus);
1380
+
1381
+ /** @internal */
1382
+ export const CreateToolRequestBodyMethod$outboundSchema: z.ZodNativeEnum<
1383
+ typeof CreateToolRequestBodyMethod
1384
+ > = z.nativeEnum(CreateToolRequestBodyMethod);
1385
+
1386
+ /** @internal */
1387
+ export type CreateToolHeaders2$Outbound = {
1388
+ value: string;
1389
+ encrypted: boolean;
1390
+ };
1391
+
1392
+ /** @internal */
1393
+ export const CreateToolHeaders2$outboundSchema: z.ZodType<
1394
+ CreateToolHeaders2$Outbound,
1395
+ z.ZodTypeDef,
1396
+ CreateToolHeaders2
1397
+ > = z.object({
1398
+ value: z.string(),
1399
+ encrypted: z.boolean().default(false),
1400
+ });
1401
+
1402
+ export function createToolHeaders2ToJSON(
1403
+ createToolHeaders2: CreateToolHeaders2,
1404
+ ): string {
1405
+ return JSON.stringify(
1406
+ CreateToolHeaders2$outboundSchema.parse(createToolHeaders2),
1407
+ );
1408
+ }
1409
+
1410
+ /** @internal */
1411
+ export type CreateToolRequestBodyHeaders$Outbound =
1412
+ | CreateToolHeaders2$Outbound
1413
+ | string;
1414
+
1415
+ /** @internal */
1416
+ export const CreateToolRequestBodyHeaders$outboundSchema: z.ZodType<
1417
+ CreateToolRequestBodyHeaders$Outbound,
1418
+ z.ZodTypeDef,
1419
+ CreateToolRequestBodyHeaders
1420
+ > = z.union([z.lazy(() => CreateToolHeaders2$outboundSchema), z.string()]);
1421
+
1422
+ export function createToolRequestBodyHeadersToJSON(
1423
+ createToolRequestBodyHeaders: CreateToolRequestBodyHeaders,
1424
+ ): string {
1425
+ return JSON.stringify(
1426
+ CreateToolRequestBodyHeaders$outboundSchema.parse(
1427
+ createToolRequestBodyHeaders,
1428
+ ),
1429
+ );
1430
+ }
1431
+
1432
+ /** @internal */
1433
+ export type RequestBodyBlueprint$Outbound = {
1434
+ url: string;
1435
+ method: string;
1436
+ headers?: { [k: string]: CreateToolHeaders2$Outbound | string } | undefined;
1437
+ body?: { [k: string]: any } | undefined;
1438
+ };
1439
+
1440
+ /** @internal */
1441
+ export const RequestBodyBlueprint$outboundSchema: z.ZodType<
1442
+ RequestBodyBlueprint$Outbound,
1443
+ z.ZodTypeDef,
1444
+ RequestBodyBlueprint
1445
+ > = z.object({
1446
+ url: z.string(),
1447
+ method: CreateToolRequestBodyMethod$outboundSchema,
1448
+ headers: z.record(
1449
+ z.union([z.lazy(() => CreateToolHeaders2$outboundSchema), z.string()]),
1450
+ ).optional(),
1451
+ body: z.record(z.any()).optional(),
1452
+ });
1453
+
1454
+ export function requestBodyBlueprintToJSON(
1455
+ requestBodyBlueprint: RequestBodyBlueprint,
1456
+ ): string {
1457
+ return JSON.stringify(
1458
+ RequestBodyBlueprint$outboundSchema.parse(requestBodyBlueprint),
1459
+ );
1460
+ }
1461
+
1462
+ /** @internal */
1463
+ export const CreateToolRequestBodyToolsRequest3Type$outboundSchema:
1464
+ z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest3Type> = z.nativeEnum(
1465
+ CreateToolRequestBodyToolsRequest3Type,
1466
+ );
1467
+
1468
+ /** @internal */
1469
+ export type RequestBodyDefaultValue$Outbound = string | number | boolean;
1470
+
1471
+ /** @internal */
1472
+ export const RequestBodyDefaultValue$outboundSchema: z.ZodType<
1473
+ RequestBodyDefaultValue$Outbound,
1474
+ z.ZodTypeDef,
1475
+ RequestBodyDefaultValue
1476
+ > = z.union([z.string(), z.number(), z.boolean()]);
1477
+
1478
+ export function requestBodyDefaultValueToJSON(
1479
+ requestBodyDefaultValue: RequestBodyDefaultValue,
1480
+ ): string {
1481
+ return JSON.stringify(
1482
+ RequestBodyDefaultValue$outboundSchema.parse(requestBodyDefaultValue),
1483
+ );
1484
+ }
1485
+
1486
+ /** @internal */
1487
+ export type RequestBodyArguments$Outbound = {
1488
+ type: string;
1489
+ description: string;
1490
+ send_to_model: boolean;
1491
+ default_value?: string | number | boolean | undefined;
1492
+ };
1493
+
1494
+ /** @internal */
1495
+ export const RequestBodyArguments$outboundSchema: z.ZodType<
1496
+ RequestBodyArguments$Outbound,
1497
+ z.ZodTypeDef,
1498
+ RequestBodyArguments
1499
+ > = z.object({
1500
+ type: CreateToolRequestBodyToolsRequest3Type$outboundSchema,
1501
+ description: z.string(),
1502
+ sendToModel: z.boolean().default(true),
1503
+ defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
1504
+ }).transform((v) => {
1505
+ return remap$(v, {
1506
+ sendToModel: "send_to_model",
1507
+ defaultValue: "default_value",
1508
+ });
1509
+ });
1510
+
1511
+ export function requestBodyArgumentsToJSON(
1512
+ requestBodyArguments: RequestBodyArguments,
1513
+ ): string {
1514
+ return JSON.stringify(
1515
+ RequestBodyArguments$outboundSchema.parse(requestBodyArguments),
1516
+ );
1517
+ }
1518
+
1519
+ /** @internal */
1520
+ export type CreateToolRequestBodyHttp$Outbound = {
1521
+ blueprint: RequestBodyBlueprint$Outbound;
1522
+ arguments?: { [k: string]: RequestBodyArguments$Outbound } | undefined;
1523
+ };
1524
+
1525
+ /** @internal */
1526
+ export const CreateToolRequestBodyHttp$outboundSchema: z.ZodType<
1527
+ CreateToolRequestBodyHttp$Outbound,
1528
+ z.ZodTypeDef,
1529
+ CreateToolRequestBodyHttp
1530
+ > = z.object({
1531
+ blueprint: z.lazy(() => RequestBodyBlueprint$outboundSchema),
1532
+ arguments: z.record(z.lazy(() => RequestBodyArguments$outboundSchema))
1533
+ .optional(),
1534
+ });
1535
+
1536
+ export function createToolRequestBodyHttpToJSON(
1537
+ createToolRequestBodyHttp: CreateToolRequestBodyHttp,
1538
+ ): string {
1539
+ return JSON.stringify(
1540
+ CreateToolRequestBodyHttp$outboundSchema.parse(createToolRequestBodyHttp),
1541
+ );
1542
+ }
1543
+
1544
+ /** @internal */
1545
+ export type RequestBodyHTTPTool$Outbound = {
1546
+ path: string;
1547
+ key: string;
1548
+ display_name?: string | undefined;
1549
+ description: string;
1550
+ status: string;
1551
+ type: "http";
1552
+ http: CreateToolRequestBodyHttp$Outbound;
1553
+ };
1554
+
1555
+ /** @internal */
1556
+ export const RequestBodyHTTPTool$outboundSchema: z.ZodType<
1557
+ RequestBodyHTTPTool$Outbound,
1558
+ z.ZodTypeDef,
1559
+ RequestBodyHTTPTool
1560
+ > = z.object({
1561
+ path: z.string(),
1562
+ key: z.string(),
1563
+ displayName: z.string().optional(),
1564
+ description: z.string(),
1565
+ status: CreateToolRequestBodyStatus$outboundSchema.default("live"),
1566
+ type: z.literal("http"),
1567
+ http: z.lazy(() => CreateToolRequestBodyHttp$outboundSchema),
1568
+ }).transform((v) => {
1569
+ return remap$(v, {
1570
+ displayName: "display_name",
1571
+ });
1572
+ });
1573
+
1574
+ export function requestBodyHTTPToolToJSON(
1575
+ requestBodyHTTPTool: RequestBodyHTTPTool,
1576
+ ): string {
1577
+ return JSON.stringify(
1578
+ RequestBodyHTTPTool$outboundSchema.parse(requestBodyHTTPTool),
1579
+ );
1580
+ }
1581
+
1582
+ /** @internal */
1583
+ export const RequestBodyStatus$outboundSchema: z.ZodNativeEnum<
1584
+ typeof RequestBodyStatus
1585
+ > = z.nativeEnum(RequestBodyStatus);
1586
+
1587
+ /** @internal */
1588
+ export type RequestBodySchema$Outbound = {
1589
+ type: string;
1590
+ properties: { [k: string]: any };
1591
+ required: Array<string>;
1592
+ [additionalProperties: string]: unknown;
1593
+ };
1594
+
1595
+ /** @internal */
1596
+ export const RequestBodySchema$outboundSchema: z.ZodType<
1597
+ RequestBodySchema$Outbound,
1598
+ z.ZodTypeDef,
1599
+ RequestBodySchema
1600
+ > = z.object({
1601
+ type: z.string(),
1602
+ properties: z.record(z.any()),
1603
+ required: z.array(z.string()),
1604
+ additionalProperties: z.record(z.any()).optional(),
1605
+ }).transform((v) => {
1606
+ return {
1607
+ ...v.additionalProperties,
1608
+ ...remap$(v, {
1609
+ additionalProperties: null,
1610
+ }),
1611
+ };
1612
+ });
1613
+
1614
+ export function requestBodySchemaToJSON(
1615
+ requestBodySchema: RequestBodySchema,
1616
+ ): string {
1617
+ return JSON.stringify(
1618
+ RequestBodySchema$outboundSchema.parse(requestBodySchema),
1619
+ );
1620
+ }
1621
+
1622
+ /** @internal */
1623
+ export type RequestBodyJsonSchema$Outbound = {
1624
+ name: string;
1625
+ description: string;
1626
+ schema: RequestBodySchema$Outbound;
1627
+ strict?: boolean | undefined;
1628
+ };
1629
+
1630
+ /** @internal */
1631
+ export const RequestBodyJsonSchema$outboundSchema: z.ZodType<
1632
+ RequestBodyJsonSchema$Outbound,
1633
+ z.ZodTypeDef,
1634
+ RequestBodyJsonSchema
1635
+ > = z.object({
1636
+ name: z.string(),
1637
+ description: z.string(),
1638
+ schema: z.lazy(() => RequestBodySchema$outboundSchema),
1639
+ strict: z.boolean().optional(),
1640
+ });
1641
+
1642
+ export function requestBodyJsonSchemaToJSON(
1643
+ requestBodyJsonSchema: RequestBodyJsonSchema,
1644
+ ): string {
1645
+ return JSON.stringify(
1646
+ RequestBodyJsonSchema$outboundSchema.parse(requestBodyJsonSchema),
1647
+ );
1648
+ }
1649
+
1650
+ /** @internal */
1651
+ export type RequestBodyJSONSchemaTool$Outbound = {
1652
+ path: string;
1653
+ key: string;
1654
+ display_name?: string | undefined;
1655
+ description: string;
1656
+ status: string;
1657
+ type: "json_schema";
1658
+ json_schema: RequestBodyJsonSchema$Outbound;
1659
+ };
1660
+
1661
+ /** @internal */
1662
+ export const RequestBodyJSONSchemaTool$outboundSchema: z.ZodType<
1663
+ RequestBodyJSONSchemaTool$Outbound,
1664
+ z.ZodTypeDef,
1665
+ RequestBodyJSONSchemaTool
1666
+ > = z.object({
1667
+ path: z.string(),
1668
+ key: z.string(),
1669
+ displayName: z.string().optional(),
1670
+ description: z.string(),
1671
+ status: RequestBodyStatus$outboundSchema.default("live"),
1672
+ type: z.literal("json_schema"),
1673
+ jsonSchema: z.lazy(() => RequestBodyJsonSchema$outboundSchema),
1674
+ }).transform((v) => {
1675
+ return remap$(v, {
1676
+ displayName: "display_name",
1677
+ jsonSchema: "json_schema",
1678
+ });
1679
+ });
1680
+
1681
+ export function requestBodyJSONSchemaToolToJSON(
1682
+ requestBodyJSONSchemaTool: RequestBodyJSONSchemaTool,
1683
+ ): string {
1684
+ return JSON.stringify(
1685
+ RequestBodyJSONSchemaTool$outboundSchema.parse(requestBodyJSONSchemaTool),
1686
+ );
1687
+ }
1688
+
1689
+ /** @internal */
1690
+ export const CreateToolRequestBodyToolsRequest1Status$outboundSchema:
1691
+ z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest1Status> = z
1692
+ .nativeEnum(CreateToolRequestBodyToolsRequest1Status);
1693
+
1694
+ /** @internal */
1695
+ export const CreateToolRequestBodyToolsRequest1Type$outboundSchema:
1696
+ z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest1Type> = z.nativeEnum(
1697
+ CreateToolRequestBodyToolsRequest1Type,
1698
+ );
1699
+
1700
+ /** @internal */
1701
+ export type RequestBodyParameters$Outbound = {
1702
+ type: string;
1703
+ properties: { [k: string]: any };
1704
+ required: Array<string>;
1705
+ [additionalProperties: string]: unknown;
1706
+ };
1707
+
1708
+ /** @internal */
1709
+ export const RequestBodyParameters$outboundSchema: z.ZodType<
1710
+ RequestBodyParameters$Outbound,
1711
+ z.ZodTypeDef,
1712
+ RequestBodyParameters
1713
+ > = z.object({
1714
+ type: CreateToolRequestBodyToolsRequest1Type$outboundSchema,
1715
+ properties: z.record(z.any()),
1716
+ required: z.array(z.string()),
1717
+ additionalProperties: z.record(z.any()).optional(),
1718
+ }).transform((v) => {
1719
+ return {
1720
+ ...v.additionalProperties,
1721
+ ...remap$(v, {
1722
+ additionalProperties: null,
1723
+ }),
1724
+ };
1725
+ });
1726
+
1727
+ export function requestBodyParametersToJSON(
1728
+ requestBodyParameters: RequestBodyParameters,
1729
+ ): string {
1730
+ return JSON.stringify(
1731
+ RequestBodyParameters$outboundSchema.parse(requestBodyParameters),
1732
+ );
1733
+ }
1734
+
1735
+ /** @internal */
1736
+ export type RequestBodyFunction$Outbound = {
1737
+ name: string;
1738
+ description?: string | undefined;
1739
+ strict?: boolean | undefined;
1740
+ parameters?: RequestBodyParameters$Outbound | undefined;
1741
+ };
1742
+
1743
+ /** @internal */
1744
+ export const RequestBodyFunction$outboundSchema: z.ZodType<
1745
+ RequestBodyFunction$Outbound,
1746
+ z.ZodTypeDef,
1747
+ RequestBodyFunction
1748
+ > = z.object({
1749
+ name: z.string(),
1750
+ description: z.string().optional(),
1751
+ strict: z.boolean().optional(),
1752
+ parameters: z.lazy(() => RequestBodyParameters$outboundSchema).optional(),
1753
+ });
1754
+
1755
+ export function requestBodyFunctionToJSON(
1756
+ requestBodyFunction: RequestBodyFunction,
1757
+ ): string {
1758
+ return JSON.stringify(
1759
+ RequestBodyFunction$outboundSchema.parse(requestBodyFunction),
1760
+ );
1761
+ }
1762
+
1763
+ /** @internal */
1764
+ export type RequestBodyFunctionTool$Outbound = {
1765
+ path: string;
1766
+ key: string;
1767
+ display_name?: string | undefined;
1768
+ description: string;
1769
+ status: string;
1770
+ type: "function";
1771
+ function: RequestBodyFunction$Outbound;
1772
+ };
1773
+
1774
+ /** @internal */
1775
+ export const RequestBodyFunctionTool$outboundSchema: z.ZodType<
1776
+ RequestBodyFunctionTool$Outbound,
1777
+ z.ZodTypeDef,
1778
+ RequestBodyFunctionTool
1779
+ > = z.object({
1780
+ path: z.string(),
1781
+ key: z.string(),
1782
+ displayName: z.string().optional(),
1783
+ description: z.string(),
1784
+ status: CreateToolRequestBodyToolsRequest1Status$outboundSchema.default(
1785
+ "live",
1786
+ ),
1787
+ type: z.literal("function"),
1788
+ function: z.lazy(() => RequestBodyFunction$outboundSchema),
1789
+ }).transform((v) => {
1790
+ return remap$(v, {
1791
+ displayName: "display_name",
1792
+ });
1793
+ });
1794
+
1795
+ export function requestBodyFunctionToolToJSON(
1796
+ requestBodyFunctionTool: RequestBodyFunctionTool,
1797
+ ): string {
1798
+ return JSON.stringify(
1799
+ RequestBodyFunctionTool$outboundSchema.parse(requestBodyFunctionTool),
1800
+ );
1801
+ }
1802
+
1803
+ /** @internal */
1804
+ export type CreateToolRequestBody$Outbound =
1805
+ | RequestBodyFunctionTool$Outbound
1806
+ | RequestBodyJSONSchemaTool$Outbound
1807
+ | RequestBodyHTTPTool$Outbound
1808
+ | RequestBodyMCPTool$Outbound
1809
+ | RequestBodyCodeExecutionTool$Outbound;
1810
+
1811
+ /** @internal */
1812
+ export const CreateToolRequestBody$outboundSchema: z.ZodType<
1813
+ CreateToolRequestBody$Outbound,
1814
+ z.ZodTypeDef,
1815
+ CreateToolRequestBody
1816
+ > = z.union([
1817
+ z.lazy(() => RequestBodyFunctionTool$outboundSchema),
1818
+ z.lazy(() => RequestBodyJSONSchemaTool$outboundSchema),
1819
+ z.lazy(() => RequestBodyHTTPTool$outboundSchema),
1820
+ z.lazy(() => RequestBodyMCPTool$outboundSchema),
1821
+ z.lazy(() => RequestBodyCodeExecutionTool$outboundSchema),
1822
+ ]);
1823
+
1824
+ export function createToolRequestBodyToJSON(
1825
+ createToolRequestBody: CreateToolRequestBody,
1826
+ ): string {
1827
+ return JSON.stringify(
1828
+ CreateToolRequestBody$outboundSchema.parse(createToolRequestBody),
1829
+ );
1830
+ }
1831
+
1832
+ /** @internal */
1833
+ export const CreateToolResponseBodyToolsResponse200Status$inboundSchema:
1834
+ z.ZodNativeEnum<typeof CreateToolResponseBodyToolsResponse200Status> = z
1835
+ .nativeEnum(CreateToolResponseBodyToolsResponse200Status);
1836
+
1837
+ /** @internal */
1838
+ export const CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema:
1839
+ z.ZodNativeEnum<
1840
+ typeof CreateToolResponseBodyToolsResponse200ApplicationJson5Type
1841
+ > = z.nativeEnum(CreateToolResponseBodyToolsResponse200ApplicationJson5Type);
1842
+
1843
+ /** @internal */
1844
+ export const CreateToolResponseBodyParameters$inboundSchema: z.ZodType<
1845
+ CreateToolResponseBodyParameters,
1846
+ z.ZodTypeDef,
1847
+ unknown
1848
+ > = collectExtraKeys$(
1849
+ z.object({
1850
+ type:
1851
+ CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema,
1852
+ properties: z.record(z.any()),
1853
+ required: z.array(z.string()),
1854
+ }).catchall(z.any()),
1855
+ "additionalProperties",
1856
+ true,
1857
+ );
1858
+
1859
+ export function createToolResponseBodyParametersFromJSON(
1860
+ jsonString: string,
1861
+ ): SafeParseResult<CreateToolResponseBodyParameters, SDKValidationError> {
1862
+ return safeParse(
1863
+ jsonString,
1864
+ (x) => CreateToolResponseBodyParameters$inboundSchema.parse(JSON.parse(x)),
1865
+ `Failed to parse 'CreateToolResponseBodyParameters' from JSON`,
1866
+ );
1867
+ }
1868
+
1869
+ /** @internal */
1870
+ export const ResponseBodyLanguage$inboundSchema: z.ZodNativeEnum<
1871
+ typeof ResponseBodyLanguage
1872
+ > = z.nativeEnum(ResponseBodyLanguage);
1873
+
1874
+ /** @internal */
1875
+ export const ResponseBodyCodeTool$inboundSchema: z.ZodType<
1876
+ ResponseBodyCodeTool,
1877
+ z.ZodTypeDef,
1878
+ unknown
1879
+ > = z.object({
1880
+ parameters: z.lazy(() => CreateToolResponseBodyParameters$inboundSchema)
1881
+ .optional(),
1882
+ language: ResponseBodyLanguage$inboundSchema,
1883
+ code: z.string(),
1884
+ });
1885
+
1886
+ export function responseBodyCodeToolFromJSON(
1887
+ jsonString: string,
1888
+ ): SafeParseResult<ResponseBodyCodeTool, SDKValidationError> {
1889
+ return safeParse(
1890
+ jsonString,
1891
+ (x) => ResponseBodyCodeTool$inboundSchema.parse(JSON.parse(x)),
1892
+ `Failed to parse 'ResponseBodyCodeTool' from JSON`,
1893
+ );
1894
+ }
1895
+
1896
+ /** @internal */
1897
+ export const ResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
1898
+ ResponseBodyCodeExecutionTool,
1899
+ z.ZodTypeDef,
1900
+ unknown
1901
+ > = z.object({
1902
+ _id: z.string().default("tool_01KKCE2SKNF2AM8T60TDQSEKSC"),
1903
+ path: z.string(),
1904
+ key: z.string(),
1905
+ display_name: z.string().optional(),
1906
+ description: z.string(),
1907
+ created_by_id: z.string().optional(),
1908
+ updated_by_id: z.string().optional(),
1909
+ project_id: z.string(),
1910
+ workspace_id: z.string(),
1911
+ created: z.string(),
1912
+ updated: z.string(),
1913
+ status: CreateToolResponseBodyToolsResponse200Status$inboundSchema.default(
1914
+ "live",
1915
+ ),
1916
+ version_hash: z.string().optional(),
1917
+ type: z.literal("code"),
1918
+ code_tool: z.lazy(() => ResponseBodyCodeTool$inboundSchema),
1919
+ }).transform((v) => {
1920
+ return remap$(v, {
1921
+ "_id": "id",
1922
+ "display_name": "displayName",
1923
+ "created_by_id": "createdById",
1924
+ "updated_by_id": "updatedById",
1925
+ "project_id": "projectId",
1926
+ "workspace_id": "workspaceId",
1927
+ "version_hash": "versionHash",
1928
+ "code_tool": "codeTool",
1929
+ });
1930
+ });
1931
+
1932
+ export function responseBodyCodeExecutionToolFromJSON(
1933
+ jsonString: string,
1934
+ ): SafeParseResult<ResponseBodyCodeExecutionTool, SDKValidationError> {
1935
+ return safeParse(
1936
+ jsonString,
1937
+ (x) => ResponseBodyCodeExecutionTool$inboundSchema.parse(JSON.parse(x)),
1938
+ `Failed to parse 'ResponseBodyCodeExecutionTool' from JSON`,
1939
+ );
1940
+ }
1941
+
1942
+ /** @internal */
1943
+ export const CreateToolResponseBodyToolsResponseStatus$inboundSchema:
1944
+ z.ZodNativeEnum<typeof CreateToolResponseBodyToolsResponseStatus> = z
1945
+ .nativeEnum(CreateToolResponseBodyToolsResponseStatus);
1946
+
1947
+ /** @internal */
1948
+ export const ResponseBodyHeaders$inboundSchema: z.ZodType<
1949
+ ResponseBodyHeaders,
1950
+ z.ZodTypeDef,
1951
+ unknown
1952
+ > = z.object({
1953
+ value: z.string(),
1954
+ encrypted: z.boolean().default(false),
1955
+ });
1956
+
1957
+ export function responseBodyHeadersFromJSON(
1958
+ jsonString: string,
1959
+ ): SafeParseResult<ResponseBodyHeaders, SDKValidationError> {
1960
+ return safeParse(
1961
+ jsonString,
1962
+ (x) => ResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)),
1963
+ `Failed to parse 'ResponseBodyHeaders' from JSON`,
1964
+ );
1965
+ }
1966
+
1967
+ /** @internal */
1968
+ export const CreateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema:
1969
+ z.ZodNativeEnum<
1970
+ typeof CreateToolResponseBodyToolsResponse200ApplicationJson4Type
1971
+ > = z.nativeEnum(CreateToolResponseBodyToolsResponse200ApplicationJson4Type);
1972
+
1973
+ /** @internal */
1974
+ export const CreateToolResponseBodySchema$inboundSchema: z.ZodType<
1975
+ CreateToolResponseBodySchema,
1976
+ z.ZodTypeDef,
1977
+ unknown
1978
+ > = z.object({
1979
+ type:
1980
+ CreateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema,
1981
+ properties: z.record(z.any()).optional(),
1982
+ required: z.array(z.string()).optional(),
1983
+ });
1984
+
1985
+ export function createToolResponseBodySchemaFromJSON(
1986
+ jsonString: string,
1987
+ ): SafeParseResult<CreateToolResponseBodySchema, SDKValidationError> {
1988
+ return safeParse(
1989
+ jsonString,
1990
+ (x) => CreateToolResponseBodySchema$inboundSchema.parse(JSON.parse(x)),
1991
+ `Failed to parse 'CreateToolResponseBodySchema' from JSON`,
1992
+ );
1993
+ }
1994
+
1995
+ /** @internal */
1996
+ export const ResponseBodyTools$inboundSchema: z.ZodType<
1997
+ ResponseBodyTools,
1998
+ z.ZodTypeDef,
1999
+ unknown
2000
+ > = z.object({
2001
+ id: z.string().default("01KKCE2SKMYX8X7XBZBAA5RGHQ"),
2002
+ name: z.string(),
2003
+ description: z.string().optional(),
2004
+ schema: z.lazy(() => CreateToolResponseBodySchema$inboundSchema),
2005
+ });
2006
+
2007
+ export function responseBodyToolsFromJSON(
2008
+ jsonString: string,
2009
+ ): SafeParseResult<ResponseBodyTools, SDKValidationError> {
2010
+ return safeParse(
2011
+ jsonString,
2012
+ (x) => ResponseBodyTools$inboundSchema.parse(JSON.parse(x)),
2013
+ `Failed to parse 'ResponseBodyTools' from JSON`,
2014
+ );
2015
+ }
2016
+
2017
+ /** @internal */
2018
+ export const ResponseBodyConnectionType$inboundSchema: z.ZodNativeEnum<
2019
+ typeof ResponseBodyConnectionType
2020
+ > = z.nativeEnum(ResponseBodyConnectionType);
2021
+
2022
+ /** @internal */
2023
+ export const ResponseBodyMcp$inboundSchema: z.ZodType<
2024
+ ResponseBodyMcp,
2025
+ z.ZodTypeDef,
2026
+ unknown
2027
+ > = z.object({
2028
+ server_url: z.string(),
2029
+ headers: z.record(z.lazy(() => ResponseBodyHeaders$inboundSchema)).optional(),
2030
+ tools: z.array(z.lazy(() => ResponseBodyTools$inboundSchema)),
2031
+ connection_type: ResponseBodyConnectionType$inboundSchema,
2032
+ }).transform((v) => {
2033
+ return remap$(v, {
2034
+ "server_url": "serverUrl",
2035
+ "connection_type": "connectionType",
2036
+ });
2037
+ });
2038
+
2039
+ export function responseBodyMcpFromJSON(
2040
+ jsonString: string,
2041
+ ): SafeParseResult<ResponseBodyMcp, SDKValidationError> {
2042
+ return safeParse(
2043
+ jsonString,
2044
+ (x) => ResponseBodyMcp$inboundSchema.parse(JSON.parse(x)),
2045
+ `Failed to parse 'ResponseBodyMcp' from JSON`,
2046
+ );
2047
+ }
2048
+
2049
+ /** @internal */
2050
+ export const ResponseBodyMCPTool$inboundSchema: z.ZodType<
2051
+ ResponseBodyMCPTool,
2052
+ z.ZodTypeDef,
2053
+ unknown
2054
+ > = z.object({
2055
+ _id: z.string().default("tool_01KKCE2SKKWK1SZ8KWX2AY34YQ"),
2056
+ path: z.string(),
2057
+ key: z.string(),
2058
+ display_name: z.string().optional(),
2059
+ description: z.string(),
2060
+ created_by_id: z.string().optional(),
2061
+ updated_by_id: z.string().optional(),
2062
+ project_id: z.string(),
2063
+ workspace_id: z.string(),
2064
+ created: z.string(),
2065
+ updated: z.string(),
2066
+ status: CreateToolResponseBodyToolsResponseStatus$inboundSchema.default(
2067
+ "live",
2068
+ ),
2069
+ version_hash: z.string().optional(),
2070
+ type: z.literal("mcp"),
2071
+ mcp: z.lazy(() => ResponseBodyMcp$inboundSchema),
2072
+ }).transform((v) => {
2073
+ return remap$(v, {
2074
+ "_id": "id",
2075
+ "display_name": "displayName",
2076
+ "created_by_id": "createdById",
2077
+ "updated_by_id": "updatedById",
2078
+ "project_id": "projectId",
2079
+ "workspace_id": "workspaceId",
2080
+ "version_hash": "versionHash",
2081
+ });
2082
+ });
2083
+
2084
+ export function responseBodyMCPToolFromJSON(
2085
+ jsonString: string,
2086
+ ): SafeParseResult<ResponseBodyMCPTool, SDKValidationError> {
2087
+ return safeParse(
2088
+ jsonString,
2089
+ (x) => ResponseBodyMCPTool$inboundSchema.parse(JSON.parse(x)),
2090
+ `Failed to parse 'ResponseBodyMCPTool' from JSON`,
2091
+ );
2092
+ }
2093
+
2094
+ /** @internal */
2095
+ export const CreateToolResponseBodyToolsStatus$inboundSchema: z.ZodNativeEnum<
2096
+ typeof CreateToolResponseBodyToolsStatus
2097
+ > = z.nativeEnum(CreateToolResponseBodyToolsStatus);
2098
+
2099
+ /** @internal */
2100
+ export const CreateToolResponseBodyMethod$inboundSchema: z.ZodNativeEnum<
2101
+ typeof CreateToolResponseBodyMethod
2102
+ > = z.nativeEnum(CreateToolResponseBodyMethod);
2103
+
2104
+ /** @internal */
2105
+ export const CreateToolHeadersTools2$inboundSchema: z.ZodType<
2106
+ CreateToolHeadersTools2,
2107
+ z.ZodTypeDef,
2108
+ unknown
2109
+ > = z.object({
2110
+ value: z.string(),
2111
+ encrypted: z.boolean().default(false),
2112
+ });
2113
+
2114
+ export function createToolHeadersTools2FromJSON(
2115
+ jsonString: string,
2116
+ ): SafeParseResult<CreateToolHeadersTools2, SDKValidationError> {
2117
+ return safeParse(
2118
+ jsonString,
2119
+ (x) => CreateToolHeadersTools2$inboundSchema.parse(JSON.parse(x)),
2120
+ `Failed to parse 'CreateToolHeadersTools2' from JSON`,
2121
+ );
2122
+ }
2123
+
2124
+ /** @internal */
2125
+ export const CreateToolResponseBodyHeaders$inboundSchema: z.ZodType<
2126
+ CreateToolResponseBodyHeaders,
2127
+ z.ZodTypeDef,
2128
+ unknown
2129
+ > = z.union([z.lazy(() => CreateToolHeadersTools2$inboundSchema), z.string()]);
2130
+
2131
+ export function createToolResponseBodyHeadersFromJSON(
2132
+ jsonString: string,
2133
+ ): SafeParseResult<CreateToolResponseBodyHeaders, SDKValidationError> {
2134
+ return safeParse(
2135
+ jsonString,
2136
+ (x) => CreateToolResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)),
2137
+ `Failed to parse 'CreateToolResponseBodyHeaders' from JSON`,
2138
+ );
2139
+ }
2140
+
2141
+ /** @internal */
2142
+ export const ResponseBodyBlueprint$inboundSchema: z.ZodType<
2143
+ ResponseBodyBlueprint,
2144
+ z.ZodTypeDef,
2145
+ unknown
2146
+ > = z.object({
2147
+ url: z.string(),
2148
+ method: CreateToolResponseBodyMethod$inboundSchema,
2149
+ headers: z.record(
2150
+ z.union([z.lazy(() => CreateToolHeadersTools2$inboundSchema), z.string()]),
2151
+ ).optional(),
2152
+ body: z.record(z.any()).optional(),
2153
+ });
2154
+
2155
+ export function responseBodyBlueprintFromJSON(
2156
+ jsonString: string,
2157
+ ): SafeParseResult<ResponseBodyBlueprint, SDKValidationError> {
2158
+ return safeParse(
2159
+ jsonString,
2160
+ (x) => ResponseBodyBlueprint$inboundSchema.parse(JSON.parse(x)),
2161
+ `Failed to parse 'ResponseBodyBlueprint' from JSON`,
2162
+ );
2163
+ }
2164
+
2165
+ /** @internal */
2166
+ export const CreateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema:
2167
+ z.ZodNativeEnum<
2168
+ typeof CreateToolResponseBodyToolsResponse200ApplicationJson3Type
2169
+ > = z.nativeEnum(CreateToolResponseBodyToolsResponse200ApplicationJson3Type);
2170
+
2171
+ /** @internal */
2172
+ export const ResponseBodyDefaultValue$inboundSchema: z.ZodType<
2173
+ ResponseBodyDefaultValue,
2174
+ z.ZodTypeDef,
2175
+ unknown
2176
+ > = z.union([z.string(), z.number(), z.boolean()]);
2177
+
2178
+ export function responseBodyDefaultValueFromJSON(
2179
+ jsonString: string,
2180
+ ): SafeParseResult<ResponseBodyDefaultValue, SDKValidationError> {
2181
+ return safeParse(
2182
+ jsonString,
2183
+ (x) => ResponseBodyDefaultValue$inboundSchema.parse(JSON.parse(x)),
2184
+ `Failed to parse 'ResponseBodyDefaultValue' from JSON`,
2185
+ );
2186
+ }
2187
+
2188
+ /** @internal */
2189
+ export const ResponseBodyArguments$inboundSchema: z.ZodType<
2190
+ ResponseBodyArguments,
2191
+ z.ZodTypeDef,
2192
+ unknown
2193
+ > = z.object({
2194
+ type:
2195
+ CreateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema,
2196
+ description: z.string(),
2197
+ send_to_model: z.boolean().default(true),
2198
+ default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
2199
+ }).transform((v) => {
2200
+ return remap$(v, {
2201
+ "send_to_model": "sendToModel",
2202
+ "default_value": "defaultValue",
2203
+ });
2204
+ });
2205
+
2206
+ export function responseBodyArgumentsFromJSON(
2207
+ jsonString: string,
2208
+ ): SafeParseResult<ResponseBodyArguments, SDKValidationError> {
2209
+ return safeParse(
2210
+ jsonString,
2211
+ (x) => ResponseBodyArguments$inboundSchema.parse(JSON.parse(x)),
2212
+ `Failed to parse 'ResponseBodyArguments' from JSON`,
2213
+ );
2214
+ }
2215
+
2216
+ /** @internal */
2217
+ export const CreateToolResponseBodyHttp$inboundSchema: z.ZodType<
2218
+ CreateToolResponseBodyHttp,
2219
+ z.ZodTypeDef,
2220
+ unknown
2221
+ > = z.object({
2222
+ blueprint: z.lazy(() => ResponseBodyBlueprint$inboundSchema),
2223
+ arguments: z.record(z.lazy(() => ResponseBodyArguments$inboundSchema))
2224
+ .optional(),
2225
+ });
2226
+
2227
+ export function createToolResponseBodyHttpFromJSON(
2228
+ jsonString: string,
2229
+ ): SafeParseResult<CreateToolResponseBodyHttp, SDKValidationError> {
2230
+ return safeParse(
2231
+ jsonString,
2232
+ (x) => CreateToolResponseBodyHttp$inboundSchema.parse(JSON.parse(x)),
2233
+ `Failed to parse 'CreateToolResponseBodyHttp' from JSON`,
2234
+ );
2235
+ }
2236
+
2237
+ /** @internal */
2238
+ export const ResponseBodyHTTPTool$inboundSchema: z.ZodType<
2239
+ ResponseBodyHTTPTool,
2240
+ z.ZodTypeDef,
2241
+ unknown
2242
+ > = z.object({
2243
+ _id: z.string().default("tool_01KKCE2SKHS73CYY351C238Q0K"),
2244
+ path: z.string(),
2245
+ key: z.string(),
2246
+ display_name: z.string().optional(),
2247
+ description: z.string(),
2248
+ created_by_id: z.string().optional(),
2249
+ updated_by_id: z.string().optional(),
2250
+ project_id: z.string(),
2251
+ workspace_id: z.string(),
2252
+ created: z.string(),
2253
+ updated: z.string(),
2254
+ status: CreateToolResponseBodyToolsStatus$inboundSchema.default("live"),
2255
+ version_hash: z.string().optional(),
2256
+ type: z.literal("http"),
2257
+ http: z.lazy(() => CreateToolResponseBodyHttp$inboundSchema),
2258
+ }).transform((v) => {
2259
+ return remap$(v, {
2260
+ "_id": "id",
2261
+ "display_name": "displayName",
2262
+ "created_by_id": "createdById",
2263
+ "updated_by_id": "updatedById",
2264
+ "project_id": "projectId",
2265
+ "workspace_id": "workspaceId",
2266
+ "version_hash": "versionHash",
2267
+ });
2268
+ });
2269
+
2270
+ export function responseBodyHTTPToolFromJSON(
2271
+ jsonString: string,
2272
+ ): SafeParseResult<ResponseBodyHTTPTool, SDKValidationError> {
2273
+ return safeParse(
2274
+ jsonString,
2275
+ (x) => ResponseBodyHTTPTool$inboundSchema.parse(JSON.parse(x)),
2276
+ `Failed to parse 'ResponseBodyHTTPTool' from JSON`,
2277
+ );
2278
+ }
2279
+
2280
+ /** @internal */
2281
+ export const CreateToolResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
2282
+ typeof CreateToolResponseBodyStatus
2283
+ > = z.nativeEnum(CreateToolResponseBodyStatus);
2284
+
2285
+ /** @internal */
2286
+ export const ResponseBodySchema$inboundSchema: z.ZodType<
2287
+ ResponseBodySchema,
2288
+ z.ZodTypeDef,
2289
+ unknown
2290
+ > = collectExtraKeys$(
2291
+ z.object({
2292
+ type: z.string(),
2293
+ properties: z.record(z.any()),
2294
+ required: z.array(z.string()),
2295
+ }).catchall(z.any()),
2296
+ "additionalProperties",
2297
+ true,
2298
+ );
2299
+
2300
+ export function responseBodySchemaFromJSON(
2301
+ jsonString: string,
2302
+ ): SafeParseResult<ResponseBodySchema, SDKValidationError> {
2303
+ return safeParse(
2304
+ jsonString,
2305
+ (x) => ResponseBodySchema$inboundSchema.parse(JSON.parse(x)),
2306
+ `Failed to parse 'ResponseBodySchema' from JSON`,
2307
+ );
2308
+ }
2309
+
2310
+ /** @internal */
2311
+ export const ResponseBodyJsonSchema$inboundSchema: z.ZodType<
2312
+ ResponseBodyJsonSchema,
2313
+ z.ZodTypeDef,
2314
+ unknown
2315
+ > = z.object({
2316
+ name: z.string(),
2317
+ description: z.string(),
2318
+ schema: z.lazy(() => ResponseBodySchema$inboundSchema),
2319
+ strict: z.boolean().optional(),
2320
+ });
2321
+
2322
+ export function responseBodyJsonSchemaFromJSON(
2323
+ jsonString: string,
2324
+ ): SafeParseResult<ResponseBodyJsonSchema, SDKValidationError> {
2325
+ return safeParse(
2326
+ jsonString,
2327
+ (x) => ResponseBodyJsonSchema$inboundSchema.parse(JSON.parse(x)),
2328
+ `Failed to parse 'ResponseBodyJsonSchema' from JSON`,
2329
+ );
2330
+ }
2331
+
2332
+ /** @internal */
2333
+ export const ResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
2334
+ ResponseBodyJSONSchemaTool,
2335
+ z.ZodTypeDef,
2336
+ unknown
2337
+ > = z.object({
2338
+ _id: z.string().default("tool_01KKCE2SKGGRS7ACRTPKM7TS9Y"),
2339
+ path: z.string(),
2340
+ key: z.string(),
2341
+ display_name: z.string().optional(),
2342
+ description: z.string(),
2343
+ created_by_id: z.string().optional(),
2344
+ updated_by_id: z.string().optional(),
2345
+ project_id: z.string(),
2346
+ workspace_id: z.string(),
2347
+ created: z.string(),
2348
+ updated: z.string(),
2349
+ status: CreateToolResponseBodyStatus$inboundSchema.default("live"),
2350
+ version_hash: z.string().optional(),
2351
+ type: z.literal("json_schema"),
2352
+ json_schema: z.lazy(() => ResponseBodyJsonSchema$inboundSchema),
2353
+ }).transform((v) => {
2354
+ return remap$(v, {
2355
+ "_id": "id",
2356
+ "display_name": "displayName",
2357
+ "created_by_id": "createdById",
2358
+ "updated_by_id": "updatedById",
2359
+ "project_id": "projectId",
2360
+ "workspace_id": "workspaceId",
2361
+ "version_hash": "versionHash",
2362
+ "json_schema": "jsonSchema",
2363
+ });
2364
+ });
2365
+
2366
+ export function responseBodyJSONSchemaToolFromJSON(
2367
+ jsonString: string,
2368
+ ): SafeParseResult<ResponseBodyJSONSchemaTool, SDKValidationError> {
2369
+ return safeParse(
2370
+ jsonString,
2371
+ (x) => ResponseBodyJSONSchemaTool$inboundSchema.parse(JSON.parse(x)),
2372
+ `Failed to parse 'ResponseBodyJSONSchemaTool' from JSON`,
2373
+ );
2374
+ }
2375
+
2376
+ /** @internal */
2377
+ export const ResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
2378
+ typeof ResponseBodyStatus
2379
+ > = z.nativeEnum(ResponseBodyStatus);
2380
+
2381
+ /** @internal */
2382
+ export const CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema:
2383
+ z.ZodNativeEnum<
2384
+ typeof CreateToolResponseBodyToolsResponse200ApplicationJson1Type
2385
+ > = z.nativeEnum(CreateToolResponseBodyToolsResponse200ApplicationJson1Type);
2386
+
2387
+ /** @internal */
2388
+ export const ResponseBodyParameters$inboundSchema: z.ZodType<
2389
+ ResponseBodyParameters,
2390
+ z.ZodTypeDef,
2391
+ unknown
2392
+ > = collectExtraKeys$(
2393
+ z.object({
2394
+ type:
2395
+ CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema,
2396
+ properties: z.record(z.any()),
2397
+ required: z.array(z.string()),
2398
+ }).catchall(z.any()),
2399
+ "additionalProperties",
2400
+ true,
2401
+ );
2402
+
2403
+ export function responseBodyParametersFromJSON(
2404
+ jsonString: string,
2405
+ ): SafeParseResult<ResponseBodyParameters, SDKValidationError> {
2406
+ return safeParse(
2407
+ jsonString,
2408
+ (x) => ResponseBodyParameters$inboundSchema.parse(JSON.parse(x)),
2409
+ `Failed to parse 'ResponseBodyParameters' from JSON`,
2410
+ );
2411
+ }
2412
+
2413
+ /** @internal */
2414
+ export const CreateToolResponseBodyFunction$inboundSchema: z.ZodType<
2415
+ CreateToolResponseBodyFunction,
2416
+ z.ZodTypeDef,
2417
+ unknown
2418
+ > = z.object({
2419
+ name: z.string(),
2420
+ description: z.string().optional(),
2421
+ strict: z.boolean().optional(),
2422
+ parameters: z.lazy(() => ResponseBodyParameters$inboundSchema).optional(),
2423
+ });
2424
+
2425
+ export function createToolResponseBodyFunctionFromJSON(
2426
+ jsonString: string,
2427
+ ): SafeParseResult<CreateToolResponseBodyFunction, SDKValidationError> {
2428
+ return safeParse(
2429
+ jsonString,
2430
+ (x) => CreateToolResponseBodyFunction$inboundSchema.parse(JSON.parse(x)),
2431
+ `Failed to parse 'CreateToolResponseBodyFunction' from JSON`,
2432
+ );
2433
+ }
2434
+
2435
+ /** @internal */
2436
+ export const ResponseBodyFunctionTool$inboundSchema: z.ZodType<
2437
+ ResponseBodyFunctionTool,
2438
+ z.ZodTypeDef,
2439
+ unknown
2440
+ > = z.object({
2441
+ _id: z.string().default("tool_01KKCE2SKEJYBH7CAVZJAW6WHS"),
2442
+ path: z.string(),
2443
+ key: z.string(),
2444
+ display_name: z.string().optional(),
2445
+ description: z.string(),
2446
+ created_by_id: z.string().optional(),
2447
+ updated_by_id: z.string().optional(),
2448
+ project_id: z.string(),
2449
+ workspace_id: z.string(),
2450
+ created: z.string(),
2451
+ updated: z.string(),
2452
+ status: ResponseBodyStatus$inboundSchema.default("live"),
2453
+ version_hash: z.string().optional(),
2454
+ type: z.literal("function"),
2455
+ function: z.lazy(() => CreateToolResponseBodyFunction$inboundSchema),
2456
+ }).transform((v) => {
2457
+ return remap$(v, {
2458
+ "_id": "id",
2459
+ "display_name": "displayName",
2460
+ "created_by_id": "createdById",
2461
+ "updated_by_id": "updatedById",
2462
+ "project_id": "projectId",
2463
+ "workspace_id": "workspaceId",
2464
+ "version_hash": "versionHash",
2465
+ });
2466
+ });
2467
+
2468
+ export function responseBodyFunctionToolFromJSON(
2469
+ jsonString: string,
2470
+ ): SafeParseResult<ResponseBodyFunctionTool, SDKValidationError> {
2471
+ return safeParse(
2472
+ jsonString,
2473
+ (x) => ResponseBodyFunctionTool$inboundSchema.parse(JSON.parse(x)),
2474
+ `Failed to parse 'ResponseBodyFunctionTool' from JSON`,
2475
+ );
2476
+ }
2477
+
2478
+ /** @internal */
2479
+ export const CreateToolResponseBody$inboundSchema: z.ZodType<
2480
+ CreateToolResponseBody,
2481
+ z.ZodTypeDef,
2482
+ unknown
2483
+ > = z.union([
2484
+ z.lazy(() => ResponseBodyFunctionTool$inboundSchema),
2485
+ z.lazy(() => ResponseBodyJSONSchemaTool$inboundSchema),
2486
+ z.lazy(() => ResponseBodyHTTPTool$inboundSchema),
2487
+ z.lazy(() => ResponseBodyMCPTool$inboundSchema),
2488
+ z.lazy(() => ResponseBodyCodeExecutionTool$inboundSchema),
2489
+ ]);
2490
+
2491
+ export function createToolResponseBodyFromJSON(
2492
+ jsonString: string,
2493
+ ): SafeParseResult<CreateToolResponseBody, SDKValidationError> {
2494
+ return safeParse(
2495
+ jsonString,
2496
+ (x) => CreateToolResponseBody$inboundSchema.parse(JSON.parse(x)),
2497
+ `Failed to parse 'CreateToolResponseBody' from JSON`,
2498
+ );
2499
+ }