@orq-ai/node 3.6.0-rc.9 → 3.7.0

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 (403) hide show
  1. package/README.md +2 -0
  2. package/bin/mcp-server.js +4598 -1269
  3. package/bin/mcp-server.js.map +55 -43
  4. package/docs/sdks/knowledge/README.md +93 -4
  5. package/funcs/knowledgeCreateDatasource.js +2 -2
  6. package/funcs/knowledgeCreateDatasource.js.map +1 -1
  7. package/funcs/knowledgeSearch.d.ts +16 -0
  8. package/funcs/knowledgeSearch.d.ts.map +1 -0
  9. package/funcs/knowledgeSearch.js +118 -0
  10. package/funcs/knowledgeSearch.js.map +1 -0
  11. package/jsr.json +1 -1
  12. package/lib/config.d.ts +3 -3
  13. package/lib/config.js +3 -3
  14. package/lib/config.js.map +1 -1
  15. package/mcp-server/cli/start/impl.js +2 -2
  16. package/mcp-server/cli/start/impl.js.map +1 -1
  17. package/mcp-server/mcp-server.js +1 -1
  18. package/mcp-server/mcp-server.js.map +1 -1
  19. package/mcp-server/server.d.ts.map +1 -1
  20. package/mcp-server/server.js +3 -1
  21. package/mcp-server/server.js.map +1 -1
  22. package/mcp-server/tools/knowledgeSearch.d.ts +8 -0
  23. package/mcp-server/tools/knowledgeSearch.d.ts.map +1 -0
  24. package/mcp-server/tools/knowledgeSearch.js +64 -0
  25. package/mcp-server/tools/knowledgeSearch.js.map +1 -0
  26. package/models/components/deployments.d.ts +1216 -53
  27. package/models/components/deployments.d.ts.map +1 -1
  28. package/models/components/deployments.js +1461 -103
  29. package/models/components/deployments.js.map +1 -1
  30. package/models/operations/bulkcreatedatapoints.d.ts +194 -12
  31. package/models/operations/bulkcreatedatapoints.d.ts.map +1 -1
  32. package/models/operations/bulkcreatedatapoints.js +192 -4
  33. package/models/operations/bulkcreatedatapoints.js.map +1 -1
  34. package/models/operations/createchunk.d.ts +32 -17
  35. package/models/operations/createchunk.d.ts.map +1 -1
  36. package/models/operations/createchunk.js +30 -19
  37. package/models/operations/createchunk.js.map +1 -1
  38. package/models/operations/createcontact.js +2 -2
  39. package/models/operations/createdataset.js +2 -2
  40. package/models/operations/createdatasetitem.d.ts +194 -12
  41. package/models/operations/createdatasetitem.d.ts.map +1 -1
  42. package/models/operations/createdatasetitem.js +191 -4
  43. package/models/operations/createdatasetitem.js.map +1 -1
  44. package/models/operations/createdatasource.js +2 -2
  45. package/models/operations/createprompt.d.ts +194 -12
  46. package/models/operations/createprompt.d.ts.map +1 -1
  47. package/models/operations/createprompt.js +192 -5
  48. package/models/operations/createprompt.js.map +1 -1
  49. package/models/operations/deploymentgetconfig.d.ts +1343 -89
  50. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  51. package/models/operations/deploymentgetconfig.js +1451 -8
  52. package/models/operations/deploymentgetconfig.js.map +1 -1
  53. package/models/operations/deployments.d.ts +105 -14
  54. package/models/operations/deployments.d.ts.map +1 -1
  55. package/models/operations/deployments.js +108 -15
  56. package/models/operations/deployments.js.map +1 -1
  57. package/models/operations/deploymentstream.d.ts +1163 -0
  58. package/models/operations/deploymentstream.d.ts.map +1 -1
  59. package/models/operations/deploymentstream.js +1319 -2
  60. package/models/operations/deploymentstream.js.map +1 -1
  61. package/models/operations/fileget.js +2 -2
  62. package/models/operations/filelist.js +2 -2
  63. package/models/operations/fileupload.js +2 -2
  64. package/models/operations/getallprompts.d.ts +97 -6
  65. package/models/operations/getallprompts.d.ts.map +1 -1
  66. package/models/operations/getallprompts.js +96 -3
  67. package/models/operations/getallprompts.js.map +1 -1
  68. package/models/operations/getonechunk.d.ts +24 -3
  69. package/models/operations/getonechunk.d.ts.map +1 -1
  70. package/models/operations/getonechunk.js +26 -3
  71. package/models/operations/getonechunk.js.map +1 -1
  72. package/models/operations/getoneprompt.d.ts +97 -6
  73. package/models/operations/getoneprompt.d.ts.map +1 -1
  74. package/models/operations/getoneprompt.js +96 -3
  75. package/models/operations/getoneprompt.js.map +1 -1
  76. package/models/operations/getpromptversion.d.ts +97 -6
  77. package/models/operations/getpromptversion.d.ts.map +1 -1
  78. package/models/operations/getpromptversion.js +96 -3
  79. package/models/operations/getpromptversion.js.map +1 -1
  80. package/models/operations/index.d.ts +1 -0
  81. package/models/operations/index.d.ts.map +1 -1
  82. package/models/operations/index.js +1 -0
  83. package/models/operations/index.js.map +1 -1
  84. package/models/operations/listchunks.d.ts +24 -3
  85. package/models/operations/listchunks.d.ts.map +1 -1
  86. package/models/operations/listchunks.js +26 -3
  87. package/models/operations/listchunks.js.map +1 -1
  88. package/models/operations/listdatasetdatapoints.d.ts +97 -6
  89. package/models/operations/listdatasetdatapoints.d.ts.map +1 -1
  90. package/models/operations/listdatasetdatapoints.js +98 -4
  91. package/models/operations/listdatasetdatapoints.js.map +1 -1
  92. package/models/operations/listdatasets.js +2 -2
  93. package/models/operations/listdatasources.js +2 -2
  94. package/models/operations/listpromptversions.d.ts +97 -6
  95. package/models/operations/listpromptversions.d.ts.map +1 -1
  96. package/models/operations/listpromptversions.js +96 -3
  97. package/models/operations/listpromptversions.js.map +1 -1
  98. package/models/operations/retrievedatapoint.d.ts +97 -6
  99. package/models/operations/retrievedatapoint.d.ts.map +1 -1
  100. package/models/operations/retrievedatapoint.js +97 -3
  101. package/models/operations/retrievedatapoint.js.map +1 -1
  102. package/models/operations/retrievedataset.js +2 -2
  103. package/models/operations/retrievedatasource.js +2 -2
  104. package/models/operations/searchknowledge.d.ts +1379 -0
  105. package/models/operations/searchknowledge.d.ts.map +1 -0
  106. package/models/operations/searchknowledge.js +1586 -0
  107. package/models/operations/searchknowledge.js.map +1 -0
  108. package/models/operations/updatechunk.d.ts +32 -17
  109. package/models/operations/updatechunk.d.ts.map +1 -1
  110. package/models/operations/updatechunk.js +30 -19
  111. package/models/operations/updatechunk.js.map +1 -1
  112. package/models/operations/updatedatapoint.d.ts +194 -12
  113. package/models/operations/updatedatapoint.d.ts.map +1 -1
  114. package/models/operations/updatedatapoint.js +191 -4
  115. package/models/operations/updatedatapoint.js.map +1 -1
  116. package/models/operations/updatedataset.js +2 -2
  117. package/models/operations/updatedatasource.js +2 -2
  118. package/models/operations/updateprompt.d.ts +194 -12
  119. package/models/operations/updateprompt.d.ts.map +1 -1
  120. package/models/operations/updateprompt.js +192 -5
  121. package/models/operations/updateprompt.js.map +1 -1
  122. package/package.json +3 -4
  123. package/packages/orq-rc/FUNCTIONS.md +106 -0
  124. package/packages/orq-rc/README.md +707 -0
  125. package/packages/orq-rc/RUNTIMES.md +48 -0
  126. package/packages/orq-rc/docs/sdks/contacts/README.md +84 -0
  127. package/packages/orq-rc/docs/sdks/datasets/README.md +1027 -0
  128. package/packages/orq-rc/docs/sdks/deployments/README.md +405 -0
  129. package/packages/orq-rc/docs/sdks/feedback/README.md +92 -0
  130. package/packages/orq-rc/docs/sdks/files/README.md +311 -0
  131. package/packages/orq-rc/docs/sdks/knowledge/README.md +1285 -0
  132. package/packages/orq-rc/docs/sdks/metrics/README.md +86 -0
  133. package/packages/orq-rc/docs/sdks/models/README.md +79 -0
  134. package/packages/orq-rc/docs/sdks/orq/README.md +10 -0
  135. package/packages/orq-rc/docs/sdks/prompts/README.md +576 -0
  136. package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +80 -0
  137. package/packages/orq-rc/jsr.json +28 -0
  138. package/packages/orq-rc/package-lock.json +3217 -0
  139. package/packages/orq-rc/package.json +45 -0
  140. package/packages/orq-rc/src/core.ts +13 -0
  141. package/packages/orq-rc/src/funcs/contactsCreate.ts +154 -0
  142. package/packages/orq-rc/src/funcs/datasetsClear.ts +161 -0
  143. package/packages/orq-rc/src/funcs/datasetsCreate.ts +159 -0
  144. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +161 -0
  145. package/packages/orq-rc/src/funcs/datasetsCreateDatapoints.ts +165 -0
  146. package/packages/orq-rc/src/funcs/datasetsCreateExperiment.ts +162 -0
  147. package/packages/orq-rc/src/funcs/datasetsDelete.ts +161 -0
  148. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +176 -0
  149. package/packages/orq-rc/src/funcs/datasetsList.ts +161 -0
  150. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +168 -0
  151. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +169 -0
  152. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +175 -0
  153. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +170 -0
  154. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +173 -0
  155. package/packages/orq-rc/src/funcs/deploymentsCreateExperiment.ts +167 -0
  156. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +162 -0
  157. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +170 -0
  158. package/packages/orq-rc/src/funcs/deploymentsList.ts +170 -0
  159. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +162 -0
  160. package/packages/orq-rc/src/funcs/deploymentsStream.ts +178 -0
  161. package/packages/orq-rc/src/funcs/feedbackCreate.ts +154 -0
  162. package/packages/orq-rc/src/funcs/filesCreate.ts +174 -0
  163. package/packages/orq-rc/src/funcs/filesDelete.ts +158 -0
  164. package/packages/orq-rc/src/funcs/filesGet.ts +160 -0
  165. package/packages/orq-rc/src/funcs/filesList.ts +161 -0
  166. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +152 -0
  167. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +165 -0
  168. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +160 -0
  169. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +161 -0
  170. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +168 -0
  171. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +167 -0
  172. package/packages/orq-rc/src/funcs/knowledgeList.ts +163 -0
  173. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +172 -0
  174. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +168 -0
  175. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +160 -0
  176. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +167 -0
  177. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +163 -0
  178. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +161 -0
  179. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +158 -0
  180. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +168 -0
  181. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +164 -0
  182. package/packages/orq-rc/src/funcs/modelsList.ts +136 -0
  183. package/packages/orq-rc/src/funcs/promptsCreate.ts +154 -0
  184. package/packages/orq-rc/src/funcs/promptsDelete.ts +158 -0
  185. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +175 -0
  186. package/packages/orq-rc/src/funcs/promptsList.ts +161 -0
  187. package/packages/orq-rc/src/funcs/promptsListVersions.ts +167 -0
  188. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +160 -0
  189. package/packages/orq-rc/src/funcs/promptsUpdate.ts +167 -0
  190. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +155 -0
  191. package/packages/orq-rc/src/hooks/global.ts +44 -0
  192. package/packages/orq-rc/src/hooks/hooks.ts +132 -0
  193. package/packages/orq-rc/src/hooks/index.ts +6 -0
  194. package/packages/orq-rc/src/hooks/registration.ts +15 -0
  195. package/packages/orq-rc/src/hooks/types.ts +110 -0
  196. package/packages/orq-rc/src/index.ts +7 -0
  197. package/packages/orq-rc/src/lib/base64.ts +37 -0
  198. package/packages/orq-rc/src/lib/config.ts +70 -0
  199. package/packages/orq-rc/src/lib/dlv.ts +53 -0
  200. package/packages/orq-rc/src/lib/encodings.ts +483 -0
  201. package/packages/orq-rc/src/lib/env.ts +73 -0
  202. package/packages/orq-rc/src/lib/event-streams.ts +264 -0
  203. package/packages/orq-rc/src/lib/files.ts +40 -0
  204. package/packages/orq-rc/src/lib/http.ts +323 -0
  205. package/packages/orq-rc/src/lib/is-plain-object.ts +43 -0
  206. package/packages/orq-rc/src/lib/logger.ts +9 -0
  207. package/packages/orq-rc/src/lib/matchers.ts +345 -0
  208. package/packages/orq-rc/src/lib/primitives.ts +150 -0
  209. package/packages/orq-rc/src/lib/retries.ts +218 -0
  210. package/packages/orq-rc/src/lib/schemas.ts +91 -0
  211. package/packages/orq-rc/src/lib/sdks.ts +401 -0
  212. package/packages/orq-rc/src/lib/security.ts +261 -0
  213. package/packages/orq-rc/src/lib/url.ts +33 -0
  214. package/packages/orq-rc/src/mcp-server/cli/start/command.ts +125 -0
  215. package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +140 -0
  216. package/packages/orq-rc/src/mcp-server/cli.ts +13 -0
  217. package/packages/orq-rc/src/mcp-server/console-logger.ts +71 -0
  218. package/packages/orq-rc/src/mcp-server/extensions.ts +17 -0
  219. package/packages/orq-rc/src/mcp-server/mcp-server.ts +26 -0
  220. package/packages/orq-rc/src/mcp-server/prompts.ts +117 -0
  221. package/packages/orq-rc/src/mcp-server/resources.ts +172 -0
  222. package/packages/orq-rc/src/mcp-server/scopes.ts +7 -0
  223. package/packages/orq-rc/src/mcp-server/server.ts +163 -0
  224. package/packages/orq-rc/src/mcp-server/shared.ts +75 -0
  225. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +37 -0
  226. package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +35 -0
  227. package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +37 -0
  228. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +37 -0
  229. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoints.ts +37 -0
  230. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateExperiment.ts +37 -0
  231. package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +35 -0
  232. package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +35 -0
  233. package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +37 -0
  234. package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +37 -0
  235. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +37 -0
  236. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +37 -0
  237. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +37 -0
  238. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +35 -0
  239. package/packages/orq-rc/src/mcp-server/tools/deploymentsCreateExperiment.ts +37 -0
  240. package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +37 -0
  241. package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +37 -0
  242. package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +37 -0
  243. package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +37 -0
  244. package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +37 -0
  245. package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +37 -0
  246. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +37 -0
  247. package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +33 -0
  248. package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +37 -0
  249. package/packages/orq-rc/src/mcp-server/tools/filesList.ts +37 -0
  250. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreate.ts +35 -0
  251. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +35 -0
  252. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +35 -0
  253. package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +35 -0
  254. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +33 -0
  255. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +35 -0
  256. package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +37 -0
  257. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +35 -0
  258. package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +35 -0
  259. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +37 -0
  260. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveChunk.ts +35 -0
  261. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +35 -0
  262. package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +37 -0
  263. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +35 -0
  264. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +35 -0
  265. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateDatasource.ts +35 -0
  266. package/packages/orq-rc/src/mcp-server/tools/modelsList.ts +30 -0
  267. package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +35 -0
  268. package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +33 -0
  269. package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +37 -0
  270. package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +37 -0
  271. package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +37 -0
  272. package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +37 -0
  273. package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +35 -0
  274. package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +36 -0
  275. package/packages/orq-rc/src/mcp-server/tools.ts +129 -0
  276. package/packages/orq-rc/src/models/components/deployments.ts +7289 -0
  277. package/packages/orq-rc/src/models/components/index.ts +6 -0
  278. package/packages/orq-rc/src/models/components/security.ts +71 -0
  279. package/packages/orq-rc/src/models/errors/apierror.ts +27 -0
  280. package/packages/orq-rc/src/models/errors/getpromptversion.ts +71 -0
  281. package/packages/orq-rc/src/models/errors/honoapierror.ts +82 -0
  282. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +62 -0
  283. package/packages/orq-rc/src/models/errors/index.ts +10 -0
  284. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +97 -0
  285. package/packages/orq-rc/src/models/errors/updateprompt.ts +71 -0
  286. package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +2232 -0
  287. package/packages/orq-rc/src/models/operations/cleardataset.ts +75 -0
  288. package/packages/orq-rc/src/models/operations/createchunk.ts +432 -0
  289. package/packages/orq-rc/src/models/operations/createcontact.ts +256 -0
  290. package/packages/orq-rc/src/models/operations/createdataset.ts +296 -0
  291. package/packages/orq-rc/src/models/operations/createdatasetexperiment.ts +307 -0
  292. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2149 -0
  293. package/packages/orq-rc/src/models/operations/createdatasource.ts +852 -0
  294. package/packages/orq-rc/src/models/operations/createdeploymentexperiment.ts +321 -0
  295. package/packages/orq-rc/src/models/operations/createfeedback.ts +286 -0
  296. package/packages/orq-rc/src/models/operations/createknowledge.ts +846 -0
  297. package/packages/orq-rc/src/models/operations/createprompt.ts +4079 -0
  298. package/packages/orq-rc/src/models/operations/deletechunk.ts +96 -0
  299. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +81 -0
  300. package/packages/orq-rc/src/models/operations/deletedataset.ts +75 -0
  301. package/packages/orq-rc/src/models/operations/deletedatasource.ts +87 -0
  302. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +78 -0
  303. package/packages/orq-rc/src/models/operations/deleteprompt.ts +69 -0
  304. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +5435 -0
  305. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +9378 -0
  306. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +1255 -0
  307. package/packages/orq-rc/src/models/operations/deployments.ts +2316 -0
  308. package/packages/orq-rc/src/models/operations/deploymentstream.ts +9499 -0
  309. package/packages/orq-rc/src/models/operations/filedelete.ts +78 -0
  310. package/packages/orq-rc/src/models/operations/fileget.ts +223 -0
  311. package/packages/orq-rc/src/models/operations/filelist.ts +337 -0
  312. package/packages/orq-rc/src/models/operations/fileupload.ts +327 -0
  313. package/packages/orq-rc/src/models/operations/getallprompts.ts +2294 -0
  314. package/packages/orq-rc/src/models/operations/getonechunk.ts +315 -0
  315. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +537 -0
  316. package/packages/orq-rc/src/models/operations/getoneprompt.ts +2155 -0
  317. package/packages/orq-rc/src/models/operations/getpromptversion.ts +2160 -0
  318. package/packages/orq-rc/src/models/operations/index.ts +54 -0
  319. package/packages/orq-rc/src/models/operations/listchunks.ts +494 -0
  320. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +1276 -0
  321. package/packages/orq-rc/src/models/operations/listdatasets.ts +406 -0
  322. package/packages/orq-rc/src/models/operations/listdatasources.ts +447 -0
  323. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +663 -0
  324. package/packages/orq-rc/src/models/operations/listmodels.ts +273 -0
  325. package/packages/orq-rc/src/models/operations/listpromptversions.ts +2292 -0
  326. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +190 -0
  327. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +1126 -0
  328. package/packages/orq-rc/src/models/operations/retrievedataset.ts +288 -0
  329. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +273 -0
  330. package/packages/orq-rc/src/models/operations/searchknowledge.ts +3367 -0
  331. package/packages/orq-rc/src/models/operations/updatechunk.ts +448 -0
  332. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2139 -0
  333. package/packages/orq-rc/src/models/operations/updatedataset.ts +393 -0
  334. package/packages/orq-rc/src/models/operations/updatedatasource.ts +345 -0
  335. package/packages/orq-rc/src/models/operations/updateknowledge.ts +980 -0
  336. package/packages/orq-rc/src/models/operations/updateprompt.ts +4261 -0
  337. package/packages/orq-rc/src/sdk/contacts.ts +27 -0
  338. package/packages/orq-rc/src/sdk/datasets.ts +240 -0
  339. package/packages/orq-rc/src/sdk/deployments.ts +107 -0
  340. package/packages/orq-rc/src/sdk/feedback.ts +27 -0
  341. package/packages/orq-rc/src/sdk/files.ts +78 -0
  342. package/packages/orq-rc/src/sdk/index.ts +5 -0
  343. package/packages/orq-rc/src/sdk/knowledge.ts +264 -0
  344. package/packages/orq-rc/src/sdk/metrics.ts +27 -0
  345. package/packages/orq-rc/src/sdk/models.ts +25 -0
  346. package/packages/orq-rc/src/sdk/prompts.ts +126 -0
  347. package/packages/orq-rc/src/sdk/remoteconfigs.ts +24 -0
  348. package/packages/orq-rc/src/sdk/sdk.ts +61 -0
  349. package/packages/orq-rc/src/types/async.ts +68 -0
  350. package/packages/orq-rc/src/types/blobs.ts +31 -0
  351. package/packages/orq-rc/src/types/constdatetime.ts +15 -0
  352. package/packages/orq-rc/src/types/enums.ts +16 -0
  353. package/packages/orq-rc/src/types/fp.ts +50 -0
  354. package/packages/orq-rc/src/types/index.ts +11 -0
  355. package/packages/orq-rc/src/types/operations.ts +105 -0
  356. package/packages/orq-rc/src/types/rfcdate.ts +54 -0
  357. package/packages/orq-rc/src/types/streams.ts +21 -0
  358. package/packages/orq-rc/tsconfig.json +41 -0
  359. package/sdk/knowledge.d.ts +7 -0
  360. package/sdk/knowledge.d.ts.map +1 -1
  361. package/sdk/knowledge.js +10 -0
  362. package/sdk/knowledge.js.map +1 -1
  363. package/src/funcs/knowledgeCreateDatasource.ts +2 -2
  364. package/src/funcs/knowledgeSearch.ts +161 -0
  365. package/src/lib/config.ts +3 -3
  366. package/src/mcp-server/cli/start/impl.ts +2 -2
  367. package/src/mcp-server/mcp-server.ts +1 -1
  368. package/src/mcp-server/server.ts +3 -1
  369. package/src/mcp-server/tools/knowledgeSearch.ts +37 -0
  370. package/src/models/components/deployments.ts +2762 -127
  371. package/src/models/operations/bulkcreatedatapoints.ts +416 -12
  372. package/src/models/operations/createchunk.ts +65 -35
  373. package/src/models/operations/createcontact.ts +2 -2
  374. package/src/models/operations/createdataset.ts +2 -2
  375. package/src/models/operations/createdatasetitem.ts +410 -13
  376. package/src/models/operations/createdatasource.ts +2 -2
  377. package/src/models/operations/createprompt.ts +400 -12
  378. package/src/models/operations/deploymentgetconfig.ts +2906 -105
  379. package/src/models/operations/deployments.ts +211 -23
  380. package/src/models/operations/deploymentstream.ts +3074 -98
  381. package/src/models/operations/fileget.ts +2 -2
  382. package/src/models/operations/filelist.ts +2 -2
  383. package/src/models/operations/fileupload.ts +2 -2
  384. package/src/models/operations/getallprompts.ts +200 -6
  385. package/src/models/operations/getonechunk.ts +55 -5
  386. package/src/models/operations/getoneprompt.ts +195 -6
  387. package/src/models/operations/getpromptversion.ts +204 -6
  388. package/src/models/operations/index.ts +1 -0
  389. package/src/models/operations/listchunks.ts +55 -5
  390. package/src/models/operations/listdatasetdatapoints.ts +207 -8
  391. package/src/models/operations/listdatasets.ts +2 -2
  392. package/src/models/operations/listdatasources.ts +2 -2
  393. package/src/models/operations/listpromptversions.ts +202 -6
  394. package/src/models/operations/retrievedatapoint.ts +204 -8
  395. package/src/models/operations/retrievedataset.ts +2 -2
  396. package/src/models/operations/retrievedatasource.ts +2 -2
  397. package/src/models/operations/searchknowledge.ts +3367 -0
  398. package/src/models/operations/updatechunk.ts +65 -35
  399. package/src/models/operations/updatedatapoint.ts +412 -14
  400. package/src/models/operations/updatedataset.ts +2 -2
  401. package/src/models/operations/updatedatasource.ts +2 -2
  402. package/src/models/operations/updateprompt.ts +400 -12
  403. package/src/sdk/knowledge.ts +18 -0
