@orq-ai/node 3.6.0-rc.9 → 3.6.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,1126 @@
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
+ export type RetrieveDatapointRequest = {
13
+ datasetId: string;
14
+ datapointId: string;
15
+ };
16
+
17
+ /**
18
+ * The role of the prompt message
19
+ */
20
+ export const RetrieveDatapointRole = {
21
+ System: "system",
22
+ Assistant: "assistant",
23
+ User: "user",
24
+ Exception: "exception",
25
+ Tool: "tool",
26
+ Prompt: "prompt",
27
+ Correction: "correction",
28
+ ExpectedOutput: "expected_output",
29
+ } as const;
30
+ /**
31
+ * The role of the prompt message
32
+ */
33
+ export type RetrieveDatapointRole = ClosedEnum<typeof RetrieveDatapointRole>;
34
+
35
+ /**
36
+ * The type of the content part. Always `file`.
37
+ */
38
+ export const RetrieveDatapoint2DatasetsResponseType = {
39
+ File: "file",
40
+ } as const;
41
+ /**
42
+ * The type of the content part. Always `file`.
43
+ */
44
+ export type RetrieveDatapoint2DatasetsResponseType = ClosedEnum<
45
+ typeof RetrieveDatapoint2DatasetsResponseType
46
+ >;
47
+
48
+ export type RetrieveDatapoint2File = {
49
+ /**
50
+ * The base64 encoded file data, used when passing the file to the model as a string.
51
+ */
52
+ fileData: string;
53
+ /**
54
+ * The name of the file, used when passing the file to the model as a string.
55
+ */
56
+ filename?: string | undefined;
57
+ };
58
+
59
+ export type RetrieveDatapoint23 = {
60
+ /**
61
+ * The type of the content part. Always `file`.
62
+ */
63
+ type: RetrieveDatapoint2DatasetsResponseType;
64
+ file: RetrieveDatapoint2File;
65
+ };
66
+
67
+ export const RetrieveDatapoint2DatasetsType = {
68
+ ImageUrl: "image_url",
69
+ } as const;
70
+ export type RetrieveDatapoint2DatasetsType = ClosedEnum<
71
+ typeof RetrieveDatapoint2DatasetsType
72
+ >;
73
+
74
+ export type RetrieveDatapoint2ImageUrl = {
75
+ /**
76
+ * The orq.ai id of the image
77
+ */
78
+ id?: string | undefined;
79
+ /**
80
+ * Either a URL of the image or the base64 encoded data URI.
81
+ */
82
+ url: string;
83
+ /**
84
+ * Specifies the detail level of the image. Currently only supported with OpenAI models
85
+ */
86
+ detail?: string | undefined;
87
+ };
88
+
89
+ /**
90
+ * The image part of the prompt message. Only supported with vision models.
91
+ */
92
+ export type RetrieveDatapoint22 = {
93
+ type: RetrieveDatapoint2DatasetsType;
94
+ imageUrl: RetrieveDatapoint2ImageUrl;
95
+ };
96
+
97
+ export const RetrieveDatapoint2Type = {
98
+ Text: "text",
99
+ } as const;
100
+ export type RetrieveDatapoint2Type = ClosedEnum<typeof RetrieveDatapoint2Type>;
101
+
102
+ /**
103
+ * Text content part of a prompt message
104
+ */
105
+ export type RetrieveDatapoint21 = {
106
+ type: RetrieveDatapoint2Type;
107
+ text: string;
108
+ };
109
+
110
+ export type RetrieveDatapointContent2 =
111
+ | RetrieveDatapoint21
112
+ | RetrieveDatapoint22
113
+ | RetrieveDatapoint23;
114
+
115
+ /**
116
+ * 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.
117
+ */
118
+ export type RetrieveDatapointContent =
119
+ | string
120
+ | Array<RetrieveDatapoint21 | RetrieveDatapoint22 | RetrieveDatapoint23>;
121
+
122
+ export const RetrieveDatapointType = {
123
+ Function: "function",
124
+ } as const;
125
+ export type RetrieveDatapointType = ClosedEnum<typeof RetrieveDatapointType>;
126
+
127
+ export type RetrieveDatapointFunction = {
128
+ name: string;
129
+ /**
130
+ * JSON string arguments for the functions
131
+ */
132
+ arguments: string;
133
+ };
134
+
135
+ export type RetrieveDatapointToolCalls = {
136
+ id?: string | undefined;
137
+ index?: number | undefined;
138
+ type: RetrieveDatapointType;
139
+ function: RetrieveDatapointFunction;
140
+ };
141
+
142
+ export type RetrieveDatapointMessages = {
143
+ /**
144
+ * The role of the prompt message
145
+ */
146
+ role: RetrieveDatapointRole;
147
+ /**
148
+ * 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.
149
+ */
150
+ content:
151
+ | string
152
+ | Array<RetrieveDatapoint21 | RetrieveDatapoint22 | RetrieveDatapoint23>;
153
+ toolCalls?: Array<RetrieveDatapointToolCalls> | undefined;
154
+ toolCallId?: string | undefined;
155
+ };
156
+
157
+ /**
158
+ * Datapoint retrieved.
159
+ */
160
+ export type RetrieveDatapointResponseBody = {
161
+ /**
162
+ * The unique identifier of the dataset item
163
+ */
164
+ id: string;
165
+ /**
166
+ * The unique identifier of the workspace it belongs to
167
+ */
168
+ workspaceId: string;
169
+ /**
170
+ * 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.
171
+ */
172
+ inputs?: { [k: string]: any } | undefined;
173
+ /**
174
+ * The prompt template messages
175
+ */
176
+ messages?: Array<RetrieveDatapointMessages> | undefined;
177
+ expectedOutput?: string | undefined;
178
+ /**
179
+ * The unique identifier of the dataset
180
+ */
181
+ datasetId: string;
182
+ /**
183
+ * The unique identifier of the user who created the dataset
184
+ */
185
+ createdById?: string | undefined;
186
+ /**
187
+ * The unique identifier of the user who last updated the dataset
188
+ */
189
+ updatedById?: string | undefined;
190
+ /**
191
+ * The date and time the resource was created
192
+ */
193
+ created?: Date | undefined;
194
+ /**
195
+ * The date and time the resource was last updated
196
+ */
197
+ updated?: Date | undefined;
198
+ };
199
+
200
+ /** @internal */
201
+ export const RetrieveDatapointRequest$inboundSchema: z.ZodType<
202
+ RetrieveDatapointRequest,
203
+ z.ZodTypeDef,
204
+ unknown
205
+ > = z.object({
206
+ dataset_id: z.string(),
207
+ datapoint_id: z.string(),
208
+ }).transform((v) => {
209
+ return remap$(v, {
210
+ "dataset_id": "datasetId",
211
+ "datapoint_id": "datapointId",
212
+ });
213
+ });
214
+
215
+ /** @internal */
216
+ export type RetrieveDatapointRequest$Outbound = {
217
+ dataset_id: string;
218
+ datapoint_id: string;
219
+ };
220
+
221
+ /** @internal */
222
+ export const RetrieveDatapointRequest$outboundSchema: z.ZodType<
223
+ RetrieveDatapointRequest$Outbound,
224
+ z.ZodTypeDef,
225
+ RetrieveDatapointRequest
226
+ > = z.object({
227
+ datasetId: z.string(),
228
+ datapointId: z.string(),
229
+ }).transform((v) => {
230
+ return remap$(v, {
231
+ datasetId: "dataset_id",
232
+ datapointId: "datapoint_id",
233
+ });
234
+ });
235
+
236
+ /**
237
+ * @internal
238
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
239
+ */
240
+ export namespace RetrieveDatapointRequest$ {
241
+ /** @deprecated use `RetrieveDatapointRequest$inboundSchema` instead. */
242
+ export const inboundSchema = RetrieveDatapointRequest$inboundSchema;
243
+ /** @deprecated use `RetrieveDatapointRequest$outboundSchema` instead. */
244
+ export const outboundSchema = RetrieveDatapointRequest$outboundSchema;
245
+ /** @deprecated use `RetrieveDatapointRequest$Outbound` instead. */
246
+ export type Outbound = RetrieveDatapointRequest$Outbound;
247
+ }
248
+
249
+ export function retrieveDatapointRequestToJSON(
250
+ retrieveDatapointRequest: RetrieveDatapointRequest,
251
+ ): string {
252
+ return JSON.stringify(
253
+ RetrieveDatapointRequest$outboundSchema.parse(retrieveDatapointRequest),
254
+ );
255
+ }
256
+
257
+ export function retrieveDatapointRequestFromJSON(
258
+ jsonString: string,
259
+ ): SafeParseResult<RetrieveDatapointRequest, SDKValidationError> {
260
+ return safeParse(
261
+ jsonString,
262
+ (x) => RetrieveDatapointRequest$inboundSchema.parse(JSON.parse(x)),
263
+ `Failed to parse 'RetrieveDatapointRequest' from JSON`,
264
+ );
265
+ }
266
+
267
+ /** @internal */
268
+ export const RetrieveDatapointRole$inboundSchema: z.ZodNativeEnum<
269
+ typeof RetrieveDatapointRole
270
+ > = z.nativeEnum(RetrieveDatapointRole);
271
+
272
+ /** @internal */
273
+ export const RetrieveDatapointRole$outboundSchema: z.ZodNativeEnum<
274
+ typeof RetrieveDatapointRole
275
+ > = RetrieveDatapointRole$inboundSchema;
276
+
277
+ /**
278
+ * @internal
279
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
280
+ */
281
+ export namespace RetrieveDatapointRole$ {
282
+ /** @deprecated use `RetrieveDatapointRole$inboundSchema` instead. */
283
+ export const inboundSchema = RetrieveDatapointRole$inboundSchema;
284
+ /** @deprecated use `RetrieveDatapointRole$outboundSchema` instead. */
285
+ export const outboundSchema = RetrieveDatapointRole$outboundSchema;
286
+ }
287
+
288
+ /** @internal */
289
+ export const RetrieveDatapoint2DatasetsResponseType$inboundSchema:
290
+ z.ZodNativeEnum<typeof RetrieveDatapoint2DatasetsResponseType> = z.nativeEnum(
291
+ RetrieveDatapoint2DatasetsResponseType,
292
+ );
293
+
294
+ /** @internal */
295
+ export const RetrieveDatapoint2DatasetsResponseType$outboundSchema:
296
+ z.ZodNativeEnum<typeof RetrieveDatapoint2DatasetsResponseType> =
297
+ RetrieveDatapoint2DatasetsResponseType$inboundSchema;
298
+
299
+ /**
300
+ * @internal
301
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
302
+ */
303
+ export namespace RetrieveDatapoint2DatasetsResponseType$ {
304
+ /** @deprecated use `RetrieveDatapoint2DatasetsResponseType$inboundSchema` instead. */
305
+ export const inboundSchema =
306
+ RetrieveDatapoint2DatasetsResponseType$inboundSchema;
307
+ /** @deprecated use `RetrieveDatapoint2DatasetsResponseType$outboundSchema` instead. */
308
+ export const outboundSchema =
309
+ RetrieveDatapoint2DatasetsResponseType$outboundSchema;
310
+ }
311
+
312
+ /** @internal */
313
+ export const RetrieveDatapoint2File$inboundSchema: z.ZodType<
314
+ RetrieveDatapoint2File,
315
+ z.ZodTypeDef,
316
+ unknown
317
+ > = z.object({
318
+ file_data: z.string(),
319
+ filename: z.string().optional(),
320
+ }).transform((v) => {
321
+ return remap$(v, {
322
+ "file_data": "fileData",
323
+ });
324
+ });
325
+
326
+ /** @internal */
327
+ export type RetrieveDatapoint2File$Outbound = {
328
+ file_data: string;
329
+ filename?: string | undefined;
330
+ };
331
+
332
+ /** @internal */
333
+ export const RetrieveDatapoint2File$outboundSchema: z.ZodType<
334
+ RetrieveDatapoint2File$Outbound,
335
+ z.ZodTypeDef,
336
+ RetrieveDatapoint2File
337
+ > = z.object({
338
+ fileData: z.string(),
339
+ filename: z.string().optional(),
340
+ }).transform((v) => {
341
+ return remap$(v, {
342
+ fileData: "file_data",
343
+ });
344
+ });
345
+
346
+ /**
347
+ * @internal
348
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
349
+ */
350
+ export namespace RetrieveDatapoint2File$ {
351
+ /** @deprecated use `RetrieveDatapoint2File$inboundSchema` instead. */
352
+ export const inboundSchema = RetrieveDatapoint2File$inboundSchema;
353
+ /** @deprecated use `RetrieveDatapoint2File$outboundSchema` instead. */
354
+ export const outboundSchema = RetrieveDatapoint2File$outboundSchema;
355
+ /** @deprecated use `RetrieveDatapoint2File$Outbound` instead. */
356
+ export type Outbound = RetrieveDatapoint2File$Outbound;
357
+ }
358
+
359
+ export function retrieveDatapoint2FileToJSON(
360
+ retrieveDatapoint2File: RetrieveDatapoint2File,
361
+ ): string {
362
+ return JSON.stringify(
363
+ RetrieveDatapoint2File$outboundSchema.parse(retrieveDatapoint2File),
364
+ );
365
+ }
366
+
367
+ export function retrieveDatapoint2FileFromJSON(
368
+ jsonString: string,
369
+ ): SafeParseResult<RetrieveDatapoint2File, SDKValidationError> {
370
+ return safeParse(
371
+ jsonString,
372
+ (x) => RetrieveDatapoint2File$inboundSchema.parse(JSON.parse(x)),
373
+ `Failed to parse 'RetrieveDatapoint2File' from JSON`,
374
+ );
375
+ }
376
+
377
+ /** @internal */
378
+ export const RetrieveDatapoint23$inboundSchema: z.ZodType<
379
+ RetrieveDatapoint23,
380
+ z.ZodTypeDef,
381
+ unknown
382
+ > = z.object({
383
+ type: RetrieveDatapoint2DatasetsResponseType$inboundSchema,
384
+ file: z.lazy(() => RetrieveDatapoint2File$inboundSchema),
385
+ });
386
+
387
+ /** @internal */
388
+ export type RetrieveDatapoint23$Outbound = {
389
+ type: string;
390
+ file: RetrieveDatapoint2File$Outbound;
391
+ };
392
+
393
+ /** @internal */
394
+ export const RetrieveDatapoint23$outboundSchema: z.ZodType<
395
+ RetrieveDatapoint23$Outbound,
396
+ z.ZodTypeDef,
397
+ RetrieveDatapoint23
398
+ > = z.object({
399
+ type: RetrieveDatapoint2DatasetsResponseType$outboundSchema,
400
+ file: z.lazy(() => RetrieveDatapoint2File$outboundSchema),
401
+ });
402
+
403
+ /**
404
+ * @internal
405
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
406
+ */
407
+ export namespace RetrieveDatapoint23$ {
408
+ /** @deprecated use `RetrieveDatapoint23$inboundSchema` instead. */
409
+ export const inboundSchema = RetrieveDatapoint23$inboundSchema;
410
+ /** @deprecated use `RetrieveDatapoint23$outboundSchema` instead. */
411
+ export const outboundSchema = RetrieveDatapoint23$outboundSchema;
412
+ /** @deprecated use `RetrieveDatapoint23$Outbound` instead. */
413
+ export type Outbound = RetrieveDatapoint23$Outbound;
414
+ }
415
+
416
+ export function retrieveDatapoint23ToJSON(
417
+ retrieveDatapoint23: RetrieveDatapoint23,
418
+ ): string {
419
+ return JSON.stringify(
420
+ RetrieveDatapoint23$outboundSchema.parse(retrieveDatapoint23),
421
+ );
422
+ }
423
+
424
+ export function retrieveDatapoint23FromJSON(
425
+ jsonString: string,
426
+ ): SafeParseResult<RetrieveDatapoint23, SDKValidationError> {
427
+ return safeParse(
428
+ jsonString,
429
+ (x) => RetrieveDatapoint23$inboundSchema.parse(JSON.parse(x)),
430
+ `Failed to parse 'RetrieveDatapoint23' from JSON`,
431
+ );
432
+ }
433
+
434
+ /** @internal */
435
+ export const RetrieveDatapoint2DatasetsType$inboundSchema: z.ZodNativeEnum<
436
+ typeof RetrieveDatapoint2DatasetsType
437
+ > = z.nativeEnum(RetrieveDatapoint2DatasetsType);
438
+
439
+ /** @internal */
440
+ export const RetrieveDatapoint2DatasetsType$outboundSchema: z.ZodNativeEnum<
441
+ typeof RetrieveDatapoint2DatasetsType
442
+ > = RetrieveDatapoint2DatasetsType$inboundSchema;
443
+
444
+ /**
445
+ * @internal
446
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
447
+ */
448
+ export namespace RetrieveDatapoint2DatasetsType$ {
449
+ /** @deprecated use `RetrieveDatapoint2DatasetsType$inboundSchema` instead. */
450
+ export const inboundSchema = RetrieveDatapoint2DatasetsType$inboundSchema;
451
+ /** @deprecated use `RetrieveDatapoint2DatasetsType$outboundSchema` instead. */
452
+ export const outboundSchema = RetrieveDatapoint2DatasetsType$outboundSchema;
453
+ }
454
+
455
+ /** @internal */
456
+ export const RetrieveDatapoint2ImageUrl$inboundSchema: z.ZodType<
457
+ RetrieveDatapoint2ImageUrl,
458
+ z.ZodTypeDef,
459
+ unknown
460
+ > = z.object({
461
+ id: z.string().optional(),
462
+ url: z.string(),
463
+ detail: z.string().optional(),
464
+ });
465
+
466
+ /** @internal */
467
+ export type RetrieveDatapoint2ImageUrl$Outbound = {
468
+ id?: string | undefined;
469
+ url: string;
470
+ detail?: string | undefined;
471
+ };
472
+
473
+ /** @internal */
474
+ export const RetrieveDatapoint2ImageUrl$outboundSchema: z.ZodType<
475
+ RetrieveDatapoint2ImageUrl$Outbound,
476
+ z.ZodTypeDef,
477
+ RetrieveDatapoint2ImageUrl
478
+ > = z.object({
479
+ id: z.string().optional(),
480
+ url: z.string(),
481
+ detail: z.string().optional(),
482
+ });
483
+
484
+ /**
485
+ * @internal
486
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
487
+ */
488
+ export namespace RetrieveDatapoint2ImageUrl$ {
489
+ /** @deprecated use `RetrieveDatapoint2ImageUrl$inboundSchema` instead. */
490
+ export const inboundSchema = RetrieveDatapoint2ImageUrl$inboundSchema;
491
+ /** @deprecated use `RetrieveDatapoint2ImageUrl$outboundSchema` instead. */
492
+ export const outboundSchema = RetrieveDatapoint2ImageUrl$outboundSchema;
493
+ /** @deprecated use `RetrieveDatapoint2ImageUrl$Outbound` instead. */
494
+ export type Outbound = RetrieveDatapoint2ImageUrl$Outbound;
495
+ }
496
+
497
+ export function retrieveDatapoint2ImageUrlToJSON(
498
+ retrieveDatapoint2ImageUrl: RetrieveDatapoint2ImageUrl,
499
+ ): string {
500
+ return JSON.stringify(
501
+ RetrieveDatapoint2ImageUrl$outboundSchema.parse(retrieveDatapoint2ImageUrl),
502
+ );
503
+ }
504
+
505
+ export function retrieveDatapoint2ImageUrlFromJSON(
506
+ jsonString: string,
507
+ ): SafeParseResult<RetrieveDatapoint2ImageUrl, SDKValidationError> {
508
+ return safeParse(
509
+ jsonString,
510
+ (x) => RetrieveDatapoint2ImageUrl$inboundSchema.parse(JSON.parse(x)),
511
+ `Failed to parse 'RetrieveDatapoint2ImageUrl' from JSON`,
512
+ );
513
+ }
514
+
515
+ /** @internal */
516
+ export const RetrieveDatapoint22$inboundSchema: z.ZodType<
517
+ RetrieveDatapoint22,
518
+ z.ZodTypeDef,
519
+ unknown
520
+ > = z.object({
521
+ type: RetrieveDatapoint2DatasetsType$inboundSchema,
522
+ image_url: z.lazy(() => RetrieveDatapoint2ImageUrl$inboundSchema),
523
+ }).transform((v) => {
524
+ return remap$(v, {
525
+ "image_url": "imageUrl",
526
+ });
527
+ });
528
+
529
+ /** @internal */
530
+ export type RetrieveDatapoint22$Outbound = {
531
+ type: string;
532
+ image_url: RetrieveDatapoint2ImageUrl$Outbound;
533
+ };
534
+
535
+ /** @internal */
536
+ export const RetrieveDatapoint22$outboundSchema: z.ZodType<
537
+ RetrieveDatapoint22$Outbound,
538
+ z.ZodTypeDef,
539
+ RetrieveDatapoint22
540
+ > = z.object({
541
+ type: RetrieveDatapoint2DatasetsType$outboundSchema,
542
+ imageUrl: z.lazy(() => RetrieveDatapoint2ImageUrl$outboundSchema),
543
+ }).transform((v) => {
544
+ return remap$(v, {
545
+ imageUrl: "image_url",
546
+ });
547
+ });
548
+
549
+ /**
550
+ * @internal
551
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
552
+ */
553
+ export namespace RetrieveDatapoint22$ {
554
+ /** @deprecated use `RetrieveDatapoint22$inboundSchema` instead. */
555
+ export const inboundSchema = RetrieveDatapoint22$inboundSchema;
556
+ /** @deprecated use `RetrieveDatapoint22$outboundSchema` instead. */
557
+ export const outboundSchema = RetrieveDatapoint22$outboundSchema;
558
+ /** @deprecated use `RetrieveDatapoint22$Outbound` instead. */
559
+ export type Outbound = RetrieveDatapoint22$Outbound;
560
+ }
561
+
562
+ export function retrieveDatapoint22ToJSON(
563
+ retrieveDatapoint22: RetrieveDatapoint22,
564
+ ): string {
565
+ return JSON.stringify(
566
+ RetrieveDatapoint22$outboundSchema.parse(retrieveDatapoint22),
567
+ );
568
+ }
569
+
570
+ export function retrieveDatapoint22FromJSON(
571
+ jsonString: string,
572
+ ): SafeParseResult<RetrieveDatapoint22, SDKValidationError> {
573
+ return safeParse(
574
+ jsonString,
575
+ (x) => RetrieveDatapoint22$inboundSchema.parse(JSON.parse(x)),
576
+ `Failed to parse 'RetrieveDatapoint22' from JSON`,
577
+ );
578
+ }
579
+
580
+ /** @internal */
581
+ export const RetrieveDatapoint2Type$inboundSchema: z.ZodNativeEnum<
582
+ typeof RetrieveDatapoint2Type
583
+ > = z.nativeEnum(RetrieveDatapoint2Type);
584
+
585
+ /** @internal */
586
+ export const RetrieveDatapoint2Type$outboundSchema: z.ZodNativeEnum<
587
+ typeof RetrieveDatapoint2Type
588
+ > = RetrieveDatapoint2Type$inboundSchema;
589
+
590
+ /**
591
+ * @internal
592
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
593
+ */
594
+ export namespace RetrieveDatapoint2Type$ {
595
+ /** @deprecated use `RetrieveDatapoint2Type$inboundSchema` instead. */
596
+ export const inboundSchema = RetrieveDatapoint2Type$inboundSchema;
597
+ /** @deprecated use `RetrieveDatapoint2Type$outboundSchema` instead. */
598
+ export const outboundSchema = RetrieveDatapoint2Type$outboundSchema;
599
+ }
600
+
601
+ /** @internal */
602
+ export const RetrieveDatapoint21$inboundSchema: z.ZodType<
603
+ RetrieveDatapoint21,
604
+ z.ZodTypeDef,
605
+ unknown
606
+ > = z.object({
607
+ type: RetrieveDatapoint2Type$inboundSchema,
608
+ text: z.string(),
609
+ });
610
+
611
+ /** @internal */
612
+ export type RetrieveDatapoint21$Outbound = {
613
+ type: string;
614
+ text: string;
615
+ };
616
+
617
+ /** @internal */
618
+ export const RetrieveDatapoint21$outboundSchema: z.ZodType<
619
+ RetrieveDatapoint21$Outbound,
620
+ z.ZodTypeDef,
621
+ RetrieveDatapoint21
622
+ > = z.object({
623
+ type: RetrieveDatapoint2Type$outboundSchema,
624
+ text: z.string(),
625
+ });
626
+
627
+ /**
628
+ * @internal
629
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
630
+ */
631
+ export namespace RetrieveDatapoint21$ {
632
+ /** @deprecated use `RetrieveDatapoint21$inboundSchema` instead. */
633
+ export const inboundSchema = RetrieveDatapoint21$inboundSchema;
634
+ /** @deprecated use `RetrieveDatapoint21$outboundSchema` instead. */
635
+ export const outboundSchema = RetrieveDatapoint21$outboundSchema;
636
+ /** @deprecated use `RetrieveDatapoint21$Outbound` instead. */
637
+ export type Outbound = RetrieveDatapoint21$Outbound;
638
+ }
639
+
640
+ export function retrieveDatapoint21ToJSON(
641
+ retrieveDatapoint21: RetrieveDatapoint21,
642
+ ): string {
643
+ return JSON.stringify(
644
+ RetrieveDatapoint21$outboundSchema.parse(retrieveDatapoint21),
645
+ );
646
+ }
647
+
648
+ export function retrieveDatapoint21FromJSON(
649
+ jsonString: string,
650
+ ): SafeParseResult<RetrieveDatapoint21, SDKValidationError> {
651
+ return safeParse(
652
+ jsonString,
653
+ (x) => RetrieveDatapoint21$inboundSchema.parse(JSON.parse(x)),
654
+ `Failed to parse 'RetrieveDatapoint21' from JSON`,
655
+ );
656
+ }
657
+
658
+ /** @internal */
659
+ export const RetrieveDatapointContent2$inboundSchema: z.ZodType<
660
+ RetrieveDatapointContent2,
661
+ z.ZodTypeDef,
662
+ unknown
663
+ > = z.union([
664
+ z.lazy(() => RetrieveDatapoint21$inboundSchema),
665
+ z.lazy(() => RetrieveDatapoint22$inboundSchema),
666
+ z.lazy(() => RetrieveDatapoint23$inboundSchema),
667
+ ]);
668
+
669
+ /** @internal */
670
+ export type RetrieveDatapointContent2$Outbound =
671
+ | RetrieveDatapoint21$Outbound
672
+ | RetrieveDatapoint22$Outbound
673
+ | RetrieveDatapoint23$Outbound;
674
+
675
+ /** @internal */
676
+ export const RetrieveDatapointContent2$outboundSchema: z.ZodType<
677
+ RetrieveDatapointContent2$Outbound,
678
+ z.ZodTypeDef,
679
+ RetrieveDatapointContent2
680
+ > = z.union([
681
+ z.lazy(() => RetrieveDatapoint21$outboundSchema),
682
+ z.lazy(() => RetrieveDatapoint22$outboundSchema),
683
+ z.lazy(() => RetrieveDatapoint23$outboundSchema),
684
+ ]);
685
+
686
+ /**
687
+ * @internal
688
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
689
+ */
690
+ export namespace RetrieveDatapointContent2$ {
691
+ /** @deprecated use `RetrieveDatapointContent2$inboundSchema` instead. */
692
+ export const inboundSchema = RetrieveDatapointContent2$inboundSchema;
693
+ /** @deprecated use `RetrieveDatapointContent2$outboundSchema` instead. */
694
+ export const outboundSchema = RetrieveDatapointContent2$outboundSchema;
695
+ /** @deprecated use `RetrieveDatapointContent2$Outbound` instead. */
696
+ export type Outbound = RetrieveDatapointContent2$Outbound;
697
+ }
698
+
699
+ export function retrieveDatapointContent2ToJSON(
700
+ retrieveDatapointContent2: RetrieveDatapointContent2,
701
+ ): string {
702
+ return JSON.stringify(
703
+ RetrieveDatapointContent2$outboundSchema.parse(retrieveDatapointContent2),
704
+ );
705
+ }
706
+
707
+ export function retrieveDatapointContent2FromJSON(
708
+ jsonString: string,
709
+ ): SafeParseResult<RetrieveDatapointContent2, SDKValidationError> {
710
+ return safeParse(
711
+ jsonString,
712
+ (x) => RetrieveDatapointContent2$inboundSchema.parse(JSON.parse(x)),
713
+ `Failed to parse 'RetrieveDatapointContent2' from JSON`,
714
+ );
715
+ }
716
+
717
+ /** @internal */
718
+ export const RetrieveDatapointContent$inboundSchema: z.ZodType<
719
+ RetrieveDatapointContent,
720
+ z.ZodTypeDef,
721
+ unknown
722
+ > = z.union([
723
+ z.string(),
724
+ z.array(z.union([
725
+ z.lazy(() => RetrieveDatapoint21$inboundSchema),
726
+ z.lazy(() => RetrieveDatapoint22$inboundSchema),
727
+ z.lazy(() => RetrieveDatapoint23$inboundSchema),
728
+ ])),
729
+ ]);
730
+
731
+ /** @internal */
732
+ export type RetrieveDatapointContent$Outbound =
733
+ | string
734
+ | Array<
735
+ | RetrieveDatapoint21$Outbound
736
+ | RetrieveDatapoint22$Outbound
737
+ | RetrieveDatapoint23$Outbound
738
+ >;
739
+
740
+ /** @internal */
741
+ export const RetrieveDatapointContent$outboundSchema: z.ZodType<
742
+ RetrieveDatapointContent$Outbound,
743
+ z.ZodTypeDef,
744
+ RetrieveDatapointContent
745
+ > = z.union([
746
+ z.string(),
747
+ z.array(z.union([
748
+ z.lazy(() => RetrieveDatapoint21$outboundSchema),
749
+ z.lazy(() => RetrieveDatapoint22$outboundSchema),
750
+ z.lazy(() => RetrieveDatapoint23$outboundSchema),
751
+ ])),
752
+ ]);
753
+
754
+ /**
755
+ * @internal
756
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
757
+ */
758
+ export namespace RetrieveDatapointContent$ {
759
+ /** @deprecated use `RetrieveDatapointContent$inboundSchema` instead. */
760
+ export const inboundSchema = RetrieveDatapointContent$inboundSchema;
761
+ /** @deprecated use `RetrieveDatapointContent$outboundSchema` instead. */
762
+ export const outboundSchema = RetrieveDatapointContent$outboundSchema;
763
+ /** @deprecated use `RetrieveDatapointContent$Outbound` instead. */
764
+ export type Outbound = RetrieveDatapointContent$Outbound;
765
+ }
766
+
767
+ export function retrieveDatapointContentToJSON(
768
+ retrieveDatapointContent: RetrieveDatapointContent,
769
+ ): string {
770
+ return JSON.stringify(
771
+ RetrieveDatapointContent$outboundSchema.parse(retrieveDatapointContent),
772
+ );
773
+ }
774
+
775
+ export function retrieveDatapointContentFromJSON(
776
+ jsonString: string,
777
+ ): SafeParseResult<RetrieveDatapointContent, SDKValidationError> {
778
+ return safeParse(
779
+ jsonString,
780
+ (x) => RetrieveDatapointContent$inboundSchema.parse(JSON.parse(x)),
781
+ `Failed to parse 'RetrieveDatapointContent' from JSON`,
782
+ );
783
+ }
784
+
785
+ /** @internal */
786
+ export const RetrieveDatapointType$inboundSchema: z.ZodNativeEnum<
787
+ typeof RetrieveDatapointType
788
+ > = z.nativeEnum(RetrieveDatapointType);
789
+
790
+ /** @internal */
791
+ export const RetrieveDatapointType$outboundSchema: z.ZodNativeEnum<
792
+ typeof RetrieveDatapointType
793
+ > = RetrieveDatapointType$inboundSchema;
794
+
795
+ /**
796
+ * @internal
797
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
798
+ */
799
+ export namespace RetrieveDatapointType$ {
800
+ /** @deprecated use `RetrieveDatapointType$inboundSchema` instead. */
801
+ export const inboundSchema = RetrieveDatapointType$inboundSchema;
802
+ /** @deprecated use `RetrieveDatapointType$outboundSchema` instead. */
803
+ export const outboundSchema = RetrieveDatapointType$outboundSchema;
804
+ }
805
+
806
+ /** @internal */
807
+ export const RetrieveDatapointFunction$inboundSchema: z.ZodType<
808
+ RetrieveDatapointFunction,
809
+ z.ZodTypeDef,
810
+ unknown
811
+ > = z.object({
812
+ name: z.string(),
813
+ arguments: z.string(),
814
+ });
815
+
816
+ /** @internal */
817
+ export type RetrieveDatapointFunction$Outbound = {
818
+ name: string;
819
+ arguments: string;
820
+ };
821
+
822
+ /** @internal */
823
+ export const RetrieveDatapointFunction$outboundSchema: z.ZodType<
824
+ RetrieveDatapointFunction$Outbound,
825
+ z.ZodTypeDef,
826
+ RetrieveDatapointFunction
827
+ > = z.object({
828
+ name: z.string(),
829
+ arguments: z.string(),
830
+ });
831
+
832
+ /**
833
+ * @internal
834
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
835
+ */
836
+ export namespace RetrieveDatapointFunction$ {
837
+ /** @deprecated use `RetrieveDatapointFunction$inboundSchema` instead. */
838
+ export const inboundSchema = RetrieveDatapointFunction$inboundSchema;
839
+ /** @deprecated use `RetrieveDatapointFunction$outboundSchema` instead. */
840
+ export const outboundSchema = RetrieveDatapointFunction$outboundSchema;
841
+ /** @deprecated use `RetrieveDatapointFunction$Outbound` instead. */
842
+ export type Outbound = RetrieveDatapointFunction$Outbound;
843
+ }
844
+
845
+ export function retrieveDatapointFunctionToJSON(
846
+ retrieveDatapointFunction: RetrieveDatapointFunction,
847
+ ): string {
848
+ return JSON.stringify(
849
+ RetrieveDatapointFunction$outboundSchema.parse(retrieveDatapointFunction),
850
+ );
851
+ }
852
+
853
+ export function retrieveDatapointFunctionFromJSON(
854
+ jsonString: string,
855
+ ): SafeParseResult<RetrieveDatapointFunction, SDKValidationError> {
856
+ return safeParse(
857
+ jsonString,
858
+ (x) => RetrieveDatapointFunction$inboundSchema.parse(JSON.parse(x)),
859
+ `Failed to parse 'RetrieveDatapointFunction' from JSON`,
860
+ );
861
+ }
862
+
863
+ /** @internal */
864
+ export const RetrieveDatapointToolCalls$inboundSchema: z.ZodType<
865
+ RetrieveDatapointToolCalls,
866
+ z.ZodTypeDef,
867
+ unknown
868
+ > = z.object({
869
+ id: z.string().optional(),
870
+ index: z.number().optional(),
871
+ type: RetrieveDatapointType$inboundSchema,
872
+ function: z.lazy(() => RetrieveDatapointFunction$inboundSchema),
873
+ });
874
+
875
+ /** @internal */
876
+ export type RetrieveDatapointToolCalls$Outbound = {
877
+ id?: string | undefined;
878
+ index?: number | undefined;
879
+ type: string;
880
+ function: RetrieveDatapointFunction$Outbound;
881
+ };
882
+
883
+ /** @internal */
884
+ export const RetrieveDatapointToolCalls$outboundSchema: z.ZodType<
885
+ RetrieveDatapointToolCalls$Outbound,
886
+ z.ZodTypeDef,
887
+ RetrieveDatapointToolCalls
888
+ > = z.object({
889
+ id: z.string().optional(),
890
+ index: z.number().optional(),
891
+ type: RetrieveDatapointType$outboundSchema,
892
+ function: z.lazy(() => RetrieveDatapointFunction$outboundSchema),
893
+ });
894
+
895
+ /**
896
+ * @internal
897
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
898
+ */
899
+ export namespace RetrieveDatapointToolCalls$ {
900
+ /** @deprecated use `RetrieveDatapointToolCalls$inboundSchema` instead. */
901
+ export const inboundSchema = RetrieveDatapointToolCalls$inboundSchema;
902
+ /** @deprecated use `RetrieveDatapointToolCalls$outboundSchema` instead. */
903
+ export const outboundSchema = RetrieveDatapointToolCalls$outboundSchema;
904
+ /** @deprecated use `RetrieveDatapointToolCalls$Outbound` instead. */
905
+ export type Outbound = RetrieveDatapointToolCalls$Outbound;
906
+ }
907
+
908
+ export function retrieveDatapointToolCallsToJSON(
909
+ retrieveDatapointToolCalls: RetrieveDatapointToolCalls,
910
+ ): string {
911
+ return JSON.stringify(
912
+ RetrieveDatapointToolCalls$outboundSchema.parse(retrieveDatapointToolCalls),
913
+ );
914
+ }
915
+
916
+ export function retrieveDatapointToolCallsFromJSON(
917
+ jsonString: string,
918
+ ): SafeParseResult<RetrieveDatapointToolCalls, SDKValidationError> {
919
+ return safeParse(
920
+ jsonString,
921
+ (x) => RetrieveDatapointToolCalls$inboundSchema.parse(JSON.parse(x)),
922
+ `Failed to parse 'RetrieveDatapointToolCalls' from JSON`,
923
+ );
924
+ }
925
+
926
+ /** @internal */
927
+ export const RetrieveDatapointMessages$inboundSchema: z.ZodType<
928
+ RetrieveDatapointMessages,
929
+ z.ZodTypeDef,
930
+ unknown
931
+ > = z.object({
932
+ role: RetrieveDatapointRole$inboundSchema,
933
+ content: z.union([
934
+ z.string(),
935
+ z.array(z.union([
936
+ z.lazy(() => RetrieveDatapoint21$inboundSchema),
937
+ z.lazy(() => RetrieveDatapoint22$inboundSchema),
938
+ z.lazy(() => RetrieveDatapoint23$inboundSchema),
939
+ ])),
940
+ ]),
941
+ tool_calls: z.array(z.lazy(() => RetrieveDatapointToolCalls$inboundSchema))
942
+ .optional(),
943
+ tool_call_id: z.string().optional(),
944
+ }).transform((v) => {
945
+ return remap$(v, {
946
+ "tool_calls": "toolCalls",
947
+ "tool_call_id": "toolCallId",
948
+ });
949
+ });
950
+
951
+ /** @internal */
952
+ export type RetrieveDatapointMessages$Outbound = {
953
+ role: string;
954
+ content:
955
+ | string
956
+ | Array<
957
+ | RetrieveDatapoint21$Outbound
958
+ | RetrieveDatapoint22$Outbound
959
+ | RetrieveDatapoint23$Outbound
960
+ >;
961
+ tool_calls?: Array<RetrieveDatapointToolCalls$Outbound> | undefined;
962
+ tool_call_id?: string | undefined;
963
+ };
964
+
965
+ /** @internal */
966
+ export const RetrieveDatapointMessages$outboundSchema: z.ZodType<
967
+ RetrieveDatapointMessages$Outbound,
968
+ z.ZodTypeDef,
969
+ RetrieveDatapointMessages
970
+ > = z.object({
971
+ role: RetrieveDatapointRole$outboundSchema,
972
+ content: z.union([
973
+ z.string(),
974
+ z.array(z.union([
975
+ z.lazy(() => RetrieveDatapoint21$outboundSchema),
976
+ z.lazy(() => RetrieveDatapoint22$outboundSchema),
977
+ z.lazy(() => RetrieveDatapoint23$outboundSchema),
978
+ ])),
979
+ ]),
980
+ toolCalls: z.array(z.lazy(() => RetrieveDatapointToolCalls$outboundSchema))
981
+ .optional(),
982
+ toolCallId: z.string().optional(),
983
+ }).transform((v) => {
984
+ return remap$(v, {
985
+ toolCalls: "tool_calls",
986
+ toolCallId: "tool_call_id",
987
+ });
988
+ });
989
+
990
+ /**
991
+ * @internal
992
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
993
+ */
994
+ export namespace RetrieveDatapointMessages$ {
995
+ /** @deprecated use `RetrieveDatapointMessages$inboundSchema` instead. */
996
+ export const inboundSchema = RetrieveDatapointMessages$inboundSchema;
997
+ /** @deprecated use `RetrieveDatapointMessages$outboundSchema` instead. */
998
+ export const outboundSchema = RetrieveDatapointMessages$outboundSchema;
999
+ /** @deprecated use `RetrieveDatapointMessages$Outbound` instead. */
1000
+ export type Outbound = RetrieveDatapointMessages$Outbound;
1001
+ }
1002
+
1003
+ export function retrieveDatapointMessagesToJSON(
1004
+ retrieveDatapointMessages: RetrieveDatapointMessages,
1005
+ ): string {
1006
+ return JSON.stringify(
1007
+ RetrieveDatapointMessages$outboundSchema.parse(retrieveDatapointMessages),
1008
+ );
1009
+ }
1010
+
1011
+ export function retrieveDatapointMessagesFromJSON(
1012
+ jsonString: string,
1013
+ ): SafeParseResult<RetrieveDatapointMessages, SDKValidationError> {
1014
+ return safeParse(
1015
+ jsonString,
1016
+ (x) => RetrieveDatapointMessages$inboundSchema.parse(JSON.parse(x)),
1017
+ `Failed to parse 'RetrieveDatapointMessages' from JSON`,
1018
+ );
1019
+ }
1020
+
1021
+ /** @internal */
1022
+ export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
1023
+ RetrieveDatapointResponseBody,
1024
+ z.ZodTypeDef,
1025
+ unknown
1026
+ > = z.object({
1027
+ _id: z.string(),
1028
+ workspace_id: z.string(),
1029
+ inputs: z.record(z.any()).optional(),
1030
+ messages: z.array(z.lazy(() => RetrieveDatapointMessages$inboundSchema))
1031
+ .optional(),
1032
+ expected_output: z.string().optional(),
1033
+ dataset_id: z.string(),
1034
+ created_by_id: z.string().optional(),
1035
+ updated_by_id: z.string().optional(),
1036
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
1037
+ .optional(),
1038
+ updated: z.string().datetime({ offset: true }).default(
1039
+ "2025-05-28T11:21:06.214Z",
1040
+ ).transform(v => new Date(v)),
1041
+ }).transform((v) => {
1042
+ return remap$(v, {
1043
+ "_id": "id",
1044
+ "workspace_id": "workspaceId",
1045
+ "expected_output": "expectedOutput",
1046
+ "dataset_id": "datasetId",
1047
+ "created_by_id": "createdById",
1048
+ "updated_by_id": "updatedById",
1049
+ });
1050
+ });
1051
+
1052
+ /** @internal */
1053
+ export type RetrieveDatapointResponseBody$Outbound = {
1054
+ _id: string;
1055
+ workspace_id: string;
1056
+ inputs?: { [k: string]: any } | undefined;
1057
+ messages?: Array<RetrieveDatapointMessages$Outbound> | undefined;
1058
+ expected_output?: string | undefined;
1059
+ dataset_id: string;
1060
+ created_by_id?: string | undefined;
1061
+ updated_by_id?: string | undefined;
1062
+ created?: string | undefined;
1063
+ updated: string;
1064
+ };
1065
+
1066
+ /** @internal */
1067
+ export const RetrieveDatapointResponseBody$outboundSchema: z.ZodType<
1068
+ RetrieveDatapointResponseBody$Outbound,
1069
+ z.ZodTypeDef,
1070
+ RetrieveDatapointResponseBody
1071
+ > = z.object({
1072
+ id: z.string(),
1073
+ workspaceId: z.string(),
1074
+ inputs: z.record(z.any()).optional(),
1075
+ messages: z.array(z.lazy(() => RetrieveDatapointMessages$outboundSchema))
1076
+ .optional(),
1077
+ expectedOutput: z.string().optional(),
1078
+ datasetId: z.string(),
1079
+ createdById: z.string().optional(),
1080
+ updatedById: z.string().optional(),
1081
+ created: z.date().transform(v => v.toISOString()).optional(),
1082
+ updated: z.date().default(() => new Date("2025-05-28T11:21:06.214Z"))
1083
+ .transform(v => v.toISOString()),
1084
+ }).transform((v) => {
1085
+ return remap$(v, {
1086
+ id: "_id",
1087
+ workspaceId: "workspace_id",
1088
+ expectedOutput: "expected_output",
1089
+ datasetId: "dataset_id",
1090
+ createdById: "created_by_id",
1091
+ updatedById: "updated_by_id",
1092
+ });
1093
+ });
1094
+
1095
+ /**
1096
+ * @internal
1097
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1098
+ */
1099
+ export namespace RetrieveDatapointResponseBody$ {
1100
+ /** @deprecated use `RetrieveDatapointResponseBody$inboundSchema` instead. */
1101
+ export const inboundSchema = RetrieveDatapointResponseBody$inboundSchema;
1102
+ /** @deprecated use `RetrieveDatapointResponseBody$outboundSchema` instead. */
1103
+ export const outboundSchema = RetrieveDatapointResponseBody$outboundSchema;
1104
+ /** @deprecated use `RetrieveDatapointResponseBody$Outbound` instead. */
1105
+ export type Outbound = RetrieveDatapointResponseBody$Outbound;
1106
+ }
1107
+
1108
+ export function retrieveDatapointResponseBodyToJSON(
1109
+ retrieveDatapointResponseBody: RetrieveDatapointResponseBody,
1110
+ ): string {
1111
+ return JSON.stringify(
1112
+ RetrieveDatapointResponseBody$outboundSchema.parse(
1113
+ retrieveDatapointResponseBody,
1114
+ ),
1115
+ );
1116
+ }
1117
+
1118
+ export function retrieveDatapointResponseBodyFromJSON(
1119
+ jsonString: string,
1120
+ ): SafeParseResult<RetrieveDatapointResponseBody, SDKValidationError> {
1121
+ return safeParse(
1122
+ jsonString,
1123
+ (x) => RetrieveDatapointResponseBody$inboundSchema.parse(JSON.parse(x)),
1124
+ `Failed to parse 'RetrieveDatapointResponseBody' from JSON`,
1125
+ );
1126
+ }