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