@@ -0,0 +1,2139 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * The role of the prompt message
14
+ */
15
+ export const UpdateDatapointRole = {
16
+ System: "system",
17
+ Assistant: "assistant",
18
+ User: "user",
19
+ Exception: "exception",
20
+ Tool: "tool",
21
+ Prompt: "prompt",
22
+ Correction: "correction",
23
+ ExpectedOutput: "expected_output",
24
+ } as const;
25
+ /**
26
+ * The role of the prompt message
27
+ */
28
+ export type UpdateDatapointRole = ClosedEnum<typeof UpdateDatapointRole>;
29
+
30
+ /**
31
+ * The type of the content part. Always `file`.
32
+ */
33
+ export const UpdateDatapoint2DatasetsRequestType = {
34
+ File: "file",
35
+ } as const;
36
+ /**
37
+ * The type of the content part. Always `file`.
38
+ */
39
+ export type UpdateDatapoint2DatasetsRequestType = ClosedEnum<
40
+ typeof UpdateDatapoint2DatasetsRequestType
41
+ >;
42
+
43
+ export type UpdateDatapoint2File = {
44
+ /**
45
+ * The base64 encoded file data, used when passing the file to the model as a string.
46
+ */
47
+ fileData: string;
48
+ /**
49
+ * The name of the file, used when passing the file to the model as a string.
50
+ */
51
+ filename?: string | undefined;
52
+ };
53
+
54
+ export type UpdateDatapoint23 = {
55
+ /**
56
+ * The type of the content part. Always `file`.
57
+ */
58
+ type: UpdateDatapoint2DatasetsRequestType;
59
+ file: UpdateDatapoint2File;
60
+ };
61
+
62
+ export const UpdateDatapoint2DatasetsType = {
63
+ ImageUrl: "image_url",
64
+ } as const;
65
+ export type UpdateDatapoint2DatasetsType = ClosedEnum<
66
+ typeof UpdateDatapoint2DatasetsType
67
+ >;
68
+
69
+ export type UpdateDatapoint2ImageUrl = {
70
+ /**
71
+ * Either a URL of the image or the base64 encoded data URI.
72
+ */
73
+ url: string;
74
+ /**
75
+ * Specifies the detail level of the image. Currently only supported with OpenAI models
76
+ */
77
+ detail?: string | undefined;
78
+ };
79
+
80
+ /**
81
+ * The image part of the prompt message. Only supported with vision models.
82
+ */
83
+ export type UpdateDatapoint22 = {
84
+ type: UpdateDatapoint2DatasetsType;
85
+ imageUrl: UpdateDatapoint2ImageUrl;
86
+ };
87
+
88
+ export const UpdateDatapoint2Type = {
89
+ Text: "text",
90
+ } as const;
91
+ export type UpdateDatapoint2Type = ClosedEnum<typeof UpdateDatapoint2Type>;
92
+
93
+ /**
94
+ * Text content part of a prompt message
95
+ */
96
+ export type UpdateDatapoint21 = {
97
+ type: UpdateDatapoint2Type;
98
+ text: string;
99
+ };
100
+
101
+ export type UpdateDatapointContent2 =
102
+ | UpdateDatapoint21
103
+ | UpdateDatapoint22
104
+ | UpdateDatapoint23;
105
+
106
+ /**
107
+ * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
108
+ */
109
+ export type UpdateDatapointContent =
110
+ | string
111
+ | Array<UpdateDatapoint21 | UpdateDatapoint22 | UpdateDatapoint23>;
112
+
113
+ export const UpdateDatapointType = {
114
+ Function: "function",
115
+ } as const;
116
+ export type UpdateDatapointType = ClosedEnum<typeof UpdateDatapointType>;
117
+
118
+ export type UpdateDatapointFunction = {
119
+ name: string;
120
+ /**
121
+ * JSON string arguments for the functions
122
+ */
123
+ arguments: string;
124
+ };
125
+
126
+ export type UpdateDatapointToolCalls = {
127
+ id?: string | undefined;
128
+ index?: number | undefined;
129
+ type: UpdateDatapointType;
130
+ function: UpdateDatapointFunction;
131
+ };
132
+
133
+ export type UpdateDatapointMessages = {
134
+ /**
135
+ * The role of the prompt message
136
+ */
137
+ role: UpdateDatapointRole;
138
+ /**
139
+ * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
140
+ */
141
+ content:
142
+ | string
143
+ | Array<UpdateDatapoint21 | UpdateDatapoint22 | UpdateDatapoint23>;
144
+ toolCalls?: Array<UpdateDatapointToolCalls> | undefined;
145
+ toolCallId?: string | undefined;
146
+ };
147
+
148
+ export type UpdateDatapointRequestBody = {
149
+ /**
150
+ * The inputs of the dataset. Key value pairs where the key is the input name and the value is the input value. Nested objects are not supported.
151
+ */
152
+ inputs?: { [k: string]: any } | undefined;
153
+ /**
154
+ * The prompt template messages
155
+ */
156
+ messages?: Array<UpdateDatapointMessages> | undefined;
157
+ expectedOutput?: string | undefined;
158
+ };
159
+
160
+ export type UpdateDatapointRequest = {
161
+ datasetId: string;
162
+ datapointId: string;
163
+ requestBody?: UpdateDatapointRequestBody | undefined;
164
+ };
165
+
166
+ /**
167
+ * The role of the prompt message
168
+ */
169
+ export const UpdateDatapointDatasetsRole = {
170
+ System: "system",
171
+ Assistant: "assistant",
172
+ User: "user",
173
+ Exception: "exception",
174
+ Tool: "tool",
175
+ Prompt: "prompt",
176
+ Correction: "correction",
177
+ ExpectedOutput: "expected_output",
178
+ } as const;
179
+ /**
180
+ * The role of the prompt message
181
+ */
182
+ export type UpdateDatapointDatasetsRole = ClosedEnum<
183
+ typeof UpdateDatapointDatasetsRole
184
+ >;
185
+
186
+ /**
187
+ * The type of the content part. Always `file`.
188
+ */
189
+ export const UpdateDatapoint2DatasetsResponse200ApplicationJSONType = {
190
+ File: "file",
191
+ } as const;
192
+ /**
193
+ * The type of the content part. Always `file`.
194
+ */
195
+ export type UpdateDatapoint2DatasetsResponse200ApplicationJSONType = ClosedEnum<
196
+ typeof UpdateDatapoint2DatasetsResponse200ApplicationJSONType
197
+ >;
198
+
199
+ export type UpdateDatapoint2DatasetsFile = {
200
+ /**
201
+ * The base64 encoded file data, used when passing the file to the model as a string.
202
+ */
203
+ fileData: string;
204
+ /**
205
+ * The name of the file, used when passing the file to the model as a string.
206
+ */
207
+ filename?: string | undefined;
208
+ };
209
+
210
+ export type UpdateDatapoint2Datasets3 = {
211
+ /**
212
+ * The type of the content part. Always `file`.
213
+ */
214
+ type: UpdateDatapoint2DatasetsResponse200ApplicationJSONType;
215
+ file: UpdateDatapoint2DatasetsFile;
216
+ };
217
+
218
+ export const UpdateDatapoint2DatasetsResponse200Type = {
219
+ ImageUrl: "image_url",
220
+ } as const;
221
+ export type UpdateDatapoint2DatasetsResponse200Type = ClosedEnum<
222
+ typeof UpdateDatapoint2DatasetsResponse200Type
223
+ >;
224
+
225
+ export type UpdateDatapoint2DatasetsImageUrl = {
226
+ /**
227
+ * The orq.ai id of the image
228
+ */
229
+ id?: string | undefined;
230
+ /**
231
+ * Either a URL of the image or the base64 encoded data URI.
232
+ */
233
+ url: string;
234
+ /**
235
+ * Specifies the detail level of the image. Currently only supported with OpenAI models
236
+ */
237
+ detail?: string | undefined;
238
+ };
239
+
240
+ /**
241
+ * The image part of the prompt message. Only supported with vision models.
242
+ */
243
+ export type UpdateDatapoint2Datasets2 = {
244
+ type: UpdateDatapoint2DatasetsResponse200Type;
245
+ imageUrl: UpdateDatapoint2DatasetsImageUrl;
246
+ };
247
+
248
+ export const UpdateDatapoint2DatasetsResponseType = {
249
+ Text: "text",
250
+ } as const;
251
+ export type UpdateDatapoint2DatasetsResponseType = ClosedEnum<
252
+ typeof UpdateDatapoint2DatasetsResponseType
253
+ >;
254
+
255
+ /**
256
+ * Text content part of a prompt message
257
+ */
258
+ export type UpdateDatapoint2Datasets1 = {
259
+ type: UpdateDatapoint2DatasetsResponseType;
260
+ text: string;
261
+ };
262
+
263
+ export type UpdateDatapointContentDatasets2 =
264
+ | UpdateDatapoint2Datasets1
265
+ | UpdateDatapoint2Datasets2
266
+ | UpdateDatapoint2Datasets3;
267
+
268
+ /**
269
+ * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
270
+ */
271
+ export type UpdateDatapointDatasetsContent =
272
+ | string
273
+ | Array<
274
+ | UpdateDatapoint2Datasets1
275
+ | UpdateDatapoint2Datasets2
276
+ | UpdateDatapoint2Datasets3
277
+ >;
278
+
279
+ export const UpdateDatapointDatasetsType = {
280
+ Function: "function",
281
+ } as const;
282
+ export type UpdateDatapointDatasetsType = ClosedEnum<
283
+ typeof UpdateDatapointDatasetsType
284
+ >;
285
+
286
+ export type UpdateDatapointDatasetsFunction = {
287
+ name: string;
288
+ /**
289
+ * JSON string arguments for the functions
290
+ */
291
+ arguments: string;
292
+ };
293
+
294
+ export type UpdateDatapointDatasetsToolCalls = {
295
+ id?: string | undefined;
296
+ index?: number | undefined;
297
+ type: UpdateDatapointDatasetsType;
298
+ function: UpdateDatapointDatasetsFunction;
299
+ };
300
+
301
+ export type UpdateDatapointDatasetsMessages = {
302
+ /**
303
+ * The role of the prompt message
304
+ */
305
+ role: UpdateDatapointDatasetsRole;
306
+ /**
307
+ * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
308
+ */
309
+ content:
310
+ | string
311
+ | Array<
312
+ | UpdateDatapoint2Datasets1
313
+ | UpdateDatapoint2Datasets2
314
+ | UpdateDatapoint2Datasets3
315
+ >;
316
+ toolCalls?: Array<UpdateDatapointDatasetsToolCalls> | undefined;
317
+ toolCallId?: string | undefined;
318
+ };
319
+
320
+ /**
321
+ * Dataset item updated.
322
+ */
323
+ export type UpdateDatapointResponseBody = {
324
+ /**
325
+ * The unique identifier of the dataset item
326
+ */
327
+ id: string;
328
+ /**
329
+ * The unique identifier of the workspace it belongs to
330
+ */
331
+ workspaceId: string;
332
+ /**
333
+ * The inputs of the dataset. Key value pairs where the key is the input name and the value is the input value. Nested objects are not supported.
334
+ */
335
+ inputs?: { [k: string]: any } | undefined;
336
+ /**
337
+ * The prompt template messages
338
+ */
339
+ messages?: Array<UpdateDatapointDatasetsMessages> | undefined;
340
+ expectedOutput?: string | undefined;
341
+ /**
342
+ * The unique identifier of the dataset
343
+ */
344
+ datasetId: string;
345
+ /**
346
+ * The unique identifier of the user who created the dataset
347
+ */
348
+ createdById?: string | undefined;
349
+ /**
350
+ * The unique identifier of the user who last updated the dataset
351
+ */
352
+ updatedById?: string | undefined;
353
+ /**
354
+ * The date and time the resource was created
355
+ */
356
+ created?: Date | undefined;
357
+ /**
358
+ * The date and time the resource was last updated
359
+ */
360
+ updated?: Date | undefined;
361
+ };
362
+
363
+ /** @internal */
364
+ export const UpdateDatapointRole$inboundSchema: z.ZodNativeEnum<
365
+ typeof UpdateDatapointRole
366
+ > = z.nativeEnum(UpdateDatapointRole);
367
+
368
+ /** @internal */
369
+ export const UpdateDatapointRole$outboundSchema: z.ZodNativeEnum<
370
+ typeof UpdateDatapointRole
371
+ > = UpdateDatapointRole$inboundSchema;
372
+
373
+ /**
374
+ * @internal
375
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
376
+ */
377
+ export namespace UpdateDatapointRole$ {
378
+ /** @deprecated use `UpdateDatapointRole$inboundSchema` instead. */
379
+ export const inboundSchema = UpdateDatapointRole$inboundSchema;
380
+ /** @deprecated use `UpdateDatapointRole$outboundSchema` instead. */
381
+ export const outboundSchema = UpdateDatapointRole$outboundSchema;
382
+ }
383
+
384
+ /** @internal */
385
+ export const UpdateDatapoint2DatasetsRequestType$inboundSchema: z.ZodNativeEnum<
386
+ typeof UpdateDatapoint2DatasetsRequestType
387
+ > = z.nativeEnum(UpdateDatapoint2DatasetsRequestType);
388
+
389
+ /** @internal */
390
+ export const UpdateDatapoint2DatasetsRequestType$outboundSchema:
391
+ z.ZodNativeEnum<typeof UpdateDatapoint2DatasetsRequestType> =
392
+ UpdateDatapoint2DatasetsRequestType$inboundSchema;
393
+
394
+ /**
395
+ * @internal
396
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
397
+ */
398
+ export namespace UpdateDatapoint2DatasetsRequestType$ {
399
+ /** @deprecated use `UpdateDatapoint2DatasetsRequestType$inboundSchema` instead. */
400
+ export const inboundSchema =
401
+ UpdateDatapoint2DatasetsRequestType$inboundSchema;
402
+ /** @deprecated use `UpdateDatapoint2DatasetsRequestType$outboundSchema` instead. */
403
+ export const outboundSchema =
404
+ UpdateDatapoint2DatasetsRequestType$outboundSchema;
405
+ }
406
+
407
+ /** @internal */
408
+ export const UpdateDatapoint2File$inboundSchema: z.ZodType<
409
+ UpdateDatapoint2File,
410
+ z.ZodTypeDef,
411
+ unknown
412
+ > = z.object({
413
+ file_data: z.string(),
414
+ filename: z.string().optional(),
415
+ }).transform((v) => {
416
+ return remap$(v, {
417
+ "file_data": "fileData",
418
+ });
419
+ });
420
+
421
+ /** @internal */
422
+ export type UpdateDatapoint2File$Outbound = {
423
+ file_data: string;
424
+ filename?: string | undefined;
425
+ };
426
+
427
+ /** @internal */
428
+ export const UpdateDatapoint2File$outboundSchema: z.ZodType<
429
+ UpdateDatapoint2File$Outbound,
430
+ z.ZodTypeDef,
431
+ UpdateDatapoint2File
432
+ > = z.object({
433
+ fileData: z.string(),
434
+ filename: z.string().optional(),
435
+ }).transform((v) => {
436
+ return remap$(v, {
437
+ fileData: "file_data",
438
+ });
439
+ });
440
+
441
+ /**
442
+ * @internal
443
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
444
+ */
445
+ export namespace UpdateDatapoint2File$ {
446
+ /** @deprecated use `UpdateDatapoint2File$inboundSchema` instead. */
447
+ export const inboundSchema = UpdateDatapoint2File$inboundSchema;
448
+ /** @deprecated use `UpdateDatapoint2File$outboundSchema` instead. */
449
+ export const outboundSchema = UpdateDatapoint2File$outboundSchema;
450
+ /** @deprecated use `UpdateDatapoint2File$Outbound` instead. */
451
+ export type Outbound = UpdateDatapoint2File$Outbound;
452
+ }
453
+
454
+ export function updateDatapoint2FileToJSON(
455
+ updateDatapoint2File: UpdateDatapoint2File,
456
+ ): string {
457
+ return JSON.stringify(
458
+ UpdateDatapoint2File$outboundSchema.parse(updateDatapoint2File),
459
+ );
460
+ }
461
+
462
+ export function updateDatapoint2FileFromJSON(
463
+ jsonString: string,
464
+ ): SafeParseResult<UpdateDatapoint2File, SDKValidationError> {
465
+ return safeParse(
466
+ jsonString,
467
+ (x) => UpdateDatapoint2File$inboundSchema.parse(JSON.parse(x)),
468
+ `Failed to parse 'UpdateDatapoint2File' from JSON`,
469
+ );
470
+ }
471
+
472
+ /** @internal */
473
+ export const UpdateDatapoint23$inboundSchema: z.ZodType<
474
+ UpdateDatapoint23,
475
+ z.ZodTypeDef,
476
+ unknown
477
+ > = z.object({
478
+ type: UpdateDatapoint2DatasetsRequestType$inboundSchema,
479
+ file: z.lazy(() => UpdateDatapoint2File$inboundSchema),
480
+ });
481
+
482
+ /** @internal */
483
+ export type UpdateDatapoint23$Outbound = {
484
+ type: string;
485
+ file: UpdateDatapoint2File$Outbound;
486
+ };
487
+
488
+ /** @internal */
489
+ export const UpdateDatapoint23$outboundSchema: z.ZodType<
490
+ UpdateDatapoint23$Outbound,
491
+ z.ZodTypeDef,
492
+ UpdateDatapoint23
493
+ > = z.object({
494
+ type: UpdateDatapoint2DatasetsRequestType$outboundSchema,
495
+ file: z.lazy(() => UpdateDatapoint2File$outboundSchema),
496
+ });
497
+
498
+ /**
499
+ * @internal
500
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
501
+ */
502
+ export namespace UpdateDatapoint23$ {
503
+ /** @deprecated use `UpdateDatapoint23$inboundSchema` instead. */
504
+ export const inboundSchema = UpdateDatapoint23$inboundSchema;
505
+ /** @deprecated use `UpdateDatapoint23$outboundSchema` instead. */
506
+ export const outboundSchema = UpdateDatapoint23$outboundSchema;
507
+ /** @deprecated use `UpdateDatapoint23$Outbound` instead. */
508
+ export type Outbound = UpdateDatapoint23$Outbound;
509
+ }
510
+
511
+ export function updateDatapoint23ToJSON(
512
+ updateDatapoint23: UpdateDatapoint23,
513
+ ): string {
514
+ return JSON.stringify(
515
+ UpdateDatapoint23$outboundSchema.parse(updateDatapoint23),
516
+ );
517
+ }
518
+
519
+ export function updateDatapoint23FromJSON(
520
+ jsonString: string,
521
+ ): SafeParseResult<UpdateDatapoint23, SDKValidationError> {
522
+ return safeParse(
523
+ jsonString,
524
+ (x) => UpdateDatapoint23$inboundSchema.parse(JSON.parse(x)),
525
+ `Failed to parse 'UpdateDatapoint23' from JSON`,
526
+ );
527
+ }
528
+
529
+ /** @internal */
530
+ export const UpdateDatapoint2DatasetsType$inboundSchema: z.ZodNativeEnum<
531
+ typeof UpdateDatapoint2DatasetsType
532
+ > = z.nativeEnum(UpdateDatapoint2DatasetsType);
533
+
534
+ /** @internal */
535
+ export const UpdateDatapoint2DatasetsType$outboundSchema: z.ZodNativeEnum<
536
+ typeof UpdateDatapoint2DatasetsType
537
+ > = UpdateDatapoint2DatasetsType$inboundSchema;
538
+
539
+ /**
540
+ * @internal
541
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
542
+ */
543
+ export namespace UpdateDatapoint2DatasetsType$ {
544
+ /** @deprecated use `UpdateDatapoint2DatasetsType$inboundSchema` instead. */
545
+ export const inboundSchema = UpdateDatapoint2DatasetsType$inboundSchema;
546
+ /** @deprecated use `UpdateDatapoint2DatasetsType$outboundSchema` instead. */
547
+ export const outboundSchema = UpdateDatapoint2DatasetsType$outboundSchema;
548
+ }
549
+
550
+ /** @internal */
551
+ export const UpdateDatapoint2ImageUrl$inboundSchema: z.ZodType<
552
+ UpdateDatapoint2ImageUrl,
553
+ z.ZodTypeDef,
554
+ unknown
555
+ > = z.object({
556
+ url: z.string(),
557
+ detail: z.string().optional(),
558
+ });
559
+
560
+ /** @internal */
561
+ export type UpdateDatapoint2ImageUrl$Outbound = {
562
+ url: string;
563
+ detail?: string | undefined;
564
+ };
565
+
566
+ /** @internal */
567
+ export const UpdateDatapoint2ImageUrl$outboundSchema: z.ZodType<
568
+ UpdateDatapoint2ImageUrl$Outbound,
569
+ z.ZodTypeDef,
570
+ UpdateDatapoint2ImageUrl
571
+ > = z.object({
572
+ url: z.string(),
573
+ detail: z.string().optional(),
574
+ });
575
+
576
+ /**
577
+ * @internal
578
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
579
+ */
580
+ export namespace UpdateDatapoint2ImageUrl$ {
581
+ /** @deprecated use `UpdateDatapoint2ImageUrl$inboundSchema` instead. */
582
+ export const inboundSchema = UpdateDatapoint2ImageUrl$inboundSchema;
583
+ /** @deprecated use `UpdateDatapoint2ImageUrl$outboundSchema` instead. */
584
+ export const outboundSchema = UpdateDatapoint2ImageUrl$outboundSchema;
585
+ /** @deprecated use `UpdateDatapoint2ImageUrl$Outbound` instead. */
586
+ export type Outbound = UpdateDatapoint2ImageUrl$Outbound;
587
+ }
588
+
589
+ export function updateDatapoint2ImageUrlToJSON(
590
+ updateDatapoint2ImageUrl: UpdateDatapoint2ImageUrl,
591
+ ): string {
592
+ return JSON.stringify(
593
+ UpdateDatapoint2ImageUrl$outboundSchema.parse(updateDatapoint2ImageUrl),
594
+ );
595
+ }
596
+
597
+ export function updateDatapoint2ImageUrlFromJSON(
598
+ jsonString: string,
599
+ ): SafeParseResult<UpdateDatapoint2ImageUrl, SDKValidationError> {
600
+ return safeParse(
601
+ jsonString,
602
+ (x) => UpdateDatapoint2ImageUrl$inboundSchema.parse(JSON.parse(x)),
603
+ `Failed to parse 'UpdateDatapoint2ImageUrl' from JSON`,
604
+ );
605
+ }
606
+
607
+ /** @internal */
608
+ export const UpdateDatapoint22$inboundSchema: z.ZodType<
609
+ UpdateDatapoint22,
610
+ z.ZodTypeDef,
611
+ unknown
612
+ > = z.object({
613
+ type: UpdateDatapoint2DatasetsType$inboundSchema,
614
+ image_url: z.lazy(() => UpdateDatapoint2ImageUrl$inboundSchema),
615
+ }).transform((v) => {
616
+ return remap$(v, {
617
+ "image_url": "imageUrl",
618
+ });
619
+ });
620
+
621
+ /** @internal */
622
+ export type UpdateDatapoint22$Outbound = {
623
+ type: string;
624
+ image_url: UpdateDatapoint2ImageUrl$Outbound;
625
+ };
626
+
627
+ /** @internal */
628
+ export const UpdateDatapoint22$outboundSchema: z.ZodType<
629
+ UpdateDatapoint22$Outbound,
630
+ z.ZodTypeDef,
631
+ UpdateDatapoint22
632
+ > = z.object({
633
+ type: UpdateDatapoint2DatasetsType$outboundSchema,
634
+ imageUrl: z.lazy(() => UpdateDatapoint2ImageUrl$outboundSchema),
635
+ }).transform((v) => {
636
+ return remap$(v, {
637
+ imageUrl: "image_url",
638
+ });
639
+ });
640
+
641
+ /**
642
+ * @internal
643
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
644
+ */
645
+ export namespace UpdateDatapoint22$ {
646
+ /** @deprecated use `UpdateDatapoint22$inboundSchema` instead. */
647
+ export const inboundSchema = UpdateDatapoint22$inboundSchema;
648
+ /** @deprecated use `UpdateDatapoint22$outboundSchema` instead. */
649
+ export const outboundSchema = UpdateDatapoint22$outboundSchema;
650
+ /** @deprecated use `UpdateDatapoint22$Outbound` instead. */
651
+ export type Outbound = UpdateDatapoint22$Outbound;
652
+ }
653
+
654
+ export function updateDatapoint22ToJSON(
655
+ updateDatapoint22: UpdateDatapoint22,
656
+ ): string {
657
+ return JSON.stringify(
658
+ UpdateDatapoint22$outboundSchema.parse(updateDatapoint22),
659
+ );
660
+ }
661
+
662
+ export function updateDatapoint22FromJSON(
663
+ jsonString: string,
664
+ ): SafeParseResult<UpdateDatapoint22, SDKValidationError> {
665
+ return safeParse(
666
+ jsonString,
667
+ (x) => UpdateDatapoint22$inboundSchema.parse(JSON.parse(x)),
668
+ `Failed to parse 'UpdateDatapoint22' from JSON`,
669
+ );
670
+ }
671
+
672
+ /** @internal */
673
+ export const UpdateDatapoint2Type$inboundSchema: z.ZodNativeEnum<
674
+ typeof UpdateDatapoint2Type
675
+ > = z.nativeEnum(UpdateDatapoint2Type);
676
+
677
+ /** @internal */
678
+ export const UpdateDatapoint2Type$outboundSchema: z.ZodNativeEnum<
679
+ typeof UpdateDatapoint2Type
680
+ > = UpdateDatapoint2Type$inboundSchema;
681
+
682
+ /**
683
+ * @internal
684
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
685
+ */
686
+ export namespace UpdateDatapoint2Type$ {
687
+ /** @deprecated use `UpdateDatapoint2Type$inboundSchema` instead. */
688
+ export const inboundSchema = UpdateDatapoint2Type$inboundSchema;
689
+ /** @deprecated use `UpdateDatapoint2Type$outboundSchema` instead. */
690
+ export const outboundSchema = UpdateDatapoint2Type$outboundSchema;
691
+ }
692
+
693
+ /** @internal */
694
+ export const UpdateDatapoint21$inboundSchema: z.ZodType<
695
+ UpdateDatapoint21,
696
+ z.ZodTypeDef,
697
+ unknown
698
+ > = z.object({
699
+ type: UpdateDatapoint2Type$inboundSchema,
700
+ text: z.string(),
701
+ });
702
+
703
+ /** @internal */
704
+ export type UpdateDatapoint21$Outbound = {
705
+ type: string;
706
+ text: string;
707
+ };
708
+
709
+ /** @internal */
710
+ export const UpdateDatapoint21$outboundSchema: z.ZodType<
711
+ UpdateDatapoint21$Outbound,
712
+ z.ZodTypeDef,
713
+ UpdateDatapoint21
714
+ > = z.object({
715
+ type: UpdateDatapoint2Type$outboundSchema,
716
+ text: z.string(),
717
+ });
718
+
719
+ /**
720
+ * @internal
721
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
722
+ */
723
+ export namespace UpdateDatapoint21$ {
724
+ /** @deprecated use `UpdateDatapoint21$inboundSchema` instead. */
725
+ export const inboundSchema = UpdateDatapoint21$inboundSchema;
726
+ /** @deprecated use `UpdateDatapoint21$outboundSchema` instead. */
727
+ export const outboundSchema = UpdateDatapoint21$outboundSchema;
728
+ /** @deprecated use `UpdateDatapoint21$Outbound` instead. */
729
+ export type Outbound = UpdateDatapoint21$Outbound;
730
+ }
731
+
732
+ export function updateDatapoint21ToJSON(
733
+ updateDatapoint21: UpdateDatapoint21,
734
+ ): string {
735
+ return JSON.stringify(
736
+ UpdateDatapoint21$outboundSchema.parse(updateDatapoint21),
737
+ );
738
+ }
739
+
740
+ export function updateDatapoint21FromJSON(
741
+ jsonString: string,
742
+ ): SafeParseResult<UpdateDatapoint21, SDKValidationError> {
743
+ return safeParse(
744
+ jsonString,
745
+ (x) => UpdateDatapoint21$inboundSchema.parse(JSON.parse(x)),
746
+ `Failed to parse 'UpdateDatapoint21' from JSON`,
747
+ );
748
+ }
749
+
750
+ /** @internal */
751
+ export const UpdateDatapointContent2$inboundSchema: z.ZodType<
752
+ UpdateDatapointContent2,
753
+ z.ZodTypeDef,
754
+ unknown
755
+ > = z.union([
756
+ z.lazy(() => UpdateDatapoint21$inboundSchema),
757
+ z.lazy(() => UpdateDatapoint22$inboundSchema),
758
+ z.lazy(() => UpdateDatapoint23$inboundSchema),
759
+ ]);
760
+
761
+ /** @internal */
762
+ export type UpdateDatapointContent2$Outbound =
763
+ | UpdateDatapoint21$Outbound
764
+ | UpdateDatapoint22$Outbound
765
+ | UpdateDatapoint23$Outbound;
766
+
767
+ /** @internal */
768
+ export const UpdateDatapointContent2$outboundSchema: z.ZodType<
769
+ UpdateDatapointContent2$Outbound,
770
+ z.ZodTypeDef,
771
+ UpdateDatapointContent2
772
+ > = z.union([
773
+ z.lazy(() => UpdateDatapoint21$outboundSchema),
774
+ z.lazy(() => UpdateDatapoint22$outboundSchema),
775
+ z.lazy(() => UpdateDatapoint23$outboundSchema),
776
+ ]);
777
+
778
+ /**
779
+ * @internal
780
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
781
+ */
782
+ export namespace UpdateDatapointContent2$ {
783
+ /** @deprecated use `UpdateDatapointContent2$inboundSchema` instead. */
784
+ export const inboundSchema = UpdateDatapointContent2$inboundSchema;
785
+ /** @deprecated use `UpdateDatapointContent2$outboundSchema` instead. */
786
+ export const outboundSchema = UpdateDatapointContent2$outboundSchema;
787
+ /** @deprecated use `UpdateDatapointContent2$Outbound` instead. */
788
+ export type Outbound = UpdateDatapointContent2$Outbound;
789
+ }
790
+
791
+ export function updateDatapointContent2ToJSON(
792
+ updateDatapointContent2: UpdateDatapointContent2,
793
+ ): string {
794
+ return JSON.stringify(
795
+ UpdateDatapointContent2$outboundSchema.parse(updateDatapointContent2),
796
+ );
797
+ }
798
+
799
+ export function updateDatapointContent2FromJSON(
800
+ jsonString: string,
801
+ ): SafeParseResult<UpdateDatapointContent2, SDKValidationError> {
802
+ return safeParse(
803
+ jsonString,
804
+ (x) => UpdateDatapointContent2$inboundSchema.parse(JSON.parse(x)),
805
+ `Failed to parse 'UpdateDatapointContent2' from JSON`,
806
+ );
807
+ }
808
+
809
+ /** @internal */
810
+ export const UpdateDatapointContent$inboundSchema: z.ZodType<
811
+ UpdateDatapointContent,
812
+ z.ZodTypeDef,
813
+ unknown
814
+ > = z.union([
815
+ z.string(),
816
+ z.array(z.union([
817
+ z.lazy(() => UpdateDatapoint21$inboundSchema),
818
+ z.lazy(() => UpdateDatapoint22$inboundSchema),
819
+ z.lazy(() => UpdateDatapoint23$inboundSchema),
820
+ ])),
821
+ ]);
822
+
823
+ /** @internal */
824
+ export type UpdateDatapointContent$Outbound =
825
+ | string
826
+ | Array<
827
+ | UpdateDatapoint21$Outbound
828
+ | UpdateDatapoint22$Outbound
829
+ | UpdateDatapoint23$Outbound
830
+ >;
831
+
832
+ /** @internal */
833
+ export const UpdateDatapointContent$outboundSchema: z.ZodType<
834
+ UpdateDatapointContent$Outbound,
835
+ z.ZodTypeDef,
836
+ UpdateDatapointContent
837
+ > = z.union([
838
+ z.string(),
839
+ z.array(z.union([
840
+ z.lazy(() => UpdateDatapoint21$outboundSchema),
841
+ z.lazy(() => UpdateDatapoint22$outboundSchema),
842
+ z.lazy(() => UpdateDatapoint23$outboundSchema),
843
+ ])),
844
+ ]);
845
+
846
+ /**
847
+ * @internal
848
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
849
+ */
850
+ export namespace UpdateDatapointContent$ {
851
+ /** @deprecated use `UpdateDatapointContent$inboundSchema` instead. */
852
+ export const inboundSchema = UpdateDatapointContent$inboundSchema;
853
+ /** @deprecated use `UpdateDatapointContent$outboundSchema` instead. */
854
+ export const outboundSchema = UpdateDatapointContent$outboundSchema;
855
+ /** @deprecated use `UpdateDatapointContent$Outbound` instead. */
856
+ export type Outbound = UpdateDatapointContent$Outbound;
857
+ }
858
+
859
+ export function updateDatapointContentToJSON(
860
+ updateDatapointContent: UpdateDatapointContent,
861
+ ): string {
862
+ return JSON.stringify(
863
+ UpdateDatapointContent$outboundSchema.parse(updateDatapointContent),
864
+ );
865
+ }
866
+
867
+ export function updateDatapointContentFromJSON(
868
+ jsonString: string,
869
+ ): SafeParseResult<UpdateDatapointContent, SDKValidationError> {
870
+ return safeParse(
871
+ jsonString,
872
+ (x) => UpdateDatapointContent$inboundSchema.parse(JSON.parse(x)),
873
+ `Failed to parse 'UpdateDatapointContent' from JSON`,
874
+ );
875
+ }
876
+
877
+ /** @internal */
878
+ export const UpdateDatapointType$inboundSchema: z.ZodNativeEnum<
879
+ typeof UpdateDatapointType
880
+ > = z.nativeEnum(UpdateDatapointType);
881
+
882
+ /** @internal */
883
+ export const UpdateDatapointType$outboundSchema: z.ZodNativeEnum<
884
+ typeof UpdateDatapointType
885
+ > = UpdateDatapointType$inboundSchema;
886
+
887
+ /**
888
+ * @internal
889
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
890
+ */
891
+ export namespace UpdateDatapointType$ {
892
+ /** @deprecated use `UpdateDatapointType$inboundSchema` instead. */
893
+ export const inboundSchema = UpdateDatapointType$inboundSchema;
894
+ /** @deprecated use `UpdateDatapointType$outboundSchema` instead. */
895
+ export const outboundSchema = UpdateDatapointType$outboundSchema;
896
+ }
897
+
898
+ /** @internal */
899
+ export const UpdateDatapointFunction$inboundSchema: z.ZodType<
900
+ UpdateDatapointFunction,
901
+ z.ZodTypeDef,
902
+ unknown
903
+ > = z.object({
904
+ name: z.string(),
905
+ arguments: z.string(),
906
+ });
907
+
908
+ /** @internal */
909
+ export type UpdateDatapointFunction$Outbound = {
910
+ name: string;
911
+ arguments: string;
912
+ };
913
+
914
+ /** @internal */
915
+ export const UpdateDatapointFunction$outboundSchema: z.ZodType<
916
+ UpdateDatapointFunction$Outbound,
917
+ z.ZodTypeDef,
918
+ UpdateDatapointFunction
919
+ > = z.object({
920
+ name: z.string(),
921
+ arguments: z.string(),
922
+ });
923
+
924
+ /**
925
+ * @internal
926
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
927
+ */
928
+ export namespace UpdateDatapointFunction$ {
929
+ /** @deprecated use `UpdateDatapointFunction$inboundSchema` instead. */
930
+ export const inboundSchema = UpdateDatapointFunction$inboundSchema;
931
+ /** @deprecated use `UpdateDatapointFunction$outboundSchema` instead. */
932
+ export const outboundSchema = UpdateDatapointFunction$outboundSchema;
933
+ /** @deprecated use `UpdateDatapointFunction$Outbound` instead. */
934
+ export type Outbound = UpdateDatapointFunction$Outbound;
935
+ }
936
+
937
+ export function updateDatapointFunctionToJSON(
938
+ updateDatapointFunction: UpdateDatapointFunction,
939
+ ): string {
940
+ return JSON.stringify(
941
+ UpdateDatapointFunction$outboundSchema.parse(updateDatapointFunction),
942
+ );
943
+ }
944
+
945
+ export function updateDatapointFunctionFromJSON(
946
+ jsonString: string,
947
+ ): SafeParseResult<UpdateDatapointFunction, SDKValidationError> {
948
+ return safeParse(
949
+ jsonString,
950
+ (x) => UpdateDatapointFunction$inboundSchema.parse(JSON.parse(x)),
951
+ `Failed to parse 'UpdateDatapointFunction' from JSON`,
952
+ );
953
+ }
954
+
955
+ /** @internal */
956
+ export const UpdateDatapointToolCalls$inboundSchema: z.ZodType<
957
+ UpdateDatapointToolCalls,
958
+ z.ZodTypeDef,
959
+ unknown
960
+ > = z.object({
961
+ id: z.string().optional(),
962
+ index: z.number().optional(),
963
+ type: UpdateDatapointType$inboundSchema,
964
+ function: z.lazy(() => UpdateDatapointFunction$inboundSchema),
965
+ });
966
+
967
+ /** @internal */
968
+ export type UpdateDatapointToolCalls$Outbound = {
969
+ id?: string | undefined;
970
+ index?: number | undefined;
971
+ type: string;
972
+ function: UpdateDatapointFunction$Outbound;
973
+ };
974
+
975
+ /** @internal */
976
+ export const UpdateDatapointToolCalls$outboundSchema: z.ZodType<
977
+ UpdateDatapointToolCalls$Outbound,
978
+ z.ZodTypeDef,
979
+ UpdateDatapointToolCalls
980
+ > = z.object({
981
+ id: z.string().optional(),
982
+ index: z.number().optional(),
983
+ type: UpdateDatapointType$outboundSchema,
984
+ function: z.lazy(() => UpdateDatapointFunction$outboundSchema),
985
+ });
986
+
987
+ /**
988
+ * @internal
989
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
990
+ */
991
+ export namespace UpdateDatapointToolCalls$ {
992
+ /** @deprecated use `UpdateDatapointToolCalls$inboundSchema` instead. */
993
+ export const inboundSchema = UpdateDatapointToolCalls$inboundSchema;
994
+ /** @deprecated use `UpdateDatapointToolCalls$outboundSchema` instead. */
995
+ export const outboundSchema = UpdateDatapointToolCalls$outboundSchema;
996
+ /** @deprecated use `UpdateDatapointToolCalls$Outbound` instead. */
997
+ export type Outbound = UpdateDatapointToolCalls$Outbound;
998
+ }
999
+
1000
+ export function updateDatapointToolCallsToJSON(
1001
+ updateDatapointToolCalls: UpdateDatapointToolCalls,
1002
+ ): string {
1003
+ return JSON.stringify(
1004
+ UpdateDatapointToolCalls$outboundSchema.parse(updateDatapointToolCalls),
1005
+ );
1006
+ }
1007
+
1008
+ export function updateDatapointToolCallsFromJSON(
1009
+ jsonString: string,
1010
+ ): SafeParseResult<UpdateDatapointToolCalls, SDKValidationError> {
1011
+ return safeParse(
1012
+ jsonString,
1013
+ (x) => UpdateDatapointToolCalls$inboundSchema.parse(JSON.parse(x)),
1014
+ `Failed to parse 'UpdateDatapointToolCalls' from JSON`,
1015
+ );
1016
+ }
1017
+
1018
+ /** @internal */
1019
+ export const UpdateDatapointMessages$inboundSchema: z.ZodType<
1020
+ UpdateDatapointMessages,
1021
+ z.ZodTypeDef,
1022
+ unknown
1023
+ > = z.object({
1024
+ role: UpdateDatapointRole$inboundSchema,
1025
+ content: z.union([
1026
+ z.string(),
1027
+ z.array(z.union([
1028
+ z.lazy(() => UpdateDatapoint21$inboundSchema),
1029
+ z.lazy(() => UpdateDatapoint22$inboundSchema),
1030
+ z.lazy(() => UpdateDatapoint23$inboundSchema),
1031
+ ])),
1032
+ ]),
1033
+ tool_calls: z.array(z.lazy(() => UpdateDatapointToolCalls$inboundSchema))
1034
+ .optional(),
1035
+ tool_call_id: z.string().optional(),
1036
+ }).transform((v) => {
1037
+ return remap$(v, {
1038
+ "tool_calls": "toolCalls",
1039
+ "tool_call_id": "toolCallId",
1040
+ });
1041
+ });
1042
+
1043
+ /** @internal */
1044
+ export type UpdateDatapointMessages$Outbound = {
1045
+ role: string;
1046
+ content:
1047
+ | string
1048
+ | Array<
1049
+ | UpdateDatapoint21$Outbound
1050
+ | UpdateDatapoint22$Outbound
1051
+ | UpdateDatapoint23$Outbound
1052
+ >;
1053
+ tool_calls?: Array<UpdateDatapointToolCalls$Outbound> | undefined;
1054
+ tool_call_id?: string | undefined;
1055
+ };
1056
+
1057
+ /** @internal */
1058
+ export const UpdateDatapointMessages$outboundSchema: z.ZodType<
1059
+ UpdateDatapointMessages$Outbound,
1060
+ z.ZodTypeDef,
1061
+ UpdateDatapointMessages
1062
+ > = z.object({
1063
+ role: UpdateDatapointRole$outboundSchema,
1064
+ content: z.union([
1065
+ z.string(),
1066
+ z.array(z.union([
1067
+ z.lazy(() => UpdateDatapoint21$outboundSchema),
1068
+ z.lazy(() => UpdateDatapoint22$outboundSchema),
1069
+ z.lazy(() => UpdateDatapoint23$outboundSchema),
1070
+ ])),
1071
+ ]),
1072
+ toolCalls: z.array(z.lazy(() => UpdateDatapointToolCalls$outboundSchema))
1073
+ .optional(),
1074
+ toolCallId: z.string().optional(),
1075
+ }).transform((v) => {
1076
+ return remap$(v, {
1077
+ toolCalls: "tool_calls",
1078
+ toolCallId: "tool_call_id",
1079
+ });
1080
+ });
1081
+
1082
+ /**
1083
+ * @internal
1084
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1085
+ */
1086
+ export namespace UpdateDatapointMessages$ {
1087
+ /** @deprecated use `UpdateDatapointMessages$inboundSchema` instead. */
1088
+ export const inboundSchema = UpdateDatapointMessages$inboundSchema;
1089
+ /** @deprecated use `UpdateDatapointMessages$outboundSchema` instead. */
1090
+ export const outboundSchema = UpdateDatapointMessages$outboundSchema;
1091
+ /** @deprecated use `UpdateDatapointMessages$Outbound` instead. */
1092
+ export type Outbound = UpdateDatapointMessages$Outbound;
1093
+ }
1094
+
1095
+ export function updateDatapointMessagesToJSON(
1096
+ updateDatapointMessages: UpdateDatapointMessages,
1097
+ ): string {
1098
+ return JSON.stringify(
1099
+ UpdateDatapointMessages$outboundSchema.parse(updateDatapointMessages),
1100
+ );
1101
+ }
1102
+
1103
+ export function updateDatapointMessagesFromJSON(
1104
+ jsonString: string,
1105
+ ): SafeParseResult<UpdateDatapointMessages, SDKValidationError> {
1106
+ return safeParse(
1107
+ jsonString,
1108
+ (x) => UpdateDatapointMessages$inboundSchema.parse(JSON.parse(x)),
1109
+ `Failed to parse 'UpdateDatapointMessages' from JSON`,
1110
+ );
1111
+ }
1112
+
1113
+ /** @internal */
1114
+ export const UpdateDatapointRequestBody$inboundSchema: z.ZodType<
1115
+ UpdateDatapointRequestBody,
1116
+ z.ZodTypeDef,
1117
+ unknown
1118
+ > = z.object({
1119
+ inputs: z.record(z.any()).optional(),
1120
+ messages: z.array(z.lazy(() => UpdateDatapointMessages$inboundSchema))
1121
+ .optional(),
1122
+ expected_output: z.string().optional(),
1123
+ }).transform((v) => {
1124
+ return remap$(v, {
1125
+ "expected_output": "expectedOutput",
1126
+ });
1127
+ });
1128
+
1129
+ /** @internal */
1130
+ export type UpdateDatapointRequestBody$Outbound = {
1131
+ inputs?: { [k: string]: any } | undefined;
1132
+ messages?: Array<UpdateDatapointMessages$Outbound> | undefined;
1133
+ expected_output?: string | undefined;
1134
+ };
1135
+
1136
+ /** @internal */
1137
+ export const UpdateDatapointRequestBody$outboundSchema: z.ZodType<
1138
+ UpdateDatapointRequestBody$Outbound,
1139
+ z.ZodTypeDef,
1140
+ UpdateDatapointRequestBody
1141
+ > = z.object({
1142
+ inputs: z.record(z.any()).optional(),
1143
+ messages: z.array(z.lazy(() => UpdateDatapointMessages$outboundSchema))
1144
+ .optional(),
1145
+ expectedOutput: z.string().optional(),
1146
+ }).transform((v) => {
1147
+ return remap$(v, {
1148
+ expectedOutput: "expected_output",
1149
+ });
1150
+ });
1151
+
1152
+ /**
1153
+ * @internal
1154
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1155
+ */
1156
+ export namespace UpdateDatapointRequestBody$ {
1157
+ /** @deprecated use `UpdateDatapointRequestBody$inboundSchema` instead. */
1158
+ export const inboundSchema = UpdateDatapointRequestBody$inboundSchema;
1159
+ /** @deprecated use `UpdateDatapointRequestBody$outboundSchema` instead. */
1160
+ export const outboundSchema = UpdateDatapointRequestBody$outboundSchema;
1161
+ /** @deprecated use `UpdateDatapointRequestBody$Outbound` instead. */
1162
+ export type Outbound = UpdateDatapointRequestBody$Outbound;
1163
+ }
1164
+
1165
+ export function updateDatapointRequestBodyToJSON(
1166
+ updateDatapointRequestBody: UpdateDatapointRequestBody,
1167
+ ): string {
1168
+ return JSON.stringify(
1169
+ UpdateDatapointRequestBody$outboundSchema.parse(updateDatapointRequestBody),
1170
+ );
1171
+ }
1172
+
1173
+ export function updateDatapointRequestBodyFromJSON(
1174
+ jsonString: string,
1175
+ ): SafeParseResult<UpdateDatapointRequestBody, SDKValidationError> {
1176
+ return safeParse(
1177
+ jsonString,
1178
+ (x) => UpdateDatapointRequestBody$inboundSchema.parse(JSON.parse(x)),
1179
+ `Failed to parse 'UpdateDatapointRequestBody' from JSON`,
1180
+ );
1181
+ }
1182
+
1183
+ /** @internal */
1184
+ export const UpdateDatapointRequest$inboundSchema: z.ZodType<
1185
+ UpdateDatapointRequest,
1186
+ z.ZodTypeDef,
1187
+ unknown
1188
+ > = z.object({
1189
+ dataset_id: z.string(),
1190
+ datapoint_id: z.string(),
1191
+ RequestBody: z.lazy(() => UpdateDatapointRequestBody$inboundSchema)
1192
+ .optional(),
1193
+ }).transform((v) => {
1194
+ return remap$(v, {
1195
+ "dataset_id": "datasetId",
1196
+ "datapoint_id": "datapointId",
1197
+ "RequestBody": "requestBody",
1198
+ });
1199
+ });
1200
+
1201
+ /** @internal */
1202
+ export type UpdateDatapointRequest$Outbound = {
1203
+ dataset_id: string;
1204
+ datapoint_id: string;
1205
+ RequestBody?: UpdateDatapointRequestBody$Outbound | undefined;
1206
+ };
1207
+
1208
+ /** @internal */
1209
+ export const UpdateDatapointRequest$outboundSchema: z.ZodType<
1210
+ UpdateDatapointRequest$Outbound,
1211
+ z.ZodTypeDef,
1212
+ UpdateDatapointRequest
1213
+ > = z.object({
1214
+ datasetId: z.string(),
1215
+ datapointId: z.string(),
1216
+ requestBody: z.lazy(() => UpdateDatapointRequestBody$outboundSchema)
1217
+ .optional(),
1218
+ }).transform((v) => {
1219
+ return remap$(v, {
1220
+ datasetId: "dataset_id",
1221
+ datapointId: "datapoint_id",
1222
+ requestBody: "RequestBody",
1223
+ });
1224
+ });
1225
+
1226
+ /**
1227
+ * @internal
1228
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1229
+ */
1230
+ export namespace UpdateDatapointRequest$ {
1231
+ /** @deprecated use `UpdateDatapointRequest$inboundSchema` instead. */
1232
+ export const inboundSchema = UpdateDatapointRequest$inboundSchema;
1233
+ /** @deprecated use `UpdateDatapointRequest$outboundSchema` instead. */
1234
+ export const outboundSchema = UpdateDatapointRequest$outboundSchema;
1235
+ /** @deprecated use `UpdateDatapointRequest$Outbound` instead. */
1236
+ export type Outbound = UpdateDatapointRequest$Outbound;
1237
+ }
1238
+
1239
+ export function updateDatapointRequestToJSON(
1240
+ updateDatapointRequest: UpdateDatapointRequest,
1241
+ ): string {
1242
+ return JSON.stringify(
1243
+ UpdateDatapointRequest$outboundSchema.parse(updateDatapointRequest),
1244
+ );
1245
+ }
1246
+
1247
+ export function updateDatapointRequestFromJSON(
1248
+ jsonString: string,
1249
+ ): SafeParseResult<UpdateDatapointRequest, SDKValidationError> {
1250
+ return safeParse(
1251
+ jsonString,
1252
+ (x) => UpdateDatapointRequest$inboundSchema.parse(JSON.parse(x)),
1253
+ `Failed to parse 'UpdateDatapointRequest' from JSON`,
1254
+ );
1255
+ }
1256
+
1257
+ /** @internal */
1258
+ export const UpdateDatapointDatasetsRole$inboundSchema: z.ZodNativeEnum<
1259
+ typeof UpdateDatapointDatasetsRole
1260
+ > = z.nativeEnum(UpdateDatapointDatasetsRole);
1261
+
1262
+ /** @internal */
1263
+ export const UpdateDatapointDatasetsRole$outboundSchema: z.ZodNativeEnum<
1264
+ typeof UpdateDatapointDatasetsRole
1265
+ > = UpdateDatapointDatasetsRole$inboundSchema;
1266
+
1267
+ /**
1268
+ * @internal
1269
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1270
+ */
1271
+ export namespace UpdateDatapointDatasetsRole$ {
1272
+ /** @deprecated use `UpdateDatapointDatasetsRole$inboundSchema` instead. */
1273
+ export const inboundSchema = UpdateDatapointDatasetsRole$inboundSchema;
1274
+ /** @deprecated use `UpdateDatapointDatasetsRole$outboundSchema` instead. */
1275
+ export const outboundSchema = UpdateDatapointDatasetsRole$outboundSchema;
1276
+ }
1277
+
1278
+ /** @internal */
1279
+ export const UpdateDatapoint2DatasetsResponse200ApplicationJSONType$inboundSchema:
1280
+ z.ZodNativeEnum<
1281
+ typeof UpdateDatapoint2DatasetsResponse200ApplicationJSONType
1282
+ > = z.nativeEnum(UpdateDatapoint2DatasetsResponse200ApplicationJSONType);
1283
+
1284
+ /** @internal */
1285
+ export const UpdateDatapoint2DatasetsResponse200ApplicationJSONType$outboundSchema:
1286
+ z.ZodNativeEnum<
1287
+ typeof UpdateDatapoint2DatasetsResponse200ApplicationJSONType
1288
+ > = UpdateDatapoint2DatasetsResponse200ApplicationJSONType$inboundSchema;
1289
+
1290
+ /**
1291
+ * @internal
1292
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1293
+ */
1294
+ export namespace UpdateDatapoint2DatasetsResponse200ApplicationJSONType$ {
1295
+ /** @deprecated use `UpdateDatapoint2DatasetsResponse200ApplicationJSONType$inboundSchema` instead. */
1296
+ export const inboundSchema =
1297
+ UpdateDatapoint2DatasetsResponse200ApplicationJSONType$inboundSchema;
1298
+ /** @deprecated use `UpdateDatapoint2DatasetsResponse200ApplicationJSONType$outboundSchema` instead. */
1299
+ export const outboundSchema =
1300
+ UpdateDatapoint2DatasetsResponse200ApplicationJSONType$outboundSchema;
1301
+ }
1302
+
1303
+ /** @internal */
1304
+ export const UpdateDatapoint2DatasetsFile$inboundSchema: z.ZodType<
1305
+ UpdateDatapoint2DatasetsFile,
1306
+ z.ZodTypeDef,
1307
+ unknown
1308
+ > = z.object({
1309
+ file_data: z.string(),
1310
+ filename: z.string().optional(),
1311
+ }).transform((v) => {
1312
+ return remap$(v, {
1313
+ "file_data": "fileData",
1314
+ });
1315
+ });
1316
+
1317
+ /** @internal */
1318
+ export type UpdateDatapoint2DatasetsFile$Outbound = {
1319
+ file_data: string;
1320
+ filename?: string | undefined;
1321
+ };
1322
+
1323
+ /** @internal */
1324
+ export const UpdateDatapoint2DatasetsFile$outboundSchema: z.ZodType<
1325
+ UpdateDatapoint2DatasetsFile$Outbound,
1326
+ z.ZodTypeDef,
1327
+ UpdateDatapoint2DatasetsFile
1328
+ > = z.object({
1329
+ fileData: z.string(),
1330
+ filename: z.string().optional(),
1331
+ }).transform((v) => {
1332
+ return remap$(v, {
1333
+ fileData: "file_data",
1334
+ });
1335
+ });
1336
+
1337
+ /**
1338
+ * @internal
1339
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1340
+ */
1341
+ export namespace UpdateDatapoint2DatasetsFile$ {
1342
+ /** @deprecated use `UpdateDatapoint2DatasetsFile$inboundSchema` instead. */
1343
+ export const inboundSchema = UpdateDatapoint2DatasetsFile$inboundSchema;
1344
+ /** @deprecated use `UpdateDatapoint2DatasetsFile$outboundSchema` instead. */
1345
+ export const outboundSchema = UpdateDatapoint2DatasetsFile$outboundSchema;
1346
+ /** @deprecated use `UpdateDatapoint2DatasetsFile$Outbound` instead. */
1347
+ export type Outbound = UpdateDatapoint2DatasetsFile$Outbound;
1348
+ }
1349
+
1350
+ export function updateDatapoint2DatasetsFileToJSON(
1351
+ updateDatapoint2DatasetsFile: UpdateDatapoint2DatasetsFile,
1352
+ ): string {
1353
+ return JSON.stringify(
1354
+ UpdateDatapoint2DatasetsFile$outboundSchema.parse(
1355
+ updateDatapoint2DatasetsFile,
1356
+ ),
1357
+ );
1358
+ }
1359
+
1360
+ export function updateDatapoint2DatasetsFileFromJSON(
1361
+ jsonString: string,
1362
+ ): SafeParseResult<UpdateDatapoint2DatasetsFile, SDKValidationError> {
1363
+ return safeParse(
1364
+ jsonString,
1365
+ (x) => UpdateDatapoint2DatasetsFile$inboundSchema.parse(JSON.parse(x)),
1366
+ `Failed to parse 'UpdateDatapoint2DatasetsFile' from JSON`,
1367
+ );
1368
+ }
1369
+
1370
+ /** @internal */
1371
+ export const UpdateDatapoint2Datasets3$inboundSchema: z.ZodType<
1372
+ UpdateDatapoint2Datasets3,
1373
+ z.ZodTypeDef,
1374
+ unknown
1375
+ > = z.object({
1376
+ type: UpdateDatapoint2DatasetsResponse200ApplicationJSONType$inboundSchema,
1377
+ file: z.lazy(() => UpdateDatapoint2DatasetsFile$inboundSchema),
1378
+ });
1379
+
1380
+ /** @internal */
1381
+ export type UpdateDatapoint2Datasets3$Outbound = {
1382
+ type: string;
1383
+ file: UpdateDatapoint2DatasetsFile$Outbound;
1384
+ };
1385
+
1386
+ /** @internal */
1387
+ export const UpdateDatapoint2Datasets3$outboundSchema: z.ZodType<
1388
+ UpdateDatapoint2Datasets3$Outbound,
1389
+ z.ZodTypeDef,
1390
+ UpdateDatapoint2Datasets3
1391
+ > = z.object({
1392
+ type: UpdateDatapoint2DatasetsResponse200ApplicationJSONType$outboundSchema,
1393
+ file: z.lazy(() => UpdateDatapoint2DatasetsFile$outboundSchema),
1394
+ });
1395
+
1396
+ /**
1397
+ * @internal
1398
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1399
+ */
1400
+ export namespace UpdateDatapoint2Datasets3$ {
1401
+ /** @deprecated use `UpdateDatapoint2Datasets3$inboundSchema` instead. */
1402
+ export const inboundSchema = UpdateDatapoint2Datasets3$inboundSchema;
1403
+ /** @deprecated use `UpdateDatapoint2Datasets3$outboundSchema` instead. */
1404
+ export const outboundSchema = UpdateDatapoint2Datasets3$outboundSchema;
1405
+ /** @deprecated use `UpdateDatapoint2Datasets3$Outbound` instead. */
1406
+ export type Outbound = UpdateDatapoint2Datasets3$Outbound;
1407
+ }
1408
+
1409
+ export function updateDatapoint2Datasets3ToJSON(
1410
+ updateDatapoint2Datasets3: UpdateDatapoint2Datasets3,
1411
+ ): string {
1412
+ return JSON.stringify(
1413
+ UpdateDatapoint2Datasets3$outboundSchema.parse(updateDatapoint2Datasets3),
1414
+ );
1415
+ }
1416
+
1417
+ export function updateDatapoint2Datasets3FromJSON(
1418
+ jsonString: string,
1419
+ ): SafeParseResult<UpdateDatapoint2Datasets3, SDKValidationError> {
1420
+ return safeParse(
1421
+ jsonString,
1422
+ (x) => UpdateDatapoint2Datasets3$inboundSchema.parse(JSON.parse(x)),
1423
+ `Failed to parse 'UpdateDatapoint2Datasets3' from JSON`,
1424
+ );
1425
+ }
1426
+
1427
+ /** @internal */
1428
+ export const UpdateDatapoint2DatasetsResponse200Type$inboundSchema:
1429
+ z.ZodNativeEnum<typeof UpdateDatapoint2DatasetsResponse200Type> = z
1430
+ .nativeEnum(UpdateDatapoint2DatasetsResponse200Type);
1431
+
1432
+ /** @internal */
1433
+ export const UpdateDatapoint2DatasetsResponse200Type$outboundSchema:
1434
+ z.ZodNativeEnum<typeof UpdateDatapoint2DatasetsResponse200Type> =
1435
+ UpdateDatapoint2DatasetsResponse200Type$inboundSchema;
1436
+
1437
+ /**
1438
+ * @internal
1439
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1440
+ */
1441
+ export namespace UpdateDatapoint2DatasetsResponse200Type$ {
1442
+ /** @deprecated use `UpdateDatapoint2DatasetsResponse200Type$inboundSchema` instead. */
1443
+ export const inboundSchema =
1444
+ UpdateDatapoint2DatasetsResponse200Type$inboundSchema;
1445
+ /** @deprecated use `UpdateDatapoint2DatasetsResponse200Type$outboundSchema` instead. */
1446
+ export const outboundSchema =
1447
+ UpdateDatapoint2DatasetsResponse200Type$outboundSchema;
1448
+ }
1449
+
1450
+ /** @internal */
1451
+ export const UpdateDatapoint2DatasetsImageUrl$inboundSchema: z.ZodType<
1452
+ UpdateDatapoint2DatasetsImageUrl,
1453
+ z.ZodTypeDef,
1454
+ unknown
1455
+ > = z.object({
1456
+ id: z.string().optional(),
1457
+ url: z.string(),
1458
+ detail: z.string().optional(),
1459
+ });
1460
+
1461
+ /** @internal */
1462
+ export type UpdateDatapoint2DatasetsImageUrl$Outbound = {
1463
+ id?: string | undefined;
1464
+ url: string;
1465
+ detail?: string | undefined;
1466
+ };
1467
+
1468
+ /** @internal */
1469
+ export const UpdateDatapoint2DatasetsImageUrl$outboundSchema: z.ZodType<
1470
+ UpdateDatapoint2DatasetsImageUrl$Outbound,
1471
+ z.ZodTypeDef,
1472
+ UpdateDatapoint2DatasetsImageUrl
1473
+ > = z.object({
1474
+ id: z.string().optional(),
1475
+ url: z.string(),
1476
+ detail: z.string().optional(),
1477
+ });
1478
+
1479
+ /**
1480
+ * @internal
1481
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1482
+ */
1483
+ export namespace UpdateDatapoint2DatasetsImageUrl$ {
1484
+ /** @deprecated use `UpdateDatapoint2DatasetsImageUrl$inboundSchema` instead. */
1485
+ export const inboundSchema = UpdateDatapoint2DatasetsImageUrl$inboundSchema;
1486
+ /** @deprecated use `UpdateDatapoint2DatasetsImageUrl$outboundSchema` instead. */
1487
+ export const outboundSchema = UpdateDatapoint2DatasetsImageUrl$outboundSchema;
1488
+ /** @deprecated use `UpdateDatapoint2DatasetsImageUrl$Outbound` instead. */
1489
+ export type Outbound = UpdateDatapoint2DatasetsImageUrl$Outbound;
1490
+ }
1491
+
1492
+ export function updateDatapoint2DatasetsImageUrlToJSON(
1493
+ updateDatapoint2DatasetsImageUrl: UpdateDatapoint2DatasetsImageUrl,
1494
+ ): string {
1495
+ return JSON.stringify(
1496
+ UpdateDatapoint2DatasetsImageUrl$outboundSchema.parse(
1497
+ updateDatapoint2DatasetsImageUrl,
1498
+ ),
1499
+ );
1500
+ }
1501
+
1502
+ export function updateDatapoint2DatasetsImageUrlFromJSON(
1503
+ jsonString: string,
1504
+ ): SafeParseResult<UpdateDatapoint2DatasetsImageUrl, SDKValidationError> {
1505
+ return safeParse(
1506
+ jsonString,
1507
+ (x) => UpdateDatapoint2DatasetsImageUrl$inboundSchema.parse(JSON.parse(x)),
1508
+ `Failed to parse 'UpdateDatapoint2DatasetsImageUrl' from JSON`,
1509
+ );
1510
+ }
1511
+
1512
+ /** @internal */
1513
+ export const UpdateDatapoint2Datasets2$inboundSchema: z.ZodType<
1514
+ UpdateDatapoint2Datasets2,
1515
+ z.ZodTypeDef,
1516
+ unknown
1517
+ > = z.object({
1518
+ type: UpdateDatapoint2DatasetsResponse200Type$inboundSchema,
1519
+ image_url: z.lazy(() => UpdateDatapoint2DatasetsImageUrl$inboundSchema),
1520
+ }).transform((v) => {
1521
+ return remap$(v, {
1522
+ "image_url": "imageUrl",
1523
+ });
1524
+ });
1525
+
1526
+ /** @internal */
1527
+ export type UpdateDatapoint2Datasets2$Outbound = {
1528
+ type: string;
1529
+ image_url: UpdateDatapoint2DatasetsImageUrl$Outbound;
1530
+ };
1531
+
1532
+ /** @internal */
1533
+ export const UpdateDatapoint2Datasets2$outboundSchema: z.ZodType<
1534
+ UpdateDatapoint2Datasets2$Outbound,
1535
+ z.ZodTypeDef,
1536
+ UpdateDatapoint2Datasets2
1537
+ > = z.object({
1538
+ type: UpdateDatapoint2DatasetsResponse200Type$outboundSchema,
1539
+ imageUrl: z.lazy(() => UpdateDatapoint2DatasetsImageUrl$outboundSchema),
1540
+ }).transform((v) => {
1541
+ return remap$(v, {
1542
+ imageUrl: "image_url",
1543
+ });
1544
+ });
1545
+
1546
+ /**
1547
+ * @internal
1548
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1549
+ */
1550
+ export namespace UpdateDatapoint2Datasets2$ {
1551
+ /** @deprecated use `UpdateDatapoint2Datasets2$inboundSchema` instead. */
1552
+ export const inboundSchema = UpdateDatapoint2Datasets2$inboundSchema;
1553
+ /** @deprecated use `UpdateDatapoint2Datasets2$outboundSchema` instead. */
1554
+ export const outboundSchema = UpdateDatapoint2Datasets2$outboundSchema;
1555
+ /** @deprecated use `UpdateDatapoint2Datasets2$Outbound` instead. */
1556
+ export type Outbound = UpdateDatapoint2Datasets2$Outbound;
1557
+ }
1558
+
1559
+ export function updateDatapoint2Datasets2ToJSON(
1560
+ updateDatapoint2Datasets2: UpdateDatapoint2Datasets2,
1561
+ ): string {
1562
+ return JSON.stringify(
1563
+ UpdateDatapoint2Datasets2$outboundSchema.parse(updateDatapoint2Datasets2),
1564
+ );
1565
+ }
1566
+
1567
+ export function updateDatapoint2Datasets2FromJSON(
1568
+ jsonString: string,
1569
+ ): SafeParseResult<UpdateDatapoint2Datasets2, SDKValidationError> {
1570
+ return safeParse(
1571
+ jsonString,
1572
+ (x) => UpdateDatapoint2Datasets2$inboundSchema.parse(JSON.parse(x)),
1573
+ `Failed to parse 'UpdateDatapoint2Datasets2' from JSON`,
1574
+ );
1575
+ }
1576
+
1577
+ /** @internal */
1578
+ export const UpdateDatapoint2DatasetsResponseType$inboundSchema:
1579
+ z.ZodNativeEnum<typeof UpdateDatapoint2DatasetsResponseType> = z.nativeEnum(
1580
+ UpdateDatapoint2DatasetsResponseType,
1581
+ );
1582
+
1583
+ /** @internal */
1584
+ export const UpdateDatapoint2DatasetsResponseType$outboundSchema:
1585
+ z.ZodNativeEnum<typeof UpdateDatapoint2DatasetsResponseType> =
1586
+ UpdateDatapoint2DatasetsResponseType$inboundSchema;
1587
+
1588
+ /**
1589
+ * @internal
1590
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1591
+ */
1592
+ export namespace UpdateDatapoint2DatasetsResponseType$ {
1593
+ /** @deprecated use `UpdateDatapoint2DatasetsResponseType$inboundSchema` instead. */
1594
+ export const inboundSchema =
1595
+ UpdateDatapoint2DatasetsResponseType$inboundSchema;
1596
+ /** @deprecated use `UpdateDatapoint2DatasetsResponseType$outboundSchema` instead. */
1597
+ export const outboundSchema =
1598
+ UpdateDatapoint2DatasetsResponseType$outboundSchema;
1599
+ }
1600
+
1601
+ /** @internal */
1602
+ export const UpdateDatapoint2Datasets1$inboundSchema: z.ZodType<
1603
+ UpdateDatapoint2Datasets1,
1604
+ z.ZodTypeDef,
1605
+ unknown
1606
+ > = z.object({
1607
+ type: UpdateDatapoint2DatasetsResponseType$inboundSchema,
1608
+ text: z.string(),
1609
+ });
1610
+
1611
+ /** @internal */
1612
+ export type UpdateDatapoint2Datasets1$Outbound = {
1613
+ type: string;
1614
+ text: string;
1615
+ };
1616
+
1617
+ /** @internal */
1618
+ export const UpdateDatapoint2Datasets1$outboundSchema: z.ZodType<
1619
+ UpdateDatapoint2Datasets1$Outbound,
1620
+ z.ZodTypeDef,
1621
+ UpdateDatapoint2Datasets1
1622
+ > = z.object({
1623
+ type: UpdateDatapoint2DatasetsResponseType$outboundSchema,
1624
+ text: z.string(),
1625
+ });
1626
+
1627
+ /**
1628
+ * @internal
1629
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1630
+ */
1631
+ export namespace UpdateDatapoint2Datasets1$ {
1632
+ /** @deprecated use `UpdateDatapoint2Datasets1$inboundSchema` instead. */
1633
+ export const inboundSchema = UpdateDatapoint2Datasets1$inboundSchema;
1634
+ /** @deprecated use `UpdateDatapoint2Datasets1$outboundSchema` instead. */
1635
+ export const outboundSchema = UpdateDatapoint2Datasets1$outboundSchema;
1636
+ /** @deprecated use `UpdateDatapoint2Datasets1$Outbound` instead. */
1637
+ export type Outbound = UpdateDatapoint2Datasets1$Outbound;
1638
+ }
1639
+
1640
+ export function updateDatapoint2Datasets1ToJSON(
1641
+ updateDatapoint2Datasets1: UpdateDatapoint2Datasets1,
1642
+ ): string {
1643
+ return JSON.stringify(
1644
+ UpdateDatapoint2Datasets1$outboundSchema.parse(updateDatapoint2Datasets1),
1645
+ );
1646
+ }
1647
+
1648
+ export function updateDatapoint2Datasets1FromJSON(
1649
+ jsonString: string,
1650
+ ): SafeParseResult<UpdateDatapoint2Datasets1, SDKValidationError> {
1651
+ return safeParse(
1652
+ jsonString,
1653
+ (x) => UpdateDatapoint2Datasets1$inboundSchema.parse(JSON.parse(x)),
1654
+ `Failed to parse 'UpdateDatapoint2Datasets1' from JSON`,
1655
+ );
1656
+ }
1657
+
1658
+ /** @internal */
1659
+ export const UpdateDatapointContentDatasets2$inboundSchema: z.ZodType<
1660
+ UpdateDatapointContentDatasets2,
1661
+ z.ZodTypeDef,
1662
+ unknown
1663
+ > = z.union([
1664
+ z.lazy(() => UpdateDatapoint2Datasets1$inboundSchema),
1665
+ z.lazy(() => UpdateDatapoint2Datasets2$inboundSchema),
1666
+ z.lazy(() => UpdateDatapoint2Datasets3$inboundSchema),
1667
+ ]);
1668
+
1669
+ /** @internal */
1670
+ export type UpdateDatapointContentDatasets2$Outbound =
1671
+ | UpdateDatapoint2Datasets1$Outbound
1672
+ | UpdateDatapoint2Datasets2$Outbound
1673
+ | UpdateDatapoint2Datasets3$Outbound;
1674
+
1675
+ /** @internal */
1676
+ export const UpdateDatapointContentDatasets2$outboundSchema: z.ZodType<
1677
+ UpdateDatapointContentDatasets2$Outbound,
1678
+ z.ZodTypeDef,
1679
+ UpdateDatapointContentDatasets2
1680
+ > = z.union([
1681
+ z.lazy(() => UpdateDatapoint2Datasets1$outboundSchema),
1682
+ z.lazy(() => UpdateDatapoint2Datasets2$outboundSchema),
1683
+ z.lazy(() => UpdateDatapoint2Datasets3$outboundSchema),
1684
+ ]);
1685
+
1686
+ /**
1687
+ * @internal
1688
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1689
+ */
1690
+ export namespace UpdateDatapointContentDatasets2$ {
1691
+ /** @deprecated use `UpdateDatapointContentDatasets2$inboundSchema` instead. */
1692
+ export const inboundSchema = UpdateDatapointContentDatasets2$inboundSchema;
1693
+ /** @deprecated use `UpdateDatapointContentDatasets2$outboundSchema` instead. */
1694
+ export const outboundSchema = UpdateDatapointContentDatasets2$outboundSchema;
1695
+ /** @deprecated use `UpdateDatapointContentDatasets2$Outbound` instead. */
1696
+ export type Outbound = UpdateDatapointContentDatasets2$Outbound;
1697
+ }
1698
+
1699
+ export function updateDatapointContentDatasets2ToJSON(
1700
+ updateDatapointContentDatasets2: UpdateDatapointContentDatasets2,
1701
+ ): string {
1702
+ return JSON.stringify(
1703
+ UpdateDatapointContentDatasets2$outboundSchema.parse(
1704
+ updateDatapointContentDatasets2,
1705
+ ),
1706
+ );
1707
+ }
1708
+
1709
+ export function updateDatapointContentDatasets2FromJSON(
1710
+ jsonString: string,
1711
+ ): SafeParseResult<UpdateDatapointContentDatasets2, SDKValidationError> {
1712
+ return safeParse(
1713
+ jsonString,
1714
+ (x) => UpdateDatapointContentDatasets2$inboundSchema.parse(JSON.parse(x)),
1715
+ `Failed to parse 'UpdateDatapointContentDatasets2' from JSON`,
1716
+ );
1717
+ }
1718
+
1719
+ /** @internal */
1720
+ export const UpdateDatapointDatasetsContent$inboundSchema: z.ZodType<
1721
+ UpdateDatapointDatasetsContent,
1722
+ z.ZodTypeDef,
1723
+ unknown
1724
+ > = z.union([
1725
+ z.string(),
1726
+ z.array(z.union([
1727
+ z.lazy(() => UpdateDatapoint2Datasets1$inboundSchema),
1728
+ z.lazy(() => UpdateDatapoint2Datasets2$inboundSchema),
1729
+ z.lazy(() => UpdateDatapoint2Datasets3$inboundSchema),
1730
+ ])),
1731
+ ]);
1732
+
1733
+ /** @internal */
1734
+ export type UpdateDatapointDatasetsContent$Outbound =
1735
+ | string
1736
+ | Array<
1737
+ | UpdateDatapoint2Datasets1$Outbound
1738
+ | UpdateDatapoint2Datasets2$Outbound
1739
+ | UpdateDatapoint2Datasets3$Outbound
1740
+ >;
1741
+
1742
+ /** @internal */
1743
+ export const UpdateDatapointDatasetsContent$outboundSchema: z.ZodType<
1744
+ UpdateDatapointDatasetsContent$Outbound,
1745
+ z.ZodTypeDef,
1746
+ UpdateDatapointDatasetsContent
1747
+ > = z.union([
1748
+ z.string(),
1749
+ z.array(z.union([
1750
+ z.lazy(() => UpdateDatapoint2Datasets1$outboundSchema),
1751
+ z.lazy(() => UpdateDatapoint2Datasets2$outboundSchema),
1752
+ z.lazy(() => UpdateDatapoint2Datasets3$outboundSchema),
1753
+ ])),
1754
+ ]);
1755
+
1756
+ /**
1757
+ * @internal
1758
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1759
+ */
1760
+ export namespace UpdateDatapointDatasetsContent$ {
1761
+ /** @deprecated use `UpdateDatapointDatasetsContent$inboundSchema` instead. */
1762
+ export const inboundSchema = UpdateDatapointDatasetsContent$inboundSchema;
1763
+ /** @deprecated use `UpdateDatapointDatasetsContent$outboundSchema` instead. */
1764
+ export const outboundSchema = UpdateDatapointDatasetsContent$outboundSchema;
1765
+ /** @deprecated use `UpdateDatapointDatasetsContent$Outbound` instead. */
1766
+ export type Outbound = UpdateDatapointDatasetsContent$Outbound;
1767
+ }
1768
+
1769
+ export function updateDatapointDatasetsContentToJSON(
1770
+ updateDatapointDatasetsContent: UpdateDatapointDatasetsContent,
1771
+ ): string {
1772
+ return JSON.stringify(
1773
+ UpdateDatapointDatasetsContent$outboundSchema.parse(
1774
+ updateDatapointDatasetsContent,
1775
+ ),
1776
+ );
1777
+ }
1778
+
1779
+ export function updateDatapointDatasetsContentFromJSON(
1780
+ jsonString: string,
1781
+ ): SafeParseResult<UpdateDatapointDatasetsContent, SDKValidationError> {
1782
+ return safeParse(
1783
+ jsonString,
1784
+ (x) => UpdateDatapointDatasetsContent$inboundSchema.parse(JSON.parse(x)),
1785
+ `Failed to parse 'UpdateDatapointDatasetsContent' from JSON`,
1786
+ );
1787
+ }
1788
+
1789
+ /** @internal */
1790
+ export const UpdateDatapointDatasetsType$inboundSchema: z.ZodNativeEnum<
1791
+ typeof UpdateDatapointDatasetsType
1792
+ > = z.nativeEnum(UpdateDatapointDatasetsType);
1793
+
1794
+ /** @internal */
1795
+ export const UpdateDatapointDatasetsType$outboundSchema: z.ZodNativeEnum<
1796
+ typeof UpdateDatapointDatasetsType
1797
+ > = UpdateDatapointDatasetsType$inboundSchema;
1798
+
1799
+ /**
1800
+ * @internal
1801
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1802
+ */
1803
+ export namespace UpdateDatapointDatasetsType$ {
1804
+ /** @deprecated use `UpdateDatapointDatasetsType$inboundSchema` instead. */
1805
+ export const inboundSchema = UpdateDatapointDatasetsType$inboundSchema;
1806
+ /** @deprecated use `UpdateDatapointDatasetsType$outboundSchema` instead. */
1807
+ export const outboundSchema = UpdateDatapointDatasetsType$outboundSchema;
1808
+ }
1809
+
1810
+ /** @internal */
1811
+ export const UpdateDatapointDatasetsFunction$inboundSchema: z.ZodType<
1812
+ UpdateDatapointDatasetsFunction,
1813
+ z.ZodTypeDef,
1814
+ unknown
1815
+ > = z.object({
1816
+ name: z.string(),
1817
+ arguments: z.string(),
1818
+ });
1819
+
1820
+ /** @internal */
1821
+ export type UpdateDatapointDatasetsFunction$Outbound = {
1822
+ name: string;
1823
+ arguments: string;
1824
+ };
1825
+
1826
+ /** @internal */
1827
+ export const UpdateDatapointDatasetsFunction$outboundSchema: z.ZodType<
1828
+ UpdateDatapointDatasetsFunction$Outbound,
1829
+ z.ZodTypeDef,
1830
+ UpdateDatapointDatasetsFunction
1831
+ > = z.object({
1832
+ name: z.string(),
1833
+ arguments: z.string(),
1834
+ });
1835
+
1836
+ /**
1837
+ * @internal
1838
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1839
+ */
1840
+ export namespace UpdateDatapointDatasetsFunction$ {
1841
+ /** @deprecated use `UpdateDatapointDatasetsFunction$inboundSchema` instead. */
1842
+ export const inboundSchema = UpdateDatapointDatasetsFunction$inboundSchema;
1843
+ /** @deprecated use `UpdateDatapointDatasetsFunction$outboundSchema` instead. */
1844
+ export const outboundSchema = UpdateDatapointDatasetsFunction$outboundSchema;
1845
+ /** @deprecated use `UpdateDatapointDatasetsFunction$Outbound` instead. */
1846
+ export type Outbound = UpdateDatapointDatasetsFunction$Outbound;
1847
+ }
1848
+
1849
+ export function updateDatapointDatasetsFunctionToJSON(
1850
+ updateDatapointDatasetsFunction: UpdateDatapointDatasetsFunction,
1851
+ ): string {
1852
+ return JSON.stringify(
1853
+ UpdateDatapointDatasetsFunction$outboundSchema.parse(
1854
+ updateDatapointDatasetsFunction,
1855
+ ),
1856
+ );
1857
+ }
1858
+
1859
+ export function updateDatapointDatasetsFunctionFromJSON(
1860
+ jsonString: string,
1861
+ ): SafeParseResult<UpdateDatapointDatasetsFunction, SDKValidationError> {
1862
+ return safeParse(
1863
+ jsonString,
1864
+ (x) => UpdateDatapointDatasetsFunction$inboundSchema.parse(JSON.parse(x)),
1865
+ `Failed to parse 'UpdateDatapointDatasetsFunction' from JSON`,
1866
+ );
1867
+ }
1868
+
1869
+ /** @internal */
1870
+ export const UpdateDatapointDatasetsToolCalls$inboundSchema: z.ZodType<
1871
+ UpdateDatapointDatasetsToolCalls,
1872
+ z.ZodTypeDef,
1873
+ unknown
1874
+ > = z.object({
1875
+ id: z.string().optional(),
1876
+ index: z.number().optional(),
1877
+ type: UpdateDatapointDatasetsType$inboundSchema,
1878
+ function: z.lazy(() => UpdateDatapointDatasetsFunction$inboundSchema),
1879
+ });
1880
+
1881
+ /** @internal */
1882
+ export type UpdateDatapointDatasetsToolCalls$Outbound = {
1883
+ id?: string | undefined;
1884
+ index?: number | undefined;
1885
+ type: string;
1886
+ function: UpdateDatapointDatasetsFunction$Outbound;
1887
+ };
1888
+
1889
+ /** @internal */
1890
+ export const UpdateDatapointDatasetsToolCalls$outboundSchema: z.ZodType<
1891
+ UpdateDatapointDatasetsToolCalls$Outbound,
1892
+ z.ZodTypeDef,
1893
+ UpdateDatapointDatasetsToolCalls
1894
+ > = z.object({
1895
+ id: z.string().optional(),
1896
+ index: z.number().optional(),
1897
+ type: UpdateDatapointDatasetsType$outboundSchema,
1898
+ function: z.lazy(() => UpdateDatapointDatasetsFunction$outboundSchema),
1899
+ });
1900
+
1901
+ /**
1902
+ * @internal
1903
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1904
+ */
1905
+ export namespace UpdateDatapointDatasetsToolCalls$ {
1906
+ /** @deprecated use `UpdateDatapointDatasetsToolCalls$inboundSchema` instead. */
1907
+ export const inboundSchema = UpdateDatapointDatasetsToolCalls$inboundSchema;
1908
+ /** @deprecated use `UpdateDatapointDatasetsToolCalls$outboundSchema` instead. */
1909
+ export const outboundSchema = UpdateDatapointDatasetsToolCalls$outboundSchema;
1910
+ /** @deprecated use `UpdateDatapointDatasetsToolCalls$Outbound` instead. */
1911
+ export type Outbound = UpdateDatapointDatasetsToolCalls$Outbound;
1912
+ }
1913
+
1914
+ export function updateDatapointDatasetsToolCallsToJSON(
1915
+ updateDatapointDatasetsToolCalls: UpdateDatapointDatasetsToolCalls,
1916
+ ): string {
1917
+ return JSON.stringify(
1918
+ UpdateDatapointDatasetsToolCalls$outboundSchema.parse(
1919
+ updateDatapointDatasetsToolCalls,
1920
+ ),
1921
+ );
1922
+ }
1923
+
1924
+ export function updateDatapointDatasetsToolCallsFromJSON(
1925
+ jsonString: string,
1926
+ ): SafeParseResult<UpdateDatapointDatasetsToolCalls, SDKValidationError> {
1927
+ return safeParse(
1928
+ jsonString,
1929
+ (x) => UpdateDatapointDatasetsToolCalls$inboundSchema.parse(JSON.parse(x)),
1930
+ `Failed to parse 'UpdateDatapointDatasetsToolCalls' from JSON`,
1931
+ );
1932
+ }
1933
+
1934
+ /** @internal */
1935
+ export const UpdateDatapointDatasetsMessages$inboundSchema: z.ZodType<
1936
+ UpdateDatapointDatasetsMessages,
1937
+ z.ZodTypeDef,
1938
+ unknown
1939
+ > = z.object({
1940
+ role: UpdateDatapointDatasetsRole$inboundSchema,
1941
+ content: z.union([
1942
+ z.string(),
1943
+ z.array(z.union([
1944
+ z.lazy(() => UpdateDatapoint2Datasets1$inboundSchema),
1945
+ z.lazy(() => UpdateDatapoint2Datasets2$inboundSchema),
1946
+ z.lazy(() => UpdateDatapoint2Datasets3$inboundSchema),
1947
+ ])),
1948
+ ]),
1949
+ tool_calls: z.array(
1950
+ z.lazy(() => UpdateDatapointDatasetsToolCalls$inboundSchema),
1951
+ ).optional(),
1952
+ tool_call_id: z.string().optional(),
1953
+ }).transform((v) => {
1954
+ return remap$(v, {
1955
+ "tool_calls": "toolCalls",
1956
+ "tool_call_id": "toolCallId",
1957
+ });
1958
+ });
1959
+
1960
+ /** @internal */
1961
+ export type UpdateDatapointDatasetsMessages$Outbound = {
1962
+ role: string;
1963
+ content:
1964
+ | string
1965
+ | Array<
1966
+ | UpdateDatapoint2Datasets1$Outbound
1967
+ | UpdateDatapoint2Datasets2$Outbound
1968
+ | UpdateDatapoint2Datasets3$Outbound
1969
+ >;
1970
+ tool_calls?: Array<UpdateDatapointDatasetsToolCalls$Outbound> | undefined;
1971
+ tool_call_id?: string | undefined;
1972
+ };
1973
+
1974
+ /** @internal */
1975
+ export const UpdateDatapointDatasetsMessages$outboundSchema: z.ZodType<
1976
+ UpdateDatapointDatasetsMessages$Outbound,
1977
+ z.ZodTypeDef,
1978
+ UpdateDatapointDatasetsMessages
1979
+ > = z.object({
1980
+ role: UpdateDatapointDatasetsRole$outboundSchema,
1981
+ content: z.union([
1982
+ z.string(),
1983
+ z.array(z.union([
1984
+ z.lazy(() => UpdateDatapoint2Datasets1$outboundSchema),
1985
+ z.lazy(() => UpdateDatapoint2Datasets2$outboundSchema),
1986
+ z.lazy(() => UpdateDatapoint2Datasets3$outboundSchema),
1987
+ ])),
1988
+ ]),
1989
+ toolCalls: z.array(
1990
+ z.lazy(() => UpdateDatapointDatasetsToolCalls$outboundSchema),
1991
+ ).optional(),
1992
+ toolCallId: z.string().optional(),
1993
+ }).transform((v) => {
1994
+ return remap$(v, {
1995
+ toolCalls: "tool_calls",
1996
+ toolCallId: "tool_call_id",
1997
+ });
1998
+ });
1999
+
2000
+ /**
2001
+ * @internal
2002
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2003
+ */
2004
+ export namespace UpdateDatapointDatasetsMessages$ {
2005
+ /** @deprecated use `UpdateDatapointDatasetsMessages$inboundSchema` instead. */
2006
+ export const inboundSchema = UpdateDatapointDatasetsMessages$inboundSchema;
2007
+ /** @deprecated use `UpdateDatapointDatasetsMessages$outboundSchema` instead. */
2008
+ export const outboundSchema = UpdateDatapointDatasetsMessages$outboundSchema;
2009
+ /** @deprecated use `UpdateDatapointDatasetsMessages$Outbound` instead. */
2010
+ export type Outbound = UpdateDatapointDatasetsMessages$Outbound;
2011
+ }
2012
+
2013
+ export function updateDatapointDatasetsMessagesToJSON(
2014
+ updateDatapointDatasetsMessages: UpdateDatapointDatasetsMessages,
2015
+ ): string {
2016
+ return JSON.stringify(
2017
+ UpdateDatapointDatasetsMessages$outboundSchema.parse(
2018
+ updateDatapointDatasetsMessages,
2019
+ ),
2020
+ );
2021
+ }
2022
+
2023
+ export function updateDatapointDatasetsMessagesFromJSON(
2024
+ jsonString: string,
2025
+ ): SafeParseResult<UpdateDatapointDatasetsMessages, SDKValidationError> {
2026
+ return safeParse(
2027
+ jsonString,
2028
+ (x) => UpdateDatapointDatasetsMessages$inboundSchema.parse(JSON.parse(x)),
2029
+ `Failed to parse 'UpdateDatapointDatasetsMessages' from JSON`,
2030
+ );
2031
+ }
2032
+
2033
+ /** @internal */
2034
+ export const UpdateDatapointResponseBody$inboundSchema: z.ZodType<
2035
+ UpdateDatapointResponseBody,
2036
+ z.ZodTypeDef,
2037
+ unknown
2038
+ > = z.object({
2039
+ _id: z.string(),
2040
+ workspace_id: z.string(),
2041
+ inputs: z.record(z.any()).optional(),
2042
+ messages: z.array(z.lazy(() => UpdateDatapointDatasetsMessages$inboundSchema))
2043
+ .optional(),
2044
+ expected_output: z.string().optional(),
2045
+ dataset_id: z.string(),
2046
+ created_by_id: z.string().optional(),
2047
+ updated_by_id: z.string().optional(),
2048
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
2049
+ .optional(),
2050
+ updated: z.string().datetime({ offset: true }).default(
2051
+ "2025-05-28T11:21:06.214Z",
2052
+ ).transform(v => new Date(v)),
2053
+ }).transform((v) => {
2054
+ return remap$(v, {
2055
+ "_id": "id",
2056
+ "workspace_id": "workspaceId",
2057
+ "expected_output": "expectedOutput",
2058
+ "dataset_id": "datasetId",
2059
+ "created_by_id": "createdById",
2060
+ "updated_by_id": "updatedById",
2061
+ });
2062
+ });
2063
+
2064
+ /** @internal */
2065
+ export type UpdateDatapointResponseBody$Outbound = {
2066
+ _id: string;
2067
+ workspace_id: string;
2068
+ inputs?: { [k: string]: any } | undefined;
2069
+ messages?: Array<UpdateDatapointDatasetsMessages$Outbound> | undefined;
2070
+ expected_output?: string | undefined;
2071
+ dataset_id: string;
2072
+ created_by_id?: string | undefined;
2073
+ updated_by_id?: string | undefined;
2074
+ created?: string | undefined;
2075
+ updated: string;
2076
+ };
2077
+
2078
+ /** @internal */
2079
+ export const UpdateDatapointResponseBody$outboundSchema: z.ZodType<
2080
+ UpdateDatapointResponseBody$Outbound,
2081
+ z.ZodTypeDef,
2082
+ UpdateDatapointResponseBody
2083
+ > = z.object({
2084
+ id: z.string(),
2085
+ workspaceId: z.string(),
2086
+ inputs: z.record(z.any()).optional(),
2087
+ messages: z.array(
2088
+ z.lazy(() => UpdateDatapointDatasetsMessages$outboundSchema),
2089
+ ).optional(),
2090
+ expectedOutput: z.string().optional(),
2091
+ datasetId: z.string(),
2092
+ createdById: z.string().optional(),
2093
+ updatedById: z.string().optional(),
2094
+ created: z.date().transform(v => v.toISOString()).optional(),
2095
+ updated: z.date().default(() => new Date("2025-05-28T11:21:06.214Z"))
2096
+ .transform(v => v.toISOString()),
2097
+ }).transform((v) => {
2098
+ return remap$(v, {
2099
+ id: "_id",
2100
+ workspaceId: "workspace_id",
2101
+ expectedOutput: "expected_output",
2102
+ datasetId: "dataset_id",
2103
+ createdById: "created_by_id",
2104
+ updatedById: "updated_by_id",
2105
+ });
2106
+ });
2107
+
2108
+ /**
2109
+ * @internal
2110
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2111
+ */
2112
+ export namespace UpdateDatapointResponseBody$ {
2113
+ /** @deprecated use `UpdateDatapointResponseBody$inboundSchema` instead. */
2114
+ export const inboundSchema = UpdateDatapointResponseBody$inboundSchema;
2115
+ /** @deprecated use `UpdateDatapointResponseBody$outboundSchema` instead. */
2116
+ export const outboundSchema = UpdateDatapointResponseBody$outboundSchema;
2117
+ /** @deprecated use `UpdateDatapointResponseBody$Outbound` instead. */
2118
+ export type Outbound = UpdateDatapointResponseBody$Outbound;
2119
+ }
2120
+
2121
+ export function updateDatapointResponseBodyToJSON(
2122
+ updateDatapointResponseBody: UpdateDatapointResponseBody,
2123
+ ): string {
2124
+ return JSON.stringify(
2125
+ UpdateDatapointResponseBody$outboundSchema.parse(
2126
+ updateDatapointResponseBody,
2127
+ ),
2128
+ );
2129
+ }
2130
+
2131
+ export function updateDatapointResponseBodyFromJSON(
2132
+ jsonString: string,
2133
+ ): SafeParseResult<UpdateDatapointResponseBody, SDKValidationError> {
2134
+ return safeParse(
2135
+ jsonString,
2136
+ (x) => UpdateDatapointResponseBody$inboundSchema.parse(JSON.parse(x)),
2137
+ `Failed to parse 'UpdateDatapointResponseBody' from JSON`,
2138
+ );
2139
+ }