@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,1729 +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
- /**
13
- * The role of the prompt message
14
- */
15
- export const UpdateDatapointRole = {
16
- System: "system",
17
- Assistant: "assistant",
18
- User: "user",
19
- Exception: "exception",
20
- Tool: "tool",
21
- Prompt: "prompt",
22
- Correction: "correction",
23
- ExpectedOutput: "expected_output",
24
- } as const;
25
- /**
26
- * The role of the prompt message
27
- */
28
- export type UpdateDatapointRole = ClosedEnum<typeof UpdateDatapointRole>;
29
-
30
- export const UpdateDatapoint2DatasetsType = {
31
- ImageUrl: "image_url",
32
- } as const;
33
- export type UpdateDatapoint2DatasetsType = ClosedEnum<
34
- typeof UpdateDatapoint2DatasetsType
35
- >;
36
-
37
- export type UpdateDatapoint2ImageUrl = {
38
- /**
39
- * Either a URL of the image or the base64 encoded data URI.
40
- */
41
- url: string;
42
- /**
43
- * Specifies the detail level of the image. Currently only supported with OpenAI models
44
- */
45
- detail?: string | undefined;
46
- };
47
-
48
- /**
49
- * The image part of the prompt message. Only supported with vision models.
50
- */
51
- export type UpdateDatapoint22 = {
52
- type: UpdateDatapoint2DatasetsType;
53
- imageUrl: UpdateDatapoint2ImageUrl;
54
- };
55
-
56
- export const UpdateDatapoint2Type = {
57
- Text: "text",
58
- } as const;
59
- export type UpdateDatapoint2Type = ClosedEnum<typeof UpdateDatapoint2Type>;
60
-
61
- /**
62
- * Text content part of a prompt message
63
- */
64
- export type UpdateDatapoint21 = {
65
- type: UpdateDatapoint2Type;
66
- text: string;
67
- };
68
-
69
- export type UpdateDatapointContent2 = UpdateDatapoint21 | UpdateDatapoint22;
70
-
71
- /**
72
- * 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.
73
- */
74
- export type UpdateDatapointContent =
75
- | string
76
- | Array<UpdateDatapoint21 | UpdateDatapoint22>;
77
-
78
- export const UpdateDatapointType = {
79
- Function: "function",
80
- } as const;
81
- export type UpdateDatapointType = ClosedEnum<typeof UpdateDatapointType>;
82
-
83
- export type UpdateDatapointFunction = {
84
- name: string;
85
- /**
86
- * JSON string arguments for the functions
87
- */
88
- arguments: string;
89
- };
90
-
91
- export type UpdateDatapointToolCalls = {
92
- id?: string | undefined;
93
- index?: number | undefined;
94
- type: UpdateDatapointType;
95
- function: UpdateDatapointFunction;
96
- };
97
-
98
- export type UpdateDatapointMessages = {
99
- /**
100
- * The role of the prompt message
101
- */
102
- role: UpdateDatapointRole;
103
- /**
104
- * 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.
105
- */
106
- content: string | Array<UpdateDatapoint21 | UpdateDatapoint22>;
107
- toolCalls?: Array<UpdateDatapointToolCalls> | undefined;
108
- };
109
-
110
- export type UpdateDatapointRequestBody = {
111
- /**
112
- * 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.
113
- */
114
- inputs?: { [k: string]: any } | undefined;
115
- /**
116
- * The prompt template messages
117
- */
118
- messages?: Array<UpdateDatapointMessages> | undefined;
119
- expectedOutput?: string | undefined;
120
- };
121
-
122
- export type UpdateDatapointRequest = {
123
- datasetId: string;
124
- datapointId: string;
125
- requestBody?: UpdateDatapointRequestBody | undefined;
126
- };
127
-
128
- /**
129
- * The role of the prompt message
130
- */
131
- export const UpdateDatapointDatasetsRole = {
132
- System: "system",
133
- Assistant: "assistant",
134
- User: "user",
135
- Exception: "exception",
136
- Tool: "tool",
137
- Prompt: "prompt",
138
- Correction: "correction",
139
- ExpectedOutput: "expected_output",
140
- } as const;
141
- /**
142
- * The role of the prompt message
143
- */
144
- export type UpdateDatapointDatasetsRole = ClosedEnum<
145
- typeof UpdateDatapointDatasetsRole
146
- >;
147
-
148
- export const UpdateDatapoint2DatasetsResponse200Type = {
149
- ImageUrl: "image_url",
150
- } as const;
151
- export type UpdateDatapoint2DatasetsResponse200Type = ClosedEnum<
152
- typeof UpdateDatapoint2DatasetsResponse200Type
153
- >;
154
-
155
- export type UpdateDatapoint2DatasetsImageUrl = {
156
- /**
157
- * The orq.ai id of the image
158
- */
159
- id?: string | undefined;
160
- /**
161
- * Either a URL of the image or the base64 encoded data URI.
162
- */
163
- url: string;
164
- /**
165
- * Specifies the detail level of the image. Currently only supported with OpenAI models
166
- */
167
- detail?: string | undefined;
168
- };
169
-
170
- /**
171
- * The image part of the prompt message. Only supported with vision models.
172
- */
173
- export type UpdateDatapoint2Datasets2 = {
174
- type: UpdateDatapoint2DatasetsResponse200Type;
175
- imageUrl: UpdateDatapoint2DatasetsImageUrl;
176
- };
177
-
178
- export const UpdateDatapoint2DatasetsResponseType = {
179
- Text: "text",
180
- } as const;
181
- export type UpdateDatapoint2DatasetsResponseType = ClosedEnum<
182
- typeof UpdateDatapoint2DatasetsResponseType
183
- >;
184
-
185
- /**
186
- * Text content part of a prompt message
187
- */
188
- export type UpdateDatapoint2Datasets1 = {
189
- type: UpdateDatapoint2DatasetsResponseType;
190
- text: string;
191
- };
192
-
193
- export type UpdateDatapointContentDatasets2 =
194
- | UpdateDatapoint2Datasets1
195
- | UpdateDatapoint2Datasets2;
196
-
197
- /**
198
- * 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.
199
- */
200
- export type UpdateDatapointDatasetsContent =
201
- | string
202
- | Array<UpdateDatapoint2Datasets1 | UpdateDatapoint2Datasets2>;
203
-
204
- export const UpdateDatapointDatasetsType = {
205
- Function: "function",
206
- } as const;
207
- export type UpdateDatapointDatasetsType = ClosedEnum<
208
- typeof UpdateDatapointDatasetsType
209
- >;
210
-
211
- export type UpdateDatapointDatasetsFunction = {
212
- name: string;
213
- /**
214
- * JSON string arguments for the functions
215
- */
216
- arguments: string;
217
- };
218
-
219
- export type UpdateDatapointDatasetsToolCalls = {
220
- id?: string | undefined;
221
- index?: number | undefined;
222
- type: UpdateDatapointDatasetsType;
223
- function: UpdateDatapointDatasetsFunction;
224
- };
225
-
226
- export type UpdateDatapointDatasetsMessages = {
227
- /**
228
- * The role of the prompt message
229
- */
230
- role: UpdateDatapointDatasetsRole;
231
- /**
232
- * 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.
233
- */
234
- content:
235
- | string
236
- | Array<UpdateDatapoint2Datasets1 | UpdateDatapoint2Datasets2>;
237
- toolCalls?: Array<UpdateDatapointDatasetsToolCalls> | undefined;
238
- };
239
-
240
- /**
241
- * Dataset item updated.
242
- */
243
- export type UpdateDatapointResponseBody = {
244
- /**
245
- * The unique identifier of the dataset item
246
- */
247
- id: string;
248
- /**
249
- * The unique identifier of the workspace it belongs to
250
- */
251
- workspaceId: string;
252
- /**
253
- * 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.
254
- */
255
- inputs?: { [k: string]: any } | undefined;
256
- /**
257
- * The prompt template messages
258
- */
259
- messages?: Array<UpdateDatapointDatasetsMessages> | undefined;
260
- expectedOutput?: string | undefined;
261
- /**
262
- * The unique identifier of the dataset
263
- */
264
- datasetId: string;
265
- /**
266
- * The unique identifier of the user who created the dataset
267
- */
268
- createdById?: string | undefined;
269
- /**
270
- * The unique identifier of the user who last updated the dataset
271
- */
272
- updatedById?: string | undefined;
273
- /**
274
- * The date and time the resource was created
275
- */
276
- created?: Date | undefined;
277
- /**
278
- * The date and time the resource was last updated
279
- */
280
- updated?: Date | undefined;
281
- };
282
-
283
- /** @internal */
284
- export const UpdateDatapointRole$inboundSchema: z.ZodNativeEnum<
285
- typeof UpdateDatapointRole
286
- > = z.nativeEnum(UpdateDatapointRole);
287
-
288
- /** @internal */
289
- export const UpdateDatapointRole$outboundSchema: z.ZodNativeEnum<
290
- typeof UpdateDatapointRole
291
- > = UpdateDatapointRole$inboundSchema;
292
-
293
- /**
294
- * @internal
295
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
296
- */
297
- export namespace UpdateDatapointRole$ {
298
- /** @deprecated use `UpdateDatapointRole$inboundSchema` instead. */
299
- export const inboundSchema = UpdateDatapointRole$inboundSchema;
300
- /** @deprecated use `UpdateDatapointRole$outboundSchema` instead. */
301
- export const outboundSchema = UpdateDatapointRole$outboundSchema;
302
- }
303
-
304
- /** @internal */
305
- export const UpdateDatapoint2DatasetsType$inboundSchema: z.ZodNativeEnum<
306
- typeof UpdateDatapoint2DatasetsType
307
- > = z.nativeEnum(UpdateDatapoint2DatasetsType);
308
-
309
- /** @internal */
310
- export const UpdateDatapoint2DatasetsType$outboundSchema: z.ZodNativeEnum<
311
- typeof UpdateDatapoint2DatasetsType
312
- > = UpdateDatapoint2DatasetsType$inboundSchema;
313
-
314
- /**
315
- * @internal
316
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
317
- */
318
- export namespace UpdateDatapoint2DatasetsType$ {
319
- /** @deprecated use `UpdateDatapoint2DatasetsType$inboundSchema` instead. */
320
- export const inboundSchema = UpdateDatapoint2DatasetsType$inboundSchema;
321
- /** @deprecated use `UpdateDatapoint2DatasetsType$outboundSchema` instead. */
322
- export const outboundSchema = UpdateDatapoint2DatasetsType$outboundSchema;
323
- }
324
-
325
- /** @internal */
326
- export const UpdateDatapoint2ImageUrl$inboundSchema: z.ZodType<
327
- UpdateDatapoint2ImageUrl,
328
- z.ZodTypeDef,
329
- unknown
330
- > = z.object({
331
- url: z.string(),
332
- detail: z.string().optional(),
333
- });
334
-
335
- /** @internal */
336
- export type UpdateDatapoint2ImageUrl$Outbound = {
337
- url: string;
338
- detail?: string | undefined;
339
- };
340
-
341
- /** @internal */
342
- export const UpdateDatapoint2ImageUrl$outboundSchema: z.ZodType<
343
- UpdateDatapoint2ImageUrl$Outbound,
344
- z.ZodTypeDef,
345
- UpdateDatapoint2ImageUrl
346
- > = z.object({
347
- url: z.string(),
348
- detail: z.string().optional(),
349
- });
350
-
351
- /**
352
- * @internal
353
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
354
- */
355
- export namespace UpdateDatapoint2ImageUrl$ {
356
- /** @deprecated use `UpdateDatapoint2ImageUrl$inboundSchema` instead. */
357
- export const inboundSchema = UpdateDatapoint2ImageUrl$inboundSchema;
358
- /** @deprecated use `UpdateDatapoint2ImageUrl$outboundSchema` instead. */
359
- export const outboundSchema = UpdateDatapoint2ImageUrl$outboundSchema;
360
- /** @deprecated use `UpdateDatapoint2ImageUrl$Outbound` instead. */
361
- export type Outbound = UpdateDatapoint2ImageUrl$Outbound;
362
- }
363
-
364
- export function updateDatapoint2ImageUrlToJSON(
365
- updateDatapoint2ImageUrl: UpdateDatapoint2ImageUrl,
366
- ): string {
367
- return JSON.stringify(
368
- UpdateDatapoint2ImageUrl$outboundSchema.parse(updateDatapoint2ImageUrl),
369
- );
370
- }
371
-
372
- export function updateDatapoint2ImageUrlFromJSON(
373
- jsonString: string,
374
- ): SafeParseResult<UpdateDatapoint2ImageUrl, SDKValidationError> {
375
- return safeParse(
376
- jsonString,
377
- (x) => UpdateDatapoint2ImageUrl$inboundSchema.parse(JSON.parse(x)),
378
- `Failed to parse 'UpdateDatapoint2ImageUrl' from JSON`,
379
- );
380
- }
381
-
382
- /** @internal */
383
- export const UpdateDatapoint22$inboundSchema: z.ZodType<
384
- UpdateDatapoint22,
385
- z.ZodTypeDef,
386
- unknown
387
- > = z.object({
388
- type: UpdateDatapoint2DatasetsType$inboundSchema,
389
- image_url: z.lazy(() => UpdateDatapoint2ImageUrl$inboundSchema),
390
- }).transform((v) => {
391
- return remap$(v, {
392
- "image_url": "imageUrl",
393
- });
394
- });
395
-
396
- /** @internal */
397
- export type UpdateDatapoint22$Outbound = {
398
- type: string;
399
- image_url: UpdateDatapoint2ImageUrl$Outbound;
400
- };
401
-
402
- /** @internal */
403
- export const UpdateDatapoint22$outboundSchema: z.ZodType<
404
- UpdateDatapoint22$Outbound,
405
- z.ZodTypeDef,
406
- UpdateDatapoint22
407
- > = z.object({
408
- type: UpdateDatapoint2DatasetsType$outboundSchema,
409
- imageUrl: z.lazy(() => UpdateDatapoint2ImageUrl$outboundSchema),
410
- }).transform((v) => {
411
- return remap$(v, {
412
- imageUrl: "image_url",
413
- });
414
- });
415
-
416
- /**
417
- * @internal
418
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
419
- */
420
- export namespace UpdateDatapoint22$ {
421
- /** @deprecated use `UpdateDatapoint22$inboundSchema` instead. */
422
- export const inboundSchema = UpdateDatapoint22$inboundSchema;
423
- /** @deprecated use `UpdateDatapoint22$outboundSchema` instead. */
424
- export const outboundSchema = UpdateDatapoint22$outboundSchema;
425
- /** @deprecated use `UpdateDatapoint22$Outbound` instead. */
426
- export type Outbound = UpdateDatapoint22$Outbound;
427
- }
428
-
429
- export function updateDatapoint22ToJSON(
430
- updateDatapoint22: UpdateDatapoint22,
431
- ): string {
432
- return JSON.stringify(
433
- UpdateDatapoint22$outboundSchema.parse(updateDatapoint22),
434
- );
435
- }
436
-
437
- export function updateDatapoint22FromJSON(
438
- jsonString: string,
439
- ): SafeParseResult<UpdateDatapoint22, SDKValidationError> {
440
- return safeParse(
441
- jsonString,
442
- (x) => UpdateDatapoint22$inboundSchema.parse(JSON.parse(x)),
443
- `Failed to parse 'UpdateDatapoint22' from JSON`,
444
- );
445
- }
446
-
447
- /** @internal */
448
- export const UpdateDatapoint2Type$inboundSchema: z.ZodNativeEnum<
449
- typeof UpdateDatapoint2Type
450
- > = z.nativeEnum(UpdateDatapoint2Type);
451
-
452
- /** @internal */
453
- export const UpdateDatapoint2Type$outboundSchema: z.ZodNativeEnum<
454
- typeof UpdateDatapoint2Type
455
- > = UpdateDatapoint2Type$inboundSchema;
456
-
457
- /**
458
- * @internal
459
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
460
- */
461
- export namespace UpdateDatapoint2Type$ {
462
- /** @deprecated use `UpdateDatapoint2Type$inboundSchema` instead. */
463
- export const inboundSchema = UpdateDatapoint2Type$inboundSchema;
464
- /** @deprecated use `UpdateDatapoint2Type$outboundSchema` instead. */
465
- export const outboundSchema = UpdateDatapoint2Type$outboundSchema;
466
- }
467
-
468
- /** @internal */
469
- export const UpdateDatapoint21$inboundSchema: z.ZodType<
470
- UpdateDatapoint21,
471
- z.ZodTypeDef,
472
- unknown
473
- > = z.object({
474
- type: UpdateDatapoint2Type$inboundSchema,
475
- text: z.string(),
476
- });
477
-
478
- /** @internal */
479
- export type UpdateDatapoint21$Outbound = {
480
- type: string;
481
- text: string;
482
- };
483
-
484
- /** @internal */
485
- export const UpdateDatapoint21$outboundSchema: z.ZodType<
486
- UpdateDatapoint21$Outbound,
487
- z.ZodTypeDef,
488
- UpdateDatapoint21
489
- > = z.object({
490
- type: UpdateDatapoint2Type$outboundSchema,
491
- text: z.string(),
492
- });
493
-
494
- /**
495
- * @internal
496
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
497
- */
498
- export namespace UpdateDatapoint21$ {
499
- /** @deprecated use `UpdateDatapoint21$inboundSchema` instead. */
500
- export const inboundSchema = UpdateDatapoint21$inboundSchema;
501
- /** @deprecated use `UpdateDatapoint21$outboundSchema` instead. */
502
- export const outboundSchema = UpdateDatapoint21$outboundSchema;
503
- /** @deprecated use `UpdateDatapoint21$Outbound` instead. */
504
- export type Outbound = UpdateDatapoint21$Outbound;
505
- }
506
-
507
- export function updateDatapoint21ToJSON(
508
- updateDatapoint21: UpdateDatapoint21,
509
- ): string {
510
- return JSON.stringify(
511
- UpdateDatapoint21$outboundSchema.parse(updateDatapoint21),
512
- );
513
- }
514
-
515
- export function updateDatapoint21FromJSON(
516
- jsonString: string,
517
- ): SafeParseResult<UpdateDatapoint21, SDKValidationError> {
518
- return safeParse(
519
- jsonString,
520
- (x) => UpdateDatapoint21$inboundSchema.parse(JSON.parse(x)),
521
- `Failed to parse 'UpdateDatapoint21' from JSON`,
522
- );
523
- }
524
-
525
- /** @internal */
526
- export const UpdateDatapointContent2$inboundSchema: z.ZodType<
527
- UpdateDatapointContent2,
528
- z.ZodTypeDef,
529
- unknown
530
- > = z.union([
531
- z.lazy(() => UpdateDatapoint21$inboundSchema),
532
- z.lazy(() => UpdateDatapoint22$inboundSchema),
533
- ]);
534
-
535
- /** @internal */
536
- export type UpdateDatapointContent2$Outbound =
537
- | UpdateDatapoint21$Outbound
538
- | UpdateDatapoint22$Outbound;
539
-
540
- /** @internal */
541
- export const UpdateDatapointContent2$outboundSchema: z.ZodType<
542
- UpdateDatapointContent2$Outbound,
543
- z.ZodTypeDef,
544
- UpdateDatapointContent2
545
- > = z.union([
546
- z.lazy(() => UpdateDatapoint21$outboundSchema),
547
- z.lazy(() => UpdateDatapoint22$outboundSchema),
548
- ]);
549
-
550
- /**
551
- * @internal
552
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
553
- */
554
- export namespace UpdateDatapointContent2$ {
555
- /** @deprecated use `UpdateDatapointContent2$inboundSchema` instead. */
556
- export const inboundSchema = UpdateDatapointContent2$inboundSchema;
557
- /** @deprecated use `UpdateDatapointContent2$outboundSchema` instead. */
558
- export const outboundSchema = UpdateDatapointContent2$outboundSchema;
559
- /** @deprecated use `UpdateDatapointContent2$Outbound` instead. */
560
- export type Outbound = UpdateDatapointContent2$Outbound;
561
- }
562
-
563
- export function updateDatapointContent2ToJSON(
564
- updateDatapointContent2: UpdateDatapointContent2,
565
- ): string {
566
- return JSON.stringify(
567
- UpdateDatapointContent2$outboundSchema.parse(updateDatapointContent2),
568
- );
569
- }
570
-
571
- export function updateDatapointContent2FromJSON(
572
- jsonString: string,
573
- ): SafeParseResult<UpdateDatapointContent2, SDKValidationError> {
574
- return safeParse(
575
- jsonString,
576
- (x) => UpdateDatapointContent2$inboundSchema.parse(JSON.parse(x)),
577
- `Failed to parse 'UpdateDatapointContent2' from JSON`,
578
- );
579
- }
580
-
581
- /** @internal */
582
- export const UpdateDatapointContent$inboundSchema: z.ZodType<
583
- UpdateDatapointContent,
584
- z.ZodTypeDef,
585
- unknown
586
- > = z.union([
587
- z.string(),
588
- z.array(z.union([
589
- z.lazy(() => UpdateDatapoint21$inboundSchema),
590
- z.lazy(() => UpdateDatapoint22$inboundSchema),
591
- ])),
592
- ]);
593
-
594
- /** @internal */
595
- export type UpdateDatapointContent$Outbound =
596
- | string
597
- | Array<UpdateDatapoint21$Outbound | UpdateDatapoint22$Outbound>;
598
-
599
- /** @internal */
600
- export const UpdateDatapointContent$outboundSchema: z.ZodType<
601
- UpdateDatapointContent$Outbound,
602
- z.ZodTypeDef,
603
- UpdateDatapointContent
604
- > = z.union([
605
- z.string(),
606
- z.array(z.union([
607
- z.lazy(() => UpdateDatapoint21$outboundSchema),
608
- z.lazy(() => UpdateDatapoint22$outboundSchema),
609
- ])),
610
- ]);
611
-
612
- /**
613
- * @internal
614
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
615
- */
616
- export namespace UpdateDatapointContent$ {
617
- /** @deprecated use `UpdateDatapointContent$inboundSchema` instead. */
618
- export const inboundSchema = UpdateDatapointContent$inboundSchema;
619
- /** @deprecated use `UpdateDatapointContent$outboundSchema` instead. */
620
- export const outboundSchema = UpdateDatapointContent$outboundSchema;
621
- /** @deprecated use `UpdateDatapointContent$Outbound` instead. */
622
- export type Outbound = UpdateDatapointContent$Outbound;
623
- }
624
-
625
- export function updateDatapointContentToJSON(
626
- updateDatapointContent: UpdateDatapointContent,
627
- ): string {
628
- return JSON.stringify(
629
- UpdateDatapointContent$outboundSchema.parse(updateDatapointContent),
630
- );
631
- }
632
-
633
- export function updateDatapointContentFromJSON(
634
- jsonString: string,
635
- ): SafeParseResult<UpdateDatapointContent, SDKValidationError> {
636
- return safeParse(
637
- jsonString,
638
- (x) => UpdateDatapointContent$inboundSchema.parse(JSON.parse(x)),
639
- `Failed to parse 'UpdateDatapointContent' from JSON`,
640
- );
641
- }
642
-
643
- /** @internal */
644
- export const UpdateDatapointType$inboundSchema: z.ZodNativeEnum<
645
- typeof UpdateDatapointType
646
- > = z.nativeEnum(UpdateDatapointType);
647
-
648
- /** @internal */
649
- export const UpdateDatapointType$outboundSchema: z.ZodNativeEnum<
650
- typeof UpdateDatapointType
651
- > = UpdateDatapointType$inboundSchema;
652
-
653
- /**
654
- * @internal
655
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
656
- */
657
- export namespace UpdateDatapointType$ {
658
- /** @deprecated use `UpdateDatapointType$inboundSchema` instead. */
659
- export const inboundSchema = UpdateDatapointType$inboundSchema;
660
- /** @deprecated use `UpdateDatapointType$outboundSchema` instead. */
661
- export const outboundSchema = UpdateDatapointType$outboundSchema;
662
- }
663
-
664
- /** @internal */
665
- export const UpdateDatapointFunction$inboundSchema: z.ZodType<
666
- UpdateDatapointFunction,
667
- z.ZodTypeDef,
668
- unknown
669
- > = z.object({
670
- name: z.string(),
671
- arguments: z.string(),
672
- });
673
-
674
- /** @internal */
675
- export type UpdateDatapointFunction$Outbound = {
676
- name: string;
677
- arguments: string;
678
- };
679
-
680
- /** @internal */
681
- export const UpdateDatapointFunction$outboundSchema: z.ZodType<
682
- UpdateDatapointFunction$Outbound,
683
- z.ZodTypeDef,
684
- UpdateDatapointFunction
685
- > = z.object({
686
- name: z.string(),
687
- arguments: z.string(),
688
- });
689
-
690
- /**
691
- * @internal
692
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
693
- */
694
- export namespace UpdateDatapointFunction$ {
695
- /** @deprecated use `UpdateDatapointFunction$inboundSchema` instead. */
696
- export const inboundSchema = UpdateDatapointFunction$inboundSchema;
697
- /** @deprecated use `UpdateDatapointFunction$outboundSchema` instead. */
698
- export const outboundSchema = UpdateDatapointFunction$outboundSchema;
699
- /** @deprecated use `UpdateDatapointFunction$Outbound` instead. */
700
- export type Outbound = UpdateDatapointFunction$Outbound;
701
- }
702
-
703
- export function updateDatapointFunctionToJSON(
704
- updateDatapointFunction: UpdateDatapointFunction,
705
- ): string {
706
- return JSON.stringify(
707
- UpdateDatapointFunction$outboundSchema.parse(updateDatapointFunction),
708
- );
709
- }
710
-
711
- export function updateDatapointFunctionFromJSON(
712
- jsonString: string,
713
- ): SafeParseResult<UpdateDatapointFunction, SDKValidationError> {
714
- return safeParse(
715
- jsonString,
716
- (x) => UpdateDatapointFunction$inboundSchema.parse(JSON.parse(x)),
717
- `Failed to parse 'UpdateDatapointFunction' from JSON`,
718
- );
719
- }
720
-
721
- /** @internal */
722
- export const UpdateDatapointToolCalls$inboundSchema: z.ZodType<
723
- UpdateDatapointToolCalls,
724
- z.ZodTypeDef,
725
- unknown
726
- > = z.object({
727
- id: z.string().optional(),
728
- index: z.number().optional(),
729
- type: UpdateDatapointType$inboundSchema,
730
- function: z.lazy(() => UpdateDatapointFunction$inboundSchema),
731
- });
732
-
733
- /** @internal */
734
- export type UpdateDatapointToolCalls$Outbound = {
735
- id?: string | undefined;
736
- index?: number | undefined;
737
- type: string;
738
- function: UpdateDatapointFunction$Outbound;
739
- };
740
-
741
- /** @internal */
742
- export const UpdateDatapointToolCalls$outboundSchema: z.ZodType<
743
- UpdateDatapointToolCalls$Outbound,
744
- z.ZodTypeDef,
745
- UpdateDatapointToolCalls
746
- > = z.object({
747
- id: z.string().optional(),
748
- index: z.number().optional(),
749
- type: UpdateDatapointType$outboundSchema,
750
- function: z.lazy(() => UpdateDatapointFunction$outboundSchema),
751
- });
752
-
753
- /**
754
- * @internal
755
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
756
- */
757
- export namespace UpdateDatapointToolCalls$ {
758
- /** @deprecated use `UpdateDatapointToolCalls$inboundSchema` instead. */
759
- export const inboundSchema = UpdateDatapointToolCalls$inboundSchema;
760
- /** @deprecated use `UpdateDatapointToolCalls$outboundSchema` instead. */
761
- export const outboundSchema = UpdateDatapointToolCalls$outboundSchema;
762
- /** @deprecated use `UpdateDatapointToolCalls$Outbound` instead. */
763
- export type Outbound = UpdateDatapointToolCalls$Outbound;
764
- }
765
-
766
- export function updateDatapointToolCallsToJSON(
767
- updateDatapointToolCalls: UpdateDatapointToolCalls,
768
- ): string {
769
- return JSON.stringify(
770
- UpdateDatapointToolCalls$outboundSchema.parse(updateDatapointToolCalls),
771
- );
772
- }
773
-
774
- export function updateDatapointToolCallsFromJSON(
775
- jsonString: string,
776
- ): SafeParseResult<UpdateDatapointToolCalls, SDKValidationError> {
777
- return safeParse(
778
- jsonString,
779
- (x) => UpdateDatapointToolCalls$inboundSchema.parse(JSON.parse(x)),
780
- `Failed to parse 'UpdateDatapointToolCalls' from JSON`,
781
- );
782
- }
783
-
784
- /** @internal */
785
- export const UpdateDatapointMessages$inboundSchema: z.ZodType<
786
- UpdateDatapointMessages,
787
- z.ZodTypeDef,
788
- unknown
789
- > = z.object({
790
- role: UpdateDatapointRole$inboundSchema,
791
- content: z.union([
792
- z.string(),
793
- z.array(z.union([
794
- z.lazy(() => UpdateDatapoint21$inboundSchema),
795
- z.lazy(() => UpdateDatapoint22$inboundSchema),
796
- ])),
797
- ]),
798
- tool_calls: z.array(z.lazy(() => UpdateDatapointToolCalls$inboundSchema))
799
- .optional(),
800
- }).transform((v) => {
801
- return remap$(v, {
802
- "tool_calls": "toolCalls",
803
- });
804
- });
805
-
806
- /** @internal */
807
- export type UpdateDatapointMessages$Outbound = {
808
- role: string;
809
- content:
810
- | string
811
- | Array<UpdateDatapoint21$Outbound | UpdateDatapoint22$Outbound>;
812
- tool_calls?: Array<UpdateDatapointToolCalls$Outbound> | undefined;
813
- };
814
-
815
- /** @internal */
816
- export const UpdateDatapointMessages$outboundSchema: z.ZodType<
817
- UpdateDatapointMessages$Outbound,
818
- z.ZodTypeDef,
819
- UpdateDatapointMessages
820
- > = z.object({
821
- role: UpdateDatapointRole$outboundSchema,
822
- content: z.union([
823
- z.string(),
824
- z.array(z.union([
825
- z.lazy(() => UpdateDatapoint21$outboundSchema),
826
- z.lazy(() => UpdateDatapoint22$outboundSchema),
827
- ])),
828
- ]),
829
- toolCalls: z.array(z.lazy(() => UpdateDatapointToolCalls$outboundSchema))
830
- .optional(),
831
- }).transform((v) => {
832
- return remap$(v, {
833
- toolCalls: "tool_calls",
834
- });
835
- });
836
-
837
- /**
838
- * @internal
839
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
840
- */
841
- export namespace UpdateDatapointMessages$ {
842
- /** @deprecated use `UpdateDatapointMessages$inboundSchema` instead. */
843
- export const inboundSchema = UpdateDatapointMessages$inboundSchema;
844
- /** @deprecated use `UpdateDatapointMessages$outboundSchema` instead. */
845
- export const outboundSchema = UpdateDatapointMessages$outboundSchema;
846
- /** @deprecated use `UpdateDatapointMessages$Outbound` instead. */
847
- export type Outbound = UpdateDatapointMessages$Outbound;
848
- }
849
-
850
- export function updateDatapointMessagesToJSON(
851
- updateDatapointMessages: UpdateDatapointMessages,
852
- ): string {
853
- return JSON.stringify(
854
- UpdateDatapointMessages$outboundSchema.parse(updateDatapointMessages),
855
- );
856
- }
857
-
858
- export function updateDatapointMessagesFromJSON(
859
- jsonString: string,
860
- ): SafeParseResult<UpdateDatapointMessages, SDKValidationError> {
861
- return safeParse(
862
- jsonString,
863
- (x) => UpdateDatapointMessages$inboundSchema.parse(JSON.parse(x)),
864
- `Failed to parse 'UpdateDatapointMessages' from JSON`,
865
- );
866
- }
867
-
868
- /** @internal */
869
- export const UpdateDatapointRequestBody$inboundSchema: z.ZodType<
870
- UpdateDatapointRequestBody,
871
- z.ZodTypeDef,
872
- unknown
873
- > = z.object({
874
- inputs: z.record(z.any()).optional(),
875
- messages: z.array(z.lazy(() => UpdateDatapointMessages$inboundSchema))
876
- .optional(),
877
- expected_output: z.string().optional(),
878
- }).transform((v) => {
879
- return remap$(v, {
880
- "expected_output": "expectedOutput",
881
- });
882
- });
883
-
884
- /** @internal */
885
- export type UpdateDatapointRequestBody$Outbound = {
886
- inputs?: { [k: string]: any } | undefined;
887
- messages?: Array<UpdateDatapointMessages$Outbound> | undefined;
888
- expected_output?: string | undefined;
889
- };
890
-
891
- /** @internal */
892
- export const UpdateDatapointRequestBody$outboundSchema: z.ZodType<
893
- UpdateDatapointRequestBody$Outbound,
894
- z.ZodTypeDef,
895
- UpdateDatapointRequestBody
896
- > = z.object({
897
- inputs: z.record(z.any()).optional(),
898
- messages: z.array(z.lazy(() => UpdateDatapointMessages$outboundSchema))
899
- .optional(),
900
- expectedOutput: z.string().optional(),
901
- }).transform((v) => {
902
- return remap$(v, {
903
- expectedOutput: "expected_output",
904
- });
905
- });
906
-
907
- /**
908
- * @internal
909
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
910
- */
911
- export namespace UpdateDatapointRequestBody$ {
912
- /** @deprecated use `UpdateDatapointRequestBody$inboundSchema` instead. */
913
- export const inboundSchema = UpdateDatapointRequestBody$inboundSchema;
914
- /** @deprecated use `UpdateDatapointRequestBody$outboundSchema` instead. */
915
- export const outboundSchema = UpdateDatapointRequestBody$outboundSchema;
916
- /** @deprecated use `UpdateDatapointRequestBody$Outbound` instead. */
917
- export type Outbound = UpdateDatapointRequestBody$Outbound;
918
- }
919
-
920
- export function updateDatapointRequestBodyToJSON(
921
- updateDatapointRequestBody: UpdateDatapointRequestBody,
922
- ): string {
923
- return JSON.stringify(
924
- UpdateDatapointRequestBody$outboundSchema.parse(updateDatapointRequestBody),
925
- );
926
- }
927
-
928
- export function updateDatapointRequestBodyFromJSON(
929
- jsonString: string,
930
- ): SafeParseResult<UpdateDatapointRequestBody, SDKValidationError> {
931
- return safeParse(
932
- jsonString,
933
- (x) => UpdateDatapointRequestBody$inboundSchema.parse(JSON.parse(x)),
934
- `Failed to parse 'UpdateDatapointRequestBody' from JSON`,
935
- );
936
- }
937
-
938
- /** @internal */
939
- export const UpdateDatapointRequest$inboundSchema: z.ZodType<
940
- UpdateDatapointRequest,
941
- z.ZodTypeDef,
942
- unknown
943
- > = z.object({
944
- dataset_id: z.string(),
945
- datapoint_id: z.string(),
946
- RequestBody: z.lazy(() => UpdateDatapointRequestBody$inboundSchema)
947
- .optional(),
948
- }).transform((v) => {
949
- return remap$(v, {
950
- "dataset_id": "datasetId",
951
- "datapoint_id": "datapointId",
952
- "RequestBody": "requestBody",
953
- });
954
- });
955
-
956
- /** @internal */
957
- export type UpdateDatapointRequest$Outbound = {
958
- dataset_id: string;
959
- datapoint_id: string;
960
- RequestBody?: UpdateDatapointRequestBody$Outbound | undefined;
961
- };
962
-
963
- /** @internal */
964
- export const UpdateDatapointRequest$outboundSchema: z.ZodType<
965
- UpdateDatapointRequest$Outbound,
966
- z.ZodTypeDef,
967
- UpdateDatapointRequest
968
- > = z.object({
969
- datasetId: z.string(),
970
- datapointId: z.string(),
971
- requestBody: z.lazy(() => UpdateDatapointRequestBody$outboundSchema)
972
- .optional(),
973
- }).transform((v) => {
974
- return remap$(v, {
975
- datasetId: "dataset_id",
976
- datapointId: "datapoint_id",
977
- requestBody: "RequestBody",
978
- });
979
- });
980
-
981
- /**
982
- * @internal
983
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
984
- */
985
- export namespace UpdateDatapointRequest$ {
986
- /** @deprecated use `UpdateDatapointRequest$inboundSchema` instead. */
987
- export const inboundSchema = UpdateDatapointRequest$inboundSchema;
988
- /** @deprecated use `UpdateDatapointRequest$outboundSchema` instead. */
989
- export const outboundSchema = UpdateDatapointRequest$outboundSchema;
990
- /** @deprecated use `UpdateDatapointRequest$Outbound` instead. */
991
- export type Outbound = UpdateDatapointRequest$Outbound;
992
- }
993
-
994
- export function updateDatapointRequestToJSON(
995
- updateDatapointRequest: UpdateDatapointRequest,
996
- ): string {
997
- return JSON.stringify(
998
- UpdateDatapointRequest$outboundSchema.parse(updateDatapointRequest),
999
- );
1000
- }
1001
-
1002
- export function updateDatapointRequestFromJSON(
1003
- jsonString: string,
1004
- ): SafeParseResult<UpdateDatapointRequest, SDKValidationError> {
1005
- return safeParse(
1006
- jsonString,
1007
- (x) => UpdateDatapointRequest$inboundSchema.parse(JSON.parse(x)),
1008
- `Failed to parse 'UpdateDatapointRequest' from JSON`,
1009
- );
1010
- }
1011
-
1012
- /** @internal */
1013
- export const UpdateDatapointDatasetsRole$inboundSchema: z.ZodNativeEnum<
1014
- typeof UpdateDatapointDatasetsRole
1015
- > = z.nativeEnum(UpdateDatapointDatasetsRole);
1016
-
1017
- /** @internal */
1018
- export const UpdateDatapointDatasetsRole$outboundSchema: z.ZodNativeEnum<
1019
- typeof UpdateDatapointDatasetsRole
1020
- > = UpdateDatapointDatasetsRole$inboundSchema;
1021
-
1022
- /**
1023
- * @internal
1024
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1025
- */
1026
- export namespace UpdateDatapointDatasetsRole$ {
1027
- /** @deprecated use `UpdateDatapointDatasetsRole$inboundSchema` instead. */
1028
- export const inboundSchema = UpdateDatapointDatasetsRole$inboundSchema;
1029
- /** @deprecated use `UpdateDatapointDatasetsRole$outboundSchema` instead. */
1030
- export const outboundSchema = UpdateDatapointDatasetsRole$outboundSchema;
1031
- }
1032
-
1033
- /** @internal */
1034
- export const UpdateDatapoint2DatasetsResponse200Type$inboundSchema:
1035
- z.ZodNativeEnum<typeof UpdateDatapoint2DatasetsResponse200Type> = z
1036
- .nativeEnum(UpdateDatapoint2DatasetsResponse200Type);
1037
-
1038
- /** @internal */
1039
- export const UpdateDatapoint2DatasetsResponse200Type$outboundSchema:
1040
- z.ZodNativeEnum<typeof UpdateDatapoint2DatasetsResponse200Type> =
1041
- UpdateDatapoint2DatasetsResponse200Type$inboundSchema;
1042
-
1043
- /**
1044
- * @internal
1045
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1046
- */
1047
- export namespace UpdateDatapoint2DatasetsResponse200Type$ {
1048
- /** @deprecated use `UpdateDatapoint2DatasetsResponse200Type$inboundSchema` instead. */
1049
- export const inboundSchema =
1050
- UpdateDatapoint2DatasetsResponse200Type$inboundSchema;
1051
- /** @deprecated use `UpdateDatapoint2DatasetsResponse200Type$outboundSchema` instead. */
1052
- export const outboundSchema =
1053
- UpdateDatapoint2DatasetsResponse200Type$outboundSchema;
1054
- }
1055
-
1056
- /** @internal */
1057
- export const UpdateDatapoint2DatasetsImageUrl$inboundSchema: z.ZodType<
1058
- UpdateDatapoint2DatasetsImageUrl,
1059
- z.ZodTypeDef,
1060
- unknown
1061
- > = z.object({
1062
- id: z.string().optional(),
1063
- url: z.string(),
1064
- detail: z.string().optional(),
1065
- });
1066
-
1067
- /** @internal */
1068
- export type UpdateDatapoint2DatasetsImageUrl$Outbound = {
1069
- id?: string | undefined;
1070
- url: string;
1071
- detail?: string | undefined;
1072
- };
1073
-
1074
- /** @internal */
1075
- export const UpdateDatapoint2DatasetsImageUrl$outboundSchema: z.ZodType<
1076
- UpdateDatapoint2DatasetsImageUrl$Outbound,
1077
- z.ZodTypeDef,
1078
- UpdateDatapoint2DatasetsImageUrl
1079
- > = z.object({
1080
- id: z.string().optional(),
1081
- url: z.string(),
1082
- detail: z.string().optional(),
1083
- });
1084
-
1085
- /**
1086
- * @internal
1087
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1088
- */
1089
- export namespace UpdateDatapoint2DatasetsImageUrl$ {
1090
- /** @deprecated use `UpdateDatapoint2DatasetsImageUrl$inboundSchema` instead. */
1091
- export const inboundSchema = UpdateDatapoint2DatasetsImageUrl$inboundSchema;
1092
- /** @deprecated use `UpdateDatapoint2DatasetsImageUrl$outboundSchema` instead. */
1093
- export const outboundSchema = UpdateDatapoint2DatasetsImageUrl$outboundSchema;
1094
- /** @deprecated use `UpdateDatapoint2DatasetsImageUrl$Outbound` instead. */
1095
- export type Outbound = UpdateDatapoint2DatasetsImageUrl$Outbound;
1096
- }
1097
-
1098
- export function updateDatapoint2DatasetsImageUrlToJSON(
1099
- updateDatapoint2DatasetsImageUrl: UpdateDatapoint2DatasetsImageUrl,
1100
- ): string {
1101
- return JSON.stringify(
1102
- UpdateDatapoint2DatasetsImageUrl$outboundSchema.parse(
1103
- updateDatapoint2DatasetsImageUrl,
1104
- ),
1105
- );
1106
- }
1107
-
1108
- export function updateDatapoint2DatasetsImageUrlFromJSON(
1109
- jsonString: string,
1110
- ): SafeParseResult<UpdateDatapoint2DatasetsImageUrl, SDKValidationError> {
1111
- return safeParse(
1112
- jsonString,
1113
- (x) => UpdateDatapoint2DatasetsImageUrl$inboundSchema.parse(JSON.parse(x)),
1114
- `Failed to parse 'UpdateDatapoint2DatasetsImageUrl' from JSON`,
1115
- );
1116
- }
1117
-
1118
- /** @internal */
1119
- export const UpdateDatapoint2Datasets2$inboundSchema: z.ZodType<
1120
- UpdateDatapoint2Datasets2,
1121
- z.ZodTypeDef,
1122
- unknown
1123
- > = z.object({
1124
- type: UpdateDatapoint2DatasetsResponse200Type$inboundSchema,
1125
- image_url: z.lazy(() => UpdateDatapoint2DatasetsImageUrl$inboundSchema),
1126
- }).transform((v) => {
1127
- return remap$(v, {
1128
- "image_url": "imageUrl",
1129
- });
1130
- });
1131
-
1132
- /** @internal */
1133
- export type UpdateDatapoint2Datasets2$Outbound = {
1134
- type: string;
1135
- image_url: UpdateDatapoint2DatasetsImageUrl$Outbound;
1136
- };
1137
-
1138
- /** @internal */
1139
- export const UpdateDatapoint2Datasets2$outboundSchema: z.ZodType<
1140
- UpdateDatapoint2Datasets2$Outbound,
1141
- z.ZodTypeDef,
1142
- UpdateDatapoint2Datasets2
1143
- > = z.object({
1144
- type: UpdateDatapoint2DatasetsResponse200Type$outboundSchema,
1145
- imageUrl: z.lazy(() => UpdateDatapoint2DatasetsImageUrl$outboundSchema),
1146
- }).transform((v) => {
1147
- return remap$(v, {
1148
- imageUrl: "image_url",
1149
- });
1150
- });
1151
-
1152
- /**
1153
- * @internal
1154
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1155
- */
1156
- export namespace UpdateDatapoint2Datasets2$ {
1157
- /** @deprecated use `UpdateDatapoint2Datasets2$inboundSchema` instead. */
1158
- export const inboundSchema = UpdateDatapoint2Datasets2$inboundSchema;
1159
- /** @deprecated use `UpdateDatapoint2Datasets2$outboundSchema` instead. */
1160
- export const outboundSchema = UpdateDatapoint2Datasets2$outboundSchema;
1161
- /** @deprecated use `UpdateDatapoint2Datasets2$Outbound` instead. */
1162
- export type Outbound = UpdateDatapoint2Datasets2$Outbound;
1163
- }
1164
-
1165
- export function updateDatapoint2Datasets2ToJSON(
1166
- updateDatapoint2Datasets2: UpdateDatapoint2Datasets2,
1167
- ): string {
1168
- return JSON.stringify(
1169
- UpdateDatapoint2Datasets2$outboundSchema.parse(updateDatapoint2Datasets2),
1170
- );
1171
- }
1172
-
1173
- export function updateDatapoint2Datasets2FromJSON(
1174
- jsonString: string,
1175
- ): SafeParseResult<UpdateDatapoint2Datasets2, SDKValidationError> {
1176
- return safeParse(
1177
- jsonString,
1178
- (x) => UpdateDatapoint2Datasets2$inboundSchema.parse(JSON.parse(x)),
1179
- `Failed to parse 'UpdateDatapoint2Datasets2' from JSON`,
1180
- );
1181
- }
1182
-
1183
- /** @internal */
1184
- export const UpdateDatapoint2DatasetsResponseType$inboundSchema:
1185
- z.ZodNativeEnum<typeof UpdateDatapoint2DatasetsResponseType> = z.nativeEnum(
1186
- UpdateDatapoint2DatasetsResponseType,
1187
- );
1188
-
1189
- /** @internal */
1190
- export const UpdateDatapoint2DatasetsResponseType$outboundSchema:
1191
- z.ZodNativeEnum<typeof UpdateDatapoint2DatasetsResponseType> =
1192
- UpdateDatapoint2DatasetsResponseType$inboundSchema;
1193
-
1194
- /**
1195
- * @internal
1196
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1197
- */
1198
- export namespace UpdateDatapoint2DatasetsResponseType$ {
1199
- /** @deprecated use `UpdateDatapoint2DatasetsResponseType$inboundSchema` instead. */
1200
- export const inboundSchema =
1201
- UpdateDatapoint2DatasetsResponseType$inboundSchema;
1202
- /** @deprecated use `UpdateDatapoint2DatasetsResponseType$outboundSchema` instead. */
1203
- export const outboundSchema =
1204
- UpdateDatapoint2DatasetsResponseType$outboundSchema;
1205
- }
1206
-
1207
- /** @internal */
1208
- export const UpdateDatapoint2Datasets1$inboundSchema: z.ZodType<
1209
- UpdateDatapoint2Datasets1,
1210
- z.ZodTypeDef,
1211
- unknown
1212
- > = z.object({
1213
- type: UpdateDatapoint2DatasetsResponseType$inboundSchema,
1214
- text: z.string(),
1215
- });
1216
-
1217
- /** @internal */
1218
- export type UpdateDatapoint2Datasets1$Outbound = {
1219
- type: string;
1220
- text: string;
1221
- };
1222
-
1223
- /** @internal */
1224
- export const UpdateDatapoint2Datasets1$outboundSchema: z.ZodType<
1225
- UpdateDatapoint2Datasets1$Outbound,
1226
- z.ZodTypeDef,
1227
- UpdateDatapoint2Datasets1
1228
- > = z.object({
1229
- type: UpdateDatapoint2DatasetsResponseType$outboundSchema,
1230
- text: z.string(),
1231
- });
1232
-
1233
- /**
1234
- * @internal
1235
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1236
- */
1237
- export namespace UpdateDatapoint2Datasets1$ {
1238
- /** @deprecated use `UpdateDatapoint2Datasets1$inboundSchema` instead. */
1239
- export const inboundSchema = UpdateDatapoint2Datasets1$inboundSchema;
1240
- /** @deprecated use `UpdateDatapoint2Datasets1$outboundSchema` instead. */
1241
- export const outboundSchema = UpdateDatapoint2Datasets1$outboundSchema;
1242
- /** @deprecated use `UpdateDatapoint2Datasets1$Outbound` instead. */
1243
- export type Outbound = UpdateDatapoint2Datasets1$Outbound;
1244
- }
1245
-
1246
- export function updateDatapoint2Datasets1ToJSON(
1247
- updateDatapoint2Datasets1: UpdateDatapoint2Datasets1,
1248
- ): string {
1249
- return JSON.stringify(
1250
- UpdateDatapoint2Datasets1$outboundSchema.parse(updateDatapoint2Datasets1),
1251
- );
1252
- }
1253
-
1254
- export function updateDatapoint2Datasets1FromJSON(
1255
- jsonString: string,
1256
- ): SafeParseResult<UpdateDatapoint2Datasets1, SDKValidationError> {
1257
- return safeParse(
1258
- jsonString,
1259
- (x) => UpdateDatapoint2Datasets1$inboundSchema.parse(JSON.parse(x)),
1260
- `Failed to parse 'UpdateDatapoint2Datasets1' from JSON`,
1261
- );
1262
- }
1263
-
1264
- /** @internal */
1265
- export const UpdateDatapointContentDatasets2$inboundSchema: z.ZodType<
1266
- UpdateDatapointContentDatasets2,
1267
- z.ZodTypeDef,
1268
- unknown
1269
- > = z.union([
1270
- z.lazy(() => UpdateDatapoint2Datasets1$inboundSchema),
1271
- z.lazy(() => UpdateDatapoint2Datasets2$inboundSchema),
1272
- ]);
1273
-
1274
- /** @internal */
1275
- export type UpdateDatapointContentDatasets2$Outbound =
1276
- | UpdateDatapoint2Datasets1$Outbound
1277
- | UpdateDatapoint2Datasets2$Outbound;
1278
-
1279
- /** @internal */
1280
- export const UpdateDatapointContentDatasets2$outboundSchema: z.ZodType<
1281
- UpdateDatapointContentDatasets2$Outbound,
1282
- z.ZodTypeDef,
1283
- UpdateDatapointContentDatasets2
1284
- > = z.union([
1285
- z.lazy(() => UpdateDatapoint2Datasets1$outboundSchema),
1286
- z.lazy(() => UpdateDatapoint2Datasets2$outboundSchema),
1287
- ]);
1288
-
1289
- /**
1290
- * @internal
1291
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1292
- */
1293
- export namespace UpdateDatapointContentDatasets2$ {
1294
- /** @deprecated use `UpdateDatapointContentDatasets2$inboundSchema` instead. */
1295
- export const inboundSchema = UpdateDatapointContentDatasets2$inboundSchema;
1296
- /** @deprecated use `UpdateDatapointContentDatasets2$outboundSchema` instead. */
1297
- export const outboundSchema = UpdateDatapointContentDatasets2$outboundSchema;
1298
- /** @deprecated use `UpdateDatapointContentDatasets2$Outbound` instead. */
1299
- export type Outbound = UpdateDatapointContentDatasets2$Outbound;
1300
- }
1301
-
1302
- export function updateDatapointContentDatasets2ToJSON(
1303
- updateDatapointContentDatasets2: UpdateDatapointContentDatasets2,
1304
- ): string {
1305
- return JSON.stringify(
1306
- UpdateDatapointContentDatasets2$outboundSchema.parse(
1307
- updateDatapointContentDatasets2,
1308
- ),
1309
- );
1310
- }
1311
-
1312
- export function updateDatapointContentDatasets2FromJSON(
1313
- jsonString: string,
1314
- ): SafeParseResult<UpdateDatapointContentDatasets2, SDKValidationError> {
1315
- return safeParse(
1316
- jsonString,
1317
- (x) => UpdateDatapointContentDatasets2$inboundSchema.parse(JSON.parse(x)),
1318
- `Failed to parse 'UpdateDatapointContentDatasets2' from JSON`,
1319
- );
1320
- }
1321
-
1322
- /** @internal */
1323
- export const UpdateDatapointDatasetsContent$inboundSchema: z.ZodType<
1324
- UpdateDatapointDatasetsContent,
1325
- z.ZodTypeDef,
1326
- unknown
1327
- > = z.union([
1328
- z.string(),
1329
- z.array(z.union([
1330
- z.lazy(() => UpdateDatapoint2Datasets1$inboundSchema),
1331
- z.lazy(() => UpdateDatapoint2Datasets2$inboundSchema),
1332
- ])),
1333
- ]);
1334
-
1335
- /** @internal */
1336
- export type UpdateDatapointDatasetsContent$Outbound =
1337
- | string
1338
- | Array<
1339
- UpdateDatapoint2Datasets1$Outbound | UpdateDatapoint2Datasets2$Outbound
1340
- >;
1341
-
1342
- /** @internal */
1343
- export const UpdateDatapointDatasetsContent$outboundSchema: z.ZodType<
1344
- UpdateDatapointDatasetsContent$Outbound,
1345
- z.ZodTypeDef,
1346
- UpdateDatapointDatasetsContent
1347
- > = z.union([
1348
- z.string(),
1349
- z.array(z.union([
1350
- z.lazy(() => UpdateDatapoint2Datasets1$outboundSchema),
1351
- z.lazy(() => UpdateDatapoint2Datasets2$outboundSchema),
1352
- ])),
1353
- ]);
1354
-
1355
- /**
1356
- * @internal
1357
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1358
- */
1359
- export namespace UpdateDatapointDatasetsContent$ {
1360
- /** @deprecated use `UpdateDatapointDatasetsContent$inboundSchema` instead. */
1361
- export const inboundSchema = UpdateDatapointDatasetsContent$inboundSchema;
1362
- /** @deprecated use `UpdateDatapointDatasetsContent$outboundSchema` instead. */
1363
- export const outboundSchema = UpdateDatapointDatasetsContent$outboundSchema;
1364
- /** @deprecated use `UpdateDatapointDatasetsContent$Outbound` instead. */
1365
- export type Outbound = UpdateDatapointDatasetsContent$Outbound;
1366
- }
1367
-
1368
- export function updateDatapointDatasetsContentToJSON(
1369
- updateDatapointDatasetsContent: UpdateDatapointDatasetsContent,
1370
- ): string {
1371
- return JSON.stringify(
1372
- UpdateDatapointDatasetsContent$outboundSchema.parse(
1373
- updateDatapointDatasetsContent,
1374
- ),
1375
- );
1376
- }
1377
-
1378
- export function updateDatapointDatasetsContentFromJSON(
1379
- jsonString: string,
1380
- ): SafeParseResult<UpdateDatapointDatasetsContent, SDKValidationError> {
1381
- return safeParse(
1382
- jsonString,
1383
- (x) => UpdateDatapointDatasetsContent$inboundSchema.parse(JSON.parse(x)),
1384
- `Failed to parse 'UpdateDatapointDatasetsContent' from JSON`,
1385
- );
1386
- }
1387
-
1388
- /** @internal */
1389
- export const UpdateDatapointDatasetsType$inboundSchema: z.ZodNativeEnum<
1390
- typeof UpdateDatapointDatasetsType
1391
- > = z.nativeEnum(UpdateDatapointDatasetsType);
1392
-
1393
- /** @internal */
1394
- export const UpdateDatapointDatasetsType$outboundSchema: z.ZodNativeEnum<
1395
- typeof UpdateDatapointDatasetsType
1396
- > = UpdateDatapointDatasetsType$inboundSchema;
1397
-
1398
- /**
1399
- * @internal
1400
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1401
- */
1402
- export namespace UpdateDatapointDatasetsType$ {
1403
- /** @deprecated use `UpdateDatapointDatasetsType$inboundSchema` instead. */
1404
- export const inboundSchema = UpdateDatapointDatasetsType$inboundSchema;
1405
- /** @deprecated use `UpdateDatapointDatasetsType$outboundSchema` instead. */
1406
- export const outboundSchema = UpdateDatapointDatasetsType$outboundSchema;
1407
- }
1408
-
1409
- /** @internal */
1410
- export const UpdateDatapointDatasetsFunction$inboundSchema: z.ZodType<
1411
- UpdateDatapointDatasetsFunction,
1412
- z.ZodTypeDef,
1413
- unknown
1414
- > = z.object({
1415
- name: z.string(),
1416
- arguments: z.string(),
1417
- });
1418
-
1419
- /** @internal */
1420
- export type UpdateDatapointDatasetsFunction$Outbound = {
1421
- name: string;
1422
- arguments: string;
1423
- };
1424
-
1425
- /** @internal */
1426
- export const UpdateDatapointDatasetsFunction$outboundSchema: z.ZodType<
1427
- UpdateDatapointDatasetsFunction$Outbound,
1428
- z.ZodTypeDef,
1429
- UpdateDatapointDatasetsFunction
1430
- > = z.object({
1431
- name: z.string(),
1432
- arguments: z.string(),
1433
- });
1434
-
1435
- /**
1436
- * @internal
1437
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1438
- */
1439
- export namespace UpdateDatapointDatasetsFunction$ {
1440
- /** @deprecated use `UpdateDatapointDatasetsFunction$inboundSchema` instead. */
1441
- export const inboundSchema = UpdateDatapointDatasetsFunction$inboundSchema;
1442
- /** @deprecated use `UpdateDatapointDatasetsFunction$outboundSchema` instead. */
1443
- export const outboundSchema = UpdateDatapointDatasetsFunction$outboundSchema;
1444
- /** @deprecated use `UpdateDatapointDatasetsFunction$Outbound` instead. */
1445
- export type Outbound = UpdateDatapointDatasetsFunction$Outbound;
1446
- }
1447
-
1448
- export function updateDatapointDatasetsFunctionToJSON(
1449
- updateDatapointDatasetsFunction: UpdateDatapointDatasetsFunction,
1450
- ): string {
1451
- return JSON.stringify(
1452
- UpdateDatapointDatasetsFunction$outboundSchema.parse(
1453
- updateDatapointDatasetsFunction,
1454
- ),
1455
- );
1456
- }
1457
-
1458
- export function updateDatapointDatasetsFunctionFromJSON(
1459
- jsonString: string,
1460
- ): SafeParseResult<UpdateDatapointDatasetsFunction, SDKValidationError> {
1461
- return safeParse(
1462
- jsonString,
1463
- (x) => UpdateDatapointDatasetsFunction$inboundSchema.parse(JSON.parse(x)),
1464
- `Failed to parse 'UpdateDatapointDatasetsFunction' from JSON`,
1465
- );
1466
- }
1467
-
1468
- /** @internal */
1469
- export const UpdateDatapointDatasetsToolCalls$inboundSchema: z.ZodType<
1470
- UpdateDatapointDatasetsToolCalls,
1471
- z.ZodTypeDef,
1472
- unknown
1473
- > = z.object({
1474
- id: z.string().optional(),
1475
- index: z.number().optional(),
1476
- type: UpdateDatapointDatasetsType$inboundSchema,
1477
- function: z.lazy(() => UpdateDatapointDatasetsFunction$inboundSchema),
1478
- });
1479
-
1480
- /** @internal */
1481
- export type UpdateDatapointDatasetsToolCalls$Outbound = {
1482
- id?: string | undefined;
1483
- index?: number | undefined;
1484
- type: string;
1485
- function: UpdateDatapointDatasetsFunction$Outbound;
1486
- };
1487
-
1488
- /** @internal */
1489
- export const UpdateDatapointDatasetsToolCalls$outboundSchema: z.ZodType<
1490
- UpdateDatapointDatasetsToolCalls$Outbound,
1491
- z.ZodTypeDef,
1492
- UpdateDatapointDatasetsToolCalls
1493
- > = z.object({
1494
- id: z.string().optional(),
1495
- index: z.number().optional(),
1496
- type: UpdateDatapointDatasetsType$outboundSchema,
1497
- function: z.lazy(() => UpdateDatapointDatasetsFunction$outboundSchema),
1498
- });
1499
-
1500
- /**
1501
- * @internal
1502
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1503
- */
1504
- export namespace UpdateDatapointDatasetsToolCalls$ {
1505
- /** @deprecated use `UpdateDatapointDatasetsToolCalls$inboundSchema` instead. */
1506
- export const inboundSchema = UpdateDatapointDatasetsToolCalls$inboundSchema;
1507
- /** @deprecated use `UpdateDatapointDatasetsToolCalls$outboundSchema` instead. */
1508
- export const outboundSchema = UpdateDatapointDatasetsToolCalls$outboundSchema;
1509
- /** @deprecated use `UpdateDatapointDatasetsToolCalls$Outbound` instead. */
1510
- export type Outbound = UpdateDatapointDatasetsToolCalls$Outbound;
1511
- }
1512
-
1513
- export function updateDatapointDatasetsToolCallsToJSON(
1514
- updateDatapointDatasetsToolCalls: UpdateDatapointDatasetsToolCalls,
1515
- ): string {
1516
- return JSON.stringify(
1517
- UpdateDatapointDatasetsToolCalls$outboundSchema.parse(
1518
- updateDatapointDatasetsToolCalls,
1519
- ),
1520
- );
1521
- }
1522
-
1523
- export function updateDatapointDatasetsToolCallsFromJSON(
1524
- jsonString: string,
1525
- ): SafeParseResult<UpdateDatapointDatasetsToolCalls, SDKValidationError> {
1526
- return safeParse(
1527
- jsonString,
1528
- (x) => UpdateDatapointDatasetsToolCalls$inboundSchema.parse(JSON.parse(x)),
1529
- `Failed to parse 'UpdateDatapointDatasetsToolCalls' from JSON`,
1530
- );
1531
- }
1532
-
1533
- /** @internal */
1534
- export const UpdateDatapointDatasetsMessages$inboundSchema: z.ZodType<
1535
- UpdateDatapointDatasetsMessages,
1536
- z.ZodTypeDef,
1537
- unknown
1538
- > = z.object({
1539
- role: UpdateDatapointDatasetsRole$inboundSchema,
1540
- content: z.union([
1541
- z.string(),
1542
- z.array(z.union([
1543
- z.lazy(() => UpdateDatapoint2Datasets1$inboundSchema),
1544
- z.lazy(() => UpdateDatapoint2Datasets2$inboundSchema),
1545
- ])),
1546
- ]),
1547
- tool_calls: z.array(
1548
- z.lazy(() => UpdateDatapointDatasetsToolCalls$inboundSchema),
1549
- ).optional(),
1550
- }).transform((v) => {
1551
- return remap$(v, {
1552
- "tool_calls": "toolCalls",
1553
- });
1554
- });
1555
-
1556
- /** @internal */
1557
- export type UpdateDatapointDatasetsMessages$Outbound = {
1558
- role: string;
1559
- content:
1560
- | string
1561
- | Array<
1562
- UpdateDatapoint2Datasets1$Outbound | UpdateDatapoint2Datasets2$Outbound
1563
- >;
1564
- tool_calls?: Array<UpdateDatapointDatasetsToolCalls$Outbound> | undefined;
1565
- };
1566
-
1567
- /** @internal */
1568
- export const UpdateDatapointDatasetsMessages$outboundSchema: z.ZodType<
1569
- UpdateDatapointDatasetsMessages$Outbound,
1570
- z.ZodTypeDef,
1571
- UpdateDatapointDatasetsMessages
1572
- > = z.object({
1573
- role: UpdateDatapointDatasetsRole$outboundSchema,
1574
- content: z.union([
1575
- z.string(),
1576
- z.array(z.union([
1577
- z.lazy(() => UpdateDatapoint2Datasets1$outboundSchema),
1578
- z.lazy(() => UpdateDatapoint2Datasets2$outboundSchema),
1579
- ])),
1580
- ]),
1581
- toolCalls: z.array(
1582
- z.lazy(() => UpdateDatapointDatasetsToolCalls$outboundSchema),
1583
- ).optional(),
1584
- }).transform((v) => {
1585
- return remap$(v, {
1586
- toolCalls: "tool_calls",
1587
- });
1588
- });
1589
-
1590
- /**
1591
- * @internal
1592
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1593
- */
1594
- export namespace UpdateDatapointDatasetsMessages$ {
1595
- /** @deprecated use `UpdateDatapointDatasetsMessages$inboundSchema` instead. */
1596
- export const inboundSchema = UpdateDatapointDatasetsMessages$inboundSchema;
1597
- /** @deprecated use `UpdateDatapointDatasetsMessages$outboundSchema` instead. */
1598
- export const outboundSchema = UpdateDatapointDatasetsMessages$outboundSchema;
1599
- /** @deprecated use `UpdateDatapointDatasetsMessages$Outbound` instead. */
1600
- export type Outbound = UpdateDatapointDatasetsMessages$Outbound;
1601
- }
1602
-
1603
- export function updateDatapointDatasetsMessagesToJSON(
1604
- updateDatapointDatasetsMessages: UpdateDatapointDatasetsMessages,
1605
- ): string {
1606
- return JSON.stringify(
1607
- UpdateDatapointDatasetsMessages$outboundSchema.parse(
1608
- updateDatapointDatasetsMessages,
1609
- ),
1610
- );
1611
- }
1612
-
1613
- export function updateDatapointDatasetsMessagesFromJSON(
1614
- jsonString: string,
1615
- ): SafeParseResult<UpdateDatapointDatasetsMessages, SDKValidationError> {
1616
- return safeParse(
1617
- jsonString,
1618
- (x) => UpdateDatapointDatasetsMessages$inboundSchema.parse(JSON.parse(x)),
1619
- `Failed to parse 'UpdateDatapointDatasetsMessages' from JSON`,
1620
- );
1621
- }
1622
-
1623
- /** @internal */
1624
- export const UpdateDatapointResponseBody$inboundSchema: z.ZodType<
1625
- UpdateDatapointResponseBody,
1626
- z.ZodTypeDef,
1627
- unknown
1628
- > = z.object({
1629
- _id: z.string(),
1630
- workspace_id: z.string(),
1631
- inputs: z.record(z.any()).optional(),
1632
- messages: z.array(z.lazy(() => UpdateDatapointDatasetsMessages$inboundSchema))
1633
- .optional(),
1634
- expected_output: z.string().optional(),
1635
- dataset_id: z.string(),
1636
- created_by_id: z.string().optional(),
1637
- updated_by_id: z.string().optional(),
1638
- created: z.string().datetime({ offset: true }).transform(v => new Date(v))
1639
- .optional(),
1640
- updated: z.string().datetime({ offset: true }).default(
1641
- "2025-04-03T11:50:53.752Z",
1642
- ).transform(v => new Date(v)),
1643
- }).transform((v) => {
1644
- return remap$(v, {
1645
- "_id": "id",
1646
- "workspace_id": "workspaceId",
1647
- "expected_output": "expectedOutput",
1648
- "dataset_id": "datasetId",
1649
- "created_by_id": "createdById",
1650
- "updated_by_id": "updatedById",
1651
- });
1652
- });
1653
-
1654
- /** @internal */
1655
- export type UpdateDatapointResponseBody$Outbound = {
1656
- _id: string;
1657
- workspace_id: string;
1658
- inputs?: { [k: string]: any } | undefined;
1659
- messages?: Array<UpdateDatapointDatasetsMessages$Outbound> | undefined;
1660
- expected_output?: string | undefined;
1661
- dataset_id: string;
1662
- created_by_id?: string | undefined;
1663
- updated_by_id?: string | undefined;
1664
- created?: string | undefined;
1665
- updated: string;
1666
- };
1667
-
1668
- /** @internal */
1669
- export const UpdateDatapointResponseBody$outboundSchema: z.ZodType<
1670
- UpdateDatapointResponseBody$Outbound,
1671
- z.ZodTypeDef,
1672
- UpdateDatapointResponseBody
1673
- > = z.object({
1674
- id: z.string(),
1675
- workspaceId: z.string(),
1676
- inputs: z.record(z.any()).optional(),
1677
- messages: z.array(
1678
- z.lazy(() => UpdateDatapointDatasetsMessages$outboundSchema),
1679
- ).optional(),
1680
- expectedOutput: z.string().optional(),
1681
- datasetId: z.string(),
1682
- createdById: z.string().optional(),
1683
- updatedById: z.string().optional(),
1684
- created: z.date().transform(v => v.toISOString()).optional(),
1685
- updated: z.date().default(() => new Date("2025-04-03T11:50:53.752Z"))
1686
- .transform(v => v.toISOString()),
1687
- }).transform((v) => {
1688
- return remap$(v, {
1689
- id: "_id",
1690
- workspaceId: "workspace_id",
1691
- expectedOutput: "expected_output",
1692
- datasetId: "dataset_id",
1693
- createdById: "created_by_id",
1694
- updatedById: "updated_by_id",
1695
- });
1696
- });
1697
-
1698
- /**
1699
- * @internal
1700
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1701
- */
1702
- export namespace UpdateDatapointResponseBody$ {
1703
- /** @deprecated use `UpdateDatapointResponseBody$inboundSchema` instead. */
1704
- export const inboundSchema = UpdateDatapointResponseBody$inboundSchema;
1705
- /** @deprecated use `UpdateDatapointResponseBody$outboundSchema` instead. */
1706
- export const outboundSchema = UpdateDatapointResponseBody$outboundSchema;
1707
- /** @deprecated use `UpdateDatapointResponseBody$Outbound` instead. */
1708
- export type Outbound = UpdateDatapointResponseBody$Outbound;
1709
- }
1710
-
1711
- export function updateDatapointResponseBodyToJSON(
1712
- updateDatapointResponseBody: UpdateDatapointResponseBody,
1713
- ): string {
1714
- return JSON.stringify(
1715
- UpdateDatapointResponseBody$outboundSchema.parse(
1716
- updateDatapointResponseBody,
1717
- ),
1718
- );
1719
- }
1720
-
1721
- export function updateDatapointResponseBodyFromJSON(
1722
- jsonString: string,
1723
- ): SafeParseResult<UpdateDatapointResponseBody, SDKValidationError> {
1724
- return safeParse(
1725
- jsonString,
1726
- (x) => UpdateDatapointResponseBody$inboundSchema.parse(JSON.parse(x)),
1727
- `Failed to parse 'UpdateDatapointResponseBody' from JSON`,
1728
- );
1729
- }