@orq-ai/node 3.3.1 → 3.4.0-rc.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 (273) hide show
  1. package/bin/mcp-server.js +40 -43
  2. package/bin/mcp-server.js.map +24 -24
  3. package/jsr.json +1 -1
  4. package/lib/config.d.ts +2 -2
  5. package/lib/config.js +2 -2
  6. package/lib/config.js.map +1 -1
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/mcp-server.js.map +1 -1
  9. package/mcp-server/server.js +1 -1
  10. package/mcp-server/server.js.map +1 -1
  11. package/models/operations/bulkcreatedatapoints.js +2 -2
  12. package/models/operations/createcontact.js +2 -2
  13. package/models/operations/createdataset.js +2 -2
  14. package/models/operations/createdatasetitem.js +2 -2
  15. package/models/operations/createdatasource.js +2 -2
  16. package/models/operations/fileget.js +2 -2
  17. package/models/operations/filelist.js +2 -2
  18. package/models/operations/fileupload.js +2 -2
  19. package/models/operations/listdatasetdatapoints.js +2 -2
  20. package/models/operations/listdatasets.js +2 -2
  21. package/models/operations/listdatasources.js +2 -2
  22. package/models/operations/retrievedatapoint.js +2 -2
  23. package/models/operations/retrievedataset.js +2 -2
  24. package/models/operations/retrievedatasource.js +2 -2
  25. package/models/operations/updatedatapoint.js +2 -2
  26. package/models/operations/updatedataset.js +2 -2
  27. package/models/operations/updatedatasource.js +2 -2
  28. package/package.json +3 -2
  29. package/src/lib/config.ts +2 -2
  30. package/src/mcp-server/mcp-server.ts +1 -1
  31. package/src/mcp-server/server.ts +1 -1
  32. package/src/models/operations/bulkcreatedatapoints.ts +2 -2
  33. package/src/models/operations/createcontact.ts +2 -2
  34. package/src/models/operations/createdataset.ts +2 -2
  35. package/src/models/operations/createdatasetitem.ts +2 -2
  36. package/src/models/operations/createdatasource.ts +2 -2
  37. package/src/models/operations/fileget.ts +2 -2
  38. package/src/models/operations/filelist.ts +2 -2
  39. package/src/models/operations/fileupload.ts +2 -2
  40. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  41. package/src/models/operations/listdatasets.ts +2 -2
  42. package/src/models/operations/listdatasources.ts +2 -2
  43. package/src/models/operations/retrievedatapoint.ts +2 -2
  44. package/src/models/operations/retrievedataset.ts +2 -2
  45. package/src/models/operations/retrievedatasource.ts +2 -2
  46. package/src/models/operations/updatedatapoint.ts +2 -2
  47. package/src/models/operations/updatedataset.ts +2 -2
  48. package/src/models/operations/updatedatasource.ts +2 -2
  49. package/packages/orq-rc/FUNCTIONS.md +0 -106
  50. package/packages/orq-rc/README.md +0 -698
  51. package/packages/orq-rc/RUNTIMES.md +0 -48
  52. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
  53. package/packages/orq-rc/docs/sdks/datasets/README.md +0 -940
  54. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -316
  55. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
  56. package/packages/orq-rc/docs/sdks/files/README.md +0 -311
  57. package/packages/orq-rc/docs/sdks/knowledge/README.md +0 -1279
  58. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
  59. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  60. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -614
  61. package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -80
  62. package/packages/orq-rc/jsr.json +0 -28
  63. package/packages/orq-rc/package-lock.json +0 -3217
  64. package/packages/orq-rc/package.json +0 -45
  65. package/packages/orq-rc/src/core.ts +0 -13
  66. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -154
  67. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -161
  68. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -159
  69. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -161
  70. package/packages/orq-rc/src/funcs/datasetsCreateDatapoints.ts +0 -165
  71. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -161
  72. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -176
  73. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -161
  74. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -168
  75. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -169
  76. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -175
  77. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -170
  78. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -173
  79. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -162
  80. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -170
  81. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -170
  82. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -162
  83. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -178
  84. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -154
  85. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -174
  86. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -158
  87. package/packages/orq-rc/src/funcs/filesGet.ts +0 -160
  88. package/packages/orq-rc/src/funcs/filesList.ts +0 -161
  89. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -152
  90. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -165
  91. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -160
  92. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -161
  93. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -168
  94. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -167
  95. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -163
  96. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -172
  97. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -168
  98. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -160
  99. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -167
  100. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -163
  101. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -158
  102. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -158
  103. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -168
  104. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -164
  105. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -154
  106. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -158
  107. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -175
  108. package/packages/orq-rc/src/funcs/promptsList.ts +0 -161
  109. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -167
  110. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -160
  111. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -167
  112. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -155
  113. package/packages/orq-rc/src/hooks/global.ts +0 -44
  114. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  115. package/packages/orq-rc/src/hooks/index.ts +0 -6
  116. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  117. package/packages/orq-rc/src/hooks/types.ts +0 -110
  118. package/packages/orq-rc/src/index.ts +0 -7
  119. package/packages/orq-rc/src/lib/base64.ts +0 -37
  120. package/packages/orq-rc/src/lib/config.ts +0 -70
  121. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  122. package/packages/orq-rc/src/lib/encodings.ts +0 -483
  123. package/packages/orq-rc/src/lib/env.ts +0 -73
  124. package/packages/orq-rc/src/lib/event-streams.ts +0 -264
  125. package/packages/orq-rc/src/lib/files.ts +0 -40
  126. package/packages/orq-rc/src/lib/http.ts +0 -323
  127. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  128. package/packages/orq-rc/src/lib/logger.ts +0 -9
  129. package/packages/orq-rc/src/lib/matchers.ts +0 -325
  130. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  131. package/packages/orq-rc/src/lib/retries.ts +0 -218
  132. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  133. package/packages/orq-rc/src/lib/sdks.ts +0 -395
  134. package/packages/orq-rc/src/lib/security.ts +0 -261
  135. package/packages/orq-rc/src/lib/url.ts +0 -33
  136. package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -125
  137. package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -140
  138. package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
  139. package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
  140. package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
  141. package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
  142. package/packages/orq-rc/src/mcp-server/prompts.ts +0 -110
  143. package/packages/orq-rc/src/mcp-server/resources.ts +0 -158
  144. package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
  145. package/packages/orq-rc/src/mcp-server/server.ts +0 -157
  146. package/packages/orq-rc/src/mcp-server/shared.ts +0 -75
  147. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
  148. package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
  149. package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
  150. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
  151. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoints.ts +0 -37
  152. package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
  153. package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
  154. package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
  155. package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
  156. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
  157. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
  158. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
  159. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
  160. package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
  161. package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
  162. package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
  163. package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +0 -37
  164. package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
  165. package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
  166. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
  167. package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
  168. package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
  169. package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
  170. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreate.ts +0 -35
  171. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +0 -35
  172. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +0 -35
  173. package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +0 -35
  174. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +0 -33
  175. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +0 -35
  176. package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +0 -37
  177. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +0 -35
  178. package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +0 -35
  179. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +0 -37
  180. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveChunk.ts +0 -35
  181. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +0 -35
  182. package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +0 -35
  183. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +0 -35
  184. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +0 -35
  185. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateDatasource.ts +0 -35
  186. package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
  187. package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
  188. package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
  189. package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
  190. package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
  191. package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
  192. package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
  193. package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
  194. package/packages/orq-rc/src/mcp-server/tools.ts +0 -126
  195. package/packages/orq-rc/src/models/components/deployments.ts +0 -4164
  196. package/packages/orq-rc/src/models/components/index.ts +0 -6
  197. package/packages/orq-rc/src/models/components/security.ts +0 -71
  198. package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
  199. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -71
  200. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
  201. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  202. package/packages/orq-rc/src/models/errors/index.ts +0 -10
  203. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
  204. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
  205. package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +0 -1816
  206. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -75
  207. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -680
  208. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
  209. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -296
  210. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -1740
  211. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -852
  212. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  213. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -676
  214. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3743
  215. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -96
  216. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -81
  217. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -75
  218. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -87
  219. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -78
  220. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  221. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -4936
  222. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -6090
  223. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1199
  224. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2155
  225. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -5960
  226. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  227. package/packages/orq-rc/src/models/operations/fileget.ts +0 -223
  228. package/packages/orq-rc/src/models/operations/filelist.ts +0 -337
  229. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -324
  230. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2127
  231. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -265
  232. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -444
  233. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1993
  234. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -1991
  235. package/packages/orq-rc/src/models/operations/index.ts +0 -51
  236. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -444
  237. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1071
  238. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -406
  239. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -447
  240. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -568
  241. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2125
  242. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  243. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -924
  244. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -288
  245. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -273
  246. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1673
  247. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -418
  248. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -1729
  249. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -393
  250. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -345
  251. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -790
  252. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -3929
  253. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  254. package/packages/orq-rc/src/sdk/datasets.ts +0 -222
  255. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  256. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  257. package/packages/orq-rc/src/sdk/files.ts +0 -78
  258. package/packages/orq-rc/src/sdk/index.ts +0 -5
  259. package/packages/orq-rc/src/sdk/knowledge.ts +0 -261
  260. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  261. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  262. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  263. package/packages/orq-rc/src/sdk/sdk.ts +0 -55
  264. package/packages/orq-rc/src/types/async.ts +0 -68
  265. package/packages/orq-rc/src/types/blobs.ts +0 -31
  266. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  267. package/packages/orq-rc/src/types/enums.ts +0 -16
  268. package/packages/orq-rc/src/types/fp.ts +0 -50
  269. package/packages/orq-rc/src/types/index.ts +0 -11
  270. package/packages/orq-rc/src/types/operations.ts +0 -105
  271. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  272. package/packages/orq-rc/src/types/streams.ts +0 -21
  273. package/packages/orq-rc/tsconfig.json +0 -41
