@orq-ai/node 3.3.2 → 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 (239) hide show
  1. package/bin/mcp-server.js +6 -9
  2. package/bin/mcp-server.js.map +7 -7
  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/package.json +3 -2
  12. package/src/lib/config.ts +2 -2
  13. package/src/mcp-server/mcp-server.ts +1 -1
  14. package/src/mcp-server/server.ts +1 -1
  15. package/packages/orq-rc/FUNCTIONS.md +0 -106
  16. package/packages/orq-rc/README.md +0 -698
  17. package/packages/orq-rc/RUNTIMES.md +0 -48
  18. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
  19. package/packages/orq-rc/docs/sdks/datasets/README.md +0 -940
  20. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -316
  21. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
  22. package/packages/orq-rc/docs/sdks/files/README.md +0 -311
  23. package/packages/orq-rc/docs/sdks/knowledge/README.md +0 -1279
  24. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
  25. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  26. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -614
  27. package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -80
  28. package/packages/orq-rc/jsr.json +0 -28
  29. package/packages/orq-rc/package-lock.json +0 -3217
  30. package/packages/orq-rc/package.json +0 -45
  31. package/packages/orq-rc/src/core.ts +0 -13
  32. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -154
  33. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -161
  34. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -159
  35. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -161
  36. package/packages/orq-rc/src/funcs/datasetsCreateDatapoints.ts +0 -165
  37. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -161
  38. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -176
  39. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -161
  40. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -168
  41. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -169
  42. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -175
  43. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -170
  44. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -173
  45. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -162
  46. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -170
  47. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -170
  48. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -162
  49. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -178
  50. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -154
  51. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -174
  52. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -158
  53. package/packages/orq-rc/src/funcs/filesGet.ts +0 -160
  54. package/packages/orq-rc/src/funcs/filesList.ts +0 -161
  55. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -152
  56. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -165
  57. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -160
  58. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -161
  59. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -168
  60. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -167
  61. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -163
  62. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -172
  63. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -168
  64. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -160
  65. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -167
  66. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -163
  67. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -158
  68. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -158
  69. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -168
  70. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -164
  71. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -154
  72. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -158
  73. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -175
  74. package/packages/orq-rc/src/funcs/promptsList.ts +0 -161
  75. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -167
  76. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -160
  77. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -167
  78. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -155
  79. package/packages/orq-rc/src/hooks/global.ts +0 -44
  80. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  81. package/packages/orq-rc/src/hooks/index.ts +0 -6
  82. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  83. package/packages/orq-rc/src/hooks/types.ts +0 -110
  84. package/packages/orq-rc/src/index.ts +0 -7
  85. package/packages/orq-rc/src/lib/base64.ts +0 -37
  86. package/packages/orq-rc/src/lib/config.ts +0 -70
  87. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  88. package/packages/orq-rc/src/lib/encodings.ts +0 -483
  89. package/packages/orq-rc/src/lib/env.ts +0 -73
  90. package/packages/orq-rc/src/lib/event-streams.ts +0 -264
  91. package/packages/orq-rc/src/lib/files.ts +0 -40
  92. package/packages/orq-rc/src/lib/http.ts +0 -323
  93. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  94. package/packages/orq-rc/src/lib/logger.ts +0 -9
  95. package/packages/orq-rc/src/lib/matchers.ts +0 -325
  96. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  97. package/packages/orq-rc/src/lib/retries.ts +0 -218
  98. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  99. package/packages/orq-rc/src/lib/sdks.ts +0 -395
  100. package/packages/orq-rc/src/lib/security.ts +0 -261
  101. package/packages/orq-rc/src/lib/url.ts +0 -33
  102. package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -125
  103. package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -140
  104. package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
  105. package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
  106. package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
  107. package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
  108. package/packages/orq-rc/src/mcp-server/prompts.ts +0 -110
  109. package/packages/orq-rc/src/mcp-server/resources.ts +0 -158
  110. package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
  111. package/packages/orq-rc/src/mcp-server/server.ts +0 -157
  112. package/packages/orq-rc/src/mcp-server/shared.ts +0 -75
  113. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
  114. package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
  115. package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
  116. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
  117. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoints.ts +0 -37
  118. package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
  119. package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
  120. package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
  121. package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
  122. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
  123. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
  124. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
  125. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
  126. package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
  127. package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
  128. package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
  129. package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +0 -37
  130. package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
  131. package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
  132. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
  133. package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
  134. package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
  135. package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
  136. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreate.ts +0 -35
  137. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +0 -35
  138. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +0 -35
  139. package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +0 -35
  140. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +0 -33
  141. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +0 -35
  142. package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +0 -37
  143. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +0 -35
  144. package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +0 -35
  145. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +0 -37
  146. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveChunk.ts +0 -35
  147. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +0 -35
  148. package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +0 -35
  149. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +0 -35
  150. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +0 -35
  151. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateDatasource.ts +0 -35
  152. package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
  153. package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
  154. package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
  155. package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
  156. package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
  157. package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
  158. package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
  159. package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
  160. package/packages/orq-rc/src/mcp-server/tools.ts +0 -126
  161. package/packages/orq-rc/src/models/components/deployments.ts +0 -4164
  162. package/packages/orq-rc/src/models/components/index.ts +0 -6
  163. package/packages/orq-rc/src/models/components/security.ts +0 -71
  164. package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
  165. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -71
  166. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
  167. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  168. package/packages/orq-rc/src/models/errors/index.ts +0 -10
  169. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
  170. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
  171. package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +0 -1816
  172. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -75
  173. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -680
  174. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
  175. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -296
  176. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -1740
  177. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -852
  178. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  179. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -676
  180. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3743
  181. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -96
  182. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -81
  183. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -75
  184. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -87
  185. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -78
  186. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  187. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -4936
  188. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -6090
  189. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1199
  190. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2155
  191. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -5960
  192. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  193. package/packages/orq-rc/src/models/operations/fileget.ts +0 -223
  194. package/packages/orq-rc/src/models/operations/filelist.ts +0 -337
  195. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -324
  196. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2127
  197. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -265
  198. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -444
  199. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1993
  200. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -1991
  201. package/packages/orq-rc/src/models/operations/index.ts +0 -51
  202. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -444
  203. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1071
  204. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -406
  205. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -447
  206. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -568
  207. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2125
  208. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  209. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -924
  210. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -288
  211. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -273
  212. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1673
  213. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -418
  214. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -1729
  215. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -393
  216. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -345
  217. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -790
  218. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -3929
  219. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  220. package/packages/orq-rc/src/sdk/datasets.ts +0 -222
  221. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  222. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  223. package/packages/orq-rc/src/sdk/files.ts +0 -78
  224. package/packages/orq-rc/src/sdk/index.ts +0 -5
  225. package/packages/orq-rc/src/sdk/knowledge.ts +0 -261
  226. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  227. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  228. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  229. package/packages/orq-rc/src/sdk/sdk.ts +0 -55
  230. package/packages/orq-rc/src/types/async.ts +0 -68
  231. package/packages/orq-rc/src/types/blobs.ts +0 -31
  232. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  233. package/packages/orq-rc/src/types/enums.ts +0 -16
  234. package/packages/orq-rc/src/types/fp.ts +0 -50
  235. package/packages/orq-rc/src/types/index.ts +0 -11
  236. package/packages/orq-rc/src/types/operations.ts +0 -105
  237. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  238. package/packages/orq-rc/src/types/streams.ts +0 -21
  239. package/packages/orq-rc/tsconfig.json +0 -41
