@orq-ai/node 4.1.4 → 4.2.0-rc.11

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 (559) hide show
  1. package/README.md +18 -0
  2. package/bin/mcp-server.js +835 -380
  3. package/bin/mcp-server.js.map +61 -58
  4. package/examples/package-lock.json +4 -7
  5. package/jsr.json +1 -1
  6. package/lib/config.d.ts +3 -3
  7. package/lib/config.js +3 -3
  8. package/lib/config.js.map +1 -1
  9. package/mcp-server/mcp-server.js +1 -1
  10. package/mcp-server/mcp-server.js.map +1 -1
  11. package/mcp-server/server.js +1 -1
  12. package/mcp-server/server.js.map +1 -1
  13. package/models/components/conversationresponse.js +2 -2
  14. package/models/components/invokedeploymentrequest.d.ts +1 -1
  15. package/models/components/partdoneevent.js +2 -2
  16. package/models/components/reasoningpart.js +2 -2
  17. package/models/operations/createcontact.js +2 -2
  18. package/models/operations/createconversation.js +2 -2
  19. package/models/operations/createdataset.js +2 -2
  20. package/models/operations/createdatasetitem.js +8 -8
  21. package/models/operations/createdatasource.js +2 -2
  22. package/models/operations/createeval.js +28 -28
  23. package/models/operations/createtool.js +12 -12
  24. package/models/operations/deploymentgetconfig.d.ts +1 -1
  25. package/models/operations/deploymentstream.d.ts +1 -1
  26. package/models/operations/fileget.js +2 -2
  27. package/models/operations/filelist.js +2 -2
  28. package/models/operations/fileupload.js +2 -2
  29. package/models/operations/generateconversationname.js +2 -2
  30. package/models/operations/getalltools.js +12 -12
  31. package/models/operations/getevals.js +28 -28
  32. package/models/operations/listcontacts.js +2 -2
  33. package/models/operations/listdatasetdatapoints.js +8 -8
  34. package/models/operations/listdatasets.js +2 -2
  35. package/models/operations/listdatasources.js +2 -2
  36. package/models/operations/retrievecontact.js +2 -2
  37. package/models/operations/retrieveconversation.js +2 -2
  38. package/models/operations/retrievedatapoint.js +8 -8
  39. package/models/operations/retrievedataset.js +2 -2
  40. package/models/operations/retrievedatasource.js +2 -2
  41. package/models/operations/retrievetool.js +12 -12
  42. package/models/operations/runagent.js +2 -2
  43. package/models/operations/streamrunagent.js +2 -2
  44. package/models/operations/updatecontact.js +2 -2
  45. package/models/operations/updateconversation.js +2 -2
  46. package/models/operations/updatedatapoint.js +8 -8
  47. package/models/operations/updatedataset.js +2 -2
  48. package/models/operations/updatedatasource.js +2 -2
  49. package/models/operations/updateeval.js +28 -28
  50. package/models/operations/updatetool.js +14 -14
  51. package/package.json +4 -3
  52. package/src/lib/config.ts +3 -3
  53. package/src/mcp-server/mcp-server.ts +1 -1
  54. package/src/mcp-server/server.ts +1 -1
  55. package/src/models/components/conversationresponse.ts +2 -2
  56. package/src/models/components/invokedeploymentrequest.ts +1 -1
  57. package/src/models/components/partdoneevent.ts +2 -2
  58. package/src/models/components/reasoningpart.ts +2 -2
  59. package/src/models/operations/createcontact.ts +2 -2
  60. package/src/models/operations/createconversation.ts +2 -2
  61. package/src/models/operations/createdataset.ts +2 -2
  62. package/src/models/operations/createdatasetitem.ts +8 -8
  63. package/src/models/operations/createdatasource.ts +2 -2
  64. package/src/models/operations/createeval.ts +28 -28
  65. package/src/models/operations/createtool.ts +12 -12
  66. package/src/models/operations/deploymentgetconfig.ts +1 -1
  67. package/src/models/operations/deploymentstream.ts +1 -1
  68. package/src/models/operations/fileget.ts +2 -2
  69. package/src/models/operations/filelist.ts +2 -2
  70. package/src/models/operations/fileupload.ts +2 -2
  71. package/src/models/operations/generateconversationname.ts +2 -2
  72. package/src/models/operations/getalltools.ts +12 -12
  73. package/src/models/operations/getevals.ts +28 -28
  74. package/src/models/operations/listcontacts.ts +2 -2
  75. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  76. package/src/models/operations/listdatasets.ts +2 -2
  77. package/src/models/operations/listdatasources.ts +2 -2
  78. package/src/models/operations/retrievecontact.ts +2 -2
  79. package/src/models/operations/retrieveconversation.ts +2 -2
  80. package/src/models/operations/retrievedatapoint.ts +8 -8
  81. package/src/models/operations/retrievedataset.ts +2 -2
  82. package/src/models/operations/retrievedatasource.ts +2 -2
  83. package/src/models/operations/retrievetool.ts +12 -12
  84. package/src/models/operations/runagent.ts +2 -2
  85. package/src/models/operations/streamrunagent.ts +2 -2
  86. package/src/models/operations/updatecontact.ts +2 -2
  87. package/src/models/operations/updateconversation.ts +2 -2
  88. package/src/models/operations/updatedatapoint.ts +8 -8
  89. package/src/models/operations/updatedataset.ts +2 -2
  90. package/src/models/operations/updatedatasource.ts +2 -2
  91. package/src/models/operations/updateeval.ts +28 -28
  92. package/src/models/operations/updatetool.ts +14 -14
  93. package/_speakeasy/.github/action-inputs-config.json +0 -53
  94. package/_speakeasy/.github/action-security-config.json +0 -88
  95. package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
  96. package/packages/orq-rc/examples/package-lock.json +0 -619
  97. package/packages/orq-rc/examples/package.json +0 -18
  98. package/packages/orq-rc/jsr.json +0 -28
  99. package/packages/orq-rc/package-lock.json +0 -3552
  100. package/packages/orq-rc/package.json +0 -40
  101. package/packages/orq-rc/src/core.ts +0 -13
  102. package/packages/orq-rc/src/funcs/agentsCreate.ts +0 -170
  103. package/packages/orq-rc/src/funcs/agentsDelete.ts +0 -180
  104. package/packages/orq-rc/src/funcs/agentsInvoke.ts +0 -177
  105. package/packages/orq-rc/src/funcs/agentsList.ts +0 -179
  106. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +0 -183
  107. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +0 -180
  108. package/packages/orq-rc/src/funcs/agentsRun.ts +0 -162
  109. package/packages/orq-rc/src/funcs/agentsStream.ts +0 -201
  110. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -186
  111. package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -184
  112. package/packages/orq-rc/src/funcs/chunkingParse.ts +0 -160
  113. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -165
  114. package/packages/orq-rc/src/funcs/contactsDelete.ts +0 -176
  115. package/packages/orq-rc/src/funcs/contactsList.ts +0 -170
  116. package/packages/orq-rc/src/funcs/contactsRetrieve.ts +0 -175
  117. package/packages/orq-rc/src/funcs/contactsUpdate.ts +0 -176
  118. package/packages/orq-rc/src/funcs/conversationsCreate.ts +0 -161
  119. package/packages/orq-rc/src/funcs/conversationsDelete.ts +0 -180
  120. package/packages/orq-rc/src/funcs/conversationsGenerateName.ts +0 -194
  121. package/packages/orq-rc/src/funcs/conversationsList.ts +0 -181
  122. package/packages/orq-rc/src/funcs/conversationsRetrieve.ts +0 -180
  123. package/packages/orq-rc/src/funcs/conversationsUpdate.ts +0 -184
  124. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -167
  125. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -165
  126. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -171
  127. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
  128. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
  129. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
  130. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
  131. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
  132. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
  133. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
  134. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
  135. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
  136. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
  137. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
  138. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
  139. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -183
  140. package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
  141. package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
  142. package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
  143. package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -177
  144. package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
  145. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +0 -183
  146. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +0 -190
  147. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -160
  148. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -187
  149. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -164
  150. package/packages/orq-rc/src/funcs/filesGet.ts +0 -166
  151. package/packages/orq-rc/src/funcs/filesList.ts +0 -167
  152. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -158
  153. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
  154. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
  155. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
  156. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
  157. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +0 -170
  158. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
  159. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +0 -170
  160. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
  161. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
  162. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +0 -171
  163. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
  164. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
  165. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
  166. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
  167. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -167
  168. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
  169. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
  170. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
  171. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +0 -162
  172. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +0 -175
  173. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +0 -170
  174. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +0 -168
  175. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +0 -184
  176. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +0 -179
  177. package/packages/orq-rc/src/funcs/memoryStoresList.ts +0 -178
  178. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +0 -183
  179. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +0 -177
  180. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +0 -177
  181. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +0 -178
  182. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +0 -173
  183. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +0 -168
  184. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +0 -179
  185. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +0 -174
  186. package/packages/orq-rc/src/funcs/modelsList.ts +0 -142
  187. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -160
  188. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -164
  189. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -181
  190. package/packages/orq-rc/src/funcs/promptsList.ts +0 -167
  191. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -173
  192. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -166
  193. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -173
  194. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -161
  195. package/packages/orq-rc/src/funcs/routerChatCompletions.ts +0 -172
  196. package/packages/orq-rc/src/funcs/routerImagesGenerate.ts +0 -160
  197. package/packages/orq-rc/src/funcs/toolsCreate.ts +0 -172
  198. package/packages/orq-rc/src/funcs/toolsDelete.ts +0 -167
  199. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +0 -183
  200. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -190
  201. package/packages/orq-rc/src/funcs/toolsList.ts +0 -176
  202. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +0 -166
  203. package/packages/orq-rc/src/funcs/toolsUpdate.ts +0 -176
  204. package/packages/orq-rc/src/hooks/global.ts +0 -44
  205. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  206. package/packages/orq-rc/src/hooks/index.ts +0 -6
  207. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  208. package/packages/orq-rc/src/hooks/types.ts +0 -112
  209. package/packages/orq-rc/src/index.ts +0 -9
  210. package/packages/orq-rc/src/lib/base64.ts +0 -37
  211. package/packages/orq-rc/src/lib/config.ts +0 -74
  212. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  213. package/packages/orq-rc/src/lib/encodings.ts +0 -497
  214. package/packages/orq-rc/src/lib/env.ts +0 -89
  215. package/packages/orq-rc/src/lib/event-streams.ts +0 -135
  216. package/packages/orq-rc/src/lib/files.ts +0 -82
  217. package/packages/orq-rc/src/lib/http.ts +0 -323
  218. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  219. package/packages/orq-rc/src/lib/logger.ts +0 -9
  220. package/packages/orq-rc/src/lib/matchers.ts +0 -345
  221. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  222. package/packages/orq-rc/src/lib/retries.ts +0 -218
  223. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  224. package/packages/orq-rc/src/lib/sdks.ts +0 -407
  225. package/packages/orq-rc/src/lib/security.ts +0 -264
  226. package/packages/orq-rc/src/lib/url.ts +0 -33
  227. package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -111
  228. package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -136
  229. package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
  230. package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
  231. package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
  232. package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
  233. package/packages/orq-rc/src/mcp-server/prompts.ts +0 -121
  234. package/packages/orq-rc/src/mcp-server/resources.ts +0 -176
  235. package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
  236. package/packages/orq-rc/src/mcp-server/server.ts +0 -267
  237. package/packages/orq-rc/src/mcp-server/shared.ts +0 -74
  238. package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +0 -37
  239. package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +0 -35
  240. package/packages/orq-rc/src/mcp-server/tools/agentsInvoke.ts +0 -40
  241. package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +0 -41
  242. package/packages/orq-rc/src/mcp-server/tools/agentsResponsesCreate.ts +0 -40
  243. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +0 -37
  244. package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +0 -37
  245. package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +0 -40
  246. package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +0 -37
  247. package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +0 -40
  248. package/packages/orq-rc/src/mcp-server/tools/chunkingParse.ts +0 -37
  249. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
  250. package/packages/orq-rc/src/mcp-server/tools/contactsDelete.ts +0 -35
  251. package/packages/orq-rc/src/mcp-server/tools/contactsList.ts +0 -37
  252. package/packages/orq-rc/src/mcp-server/tools/contactsRetrieve.ts +0 -37
  253. package/packages/orq-rc/src/mcp-server/tools/contactsUpdate.ts +0 -37
  254. package/packages/orq-rc/src/mcp-server/tools/conversationsCreate.ts +0 -37
  255. package/packages/orq-rc/src/mcp-server/tools/conversationsDelete.ts +0 -35
  256. package/packages/orq-rc/src/mcp-server/tools/conversationsGenerateName.ts +0 -40
  257. package/packages/orq-rc/src/mcp-server/tools/conversationsList.ts +0 -41
  258. package/packages/orq-rc/src/mcp-server/tools/conversationsRetrieve.ts +0 -37
  259. package/packages/orq-rc/src/mcp-server/tools/conversationsUpdate.ts +0 -40
  260. package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
  261. package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
  262. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
  263. package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
  264. package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
  265. package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
  266. package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
  267. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
  268. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
  269. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
  270. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
  271. package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
  272. package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
  273. package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
  274. package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +0 -37
  275. package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
  276. package/packages/orq-rc/src/mcp-server/tools/evalsAll.ts +0 -35
  277. package/packages/orq-rc/src/mcp-server/tools/evalsCreate.ts +0 -35
  278. package/packages/orq-rc/src/mcp-server/tools/evalsDelete.ts +0 -33
  279. package/packages/orq-rc/src/mcp-server/tools/evalsInvoke.ts +0 -35
  280. package/packages/orq-rc/src/mcp-server/tools/evalsUpdate.ts +0 -35
  281. package/packages/orq-rc/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersions.ts +0 -39
  282. package/packages/orq-rc/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +0 -40
  283. package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
  284. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
  285. package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
  286. package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
  287. package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
  288. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreate.ts +0 -35
  289. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +0 -35
  290. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +0 -35
  291. package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +0 -35
  292. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +0 -33
  293. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunks.ts +0 -35
  294. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +0 -35
  295. package/packages/orq-rc/src/mcp-server/tools/knowledgeGetChunksCount.ts +0 -35
  296. package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +0 -37
  297. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +0 -35
  298. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunksPaginated.ts +0 -35
  299. package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +0 -35
  300. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +0 -37
  301. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveChunk.ts +0 -35
  302. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +0 -35
  303. package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +0 -37
  304. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +0 -35
  305. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +0 -35
  306. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateDatasource.ts +0 -35
  307. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreate.ts +0 -35
  308. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateDocument.ts +0 -37
  309. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateMemory.ts +0 -37
  310. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDelete.ts +0 -35
  311. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteDocument.ts +0 -40
  312. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteMemory.ts +0 -40
  313. package/packages/orq-rc/src/mcp-server/tools/memoryStoresList.ts +0 -37
  314. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListDocuments.ts +0 -37
  315. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListMemories.ts +0 -37
  316. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieve.ts +0 -37
  317. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveDocument.ts +0 -37
  318. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveMemory.ts +0 -37
  319. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdate.ts +0 -37
  320. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateDocument.ts +0 -37
  321. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateMemory.ts +0 -37
  322. package/packages/orq-rc/src/mcp-server/tools/modelsList.ts +0 -30
  323. package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
  324. package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
  325. package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
  326. package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
  327. package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
  328. package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
  329. package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
  330. package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
  331. package/packages/orq-rc/src/mcp-server/tools/routerChatCompletions.ts +0 -37
  332. package/packages/orq-rc/src/mcp-server/tools/routerImagesGenerate.ts +0 -37
  333. package/packages/orq-rc/src/mcp-server/tools/toolsCreate.ts +0 -37
  334. package/packages/orq-rc/src/mcp-server/tools/toolsDelete.ts +0 -35
  335. package/packages/orq-rc/src/mcp-server/tools/toolsGetV2ToolsToolIdVersions.ts +0 -37
  336. package/packages/orq-rc/src/mcp-server/tools/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -39
  337. package/packages/orq-rc/src/mcp-server/tools/toolsList.ts +0 -37
  338. package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +0 -37
  339. package/packages/orq-rc/src/mcp-server/tools/toolsUpdate.ts +0 -37
  340. package/packages/orq-rc/src/mcp-server/tools.ts +0 -133
  341. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +0 -173
  342. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +0 -309
  343. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +0 -125
  344. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +0 -150
  345. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +0 -125
  346. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +0 -801
  347. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +0 -305
  348. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +0 -185
  349. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +0 -822
  350. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +0 -1399
  351. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +0 -136
  352. package/packages/orq-rc/src/models/components/conversationresponse.ts +0 -194
  353. package/packages/orq-rc/src/models/components/createagentresponse.ts +0 -340
  354. package/packages/orq-rc/src/models/components/datapart.ts +0 -58
  355. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +0 -112
  356. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +0 -125
  357. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +0 -105
  358. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +0 -113
  359. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +0 -87
  360. package/packages/orq-rc/src/models/components/filepart.ts +0 -218
  361. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +0 -268
  362. package/packages/orq-rc/src/models/components/index.ts +0 -55
  363. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +0 -5271
  364. package/packages/orq-rc/src/models/components/partdelta.ts +0 -80
  365. package/packages/orq-rc/src/models/components/partdeltaevent.ts +0 -120
  366. package/packages/orq-rc/src/models/components/partdoneevent.ts +0 -216
  367. package/packages/orq-rc/src/models/components/publiccontact.ts +0 -99
  368. package/packages/orq-rc/src/models/components/reasoningpart.ts +0 -90
  369. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +0 -71
  370. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +0 -66
  371. package/packages/orq-rc/src/models/components/refusalpartschema.ts +0 -64
  372. package/packages/orq-rc/src/models/components/responsedoneevent.ts +0 -526
  373. package/packages/orq-rc/src/models/components/responsefailedevent.ts +0 -118
  374. package/packages/orq-rc/src/models/components/responsestartedevent.ts +0 -124
  375. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +0 -148
  376. package/packages/orq-rc/src/models/components/reviewoutcome.ts +0 -27
  377. package/packages/orq-rc/src/models/components/security.ts +0 -56
  378. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +0 -207
  379. package/packages/orq-rc/src/models/components/textpart.ts +0 -54
  380. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +0 -59
  381. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +0 -106
  382. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +0 -108
  383. package/packages/orq-rc/src/models/components/toolcallpart.ts +0 -83
  384. package/packages/orq-rc/src/models/components/tooldoneevent.ts +0 -121
  385. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +0 -392
  386. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +0 -360
  387. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +0 -336
  388. package/packages/orq-rc/src/models/components/toolfailedevent.ts +0 -123
  389. package/packages/orq-rc/src/models/components/toolresultpart.ts +0 -71
  390. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +0 -130
  391. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +0 -141
  392. package/packages/orq-rc/src/models/components/toolstartedevent.ts +0 -132
  393. package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
  394. package/packages/orq-rc/src/models/errors/createagentrequest.ts +0 -67
  395. package/packages/orq-rc/src/models/errors/createeval.ts +0 -67
  396. package/packages/orq-rc/src/models/errors/deleteagent.ts +0 -67
  397. package/packages/orq-rc/src/models/errors/deletecontact.ts +0 -78
  398. package/packages/orq-rc/src/models/errors/deleteconversation.ts +0 -67
  399. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -67
  400. package/packages/orq-rc/src/models/errors/generateconversationname.ts +0 -132
  401. package/packages/orq-rc/src/models/errors/getevals.ts +0 -67
  402. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -67
  403. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +0 -67
  404. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversionsversionid.ts +0 -69
  405. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +0 -67
  406. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +0 -69
  407. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -77
  408. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  409. package/packages/orq-rc/src/models/errors/index.ts +0 -35
  410. package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -128
  411. package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
  412. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
  413. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +0 -67
  414. package/packages/orq-rc/src/models/errors/retrievecontact.ts +0 -78
  415. package/packages/orq-rc/src/models/errors/retrieveconversation.ts +0 -67
  416. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
  417. package/packages/orq-rc/src/models/errors/streamagent.ts +0 -67
  418. package/packages/orq-rc/src/models/errors/streamrunagent.ts +0 -67
  419. package/packages/orq-rc/src/models/errors/updateagent.ts +0 -67
  420. package/packages/orq-rc/src/models/errors/updatecontact.ts +0 -70
  421. package/packages/orq-rc/src/models/errors/updateconversation.ts +0 -67
  422. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -67
  423. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -67
  424. package/packages/orq-rc/src/models/errors/updatetool.ts +0 -78
  425. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -63
  426. package/packages/orq-rc/src/models/operations/createagentrequest.ts +0 -8610
  427. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +0 -770
  428. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +0 -8948
  429. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -341
  430. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -237
  431. package/packages/orq-rc/src/models/operations/createconversation.ts +0 -314
  432. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -257
  433. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -4044
  434. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -662
  435. package/packages/orq-rc/src/models/operations/createeval.ts +0 -5397
  436. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -226
  437. package/packages/orq-rc/src/models/operations/createimage.ts +0 -966
  438. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -1489
  439. package/packages/orq-rc/src/models/operations/creatememory.ts +0 -241
  440. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +0 -245
  441. package/packages/orq-rc/src/models/operations/creatememorystore.ts +0 -310
  442. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -5320
  443. package/packages/orq-rc/src/models/operations/createtool.ts +0 -3791
  444. package/packages/orq-rc/src/models/operations/deleteagent.ts +0 -63
  445. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -81
  446. package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -198
  447. package/packages/orq-rc/src/models/operations/deletecontact.ts +0 -54
  448. package/packages/orq-rc/src/models/operations/deleteconversation.ts +0 -63
  449. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -72
  450. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -63
  451. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -72
  452. package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -51
  453. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -63
  454. package/packages/orq-rc/src/models/operations/deletememory.ts +0 -72
  455. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +0 -83
  456. package/packages/orq-rc/src/models/operations/deletememorystore.ts +0 -63
  457. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -54
  458. package/packages/orq-rc/src/models/operations/deletetool.ts +0 -60
  459. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -3596
  460. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -7042
  461. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1136
  462. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2005
  463. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -7134
  464. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -63
  465. package/packages/orq-rc/src/models/operations/fileget.ts +0 -181
  466. package/packages/orq-rc/src/models/operations/filelist.ts +0 -268
  467. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -258
  468. package/packages/orq-rc/src/models/operations/generateconversationname.ts +0 -319
  469. package/packages/orq-rc/src/models/operations/getallmemories.ts +0 -280
  470. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +0 -305
  471. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +0 -325
  472. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -1991
  473. package/packages/orq-rc/src/models/operations/getalltools.ts +0 -2214
  474. package/packages/orq-rc/src/models/operations/getchunkscount.ts +0 -185
  475. package/packages/orq-rc/src/models/operations/getevals.ts +0 -4268
  476. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -258
  477. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -1070
  478. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1875
  479. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -1892
  480. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +0 -274
  481. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversionsversionid.ts +0 -193
  482. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +0 -276
  483. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +0 -194
  484. package/packages/orq-rc/src/models/operations/index.ts +0 -106
  485. package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -957
  486. package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -1878
  487. package/packages/orq-rc/src/models/operations/listagents.ts +0 -3811
  488. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -395
  489. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +0 -408
  490. package/packages/orq-rc/src/models/operations/listcontacts.ts +0 -420
  491. package/packages/orq-rc/src/models/operations/listconversations.ts +0 -151
  492. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -2486
  493. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -334
  494. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -363
  495. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -1048
  496. package/packages/orq-rc/src/models/operations/listmodels.ts +0 -207
  497. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -1989
  498. package/packages/orq-rc/src/models/operations/parse.ts +0 -945
  499. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -146
  500. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +0 -3956
  501. package/packages/orq-rc/src/models/operations/retrievecontact.ts +0 -180
  502. package/packages/orq-rc/src/models/operations/retrieveconversation.ts +0 -262
  503. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -2334
  504. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -246
  505. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -231
  506. package/packages/orq-rc/src/models/operations/retrievememory.ts +0 -183
  507. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +0 -192
  508. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +0 -234
  509. package/packages/orq-rc/src/models/operations/retrievetool.ts +0 -2262
  510. package/packages/orq-rc/src/models/operations/runagent.ts +0 -6502
  511. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -2775
  512. package/packages/orq-rc/src/models/operations/streamagent.ts +0 -838
  513. package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -6833
  514. package/packages/orq-rc/src/models/operations/updateagent.ts +0 -9054
  515. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -361
  516. package/packages/orq-rc/src/models/operations/updatecontact.ts +0 -280
  517. package/packages/orq-rc/src/models/operations/updateconversation.ts +0 -377
  518. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -4058
  519. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -326
  520. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -288
  521. package/packages/orq-rc/src/models/operations/updateeval.ts +0 -5776
  522. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -1925
  523. package/packages/orq-rc/src/models/operations/updatememory.ts +0 -250
  524. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +0 -254
  525. package/packages/orq-rc/src/models/operations/updatememorystore.ts +0 -375
  526. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -5618
  527. package/packages/orq-rc/src/models/operations/updatetool.ts +0 -4114
  528. package/packages/orq-rc/src/sdk/agents.ts +0 -196
  529. package/packages/orq-rc/src/sdk/chunking.ts +0 -27
  530. package/packages/orq-rc/src/sdk/contacts.ts +0 -99
  531. package/packages/orq-rc/src/sdk/conversations.ts +0 -125
  532. package/packages/orq-rc/src/sdk/datasets.ts +0 -204
  533. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  534. package/packages/orq-rc/src/sdk/evals.ts +0 -84
  535. package/packages/orq-rc/src/sdk/evaluators.ts +0 -45
  536. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  537. package/packages/orq-rc/src/sdk/files.ts +0 -78
  538. package/packages/orq-rc/src/sdk/index.ts +0 -5
  539. package/packages/orq-rc/src/sdk/knowledge.ts +0 -309
  540. package/packages/orq-rc/src/sdk/memorystores.ts +0 -286
  541. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  542. package/packages/orq-rc/src/sdk/models.ts +0 -25
  543. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  544. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  545. package/packages/orq-rc/src/sdk/responses.ts +0 -34
  546. package/packages/orq-rc/src/sdk/router.ts +0 -52
  547. package/packages/orq-rc/src/sdk/sdk.ts +0 -109
  548. package/packages/orq-rc/src/sdk/tools.ts +0 -135
  549. package/packages/orq-rc/src/types/async.ts +0 -68
  550. package/packages/orq-rc/src/types/blobs.ts +0 -32
  551. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  552. package/packages/orq-rc/src/types/enums.ts +0 -45
  553. package/packages/orq-rc/src/types/fp.ts +0 -50
  554. package/packages/orq-rc/src/types/index.ts +0 -11
  555. package/packages/orq-rc/src/types/operations.ts +0 -105
  556. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  557. package/packages/orq-rc/src/types/streams.ts +0 -21
  558. package/packages/orq-rc/src/types/unrecognized.ts +0 -35
  559. package/packages/orq-rc/tsconfig.json +0 -40
