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