@@ -1,1071 +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 ListDatasetDatapointsRequest = {
13
- datasetId: string;
14
- /**
15
- * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
16
- */
17
- limit?: number | undefined;
18
- /**
19
- * A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page of the list.
20
- */
21
- startingAfter?: string | undefined;
22
- /**
23
- * A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, starting with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous page of the list.
24
- */
25
- endingBefore?: string | undefined;
26
- };
27
-
28
- export const ListDatasetDatapointsObject = {
29
- List: "list",
30
- } as const;
31
- export type ListDatasetDatapointsObject = ClosedEnum<
32
- typeof ListDatasetDatapointsObject
33
- >;
34
-
35
- /**
36
- * The role of the prompt message
37
- */
38
- export const ListDatasetDatapointsRole = {
39
- System: "system",
40
- Assistant: "assistant",
41
- User: "user",
42
- Exception: "exception",
43
- Tool: "tool",
44
- Prompt: "prompt",
45
- Correction: "correction",
46
- ExpectedOutput: "expected_output",
47
- } as const;
48
- /**
49
- * The role of the prompt message
50
- */
51
- export type ListDatasetDatapointsRole = ClosedEnum<
52
- typeof ListDatasetDatapointsRole
53
- >;
54
-
55
- export const ListDatasetDatapoints2DatasetsType = {
56
- ImageUrl: "image_url",
57
- } as const;
58
- export type ListDatasetDatapoints2DatasetsType = ClosedEnum<
59
- typeof ListDatasetDatapoints2DatasetsType
60
- >;
61
-
62
- export type ListDatasetDatapoints2ImageUrl = {
63
- /**
64
- * The orq.ai id of the image
65
- */
66
- id?: string | undefined;
67
- /**
68
- * Either a URL of the image or the base64 encoded data URI.
69
- */
70
- url: string;
71
- /**
72
- * Specifies the detail level of the image. Currently only supported with OpenAI models
73
- */
74
- detail?: string | undefined;
75
- };
76
-
77
- /**
78
- * The image part of the prompt message. Only supported with vision models.
79
- */
80
- export type ListDatasetDatapoints22 = {
81
- type: ListDatasetDatapoints2DatasetsType;
82
- imageUrl: ListDatasetDatapoints2ImageUrl;
83
- };
84
-
85
- export const ListDatasetDatapoints2Type = {
86
- Text: "text",
87
- } as const;
88
- export type ListDatasetDatapoints2Type = ClosedEnum<
89
- typeof ListDatasetDatapoints2Type
90
- >;
91
-
92
- /**
93
- * Text content part of a prompt message
94
- */
95
- export type ListDatasetDatapoints21 = {
96
- type: ListDatasetDatapoints2Type;
97
- text: string;
98
- };
99
-
100
- export type ListDatasetDatapointsContent2 =
101
- | ListDatasetDatapoints21
102
- | ListDatasetDatapoints22;
103
-
104
- /**
105
- * 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.
106
- */
107
- export type ListDatasetDatapointsContent =
108
- | string
109
- | Array<ListDatasetDatapoints21 | ListDatasetDatapoints22>;
110
-
111
- export const ListDatasetDatapointsType = {
112
- Function: "function",
113
- } as const;
114
- export type ListDatasetDatapointsType = ClosedEnum<
115
- typeof ListDatasetDatapointsType
116
- >;
117
-
118
- export type ListDatasetDatapointsFunction = {
119
- name: string;
120
- /**
121
- * JSON string arguments for the functions
122
- */
123
- arguments: string;
124
- };
125
-
126
- export type ListDatasetDatapointsToolCalls = {
127
- id?: string | undefined;
128
- index?: number | undefined;
129
- type: ListDatasetDatapointsType;
130
- function: ListDatasetDatapointsFunction;
131
- };
132
-
133
- export type ListDatasetDatapointsMessages = {
134
- /**
135
- * The role of the prompt message
136
- */
137
- role: ListDatasetDatapointsRole;
138
- /**
139
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
140
- */
141
- content: string | Array<ListDatasetDatapoints21 | ListDatasetDatapoints22>;
142
- toolCalls?: Array<ListDatasetDatapointsToolCalls> | undefined;
143
- };
144
-
145
- export type ListDatasetDatapointsData = {
146
- /**
147
- * The unique identifier of the dataset item
148
- */
149
- id: string;
150
- /**
151
- * The unique identifier of the workspace it belongs to
152
- */
153
- workspaceId: string;
154
- /**
155
- * 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.
156
- */
157
- inputs?: { [k: string]: any } | undefined;
158
- /**
159
- * The prompt template messages
160
- */
161
- messages?: Array<ListDatasetDatapointsMessages> | undefined;
162
- expectedOutput?: string | undefined;
163
- /**
164
- * The unique identifier of the dataset
165
- */
166
- datasetId: string;
167
- /**
168
- * The unique identifier of the user who created the dataset
169
- */
170
- createdById?: string | undefined;
171
- /**
172
- * The unique identifier of the user who last updated the dataset
173
- */
174
- updatedById?: string | undefined;
175
- /**
176
- * The date and time the resource was created
177
- */
178
- created?: Date | undefined;
179
- /**
180
- * The date and time the resource was last updated
181
- */
182
- updated?: Date | undefined;
183
- };
184
-
185
- /**
186
- * Datapoints retrieved successfully. Returns a paginated list of datapoints.
187
- */
188
- export type ListDatasetDatapointsResponseBody = {
189
- object: ListDatasetDatapointsObject;
190
- data: Array<ListDatasetDatapointsData>;
191
- hasMore: boolean;
192
- };
193
-
194
- /** @internal */
195
- export const ListDatasetDatapointsRequest$inboundSchema: z.ZodType<
196
- ListDatasetDatapointsRequest,
197
- z.ZodTypeDef,
198
- unknown
199
- > = z.object({
200
- dataset_id: z.string(),
201
- limit: z.number().default(10),
202
- starting_after: z.string().optional(),
203
- ending_before: z.string().optional(),
204
- }).transform((v) => {
205
- return remap$(v, {
206
- "dataset_id": "datasetId",
207
- "starting_after": "startingAfter",
208
- "ending_before": "endingBefore",
209
- });
210
- });
211
-
212
- /** @internal */
213
- export type ListDatasetDatapointsRequest$Outbound = {
214
- dataset_id: string;
215
- limit: number;
216
- starting_after?: string | undefined;
217
- ending_before?: string | undefined;
218
- };
219
-
220
- /** @internal */
221
- export const ListDatasetDatapointsRequest$outboundSchema: z.ZodType<
222
- ListDatasetDatapointsRequest$Outbound,
223
- z.ZodTypeDef,
224
- ListDatasetDatapointsRequest
225
- > = z.object({
226
- datasetId: z.string(),
227
- limit: z.number().default(10),
228
- startingAfter: z.string().optional(),
229
- endingBefore: z.string().optional(),
230
- }).transform((v) => {
231
- return remap$(v, {
232
- datasetId: "dataset_id",
233
- startingAfter: "starting_after",
234
- endingBefore: "ending_before",
235
- });
236
- });
237
-
238
- /**
239
- * @internal
240
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
241
- */
242
- export namespace ListDatasetDatapointsRequest$ {
243
- /** @deprecated use `ListDatasetDatapointsRequest$inboundSchema` instead. */
244
- export const inboundSchema = ListDatasetDatapointsRequest$inboundSchema;
245
- /** @deprecated use `ListDatasetDatapointsRequest$outboundSchema` instead. */
246
- export const outboundSchema = ListDatasetDatapointsRequest$outboundSchema;
247
- /** @deprecated use `ListDatasetDatapointsRequest$Outbound` instead. */
248
- export type Outbound = ListDatasetDatapointsRequest$Outbound;
249
- }
250
-
251
- export function listDatasetDatapointsRequestToJSON(
252
- listDatasetDatapointsRequest: ListDatasetDatapointsRequest,
253
- ): string {
254
- return JSON.stringify(
255
- ListDatasetDatapointsRequest$outboundSchema.parse(
256
- listDatasetDatapointsRequest,
257
- ),
258
- );
259
- }
260
-
261
- export function listDatasetDatapointsRequestFromJSON(
262
- jsonString: string,
263
- ): SafeParseResult<ListDatasetDatapointsRequest, SDKValidationError> {
264
- return safeParse(
265
- jsonString,
266
- (x) => ListDatasetDatapointsRequest$inboundSchema.parse(JSON.parse(x)),
267
- `Failed to parse 'ListDatasetDatapointsRequest' from JSON`,
268
- );
269
- }
270
-
271
- /** @internal */
272
- export const ListDatasetDatapointsObject$inboundSchema: z.ZodNativeEnum<
273
- typeof ListDatasetDatapointsObject
274
- > = z.nativeEnum(ListDatasetDatapointsObject);
275
-
276
- /** @internal */
277
- export const ListDatasetDatapointsObject$outboundSchema: z.ZodNativeEnum<
278
- typeof ListDatasetDatapointsObject
279
- > = ListDatasetDatapointsObject$inboundSchema;
280
-
281
- /**
282
- * @internal
283
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
284
- */
285
- export namespace ListDatasetDatapointsObject$ {
286
- /** @deprecated use `ListDatasetDatapointsObject$inboundSchema` instead. */
287
- export const inboundSchema = ListDatasetDatapointsObject$inboundSchema;
288
- /** @deprecated use `ListDatasetDatapointsObject$outboundSchema` instead. */
289
- export const outboundSchema = ListDatasetDatapointsObject$outboundSchema;
290
- }
291
-
292
- /** @internal */
293
- export const ListDatasetDatapointsRole$inboundSchema: z.ZodNativeEnum<
294
- typeof ListDatasetDatapointsRole
295
- > = z.nativeEnum(ListDatasetDatapointsRole);
296
-
297
- /** @internal */
298
- export const ListDatasetDatapointsRole$outboundSchema: z.ZodNativeEnum<
299
- typeof ListDatasetDatapointsRole
300
- > = ListDatasetDatapointsRole$inboundSchema;
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 ListDatasetDatapointsRole$ {
307
- /** @deprecated use `ListDatasetDatapointsRole$inboundSchema` instead. */
308
- export const inboundSchema = ListDatasetDatapointsRole$inboundSchema;
309
- /** @deprecated use `ListDatasetDatapointsRole$outboundSchema` instead. */
310
- export const outboundSchema = ListDatasetDatapointsRole$outboundSchema;
311
- }
312
-
313
- /** @internal */
314
- export const ListDatasetDatapoints2DatasetsType$inboundSchema: z.ZodNativeEnum<
315
- typeof ListDatasetDatapoints2DatasetsType
316
- > = z.nativeEnum(ListDatasetDatapoints2DatasetsType);
317
-
318
- /** @internal */
319
- export const ListDatasetDatapoints2DatasetsType$outboundSchema: z.ZodNativeEnum<
320
- typeof ListDatasetDatapoints2DatasetsType
321
- > = ListDatasetDatapoints2DatasetsType$inboundSchema;
322
-
323
- /**
324
- * @internal
325
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
326
- */
327
- export namespace ListDatasetDatapoints2DatasetsType$ {
328
- /** @deprecated use `ListDatasetDatapoints2DatasetsType$inboundSchema` instead. */
329
- export const inboundSchema = ListDatasetDatapoints2DatasetsType$inboundSchema;
330
- /** @deprecated use `ListDatasetDatapoints2DatasetsType$outboundSchema` instead. */
331
- export const outboundSchema =
332
- ListDatasetDatapoints2DatasetsType$outboundSchema;
333
- }
334
-
335
- /** @internal */
336
- export const ListDatasetDatapoints2ImageUrl$inboundSchema: z.ZodType<
337
- ListDatasetDatapoints2ImageUrl,
338
- z.ZodTypeDef,
339
- unknown
340
- > = z.object({
341
- id: z.string().optional(),
342
- url: z.string(),
343
- detail: z.string().optional(),
344
- });
345
-
346
- /** @internal */
347
- export type ListDatasetDatapoints2ImageUrl$Outbound = {
348
- id?: string | undefined;
349
- url: string;
350
- detail?: string | undefined;
351
- };
352
-
353
- /** @internal */
354
- export const ListDatasetDatapoints2ImageUrl$outboundSchema: z.ZodType<
355
- ListDatasetDatapoints2ImageUrl$Outbound,
356
- z.ZodTypeDef,
357
- ListDatasetDatapoints2ImageUrl
358
- > = z.object({
359
- id: z.string().optional(),
360
- url: z.string(),
361
- detail: z.string().optional(),
362
- });
363
-
364
- /**
365
- * @internal
366
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
367
- */
368
- export namespace ListDatasetDatapoints2ImageUrl$ {
369
- /** @deprecated use `ListDatasetDatapoints2ImageUrl$inboundSchema` instead. */
370
- export const inboundSchema = ListDatasetDatapoints2ImageUrl$inboundSchema;
371
- /** @deprecated use `ListDatasetDatapoints2ImageUrl$outboundSchema` instead. */
372
- export const outboundSchema = ListDatasetDatapoints2ImageUrl$outboundSchema;
373
- /** @deprecated use `ListDatasetDatapoints2ImageUrl$Outbound` instead. */
374
- export type Outbound = ListDatasetDatapoints2ImageUrl$Outbound;
375
- }
376
-
377
- export function listDatasetDatapoints2ImageUrlToJSON(
378
- listDatasetDatapoints2ImageUrl: ListDatasetDatapoints2ImageUrl,
379
- ): string {
380
- return JSON.stringify(
381
- ListDatasetDatapoints2ImageUrl$outboundSchema.parse(
382
- listDatasetDatapoints2ImageUrl,
383
- ),
384
- );
385
- }
386
-
387
- export function listDatasetDatapoints2ImageUrlFromJSON(
388
- jsonString: string,
389
- ): SafeParseResult<ListDatasetDatapoints2ImageUrl, SDKValidationError> {
390
- return safeParse(
391
- jsonString,
392
- (x) => ListDatasetDatapoints2ImageUrl$inboundSchema.parse(JSON.parse(x)),
393
- `Failed to parse 'ListDatasetDatapoints2ImageUrl' from JSON`,
394
- );
395
- }
396
-
397
- /** @internal */
398
- export const ListDatasetDatapoints22$inboundSchema: z.ZodType<
399
- ListDatasetDatapoints22,
400
- z.ZodTypeDef,
401
- unknown
402
- > = z.object({
403
- type: ListDatasetDatapoints2DatasetsType$inboundSchema,
404
- image_url: z.lazy(() => ListDatasetDatapoints2ImageUrl$inboundSchema),
405
- }).transform((v) => {
406
- return remap$(v, {
407
- "image_url": "imageUrl",
408
- });
409
- });
410
-
411
- /** @internal */
412
- export type ListDatasetDatapoints22$Outbound = {
413
- type: string;
414
- image_url: ListDatasetDatapoints2ImageUrl$Outbound;
415
- };
416
-
417
- /** @internal */
418
- export const ListDatasetDatapoints22$outboundSchema: z.ZodType<
419
- ListDatasetDatapoints22$Outbound,
420
- z.ZodTypeDef,
421
- ListDatasetDatapoints22
422
- > = z.object({
423
- type: ListDatasetDatapoints2DatasetsType$outboundSchema,
424
- imageUrl: z.lazy(() => ListDatasetDatapoints2ImageUrl$outboundSchema),
425
- }).transform((v) => {
426
- return remap$(v, {
427
- imageUrl: "image_url",
428
- });
429
- });
430
-
431
- /**
432
- * @internal
433
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
434
- */
435
- export namespace ListDatasetDatapoints22$ {
436
- /** @deprecated use `ListDatasetDatapoints22$inboundSchema` instead. */
437
- export const inboundSchema = ListDatasetDatapoints22$inboundSchema;
438
- /** @deprecated use `ListDatasetDatapoints22$outboundSchema` instead. */
439
- export const outboundSchema = ListDatasetDatapoints22$outboundSchema;
440
- /** @deprecated use `ListDatasetDatapoints22$Outbound` instead. */
441
- export type Outbound = ListDatasetDatapoints22$Outbound;
442
- }
443
-
444
- export function listDatasetDatapoints22ToJSON(
445
- listDatasetDatapoints22: ListDatasetDatapoints22,
446
- ): string {
447
- return JSON.stringify(
448
- ListDatasetDatapoints22$outboundSchema.parse(listDatasetDatapoints22),
449
- );
450
- }
451
-
452
- export function listDatasetDatapoints22FromJSON(
453
- jsonString: string,
454
- ): SafeParseResult<ListDatasetDatapoints22, SDKValidationError> {
455
- return safeParse(
456
- jsonString,
457
- (x) => ListDatasetDatapoints22$inboundSchema.parse(JSON.parse(x)),
458
- `Failed to parse 'ListDatasetDatapoints22' from JSON`,
459
- );
460
- }
461
-
462
- /** @internal */
463
- export const ListDatasetDatapoints2Type$inboundSchema: z.ZodNativeEnum<
464
- typeof ListDatasetDatapoints2Type
465
- > = z.nativeEnum(ListDatasetDatapoints2Type);
466
-
467
- /** @internal */
468
- export const ListDatasetDatapoints2Type$outboundSchema: z.ZodNativeEnum<
469
- typeof ListDatasetDatapoints2Type
470
- > = ListDatasetDatapoints2Type$inboundSchema;
471
-
472
- /**
473
- * @internal
474
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
475
- */
476
- export namespace ListDatasetDatapoints2Type$ {
477
- /** @deprecated use `ListDatasetDatapoints2Type$inboundSchema` instead. */
478
- export const inboundSchema = ListDatasetDatapoints2Type$inboundSchema;
479
- /** @deprecated use `ListDatasetDatapoints2Type$outboundSchema` instead. */
480
- export const outboundSchema = ListDatasetDatapoints2Type$outboundSchema;
481
- }
482
-
483
- /** @internal */
484
- export const ListDatasetDatapoints21$inboundSchema: z.ZodType<
485
- ListDatasetDatapoints21,
486
- z.ZodTypeDef,
487
- unknown
488
- > = z.object({
489
- type: ListDatasetDatapoints2Type$inboundSchema,
490
- text: z.string(),
491
- });
492
-
493
- /** @internal */
494
- export type ListDatasetDatapoints21$Outbound = {
495
- type: string;
496
- text: string;
497
- };
498
-
499
- /** @internal */
500
- export const ListDatasetDatapoints21$outboundSchema: z.ZodType<
501
- ListDatasetDatapoints21$Outbound,
502
- z.ZodTypeDef,
503
- ListDatasetDatapoints21
504
- > = z.object({
505
- type: ListDatasetDatapoints2Type$outboundSchema,
506
- text: z.string(),
507
- });
508
-
509
- /**
510
- * @internal
511
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
512
- */
513
- export namespace ListDatasetDatapoints21$ {
514
- /** @deprecated use `ListDatasetDatapoints21$inboundSchema` instead. */
515
- export const inboundSchema = ListDatasetDatapoints21$inboundSchema;
516
- /** @deprecated use `ListDatasetDatapoints21$outboundSchema` instead. */
517
- export const outboundSchema = ListDatasetDatapoints21$outboundSchema;
518
- /** @deprecated use `ListDatasetDatapoints21$Outbound` instead. */
519
- export type Outbound = ListDatasetDatapoints21$Outbound;
520
- }
521
-
522
- export function listDatasetDatapoints21ToJSON(
523
- listDatasetDatapoints21: ListDatasetDatapoints21,
524
- ): string {
525
- return JSON.stringify(
526
- ListDatasetDatapoints21$outboundSchema.parse(listDatasetDatapoints21),
527
- );
528
- }
529
-
530
- export function listDatasetDatapoints21FromJSON(
531
- jsonString: string,
532
- ): SafeParseResult<ListDatasetDatapoints21, SDKValidationError> {
533
- return safeParse(
534
- jsonString,
535
- (x) => ListDatasetDatapoints21$inboundSchema.parse(JSON.parse(x)),
536
- `Failed to parse 'ListDatasetDatapoints21' from JSON`,
537
- );
538
- }
539
-
540
- /** @internal */
541
- export const ListDatasetDatapointsContent2$inboundSchema: z.ZodType<
542
- ListDatasetDatapointsContent2,
543
- z.ZodTypeDef,
544
- unknown
545
- > = z.union([
546
- z.lazy(() => ListDatasetDatapoints21$inboundSchema),
547
- z.lazy(() => ListDatasetDatapoints22$inboundSchema),
548
- ]);
549
-
550
- /** @internal */
551
- export type ListDatasetDatapointsContent2$Outbound =
552
- | ListDatasetDatapoints21$Outbound
553
- | ListDatasetDatapoints22$Outbound;
554
-
555
- /** @internal */
556
- export const ListDatasetDatapointsContent2$outboundSchema: z.ZodType<
557
- ListDatasetDatapointsContent2$Outbound,
558
- z.ZodTypeDef,
559
- ListDatasetDatapointsContent2
560
- > = z.union([
561
- z.lazy(() => ListDatasetDatapoints21$outboundSchema),
562
- z.lazy(() => ListDatasetDatapoints22$outboundSchema),
563
- ]);
564
-
565
- /**
566
- * @internal
567
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
568
- */
569
- export namespace ListDatasetDatapointsContent2$ {
570
- /** @deprecated use `ListDatasetDatapointsContent2$inboundSchema` instead. */
571
- export const inboundSchema = ListDatasetDatapointsContent2$inboundSchema;
572
- /** @deprecated use `ListDatasetDatapointsContent2$outboundSchema` instead. */
573
- export const outboundSchema = ListDatasetDatapointsContent2$outboundSchema;
574
- /** @deprecated use `ListDatasetDatapointsContent2$Outbound` instead. */
575
- export type Outbound = ListDatasetDatapointsContent2$Outbound;
576
- }
577
-
578
- export function listDatasetDatapointsContent2ToJSON(
579
- listDatasetDatapointsContent2: ListDatasetDatapointsContent2,
580
- ): string {
581
- return JSON.stringify(
582
- ListDatasetDatapointsContent2$outboundSchema.parse(
583
- listDatasetDatapointsContent2,
584
- ),
585
- );
586
- }
587
-
588
- export function listDatasetDatapointsContent2FromJSON(
589
- jsonString: string,
590
- ): SafeParseResult<ListDatasetDatapointsContent2, SDKValidationError> {
591
- return safeParse(
592
- jsonString,
593
- (x) => ListDatasetDatapointsContent2$inboundSchema.parse(JSON.parse(x)),
594
- `Failed to parse 'ListDatasetDatapointsContent2' from JSON`,
595
- );
596
- }
597
-
598
- /** @internal */
599
- export const ListDatasetDatapointsContent$inboundSchema: z.ZodType<
600
- ListDatasetDatapointsContent,
601
- z.ZodTypeDef,
602
- unknown
603
- > = z.union([
604
- z.string(),
605
- z.array(z.union([
606
- z.lazy(() => ListDatasetDatapoints21$inboundSchema),
607
- z.lazy(() => ListDatasetDatapoints22$inboundSchema),
608
- ])),
609
- ]);
610
-
611
- /** @internal */
612
- export type ListDatasetDatapointsContent$Outbound =
613
- | string
614
- | Array<ListDatasetDatapoints21$Outbound | ListDatasetDatapoints22$Outbound>;
615
-
616
- /** @internal */
617
- export const ListDatasetDatapointsContent$outboundSchema: z.ZodType<
618
- ListDatasetDatapointsContent$Outbound,
619
- z.ZodTypeDef,
620
- ListDatasetDatapointsContent
621
- > = z.union([
622
- z.string(),
623
- z.array(z.union([
624
- z.lazy(() => ListDatasetDatapoints21$outboundSchema),
625
- z.lazy(() => ListDatasetDatapoints22$outboundSchema),
626
- ])),
627
- ]);
628
-
629
- /**
630
- * @internal
631
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
632
- */
633
- export namespace ListDatasetDatapointsContent$ {
634
- /** @deprecated use `ListDatasetDatapointsContent$inboundSchema` instead. */
635
- export const inboundSchema = ListDatasetDatapointsContent$inboundSchema;
636
- /** @deprecated use `ListDatasetDatapointsContent$outboundSchema` instead. */
637
- export const outboundSchema = ListDatasetDatapointsContent$outboundSchema;
638
- /** @deprecated use `ListDatasetDatapointsContent$Outbound` instead. */
639
- export type Outbound = ListDatasetDatapointsContent$Outbound;
640
- }
641
-
642
- export function listDatasetDatapointsContentToJSON(
643
- listDatasetDatapointsContent: ListDatasetDatapointsContent,
644
- ): string {
645
- return JSON.stringify(
646
- ListDatasetDatapointsContent$outboundSchema.parse(
647
- listDatasetDatapointsContent,
648
- ),
649
- );
650
- }
651
-
652
- export function listDatasetDatapointsContentFromJSON(
653
- jsonString: string,
654
- ): SafeParseResult<ListDatasetDatapointsContent, SDKValidationError> {
655
- return safeParse(
656
- jsonString,
657
- (x) => ListDatasetDatapointsContent$inboundSchema.parse(JSON.parse(x)),
658
- `Failed to parse 'ListDatasetDatapointsContent' from JSON`,
659
- );
660
- }
661
-
662
- /** @internal */
663
- export const ListDatasetDatapointsType$inboundSchema: z.ZodNativeEnum<
664
- typeof ListDatasetDatapointsType
665
- > = z.nativeEnum(ListDatasetDatapointsType);
666
-
667
- /** @internal */
668
- export const ListDatasetDatapointsType$outboundSchema: z.ZodNativeEnum<
669
- typeof ListDatasetDatapointsType
670
- > = ListDatasetDatapointsType$inboundSchema;
671
-
672
- /**
673
- * @internal
674
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
675
- */
676
- export namespace ListDatasetDatapointsType$ {
677
- /** @deprecated use `ListDatasetDatapointsType$inboundSchema` instead. */
678
- export const inboundSchema = ListDatasetDatapointsType$inboundSchema;
679
- /** @deprecated use `ListDatasetDatapointsType$outboundSchema` instead. */
680
- export const outboundSchema = ListDatasetDatapointsType$outboundSchema;
681
- }
682
-
683
- /** @internal */
684
- export const ListDatasetDatapointsFunction$inboundSchema: z.ZodType<
685
- ListDatasetDatapointsFunction,
686
- z.ZodTypeDef,
687
- unknown
688
- > = z.object({
689
- name: z.string(),
690
- arguments: z.string(),
691
- });
692
-
693
- /** @internal */
694
- export type ListDatasetDatapointsFunction$Outbound = {
695
- name: string;
696
- arguments: string;
697
- };
698
-
699
- /** @internal */
700
- export const ListDatasetDatapointsFunction$outboundSchema: z.ZodType<
701
- ListDatasetDatapointsFunction$Outbound,
702
- z.ZodTypeDef,
703
- ListDatasetDatapointsFunction
704
- > = z.object({
705
- name: z.string(),
706
- arguments: z.string(),
707
- });
708
-
709
- /**
710
- * @internal
711
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
712
- */
713
- export namespace ListDatasetDatapointsFunction$ {
714
- /** @deprecated use `ListDatasetDatapointsFunction$inboundSchema` instead. */
715
- export const inboundSchema = ListDatasetDatapointsFunction$inboundSchema;
716
- /** @deprecated use `ListDatasetDatapointsFunction$outboundSchema` instead. */
717
- export const outboundSchema = ListDatasetDatapointsFunction$outboundSchema;
718
- /** @deprecated use `ListDatasetDatapointsFunction$Outbound` instead. */
719
- export type Outbound = ListDatasetDatapointsFunction$Outbound;
720
- }
721
-
722
- export function listDatasetDatapointsFunctionToJSON(
723
- listDatasetDatapointsFunction: ListDatasetDatapointsFunction,
724
- ): string {
725
- return JSON.stringify(
726
- ListDatasetDatapointsFunction$outboundSchema.parse(
727
- listDatasetDatapointsFunction,
728
- ),
729
- );
730
- }
731
-
732
- export function listDatasetDatapointsFunctionFromJSON(
733
- jsonString: string,
734
- ): SafeParseResult<ListDatasetDatapointsFunction, SDKValidationError> {
735
- return safeParse(
736
- jsonString,
737
- (x) => ListDatasetDatapointsFunction$inboundSchema.parse(JSON.parse(x)),
738
- `Failed to parse 'ListDatasetDatapointsFunction' from JSON`,
739
- );
740
- }
741
-
742
- /** @internal */
743
- export const ListDatasetDatapointsToolCalls$inboundSchema: z.ZodType<
744
- ListDatasetDatapointsToolCalls,
745
- z.ZodTypeDef,
746
- unknown
747
- > = z.object({
748
- id: z.string().optional(),
749
- index: z.number().optional(),
750
- type: ListDatasetDatapointsType$inboundSchema,
751
- function: z.lazy(() => ListDatasetDatapointsFunction$inboundSchema),
752
- });
753
-
754
- /** @internal */
755
- export type ListDatasetDatapointsToolCalls$Outbound = {
756
- id?: string | undefined;
757
- index?: number | undefined;
758
- type: string;
759
- function: ListDatasetDatapointsFunction$Outbound;
760
- };
761
-
762
- /** @internal */
763
- export const ListDatasetDatapointsToolCalls$outboundSchema: z.ZodType<
764
- ListDatasetDatapointsToolCalls$Outbound,
765
- z.ZodTypeDef,
766
- ListDatasetDatapointsToolCalls
767
- > = z.object({
768
- id: z.string().optional(),
769
- index: z.number().optional(),
770
- type: ListDatasetDatapointsType$outboundSchema,
771
- function: z.lazy(() => ListDatasetDatapointsFunction$outboundSchema),
772
- });
773
-
774
- /**
775
- * @internal
776
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
777
- */
778
- export namespace ListDatasetDatapointsToolCalls$ {
779
- /** @deprecated use `ListDatasetDatapointsToolCalls$inboundSchema` instead. */
780
- export const inboundSchema = ListDatasetDatapointsToolCalls$inboundSchema;
781
- /** @deprecated use `ListDatasetDatapointsToolCalls$outboundSchema` instead. */
782
- export const outboundSchema = ListDatasetDatapointsToolCalls$outboundSchema;
783
- /** @deprecated use `ListDatasetDatapointsToolCalls$Outbound` instead. */
784
- export type Outbound = ListDatasetDatapointsToolCalls$Outbound;
785
- }
786
-
787
- export function listDatasetDatapointsToolCallsToJSON(
788
- listDatasetDatapointsToolCalls: ListDatasetDatapointsToolCalls,
789
- ): string {
790
- return JSON.stringify(
791
- ListDatasetDatapointsToolCalls$outboundSchema.parse(
792
- listDatasetDatapointsToolCalls,
793
- ),
794
- );
795
- }
796
-
797
- export function listDatasetDatapointsToolCallsFromJSON(
798
- jsonString: string,
799
- ): SafeParseResult<ListDatasetDatapointsToolCalls, SDKValidationError> {
800
- return safeParse(
801
- jsonString,
802
- (x) => ListDatasetDatapointsToolCalls$inboundSchema.parse(JSON.parse(x)),
803
- `Failed to parse 'ListDatasetDatapointsToolCalls' from JSON`,
804
- );
805
- }
806
-
807
- /** @internal */
808
- export const ListDatasetDatapointsMessages$inboundSchema: z.ZodType<
809
- ListDatasetDatapointsMessages,
810
- z.ZodTypeDef,
811
- unknown
812
- > = z.object({
813
- role: ListDatasetDatapointsRole$inboundSchema,
814
- content: z.union([
815
- z.string(),
816
- z.array(z.union([
817
- z.lazy(() => ListDatasetDatapoints21$inboundSchema),
818
- z.lazy(() => ListDatasetDatapoints22$inboundSchema),
819
- ])),
820
- ]),
821
- tool_calls: z.array(
822
- z.lazy(() => ListDatasetDatapointsToolCalls$inboundSchema),
823
- ).optional(),
824
- }).transform((v) => {
825
- return remap$(v, {
826
- "tool_calls": "toolCalls",
827
- });
828
- });
829
-
830
- /** @internal */
831
- export type ListDatasetDatapointsMessages$Outbound = {
832
- role: string;
833
- content:
834
- | string
835
- | Array<
836
- ListDatasetDatapoints21$Outbound | ListDatasetDatapoints22$Outbound
837
- >;
838
- tool_calls?: Array<ListDatasetDatapointsToolCalls$Outbound> | undefined;
839
- };
840
-
841
- /** @internal */
842
- export const ListDatasetDatapointsMessages$outboundSchema: z.ZodType<
843
- ListDatasetDatapointsMessages$Outbound,
844
- z.ZodTypeDef,
845
- ListDatasetDatapointsMessages
846
- > = z.object({
847
- role: ListDatasetDatapointsRole$outboundSchema,
848
- content: z.union([
849
- z.string(),
850
- z.array(z.union([
851
- z.lazy(() => ListDatasetDatapoints21$outboundSchema),
852
- z.lazy(() => ListDatasetDatapoints22$outboundSchema),
853
- ])),
854
- ]),
855
- toolCalls: z.array(
856
- z.lazy(() => ListDatasetDatapointsToolCalls$outboundSchema),
857
- ).optional(),
858
- }).transform((v) => {
859
- return remap$(v, {
860
- toolCalls: "tool_calls",
861
- });
862
- });
863
-
864
- /**
865
- * @internal
866
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
867
- */
868
- export namespace ListDatasetDatapointsMessages$ {
869
- /** @deprecated use `ListDatasetDatapointsMessages$inboundSchema` instead. */
870
- export const inboundSchema = ListDatasetDatapointsMessages$inboundSchema;
871
- /** @deprecated use `ListDatasetDatapointsMessages$outboundSchema` instead. */
872
- export const outboundSchema = ListDatasetDatapointsMessages$outboundSchema;
873
- /** @deprecated use `ListDatasetDatapointsMessages$Outbound` instead. */
874
- export type Outbound = ListDatasetDatapointsMessages$Outbound;
875
- }
876
-
877
- export function listDatasetDatapointsMessagesToJSON(
878
- listDatasetDatapointsMessages: ListDatasetDatapointsMessages,
879
- ): string {
880
- return JSON.stringify(
881
- ListDatasetDatapointsMessages$outboundSchema.parse(
882
- listDatasetDatapointsMessages,
883
- ),
884
- );
885
- }
886
-
887
- export function listDatasetDatapointsMessagesFromJSON(
888
- jsonString: string,
889
- ): SafeParseResult<ListDatasetDatapointsMessages, SDKValidationError> {
890
- return safeParse(
891
- jsonString,
892
- (x) => ListDatasetDatapointsMessages$inboundSchema.parse(JSON.parse(x)),
893
- `Failed to parse 'ListDatasetDatapointsMessages' from JSON`,
894
- );
895
- }
896
-
897
- /** @internal */
898
- export const ListDatasetDatapointsData$inboundSchema: z.ZodType<
899
- ListDatasetDatapointsData,
900
- z.ZodTypeDef,
901
- unknown
902
- > = z.object({
903
- _id: z.string(),
904
- workspace_id: z.string(),
905
- inputs: z.record(z.any()).optional(),
906
- messages: z.array(z.lazy(() => ListDatasetDatapointsMessages$inboundSchema))
907
- .optional(),
908
- expected_output: z.string().optional(),
909
- dataset_id: z.string(),
910
- created_by_id: z.string().optional(),
911
- updated_by_id: z.string().optional(),
912
- created: z.string().datetime({ offset: true }).transform(v => new Date(v))
913
- .optional(),
914
- updated: z.string().datetime({ offset: true }).default(
915
- "2025-04-03T11:50:53.752Z",
916
- ).transform(v => new Date(v)),
917
- }).transform((v) => {
918
- return remap$(v, {
919
- "_id": "id",
920
- "workspace_id": "workspaceId",
921
- "expected_output": "expectedOutput",
922
- "dataset_id": "datasetId",
923
- "created_by_id": "createdById",
924
- "updated_by_id": "updatedById",
925
- });
926
- });
927
-
928
- /** @internal */
929
- export type ListDatasetDatapointsData$Outbound = {
930
- _id: string;
931
- workspace_id: string;
932
- inputs?: { [k: string]: any } | undefined;
933
- messages?: Array<ListDatasetDatapointsMessages$Outbound> | undefined;
934
- expected_output?: string | undefined;
935
- dataset_id: string;
936
- created_by_id?: string | undefined;
937
- updated_by_id?: string | undefined;
938
- created?: string | undefined;
939
- updated: string;
940
- };
941
-
942
- /** @internal */
943
- export const ListDatasetDatapointsData$outboundSchema: z.ZodType<
944
- ListDatasetDatapointsData$Outbound,
945
- z.ZodTypeDef,
946
- ListDatasetDatapointsData
947
- > = z.object({
948
- id: z.string(),
949
- workspaceId: z.string(),
950
- inputs: z.record(z.any()).optional(),
951
- messages: z.array(z.lazy(() => ListDatasetDatapointsMessages$outboundSchema))
952
- .optional(),
953
- expectedOutput: z.string().optional(),
954
- datasetId: z.string(),
955
- createdById: z.string().optional(),
956
- updatedById: z.string().optional(),
957
- created: z.date().transform(v => v.toISOString()).optional(),
958
- updated: z.date().default(() => new Date("2025-04-03T11:50:53.752Z"))
959
- .transform(v => v.toISOString()),
960
- }).transform((v) => {
961
- return remap$(v, {
962
- id: "_id",
963
- workspaceId: "workspace_id",
964
- expectedOutput: "expected_output",
965
- datasetId: "dataset_id",
966
- createdById: "created_by_id",
967
- updatedById: "updated_by_id",
968
- });
969
- });
970
-
971
- /**
972
- * @internal
973
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
974
- */
975
- export namespace ListDatasetDatapointsData$ {
976
- /** @deprecated use `ListDatasetDatapointsData$inboundSchema` instead. */
977
- export const inboundSchema = ListDatasetDatapointsData$inboundSchema;
978
- /** @deprecated use `ListDatasetDatapointsData$outboundSchema` instead. */
979
- export const outboundSchema = ListDatasetDatapointsData$outboundSchema;
980
- /** @deprecated use `ListDatasetDatapointsData$Outbound` instead. */
981
- export type Outbound = ListDatasetDatapointsData$Outbound;
982
- }
983
-
984
- export function listDatasetDatapointsDataToJSON(
985
- listDatasetDatapointsData: ListDatasetDatapointsData,
986
- ): string {
987
- return JSON.stringify(
988
- ListDatasetDatapointsData$outboundSchema.parse(listDatasetDatapointsData),
989
- );
990
- }
991
-
992
- export function listDatasetDatapointsDataFromJSON(
993
- jsonString: string,
994
- ): SafeParseResult<ListDatasetDatapointsData, SDKValidationError> {
995
- return safeParse(
996
- jsonString,
997
- (x) => ListDatasetDatapointsData$inboundSchema.parse(JSON.parse(x)),
998
- `Failed to parse 'ListDatasetDatapointsData' from JSON`,
999
- );
1000
- }
1001
-
1002
- /** @internal */
1003
- export const ListDatasetDatapointsResponseBody$inboundSchema: z.ZodType<
1004
- ListDatasetDatapointsResponseBody,
1005
- z.ZodTypeDef,
1006
- unknown
1007
- > = z.object({
1008
- object: ListDatasetDatapointsObject$inboundSchema,
1009
- data: z.array(z.lazy(() => ListDatasetDatapointsData$inboundSchema)),
1010
- has_more: z.boolean(),
1011
- }).transform((v) => {
1012
- return remap$(v, {
1013
- "has_more": "hasMore",
1014
- });
1015
- });
1016
-
1017
- /** @internal */
1018
- export type ListDatasetDatapointsResponseBody$Outbound = {
1019
- object: string;
1020
- data: Array<ListDatasetDatapointsData$Outbound>;
1021
- has_more: boolean;
1022
- };
1023
-
1024
- /** @internal */
1025
- export const ListDatasetDatapointsResponseBody$outboundSchema: z.ZodType<
1026
- ListDatasetDatapointsResponseBody$Outbound,
1027
- z.ZodTypeDef,
1028
- ListDatasetDatapointsResponseBody
1029
- > = z.object({
1030
- object: ListDatasetDatapointsObject$outboundSchema,
1031
- data: z.array(z.lazy(() => ListDatasetDatapointsData$outboundSchema)),
1032
- hasMore: z.boolean(),
1033
- }).transform((v) => {
1034
- return remap$(v, {
1035
- hasMore: "has_more",
1036
- });
1037
- });
1038
-
1039
- /**
1040
- * @internal
1041
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1042
- */
1043
- export namespace ListDatasetDatapointsResponseBody$ {
1044
- /** @deprecated use `ListDatasetDatapointsResponseBody$inboundSchema` instead. */
1045
- export const inboundSchema = ListDatasetDatapointsResponseBody$inboundSchema;
1046
- /** @deprecated use `ListDatasetDatapointsResponseBody$outboundSchema` instead. */
1047
- export const outboundSchema =
1048
- ListDatasetDatapointsResponseBody$outboundSchema;
1049
- /** @deprecated use `ListDatasetDatapointsResponseBody$Outbound` instead. */
1050
- export type Outbound = ListDatasetDatapointsResponseBody$Outbound;
1051
- }
1052
-
1053
- export function listDatasetDatapointsResponseBodyToJSON(
1054
- listDatasetDatapointsResponseBody: ListDatasetDatapointsResponseBody,
1055
- ): string {
1056
- return JSON.stringify(
1057
- ListDatasetDatapointsResponseBody$outboundSchema.parse(
1058
- listDatasetDatapointsResponseBody,
1059
- ),
1060
- );
1061
- }
1062
-
1063
- export function listDatasetDatapointsResponseBodyFromJSON(
1064
- jsonString: string,
1065
- ): SafeParseResult<ListDatasetDatapointsResponseBody, SDKValidationError> {
1066
- return safeParse(
1067
- jsonString,
1068
- (x) => ListDatasetDatapointsResponseBody$inboundSchema.parse(JSON.parse(x)),
1069
- `Failed to parse 'ListDatasetDatapointsResponseBody' from JSON`,
1070
- );
1071
- }