@@ -1,924 +0,0 @@
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
- export const RetrieveDatapoint2DatasetsType = {
36
- ImageUrl: "image_url",
37
- } as const;
38
- export type RetrieveDatapoint2DatasetsType = ClosedEnum<
39
- typeof RetrieveDatapoint2DatasetsType
40
- >;
41
-
42
- export type RetrieveDatapoint2ImageUrl = {
43
- /**
44
- * The orq.ai id of the image
45
- */
46
- id?: string | undefined;
47
- /**
48
- * Either a URL of the image or the base64 encoded data URI.
49
- */
50
- url: string;
51
- /**
52
- * Specifies the detail level of the image. Currently only supported with OpenAI models
53
- */
54
- detail?: string | undefined;
55
- };
56
-
57
- /**
58
- * The image part of the prompt message. Only supported with vision models.
59
- */
60
- export type RetrieveDatapoint22 = {
61
- type: RetrieveDatapoint2DatasetsType;
62
- imageUrl: RetrieveDatapoint2ImageUrl;
63
- };
64
-
65
- export const RetrieveDatapoint2Type = {
66
- Text: "text",
67
- } as const;
68
- export type RetrieveDatapoint2Type = ClosedEnum<typeof RetrieveDatapoint2Type>;
69
-
70
- /**
71
- * Text content part of a prompt message
72
- */
73
- export type RetrieveDatapoint21 = {
74
- type: RetrieveDatapoint2Type;
75
- text: string;
76
- };
77
-
78
- export type RetrieveDatapointContent2 =
79
- | RetrieveDatapoint21
80
- | RetrieveDatapoint22;
81
-
82
- /**
83
- * 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.
84
- */
85
- export type RetrieveDatapointContent =
86
- | string
87
- | Array<RetrieveDatapoint21 | RetrieveDatapoint22>;
88
-
89
- export const RetrieveDatapointType = {
90
- Function: "function",
91
- } as const;
92
- export type RetrieveDatapointType = ClosedEnum<typeof RetrieveDatapointType>;
93
-
94
- export type RetrieveDatapointFunction = {
95
- name: string;
96
- /**
97
- * JSON string arguments for the functions
98
- */
99
- arguments: string;
100
- };
101
-
102
- export type RetrieveDatapointToolCalls = {
103
- id?: string | undefined;
104
- index?: number | undefined;
105
- type: RetrieveDatapointType;
106
- function: RetrieveDatapointFunction;
107
- };
108
-
109
- export type RetrieveDatapointMessages = {
110
- /**
111
- * The role of the prompt message
112
- */
113
- role: RetrieveDatapointRole;
114
- /**
115
- * 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.
116
- */
117
- content: string | Array<RetrieveDatapoint21 | RetrieveDatapoint22>;
118
- toolCalls?: Array<RetrieveDatapointToolCalls> | undefined;
119
- };
120
-
121
- /**
122
- * Datapoint retrieved.
123
- */
124
- export type RetrieveDatapointResponseBody = {
125
- /**
126
- * The unique identifier of the dataset item
127
- */
128
- id: string;
129
- /**
130
- * The unique identifier of the workspace it belongs to
131
- */
132
- workspaceId: string;
133
- /**
134
- * 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.
135
- */
136
- inputs?: { [k: string]: any } | undefined;
137
- /**
138
- * The prompt template messages
139
- */
140
- messages?: Array<RetrieveDatapointMessages> | undefined;
141
- expectedOutput?: string | undefined;
142
- /**
143
- * The unique identifier of the dataset
144
- */
145
- datasetId: string;
146
- /**
147
- * The unique identifier of the user who created the dataset
148
- */
149
- createdById?: string | undefined;
150
- /**
151
- * The unique identifier of the user who last updated the dataset
152
- */
153
- updatedById?: string | undefined;
154
- /**
155
- * The date and time the resource was created
156
- */
157
- created?: Date | undefined;
158
- /**
159
- * The date and time the resource was last updated
160
- */
161
- updated?: Date | undefined;
162
- };
163
-
164
- /** @internal */
165
- export const RetrieveDatapointRequest$inboundSchema: z.ZodType<
166
- RetrieveDatapointRequest,
167
- z.ZodTypeDef,
168
- unknown
169
- > = z.object({
170
- dataset_id: z.string(),
171
- datapoint_id: z.string(),
172
- }).transform((v) => {
173
- return remap$(v, {
174
- "dataset_id": "datasetId",
175
- "datapoint_id": "datapointId",
176
- });
177
- });
178
-
179
- /** @internal */
180
- export type RetrieveDatapointRequest$Outbound = {
181
- dataset_id: string;
182
- datapoint_id: string;
183
- };
184
-
185
- /** @internal */
186
- export const RetrieveDatapointRequest$outboundSchema: z.ZodType<
187
- RetrieveDatapointRequest$Outbound,
188
- z.ZodTypeDef,
189
- RetrieveDatapointRequest
190
- > = z.object({
191
- datasetId: z.string(),
192
- datapointId: z.string(),
193
- }).transform((v) => {
194
- return remap$(v, {
195
- datasetId: "dataset_id",
196
- datapointId: "datapoint_id",
197
- });
198
- });
199
-
200
- /**
201
- * @internal
202
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
203
- */
204
- export namespace RetrieveDatapointRequest$ {
205
- /** @deprecated use `RetrieveDatapointRequest$inboundSchema` instead. */
206
- export const inboundSchema = RetrieveDatapointRequest$inboundSchema;
207
- /** @deprecated use `RetrieveDatapointRequest$outboundSchema` instead. */
208
- export const outboundSchema = RetrieveDatapointRequest$outboundSchema;
209
- /** @deprecated use `RetrieveDatapointRequest$Outbound` instead. */
210
- export type Outbound = RetrieveDatapointRequest$Outbound;
211
- }
212
-
213
- export function retrieveDatapointRequestToJSON(
214
- retrieveDatapointRequest: RetrieveDatapointRequest,
215
- ): string {
216
- return JSON.stringify(
217
- RetrieveDatapointRequest$outboundSchema.parse(retrieveDatapointRequest),
218
- );
219
- }
220
-
221
- export function retrieveDatapointRequestFromJSON(
222
- jsonString: string,
223
- ): SafeParseResult<RetrieveDatapointRequest, SDKValidationError> {
224
- return safeParse(
225
- jsonString,
226
- (x) => RetrieveDatapointRequest$inboundSchema.parse(JSON.parse(x)),
227
- `Failed to parse 'RetrieveDatapointRequest' from JSON`,
228
- );
229
- }
230
-
231
- /** @internal */
232
- export const RetrieveDatapointRole$inboundSchema: z.ZodNativeEnum<
233
- typeof RetrieveDatapointRole
234
- > = z.nativeEnum(RetrieveDatapointRole);
235
-
236
- /** @internal */
237
- export const RetrieveDatapointRole$outboundSchema: z.ZodNativeEnum<
238
- typeof RetrieveDatapointRole
239
- > = RetrieveDatapointRole$inboundSchema;
240
-
241
- /**
242
- * @internal
243
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
244
- */
245
- export namespace RetrieveDatapointRole$ {
246
- /** @deprecated use `RetrieveDatapointRole$inboundSchema` instead. */
247
- export const inboundSchema = RetrieveDatapointRole$inboundSchema;
248
- /** @deprecated use `RetrieveDatapointRole$outboundSchema` instead. */
249
- export const outboundSchema = RetrieveDatapointRole$outboundSchema;
250
- }
251
-
252
- /** @internal */
253
- export const RetrieveDatapoint2DatasetsType$inboundSchema: z.ZodNativeEnum<
254
- typeof RetrieveDatapoint2DatasetsType
255
- > = z.nativeEnum(RetrieveDatapoint2DatasetsType);
256
-
257
- /** @internal */
258
- export const RetrieveDatapoint2DatasetsType$outboundSchema: z.ZodNativeEnum<
259
- typeof RetrieveDatapoint2DatasetsType
260
- > = RetrieveDatapoint2DatasetsType$inboundSchema;
261
-
262
- /**
263
- * @internal
264
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
265
- */
266
- export namespace RetrieveDatapoint2DatasetsType$ {
267
- /** @deprecated use `RetrieveDatapoint2DatasetsType$inboundSchema` instead. */
268
- export const inboundSchema = RetrieveDatapoint2DatasetsType$inboundSchema;
269
- /** @deprecated use `RetrieveDatapoint2DatasetsType$outboundSchema` instead. */
270
- export const outboundSchema = RetrieveDatapoint2DatasetsType$outboundSchema;
271
- }
272
-
273
- /** @internal */
274
- export const RetrieveDatapoint2ImageUrl$inboundSchema: z.ZodType<
275
- RetrieveDatapoint2ImageUrl,
276
- z.ZodTypeDef,
277
- unknown
278
- > = z.object({
279
- id: z.string().optional(),
280
- url: z.string(),
281
- detail: z.string().optional(),
282
- });
283
-
284
- /** @internal */
285
- export type RetrieveDatapoint2ImageUrl$Outbound = {
286
- id?: string | undefined;
287
- url: string;
288
- detail?: string | undefined;
289
- };
290
-
291
- /** @internal */
292
- export const RetrieveDatapoint2ImageUrl$outboundSchema: z.ZodType<
293
- RetrieveDatapoint2ImageUrl$Outbound,
294
- z.ZodTypeDef,
295
- RetrieveDatapoint2ImageUrl
296
- > = z.object({
297
- id: z.string().optional(),
298
- url: z.string(),
299
- detail: z.string().optional(),
300
- });
301
-
302
- /**
303
- * @internal
304
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
305
- */
306
- export namespace RetrieveDatapoint2ImageUrl$ {
307
- /** @deprecated use `RetrieveDatapoint2ImageUrl$inboundSchema` instead. */
308
- export const inboundSchema = RetrieveDatapoint2ImageUrl$inboundSchema;
309
- /** @deprecated use `RetrieveDatapoint2ImageUrl$outboundSchema` instead. */
310
- export const outboundSchema = RetrieveDatapoint2ImageUrl$outboundSchema;
311
- /** @deprecated use `RetrieveDatapoint2ImageUrl$Outbound` instead. */
312
- export type Outbound = RetrieveDatapoint2ImageUrl$Outbound;
313
- }
314
-
315
- export function retrieveDatapoint2ImageUrlToJSON(
316
- retrieveDatapoint2ImageUrl: RetrieveDatapoint2ImageUrl,
317
- ): string {
318
- return JSON.stringify(
319
- RetrieveDatapoint2ImageUrl$outboundSchema.parse(retrieveDatapoint2ImageUrl),
320
- );
321
- }
322
-
323
- export function retrieveDatapoint2ImageUrlFromJSON(
324
- jsonString: string,
325
- ): SafeParseResult<RetrieveDatapoint2ImageUrl, SDKValidationError> {
326
- return safeParse(
327
- jsonString,
328
- (x) => RetrieveDatapoint2ImageUrl$inboundSchema.parse(JSON.parse(x)),
329
- `Failed to parse 'RetrieveDatapoint2ImageUrl' from JSON`,
330
- );
331
- }
332
-
333
- /** @internal */
334
- export const RetrieveDatapoint22$inboundSchema: z.ZodType<
335
- RetrieveDatapoint22,
336
- z.ZodTypeDef,
337
- unknown
338
- > = z.object({
339
- type: RetrieveDatapoint2DatasetsType$inboundSchema,
340
- image_url: z.lazy(() => RetrieveDatapoint2ImageUrl$inboundSchema),
341
- }).transform((v) => {
342
- return remap$(v, {
343
- "image_url": "imageUrl",
344
- });
345
- });
346
-
347
- /** @internal */
348
- export type RetrieveDatapoint22$Outbound = {
349
- type: string;
350
- image_url: RetrieveDatapoint2ImageUrl$Outbound;
351
- };
352
-
353
- /** @internal */
354
- export const RetrieveDatapoint22$outboundSchema: z.ZodType<
355
- RetrieveDatapoint22$Outbound,
356
- z.ZodTypeDef,
357
- RetrieveDatapoint22
358
- > = z.object({
359
- type: RetrieveDatapoint2DatasetsType$outboundSchema,
360
- imageUrl: z.lazy(() => RetrieveDatapoint2ImageUrl$outboundSchema),
361
- }).transform((v) => {
362
- return remap$(v, {
363
- imageUrl: "image_url",
364
- });
365
- });
366
-
367
- /**
368
- * @internal
369
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
370
- */
371
- export namespace RetrieveDatapoint22$ {
372
- /** @deprecated use `RetrieveDatapoint22$inboundSchema` instead. */
373
- export const inboundSchema = RetrieveDatapoint22$inboundSchema;
374
- /** @deprecated use `RetrieveDatapoint22$outboundSchema` instead. */
375
- export const outboundSchema = RetrieveDatapoint22$outboundSchema;
376
- /** @deprecated use `RetrieveDatapoint22$Outbound` instead. */
377
- export type Outbound = RetrieveDatapoint22$Outbound;
378
- }
379
-
380
- export function retrieveDatapoint22ToJSON(
381
- retrieveDatapoint22: RetrieveDatapoint22,
382
- ): string {
383
- return JSON.stringify(
384
- RetrieveDatapoint22$outboundSchema.parse(retrieveDatapoint22),
385
- );
386
- }
387
-
388
- export function retrieveDatapoint22FromJSON(
389
- jsonString: string,
390
- ): SafeParseResult<RetrieveDatapoint22, SDKValidationError> {
391
- return safeParse(
392
- jsonString,
393
- (x) => RetrieveDatapoint22$inboundSchema.parse(JSON.parse(x)),
394
- `Failed to parse 'RetrieveDatapoint22' from JSON`,
395
- );
396
- }
397
-
398
- /** @internal */
399
- export const RetrieveDatapoint2Type$inboundSchema: z.ZodNativeEnum<
400
- typeof RetrieveDatapoint2Type
401
- > = z.nativeEnum(RetrieveDatapoint2Type);
402
-
403
- /** @internal */
404
- export const RetrieveDatapoint2Type$outboundSchema: z.ZodNativeEnum<
405
- typeof RetrieveDatapoint2Type
406
- > = RetrieveDatapoint2Type$inboundSchema;
407
-
408
- /**
409
- * @internal
410
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
411
- */
412
- export namespace RetrieveDatapoint2Type$ {
413
- /** @deprecated use `RetrieveDatapoint2Type$inboundSchema` instead. */
414
- export const inboundSchema = RetrieveDatapoint2Type$inboundSchema;
415
- /** @deprecated use `RetrieveDatapoint2Type$outboundSchema` instead. */
416
- export const outboundSchema = RetrieveDatapoint2Type$outboundSchema;
417
- }
418
-
419
- /** @internal */
420
- export const RetrieveDatapoint21$inboundSchema: z.ZodType<
421
- RetrieveDatapoint21,
422
- z.ZodTypeDef,
423
- unknown
424
- > = z.object({
425
- type: RetrieveDatapoint2Type$inboundSchema,
426
- text: z.string(),
427
- });
428
-
429
- /** @internal */
430
- export type RetrieveDatapoint21$Outbound = {
431
- type: string;
432
- text: string;
433
- };
434
-
435
- /** @internal */
436
- export const RetrieveDatapoint21$outboundSchema: z.ZodType<
437
- RetrieveDatapoint21$Outbound,
438
- z.ZodTypeDef,
439
- RetrieveDatapoint21
440
- > = z.object({
441
- type: RetrieveDatapoint2Type$outboundSchema,
442
- text: z.string(),
443
- });
444
-
445
- /**
446
- * @internal
447
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
448
- */
449
- export namespace RetrieveDatapoint21$ {
450
- /** @deprecated use `RetrieveDatapoint21$inboundSchema` instead. */
451
- export const inboundSchema = RetrieveDatapoint21$inboundSchema;
452
- /** @deprecated use `RetrieveDatapoint21$outboundSchema` instead. */
453
- export const outboundSchema = RetrieveDatapoint21$outboundSchema;
454
- /** @deprecated use `RetrieveDatapoint21$Outbound` instead. */
455
- export type Outbound = RetrieveDatapoint21$Outbound;
456
- }
457
-
458
- export function retrieveDatapoint21ToJSON(
459
- retrieveDatapoint21: RetrieveDatapoint21,
460
- ): string {
461
- return JSON.stringify(
462
- RetrieveDatapoint21$outboundSchema.parse(retrieveDatapoint21),
463
- );
464
- }
465
-
466
- export function retrieveDatapoint21FromJSON(
467
- jsonString: string,
468
- ): SafeParseResult<RetrieveDatapoint21, SDKValidationError> {
469
- return safeParse(
470
- jsonString,
471
- (x) => RetrieveDatapoint21$inboundSchema.parse(JSON.parse(x)),
472
- `Failed to parse 'RetrieveDatapoint21' from JSON`,
473
- );
474
- }
475
-
476
- /** @internal */
477
- export const RetrieveDatapointContent2$inboundSchema: z.ZodType<
478
- RetrieveDatapointContent2,
479
- z.ZodTypeDef,
480
- unknown
481
- > = z.union([
482
- z.lazy(() => RetrieveDatapoint21$inboundSchema),
483
- z.lazy(() => RetrieveDatapoint22$inboundSchema),
484
- ]);
485
-
486
- /** @internal */
487
- export type RetrieveDatapointContent2$Outbound =
488
- | RetrieveDatapoint21$Outbound
489
- | RetrieveDatapoint22$Outbound;
490
-
491
- /** @internal */
492
- export const RetrieveDatapointContent2$outboundSchema: z.ZodType<
493
- RetrieveDatapointContent2$Outbound,
494
- z.ZodTypeDef,
495
- RetrieveDatapointContent2
496
- > = z.union([
497
- z.lazy(() => RetrieveDatapoint21$outboundSchema),
498
- z.lazy(() => RetrieveDatapoint22$outboundSchema),
499
- ]);
500
-
501
- /**
502
- * @internal
503
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
504
- */
505
- export namespace RetrieveDatapointContent2$ {
506
- /** @deprecated use `RetrieveDatapointContent2$inboundSchema` instead. */
507
- export const inboundSchema = RetrieveDatapointContent2$inboundSchema;
508
- /** @deprecated use `RetrieveDatapointContent2$outboundSchema` instead. */
509
- export const outboundSchema = RetrieveDatapointContent2$outboundSchema;
510
- /** @deprecated use `RetrieveDatapointContent2$Outbound` instead. */
511
- export type Outbound = RetrieveDatapointContent2$Outbound;
512
- }
513
-
514
- export function retrieveDatapointContent2ToJSON(
515
- retrieveDatapointContent2: RetrieveDatapointContent2,
516
- ): string {
517
- return JSON.stringify(
518
- RetrieveDatapointContent2$outboundSchema.parse(retrieveDatapointContent2),
519
- );
520
- }
521
-
522
- export function retrieveDatapointContent2FromJSON(
523
- jsonString: string,
524
- ): SafeParseResult<RetrieveDatapointContent2, SDKValidationError> {
525
- return safeParse(
526
- jsonString,
527
- (x) => RetrieveDatapointContent2$inboundSchema.parse(JSON.parse(x)),
528
- `Failed to parse 'RetrieveDatapointContent2' from JSON`,
529
- );
530
- }
531
-
532
- /** @internal */
533
- export const RetrieveDatapointContent$inboundSchema: z.ZodType<
534
- RetrieveDatapointContent,
535
- z.ZodTypeDef,
536
- unknown
537
- > = z.union([
538
- z.string(),
539
- z.array(z.union([
540
- z.lazy(() => RetrieveDatapoint21$inboundSchema),
541
- z.lazy(() => RetrieveDatapoint22$inboundSchema),
542
- ])),
543
- ]);
544
-
545
- /** @internal */
546
- export type RetrieveDatapointContent$Outbound =
547
- | string
548
- | Array<RetrieveDatapoint21$Outbound | RetrieveDatapoint22$Outbound>;
549
-
550
- /** @internal */
551
- export const RetrieveDatapointContent$outboundSchema: z.ZodType<
552
- RetrieveDatapointContent$Outbound,
553
- z.ZodTypeDef,
554
- RetrieveDatapointContent
555
- > = z.union([
556
- z.string(),
557
- z.array(z.union([
558
- z.lazy(() => RetrieveDatapoint21$outboundSchema),
559
- z.lazy(() => RetrieveDatapoint22$outboundSchema),
560
- ])),
561
- ]);
562
-
563
- /**
564
- * @internal
565
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
566
- */
567
- export namespace RetrieveDatapointContent$ {
568
- /** @deprecated use `RetrieveDatapointContent$inboundSchema` instead. */
569
- export const inboundSchema = RetrieveDatapointContent$inboundSchema;
570
- /** @deprecated use `RetrieveDatapointContent$outboundSchema` instead. */
571
- export const outboundSchema = RetrieveDatapointContent$outboundSchema;
572
- /** @deprecated use `RetrieveDatapointContent$Outbound` instead. */
573
- export type Outbound = RetrieveDatapointContent$Outbound;
574
- }
575
-
576
- export function retrieveDatapointContentToJSON(
577
- retrieveDatapointContent: RetrieveDatapointContent,
578
- ): string {
579
- return JSON.stringify(
580
- RetrieveDatapointContent$outboundSchema.parse(retrieveDatapointContent),
581
- );
582
- }
583
-
584
- export function retrieveDatapointContentFromJSON(
585
- jsonString: string,
586
- ): SafeParseResult<RetrieveDatapointContent, SDKValidationError> {
587
- return safeParse(
588
- jsonString,
589
- (x) => RetrieveDatapointContent$inboundSchema.parse(JSON.parse(x)),
590
- `Failed to parse 'RetrieveDatapointContent' from JSON`,
591
- );
592
- }
593
-
594
- /** @internal */
595
- export const RetrieveDatapointType$inboundSchema: z.ZodNativeEnum<
596
- typeof RetrieveDatapointType
597
- > = z.nativeEnum(RetrieveDatapointType);
598
-
599
- /** @internal */
600
- export const RetrieveDatapointType$outboundSchema: z.ZodNativeEnum<
601
- typeof RetrieveDatapointType
602
- > = RetrieveDatapointType$inboundSchema;
603
-
604
- /**
605
- * @internal
606
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
607
- */
608
- export namespace RetrieveDatapointType$ {
609
- /** @deprecated use `RetrieveDatapointType$inboundSchema` instead. */
610
- export const inboundSchema = RetrieveDatapointType$inboundSchema;
611
- /** @deprecated use `RetrieveDatapointType$outboundSchema` instead. */
612
- export const outboundSchema = RetrieveDatapointType$outboundSchema;
613
- }
614
-
615
- /** @internal */
616
- export const RetrieveDatapointFunction$inboundSchema: z.ZodType<
617
- RetrieveDatapointFunction,
618
- z.ZodTypeDef,
619
- unknown
620
- > = z.object({
621
- name: z.string(),
622
- arguments: z.string(),
623
- });
624
-
625
- /** @internal */
626
- export type RetrieveDatapointFunction$Outbound = {
627
- name: string;
628
- arguments: string;
629
- };
630
-
631
- /** @internal */
632
- export const RetrieveDatapointFunction$outboundSchema: z.ZodType<
633
- RetrieveDatapointFunction$Outbound,
634
- z.ZodTypeDef,
635
- RetrieveDatapointFunction
636
- > = z.object({
637
- name: z.string(),
638
- arguments: z.string(),
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 RetrieveDatapointFunction$ {
646
- /** @deprecated use `RetrieveDatapointFunction$inboundSchema` instead. */
647
- export const inboundSchema = RetrieveDatapointFunction$inboundSchema;
648
- /** @deprecated use `RetrieveDatapointFunction$outboundSchema` instead. */
649
- export const outboundSchema = RetrieveDatapointFunction$outboundSchema;
650
- /** @deprecated use `RetrieveDatapointFunction$Outbound` instead. */
651
- export type Outbound = RetrieveDatapointFunction$Outbound;
652
- }
653
-
654
- export function retrieveDatapointFunctionToJSON(
655
- retrieveDatapointFunction: RetrieveDatapointFunction,
656
- ): string {
657
- return JSON.stringify(
658
- RetrieveDatapointFunction$outboundSchema.parse(retrieveDatapointFunction),
659
- );
660
- }
661
-
662
- export function retrieveDatapointFunctionFromJSON(
663
- jsonString: string,
664
- ): SafeParseResult<RetrieveDatapointFunction, SDKValidationError> {
665
- return safeParse(
666
- jsonString,
667
- (x) => RetrieveDatapointFunction$inboundSchema.parse(JSON.parse(x)),
668
- `Failed to parse 'RetrieveDatapointFunction' from JSON`,
669
- );
670
- }
671
-
672
- /** @internal */
673
- export const RetrieveDatapointToolCalls$inboundSchema: z.ZodType<
674
- RetrieveDatapointToolCalls,
675
- z.ZodTypeDef,
676
- unknown
677
- > = z.object({
678
- id: z.string().optional(),
679
- index: z.number().optional(),
680
- type: RetrieveDatapointType$inboundSchema,
681
- function: z.lazy(() => RetrieveDatapointFunction$inboundSchema),
682
- });
683
-
684
- /** @internal */
685
- export type RetrieveDatapointToolCalls$Outbound = {
686
- id?: string | undefined;
687
- index?: number | undefined;
688
- type: string;
689
- function: RetrieveDatapointFunction$Outbound;
690
- };
691
-
692
- /** @internal */
693
- export const RetrieveDatapointToolCalls$outboundSchema: z.ZodType<
694
- RetrieveDatapointToolCalls$Outbound,
695
- z.ZodTypeDef,
696
- RetrieveDatapointToolCalls
697
- > = z.object({
698
- id: z.string().optional(),
699
- index: z.number().optional(),
700
- type: RetrieveDatapointType$outboundSchema,
701
- function: z.lazy(() => RetrieveDatapointFunction$outboundSchema),
702
- });
703
-
704
- /**
705
- * @internal
706
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
707
- */
708
- export namespace RetrieveDatapointToolCalls$ {
709
- /** @deprecated use `RetrieveDatapointToolCalls$inboundSchema` instead. */
710
- export const inboundSchema = RetrieveDatapointToolCalls$inboundSchema;
711
- /** @deprecated use `RetrieveDatapointToolCalls$outboundSchema` instead. */
712
- export const outboundSchema = RetrieveDatapointToolCalls$outboundSchema;
713
- /** @deprecated use `RetrieveDatapointToolCalls$Outbound` instead. */
714
- export type Outbound = RetrieveDatapointToolCalls$Outbound;
715
- }
716
-
717
- export function retrieveDatapointToolCallsToJSON(
718
- retrieveDatapointToolCalls: RetrieveDatapointToolCalls,
719
- ): string {
720
- return JSON.stringify(
721
- RetrieveDatapointToolCalls$outboundSchema.parse(retrieveDatapointToolCalls),
722
- );
723
- }
724
-
725
- export function retrieveDatapointToolCallsFromJSON(
726
- jsonString: string,
727
- ): SafeParseResult<RetrieveDatapointToolCalls, SDKValidationError> {
728
- return safeParse(
729
- jsonString,
730
- (x) => RetrieveDatapointToolCalls$inboundSchema.parse(JSON.parse(x)),
731
- `Failed to parse 'RetrieveDatapointToolCalls' from JSON`,
732
- );
733
- }
734
-
735
- /** @internal */
736
- export const RetrieveDatapointMessages$inboundSchema: z.ZodType<
737
- RetrieveDatapointMessages,
738
- z.ZodTypeDef,
739
- unknown
740
- > = z.object({
741
- role: RetrieveDatapointRole$inboundSchema,
742
- content: z.union([
743
- z.string(),
744
- z.array(z.union([
745
- z.lazy(() => RetrieveDatapoint21$inboundSchema),
746
- z.lazy(() => RetrieveDatapoint22$inboundSchema),
747
- ])),
748
- ]),
749
- tool_calls: z.array(z.lazy(() => RetrieveDatapointToolCalls$inboundSchema))
750
- .optional(),
751
- }).transform((v) => {
752
- return remap$(v, {
753
- "tool_calls": "toolCalls",
754
- });
755
- });
756
-
757
- /** @internal */
758
- export type RetrieveDatapointMessages$Outbound = {
759
- role: string;
760
- content:
761
- | string
762
- | Array<RetrieveDatapoint21$Outbound | RetrieveDatapoint22$Outbound>;
763
- tool_calls?: Array<RetrieveDatapointToolCalls$Outbound> | undefined;
764
- };
765
-
766
- /** @internal */
767
- export const RetrieveDatapointMessages$outboundSchema: z.ZodType<
768
- RetrieveDatapointMessages$Outbound,
769
- z.ZodTypeDef,
770
- RetrieveDatapointMessages
771
- > = z.object({
772
- role: RetrieveDatapointRole$outboundSchema,
773
- content: z.union([
774
- z.string(),
775
- z.array(z.union([
776
- z.lazy(() => RetrieveDatapoint21$outboundSchema),
777
- z.lazy(() => RetrieveDatapoint22$outboundSchema),
778
- ])),
779
- ]),
780
- toolCalls: z.array(z.lazy(() => RetrieveDatapointToolCalls$outboundSchema))
781
- .optional(),
782
- }).transform((v) => {
783
- return remap$(v, {
784
- toolCalls: "tool_calls",
785
- });
786
- });
787
-
788
- /**
789
- * @internal
790
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
791
- */
792
- export namespace RetrieveDatapointMessages$ {
793
- /** @deprecated use `RetrieveDatapointMessages$inboundSchema` instead. */
794
- export const inboundSchema = RetrieveDatapointMessages$inboundSchema;
795
- /** @deprecated use `RetrieveDatapointMessages$outboundSchema` instead. */
796
- export const outboundSchema = RetrieveDatapointMessages$outboundSchema;
797
- /** @deprecated use `RetrieveDatapointMessages$Outbound` instead. */
798
- export type Outbound = RetrieveDatapointMessages$Outbound;
799
- }
800
-
801
- export function retrieveDatapointMessagesToJSON(
802
- retrieveDatapointMessages: RetrieveDatapointMessages,
803
- ): string {
804
- return JSON.stringify(
805
- RetrieveDatapointMessages$outboundSchema.parse(retrieveDatapointMessages),
806
- );
807
- }
808
-
809
- export function retrieveDatapointMessagesFromJSON(
810
- jsonString: string,
811
- ): SafeParseResult<RetrieveDatapointMessages, SDKValidationError> {
812
- return safeParse(
813
- jsonString,
814
- (x) => RetrieveDatapointMessages$inboundSchema.parse(JSON.parse(x)),
815
- `Failed to parse 'RetrieveDatapointMessages' from JSON`,
816
- );
817
- }
818
-
819
- /** @internal */
820
- export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
821
- RetrieveDatapointResponseBody,
822
- z.ZodTypeDef,
823
- unknown
824
- > = z.object({
825
- _id: z.string(),
826
- workspace_id: z.string(),
827
- inputs: z.record(z.any()).optional(),
828
- messages: z.array(z.lazy(() => RetrieveDatapointMessages$inboundSchema))
829
- .optional(),
830
- expected_output: z.string().optional(),
831
- dataset_id: z.string(),
832
- created_by_id: z.string().optional(),
833
- updated_by_id: z.string().optional(),
834
- created: z.string().datetime({ offset: true }).transform(v => new Date(v))
835
- .optional(),
836
- updated: z.string().datetime({ offset: true }).default(
837
- "2025-04-03T11:50:53.752Z",
838
- ).transform(v => new Date(v)),
839
- }).transform((v) => {
840
- return remap$(v, {
841
- "_id": "id",
842
- "workspace_id": "workspaceId",
843
- "expected_output": "expectedOutput",
844
- "dataset_id": "datasetId",
845
- "created_by_id": "createdById",
846
- "updated_by_id": "updatedById",
847
- });
848
- });
849
-
850
- /** @internal */
851
- export type RetrieveDatapointResponseBody$Outbound = {
852
- _id: string;
853
- workspace_id: string;
854
- inputs?: { [k: string]: any } | undefined;
855
- messages?: Array<RetrieveDatapointMessages$Outbound> | undefined;
856
- expected_output?: string | undefined;
857
- dataset_id: string;
858
- created_by_id?: string | undefined;
859
- updated_by_id?: string | undefined;
860
- created?: string | undefined;
861
- updated: string;
862
- };
863
-
864
- /** @internal */
865
- export const RetrieveDatapointResponseBody$outboundSchema: z.ZodType<
866
- RetrieveDatapointResponseBody$Outbound,
867
- z.ZodTypeDef,
868
- RetrieveDatapointResponseBody
869
- > = z.object({
870
- id: z.string(),
871
- workspaceId: z.string(),
872
- inputs: z.record(z.any()).optional(),
873
- messages: z.array(z.lazy(() => RetrieveDatapointMessages$outboundSchema))
874
- .optional(),
875
- expectedOutput: z.string().optional(),
876
- datasetId: z.string(),
877
- createdById: z.string().optional(),
878
- updatedById: z.string().optional(),
879
- created: z.date().transform(v => v.toISOString()).optional(),
880
- updated: z.date().default(() => new Date("2025-04-03T11:50:53.752Z"))
881
- .transform(v => v.toISOString()),
882
- }).transform((v) => {
883
- return remap$(v, {
884
- id: "_id",
885
- workspaceId: "workspace_id",
886
- expectedOutput: "expected_output",
887
- datasetId: "dataset_id",
888
- createdById: "created_by_id",
889
- updatedById: "updated_by_id",
890
- });
891
- });
892
-
893
- /**
894
- * @internal
895
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
896
- */
897
- export namespace RetrieveDatapointResponseBody$ {
898
- /** @deprecated use `RetrieveDatapointResponseBody$inboundSchema` instead. */
899
- export const inboundSchema = RetrieveDatapointResponseBody$inboundSchema;
900
- /** @deprecated use `RetrieveDatapointResponseBody$outboundSchema` instead. */
901
- export const outboundSchema = RetrieveDatapointResponseBody$outboundSchema;
902
- /** @deprecated use `RetrieveDatapointResponseBody$Outbound` instead. */
903
- export type Outbound = RetrieveDatapointResponseBody$Outbound;
904
- }
905
-
906
- export function retrieveDatapointResponseBodyToJSON(
907
- retrieveDatapointResponseBody: RetrieveDatapointResponseBody,
908
- ): string {
909
- return JSON.stringify(
910
- RetrieveDatapointResponseBody$outboundSchema.parse(
911
- retrieveDatapointResponseBody,
912
- ),
913
- );
914
- }
915
-
916
- export function retrieveDatapointResponseBodyFromJSON(
917
- jsonString: string,
918
- ): SafeParseResult<RetrieveDatapointResponseBody, SDKValidationError> {
919
- return safeParse(
920
- jsonString,
921
- (x) => RetrieveDatapointResponseBody$inboundSchema.parse(JSON.parse(x)),
922
- `Failed to parse 'RetrieveDatapointResponseBody' from JSON`,
923
- );
924
- }