@@ -1,3791 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import {
8
- collectExtraKeys as collectExtraKeys$,
9
- safeParse,
10
- } from "../../lib/schemas.js";
11
- import { ClosedEnum } from "../../types/enums.js";
12
- import { Result as SafeParseResult } from "../../types/fp.js";
13
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
14
-
15
- /**
16
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
17
- */
18
- export const CreateToolRequestBodyToolsRequestStatus = {
19
- Live: "live",
20
- Draft: "draft",
21
- Pending: "pending",
22
- Published: "published",
23
- } as const;
24
- /**
25
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
26
- */
27
- export type CreateToolRequestBodyToolsRequestStatus = ClosedEnum<
28
- typeof CreateToolRequestBodyToolsRequestStatus
29
- >;
30
-
31
- /**
32
- * The type must be "object"
33
- */
34
- export const CreateToolRequestBodyToolsRequest5CodeToolType = {
35
- Object: "object",
36
- } as const;
37
- /**
38
- * The type must be "object"
39
- */
40
- export type CreateToolRequestBodyToolsRequest5CodeToolType = ClosedEnum<
41
- typeof CreateToolRequestBodyToolsRequest5CodeToolType
42
- >;
43
-
44
- /**
45
- * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
46
- */
47
- export type CreateToolRequestBodyParameters = {
48
- /**
49
- * The type must be "object"
50
- */
51
- type: CreateToolRequestBodyToolsRequest5CodeToolType;
52
- /**
53
- * The properties of the function parameters
54
- */
55
- properties: { [k: string]: any };
56
- /**
57
- * Array of required parameter names
58
- */
59
- required: Array<string>;
60
- additionalProperties?: { [k: string]: any } | undefined;
61
- };
62
-
63
- export const RequestBodyLanguage = {
64
- Python: "python",
65
- } as const;
66
- export type RequestBodyLanguage = ClosedEnum<typeof RequestBodyLanguage>;
67
-
68
- export type RequestBodyCodeTool = {
69
- /**
70
- * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
71
- */
72
- parameters?: CreateToolRequestBodyParameters | undefined;
73
- language: RequestBodyLanguage;
74
- /**
75
- * The code to execute.
76
- */
77
- code: string;
78
- };
79
-
80
- /**
81
- * Executes code snippets in a sandboxed environment, currently supporting Python.
82
- */
83
- export type RequestBodyCodeExecutionTool = {
84
- /**
85
- * Entity storage path in the format: `project/folder/subfolder/...`
86
- *
87
- * @remarks
88
- *
89
- * The first element identifies the project, followed by nested folders (auto-created as needed).
90
- *
91
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
92
- */
93
- path: string;
94
- /**
95
- * Unique key of the tool as it will be displayed in the UI
96
- */
97
- key: string;
98
- /**
99
- * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
100
- */
101
- displayName?: string | undefined;
102
- /**
103
- * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
104
- */
105
- description: string;
106
- /**
107
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
108
- */
109
- status?: CreateToolRequestBodyToolsRequestStatus | undefined;
110
- type: "code";
111
- codeTool: RequestBodyCodeTool;
112
- };
113
-
114
- /**
115
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
116
- */
117
- export const CreateToolRequestBodyToolsStatus = {
118
- Live: "live",
119
- Draft: "draft",
120
- Pending: "pending",
121
- Published: "published",
122
- } as const;
123
- /**
124
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
125
- */
126
- export type CreateToolRequestBodyToolsStatus = ClosedEnum<
127
- typeof CreateToolRequestBodyToolsStatus
128
- >;
129
-
130
- export type RequestBodyHeaders = {
131
- value: string;
132
- encrypted?: boolean | undefined;
133
- };
134
-
135
- /**
136
- * The connection type used by the MCP server
137
- */
138
- export const RequestBodyConnectionType = {
139
- Http: "http",
140
- Sse: "sse",
141
- } as const;
142
- /**
143
- * The connection type used by the MCP server
144
- */
145
- export type RequestBodyConnectionType = ClosedEnum<
146
- typeof RequestBodyConnectionType
147
- >;
148
-
149
- export type RequestBodyMcp = {
150
- /**
151
- * The MCP server URL (cached for execution)
152
- */
153
- serverUrl: string;
154
- /**
155
- * HTTP headers for MCP server requests with encryption support
156
- */
157
- headers?: { [k: string]: RequestBodyHeaders } | undefined;
158
- /**
159
- * The connection type used by the MCP server
160
- */
161
- connectionType: RequestBodyConnectionType;
162
- };
163
-
164
- /**
165
- * A tool from a Model Context Protocol (MCP) server that provides standardized access to external capabilities.
166
- */
167
- export type RequestBodyMCPTool = {
168
- /**
169
- * Entity storage path in the format: `project/folder/subfolder/...`
170
- *
171
- * @remarks
172
- *
173
- * The first element identifies the project, followed by nested folders (auto-created as needed).
174
- *
175
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
176
- */
177
- path: string;
178
- /**
179
- * Unique key of the tool as it will be displayed in the UI
180
- */
181
- key: string;
182
- /**
183
- * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
184
- */
185
- displayName?: string | undefined;
186
- /**
187
- * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
188
- */
189
- description: string;
190
- /**
191
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
192
- */
193
- status?: CreateToolRequestBodyToolsStatus | undefined;
194
- type: "mcp";
195
- mcp: RequestBodyMcp;
196
- };
197
-
198
- /**
199
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
200
- */
201
- export const CreateToolRequestBodyStatus = {
202
- Live: "live",
203
- Draft: "draft",
204
- Pending: "pending",
205
- Published: "published",
206
- } as const;
207
- /**
208
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
209
- */
210
- export type CreateToolRequestBodyStatus = ClosedEnum<
211
- typeof CreateToolRequestBodyStatus
212
- >;
213
-
214
- /**
215
- * The HTTP method to use.
216
- */
217
- export const CreateToolRequestBodyMethod = {
218
- Get: "GET",
219
- Post: "POST",
220
- Put: "PUT",
221
- Delete: "DELETE",
222
- } as const;
223
- /**
224
- * The HTTP method to use.
225
- */
226
- export type CreateToolRequestBodyMethod = ClosedEnum<
227
- typeof CreateToolRequestBodyMethod
228
- >;
229
-
230
- export type CreateToolHeaders2 = {
231
- value: string;
232
- encrypted?: boolean | undefined;
233
- };
234
-
235
- export type CreateToolRequestBodyHeaders = CreateToolHeaders2 | string;
236
-
237
- /**
238
- * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
239
- */
240
- export type RequestBodyBlueprint = {
241
- /**
242
- * The URL to send the request to.
243
- */
244
- url: string;
245
- /**
246
- * The HTTP method to use.
247
- */
248
- method: CreateToolRequestBodyMethod;
249
- /**
250
- * The headers to send with the request. Can be a string value or an object with value and encrypted properties.
251
- */
252
- headers?: { [k: string]: CreateToolHeaders2 | string } | undefined;
253
- /**
254
- * The body to send with the request.
255
- */
256
- body?: { [k: string]: any } | undefined;
257
- };
258
-
259
- /**
260
- * The type of the argument.
261
- */
262
- export const CreateToolRequestBodyToolsRequest3Type = {
263
- String: "string",
264
- Number: "number",
265
- Boolean: "boolean",
266
- } as const;
267
- /**
268
- * The type of the argument.
269
- */
270
- export type CreateToolRequestBodyToolsRequest3Type = ClosedEnum<
271
- typeof CreateToolRequestBodyToolsRequest3Type
272
- >;
273
-
274
- /**
275
- * The default value of the argument.
276
- */
277
- export type RequestBodyDefaultValue = string | number | boolean;
278
-
279
- export type RequestBodyArguments = {
280
- /**
281
- * The type of the argument.
282
- */
283
- type: CreateToolRequestBodyToolsRequest3Type;
284
- /**
285
- * A description of the argument.
286
- */
287
- description: string;
288
- /**
289
- * Whether to send the argument to the model. If set to false, the argument will not be sent to the model and needs to be provided by the user or it will be left blank.
290
- */
291
- sendToModel?: boolean | undefined;
292
- /**
293
- * The default value of the argument.
294
- */
295
- defaultValue?: string | number | boolean | undefined;
296
- };
297
-
298
- export type CreateToolRequestBodyHttp = {
299
- /**
300
- * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
301
- */
302
- blueprint: RequestBodyBlueprint;
303
- /**
304
- * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
305
- */
306
- arguments?: { [k: string]: RequestBodyArguments } | undefined;
307
- };
308
-
309
- /**
310
- * Executes HTTP requests to interact with external APIs and web services using customizable blueprints.
311
- */
312
- export type RequestBodyHTTPTool = {
313
- /**
314
- * Entity storage path in the format: `project/folder/subfolder/...`
315
- *
316
- * @remarks
317
- *
318
- * The first element identifies the project, followed by nested folders (auto-created as needed).
319
- *
320
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
321
- */
322
- path: string;
323
- /**
324
- * Unique key of the tool as it will be displayed in the UI
325
- */
326
- key: string;
327
- /**
328
- * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
329
- */
330
- displayName?: string | undefined;
331
- /**
332
- * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
333
- */
334
- description: string;
335
- /**
336
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
337
- */
338
- status?: CreateToolRequestBodyStatus | undefined;
339
- type: "http";
340
- http: CreateToolRequestBodyHttp;
341
- };
342
-
343
- /**
344
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
345
- */
346
- export const RequestBodyStatus = {
347
- Live: "live",
348
- Draft: "draft",
349
- Pending: "pending",
350
- Published: "published",
351
- } as const;
352
- /**
353
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
354
- */
355
- export type RequestBodyStatus = ClosedEnum<typeof RequestBodyStatus>;
356
-
357
- /**
358
- * The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
359
- */
360
- export type RequestBodySchema = {
361
- /**
362
- * The JSON Schema type
363
- */
364
- type: string;
365
- /**
366
- * The properties of the JSON Schema object
367
- */
368
- properties: { [k: string]: any };
369
- /**
370
- * Array of required property names
371
- */
372
- required: Array<string>;
373
- additionalProperties?: { [k: string]: any } | undefined;
374
- };
375
-
376
- export type RequestBodyJsonSchema = {
377
- /**
378
- * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
379
- */
380
- name: string;
381
- /**
382
- * A description of what the response format is for. This will be shown to the user.
383
- */
384
- description: string;
385
- /**
386
- * The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
387
- */
388
- schema: RequestBodySchema;
389
- /**
390
- * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. Only compatible with `OpenAI` models.
391
- */
392
- strict?: boolean | undefined;
393
- };
394
-
395
- /**
396
- * A tool that enforces structured output format using JSON Schema for consistent response formatting.
397
- */
398
- export type JSONSchemaTool = {
399
- /**
400
- * Entity storage path in the format: `project/folder/subfolder/...`
401
- *
402
- * @remarks
403
- *
404
- * The first element identifies the project, followed by nested folders (auto-created as needed).
405
- *
406
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
407
- */
408
- path: string;
409
- /**
410
- * Unique key of the tool as it will be displayed in the UI
411
- */
412
- key: string;
413
- /**
414
- * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
415
- */
416
- displayName?: string | undefined;
417
- /**
418
- * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
419
- */
420
- description: string;
421
- /**
422
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
423
- */
424
- status?: RequestBodyStatus | undefined;
425
- type: "json_schema";
426
- jsonSchema: RequestBodyJsonSchema;
427
- };
428
-
429
- /**
430
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
431
- */
432
- export const CreateToolRequestBodyToolsRequest1Status = {
433
- Live: "live",
434
- Draft: "draft",
435
- Pending: "pending",
436
- Published: "published",
437
- } as const;
438
- /**
439
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
440
- */
441
- export type CreateToolRequestBodyToolsRequest1Status = ClosedEnum<
442
- typeof CreateToolRequestBodyToolsRequest1Status
443
- >;
444
-
445
- /**
446
- * The type must be "object"
447
- */
448
- export const CreateToolRequestBodyToolsRequest1Type = {
449
- Object: "object",
450
- } as const;
451
- /**
452
- * The type must be "object"
453
- */
454
- export type CreateToolRequestBodyToolsRequest1Type = ClosedEnum<
455
- typeof CreateToolRequestBodyToolsRequest1Type
456
- >;
457
-
458
- /**
459
- * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
460
- */
461
- export type RequestBodyParameters = {
462
- /**
463
- * The type must be "object"
464
- */
465
- type: CreateToolRequestBodyToolsRequest1Type;
466
- /**
467
- * The properties of the function parameters
468
- */
469
- properties: { [k: string]: any };
470
- /**
471
- * Array of required parameter names
472
- */
473
- required: Array<string>;
474
- additionalProperties?: { [k: string]: any } | undefined;
475
- };
476
-
477
- export type RequestBodyFunction = {
478
- /**
479
- * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
480
- */
481
- name: string;
482
- /**
483
- * A description of what the function does, used by the model to choose when and how to call the function.
484
- */
485
- description?: string | undefined;
486
- /**
487
- * Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Currently only compatible with `OpenAI` models.
488
- */
489
- strict?: boolean | undefined;
490
- /**
491
- * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
492
- */
493
- parameters?: RequestBodyParameters | undefined;
494
- };
495
-
496
- /**
497
- * A custom function tool that allows the model to call predefined functions with structured parameters.
498
- */
499
- export type RequestBodyFunctionTool = {
500
- /**
501
- * Entity storage path in the format: `project/folder/subfolder/...`
502
- *
503
- * @remarks
504
- *
505
- * The first element identifies the project, followed by nested folders (auto-created as needed).
506
- *
507
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
508
- */
509
- path: string;
510
- /**
511
- * Unique key of the tool as it will be displayed in the UI
512
- */
513
- key: string;
514
- /**
515
- * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
516
- */
517
- displayName?: string | undefined;
518
- /**
519
- * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
520
- */
521
- description: string;
522
- /**
523
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
524
- */
525
- status?: CreateToolRequestBodyToolsRequest1Status | undefined;
526
- type: "function";
527
- function: RequestBodyFunction;
528
- };
529
-
530
- /**
531
- * The tool to create
532
- */
533
- export type CreateToolRequestBody =
534
- | RequestBodyFunctionTool
535
- | JSONSchemaTool
536
- | RequestBodyHTTPTool
537
- | RequestBodyMCPTool
538
- | RequestBodyCodeExecutionTool;
539
-
540
- /**
541
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
542
- */
543
- export const CreateToolResponseBodyToolsResponse200Status = {
544
- Live: "live",
545
- Draft: "draft",
546
- Pending: "pending",
547
- Published: "published",
548
- } as const;
549
- /**
550
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
551
- */
552
- export type CreateToolResponseBodyToolsResponse200Status = ClosedEnum<
553
- typeof CreateToolResponseBodyToolsResponse200Status
554
- >;
555
-
556
- /**
557
- * The type must be "object"
558
- */
559
- export const CreateToolResponseBodyToolsResponse200ApplicationJson5Type = {
560
- Object: "object",
561
- } as const;
562
- /**
563
- * The type must be "object"
564
- */
565
- export type CreateToolResponseBodyToolsResponse200ApplicationJson5Type =
566
- ClosedEnum<typeof CreateToolResponseBodyToolsResponse200ApplicationJson5Type>;
567
-
568
- /**
569
- * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
570
- */
571
- export type CreateToolResponseBodyParameters = {
572
- /**
573
- * The type must be "object"
574
- */
575
- type: CreateToolResponseBodyToolsResponse200ApplicationJson5Type;
576
- /**
577
- * The properties of the function parameters
578
- */
579
- properties: { [k: string]: any };
580
- /**
581
- * Array of required parameter names
582
- */
583
- required: Array<string>;
584
- additionalProperties?: { [k: string]: any } | undefined;
585
- };
586
-
587
- export const ResponseBodyLanguage = {
588
- Python: "python",
589
- } as const;
590
- export type ResponseBodyLanguage = ClosedEnum<typeof ResponseBodyLanguage>;
591
-
592
- export type ResponseBodyCodeTool = {
593
- /**
594
- * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
595
- */
596
- parameters?: CreateToolResponseBodyParameters | undefined;
597
- language: ResponseBodyLanguage;
598
- /**
599
- * The code to execute.
600
- */
601
- code: string;
602
- };
603
-
604
- /**
605
- * Executes code snippets in a sandboxed environment, currently supporting Python.
606
- */
607
- export type ResponseBodyCodeExecutionTool = {
608
- id?: string | undefined;
609
- /**
610
- * Entity storage path in the format: `project/folder/subfolder/...`
611
- *
612
- * @remarks
613
- *
614
- * The first element identifies the project, followed by nested folders (auto-created as needed).
615
- *
616
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
617
- */
618
- path: string;
619
- /**
620
- * Unique key of the tool as it will be displayed in the UI
621
- */
622
- key: string;
623
- /**
624
- * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
625
- */
626
- displayName?: string | undefined;
627
- /**
628
- * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
629
- */
630
- description: string;
631
- /**
632
- * The id of the user that created the tool
633
- */
634
- createdById?: string | undefined;
635
- /**
636
- * The id of the user that last updated the tool
637
- */
638
- updatedById?: string | undefined;
639
- projectId: string;
640
- workspaceId: string;
641
- created: string;
642
- updated: string;
643
- /**
644
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
645
- */
646
- status?: CreateToolResponseBodyToolsResponse200Status | undefined;
647
- versionHash?: string | undefined;
648
- type: "code";
649
- codeTool: ResponseBodyCodeTool;
650
- };
651
-
652
- /**
653
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
654
- */
655
- export const CreateToolResponseBodyToolsResponseStatus = {
656
- Live: "live",
657
- Draft: "draft",
658
- Pending: "pending",
659
- Published: "published",
660
- } as const;
661
- /**
662
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
663
- */
664
- export type CreateToolResponseBodyToolsResponseStatus = ClosedEnum<
665
- typeof CreateToolResponseBodyToolsResponseStatus
666
- >;
667
-
668
- export type ResponseBodyHeaders = {
669
- value: string;
670
- encrypted?: boolean | undefined;
671
- };
672
-
673
- export const CreateToolResponseBodyToolsResponse200ApplicationJson4Type = {
674
- Object: "object",
675
- } as const;
676
- export type CreateToolResponseBodyToolsResponse200ApplicationJson4Type =
677
- ClosedEnum<typeof CreateToolResponseBodyToolsResponse200ApplicationJson4Type>;
678
-
679
- export type CreateToolResponseBodySchema = {
680
- type: CreateToolResponseBodyToolsResponse200ApplicationJson4Type;
681
- properties?: { [k: string]: any } | undefined;
682
- required?: Array<string> | undefined;
683
- };
684
-
685
- export type ResponseBodyTools = {
686
- id?: string | undefined;
687
- name: string;
688
- description?: string | undefined;
689
- schema: CreateToolResponseBodySchema;
690
- };
691
-
692
- /**
693
- * The connection type used by the MCP server
694
- */
695
- export const ResponseBodyConnectionType = {
696
- Http: "http",
697
- Sse: "sse",
698
- } as const;
699
- /**
700
- * The connection type used by the MCP server
701
- */
702
- export type ResponseBodyConnectionType = ClosedEnum<
703
- typeof ResponseBodyConnectionType
704
- >;
705
-
706
- export type ResponseBodyMcp = {
707
- /**
708
- * The MCP server URL (cached for execution)
709
- */
710
- serverUrl: string;
711
- /**
712
- * HTTP headers for MCP server requests with encryption support
713
- */
714
- headers?: { [k: string]: ResponseBodyHeaders } | undefined;
715
- /**
716
- * Array of tools available from the MCP server
717
- */
718
- tools: Array<ResponseBodyTools>;
719
- /**
720
- * The connection type used by the MCP server
721
- */
722
- connectionType: ResponseBodyConnectionType;
723
- };
724
-
725
- /**
726
- * A tool from a Model Context Protocol (MCP) server that provides standardized access to external capabilities.
727
- */
728
- export type ResponseBodyMCPTool = {
729
- id?: string | undefined;
730
- /**
731
- * Entity storage path in the format: `project/folder/subfolder/...`
732
- *
733
- * @remarks
734
- *
735
- * The first element identifies the project, followed by nested folders (auto-created as needed).
736
- *
737
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
738
- */
739
- path: string;
740
- /**
741
- * Unique key of the tool as it will be displayed in the UI
742
- */
743
- key: string;
744
- /**
745
- * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
746
- */
747
- displayName?: string | undefined;
748
- /**
749
- * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
750
- */
751
- description: string;
752
- /**
753
- * The id of the user that created the tool
754
- */
755
- createdById?: string | undefined;
756
- /**
757
- * The id of the user that last updated the tool
758
- */
759
- updatedById?: string | undefined;
760
- projectId: string;
761
- workspaceId: string;
762
- created: string;
763
- updated: string;
764
- /**
765
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
766
- */
767
- status?: CreateToolResponseBodyToolsResponseStatus | undefined;
768
- versionHash?: string | undefined;
769
- type: "mcp";
770
- mcp: ResponseBodyMcp;
771
- };
772
-
773
- /**
774
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
775
- */
776
- export const CreateToolResponseBodyToolsStatus = {
777
- Live: "live",
778
- Draft: "draft",
779
- Pending: "pending",
780
- Published: "published",
781
- } as const;
782
- /**
783
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
784
- */
785
- export type CreateToolResponseBodyToolsStatus = ClosedEnum<
786
- typeof CreateToolResponseBodyToolsStatus
787
- >;
788
-
789
- /**
790
- * The HTTP method to use.
791
- */
792
- export const CreateToolResponseBodyMethod = {
793
- Get: "GET",
794
- Post: "POST",
795
- Put: "PUT",
796
- Delete: "DELETE",
797
- } as const;
798
- /**
799
- * The HTTP method to use.
800
- */
801
- export type CreateToolResponseBodyMethod = ClosedEnum<
802
- typeof CreateToolResponseBodyMethod
803
- >;
804
-
805
- export type CreateToolHeadersTools2 = {
806
- value: string;
807
- encrypted?: boolean | undefined;
808
- };
809
-
810
- export type CreateToolResponseBodyHeaders = CreateToolHeadersTools2 | string;
811
-
812
- /**
813
- * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
814
- */
815
- export type ResponseBodyBlueprint = {
816
- /**
817
- * The URL to send the request to.
818
- */
819
- url: string;
820
- /**
821
- * The HTTP method to use.
822
- */
823
- method: CreateToolResponseBodyMethod;
824
- /**
825
- * The headers to send with the request. Can be a string value or an object with value and encrypted properties.
826
- */
827
- headers?: { [k: string]: CreateToolHeadersTools2 | string } | undefined;
828
- /**
829
- * The body to send with the request.
830
- */
831
- body?: { [k: string]: any } | undefined;
832
- };
833
-
834
- /**
835
- * The type of the argument.
836
- */
837
- export const CreateToolResponseBodyToolsResponse200ApplicationJson3Type = {
838
- String: "string",
839
- Number: "number",
840
- Boolean: "boolean",
841
- } as const;
842
- /**
843
- * The type of the argument.
844
- */
845
- export type CreateToolResponseBodyToolsResponse200ApplicationJson3Type =
846
- ClosedEnum<typeof CreateToolResponseBodyToolsResponse200ApplicationJson3Type>;
847
-
848
- /**
849
- * The default value of the argument.
850
- */
851
- export type ResponseBodyDefaultValue = string | number | boolean;
852
-
853
- export type ResponseBodyArguments = {
854
- /**
855
- * The type of the argument.
856
- */
857
- type: CreateToolResponseBodyToolsResponse200ApplicationJson3Type;
858
- /**
859
- * A description of the argument.
860
- */
861
- description: string;
862
- /**
863
- * Whether to send the argument to the model. If set to false, the argument will not be sent to the model and needs to be provided by the user or it will be left blank.
864
- */
865
- sendToModel?: boolean | undefined;
866
- /**
867
- * The default value of the argument.
868
- */
869
- defaultValue?: string | number | boolean | undefined;
870
- };
871
-
872
- export type CreateToolResponseBodyHttp = {
873
- /**
874
- * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
875
- */
876
- blueprint: ResponseBodyBlueprint;
877
- /**
878
- * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
879
- */
880
- arguments?: { [k: string]: ResponseBodyArguments } | undefined;
881
- };
882
-
883
- /**
884
- * Executes HTTP requests to interact with external APIs and web services using customizable blueprints.
885
- */
886
- export type ResponseBodyHTTPTool = {
887
- id?: string | undefined;
888
- /**
889
- * Entity storage path in the format: `project/folder/subfolder/...`
890
- *
891
- * @remarks
892
- *
893
- * The first element identifies the project, followed by nested folders (auto-created as needed).
894
- *
895
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
896
- */
897
- path: string;
898
- /**
899
- * Unique key of the tool as it will be displayed in the UI
900
- */
901
- key: string;
902
- /**
903
- * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
904
- */
905
- displayName?: string | undefined;
906
- /**
907
- * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
908
- */
909
- description: string;
910
- /**
911
- * The id of the user that created the tool
912
- */
913
- createdById?: string | undefined;
914
- /**
915
- * The id of the user that last updated the tool
916
- */
917
- updatedById?: string | undefined;
918
- projectId: string;
919
- workspaceId: string;
920
- created: string;
921
- updated: string;
922
- /**
923
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
924
- */
925
- status?: CreateToolResponseBodyToolsStatus | undefined;
926
- versionHash?: string | undefined;
927
- type: "http";
928
- http: CreateToolResponseBodyHttp;
929
- };
930
-
931
- /**
932
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
933
- */
934
- export const CreateToolResponseBodyStatus = {
935
- Live: "live",
936
- Draft: "draft",
937
- Pending: "pending",
938
- Published: "published",
939
- } as const;
940
- /**
941
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
942
- */
943
- export type CreateToolResponseBodyStatus = ClosedEnum<
944
- typeof CreateToolResponseBodyStatus
945
- >;
946
-
947
- /**
948
- * The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
949
- */
950
- export type ResponseBodySchema = {
951
- /**
952
- * The JSON Schema type
953
- */
954
- type: string;
955
- /**
956
- * The properties of the JSON Schema object
957
- */
958
- properties: { [k: string]: any };
959
- /**
960
- * Array of required property names
961
- */
962
- required: Array<string>;
963
- additionalProperties?: { [k: string]: any } | undefined;
964
- };
965
-
966
- export type ResponseBodyJsonSchema = {
967
- /**
968
- * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
969
- */
970
- name: string;
971
- /**
972
- * A description of what the response format is for. This will be shown to the user.
973
- */
974
- description: string;
975
- /**
976
- * The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
977
- */
978
- schema: ResponseBodySchema;
979
- /**
980
- * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. Only compatible with `OpenAI` models.
981
- */
982
- strict?: boolean | undefined;
983
- };
984
-
985
- /**
986
- * A tool that enforces structured output format using JSON Schema for consistent response formatting.
987
- */
988
- export type ResponseBodyJSONSchemaTool = {
989
- id?: string | undefined;
990
- /**
991
- * Entity storage path in the format: `project/folder/subfolder/...`
992
- *
993
- * @remarks
994
- *
995
- * The first element identifies the project, followed by nested folders (auto-created as needed).
996
- *
997
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
998
- */
999
- path: string;
1000
- /**
1001
- * Unique key of the tool as it will be displayed in the UI
1002
- */
1003
- key: string;
1004
- /**
1005
- * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
1006
- */
1007
- displayName?: string | undefined;
1008
- /**
1009
- * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
1010
- */
1011
- description: string;
1012
- /**
1013
- * The id of the user that created the tool
1014
- */
1015
- createdById?: string | undefined;
1016
- /**
1017
- * The id of the user that last updated the tool
1018
- */
1019
- updatedById?: string | undefined;
1020
- projectId: string;
1021
- workspaceId: string;
1022
- created: string;
1023
- updated: string;
1024
- /**
1025
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1026
- */
1027
- status?: CreateToolResponseBodyStatus | undefined;
1028
- versionHash?: string | undefined;
1029
- type: "json_schema";
1030
- jsonSchema: ResponseBodyJsonSchema;
1031
- };
1032
-
1033
- /**
1034
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1035
- */
1036
- export const ResponseBodyStatus = {
1037
- Live: "live",
1038
- Draft: "draft",
1039
- Pending: "pending",
1040
- Published: "published",
1041
- } as const;
1042
- /**
1043
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1044
- */
1045
- export type ResponseBodyStatus = ClosedEnum<typeof ResponseBodyStatus>;
1046
-
1047
- /**
1048
- * The type must be "object"
1049
- */
1050
- export const CreateToolResponseBodyToolsResponse200ApplicationJson1Type = {
1051
- Object: "object",
1052
- } as const;
1053
- /**
1054
- * The type must be "object"
1055
- */
1056
- export type CreateToolResponseBodyToolsResponse200ApplicationJson1Type =
1057
- ClosedEnum<typeof CreateToolResponseBodyToolsResponse200ApplicationJson1Type>;
1058
-
1059
- /**
1060
- * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
1061
- */
1062
- export type ResponseBodyParameters = {
1063
- /**
1064
- * The type must be "object"
1065
- */
1066
- type: CreateToolResponseBodyToolsResponse200ApplicationJson1Type;
1067
- /**
1068
- * The properties of the function parameters
1069
- */
1070
- properties: { [k: string]: any };
1071
- /**
1072
- * Array of required parameter names
1073
- */
1074
- required: Array<string>;
1075
- additionalProperties?: { [k: string]: any } | undefined;
1076
- };
1077
-
1078
- export type CreateToolResponseBodyFunction = {
1079
- /**
1080
- * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
1081
- */
1082
- name: string;
1083
- /**
1084
- * A description of what the function does, used by the model to choose when and how to call the function.
1085
- */
1086
- description?: string | undefined;
1087
- /**
1088
- * Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Currently only compatible with `OpenAI` models.
1089
- */
1090
- strict?: boolean | undefined;
1091
- /**
1092
- * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
1093
- */
1094
- parameters?: ResponseBodyParameters | undefined;
1095
- };
1096
-
1097
- /**
1098
- * A custom function tool that allows the model to call predefined functions with structured parameters.
1099
- */
1100
- export type ResponseBodyFunctionTool = {
1101
- id?: string | undefined;
1102
- /**
1103
- * Entity storage path in the format: `project/folder/subfolder/...`
1104
- *
1105
- * @remarks
1106
- *
1107
- * The first element identifies the project, followed by nested folders (auto-created as needed).
1108
- *
1109
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
1110
- */
1111
- path: string;
1112
- /**
1113
- * Unique key of the tool as it will be displayed in the UI
1114
- */
1115
- key: string;
1116
- /**
1117
- * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
1118
- */
1119
- displayName?: string | undefined;
1120
- /**
1121
- * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
1122
- */
1123
- description: string;
1124
- /**
1125
- * The id of the user that created the tool
1126
- */
1127
- createdById?: string | undefined;
1128
- /**
1129
- * The id of the user that last updated the tool
1130
- */
1131
- updatedById?: string | undefined;
1132
- projectId: string;
1133
- workspaceId: string;
1134
- created: string;
1135
- updated: string;
1136
- /**
1137
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1138
- */
1139
- status?: ResponseBodyStatus | undefined;
1140
- versionHash?: string | undefined;
1141
- type: "function";
1142
- function: CreateToolResponseBodyFunction;
1143
- };
1144
-
1145
- /**
1146
- * Successfully created the tool.
1147
- */
1148
- export type CreateToolResponseBody =
1149
- | ResponseBodyFunctionTool
1150
- | ResponseBodyJSONSchemaTool
1151
- | ResponseBodyHTTPTool
1152
- | ResponseBodyMCPTool
1153
- | ResponseBodyCodeExecutionTool;
1154
-
1155
- /** @internal */
1156
- export const CreateToolRequestBodyToolsRequestStatus$inboundSchema:
1157
- z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequestStatus> = z
1158
- .nativeEnum(CreateToolRequestBodyToolsRequestStatus);
1159
- /** @internal */
1160
- export const CreateToolRequestBodyToolsRequestStatus$outboundSchema:
1161
- z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequestStatus> =
1162
- CreateToolRequestBodyToolsRequestStatus$inboundSchema;
1163
-
1164
- /** @internal */
1165
- export const CreateToolRequestBodyToolsRequest5CodeToolType$inboundSchema:
1166
- z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest5CodeToolType> = z
1167
- .nativeEnum(CreateToolRequestBodyToolsRequest5CodeToolType);
1168
- /** @internal */
1169
- export const CreateToolRequestBodyToolsRequest5CodeToolType$outboundSchema:
1170
- z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest5CodeToolType> =
1171
- CreateToolRequestBodyToolsRequest5CodeToolType$inboundSchema;
1172
-
1173
- /** @internal */
1174
- export const CreateToolRequestBodyParameters$inboundSchema: z.ZodType<
1175
- CreateToolRequestBodyParameters,
1176
- z.ZodTypeDef,
1177
- unknown
1178
- > = collectExtraKeys$(
1179
- z.object({
1180
- type: CreateToolRequestBodyToolsRequest5CodeToolType$inboundSchema,
1181
- properties: z.record(z.any()),
1182
- required: z.array(z.string()),
1183
- }).catchall(z.any()),
1184
- "additionalProperties",
1185
- true,
1186
- );
1187
- /** @internal */
1188
- export type CreateToolRequestBodyParameters$Outbound = {
1189
- type: string;
1190
- properties: { [k: string]: any };
1191
- required: Array<string>;
1192
- [additionalProperties: string]: unknown;
1193
- };
1194
-
1195
- /** @internal */
1196
- export const CreateToolRequestBodyParameters$outboundSchema: z.ZodType<
1197
- CreateToolRequestBodyParameters$Outbound,
1198
- z.ZodTypeDef,
1199
- CreateToolRequestBodyParameters
1200
- > = z.object({
1201
- type: CreateToolRequestBodyToolsRequest5CodeToolType$outboundSchema,
1202
- properties: z.record(z.any()),
1203
- required: z.array(z.string()),
1204
- additionalProperties: z.record(z.any()).optional(),
1205
- }).transform((v) => {
1206
- return {
1207
- ...v.additionalProperties,
1208
- ...remap$(v, {
1209
- additionalProperties: null,
1210
- }),
1211
- };
1212
- });
1213
-
1214
- export function createToolRequestBodyParametersToJSON(
1215
- createToolRequestBodyParameters: CreateToolRequestBodyParameters,
1216
- ): string {
1217
- return JSON.stringify(
1218
- CreateToolRequestBodyParameters$outboundSchema.parse(
1219
- createToolRequestBodyParameters,
1220
- ),
1221
- );
1222
- }
1223
- export function createToolRequestBodyParametersFromJSON(
1224
- jsonString: string,
1225
- ): SafeParseResult<CreateToolRequestBodyParameters, SDKValidationError> {
1226
- return safeParse(
1227
- jsonString,
1228
- (x) => CreateToolRequestBodyParameters$inboundSchema.parse(JSON.parse(x)),
1229
- `Failed to parse 'CreateToolRequestBodyParameters' from JSON`,
1230
- );
1231
- }
1232
-
1233
- /** @internal */
1234
- export const RequestBodyLanguage$inboundSchema: z.ZodNativeEnum<
1235
- typeof RequestBodyLanguage
1236
- > = z.nativeEnum(RequestBodyLanguage);
1237
- /** @internal */
1238
- export const RequestBodyLanguage$outboundSchema: z.ZodNativeEnum<
1239
- typeof RequestBodyLanguage
1240
- > = RequestBodyLanguage$inboundSchema;
1241
-
1242
- /** @internal */
1243
- export const RequestBodyCodeTool$inboundSchema: z.ZodType<
1244
- RequestBodyCodeTool,
1245
- z.ZodTypeDef,
1246
- unknown
1247
- > = z.object({
1248
- parameters: z.lazy(() => CreateToolRequestBodyParameters$inboundSchema)
1249
- .optional(),
1250
- language: RequestBodyLanguage$inboundSchema,
1251
- code: z.string(),
1252
- });
1253
- /** @internal */
1254
- export type RequestBodyCodeTool$Outbound = {
1255
- parameters?: CreateToolRequestBodyParameters$Outbound | undefined;
1256
- language: string;
1257
- code: string;
1258
- };
1259
-
1260
- /** @internal */
1261
- export const RequestBodyCodeTool$outboundSchema: z.ZodType<
1262
- RequestBodyCodeTool$Outbound,
1263
- z.ZodTypeDef,
1264
- RequestBodyCodeTool
1265
- > = z.object({
1266
- parameters: z.lazy(() => CreateToolRequestBodyParameters$outboundSchema)
1267
- .optional(),
1268
- language: RequestBodyLanguage$outboundSchema,
1269
- code: z.string(),
1270
- });
1271
-
1272
- export function requestBodyCodeToolToJSON(
1273
- requestBodyCodeTool: RequestBodyCodeTool,
1274
- ): string {
1275
- return JSON.stringify(
1276
- RequestBodyCodeTool$outboundSchema.parse(requestBodyCodeTool),
1277
- );
1278
- }
1279
- export function requestBodyCodeToolFromJSON(
1280
- jsonString: string,
1281
- ): SafeParseResult<RequestBodyCodeTool, SDKValidationError> {
1282
- return safeParse(
1283
- jsonString,
1284
- (x) => RequestBodyCodeTool$inboundSchema.parse(JSON.parse(x)),
1285
- `Failed to parse 'RequestBodyCodeTool' from JSON`,
1286
- );
1287
- }
1288
-
1289
- /** @internal */
1290
- export const RequestBodyCodeExecutionTool$inboundSchema: z.ZodType<
1291
- RequestBodyCodeExecutionTool,
1292
- z.ZodTypeDef,
1293
- unknown
1294
- > = z.object({
1295
- path: z.string(),
1296
- key: z.string(),
1297
- display_name: z.string().optional(),
1298
- description: z.string(),
1299
- status: CreateToolRequestBodyToolsRequestStatus$inboundSchema.default("live"),
1300
- type: z.literal("code"),
1301
- code_tool: z.lazy(() => RequestBodyCodeTool$inboundSchema),
1302
- }).transform((v) => {
1303
- return remap$(v, {
1304
- "display_name": "displayName",
1305
- "code_tool": "codeTool",
1306
- });
1307
- });
1308
- /** @internal */
1309
- export type RequestBodyCodeExecutionTool$Outbound = {
1310
- path: string;
1311
- key: string;
1312
- display_name?: string | undefined;
1313
- description: string;
1314
- status: string;
1315
- type: "code";
1316
- code_tool: RequestBodyCodeTool$Outbound;
1317
- };
1318
-
1319
- /** @internal */
1320
- export const RequestBodyCodeExecutionTool$outboundSchema: z.ZodType<
1321
- RequestBodyCodeExecutionTool$Outbound,
1322
- z.ZodTypeDef,
1323
- RequestBodyCodeExecutionTool
1324
- > = z.object({
1325
- path: z.string(),
1326
- key: z.string(),
1327
- displayName: z.string().optional(),
1328
- description: z.string(),
1329
- status: CreateToolRequestBodyToolsRequestStatus$outboundSchema.default(
1330
- "live",
1331
- ),
1332
- type: z.literal("code"),
1333
- codeTool: z.lazy(() => RequestBodyCodeTool$outboundSchema),
1334
- }).transform((v) => {
1335
- return remap$(v, {
1336
- displayName: "display_name",
1337
- codeTool: "code_tool",
1338
- });
1339
- });
1340
-
1341
- export function requestBodyCodeExecutionToolToJSON(
1342
- requestBodyCodeExecutionTool: RequestBodyCodeExecutionTool,
1343
- ): string {
1344
- return JSON.stringify(
1345
- RequestBodyCodeExecutionTool$outboundSchema.parse(
1346
- requestBodyCodeExecutionTool,
1347
- ),
1348
- );
1349
- }
1350
- export function requestBodyCodeExecutionToolFromJSON(
1351
- jsonString: string,
1352
- ): SafeParseResult<RequestBodyCodeExecutionTool, SDKValidationError> {
1353
- return safeParse(
1354
- jsonString,
1355
- (x) => RequestBodyCodeExecutionTool$inboundSchema.parse(JSON.parse(x)),
1356
- `Failed to parse 'RequestBodyCodeExecutionTool' from JSON`,
1357
- );
1358
- }
1359
-
1360
- /** @internal */
1361
- export const CreateToolRequestBodyToolsStatus$inboundSchema: z.ZodNativeEnum<
1362
- typeof CreateToolRequestBodyToolsStatus
1363
- > = z.nativeEnum(CreateToolRequestBodyToolsStatus);
1364
- /** @internal */
1365
- export const CreateToolRequestBodyToolsStatus$outboundSchema: z.ZodNativeEnum<
1366
- typeof CreateToolRequestBodyToolsStatus
1367
- > = CreateToolRequestBodyToolsStatus$inboundSchema;
1368
-
1369
- /** @internal */
1370
- export const RequestBodyHeaders$inboundSchema: z.ZodType<
1371
- RequestBodyHeaders,
1372
- z.ZodTypeDef,
1373
- unknown
1374
- > = z.object({
1375
- value: z.string(),
1376
- encrypted: z.boolean().default(false),
1377
- });
1378
- /** @internal */
1379
- export type RequestBodyHeaders$Outbound = {
1380
- value: string;
1381
- encrypted: boolean;
1382
- };
1383
-
1384
- /** @internal */
1385
- export const RequestBodyHeaders$outboundSchema: z.ZodType<
1386
- RequestBodyHeaders$Outbound,
1387
- z.ZodTypeDef,
1388
- RequestBodyHeaders
1389
- > = z.object({
1390
- value: z.string(),
1391
- encrypted: z.boolean().default(false),
1392
- });
1393
-
1394
- export function requestBodyHeadersToJSON(
1395
- requestBodyHeaders: RequestBodyHeaders,
1396
- ): string {
1397
- return JSON.stringify(
1398
- RequestBodyHeaders$outboundSchema.parse(requestBodyHeaders),
1399
- );
1400
- }
1401
- export function requestBodyHeadersFromJSON(
1402
- jsonString: string,
1403
- ): SafeParseResult<RequestBodyHeaders, SDKValidationError> {
1404
- return safeParse(
1405
- jsonString,
1406
- (x) => RequestBodyHeaders$inboundSchema.parse(JSON.parse(x)),
1407
- `Failed to parse 'RequestBodyHeaders' from JSON`,
1408
- );
1409
- }
1410
-
1411
- /** @internal */
1412
- export const RequestBodyConnectionType$inboundSchema: z.ZodNativeEnum<
1413
- typeof RequestBodyConnectionType
1414
- > = z.nativeEnum(RequestBodyConnectionType);
1415
- /** @internal */
1416
- export const RequestBodyConnectionType$outboundSchema: z.ZodNativeEnum<
1417
- typeof RequestBodyConnectionType
1418
- > = RequestBodyConnectionType$inboundSchema;
1419
-
1420
- /** @internal */
1421
- export const RequestBodyMcp$inboundSchema: z.ZodType<
1422
- RequestBodyMcp,
1423
- z.ZodTypeDef,
1424
- unknown
1425
- > = z.object({
1426
- server_url: z.string(),
1427
- headers: z.record(z.lazy(() => RequestBodyHeaders$inboundSchema)).optional(),
1428
- connection_type: RequestBodyConnectionType$inboundSchema,
1429
- }).transform((v) => {
1430
- return remap$(v, {
1431
- "server_url": "serverUrl",
1432
- "connection_type": "connectionType",
1433
- });
1434
- });
1435
- /** @internal */
1436
- export type RequestBodyMcp$Outbound = {
1437
- server_url: string;
1438
- headers?: { [k: string]: RequestBodyHeaders$Outbound } | undefined;
1439
- connection_type: string;
1440
- };
1441
-
1442
- /** @internal */
1443
- export const RequestBodyMcp$outboundSchema: z.ZodType<
1444
- RequestBodyMcp$Outbound,
1445
- z.ZodTypeDef,
1446
- RequestBodyMcp
1447
- > = z.object({
1448
- serverUrl: z.string(),
1449
- headers: z.record(z.lazy(() => RequestBodyHeaders$outboundSchema)).optional(),
1450
- connectionType: RequestBodyConnectionType$outboundSchema,
1451
- }).transform((v) => {
1452
- return remap$(v, {
1453
- serverUrl: "server_url",
1454
- connectionType: "connection_type",
1455
- });
1456
- });
1457
-
1458
- export function requestBodyMcpToJSON(requestBodyMcp: RequestBodyMcp): string {
1459
- return JSON.stringify(RequestBodyMcp$outboundSchema.parse(requestBodyMcp));
1460
- }
1461
- export function requestBodyMcpFromJSON(
1462
- jsonString: string,
1463
- ): SafeParseResult<RequestBodyMcp, SDKValidationError> {
1464
- return safeParse(
1465
- jsonString,
1466
- (x) => RequestBodyMcp$inboundSchema.parse(JSON.parse(x)),
1467
- `Failed to parse 'RequestBodyMcp' from JSON`,
1468
- );
1469
- }
1470
-
1471
- /** @internal */
1472
- export const RequestBodyMCPTool$inboundSchema: z.ZodType<
1473
- RequestBodyMCPTool,
1474
- z.ZodTypeDef,
1475
- unknown
1476
- > = z.object({
1477
- path: z.string(),
1478
- key: z.string(),
1479
- display_name: z.string().optional(),
1480
- description: z.string(),
1481
- status: CreateToolRequestBodyToolsStatus$inboundSchema.default("live"),
1482
- type: z.literal("mcp"),
1483
- mcp: z.lazy(() => RequestBodyMcp$inboundSchema),
1484
- }).transform((v) => {
1485
- return remap$(v, {
1486
- "display_name": "displayName",
1487
- });
1488
- });
1489
- /** @internal */
1490
- export type RequestBodyMCPTool$Outbound = {
1491
- path: string;
1492
- key: string;
1493
- display_name?: string | undefined;
1494
- description: string;
1495
- status: string;
1496
- type: "mcp";
1497
- mcp: RequestBodyMcp$Outbound;
1498
- };
1499
-
1500
- /** @internal */
1501
- export const RequestBodyMCPTool$outboundSchema: z.ZodType<
1502
- RequestBodyMCPTool$Outbound,
1503
- z.ZodTypeDef,
1504
- RequestBodyMCPTool
1505
- > = z.object({
1506
- path: z.string(),
1507
- key: z.string(),
1508
- displayName: z.string().optional(),
1509
- description: z.string(),
1510
- status: CreateToolRequestBodyToolsStatus$outboundSchema.default("live"),
1511
- type: z.literal("mcp"),
1512
- mcp: z.lazy(() => RequestBodyMcp$outboundSchema),
1513
- }).transform((v) => {
1514
- return remap$(v, {
1515
- displayName: "display_name",
1516
- });
1517
- });
1518
-
1519
- export function requestBodyMCPToolToJSON(
1520
- requestBodyMCPTool: RequestBodyMCPTool,
1521
- ): string {
1522
- return JSON.stringify(
1523
- RequestBodyMCPTool$outboundSchema.parse(requestBodyMCPTool),
1524
- );
1525
- }
1526
- export function requestBodyMCPToolFromJSON(
1527
- jsonString: string,
1528
- ): SafeParseResult<RequestBodyMCPTool, SDKValidationError> {
1529
- return safeParse(
1530
- jsonString,
1531
- (x) => RequestBodyMCPTool$inboundSchema.parse(JSON.parse(x)),
1532
- `Failed to parse 'RequestBodyMCPTool' from JSON`,
1533
- );
1534
- }
1535
-
1536
- /** @internal */
1537
- export const CreateToolRequestBodyStatus$inboundSchema: z.ZodNativeEnum<
1538
- typeof CreateToolRequestBodyStatus
1539
- > = z.nativeEnum(CreateToolRequestBodyStatus);
1540
- /** @internal */
1541
- export const CreateToolRequestBodyStatus$outboundSchema: z.ZodNativeEnum<
1542
- typeof CreateToolRequestBodyStatus
1543
- > = CreateToolRequestBodyStatus$inboundSchema;
1544
-
1545
- /** @internal */
1546
- export const CreateToolRequestBodyMethod$inboundSchema: z.ZodNativeEnum<
1547
- typeof CreateToolRequestBodyMethod
1548
- > = z.nativeEnum(CreateToolRequestBodyMethod);
1549
- /** @internal */
1550
- export const CreateToolRequestBodyMethod$outboundSchema: z.ZodNativeEnum<
1551
- typeof CreateToolRequestBodyMethod
1552
- > = CreateToolRequestBodyMethod$inboundSchema;
1553
-
1554
- /** @internal */
1555
- export const CreateToolHeaders2$inboundSchema: z.ZodType<
1556
- CreateToolHeaders2,
1557
- z.ZodTypeDef,
1558
- unknown
1559
- > = z.object({
1560
- value: z.string(),
1561
- encrypted: z.boolean().default(false),
1562
- });
1563
- /** @internal */
1564
- export type CreateToolHeaders2$Outbound = {
1565
- value: string;
1566
- encrypted: boolean;
1567
- };
1568
-
1569
- /** @internal */
1570
- export const CreateToolHeaders2$outboundSchema: z.ZodType<
1571
- CreateToolHeaders2$Outbound,
1572
- z.ZodTypeDef,
1573
- CreateToolHeaders2
1574
- > = z.object({
1575
- value: z.string(),
1576
- encrypted: z.boolean().default(false),
1577
- });
1578
-
1579
- export function createToolHeaders2ToJSON(
1580
- createToolHeaders2: CreateToolHeaders2,
1581
- ): string {
1582
- return JSON.stringify(
1583
- CreateToolHeaders2$outboundSchema.parse(createToolHeaders2),
1584
- );
1585
- }
1586
- export function createToolHeaders2FromJSON(
1587
- jsonString: string,
1588
- ): SafeParseResult<CreateToolHeaders2, SDKValidationError> {
1589
- return safeParse(
1590
- jsonString,
1591
- (x) => CreateToolHeaders2$inboundSchema.parse(JSON.parse(x)),
1592
- `Failed to parse 'CreateToolHeaders2' from JSON`,
1593
- );
1594
- }
1595
-
1596
- /** @internal */
1597
- export const CreateToolRequestBodyHeaders$inboundSchema: z.ZodType<
1598
- CreateToolRequestBodyHeaders,
1599
- z.ZodTypeDef,
1600
- unknown
1601
- > = z.union([z.lazy(() => CreateToolHeaders2$inboundSchema), z.string()]);
1602
- /** @internal */
1603
- export type CreateToolRequestBodyHeaders$Outbound =
1604
- | CreateToolHeaders2$Outbound
1605
- | string;
1606
-
1607
- /** @internal */
1608
- export const CreateToolRequestBodyHeaders$outboundSchema: z.ZodType<
1609
- CreateToolRequestBodyHeaders$Outbound,
1610
- z.ZodTypeDef,
1611
- CreateToolRequestBodyHeaders
1612
- > = z.union([z.lazy(() => CreateToolHeaders2$outboundSchema), z.string()]);
1613
-
1614
- export function createToolRequestBodyHeadersToJSON(
1615
- createToolRequestBodyHeaders: CreateToolRequestBodyHeaders,
1616
- ): string {
1617
- return JSON.stringify(
1618
- CreateToolRequestBodyHeaders$outboundSchema.parse(
1619
- createToolRequestBodyHeaders,
1620
- ),
1621
- );
1622
- }
1623
- export function createToolRequestBodyHeadersFromJSON(
1624
- jsonString: string,
1625
- ): SafeParseResult<CreateToolRequestBodyHeaders, SDKValidationError> {
1626
- return safeParse(
1627
- jsonString,
1628
- (x) => CreateToolRequestBodyHeaders$inboundSchema.parse(JSON.parse(x)),
1629
- `Failed to parse 'CreateToolRequestBodyHeaders' from JSON`,
1630
- );
1631
- }
1632
-
1633
- /** @internal */
1634
- export const RequestBodyBlueprint$inboundSchema: z.ZodType<
1635
- RequestBodyBlueprint,
1636
- z.ZodTypeDef,
1637
- unknown
1638
- > = z.object({
1639
- url: z.string(),
1640
- method: CreateToolRequestBodyMethod$inboundSchema,
1641
- headers: z.record(
1642
- z.union([z.lazy(() => CreateToolHeaders2$inboundSchema), z.string()]),
1643
- ).optional(),
1644
- body: z.record(z.any()).optional(),
1645
- });
1646
- /** @internal */
1647
- export type RequestBodyBlueprint$Outbound = {
1648
- url: string;
1649
- method: string;
1650
- headers?: { [k: string]: CreateToolHeaders2$Outbound | string } | undefined;
1651
- body?: { [k: string]: any } | undefined;
1652
- };
1653
-
1654
- /** @internal */
1655
- export const RequestBodyBlueprint$outboundSchema: z.ZodType<
1656
- RequestBodyBlueprint$Outbound,
1657
- z.ZodTypeDef,
1658
- RequestBodyBlueprint
1659
- > = z.object({
1660
- url: z.string(),
1661
- method: CreateToolRequestBodyMethod$outboundSchema,
1662
- headers: z.record(
1663
- z.union([z.lazy(() => CreateToolHeaders2$outboundSchema), z.string()]),
1664
- ).optional(),
1665
- body: z.record(z.any()).optional(),
1666
- });
1667
-
1668
- export function requestBodyBlueprintToJSON(
1669
- requestBodyBlueprint: RequestBodyBlueprint,
1670
- ): string {
1671
- return JSON.stringify(
1672
- RequestBodyBlueprint$outboundSchema.parse(requestBodyBlueprint),
1673
- );
1674
- }
1675
- export function requestBodyBlueprintFromJSON(
1676
- jsonString: string,
1677
- ): SafeParseResult<RequestBodyBlueprint, SDKValidationError> {
1678
- return safeParse(
1679
- jsonString,
1680
- (x) => RequestBodyBlueprint$inboundSchema.parse(JSON.parse(x)),
1681
- `Failed to parse 'RequestBodyBlueprint' from JSON`,
1682
- );
1683
- }
1684
-
1685
- /** @internal */
1686
- export const CreateToolRequestBodyToolsRequest3Type$inboundSchema:
1687
- z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest3Type> = z.nativeEnum(
1688
- CreateToolRequestBodyToolsRequest3Type,
1689
- );
1690
- /** @internal */
1691
- export const CreateToolRequestBodyToolsRequest3Type$outboundSchema:
1692
- z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest3Type> =
1693
- CreateToolRequestBodyToolsRequest3Type$inboundSchema;
1694
-
1695
- /** @internal */
1696
- export const RequestBodyDefaultValue$inboundSchema: z.ZodType<
1697
- RequestBodyDefaultValue,
1698
- z.ZodTypeDef,
1699
- unknown
1700
- > = z.union([z.string(), z.number(), z.boolean()]);
1701
- /** @internal */
1702
- export type RequestBodyDefaultValue$Outbound = string | number | boolean;
1703
-
1704
- /** @internal */
1705
- export const RequestBodyDefaultValue$outboundSchema: z.ZodType<
1706
- RequestBodyDefaultValue$Outbound,
1707
- z.ZodTypeDef,
1708
- RequestBodyDefaultValue
1709
- > = z.union([z.string(), z.number(), z.boolean()]);
1710
-
1711
- export function requestBodyDefaultValueToJSON(
1712
- requestBodyDefaultValue: RequestBodyDefaultValue,
1713
- ): string {
1714
- return JSON.stringify(
1715
- RequestBodyDefaultValue$outboundSchema.parse(requestBodyDefaultValue),
1716
- );
1717
- }
1718
- export function requestBodyDefaultValueFromJSON(
1719
- jsonString: string,
1720
- ): SafeParseResult<RequestBodyDefaultValue, SDKValidationError> {
1721
- return safeParse(
1722
- jsonString,
1723
- (x) => RequestBodyDefaultValue$inboundSchema.parse(JSON.parse(x)),
1724
- `Failed to parse 'RequestBodyDefaultValue' from JSON`,
1725
- );
1726
- }
1727
-
1728
- /** @internal */
1729
- export const RequestBodyArguments$inboundSchema: z.ZodType<
1730
- RequestBodyArguments,
1731
- z.ZodTypeDef,
1732
- unknown
1733
- > = z.object({
1734
- type: CreateToolRequestBodyToolsRequest3Type$inboundSchema,
1735
- description: z.string(),
1736
- send_to_model: z.boolean().default(true),
1737
- default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
1738
- }).transform((v) => {
1739
- return remap$(v, {
1740
- "send_to_model": "sendToModel",
1741
- "default_value": "defaultValue",
1742
- });
1743
- });
1744
- /** @internal */
1745
- export type RequestBodyArguments$Outbound = {
1746
- type: string;
1747
- description: string;
1748
- send_to_model: boolean;
1749
- default_value?: string | number | boolean | undefined;
1750
- };
1751
-
1752
- /** @internal */
1753
- export const RequestBodyArguments$outboundSchema: z.ZodType<
1754
- RequestBodyArguments$Outbound,
1755
- z.ZodTypeDef,
1756
- RequestBodyArguments
1757
- > = z.object({
1758
- type: CreateToolRequestBodyToolsRequest3Type$outboundSchema,
1759
- description: z.string(),
1760
- sendToModel: z.boolean().default(true),
1761
- defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
1762
- }).transform((v) => {
1763
- return remap$(v, {
1764
- sendToModel: "send_to_model",
1765
- defaultValue: "default_value",
1766
- });
1767
- });
1768
-
1769
- export function requestBodyArgumentsToJSON(
1770
- requestBodyArguments: RequestBodyArguments,
1771
- ): string {
1772
- return JSON.stringify(
1773
- RequestBodyArguments$outboundSchema.parse(requestBodyArguments),
1774
- );
1775
- }
1776
- export function requestBodyArgumentsFromJSON(
1777
- jsonString: string,
1778
- ): SafeParseResult<RequestBodyArguments, SDKValidationError> {
1779
- return safeParse(
1780
- jsonString,
1781
- (x) => RequestBodyArguments$inboundSchema.parse(JSON.parse(x)),
1782
- `Failed to parse 'RequestBodyArguments' from JSON`,
1783
- );
1784
- }
1785
-
1786
- /** @internal */
1787
- export const CreateToolRequestBodyHttp$inboundSchema: z.ZodType<
1788
- CreateToolRequestBodyHttp,
1789
- z.ZodTypeDef,
1790
- unknown
1791
- > = z.object({
1792
- blueprint: z.lazy(() => RequestBodyBlueprint$inboundSchema),
1793
- arguments: z.record(z.lazy(() => RequestBodyArguments$inboundSchema))
1794
- .optional(),
1795
- });
1796
- /** @internal */
1797
- export type CreateToolRequestBodyHttp$Outbound = {
1798
- blueprint: RequestBodyBlueprint$Outbound;
1799
- arguments?: { [k: string]: RequestBodyArguments$Outbound } | undefined;
1800
- };
1801
-
1802
- /** @internal */
1803
- export const CreateToolRequestBodyHttp$outboundSchema: z.ZodType<
1804
- CreateToolRequestBodyHttp$Outbound,
1805
- z.ZodTypeDef,
1806
- CreateToolRequestBodyHttp
1807
- > = z.object({
1808
- blueprint: z.lazy(() => RequestBodyBlueprint$outboundSchema),
1809
- arguments: z.record(z.lazy(() => RequestBodyArguments$outboundSchema))
1810
- .optional(),
1811
- });
1812
-
1813
- export function createToolRequestBodyHttpToJSON(
1814
- createToolRequestBodyHttp: CreateToolRequestBodyHttp,
1815
- ): string {
1816
- return JSON.stringify(
1817
- CreateToolRequestBodyHttp$outboundSchema.parse(createToolRequestBodyHttp),
1818
- );
1819
- }
1820
- export function createToolRequestBodyHttpFromJSON(
1821
- jsonString: string,
1822
- ): SafeParseResult<CreateToolRequestBodyHttp, SDKValidationError> {
1823
- return safeParse(
1824
- jsonString,
1825
- (x) => CreateToolRequestBodyHttp$inboundSchema.parse(JSON.parse(x)),
1826
- `Failed to parse 'CreateToolRequestBodyHttp' from JSON`,
1827
- );
1828
- }
1829
-
1830
- /** @internal */
1831
- export const RequestBodyHTTPTool$inboundSchema: z.ZodType<
1832
- RequestBodyHTTPTool,
1833
- z.ZodTypeDef,
1834
- unknown
1835
- > = z.object({
1836
- path: z.string(),
1837
- key: z.string(),
1838
- display_name: z.string().optional(),
1839
- description: z.string(),
1840
- status: CreateToolRequestBodyStatus$inboundSchema.default("live"),
1841
- type: z.literal("http"),
1842
- http: z.lazy(() => CreateToolRequestBodyHttp$inboundSchema),
1843
- }).transform((v) => {
1844
- return remap$(v, {
1845
- "display_name": "displayName",
1846
- });
1847
- });
1848
- /** @internal */
1849
- export type RequestBodyHTTPTool$Outbound = {
1850
- path: string;
1851
- key: string;
1852
- display_name?: string | undefined;
1853
- description: string;
1854
- status: string;
1855
- type: "http";
1856
- http: CreateToolRequestBodyHttp$Outbound;
1857
- };
1858
-
1859
- /** @internal */
1860
- export const RequestBodyHTTPTool$outboundSchema: z.ZodType<
1861
- RequestBodyHTTPTool$Outbound,
1862
- z.ZodTypeDef,
1863
- RequestBodyHTTPTool
1864
- > = z.object({
1865
- path: z.string(),
1866
- key: z.string(),
1867
- displayName: z.string().optional(),
1868
- description: z.string(),
1869
- status: CreateToolRequestBodyStatus$outboundSchema.default("live"),
1870
- type: z.literal("http"),
1871
- http: z.lazy(() => CreateToolRequestBodyHttp$outboundSchema),
1872
- }).transform((v) => {
1873
- return remap$(v, {
1874
- displayName: "display_name",
1875
- });
1876
- });
1877
-
1878
- export function requestBodyHTTPToolToJSON(
1879
- requestBodyHTTPTool: RequestBodyHTTPTool,
1880
- ): string {
1881
- return JSON.stringify(
1882
- RequestBodyHTTPTool$outboundSchema.parse(requestBodyHTTPTool),
1883
- );
1884
- }
1885
- export function requestBodyHTTPToolFromJSON(
1886
- jsonString: string,
1887
- ): SafeParseResult<RequestBodyHTTPTool, SDKValidationError> {
1888
- return safeParse(
1889
- jsonString,
1890
- (x) => RequestBodyHTTPTool$inboundSchema.parse(JSON.parse(x)),
1891
- `Failed to parse 'RequestBodyHTTPTool' from JSON`,
1892
- );
1893
- }
1894
-
1895
- /** @internal */
1896
- export const RequestBodyStatus$inboundSchema: z.ZodNativeEnum<
1897
- typeof RequestBodyStatus
1898
- > = z.nativeEnum(RequestBodyStatus);
1899
- /** @internal */
1900
- export const RequestBodyStatus$outboundSchema: z.ZodNativeEnum<
1901
- typeof RequestBodyStatus
1902
- > = RequestBodyStatus$inboundSchema;
1903
-
1904
- /** @internal */
1905
- export const RequestBodySchema$inboundSchema: z.ZodType<
1906
- RequestBodySchema,
1907
- z.ZodTypeDef,
1908
- unknown
1909
- > = collectExtraKeys$(
1910
- z.object({
1911
- type: z.string(),
1912
- properties: z.record(z.any()),
1913
- required: z.array(z.string()),
1914
- }).catchall(z.any()),
1915
- "additionalProperties",
1916
- true,
1917
- );
1918
- /** @internal */
1919
- export type RequestBodySchema$Outbound = {
1920
- type: string;
1921
- properties: { [k: string]: any };
1922
- required: Array<string>;
1923
- [additionalProperties: string]: unknown;
1924
- };
1925
-
1926
- /** @internal */
1927
- export const RequestBodySchema$outboundSchema: z.ZodType<
1928
- RequestBodySchema$Outbound,
1929
- z.ZodTypeDef,
1930
- RequestBodySchema
1931
- > = z.object({
1932
- type: z.string(),
1933
- properties: z.record(z.any()),
1934
- required: z.array(z.string()),
1935
- additionalProperties: z.record(z.any()).optional(),
1936
- }).transform((v) => {
1937
- return {
1938
- ...v.additionalProperties,
1939
- ...remap$(v, {
1940
- additionalProperties: null,
1941
- }),
1942
- };
1943
- });
1944
-
1945
- export function requestBodySchemaToJSON(
1946
- requestBodySchema: RequestBodySchema,
1947
- ): string {
1948
- return JSON.stringify(
1949
- RequestBodySchema$outboundSchema.parse(requestBodySchema),
1950
- );
1951
- }
1952
- export function requestBodySchemaFromJSON(
1953
- jsonString: string,
1954
- ): SafeParseResult<RequestBodySchema, SDKValidationError> {
1955
- return safeParse(
1956
- jsonString,
1957
- (x) => RequestBodySchema$inboundSchema.parse(JSON.parse(x)),
1958
- `Failed to parse 'RequestBodySchema' from JSON`,
1959
- );
1960
- }
1961
-
1962
- /** @internal */
1963
- export const RequestBodyJsonSchema$inboundSchema: z.ZodType<
1964
- RequestBodyJsonSchema,
1965
- z.ZodTypeDef,
1966
- unknown
1967
- > = z.object({
1968
- name: z.string(),
1969
- description: z.string(),
1970
- schema: z.lazy(() => RequestBodySchema$inboundSchema),
1971
- strict: z.boolean().optional(),
1972
- });
1973
- /** @internal */
1974
- export type RequestBodyJsonSchema$Outbound = {
1975
- name: string;
1976
- description: string;
1977
- schema: RequestBodySchema$Outbound;
1978
- strict?: boolean | undefined;
1979
- };
1980
-
1981
- /** @internal */
1982
- export const RequestBodyJsonSchema$outboundSchema: z.ZodType<
1983
- RequestBodyJsonSchema$Outbound,
1984
- z.ZodTypeDef,
1985
- RequestBodyJsonSchema
1986
- > = z.object({
1987
- name: z.string(),
1988
- description: z.string(),
1989
- schema: z.lazy(() => RequestBodySchema$outboundSchema),
1990
- strict: z.boolean().optional(),
1991
- });
1992
-
1993
- export function requestBodyJsonSchemaToJSON(
1994
- requestBodyJsonSchema: RequestBodyJsonSchema,
1995
- ): string {
1996
- return JSON.stringify(
1997
- RequestBodyJsonSchema$outboundSchema.parse(requestBodyJsonSchema),
1998
- );
1999
- }
2000
- export function requestBodyJsonSchemaFromJSON(
2001
- jsonString: string,
2002
- ): SafeParseResult<RequestBodyJsonSchema, SDKValidationError> {
2003
- return safeParse(
2004
- jsonString,
2005
- (x) => RequestBodyJsonSchema$inboundSchema.parse(JSON.parse(x)),
2006
- `Failed to parse 'RequestBodyJsonSchema' from JSON`,
2007
- );
2008
- }
2009
-
2010
- /** @internal */
2011
- export const JSONSchemaTool$inboundSchema: z.ZodType<
2012
- JSONSchemaTool,
2013
- z.ZodTypeDef,
2014
- unknown
2015
- > = z.object({
2016
- path: z.string(),
2017
- key: z.string(),
2018
- display_name: z.string().optional(),
2019
- description: z.string(),
2020
- status: RequestBodyStatus$inboundSchema.default("live"),
2021
- type: z.literal("json_schema"),
2022
- json_schema: z.lazy(() => RequestBodyJsonSchema$inboundSchema),
2023
- }).transform((v) => {
2024
- return remap$(v, {
2025
- "display_name": "displayName",
2026
- "json_schema": "jsonSchema",
2027
- });
2028
- });
2029
- /** @internal */
2030
- export type JSONSchemaTool$Outbound = {
2031
- path: string;
2032
- key: string;
2033
- display_name?: string | undefined;
2034
- description: string;
2035
- status: string;
2036
- type: "json_schema";
2037
- json_schema: RequestBodyJsonSchema$Outbound;
2038
- };
2039
-
2040
- /** @internal */
2041
- export const JSONSchemaTool$outboundSchema: z.ZodType<
2042
- JSONSchemaTool$Outbound,
2043
- z.ZodTypeDef,
2044
- JSONSchemaTool
2045
- > = z.object({
2046
- path: z.string(),
2047
- key: z.string(),
2048
- displayName: z.string().optional(),
2049
- description: z.string(),
2050
- status: RequestBodyStatus$outboundSchema.default("live"),
2051
- type: z.literal("json_schema"),
2052
- jsonSchema: z.lazy(() => RequestBodyJsonSchema$outboundSchema),
2053
- }).transform((v) => {
2054
- return remap$(v, {
2055
- displayName: "display_name",
2056
- jsonSchema: "json_schema",
2057
- });
2058
- });
2059
-
2060
- export function jsonSchemaToolToJSON(jsonSchemaTool: JSONSchemaTool): string {
2061
- return JSON.stringify(JSONSchemaTool$outboundSchema.parse(jsonSchemaTool));
2062
- }
2063
- export function jsonSchemaToolFromJSON(
2064
- jsonString: string,
2065
- ): SafeParseResult<JSONSchemaTool, SDKValidationError> {
2066
- return safeParse(
2067
- jsonString,
2068
- (x) => JSONSchemaTool$inboundSchema.parse(JSON.parse(x)),
2069
- `Failed to parse 'JSONSchemaTool' from JSON`,
2070
- );
2071
- }
2072
-
2073
- /** @internal */
2074
- export const CreateToolRequestBodyToolsRequest1Status$inboundSchema:
2075
- z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest1Status> = z
2076
- .nativeEnum(CreateToolRequestBodyToolsRequest1Status);
2077
- /** @internal */
2078
- export const CreateToolRequestBodyToolsRequest1Status$outboundSchema:
2079
- z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest1Status> =
2080
- CreateToolRequestBodyToolsRequest1Status$inboundSchema;
2081
-
2082
- /** @internal */
2083
- export const CreateToolRequestBodyToolsRequest1Type$inboundSchema:
2084
- z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest1Type> = z.nativeEnum(
2085
- CreateToolRequestBodyToolsRequest1Type,
2086
- );
2087
- /** @internal */
2088
- export const CreateToolRequestBodyToolsRequest1Type$outboundSchema:
2089
- z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest1Type> =
2090
- CreateToolRequestBodyToolsRequest1Type$inboundSchema;
2091
-
2092
- /** @internal */
2093
- export const RequestBodyParameters$inboundSchema: z.ZodType<
2094
- RequestBodyParameters,
2095
- z.ZodTypeDef,
2096
- unknown
2097
- > = collectExtraKeys$(
2098
- z.object({
2099
- type: CreateToolRequestBodyToolsRequest1Type$inboundSchema,
2100
- properties: z.record(z.any()),
2101
- required: z.array(z.string()),
2102
- }).catchall(z.any()),
2103
- "additionalProperties",
2104
- true,
2105
- );
2106
- /** @internal */
2107
- export type RequestBodyParameters$Outbound = {
2108
- type: string;
2109
- properties: { [k: string]: any };
2110
- required: Array<string>;
2111
- [additionalProperties: string]: unknown;
2112
- };
2113
-
2114
- /** @internal */
2115
- export const RequestBodyParameters$outboundSchema: z.ZodType<
2116
- RequestBodyParameters$Outbound,
2117
- z.ZodTypeDef,
2118
- RequestBodyParameters
2119
- > = z.object({
2120
- type: CreateToolRequestBodyToolsRequest1Type$outboundSchema,
2121
- properties: z.record(z.any()),
2122
- required: z.array(z.string()),
2123
- additionalProperties: z.record(z.any()).optional(),
2124
- }).transform((v) => {
2125
- return {
2126
- ...v.additionalProperties,
2127
- ...remap$(v, {
2128
- additionalProperties: null,
2129
- }),
2130
- };
2131
- });
2132
-
2133
- export function requestBodyParametersToJSON(
2134
- requestBodyParameters: RequestBodyParameters,
2135
- ): string {
2136
- return JSON.stringify(
2137
- RequestBodyParameters$outboundSchema.parse(requestBodyParameters),
2138
- );
2139
- }
2140
- export function requestBodyParametersFromJSON(
2141
- jsonString: string,
2142
- ): SafeParseResult<RequestBodyParameters, SDKValidationError> {
2143
- return safeParse(
2144
- jsonString,
2145
- (x) => RequestBodyParameters$inboundSchema.parse(JSON.parse(x)),
2146
- `Failed to parse 'RequestBodyParameters' from JSON`,
2147
- );
2148
- }
2149
-
2150
- /** @internal */
2151
- export const RequestBodyFunction$inboundSchema: z.ZodType<
2152
- RequestBodyFunction,
2153
- z.ZodTypeDef,
2154
- unknown
2155
- > = z.object({
2156
- name: z.string(),
2157
- description: z.string().optional(),
2158
- strict: z.boolean().optional(),
2159
- parameters: z.lazy(() => RequestBodyParameters$inboundSchema).optional(),
2160
- });
2161
- /** @internal */
2162
- export type RequestBodyFunction$Outbound = {
2163
- name: string;
2164
- description?: string | undefined;
2165
- strict?: boolean | undefined;
2166
- parameters?: RequestBodyParameters$Outbound | undefined;
2167
- };
2168
-
2169
- /** @internal */
2170
- export const RequestBodyFunction$outboundSchema: z.ZodType<
2171
- RequestBodyFunction$Outbound,
2172
- z.ZodTypeDef,
2173
- RequestBodyFunction
2174
- > = z.object({
2175
- name: z.string(),
2176
- description: z.string().optional(),
2177
- strict: z.boolean().optional(),
2178
- parameters: z.lazy(() => RequestBodyParameters$outboundSchema).optional(),
2179
- });
2180
-
2181
- export function requestBodyFunctionToJSON(
2182
- requestBodyFunction: RequestBodyFunction,
2183
- ): string {
2184
- return JSON.stringify(
2185
- RequestBodyFunction$outboundSchema.parse(requestBodyFunction),
2186
- );
2187
- }
2188
- export function requestBodyFunctionFromJSON(
2189
- jsonString: string,
2190
- ): SafeParseResult<RequestBodyFunction, SDKValidationError> {
2191
- return safeParse(
2192
- jsonString,
2193
- (x) => RequestBodyFunction$inboundSchema.parse(JSON.parse(x)),
2194
- `Failed to parse 'RequestBodyFunction' from JSON`,
2195
- );
2196
- }
2197
-
2198
- /** @internal */
2199
- export const RequestBodyFunctionTool$inboundSchema: z.ZodType<
2200
- RequestBodyFunctionTool,
2201
- z.ZodTypeDef,
2202
- unknown
2203
- > = z.object({
2204
- path: z.string(),
2205
- key: z.string(),
2206
- display_name: z.string().optional(),
2207
- description: z.string(),
2208
- status: CreateToolRequestBodyToolsRequest1Status$inboundSchema.default(
2209
- "live",
2210
- ),
2211
- type: z.literal("function"),
2212
- function: z.lazy(() => RequestBodyFunction$inboundSchema),
2213
- }).transform((v) => {
2214
- return remap$(v, {
2215
- "display_name": "displayName",
2216
- });
2217
- });
2218
- /** @internal */
2219
- export type RequestBodyFunctionTool$Outbound = {
2220
- path: string;
2221
- key: string;
2222
- display_name?: string | undefined;
2223
- description: string;
2224
- status: string;
2225
- type: "function";
2226
- function: RequestBodyFunction$Outbound;
2227
- };
2228
-
2229
- /** @internal */
2230
- export const RequestBodyFunctionTool$outboundSchema: z.ZodType<
2231
- RequestBodyFunctionTool$Outbound,
2232
- z.ZodTypeDef,
2233
- RequestBodyFunctionTool
2234
- > = z.object({
2235
- path: z.string(),
2236
- key: z.string(),
2237
- displayName: z.string().optional(),
2238
- description: z.string(),
2239
- status: CreateToolRequestBodyToolsRequest1Status$outboundSchema.default(
2240
- "live",
2241
- ),
2242
- type: z.literal("function"),
2243
- function: z.lazy(() => RequestBodyFunction$outboundSchema),
2244
- }).transform((v) => {
2245
- return remap$(v, {
2246
- displayName: "display_name",
2247
- });
2248
- });
2249
-
2250
- export function requestBodyFunctionToolToJSON(
2251
- requestBodyFunctionTool: RequestBodyFunctionTool,
2252
- ): string {
2253
- return JSON.stringify(
2254
- RequestBodyFunctionTool$outboundSchema.parse(requestBodyFunctionTool),
2255
- );
2256
- }
2257
- export function requestBodyFunctionToolFromJSON(
2258
- jsonString: string,
2259
- ): SafeParseResult<RequestBodyFunctionTool, SDKValidationError> {
2260
- return safeParse(
2261
- jsonString,
2262
- (x) => RequestBodyFunctionTool$inboundSchema.parse(JSON.parse(x)),
2263
- `Failed to parse 'RequestBodyFunctionTool' from JSON`,
2264
- );
2265
- }
2266
-
2267
- /** @internal */
2268
- export const CreateToolRequestBody$inboundSchema: z.ZodType<
2269
- CreateToolRequestBody,
2270
- z.ZodTypeDef,
2271
- unknown
2272
- > = z.union([
2273
- z.lazy(() => RequestBodyFunctionTool$inboundSchema),
2274
- z.lazy(() => JSONSchemaTool$inboundSchema),
2275
- z.lazy(() => RequestBodyHTTPTool$inboundSchema),
2276
- z.lazy(() => RequestBodyMCPTool$inboundSchema),
2277
- z.lazy(() => RequestBodyCodeExecutionTool$inboundSchema),
2278
- ]);
2279
- /** @internal */
2280
- export type CreateToolRequestBody$Outbound =
2281
- | RequestBodyFunctionTool$Outbound
2282
- | JSONSchemaTool$Outbound
2283
- | RequestBodyHTTPTool$Outbound
2284
- | RequestBodyMCPTool$Outbound
2285
- | RequestBodyCodeExecutionTool$Outbound;
2286
-
2287
- /** @internal */
2288
- export const CreateToolRequestBody$outboundSchema: z.ZodType<
2289
- CreateToolRequestBody$Outbound,
2290
- z.ZodTypeDef,
2291
- CreateToolRequestBody
2292
- > = z.union([
2293
- z.lazy(() => RequestBodyFunctionTool$outboundSchema),
2294
- z.lazy(() => JSONSchemaTool$outboundSchema),
2295
- z.lazy(() => RequestBodyHTTPTool$outboundSchema),
2296
- z.lazy(() => RequestBodyMCPTool$outboundSchema),
2297
- z.lazy(() => RequestBodyCodeExecutionTool$outboundSchema),
2298
- ]);
2299
-
2300
- export function createToolRequestBodyToJSON(
2301
- createToolRequestBody: CreateToolRequestBody,
2302
- ): string {
2303
- return JSON.stringify(
2304
- CreateToolRequestBody$outboundSchema.parse(createToolRequestBody),
2305
- );
2306
- }
2307
- export function createToolRequestBodyFromJSON(
2308
- jsonString: string,
2309
- ): SafeParseResult<CreateToolRequestBody, SDKValidationError> {
2310
- return safeParse(
2311
- jsonString,
2312
- (x) => CreateToolRequestBody$inboundSchema.parse(JSON.parse(x)),
2313
- `Failed to parse 'CreateToolRequestBody' from JSON`,
2314
- );
2315
- }
2316
-
2317
- /** @internal */
2318
- export const CreateToolResponseBodyToolsResponse200Status$inboundSchema:
2319
- z.ZodNativeEnum<typeof CreateToolResponseBodyToolsResponse200Status> = z
2320
- .nativeEnum(CreateToolResponseBodyToolsResponse200Status);
2321
- /** @internal */
2322
- export const CreateToolResponseBodyToolsResponse200Status$outboundSchema:
2323
- z.ZodNativeEnum<typeof CreateToolResponseBodyToolsResponse200Status> =
2324
- CreateToolResponseBodyToolsResponse200Status$inboundSchema;
2325
-
2326
- /** @internal */
2327
- export const CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema:
2328
- z.ZodNativeEnum<
2329
- typeof CreateToolResponseBodyToolsResponse200ApplicationJson5Type
2330
- > = z.nativeEnum(CreateToolResponseBodyToolsResponse200ApplicationJson5Type);
2331
- /** @internal */
2332
- export const CreateToolResponseBodyToolsResponse200ApplicationJson5Type$outboundSchema:
2333
- z.ZodNativeEnum<
2334
- typeof CreateToolResponseBodyToolsResponse200ApplicationJson5Type
2335
- > = CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema;
2336
-
2337
- /** @internal */
2338
- export const CreateToolResponseBodyParameters$inboundSchema: z.ZodType<
2339
- CreateToolResponseBodyParameters,
2340
- z.ZodTypeDef,
2341
- unknown
2342
- > = collectExtraKeys$(
2343
- z.object({
2344
- type:
2345
- CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema,
2346
- properties: z.record(z.any()),
2347
- required: z.array(z.string()),
2348
- }).catchall(z.any()),
2349
- "additionalProperties",
2350
- true,
2351
- );
2352
- /** @internal */
2353
- export type CreateToolResponseBodyParameters$Outbound = {
2354
- type: string;
2355
- properties: { [k: string]: any };
2356
- required: Array<string>;
2357
- [additionalProperties: string]: unknown;
2358
- };
2359
-
2360
- /** @internal */
2361
- export const CreateToolResponseBodyParameters$outboundSchema: z.ZodType<
2362
- CreateToolResponseBodyParameters$Outbound,
2363
- z.ZodTypeDef,
2364
- CreateToolResponseBodyParameters
2365
- > = z.object({
2366
- type:
2367
- CreateToolResponseBodyToolsResponse200ApplicationJson5Type$outboundSchema,
2368
- properties: z.record(z.any()),
2369
- required: z.array(z.string()),
2370
- additionalProperties: z.record(z.any()).optional(),
2371
- }).transform((v) => {
2372
- return {
2373
- ...v.additionalProperties,
2374
- ...remap$(v, {
2375
- additionalProperties: null,
2376
- }),
2377
- };
2378
- });
2379
-
2380
- export function createToolResponseBodyParametersToJSON(
2381
- createToolResponseBodyParameters: CreateToolResponseBodyParameters,
2382
- ): string {
2383
- return JSON.stringify(
2384
- CreateToolResponseBodyParameters$outboundSchema.parse(
2385
- createToolResponseBodyParameters,
2386
- ),
2387
- );
2388
- }
2389
- export function createToolResponseBodyParametersFromJSON(
2390
- jsonString: string,
2391
- ): SafeParseResult<CreateToolResponseBodyParameters, SDKValidationError> {
2392
- return safeParse(
2393
- jsonString,
2394
- (x) => CreateToolResponseBodyParameters$inboundSchema.parse(JSON.parse(x)),
2395
- `Failed to parse 'CreateToolResponseBodyParameters' from JSON`,
2396
- );
2397
- }
2398
-
2399
- /** @internal */
2400
- export const ResponseBodyLanguage$inboundSchema: z.ZodNativeEnum<
2401
- typeof ResponseBodyLanguage
2402
- > = z.nativeEnum(ResponseBodyLanguage);
2403
- /** @internal */
2404
- export const ResponseBodyLanguage$outboundSchema: z.ZodNativeEnum<
2405
- typeof ResponseBodyLanguage
2406
- > = ResponseBodyLanguage$inboundSchema;
2407
-
2408
- /** @internal */
2409
- export const ResponseBodyCodeTool$inboundSchema: z.ZodType<
2410
- ResponseBodyCodeTool,
2411
- z.ZodTypeDef,
2412
- unknown
2413
- > = z.object({
2414
- parameters: z.lazy(() => CreateToolResponseBodyParameters$inboundSchema)
2415
- .optional(),
2416
- language: ResponseBodyLanguage$inboundSchema,
2417
- code: z.string(),
2418
- });
2419
- /** @internal */
2420
- export type ResponseBodyCodeTool$Outbound = {
2421
- parameters?: CreateToolResponseBodyParameters$Outbound | undefined;
2422
- language: string;
2423
- code: string;
2424
- };
2425
-
2426
- /** @internal */
2427
- export const ResponseBodyCodeTool$outboundSchema: z.ZodType<
2428
- ResponseBodyCodeTool$Outbound,
2429
- z.ZodTypeDef,
2430
- ResponseBodyCodeTool
2431
- > = z.object({
2432
- parameters: z.lazy(() => CreateToolResponseBodyParameters$outboundSchema)
2433
- .optional(),
2434
- language: ResponseBodyLanguage$outboundSchema,
2435
- code: z.string(),
2436
- });
2437
-
2438
- export function responseBodyCodeToolToJSON(
2439
- responseBodyCodeTool: ResponseBodyCodeTool,
2440
- ): string {
2441
- return JSON.stringify(
2442
- ResponseBodyCodeTool$outboundSchema.parse(responseBodyCodeTool),
2443
- );
2444
- }
2445
- export function responseBodyCodeToolFromJSON(
2446
- jsonString: string,
2447
- ): SafeParseResult<ResponseBodyCodeTool, SDKValidationError> {
2448
- return safeParse(
2449
- jsonString,
2450
- (x) => ResponseBodyCodeTool$inboundSchema.parse(JSON.parse(x)),
2451
- `Failed to parse 'ResponseBodyCodeTool' from JSON`,
2452
- );
2453
- }
2454
-
2455
- /** @internal */
2456
- export const ResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
2457
- ResponseBodyCodeExecutionTool,
2458
- z.ZodTypeDef,
2459
- unknown
2460
- > = z.object({
2461
- _id: z.string().default("tool_01KE6FM16GVVES7SEKP0NFQFVR"),
2462
- path: z.string(),
2463
- key: z.string(),
2464
- display_name: z.string().optional(),
2465
- description: z.string(),
2466
- created_by_id: z.string().optional(),
2467
- updated_by_id: z.string().optional(),
2468
- project_id: z.string(),
2469
- workspace_id: z.string(),
2470
- created: z.string(),
2471
- updated: z.string(),
2472
- status: CreateToolResponseBodyToolsResponse200Status$inboundSchema.default(
2473
- "live",
2474
- ),
2475
- version_hash: z.string().optional(),
2476
- type: z.literal("code"),
2477
- code_tool: z.lazy(() => ResponseBodyCodeTool$inboundSchema),
2478
- }).transform((v) => {
2479
- return remap$(v, {
2480
- "_id": "id",
2481
- "display_name": "displayName",
2482
- "created_by_id": "createdById",
2483
- "updated_by_id": "updatedById",
2484
- "project_id": "projectId",
2485
- "workspace_id": "workspaceId",
2486
- "version_hash": "versionHash",
2487
- "code_tool": "codeTool",
2488
- });
2489
- });
2490
- /** @internal */
2491
- export type ResponseBodyCodeExecutionTool$Outbound = {
2492
- _id: string;
2493
- path: string;
2494
- key: string;
2495
- display_name?: string | undefined;
2496
- description: string;
2497
- created_by_id?: string | undefined;
2498
- updated_by_id?: string | undefined;
2499
- project_id: string;
2500
- workspace_id: string;
2501
- created: string;
2502
- updated: string;
2503
- status: string;
2504
- version_hash?: string | undefined;
2505
- type: "code";
2506
- code_tool: ResponseBodyCodeTool$Outbound;
2507
- };
2508
-
2509
- /** @internal */
2510
- export const ResponseBodyCodeExecutionTool$outboundSchema: z.ZodType<
2511
- ResponseBodyCodeExecutionTool$Outbound,
2512
- z.ZodTypeDef,
2513
- ResponseBodyCodeExecutionTool
2514
- > = z.object({
2515
- id: z.string().default("tool_01KE6FM16GVVES7SEKP0NFQFVR"),
2516
- path: z.string(),
2517
- key: z.string(),
2518
- displayName: z.string().optional(),
2519
- description: z.string(),
2520
- createdById: z.string().optional(),
2521
- updatedById: z.string().optional(),
2522
- projectId: z.string(),
2523
- workspaceId: z.string(),
2524
- created: z.string(),
2525
- updated: z.string(),
2526
- status: CreateToolResponseBodyToolsResponse200Status$outboundSchema.default(
2527
- "live",
2528
- ),
2529
- versionHash: z.string().optional(),
2530
- type: z.literal("code"),
2531
- codeTool: z.lazy(() => ResponseBodyCodeTool$outboundSchema),
2532
- }).transform((v) => {
2533
- return remap$(v, {
2534
- id: "_id",
2535
- displayName: "display_name",
2536
- createdById: "created_by_id",
2537
- updatedById: "updated_by_id",
2538
- projectId: "project_id",
2539
- workspaceId: "workspace_id",
2540
- versionHash: "version_hash",
2541
- codeTool: "code_tool",
2542
- });
2543
- });
2544
-
2545
- export function responseBodyCodeExecutionToolToJSON(
2546
- responseBodyCodeExecutionTool: ResponseBodyCodeExecutionTool,
2547
- ): string {
2548
- return JSON.stringify(
2549
- ResponseBodyCodeExecutionTool$outboundSchema.parse(
2550
- responseBodyCodeExecutionTool,
2551
- ),
2552
- );
2553
- }
2554
- export function responseBodyCodeExecutionToolFromJSON(
2555
- jsonString: string,
2556
- ): SafeParseResult<ResponseBodyCodeExecutionTool, SDKValidationError> {
2557
- return safeParse(
2558
- jsonString,
2559
- (x) => ResponseBodyCodeExecutionTool$inboundSchema.parse(JSON.parse(x)),
2560
- `Failed to parse 'ResponseBodyCodeExecutionTool' from JSON`,
2561
- );
2562
- }
2563
-
2564
- /** @internal */
2565
- export const CreateToolResponseBodyToolsResponseStatus$inboundSchema:
2566
- z.ZodNativeEnum<typeof CreateToolResponseBodyToolsResponseStatus> = z
2567
- .nativeEnum(CreateToolResponseBodyToolsResponseStatus);
2568
- /** @internal */
2569
- export const CreateToolResponseBodyToolsResponseStatus$outboundSchema:
2570
- z.ZodNativeEnum<typeof CreateToolResponseBodyToolsResponseStatus> =
2571
- CreateToolResponseBodyToolsResponseStatus$inboundSchema;
2572
-
2573
- /** @internal */
2574
- export const ResponseBodyHeaders$inboundSchema: z.ZodType<
2575
- ResponseBodyHeaders,
2576
- z.ZodTypeDef,
2577
- unknown
2578
- > = z.object({
2579
- value: z.string(),
2580
- encrypted: z.boolean().default(false),
2581
- });
2582
- /** @internal */
2583
- export type ResponseBodyHeaders$Outbound = {
2584
- value: string;
2585
- encrypted: boolean;
2586
- };
2587
-
2588
- /** @internal */
2589
- export const ResponseBodyHeaders$outboundSchema: z.ZodType<
2590
- ResponseBodyHeaders$Outbound,
2591
- z.ZodTypeDef,
2592
- ResponseBodyHeaders
2593
- > = z.object({
2594
- value: z.string(),
2595
- encrypted: z.boolean().default(false),
2596
- });
2597
-
2598
- export function responseBodyHeadersToJSON(
2599
- responseBodyHeaders: ResponseBodyHeaders,
2600
- ): string {
2601
- return JSON.stringify(
2602
- ResponseBodyHeaders$outboundSchema.parse(responseBodyHeaders),
2603
- );
2604
- }
2605
- export function responseBodyHeadersFromJSON(
2606
- jsonString: string,
2607
- ): SafeParseResult<ResponseBodyHeaders, SDKValidationError> {
2608
- return safeParse(
2609
- jsonString,
2610
- (x) => ResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)),
2611
- `Failed to parse 'ResponseBodyHeaders' from JSON`,
2612
- );
2613
- }
2614
-
2615
- /** @internal */
2616
- export const CreateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema:
2617
- z.ZodNativeEnum<
2618
- typeof CreateToolResponseBodyToolsResponse200ApplicationJson4Type
2619
- > = z.nativeEnum(CreateToolResponseBodyToolsResponse200ApplicationJson4Type);
2620
- /** @internal */
2621
- export const CreateToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema:
2622
- z.ZodNativeEnum<
2623
- typeof CreateToolResponseBodyToolsResponse200ApplicationJson4Type
2624
- > = CreateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema;
2625
-
2626
- /** @internal */
2627
- export const CreateToolResponseBodySchema$inboundSchema: z.ZodType<
2628
- CreateToolResponseBodySchema,
2629
- z.ZodTypeDef,
2630
- unknown
2631
- > = z.object({
2632
- type:
2633
- CreateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema,
2634
- properties: z.record(z.any()).optional(),
2635
- required: z.array(z.string()).optional(),
2636
- });
2637
- /** @internal */
2638
- export type CreateToolResponseBodySchema$Outbound = {
2639
- type: string;
2640
- properties?: { [k: string]: any } | undefined;
2641
- required?: Array<string> | undefined;
2642
- };
2643
-
2644
- /** @internal */
2645
- export const CreateToolResponseBodySchema$outboundSchema: z.ZodType<
2646
- CreateToolResponseBodySchema$Outbound,
2647
- z.ZodTypeDef,
2648
- CreateToolResponseBodySchema
2649
- > = z.object({
2650
- type:
2651
- CreateToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema,
2652
- properties: z.record(z.any()).optional(),
2653
- required: z.array(z.string()).optional(),
2654
- });
2655
-
2656
- export function createToolResponseBodySchemaToJSON(
2657
- createToolResponseBodySchema: CreateToolResponseBodySchema,
2658
- ): string {
2659
- return JSON.stringify(
2660
- CreateToolResponseBodySchema$outboundSchema.parse(
2661
- createToolResponseBodySchema,
2662
- ),
2663
- );
2664
- }
2665
- export function createToolResponseBodySchemaFromJSON(
2666
- jsonString: string,
2667
- ): SafeParseResult<CreateToolResponseBodySchema, SDKValidationError> {
2668
- return safeParse(
2669
- jsonString,
2670
- (x) => CreateToolResponseBodySchema$inboundSchema.parse(JSON.parse(x)),
2671
- `Failed to parse 'CreateToolResponseBodySchema' from JSON`,
2672
- );
2673
- }
2674
-
2675
- /** @internal */
2676
- export const ResponseBodyTools$inboundSchema: z.ZodType<
2677
- ResponseBodyTools,
2678
- z.ZodTypeDef,
2679
- unknown
2680
- > = z.object({
2681
- id: z.string().default("01KE6FM16GGSFEV2T7K3T5S5BF"),
2682
- name: z.string(),
2683
- description: z.string().optional(),
2684
- schema: z.lazy(() => CreateToolResponseBodySchema$inboundSchema),
2685
- });
2686
- /** @internal */
2687
- export type ResponseBodyTools$Outbound = {
2688
- id: string;
2689
- name: string;
2690
- description?: string | undefined;
2691
- schema: CreateToolResponseBodySchema$Outbound;
2692
- };
2693
-
2694
- /** @internal */
2695
- export const ResponseBodyTools$outboundSchema: z.ZodType<
2696
- ResponseBodyTools$Outbound,
2697
- z.ZodTypeDef,
2698
- ResponseBodyTools
2699
- > = z.object({
2700
- id: z.string().default("01KE6FM16GGSFEV2T7K3T5S5BF"),
2701
- name: z.string(),
2702
- description: z.string().optional(),
2703
- schema: z.lazy(() => CreateToolResponseBodySchema$outboundSchema),
2704
- });
2705
-
2706
- export function responseBodyToolsToJSON(
2707
- responseBodyTools: ResponseBodyTools,
2708
- ): string {
2709
- return JSON.stringify(
2710
- ResponseBodyTools$outboundSchema.parse(responseBodyTools),
2711
- );
2712
- }
2713
- export function responseBodyToolsFromJSON(
2714
- jsonString: string,
2715
- ): SafeParseResult<ResponseBodyTools, SDKValidationError> {
2716
- return safeParse(
2717
- jsonString,
2718
- (x) => ResponseBodyTools$inboundSchema.parse(JSON.parse(x)),
2719
- `Failed to parse 'ResponseBodyTools' from JSON`,
2720
- );
2721
- }
2722
-
2723
- /** @internal */
2724
- export const ResponseBodyConnectionType$inboundSchema: z.ZodNativeEnum<
2725
- typeof ResponseBodyConnectionType
2726
- > = z.nativeEnum(ResponseBodyConnectionType);
2727
- /** @internal */
2728
- export const ResponseBodyConnectionType$outboundSchema: z.ZodNativeEnum<
2729
- typeof ResponseBodyConnectionType
2730
- > = ResponseBodyConnectionType$inboundSchema;
2731
-
2732
- /** @internal */
2733
- export const ResponseBodyMcp$inboundSchema: z.ZodType<
2734
- ResponseBodyMcp,
2735
- z.ZodTypeDef,
2736
- unknown
2737
- > = z.object({
2738
- server_url: z.string(),
2739
- headers: z.record(z.lazy(() => ResponseBodyHeaders$inboundSchema)).optional(),
2740
- tools: z.array(z.lazy(() => ResponseBodyTools$inboundSchema)),
2741
- connection_type: ResponseBodyConnectionType$inboundSchema,
2742
- }).transform((v) => {
2743
- return remap$(v, {
2744
- "server_url": "serverUrl",
2745
- "connection_type": "connectionType",
2746
- });
2747
- });
2748
- /** @internal */
2749
- export type ResponseBodyMcp$Outbound = {
2750
- server_url: string;
2751
- headers?: { [k: string]: ResponseBodyHeaders$Outbound } | undefined;
2752
- tools: Array<ResponseBodyTools$Outbound>;
2753
- connection_type: string;
2754
- };
2755
-
2756
- /** @internal */
2757
- export const ResponseBodyMcp$outboundSchema: z.ZodType<
2758
- ResponseBodyMcp$Outbound,
2759
- z.ZodTypeDef,
2760
- ResponseBodyMcp
2761
- > = z.object({
2762
- serverUrl: z.string(),
2763
- headers: z.record(z.lazy(() => ResponseBodyHeaders$outboundSchema))
2764
- .optional(),
2765
- tools: z.array(z.lazy(() => ResponseBodyTools$outboundSchema)),
2766
- connectionType: ResponseBodyConnectionType$outboundSchema,
2767
- }).transform((v) => {
2768
- return remap$(v, {
2769
- serverUrl: "server_url",
2770
- connectionType: "connection_type",
2771
- });
2772
- });
2773
-
2774
- export function responseBodyMcpToJSON(
2775
- responseBodyMcp: ResponseBodyMcp,
2776
- ): string {
2777
- return JSON.stringify(ResponseBodyMcp$outboundSchema.parse(responseBodyMcp));
2778
- }
2779
- export function responseBodyMcpFromJSON(
2780
- jsonString: string,
2781
- ): SafeParseResult<ResponseBodyMcp, SDKValidationError> {
2782
- return safeParse(
2783
- jsonString,
2784
- (x) => ResponseBodyMcp$inboundSchema.parse(JSON.parse(x)),
2785
- `Failed to parse 'ResponseBodyMcp' from JSON`,
2786
- );
2787
- }
2788
-
2789
- /** @internal */
2790
- export const ResponseBodyMCPTool$inboundSchema: z.ZodType<
2791
- ResponseBodyMCPTool,
2792
- z.ZodTypeDef,
2793
- unknown
2794
- > = z.object({
2795
- _id: z.string().default("tool_01KE6FM16FRMRWNXN85C05R5SM"),
2796
- path: z.string(),
2797
- key: z.string(),
2798
- display_name: z.string().optional(),
2799
- description: z.string(),
2800
- created_by_id: z.string().optional(),
2801
- updated_by_id: z.string().optional(),
2802
- project_id: z.string(),
2803
- workspace_id: z.string(),
2804
- created: z.string(),
2805
- updated: z.string(),
2806
- status: CreateToolResponseBodyToolsResponseStatus$inboundSchema.default(
2807
- "live",
2808
- ),
2809
- version_hash: z.string().optional(),
2810
- type: z.literal("mcp"),
2811
- mcp: z.lazy(() => ResponseBodyMcp$inboundSchema),
2812
- }).transform((v) => {
2813
- return remap$(v, {
2814
- "_id": "id",
2815
- "display_name": "displayName",
2816
- "created_by_id": "createdById",
2817
- "updated_by_id": "updatedById",
2818
- "project_id": "projectId",
2819
- "workspace_id": "workspaceId",
2820
- "version_hash": "versionHash",
2821
- });
2822
- });
2823
- /** @internal */
2824
- export type ResponseBodyMCPTool$Outbound = {
2825
- _id: string;
2826
- path: string;
2827
- key: string;
2828
- display_name?: string | undefined;
2829
- description: string;
2830
- created_by_id?: string | undefined;
2831
- updated_by_id?: string | undefined;
2832
- project_id: string;
2833
- workspace_id: string;
2834
- created: string;
2835
- updated: string;
2836
- status: string;
2837
- version_hash?: string | undefined;
2838
- type: "mcp";
2839
- mcp: ResponseBodyMcp$Outbound;
2840
- };
2841
-
2842
- /** @internal */
2843
- export const ResponseBodyMCPTool$outboundSchema: z.ZodType<
2844
- ResponseBodyMCPTool$Outbound,
2845
- z.ZodTypeDef,
2846
- ResponseBodyMCPTool
2847
- > = z.object({
2848
- id: z.string().default("tool_01KE6FM16FRMRWNXN85C05R5SM"),
2849
- path: z.string(),
2850
- key: z.string(),
2851
- displayName: z.string().optional(),
2852
- description: z.string(),
2853
- createdById: z.string().optional(),
2854
- updatedById: z.string().optional(),
2855
- projectId: z.string(),
2856
- workspaceId: z.string(),
2857
- created: z.string(),
2858
- updated: z.string(),
2859
- status: CreateToolResponseBodyToolsResponseStatus$outboundSchema.default(
2860
- "live",
2861
- ),
2862
- versionHash: z.string().optional(),
2863
- type: z.literal("mcp"),
2864
- mcp: z.lazy(() => ResponseBodyMcp$outboundSchema),
2865
- }).transform((v) => {
2866
- return remap$(v, {
2867
- id: "_id",
2868
- displayName: "display_name",
2869
- createdById: "created_by_id",
2870
- updatedById: "updated_by_id",
2871
- projectId: "project_id",
2872
- workspaceId: "workspace_id",
2873
- versionHash: "version_hash",
2874
- });
2875
- });
2876
-
2877
- export function responseBodyMCPToolToJSON(
2878
- responseBodyMCPTool: ResponseBodyMCPTool,
2879
- ): string {
2880
- return JSON.stringify(
2881
- ResponseBodyMCPTool$outboundSchema.parse(responseBodyMCPTool),
2882
- );
2883
- }
2884
- export function responseBodyMCPToolFromJSON(
2885
- jsonString: string,
2886
- ): SafeParseResult<ResponseBodyMCPTool, SDKValidationError> {
2887
- return safeParse(
2888
- jsonString,
2889
- (x) => ResponseBodyMCPTool$inboundSchema.parse(JSON.parse(x)),
2890
- `Failed to parse 'ResponseBodyMCPTool' from JSON`,
2891
- );
2892
- }
2893
-
2894
- /** @internal */
2895
- export const CreateToolResponseBodyToolsStatus$inboundSchema: z.ZodNativeEnum<
2896
- typeof CreateToolResponseBodyToolsStatus
2897
- > = z.nativeEnum(CreateToolResponseBodyToolsStatus);
2898
- /** @internal */
2899
- export const CreateToolResponseBodyToolsStatus$outboundSchema: z.ZodNativeEnum<
2900
- typeof CreateToolResponseBodyToolsStatus
2901
- > = CreateToolResponseBodyToolsStatus$inboundSchema;
2902
-
2903
- /** @internal */
2904
- export const CreateToolResponseBodyMethod$inboundSchema: z.ZodNativeEnum<
2905
- typeof CreateToolResponseBodyMethod
2906
- > = z.nativeEnum(CreateToolResponseBodyMethod);
2907
- /** @internal */
2908
- export const CreateToolResponseBodyMethod$outboundSchema: z.ZodNativeEnum<
2909
- typeof CreateToolResponseBodyMethod
2910
- > = CreateToolResponseBodyMethod$inboundSchema;
2911
-
2912
- /** @internal */
2913
- export const CreateToolHeadersTools2$inboundSchema: z.ZodType<
2914
- CreateToolHeadersTools2,
2915
- z.ZodTypeDef,
2916
- unknown
2917
- > = z.object({
2918
- value: z.string(),
2919
- encrypted: z.boolean().default(false),
2920
- });
2921
- /** @internal */
2922
- export type CreateToolHeadersTools2$Outbound = {
2923
- value: string;
2924
- encrypted: boolean;
2925
- };
2926
-
2927
- /** @internal */
2928
- export const CreateToolHeadersTools2$outboundSchema: z.ZodType<
2929
- CreateToolHeadersTools2$Outbound,
2930
- z.ZodTypeDef,
2931
- CreateToolHeadersTools2
2932
- > = z.object({
2933
- value: z.string(),
2934
- encrypted: z.boolean().default(false),
2935
- });
2936
-
2937
- export function createToolHeadersTools2ToJSON(
2938
- createToolHeadersTools2: CreateToolHeadersTools2,
2939
- ): string {
2940
- return JSON.stringify(
2941
- CreateToolHeadersTools2$outboundSchema.parse(createToolHeadersTools2),
2942
- );
2943
- }
2944
- export function createToolHeadersTools2FromJSON(
2945
- jsonString: string,
2946
- ): SafeParseResult<CreateToolHeadersTools2, SDKValidationError> {
2947
- return safeParse(
2948
- jsonString,
2949
- (x) => CreateToolHeadersTools2$inboundSchema.parse(JSON.parse(x)),
2950
- `Failed to parse 'CreateToolHeadersTools2' from JSON`,
2951
- );
2952
- }
2953
-
2954
- /** @internal */
2955
- export const CreateToolResponseBodyHeaders$inboundSchema: z.ZodType<
2956
- CreateToolResponseBodyHeaders,
2957
- z.ZodTypeDef,
2958
- unknown
2959
- > = z.union([z.lazy(() => CreateToolHeadersTools2$inboundSchema), z.string()]);
2960
- /** @internal */
2961
- export type CreateToolResponseBodyHeaders$Outbound =
2962
- | CreateToolHeadersTools2$Outbound
2963
- | string;
2964
-
2965
- /** @internal */
2966
- export const CreateToolResponseBodyHeaders$outboundSchema: z.ZodType<
2967
- CreateToolResponseBodyHeaders$Outbound,
2968
- z.ZodTypeDef,
2969
- CreateToolResponseBodyHeaders
2970
- > = z.union([z.lazy(() => CreateToolHeadersTools2$outboundSchema), z.string()]);
2971
-
2972
- export function createToolResponseBodyHeadersToJSON(
2973
- createToolResponseBodyHeaders: CreateToolResponseBodyHeaders,
2974
- ): string {
2975
- return JSON.stringify(
2976
- CreateToolResponseBodyHeaders$outboundSchema.parse(
2977
- createToolResponseBodyHeaders,
2978
- ),
2979
- );
2980
- }
2981
- export function createToolResponseBodyHeadersFromJSON(
2982
- jsonString: string,
2983
- ): SafeParseResult<CreateToolResponseBodyHeaders, SDKValidationError> {
2984
- return safeParse(
2985
- jsonString,
2986
- (x) => CreateToolResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)),
2987
- `Failed to parse 'CreateToolResponseBodyHeaders' from JSON`,
2988
- );
2989
- }
2990
-
2991
- /** @internal */
2992
- export const ResponseBodyBlueprint$inboundSchema: z.ZodType<
2993
- ResponseBodyBlueprint,
2994
- z.ZodTypeDef,
2995
- unknown
2996
- > = z.object({
2997
- url: z.string(),
2998
- method: CreateToolResponseBodyMethod$inboundSchema,
2999
- headers: z.record(
3000
- z.union([z.lazy(() => CreateToolHeadersTools2$inboundSchema), z.string()]),
3001
- ).optional(),
3002
- body: z.record(z.any()).optional(),
3003
- });
3004
- /** @internal */
3005
- export type ResponseBodyBlueprint$Outbound = {
3006
- url: string;
3007
- method: string;
3008
- headers?:
3009
- | { [k: string]: CreateToolHeadersTools2$Outbound | string }
3010
- | undefined;
3011
- body?: { [k: string]: any } | undefined;
3012
- };
3013
-
3014
- /** @internal */
3015
- export const ResponseBodyBlueprint$outboundSchema: z.ZodType<
3016
- ResponseBodyBlueprint$Outbound,
3017
- z.ZodTypeDef,
3018
- ResponseBodyBlueprint
3019
- > = z.object({
3020
- url: z.string(),
3021
- method: CreateToolResponseBodyMethod$outboundSchema,
3022
- headers: z.record(
3023
- z.union([z.lazy(() => CreateToolHeadersTools2$outboundSchema), z.string()]),
3024
- ).optional(),
3025
- body: z.record(z.any()).optional(),
3026
- });
3027
-
3028
- export function responseBodyBlueprintToJSON(
3029
- responseBodyBlueprint: ResponseBodyBlueprint,
3030
- ): string {
3031
- return JSON.stringify(
3032
- ResponseBodyBlueprint$outboundSchema.parse(responseBodyBlueprint),
3033
- );
3034
- }
3035
- export function responseBodyBlueprintFromJSON(
3036
- jsonString: string,
3037
- ): SafeParseResult<ResponseBodyBlueprint, SDKValidationError> {
3038
- return safeParse(
3039
- jsonString,
3040
- (x) => ResponseBodyBlueprint$inboundSchema.parse(JSON.parse(x)),
3041
- `Failed to parse 'ResponseBodyBlueprint' from JSON`,
3042
- );
3043
- }
3044
-
3045
- /** @internal */
3046
- export const CreateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema:
3047
- z.ZodNativeEnum<
3048
- typeof CreateToolResponseBodyToolsResponse200ApplicationJson3Type
3049
- > = z.nativeEnum(CreateToolResponseBodyToolsResponse200ApplicationJson3Type);
3050
- /** @internal */
3051
- export const CreateToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema:
3052
- z.ZodNativeEnum<
3053
- typeof CreateToolResponseBodyToolsResponse200ApplicationJson3Type
3054
- > = CreateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema;
3055
-
3056
- /** @internal */
3057
- export const ResponseBodyDefaultValue$inboundSchema: z.ZodType<
3058
- ResponseBodyDefaultValue,
3059
- z.ZodTypeDef,
3060
- unknown
3061
- > = z.union([z.string(), z.number(), z.boolean()]);
3062
- /** @internal */
3063
- export type ResponseBodyDefaultValue$Outbound = string | number | boolean;
3064
-
3065
- /** @internal */
3066
- export const ResponseBodyDefaultValue$outboundSchema: z.ZodType<
3067
- ResponseBodyDefaultValue$Outbound,
3068
- z.ZodTypeDef,
3069
- ResponseBodyDefaultValue
3070
- > = z.union([z.string(), z.number(), z.boolean()]);
3071
-
3072
- export function responseBodyDefaultValueToJSON(
3073
- responseBodyDefaultValue: ResponseBodyDefaultValue,
3074
- ): string {
3075
- return JSON.stringify(
3076
- ResponseBodyDefaultValue$outboundSchema.parse(responseBodyDefaultValue),
3077
- );
3078
- }
3079
- export function responseBodyDefaultValueFromJSON(
3080
- jsonString: string,
3081
- ): SafeParseResult<ResponseBodyDefaultValue, SDKValidationError> {
3082
- return safeParse(
3083
- jsonString,
3084
- (x) => ResponseBodyDefaultValue$inboundSchema.parse(JSON.parse(x)),
3085
- `Failed to parse 'ResponseBodyDefaultValue' from JSON`,
3086
- );
3087
- }
3088
-
3089
- /** @internal */
3090
- export const ResponseBodyArguments$inboundSchema: z.ZodType<
3091
- ResponseBodyArguments,
3092
- z.ZodTypeDef,
3093
- unknown
3094
- > = z.object({
3095
- type:
3096
- CreateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema,
3097
- description: z.string(),
3098
- send_to_model: z.boolean().default(true),
3099
- default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
3100
- }).transform((v) => {
3101
- return remap$(v, {
3102
- "send_to_model": "sendToModel",
3103
- "default_value": "defaultValue",
3104
- });
3105
- });
3106
- /** @internal */
3107
- export type ResponseBodyArguments$Outbound = {
3108
- type: string;
3109
- description: string;
3110
- send_to_model: boolean;
3111
- default_value?: string | number | boolean | undefined;
3112
- };
3113
-
3114
- /** @internal */
3115
- export const ResponseBodyArguments$outboundSchema: z.ZodType<
3116
- ResponseBodyArguments$Outbound,
3117
- z.ZodTypeDef,
3118
- ResponseBodyArguments
3119
- > = z.object({
3120
- type:
3121
- CreateToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema,
3122
- description: z.string(),
3123
- sendToModel: z.boolean().default(true),
3124
- defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
3125
- }).transform((v) => {
3126
- return remap$(v, {
3127
- sendToModel: "send_to_model",
3128
- defaultValue: "default_value",
3129
- });
3130
- });
3131
-
3132
- export function responseBodyArgumentsToJSON(
3133
- responseBodyArguments: ResponseBodyArguments,
3134
- ): string {
3135
- return JSON.stringify(
3136
- ResponseBodyArguments$outboundSchema.parse(responseBodyArguments),
3137
- );
3138
- }
3139
- export function responseBodyArgumentsFromJSON(
3140
- jsonString: string,
3141
- ): SafeParseResult<ResponseBodyArguments, SDKValidationError> {
3142
- return safeParse(
3143
- jsonString,
3144
- (x) => ResponseBodyArguments$inboundSchema.parse(JSON.parse(x)),
3145
- `Failed to parse 'ResponseBodyArguments' from JSON`,
3146
- );
3147
- }
3148
-
3149
- /** @internal */
3150
- export const CreateToolResponseBodyHttp$inboundSchema: z.ZodType<
3151
- CreateToolResponseBodyHttp,
3152
- z.ZodTypeDef,
3153
- unknown
3154
- > = z.object({
3155
- blueprint: z.lazy(() => ResponseBodyBlueprint$inboundSchema),
3156
- arguments: z.record(z.lazy(() => ResponseBodyArguments$inboundSchema))
3157
- .optional(),
3158
- });
3159
- /** @internal */
3160
- export type CreateToolResponseBodyHttp$Outbound = {
3161
- blueprint: ResponseBodyBlueprint$Outbound;
3162
- arguments?: { [k: string]: ResponseBodyArguments$Outbound } | undefined;
3163
- };
3164
-
3165
- /** @internal */
3166
- export const CreateToolResponseBodyHttp$outboundSchema: z.ZodType<
3167
- CreateToolResponseBodyHttp$Outbound,
3168
- z.ZodTypeDef,
3169
- CreateToolResponseBodyHttp
3170
- > = z.object({
3171
- blueprint: z.lazy(() => ResponseBodyBlueprint$outboundSchema),
3172
- arguments: z.record(z.lazy(() => ResponseBodyArguments$outboundSchema))
3173
- .optional(),
3174
- });
3175
-
3176
- export function createToolResponseBodyHttpToJSON(
3177
- createToolResponseBodyHttp: CreateToolResponseBodyHttp,
3178
- ): string {
3179
- return JSON.stringify(
3180
- CreateToolResponseBodyHttp$outboundSchema.parse(createToolResponseBodyHttp),
3181
- );
3182
- }
3183
- export function createToolResponseBodyHttpFromJSON(
3184
- jsonString: string,
3185
- ): SafeParseResult<CreateToolResponseBodyHttp, SDKValidationError> {
3186
- return safeParse(
3187
- jsonString,
3188
- (x) => CreateToolResponseBodyHttp$inboundSchema.parse(JSON.parse(x)),
3189
- `Failed to parse 'CreateToolResponseBodyHttp' from JSON`,
3190
- );
3191
- }
3192
-
3193
- /** @internal */
3194
- export const ResponseBodyHTTPTool$inboundSchema: z.ZodType<
3195
- ResponseBodyHTTPTool,
3196
- z.ZodTypeDef,
3197
- unknown
3198
- > = z.object({
3199
- _id: z.string().default("tool_01KE6FM16CW2AYC0J2NAFQH2QD"),
3200
- path: z.string(),
3201
- key: z.string(),
3202
- display_name: z.string().optional(),
3203
- description: z.string(),
3204
- created_by_id: z.string().optional(),
3205
- updated_by_id: z.string().optional(),
3206
- project_id: z.string(),
3207
- workspace_id: z.string(),
3208
- created: z.string(),
3209
- updated: z.string(),
3210
- status: CreateToolResponseBodyToolsStatus$inboundSchema.default("live"),
3211
- version_hash: z.string().optional(),
3212
- type: z.literal("http"),
3213
- http: z.lazy(() => CreateToolResponseBodyHttp$inboundSchema),
3214
- }).transform((v) => {
3215
- return remap$(v, {
3216
- "_id": "id",
3217
- "display_name": "displayName",
3218
- "created_by_id": "createdById",
3219
- "updated_by_id": "updatedById",
3220
- "project_id": "projectId",
3221
- "workspace_id": "workspaceId",
3222
- "version_hash": "versionHash",
3223
- });
3224
- });
3225
- /** @internal */
3226
- export type ResponseBodyHTTPTool$Outbound = {
3227
- _id: string;
3228
- path: string;
3229
- key: string;
3230
- display_name?: string | undefined;
3231
- description: string;
3232
- created_by_id?: string | undefined;
3233
- updated_by_id?: string | undefined;
3234
- project_id: string;
3235
- workspace_id: string;
3236
- created: string;
3237
- updated: string;
3238
- status: string;
3239
- version_hash?: string | undefined;
3240
- type: "http";
3241
- http: CreateToolResponseBodyHttp$Outbound;
3242
- };
3243
-
3244
- /** @internal */
3245
- export const ResponseBodyHTTPTool$outboundSchema: z.ZodType<
3246
- ResponseBodyHTTPTool$Outbound,
3247
- z.ZodTypeDef,
3248
- ResponseBodyHTTPTool
3249
- > = z.object({
3250
- id: z.string().default("tool_01KE6FM16CW2AYC0J2NAFQH2QD"),
3251
- path: z.string(),
3252
- key: z.string(),
3253
- displayName: z.string().optional(),
3254
- description: z.string(),
3255
- createdById: z.string().optional(),
3256
- updatedById: z.string().optional(),
3257
- projectId: z.string(),
3258
- workspaceId: z.string(),
3259
- created: z.string(),
3260
- updated: z.string(),
3261
- status: CreateToolResponseBodyToolsStatus$outboundSchema.default("live"),
3262
- versionHash: z.string().optional(),
3263
- type: z.literal("http"),
3264
- http: z.lazy(() => CreateToolResponseBodyHttp$outboundSchema),
3265
- }).transform((v) => {
3266
- return remap$(v, {
3267
- id: "_id",
3268
- displayName: "display_name",
3269
- createdById: "created_by_id",
3270
- updatedById: "updated_by_id",
3271
- projectId: "project_id",
3272
- workspaceId: "workspace_id",
3273
- versionHash: "version_hash",
3274
- });
3275
- });
3276
-
3277
- export function responseBodyHTTPToolToJSON(
3278
- responseBodyHTTPTool: ResponseBodyHTTPTool,
3279
- ): string {
3280
- return JSON.stringify(
3281
- ResponseBodyHTTPTool$outboundSchema.parse(responseBodyHTTPTool),
3282
- );
3283
- }
3284
- export function responseBodyHTTPToolFromJSON(
3285
- jsonString: string,
3286
- ): SafeParseResult<ResponseBodyHTTPTool, SDKValidationError> {
3287
- return safeParse(
3288
- jsonString,
3289
- (x) => ResponseBodyHTTPTool$inboundSchema.parse(JSON.parse(x)),
3290
- `Failed to parse 'ResponseBodyHTTPTool' from JSON`,
3291
- );
3292
- }
3293
-
3294
- /** @internal */
3295
- export const CreateToolResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
3296
- typeof CreateToolResponseBodyStatus
3297
- > = z.nativeEnum(CreateToolResponseBodyStatus);
3298
- /** @internal */
3299
- export const CreateToolResponseBodyStatus$outboundSchema: z.ZodNativeEnum<
3300
- typeof CreateToolResponseBodyStatus
3301
- > = CreateToolResponseBodyStatus$inboundSchema;
3302
-
3303
- /** @internal */
3304
- export const ResponseBodySchema$inboundSchema: z.ZodType<
3305
- ResponseBodySchema,
3306
- z.ZodTypeDef,
3307
- unknown
3308
- > = collectExtraKeys$(
3309
- z.object({
3310
- type: z.string(),
3311
- properties: z.record(z.any()),
3312
- required: z.array(z.string()),
3313
- }).catchall(z.any()),
3314
- "additionalProperties",
3315
- true,
3316
- );
3317
- /** @internal */
3318
- export type ResponseBodySchema$Outbound = {
3319
- type: string;
3320
- properties: { [k: string]: any };
3321
- required: Array<string>;
3322
- [additionalProperties: string]: unknown;
3323
- };
3324
-
3325
- /** @internal */
3326
- export const ResponseBodySchema$outboundSchema: z.ZodType<
3327
- ResponseBodySchema$Outbound,
3328
- z.ZodTypeDef,
3329
- ResponseBodySchema
3330
- > = z.object({
3331
- type: z.string(),
3332
- properties: z.record(z.any()),
3333
- required: z.array(z.string()),
3334
- additionalProperties: z.record(z.any()).optional(),
3335
- }).transform((v) => {
3336
- return {
3337
- ...v.additionalProperties,
3338
- ...remap$(v, {
3339
- additionalProperties: null,
3340
- }),
3341
- };
3342
- });
3343
-
3344
- export function responseBodySchemaToJSON(
3345
- responseBodySchema: ResponseBodySchema,
3346
- ): string {
3347
- return JSON.stringify(
3348
- ResponseBodySchema$outboundSchema.parse(responseBodySchema),
3349
- );
3350
- }
3351
- export function responseBodySchemaFromJSON(
3352
- jsonString: string,
3353
- ): SafeParseResult<ResponseBodySchema, SDKValidationError> {
3354
- return safeParse(
3355
- jsonString,
3356
- (x) => ResponseBodySchema$inboundSchema.parse(JSON.parse(x)),
3357
- `Failed to parse 'ResponseBodySchema' from JSON`,
3358
- );
3359
- }
3360
-
3361
- /** @internal */
3362
- export const ResponseBodyJsonSchema$inboundSchema: z.ZodType<
3363
- ResponseBodyJsonSchema,
3364
- z.ZodTypeDef,
3365
- unknown
3366
- > = z.object({
3367
- name: z.string(),
3368
- description: z.string(),
3369
- schema: z.lazy(() => ResponseBodySchema$inboundSchema),
3370
- strict: z.boolean().optional(),
3371
- });
3372
- /** @internal */
3373
- export type ResponseBodyJsonSchema$Outbound = {
3374
- name: string;
3375
- description: string;
3376
- schema: ResponseBodySchema$Outbound;
3377
- strict?: boolean | undefined;
3378
- };
3379
-
3380
- /** @internal */
3381
- export const ResponseBodyJsonSchema$outboundSchema: z.ZodType<
3382
- ResponseBodyJsonSchema$Outbound,
3383
- z.ZodTypeDef,
3384
- ResponseBodyJsonSchema
3385
- > = z.object({
3386
- name: z.string(),
3387
- description: z.string(),
3388
- schema: z.lazy(() => ResponseBodySchema$outboundSchema),
3389
- strict: z.boolean().optional(),
3390
- });
3391
-
3392
- export function responseBodyJsonSchemaToJSON(
3393
- responseBodyJsonSchema: ResponseBodyJsonSchema,
3394
- ): string {
3395
- return JSON.stringify(
3396
- ResponseBodyJsonSchema$outboundSchema.parse(responseBodyJsonSchema),
3397
- );
3398
- }
3399
- export function responseBodyJsonSchemaFromJSON(
3400
- jsonString: string,
3401
- ): SafeParseResult<ResponseBodyJsonSchema, SDKValidationError> {
3402
- return safeParse(
3403
- jsonString,
3404
- (x) => ResponseBodyJsonSchema$inboundSchema.parse(JSON.parse(x)),
3405
- `Failed to parse 'ResponseBodyJsonSchema' from JSON`,
3406
- );
3407
- }
3408
-
3409
- /** @internal */
3410
- export const ResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
3411
- ResponseBodyJSONSchemaTool,
3412
- z.ZodTypeDef,
3413
- unknown
3414
- > = z.object({
3415
- _id: z.string().default("tool_01KE6FM169MKYS3K9Z6YE6SCMT"),
3416
- path: z.string(),
3417
- key: z.string(),
3418
- display_name: z.string().optional(),
3419
- description: z.string(),
3420
- created_by_id: z.string().optional(),
3421
- updated_by_id: z.string().optional(),
3422
- project_id: z.string(),
3423
- workspace_id: z.string(),
3424
- created: z.string(),
3425
- updated: z.string(),
3426
- status: CreateToolResponseBodyStatus$inboundSchema.default("live"),
3427
- version_hash: z.string().optional(),
3428
- type: z.literal("json_schema"),
3429
- json_schema: z.lazy(() => ResponseBodyJsonSchema$inboundSchema),
3430
- }).transform((v) => {
3431
- return remap$(v, {
3432
- "_id": "id",
3433
- "display_name": "displayName",
3434
- "created_by_id": "createdById",
3435
- "updated_by_id": "updatedById",
3436
- "project_id": "projectId",
3437
- "workspace_id": "workspaceId",
3438
- "version_hash": "versionHash",
3439
- "json_schema": "jsonSchema",
3440
- });
3441
- });
3442
- /** @internal */
3443
- export type ResponseBodyJSONSchemaTool$Outbound = {
3444
- _id: string;
3445
- path: string;
3446
- key: string;
3447
- display_name?: string | undefined;
3448
- description: string;
3449
- created_by_id?: string | undefined;
3450
- updated_by_id?: string | undefined;
3451
- project_id: string;
3452
- workspace_id: string;
3453
- created: string;
3454
- updated: string;
3455
- status: string;
3456
- version_hash?: string | undefined;
3457
- type: "json_schema";
3458
- json_schema: ResponseBodyJsonSchema$Outbound;
3459
- };
3460
-
3461
- /** @internal */
3462
- export const ResponseBodyJSONSchemaTool$outboundSchema: z.ZodType<
3463
- ResponseBodyJSONSchemaTool$Outbound,
3464
- z.ZodTypeDef,
3465
- ResponseBodyJSONSchemaTool
3466
- > = z.object({
3467
- id: z.string().default("tool_01KE6FM169MKYS3K9Z6YE6SCMT"),
3468
- path: z.string(),
3469
- key: z.string(),
3470
- displayName: z.string().optional(),
3471
- description: z.string(),
3472
- createdById: z.string().optional(),
3473
- updatedById: z.string().optional(),
3474
- projectId: z.string(),
3475
- workspaceId: z.string(),
3476
- created: z.string(),
3477
- updated: z.string(),
3478
- status: CreateToolResponseBodyStatus$outboundSchema.default("live"),
3479
- versionHash: z.string().optional(),
3480
- type: z.literal("json_schema"),
3481
- jsonSchema: z.lazy(() => ResponseBodyJsonSchema$outboundSchema),
3482
- }).transform((v) => {
3483
- return remap$(v, {
3484
- id: "_id",
3485
- displayName: "display_name",
3486
- createdById: "created_by_id",
3487
- updatedById: "updated_by_id",
3488
- projectId: "project_id",
3489
- workspaceId: "workspace_id",
3490
- versionHash: "version_hash",
3491
- jsonSchema: "json_schema",
3492
- });
3493
- });
3494
-
3495
- export function responseBodyJSONSchemaToolToJSON(
3496
- responseBodyJSONSchemaTool: ResponseBodyJSONSchemaTool,
3497
- ): string {
3498
- return JSON.stringify(
3499
- ResponseBodyJSONSchemaTool$outboundSchema.parse(responseBodyJSONSchemaTool),
3500
- );
3501
- }
3502
- export function responseBodyJSONSchemaToolFromJSON(
3503
- jsonString: string,
3504
- ): SafeParseResult<ResponseBodyJSONSchemaTool, SDKValidationError> {
3505
- return safeParse(
3506
- jsonString,
3507
- (x) => ResponseBodyJSONSchemaTool$inboundSchema.parse(JSON.parse(x)),
3508
- `Failed to parse 'ResponseBodyJSONSchemaTool' from JSON`,
3509
- );
3510
- }
3511
-
3512
- /** @internal */
3513
- export const ResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
3514
- typeof ResponseBodyStatus
3515
- > = z.nativeEnum(ResponseBodyStatus);
3516
- /** @internal */
3517
- export const ResponseBodyStatus$outboundSchema: z.ZodNativeEnum<
3518
- typeof ResponseBodyStatus
3519
- > = ResponseBodyStatus$inboundSchema;
3520
-
3521
- /** @internal */
3522
- export const CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema:
3523
- z.ZodNativeEnum<
3524
- typeof CreateToolResponseBodyToolsResponse200ApplicationJson1Type
3525
- > = z.nativeEnum(CreateToolResponseBodyToolsResponse200ApplicationJson1Type);
3526
- /** @internal */
3527
- export const CreateToolResponseBodyToolsResponse200ApplicationJson1Type$outboundSchema:
3528
- z.ZodNativeEnum<
3529
- typeof CreateToolResponseBodyToolsResponse200ApplicationJson1Type
3530
- > = CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema;
3531
-
3532
- /** @internal */
3533
- export const ResponseBodyParameters$inboundSchema: z.ZodType<
3534
- ResponseBodyParameters,
3535
- z.ZodTypeDef,
3536
- unknown
3537
- > = collectExtraKeys$(
3538
- z.object({
3539
- type:
3540
- CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema,
3541
- properties: z.record(z.any()),
3542
- required: z.array(z.string()),
3543
- }).catchall(z.any()),
3544
- "additionalProperties",
3545
- true,
3546
- );
3547
- /** @internal */
3548
- export type ResponseBodyParameters$Outbound = {
3549
- type: string;
3550
- properties: { [k: string]: any };
3551
- required: Array<string>;
3552
- [additionalProperties: string]: unknown;
3553
- };
3554
-
3555
- /** @internal */
3556
- export const ResponseBodyParameters$outboundSchema: z.ZodType<
3557
- ResponseBodyParameters$Outbound,
3558
- z.ZodTypeDef,
3559
- ResponseBodyParameters
3560
- > = z.object({
3561
- type:
3562
- CreateToolResponseBodyToolsResponse200ApplicationJson1Type$outboundSchema,
3563
- properties: z.record(z.any()),
3564
- required: z.array(z.string()),
3565
- additionalProperties: z.record(z.any()).optional(),
3566
- }).transform((v) => {
3567
- return {
3568
- ...v.additionalProperties,
3569
- ...remap$(v, {
3570
- additionalProperties: null,
3571
- }),
3572
- };
3573
- });
3574
-
3575
- export function responseBodyParametersToJSON(
3576
- responseBodyParameters: ResponseBodyParameters,
3577
- ): string {
3578
- return JSON.stringify(
3579
- ResponseBodyParameters$outboundSchema.parse(responseBodyParameters),
3580
- );
3581
- }
3582
- export function responseBodyParametersFromJSON(
3583
- jsonString: string,
3584
- ): SafeParseResult<ResponseBodyParameters, SDKValidationError> {
3585
- return safeParse(
3586
- jsonString,
3587
- (x) => ResponseBodyParameters$inboundSchema.parse(JSON.parse(x)),
3588
- `Failed to parse 'ResponseBodyParameters' from JSON`,
3589
- );
3590
- }
3591
-
3592
- /** @internal */
3593
- export const CreateToolResponseBodyFunction$inboundSchema: z.ZodType<
3594
- CreateToolResponseBodyFunction,
3595
- z.ZodTypeDef,
3596
- unknown
3597
- > = z.object({
3598
- name: z.string(),
3599
- description: z.string().optional(),
3600
- strict: z.boolean().optional(),
3601
- parameters: z.lazy(() => ResponseBodyParameters$inboundSchema).optional(),
3602
- });
3603
- /** @internal */
3604
- export type CreateToolResponseBodyFunction$Outbound = {
3605
- name: string;
3606
- description?: string | undefined;
3607
- strict?: boolean | undefined;
3608
- parameters?: ResponseBodyParameters$Outbound | undefined;
3609
- };
3610
-
3611
- /** @internal */
3612
- export const CreateToolResponseBodyFunction$outboundSchema: z.ZodType<
3613
- CreateToolResponseBodyFunction$Outbound,
3614
- z.ZodTypeDef,
3615
- CreateToolResponseBodyFunction
3616
- > = z.object({
3617
- name: z.string(),
3618
- description: z.string().optional(),
3619
- strict: z.boolean().optional(),
3620
- parameters: z.lazy(() => ResponseBodyParameters$outboundSchema).optional(),
3621
- });
3622
-
3623
- export function createToolResponseBodyFunctionToJSON(
3624
- createToolResponseBodyFunction: CreateToolResponseBodyFunction,
3625
- ): string {
3626
- return JSON.stringify(
3627
- CreateToolResponseBodyFunction$outboundSchema.parse(
3628
- createToolResponseBodyFunction,
3629
- ),
3630
- );
3631
- }
3632
- export function createToolResponseBodyFunctionFromJSON(
3633
- jsonString: string,
3634
- ): SafeParseResult<CreateToolResponseBodyFunction, SDKValidationError> {
3635
- return safeParse(
3636
- jsonString,
3637
- (x) => CreateToolResponseBodyFunction$inboundSchema.parse(JSON.parse(x)),
3638
- `Failed to parse 'CreateToolResponseBodyFunction' from JSON`,
3639
- );
3640
- }
3641
-
3642
- /** @internal */
3643
- export const ResponseBodyFunctionTool$inboundSchema: z.ZodType<
3644
- ResponseBodyFunctionTool,
3645
- z.ZodTypeDef,
3646
- unknown
3647
- > = z.object({
3648
- _id: z.string().default("tool_01KE6FM16703Z89J4AYDYAXNMS"),
3649
- path: z.string(),
3650
- key: z.string(),
3651
- display_name: z.string().optional(),
3652
- description: z.string(),
3653
- created_by_id: z.string().optional(),
3654
- updated_by_id: z.string().optional(),
3655
- project_id: z.string(),
3656
- workspace_id: z.string(),
3657
- created: z.string(),
3658
- updated: z.string(),
3659
- status: ResponseBodyStatus$inboundSchema.default("live"),
3660
- version_hash: z.string().optional(),
3661
- type: z.literal("function"),
3662
- function: z.lazy(() => CreateToolResponseBodyFunction$inboundSchema),
3663
- }).transform((v) => {
3664
- return remap$(v, {
3665
- "_id": "id",
3666
- "display_name": "displayName",
3667
- "created_by_id": "createdById",
3668
- "updated_by_id": "updatedById",
3669
- "project_id": "projectId",
3670
- "workspace_id": "workspaceId",
3671
- "version_hash": "versionHash",
3672
- });
3673
- });
3674
- /** @internal */
3675
- export type ResponseBodyFunctionTool$Outbound = {
3676
- _id: string;
3677
- path: string;
3678
- key: string;
3679
- display_name?: string | undefined;
3680
- description: string;
3681
- created_by_id?: string | undefined;
3682
- updated_by_id?: string | undefined;
3683
- project_id: string;
3684
- workspace_id: string;
3685
- created: string;
3686
- updated: string;
3687
- status: string;
3688
- version_hash?: string | undefined;
3689
- type: "function";
3690
- function: CreateToolResponseBodyFunction$Outbound;
3691
- };
3692
-
3693
- /** @internal */
3694
- export const ResponseBodyFunctionTool$outboundSchema: z.ZodType<
3695
- ResponseBodyFunctionTool$Outbound,
3696
- z.ZodTypeDef,
3697
- ResponseBodyFunctionTool
3698
- > = z.object({
3699
- id: z.string().default("tool_01KE6FM16703Z89J4AYDYAXNMS"),
3700
- path: z.string(),
3701
- key: z.string(),
3702
- displayName: z.string().optional(),
3703
- description: z.string(),
3704
- createdById: z.string().optional(),
3705
- updatedById: z.string().optional(),
3706
- projectId: z.string(),
3707
- workspaceId: z.string(),
3708
- created: z.string(),
3709
- updated: z.string(),
3710
- status: ResponseBodyStatus$outboundSchema.default("live"),
3711
- versionHash: z.string().optional(),
3712
- type: z.literal("function"),
3713
- function: z.lazy(() => CreateToolResponseBodyFunction$outboundSchema),
3714
- }).transform((v) => {
3715
- return remap$(v, {
3716
- id: "_id",
3717
- displayName: "display_name",
3718
- createdById: "created_by_id",
3719
- updatedById: "updated_by_id",
3720
- projectId: "project_id",
3721
- workspaceId: "workspace_id",
3722
- versionHash: "version_hash",
3723
- });
3724
- });
3725
-
3726
- export function responseBodyFunctionToolToJSON(
3727
- responseBodyFunctionTool: ResponseBodyFunctionTool,
3728
- ): string {
3729
- return JSON.stringify(
3730
- ResponseBodyFunctionTool$outboundSchema.parse(responseBodyFunctionTool),
3731
- );
3732
- }
3733
- export function responseBodyFunctionToolFromJSON(
3734
- jsonString: string,
3735
- ): SafeParseResult<ResponseBodyFunctionTool, SDKValidationError> {
3736
- return safeParse(
3737
- jsonString,
3738
- (x) => ResponseBodyFunctionTool$inboundSchema.parse(JSON.parse(x)),
3739
- `Failed to parse 'ResponseBodyFunctionTool' from JSON`,
3740
- );
3741
- }
3742
-
3743
- /** @internal */
3744
- export const CreateToolResponseBody$inboundSchema: z.ZodType<
3745
- CreateToolResponseBody,
3746
- z.ZodTypeDef,
3747
- unknown
3748
- > = z.union([
3749
- z.lazy(() => ResponseBodyFunctionTool$inboundSchema),
3750
- z.lazy(() => ResponseBodyJSONSchemaTool$inboundSchema),
3751
- z.lazy(() => ResponseBodyHTTPTool$inboundSchema),
3752
- z.lazy(() => ResponseBodyMCPTool$inboundSchema),
3753
- z.lazy(() => ResponseBodyCodeExecutionTool$inboundSchema),
3754
- ]);
3755
- /** @internal */
3756
- export type CreateToolResponseBody$Outbound =
3757
- | ResponseBodyFunctionTool$Outbound
3758
- | ResponseBodyJSONSchemaTool$Outbound
3759
- | ResponseBodyHTTPTool$Outbound
3760
- | ResponseBodyMCPTool$Outbound
3761
- | ResponseBodyCodeExecutionTool$Outbound;
3762
-
3763
- /** @internal */
3764
- export const CreateToolResponseBody$outboundSchema: z.ZodType<
3765
- CreateToolResponseBody$Outbound,
3766
- z.ZodTypeDef,
3767
- CreateToolResponseBody
3768
- > = z.union([
3769
- z.lazy(() => ResponseBodyFunctionTool$outboundSchema),
3770
- z.lazy(() => ResponseBodyJSONSchemaTool$outboundSchema),
3771
- z.lazy(() => ResponseBodyHTTPTool$outboundSchema),
3772
- z.lazy(() => ResponseBodyMCPTool$outboundSchema),
3773
- z.lazy(() => ResponseBodyCodeExecutionTool$outboundSchema),
3774
- ]);
3775
-
3776
- export function createToolResponseBodyToJSON(
3777
- createToolResponseBody: CreateToolResponseBody,
3778
- ): string {
3779
- return JSON.stringify(
3780
- CreateToolResponseBody$outboundSchema.parse(createToolResponseBody),
3781
- );
3782
- }
3783
- export function createToolResponseBodyFromJSON(
3784
- jsonString: string,
3785
- ): SafeParseResult<CreateToolResponseBody, SDKValidationError> {
3786
- return safeParse(
3787
- jsonString,
3788
- (x) => CreateToolResponseBody$inboundSchema.parse(JSON.parse(x)),
3789
- `Failed to parse 'CreateToolResponseBody' from JSON`,
3790
- );
3791
- }