@orq-ai/node 4.15.8 → 4.15.11

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 (188) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/lib/config.js.map +1 -1
  5. package/models/components/reasoningpart.js +1 -1
  6. package/models/operations/createdataset.js +1 -1
  7. package/models/operations/createdatasetitem.js +5 -5
  8. package/models/operations/createtool.js +4 -4
  9. package/models/operations/getalltools.js +4 -4
  10. package/models/operations/getv2humanevalsets.js +2 -2
  11. package/models/operations/getv2humanevalsetsid.js +2 -2
  12. package/models/operations/listdatasetdatapoints.js +5 -5
  13. package/models/operations/listdatasets.js +1 -1
  14. package/models/operations/patchv2humanevalsetsid.js +2 -2
  15. package/models/operations/postv2feedbackevaluation.js +4 -4
  16. package/models/operations/postv2humanevalsets.js +2 -2
  17. package/models/operations/retrievedatapoint.js +5 -5
  18. package/models/operations/retrievedataset.js +1 -1
  19. package/models/operations/retrievetool.js +4 -4
  20. package/models/operations/runagent.js +1 -1
  21. package/models/operations/streamrunagent.js +1 -1
  22. package/models/operations/updatedatapoint.js +5 -5
  23. package/models/operations/updatedataset.js +1 -1
  24. package/models/operations/updatetool.js +4 -4
  25. package/package.json +6 -6
  26. package/packages/orq-rc/src/funcs/apiKeysCreate.ts +6 -5
  27. package/packages/orq-rc/src/funcs/apiKeysDelete.ts +1 -1
  28. package/packages/orq-rc/src/funcs/apiKeysGet.ts +3 -8
  29. package/packages/orq-rc/src/funcs/apiKeysList.ts +4 -11
  30. package/packages/orq-rc/src/funcs/apiKeysListCapabilities.ts +6 -6
  31. package/packages/orq-rc/src/funcs/apiKeysUpdate.ts +3 -5
  32. package/packages/orq-rc/src/funcs/datasetsClear.ts +3 -12
  33. package/packages/orq-rc/src/funcs/datasetsCreate.ts +10 -15
  34. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +8 -16
  35. package/packages/orq-rc/src/funcs/datasetsCreateDatapoints.ts +175 -0
  36. package/packages/orq-rc/src/funcs/datasetsDelete.ts +2 -2
  37. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +2 -11
  38. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoints.ts +174 -0
  39. package/packages/orq-rc/src/funcs/datasetsList.ts +6 -5
  40. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +6 -14
  41. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +7 -15
  42. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +7 -15
  43. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +10 -16
  44. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +10 -16
  45. package/packages/orq-rc/src/funcs/humanReviewSetsList.ts +4 -7
  46. package/packages/orq-rc/src/funcs/projectsCreate.ts +1 -1
  47. package/packages/orq-rc/src/funcs/projectsDelete.ts +1 -1
  48. package/packages/orq-rc/src/funcs/projectsList.ts +1 -1
  49. package/packages/orq-rc/src/funcs/projectsUpdate.ts +1 -1
  50. package/packages/orq-rc/src/funcs/routerClassifyCreate.ts +1 -1
  51. package/packages/orq-rc/src/lib/config.ts +2 -2
  52. package/packages/orq-rc/src/models/components/apikeyrestresponse.ts +1 -1
  53. package/packages/orq-rc/src/models/components/bulkcreatedatapointsrequest.ts +38 -0
  54. package/packages/orq-rc/src/models/components/classifyanswer.ts +2 -2
  55. package/packages/orq-rc/src/models/components/constraints.ts +32 -0
  56. package/packages/orq-rc/src/models/components/createdatasetrequest.ts +39 -0
  57. package/packages/orq-rc/src/models/components/datapoint1.ts +122 -0
  58. package/packages/orq-rc/src/models/components/datapointinput.ts +73 -0
  59. package/packages/orq-rc/src/models/components/dataset.ts +88 -0
  60. package/packages/orq-rc/src/models/components/datasetmetadata.ts +48 -0
  61. package/packages/orq-rc/src/models/components/datasource.ts +2 -2
  62. package/packages/orq-rc/src/models/components/datasourcesservicecreaterequest.ts +2 -2
  63. package/packages/orq-rc/src/models/components/deletedatapointsrequest.ts +36 -0
  64. package/packages/orq-rc/src/models/components/domain.ts +42 -39
  65. package/packages/orq-rc/src/models/components/extendedmessage.ts +1 -1
  66. package/packages/orq-rc/src/models/components/filesystem.ts +6 -5
  67. package/packages/orq-rc/src/models/components/hubitem.ts +2 -2
  68. package/packages/orq-rc/src/models/components/hubitemsummary.ts +1 -1
  69. package/packages/orq-rc/src/models/components/index.ts +13 -14
  70. package/packages/orq-rc/src/models/components/knowledge.ts +2 -2
  71. package/packages/orq-rc/src/models/components/knowledgechunk.ts +1 -1
  72. package/packages/orq-rc/src/models/components/listdatapointsresponse.ts +41 -0
  73. package/packages/orq-rc/src/models/components/listdatasetsresponse.ts +41 -0
  74. package/packages/orq-rc/src/models/components/mcpauthconfig.ts +1 -1
  75. package/packages/orq-rc/src/models/components/mcpauthconfigoutput.ts +1 -1
  76. package/packages/orq-rc/src/models/components/memory.ts +2 -5
  77. package/packages/orq-rc/src/models/components/owner.ts +35 -0
  78. package/packages/orq-rc/src/models/components/projectscope.ts +11 -23
  79. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  80. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +3 -3
  81. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +3 -3
  82. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +3 -3
  83. package/packages/orq-rc/src/models/components/updatedatapointrequest.ts +67 -0
  84. package/packages/orq-rc/src/models/components/updatedatasetrequest.ts +40 -0
  85. package/packages/orq-rc/src/models/components/wiki.ts +3 -3
  86. package/packages/orq-rc/src/models/operations/apikeycreate.ts +116 -0
  87. package/packages/orq-rc/src/models/operations/apikeydelete.ts +1 -1
  88. package/packages/orq-rc/src/models/operations/apikeyget.ts +1 -11
  89. package/packages/orq-rc/src/models/operations/apikeylist.ts +23 -78
  90. package/packages/orq-rc/src/models/operations/apikeylistcapabilities.ts +39 -0
  91. package/packages/orq-rc/src/models/operations/apikeyupdate.ts +107 -5
  92. package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +44 -0
  93. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -3
  94. package/packages/orq-rc/src/models/operations/createagentrequest.ts +7 -7
  95. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +9 -15
  96. package/packages/orq-rc/src/models/operations/createclassify.ts +2 -2
  97. package/packages/orq-rc/src/models/operations/createcompletion.ts +3 -3
  98. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +13 -3238
  99. package/packages/orq-rc/src/models/operations/createimage.ts +2 -2
  100. package/packages/orq-rc/src/models/operations/createimageedit.ts +2 -2
  101. package/packages/orq-rc/src/models/operations/createimagevariation.ts +2 -2
  102. package/packages/orq-rc/src/models/operations/creatererank.ts +2 -2
  103. package/packages/orq-rc/src/models/operations/createrouterresponse.ts +6 -6
  104. package/packages/orq-rc/src/models/operations/createspeech.ts +2 -2
  105. package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
  106. package/packages/orq-rc/src/models/operations/createtranscription.ts +2 -2
  107. package/packages/orq-rc/src/models/operations/createtranslation.ts +2 -2
  108. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -6
  109. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -3
  110. package/packages/orq-rc/src/models/operations/deletedatasetdatapoints.ts +43 -0
  111. package/packages/orq-rc/src/models/operations/deployments.ts +2 -2
  112. package/packages/orq-rc/src/models/operations/filelist.ts +3 -3
  113. package/packages/orq-rc/src/models/operations/getallmemories.ts +3 -3
  114. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +3 -3
  115. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +3 -3
  116. package/packages/orq-rc/src/models/operations/getallprompts.ts +2 -2
  117. package/packages/orq-rc/src/models/operations/getalltools.ts +6 -6
  118. package/packages/orq-rc/src/models/operations/getevals.ts +2 -2
  119. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +9 -9
  120. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  121. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +2 -2
  122. package/packages/orq-rc/src/models/operations/index.ts +4 -1
  123. package/packages/orq-rc/src/models/operations/listagents.ts +7 -7
  124. package/packages/orq-rc/src/models/operations/listchunks.ts +3 -3
  125. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2117
  126. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -173
  127. package/packages/orq-rc/src/models/operations/listdatasources.ts +3 -3
  128. package/packages/orq-rc/src/models/operations/listidentities.ts +1 -1
  129. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +2 -2
  130. package/packages/orq-rc/src/models/operations/listpromptversions.ts +2 -2
  131. package/packages/orq-rc/src/models/operations/modelcataloglist.ts +2 -2
  132. package/packages/orq-rc/src/models/operations/modelcataloglistofferings.ts +2 -2
  133. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  134. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +4 -4
  135. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  136. package/packages/orq-rc/src/models/operations/projectlist.ts +2 -2
  137. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +5 -5
  138. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -2003
  139. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -114
  140. package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
  141. package/packages/orq-rc/src/models/operations/runagent.ts +3 -3
  142. package/packages/orq-rc/src/models/operations/streamrunagent.ts +3 -3
  143. package/packages/orq-rc/src/models/operations/updateagent.ts +7 -7
  144. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +17 -3275
  145. package/packages/orq-rc/src/models/operations/updatedataset.ts +5 -170
  146. package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
  147. package/packages/orq-rc/src/sdk/apikeys.ts +18 -18
  148. package/packages/orq-rc/src/sdk/classify.ts +1 -1
  149. package/packages/orq-rc/src/sdk/datasets.ts +73 -36
  150. package/packages/orq-rc/src/sdk/humanreviewsets.ts +1 -1
  151. package/packages/orq-rc/src/sdk/projects.ts +4 -4
  152. package/packages/orq-rc/src/sdk/sdk.ts +10 -10
  153. package/src/lib/config.ts +2 -2
  154. package/src/models/components/reasoningpart.ts +1 -1
  155. package/src/models/operations/createdataset.ts +1 -1
  156. package/src/models/operations/createdatasetitem.ts +5 -5
  157. package/src/models/operations/createtool.ts +4 -4
  158. package/src/models/operations/getalltools.ts +4 -4
  159. package/src/models/operations/getv2humanevalsets.ts +2 -2
  160. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  161. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  162. package/src/models/operations/listdatasets.ts +1 -1
  163. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  164. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  165. package/src/models/operations/postv2humanevalsets.ts +2 -2
  166. package/src/models/operations/retrievedatapoint.ts +5 -5
  167. package/src/models/operations/retrievedataset.ts +1 -1
  168. package/src/models/operations/retrievetool.ts +4 -4
  169. package/src/models/operations/runagent.ts +1 -1
  170. package/src/models/operations/streamrunagent.ts +1 -1
  171. package/src/models/operations/updatedatapoint.ts +5 -5
  172. package/src/models/operations/updatedataset.ts +1 -1
  173. package/src/models/operations/updatetool.ts +4 -4
  174. package/packages/orq-rc/src/models/components/allprojects.ts +0 -21
  175. package/packages/orq-rc/src/models/components/apikeyowner.ts +0 -55
  176. package/packages/orq-rc/src/models/components/apikeystatus.ts +0 -18
  177. package/packages/orq-rc/src/models/components/createapikeyrequest.ts +0 -116
  178. package/packages/orq-rc/src/models/components/domaingroup.ts +0 -17
  179. package/packages/orq-rc/src/models/components/listcapabilitiesresponse.ts +0 -38
  180. package/packages/orq-rc/src/models/components/mcpaccess.ts +0 -93
  181. package/packages/orq-rc/src/models/components/ownertype.ts +0 -17
  182. package/packages/orq-rc/src/models/components/permissionmode.ts +0 -19
  183. package/packages/orq-rc/src/models/components/scopemode.ts +0 -16
  184. package/packages/orq-rc/src/models/components/serviceaccountowner.ts +0 -25
  185. package/packages/orq-rc/src/models/components/singleproject.ts +0 -35
  186. package/packages/orq-rc/src/models/components/updateapikeyrequest.ts +0 -110
  187. package/packages/orq-rc/src/models/components/userowner.ts +0 -35
  188. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -162
@@ -4,927 +4,12 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
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 * as components from "../components/index.js";
11
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
7
 
13
8
  export type RetrieveDatapointRequest = {
14
- /**
15
- * The unique identifier of the dataset
16
- */
17
9
  datasetId: string;
18
- /**
19
- * The unique identifier of the datapoint
20
- */
21
10
  datapointId: string;
22
11
  };
23
12
 
24
- export type RetrieveDatapointContentDatasetsResponse2 =
25
- components.TextContentPartSchema;
26
-
27
- /**
28
- * The contents of the tool message.
29
- */
30
- export type RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONContent =
31
- | string
32
- | Array<components.TextContentPartSchema>;
33
-
34
- /**
35
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
36
- */
37
- export const RetrieveDatapointMessagesDatasetsType = {
38
- Ephemeral: "ephemeral",
39
- } as const;
40
- /**
41
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
42
- */
43
- export type RetrieveDatapointMessagesDatasetsType = ClosedEnum<
44
- typeof RetrieveDatapointMessagesDatasetsType
45
- >;
46
-
47
- /**
48
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
49
- *
50
- * @remarks
51
- *
52
- * - `5m`: 5 minutes
53
- * - `1h`: 1 hour
54
- *
55
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
56
- */
57
- export const RetrieveDatapointMessagesTtl = {
58
- Fivem: "5m",
59
- Oneh: "1h",
60
- } as const;
61
- /**
62
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
63
- *
64
- * @remarks
65
- *
66
- * - `5m`: 5 minutes
67
- * - `1h`: 1 hour
68
- *
69
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
70
- */
71
- export type RetrieveDatapointMessagesTtl = ClosedEnum<
72
- typeof RetrieveDatapointMessagesTtl
73
- >;
74
-
75
- export type RetrieveDatapointMessagesCacheControl = {
76
- /**
77
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
78
- */
79
- type: RetrieveDatapointMessagesDatasetsType;
80
- /**
81
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
82
- *
83
- * @remarks
84
- *
85
- * - `5m`: 5 minutes
86
- * - `1h`: 1 hour
87
- *
88
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
89
- */
90
- ttl: RetrieveDatapointMessagesTtl;
91
- };
92
-
93
- export type RetrieveDatapointMessagesToolMessage = {
94
- /**
95
- * The role of the messages author, in this case tool.
96
- */
97
- role: "tool";
98
- /**
99
- * The contents of the tool message.
100
- */
101
- content: string | Array<components.TextContentPartSchema>;
102
- /**
103
- * Tool call that this message is responding to.
104
- */
105
- toolCallId: string | null;
106
- cacheControl?: RetrieveDatapointMessagesCacheControl | undefined;
107
- };
108
-
109
- export type RetrieveDatapointContentDatasets2 =
110
- | (components.TextContentPartSchema & { type: "text" })
111
- | components.RefusalPartSchema
112
- | components.ReasoningPartSchema
113
- | components.RedactedReasoningPartSchema;
114
-
115
- /**
116
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
117
- */
118
- export type RetrieveDatapointMessagesDatasetsResponse200Content =
119
- | string
120
- | Array<
121
- | (components.TextContentPartSchema & { type: "text" })
122
- | components.RefusalPartSchema
123
- | components.ReasoningPartSchema
124
- | components.RedactedReasoningPartSchema
125
- >;
126
-
127
- /**
128
- * Data about a previous audio response from the model.
129
- */
130
- export type RetrieveDatapointMessagesAudio = {
131
- /**
132
- * Unique identifier for a previous audio response from the model.
133
- */
134
- id: string;
135
- };
136
-
137
- /**
138
- * The type of the tool. Currently, only `function` is supported.
139
- */
140
- export const RetrieveDatapointMessagesType = {
141
- Function: "function",
142
- } as const;
143
- /**
144
- * The type of the tool. Currently, only `function` is supported.
145
- */
146
- export type RetrieveDatapointMessagesType = ClosedEnum<
147
- typeof RetrieveDatapointMessagesType
148
- >;
149
-
150
- export type RetrieveDatapointMessagesFunction = {
151
- /**
152
- * The name of the function to call.
153
- */
154
- name?: string | undefined;
155
- /**
156
- * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
157
- */
158
- arguments?: string | undefined;
159
- };
160
-
161
- export type RetrieveDatapointMessagesGoogle = {
162
- /**
163
- * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call. Takes precedence over the top-level `thought_signature` when both are set.
164
- */
165
- thoughtSignature?: string | undefined;
166
- };
167
-
168
- /**
169
- * Provider-specific extra content for the tool call.
170
- */
171
- export type RetrieveDatapointMessagesExtraContent = {
172
- google?: RetrieveDatapointMessagesGoogle | undefined;
173
- };
174
-
175
- export type RetrieveDatapointMessagesToolCalls = {
176
- /**
177
- * The ID of the tool call.
178
- */
179
- id: string;
180
- /**
181
- * The type of the tool. Currently, only `function` is supported.
182
- */
183
- type: RetrieveDatapointMessagesType;
184
- function: RetrieveDatapointMessagesFunction;
185
- /**
186
- * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
187
- */
188
- thoughtSignature?: string | undefined;
189
- /**
190
- * Provider-specific extra content for the tool call.
191
- */
192
- extraContent?: RetrieveDatapointMessagesExtraContent | undefined;
193
- };
194
-
195
- export type RetrieveDatapointMessagesAssistantMessage = {
196
- /**
197
- * Provider reasoning content that must be replayed with assistant tool calls when continuing a reasoning-model conversation.
198
- */
199
- reasoningContent?: string | undefined;
200
- /**
201
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
202
- */
203
- content?:
204
- | string
205
- | Array<
206
- | (components.TextContentPartSchema & { type: "text" })
207
- | components.RefusalPartSchema
208
- | components.ReasoningPartSchema
209
- | components.RedactedReasoningPartSchema
210
- >
211
- | null
212
- | undefined;
213
- /**
214
- * The refusal message by the assistant.
215
- */
216
- refusal?: string | null | undefined;
217
- /**
218
- * The role of the messages author, in this case `assistant`.
219
- */
220
- role: "assistant";
221
- /**
222
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
223
- */
224
- name?: string | undefined;
225
- /**
226
- * Data about a previous audio response from the model.
227
- */
228
- audio?: RetrieveDatapointMessagesAudio | null | undefined;
229
- /**
230
- * The tool calls generated by the model, such as function calls.
231
- */
232
- toolCalls?: Array<RetrieveDatapointMessagesToolCalls> | undefined;
233
- };
234
-
235
- /**
236
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
237
- */
238
- export const RetrieveDatapoint2DatasetsType = {
239
- Ephemeral: "ephemeral",
240
- } as const;
241
- /**
242
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
243
- */
244
- export type RetrieveDatapoint2DatasetsType = ClosedEnum<
245
- typeof RetrieveDatapoint2DatasetsType
246
- >;
247
-
248
- /**
249
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
250
- *
251
- * @remarks
252
- *
253
- * - `5m`: 5 minutes
254
- * - `1h`: 1 hour
255
- *
256
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
257
- */
258
- export const RetrieveDatapoint2Ttl = {
259
- Fivem: "5m",
260
- Oneh: "1h",
261
- } as const;
262
- /**
263
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
264
- *
265
- * @remarks
266
- *
267
- * - `5m`: 5 minutes
268
- * - `1h`: 1 hour
269
- *
270
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
271
- */
272
- export type RetrieveDatapoint2Ttl = ClosedEnum<typeof RetrieveDatapoint2Ttl>;
273
-
274
- export type RetrieveDatapoint2CacheControl = {
275
- /**
276
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
277
- */
278
- type: RetrieveDatapoint2DatasetsType;
279
- /**
280
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
281
- *
282
- * @remarks
283
- *
284
- * - `5m`: 5 minutes
285
- * - `1h`: 1 hour
286
- *
287
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
288
- */
289
- ttl: RetrieveDatapoint2Ttl;
290
- };
291
-
292
- export type RetrieveDatapoint24 = {
293
- /**
294
- * The type of the content part. Always `file`.
295
- */
296
- type: "file";
297
- cacheControl?: RetrieveDatapoint2CacheControl | undefined;
298
- /**
299
- * File data for the content part. Must contain either file_data or uri, but not both.
300
- */
301
- file: components.FileContentPartSchema;
302
- };
303
-
304
- export type RetrieveDatapointContent2 =
305
- | (components.TextContentPartSchema & { type: "text" })
306
- | components.ImageContentPartSchema
307
- | components.AudioContentPartSchema
308
- | RetrieveDatapoint24;
309
-
310
- /**
311
- * The contents of the user message.
312
- */
313
- export type RetrieveDatapointMessagesDatasetsResponseContent =
314
- | string
315
- | Array<
316
- | (components.TextContentPartSchema & { type: "text" })
317
- | components.ImageContentPartSchema
318
- | components.AudioContentPartSchema
319
- | RetrieveDatapoint24
320
- >;
321
-
322
- export type RetrieveDatapointMessagesUserMessage = {
323
- /**
324
- * The role of the messages author, in this case `user`.
325
- */
326
- role: "user";
327
- /**
328
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
329
- */
330
- name?: string | undefined;
331
- /**
332
- * The contents of the user message.
333
- */
334
- content:
335
- | string
336
- | Array<
337
- | (components.TextContentPartSchema & { type: "text" })
338
- | components.ImageContentPartSchema
339
- | components.AudioContentPartSchema
340
- | RetrieveDatapoint24
341
- >;
342
- };
343
-
344
- /**
345
- * The contents of the developer message.
346
- */
347
- export type RetrieveDatapointMessagesDatasetsContent =
348
- | string
349
- | Array<components.TextContentPartSchema>;
350
-
351
- export type RetrieveDatapointMessagesDeveloperMessage = {
352
- /**
353
- * The role of the messages author, in this case `developer`.
354
- */
355
- role: "developer";
356
- /**
357
- * The contents of the developer message.
358
- */
359
- content: string | Array<components.TextContentPartSchema>;
360
- /**
361
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
362
- */
363
- name?: string | undefined;
364
- };
365
-
366
- /**
367
- * The contents of the system message.
368
- */
369
- export type RetrieveDatapointMessagesContent =
370
- | string
371
- | Array<components.TextContentPartSchema>;
372
-
373
- /**
374
- * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
375
- */
376
- export type RetrieveDatapointMessagesSystemMessage = {
377
- /**
378
- * The role of the messages author, in this case `system`.
379
- */
380
- role: "system";
381
- /**
382
- * The contents of the system message.
383
- */
384
- content: string | Array<components.TextContentPartSchema>;
385
- /**
386
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
387
- */
388
- name?: string | undefined;
389
- };
390
-
391
- export type RetrieveDatapointMessages =
392
- | RetrieveDatapointMessagesSystemMessage
393
- | RetrieveDatapointMessagesDeveloperMessage
394
- | RetrieveDatapointMessagesUserMessage
395
- | RetrieveDatapointMessagesAssistantMessage
396
- | RetrieveDatapointMessagesToolMessage;
397
-
398
- /**
399
- * The type of evaluation
400
- */
401
- export const RetrieveDatapointEvaluationsDatasetsResponse200EvaluationType = {
402
- HumanReview: "human_review",
403
- } as const;
404
- /**
405
- * The type of evaluation
406
- */
407
- export type RetrieveDatapointEvaluationsDatasetsResponse200EvaluationType =
408
- ClosedEnum<
409
- typeof RetrieveDatapointEvaluationsDatasetsResponse200EvaluationType
410
- >;
411
-
412
- export const RetrieveDatapointEvaluationsDatasetsResponse200Source = {
413
- Orq: "orq",
414
- External: "external",
415
- } as const;
416
- export type RetrieveDatapointEvaluationsDatasetsResponse200Source = ClosedEnum<
417
- typeof RetrieveDatapointEvaluationsDatasetsResponse200Source
418
- >;
419
-
420
- /**
421
- * The kind of annotator that produced the evaluation
422
- */
423
- export const RetrieveDatapointEvaluationsDatasetsResponse200Kind = {
424
- Llm: "llm",
425
- Code: "code",
426
- Human: "human",
427
- Automation: "automation",
428
- } as const;
429
- /**
430
- * The kind of annotator that produced the evaluation
431
- */
432
- export type RetrieveDatapointEvaluationsDatasetsResponse200Kind = ClosedEnum<
433
- typeof RetrieveDatapointEvaluationsDatasetsResponse200Kind
434
- >;
435
-
436
- /**
437
- * The annotator that produced this evaluation. Optional during the dual-write deprecation window.
438
- */
439
- export type RetrieveDatapointEvaluationsDatasetsResponse200Annotator = {
440
- /**
441
- * The kind of annotator that produced the evaluation
442
- */
443
- kind: RetrieveDatapointEvaluationsDatasetsResponse200Kind;
444
- /**
445
- * Who/what produced this annotation. User/contact id for human, evaluator eval span id for llm/code, automation rule id for automation.
446
- */
447
- actorId: string;
448
- };
449
-
450
- /**
451
- * The expected shape of the value. Derived from the human review type, or inherited from the parent annotation for corrections.
452
- */
453
- export const RetrieveDatapointEvaluationsDatasetsResponse200OutputSchema = {
454
- Boolean: "boolean",
455
- Number: "number",
456
- Categorical: "categorical",
457
- String: "string",
458
- } as const;
459
- /**
460
- * The expected shape of the value. Derived from the human review type, or inherited from the parent annotation for corrections.
461
- */
462
- export type RetrieveDatapointEvaluationsDatasetsResponse200OutputSchema =
463
- ClosedEnum<
464
- typeof RetrieveDatapointEvaluationsDatasetsResponse200OutputSchema
465
- >;
466
-
467
- export type RetrieveDatapointEvaluations4 = {
468
- /**
469
- * The unique identifier of the human evaluation
470
- */
471
- id: string;
472
- /**
473
- * The type of evaluation
474
- */
475
- evaluationType: RetrieveDatapointEvaluationsDatasetsResponse200EvaluationType;
476
- /**
477
- * The unique identifier of the human review. Omitted on corrections, which inherit the parent evaluator output schema.
478
- */
479
- humanReviewId?: string | undefined;
480
- source: RetrieveDatapointEvaluationsDatasetsResponse200Source;
481
- /**
482
- * The annotator that produced this evaluation. Optional during the dual-write deprecation window.
483
- */
484
- annotator?:
485
- | RetrieveDatapointEvaluationsDatasetsResponse200Annotator
486
- | undefined;
487
- /**
488
- * The expected shape of the value. Derived from the human review type, or inherited from the parent annotation for corrections.
489
- */
490
- outputSchema?:
491
- | RetrieveDatapointEvaluationsDatasetsResponse200OutputSchema
492
- | undefined;
493
- /**
494
- * When present, references the id of the annotation this entry corrects. Presence of this field marks the entry as a correction.
495
- */
496
- parentAnnotationId?: string | undefined;
497
- /**
498
- * Optional free-text explanation of the value
499
- */
500
- explanation?: string | undefined;
501
- /**
502
- * Deprecated: use annotator.actor_id. The unique identifier of the user who reviewed the item.
503
- *
504
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
505
- */
506
- reviewedById: string;
507
- /**
508
- * Deprecated. The date and time the item was reviewed
509
- *
510
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
511
- */
512
- reviewedAt: Date;
513
- type: "string_array";
514
- values: Array<string>;
515
- };
516
-
517
- /**
518
- * The type of evaluation
519
- */
520
- export const RetrieveDatapointEvaluationsDatasetsResponseEvaluationType = {
521
- HumanReview: "human_review",
522
- } as const;
523
- /**
524
- * The type of evaluation
525
- */
526
- export type RetrieveDatapointEvaluationsDatasetsResponseEvaluationType =
527
- ClosedEnum<typeof RetrieveDatapointEvaluationsDatasetsResponseEvaluationType>;
528
-
529
- export const RetrieveDatapointEvaluationsDatasetsResponseSource = {
530
- Orq: "orq",
531
- External: "external",
532
- } as const;
533
- export type RetrieveDatapointEvaluationsDatasetsResponseSource = ClosedEnum<
534
- typeof RetrieveDatapointEvaluationsDatasetsResponseSource
535
- >;
536
-
537
- /**
538
- * The kind of annotator that produced the evaluation
539
- */
540
- export const RetrieveDatapointEvaluationsDatasetsResponseKind = {
541
- Llm: "llm",
542
- Code: "code",
543
- Human: "human",
544
- Automation: "automation",
545
- } as const;
546
- /**
547
- * The kind of annotator that produced the evaluation
548
- */
549
- export type RetrieveDatapointEvaluationsDatasetsResponseKind = ClosedEnum<
550
- typeof RetrieveDatapointEvaluationsDatasetsResponseKind
551
- >;
552
-
553
- /**
554
- * The annotator that produced this evaluation. Optional during the dual-write deprecation window.
555
- */
556
- export type RetrieveDatapointEvaluationsDatasetsResponseAnnotator = {
557
- /**
558
- * The kind of annotator that produced the evaluation
559
- */
560
- kind: RetrieveDatapointEvaluationsDatasetsResponseKind;
561
- /**
562
- * Who/what produced this annotation. User/contact id for human, evaluator eval span id for llm/code, automation rule id for automation.
563
- */
564
- actorId: string;
565
- };
566
-
567
- /**
568
- * The expected shape of the value. Derived from the human review type, or inherited from the parent annotation for corrections.
569
- */
570
- export const RetrieveDatapointEvaluationsDatasetsResponseOutputSchema = {
571
- Boolean: "boolean",
572
- Number: "number",
573
- Categorical: "categorical",
574
- String: "string",
575
- } as const;
576
- /**
577
- * The expected shape of the value. Derived from the human review type, or inherited from the parent annotation for corrections.
578
- */
579
- export type RetrieveDatapointEvaluationsDatasetsResponseOutputSchema =
580
- ClosedEnum<typeof RetrieveDatapointEvaluationsDatasetsResponseOutputSchema>;
581
-
582
- export type Evaluations3 = {
583
- /**
584
- * The unique identifier of the human evaluation
585
- */
586
- id: string;
587
- /**
588
- * The type of evaluation
589
- */
590
- evaluationType: RetrieveDatapointEvaluationsDatasetsResponseEvaluationType;
591
- /**
592
- * The unique identifier of the human review. Omitted on corrections, which inherit the parent evaluator output schema.
593
- */
594
- humanReviewId?: string | undefined;
595
- source: RetrieveDatapointEvaluationsDatasetsResponseSource;
596
- /**
597
- * The annotator that produced this evaluation. Optional during the dual-write deprecation window.
598
- */
599
- annotator?: RetrieveDatapointEvaluationsDatasetsResponseAnnotator | undefined;
600
- /**
601
- * The expected shape of the value. Derived from the human review type, or inherited from the parent annotation for corrections.
602
- */
603
- outputSchema?:
604
- | RetrieveDatapointEvaluationsDatasetsResponseOutputSchema
605
- | undefined;
606
- /**
607
- * When present, references the id of the annotation this entry corrects. Presence of this field marks the entry as a correction.
608
- */
609
- parentAnnotationId?: string | undefined;
610
- /**
611
- * Optional free-text explanation of the value
612
- */
613
- explanation?: string | undefined;
614
- /**
615
- * Deprecated: use annotator.actor_id. The unique identifier of the user who reviewed the item.
616
- *
617
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
618
- */
619
- reviewedById: string;
620
- /**
621
- * Deprecated. The date and time the item was reviewed
622
- *
623
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
624
- */
625
- reviewedAt: Date;
626
- type: "boolean";
627
- value: boolean;
628
- };
629
-
630
- /**
631
- * The type of evaluation
632
- */
633
- export const RetrieveDatapointEvaluationsDatasetsEvaluationType = {
634
- HumanReview: "human_review",
635
- } as const;
636
- /**
637
- * The type of evaluation
638
- */
639
- export type RetrieveDatapointEvaluationsDatasetsEvaluationType = ClosedEnum<
640
- typeof RetrieveDatapointEvaluationsDatasetsEvaluationType
641
- >;
642
-
643
- export const RetrieveDatapointEvaluationsDatasetsSource = {
644
- Orq: "orq",
645
- External: "external",
646
- } as const;
647
- export type RetrieveDatapointEvaluationsDatasetsSource = ClosedEnum<
648
- typeof RetrieveDatapointEvaluationsDatasetsSource
649
- >;
650
-
651
- /**
652
- * The kind of annotator that produced the evaluation
653
- */
654
- export const RetrieveDatapointEvaluationsDatasetsKind = {
655
- Llm: "llm",
656
- Code: "code",
657
- Human: "human",
658
- Automation: "automation",
659
- } as const;
660
- /**
661
- * The kind of annotator that produced the evaluation
662
- */
663
- export type RetrieveDatapointEvaluationsDatasetsKind = ClosedEnum<
664
- typeof RetrieveDatapointEvaluationsDatasetsKind
665
- >;
666
-
667
- /**
668
- * The annotator that produced this evaluation. Optional during the dual-write deprecation window.
669
- */
670
- export type RetrieveDatapointEvaluationsDatasetsAnnotator = {
671
- /**
672
- * The kind of annotator that produced the evaluation
673
- */
674
- kind: RetrieveDatapointEvaluationsDatasetsKind;
675
- /**
676
- * Who/what produced this annotation. User/contact id for human, evaluator eval span id for llm/code, automation rule id for automation.
677
- */
678
- actorId: string;
679
- };
680
-
681
- /**
682
- * The expected shape of the value. Derived from the human review type, or inherited from the parent annotation for corrections.
683
- */
684
- export const RetrieveDatapointEvaluationsDatasetsOutputSchema = {
685
- Boolean: "boolean",
686
- Number: "number",
687
- Categorical: "categorical",
688
- String: "string",
689
- } as const;
690
- /**
691
- * The expected shape of the value. Derived from the human review type, or inherited from the parent annotation for corrections.
692
- */
693
- export type RetrieveDatapointEvaluationsDatasetsOutputSchema = ClosedEnum<
694
- typeof RetrieveDatapointEvaluationsDatasetsOutputSchema
695
- >;
696
-
697
- export type RetrieveDatapointEvaluations2 = {
698
- /**
699
- * The unique identifier of the human evaluation
700
- */
701
- id: string;
702
- /**
703
- * The type of evaluation
704
- */
705
- evaluationType: RetrieveDatapointEvaluationsDatasetsEvaluationType;
706
- /**
707
- * The unique identifier of the human review. Omitted on corrections, which inherit the parent evaluator output schema.
708
- */
709
- humanReviewId?: string | undefined;
710
- source: RetrieveDatapointEvaluationsDatasetsSource;
711
- /**
712
- * The annotator that produced this evaluation. Optional during the dual-write deprecation window.
713
- */
714
- annotator?: RetrieveDatapointEvaluationsDatasetsAnnotator | undefined;
715
- /**
716
- * The expected shape of the value. Derived from the human review type, or inherited from the parent annotation for corrections.
717
- */
718
- outputSchema?: RetrieveDatapointEvaluationsDatasetsOutputSchema | undefined;
719
- /**
720
- * When present, references the id of the annotation this entry corrects. Presence of this field marks the entry as a correction.
721
- */
722
- parentAnnotationId?: string | undefined;
723
- /**
724
- * Optional free-text explanation of the value
725
- */
726
- explanation?: string | undefined;
727
- /**
728
- * Deprecated: use annotator.actor_id. The unique identifier of the user who reviewed the item.
729
- *
730
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
731
- */
732
- reviewedById: string;
733
- /**
734
- * Deprecated. The date and time the item was reviewed
735
- *
736
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
737
- */
738
- reviewedAt: Date;
739
- type: "number";
740
- value: number;
741
- };
742
-
743
- /**
744
- * The type of evaluation
745
- */
746
- export const RetrieveDatapointEvaluationsEvaluationType = {
747
- HumanReview: "human_review",
748
- } as const;
749
- /**
750
- * The type of evaluation
751
- */
752
- export type RetrieveDatapointEvaluationsEvaluationType = ClosedEnum<
753
- typeof RetrieveDatapointEvaluationsEvaluationType
754
- >;
755
-
756
- export const RetrieveDatapointEvaluationsSource = {
757
- Orq: "orq",
758
- External: "external",
759
- } as const;
760
- export type RetrieveDatapointEvaluationsSource = ClosedEnum<
761
- typeof RetrieveDatapointEvaluationsSource
762
- >;
763
-
764
- /**
765
- * The kind of annotator that produced the evaluation
766
- */
767
- export const RetrieveDatapointEvaluationsKind = {
768
- Llm: "llm",
769
- Code: "code",
770
- Human: "human",
771
- Automation: "automation",
772
- } as const;
773
- /**
774
- * The kind of annotator that produced the evaluation
775
- */
776
- export type RetrieveDatapointEvaluationsKind = ClosedEnum<
777
- typeof RetrieveDatapointEvaluationsKind
778
- >;
779
-
780
- /**
781
- * The annotator that produced this evaluation. Optional during the dual-write deprecation window.
782
- */
783
- export type RetrieveDatapointEvaluationsAnnotator = {
784
- /**
785
- * The kind of annotator that produced the evaluation
786
- */
787
- kind: RetrieveDatapointEvaluationsKind;
788
- /**
789
- * Who/what produced this annotation. User/contact id for human, evaluator eval span id for llm/code, automation rule id for automation.
790
- */
791
- actorId: string;
792
- };
793
-
794
- /**
795
- * The expected shape of the value. Derived from the human review type, or inherited from the parent annotation for corrections.
796
- */
797
- export const RetrieveDatapointEvaluationsOutputSchema = {
798
- Boolean: "boolean",
799
- Number: "number",
800
- Categorical: "categorical",
801
- String: "string",
802
- } as const;
803
- /**
804
- * The expected shape of the value. Derived from the human review type, or inherited from the parent annotation for corrections.
805
- */
806
- export type RetrieveDatapointEvaluationsOutputSchema = ClosedEnum<
807
- typeof RetrieveDatapointEvaluationsOutputSchema
808
- >;
809
-
810
- export type RetrieveDatapointEvaluations1 = {
811
- /**
812
- * The unique identifier of the human evaluation
813
- */
814
- id: string;
815
- /**
816
- * The type of evaluation
817
- */
818
- evaluationType: RetrieveDatapointEvaluationsEvaluationType;
819
- /**
820
- * The unique identifier of the human review. Omitted on corrections, which inherit the parent evaluator output schema.
821
- */
822
- humanReviewId?: string | undefined;
823
- source: RetrieveDatapointEvaluationsSource;
824
- /**
825
- * The annotator that produced this evaluation. Optional during the dual-write deprecation window.
826
- */
827
- annotator?: RetrieveDatapointEvaluationsAnnotator | undefined;
828
- /**
829
- * The expected shape of the value. Derived from the human review type, or inherited from the parent annotation for corrections.
830
- */
831
- outputSchema?: RetrieveDatapointEvaluationsOutputSchema | undefined;
832
- /**
833
- * When present, references the id of the annotation this entry corrects. Presence of this field marks the entry as a correction.
834
- */
835
- parentAnnotationId?: string | undefined;
836
- /**
837
- * Optional free-text explanation of the value
838
- */
839
- explanation?: string | undefined;
840
- /**
841
- * Deprecated: use annotator.actor_id. The unique identifier of the user who reviewed the item.
842
- *
843
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
844
- */
845
- reviewedById: string;
846
- /**
847
- * Deprecated. The date and time the item was reviewed
848
- *
849
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
850
- */
851
- reviewedAt: Date;
852
- type: "string";
853
- value: string;
854
- };
855
-
856
- export type RetrieveDatapointEvaluations =
857
- | RetrieveDatapointEvaluations1
858
- | RetrieveDatapointEvaluations2
859
- | Evaluations3
860
- | RetrieveDatapointEvaluations4;
861
-
862
- /**
863
- * Datapoint retrieved.
864
- */
865
- export type RetrieveDatapointResponseBody = {
866
- /**
867
- * The unique identifier of the dataset item
868
- */
869
- id: string;
870
- /**
871
- * The unique identifier of the workspace it belongs to
872
- */
873
- workspaceId: string;
874
- /**
875
- * 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.
876
- */
877
- inputs?: { [k: string]: any } | undefined;
878
- /**
879
- * A list of messages comprising the conversation so far
880
- */
881
- messages?:
882
- | Array<
883
- | RetrieveDatapointMessagesSystemMessage
884
- | RetrieveDatapointMessagesDeveloperMessage
885
- | RetrieveDatapointMessagesUserMessage
886
- | RetrieveDatapointMessagesAssistantMessage
887
- | RetrieveDatapointMessagesToolMessage
888
- >
889
- | undefined;
890
- expectedOutput?: string | undefined;
891
- /**
892
- * Evaluations associated with the datapoint
893
- */
894
- evaluations?:
895
- | Array<
896
- | RetrieveDatapointEvaluations1
897
- | RetrieveDatapointEvaluations2
898
- | Evaluations3
899
- | RetrieveDatapointEvaluations4
900
- >
901
- | undefined;
902
- /**
903
- * The unique identifier of the dataset
904
- */
905
- datasetId: string;
906
- /**
907
- * The version of the dataset snapshot
908
- */
909
- snapshotVersion?: string | undefined;
910
- /**
911
- * The unique identifier of the user who created the dataset
912
- */
913
- createdById?: string | null | undefined;
914
- /**
915
- * The unique identifier of the user who last updated the dataset
916
- */
917
- updatedById?: string | null | undefined;
918
- /**
919
- * The date and time the resource was created
920
- */
921
- created?: Date | undefined;
922
- /**
923
- * The date and time the resource was last updated
924
- */
925
- updated: Date;
926
- };
927
-
928
13
  /** @internal */
929
14
  export type RetrieveDatapointRequest$Outbound = {
930
15
  dataset_id: string;
@@ -953,1091 +38,3 @@ export function retrieveDatapointRequestToJSON(
953
38
  RetrieveDatapointRequest$outboundSchema.parse(retrieveDatapointRequest),
954
39
  );
955
40
  }
956
-
957
- /** @internal */
958
- export const RetrieveDatapointContentDatasetsResponse2$inboundSchema: z.ZodType<
959
- RetrieveDatapointContentDatasetsResponse2,
960
- z.ZodTypeDef,
961
- unknown
962
- > = components.TextContentPartSchema$inboundSchema;
963
-
964
- export function retrieveDatapointContentDatasetsResponse2FromJSON(
965
- jsonString: string,
966
- ): SafeParseResult<
967
- RetrieveDatapointContentDatasetsResponse2,
968
- SDKValidationError
969
- > {
970
- return safeParse(
971
- jsonString,
972
- (x) =>
973
- RetrieveDatapointContentDatasetsResponse2$inboundSchema.parse(
974
- JSON.parse(x),
975
- ),
976
- `Failed to parse 'RetrieveDatapointContentDatasetsResponse2' from JSON`,
977
- );
978
- }
979
-
980
- /** @internal */
981
- export const RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONContent$inboundSchema:
982
- z.ZodType<
983
- RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONContent,
984
- z.ZodTypeDef,
985
- unknown
986
- > = z.union([
987
- z.string(),
988
- z.array(components.TextContentPartSchema$inboundSchema),
989
- ]);
990
-
991
- export function retrieveDatapointMessagesDatasetsResponse200ApplicationJSONContentFromJSON(
992
- jsonString: string,
993
- ): SafeParseResult<
994
- RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONContent,
995
- SDKValidationError
996
- > {
997
- return safeParse(
998
- jsonString,
999
- (x) =>
1000
- RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONContent$inboundSchema
1001
- .parse(JSON.parse(x)),
1002
- `Failed to parse 'RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONContent' from JSON`,
1003
- );
1004
- }
1005
-
1006
- /** @internal */
1007
- export const RetrieveDatapointMessagesDatasetsType$inboundSchema:
1008
- z.ZodNativeEnum<typeof RetrieveDatapointMessagesDatasetsType> = z.nativeEnum(
1009
- RetrieveDatapointMessagesDatasetsType,
1010
- );
1011
-
1012
- /** @internal */
1013
- export const RetrieveDatapointMessagesTtl$inboundSchema: z.ZodNativeEnum<
1014
- typeof RetrieveDatapointMessagesTtl
1015
- > = z.nativeEnum(RetrieveDatapointMessagesTtl);
1016
-
1017
- /** @internal */
1018
- export const RetrieveDatapointMessagesCacheControl$inboundSchema: z.ZodType<
1019
- RetrieveDatapointMessagesCacheControl,
1020
- z.ZodTypeDef,
1021
- unknown
1022
- > = z.object({
1023
- type: RetrieveDatapointMessagesDatasetsType$inboundSchema,
1024
- ttl: RetrieveDatapointMessagesTtl$inboundSchema.default("5m"),
1025
- });
1026
-
1027
- export function retrieveDatapointMessagesCacheControlFromJSON(
1028
- jsonString: string,
1029
- ): SafeParseResult<RetrieveDatapointMessagesCacheControl, SDKValidationError> {
1030
- return safeParse(
1031
- jsonString,
1032
- (x) =>
1033
- RetrieveDatapointMessagesCacheControl$inboundSchema.parse(JSON.parse(x)),
1034
- `Failed to parse 'RetrieveDatapointMessagesCacheControl' from JSON`,
1035
- );
1036
- }
1037
-
1038
- /** @internal */
1039
- export const RetrieveDatapointMessagesToolMessage$inboundSchema: z.ZodType<
1040
- RetrieveDatapointMessagesToolMessage,
1041
- z.ZodTypeDef,
1042
- unknown
1043
- > = z.object({
1044
- role: z.literal("tool"),
1045
- content: z.union([
1046
- z.string(),
1047
- z.array(components.TextContentPartSchema$inboundSchema),
1048
- ]),
1049
- tool_call_id: z.nullable(z.string()),
1050
- cache_control: z.lazy(() =>
1051
- RetrieveDatapointMessagesCacheControl$inboundSchema
1052
- ).optional(),
1053
- }).transform((v) => {
1054
- return remap$(v, {
1055
- "tool_call_id": "toolCallId",
1056
- "cache_control": "cacheControl",
1057
- });
1058
- });
1059
-
1060
- export function retrieveDatapointMessagesToolMessageFromJSON(
1061
- jsonString: string,
1062
- ): SafeParseResult<RetrieveDatapointMessagesToolMessage, SDKValidationError> {
1063
- return safeParse(
1064
- jsonString,
1065
- (x) =>
1066
- RetrieveDatapointMessagesToolMessage$inboundSchema.parse(JSON.parse(x)),
1067
- `Failed to parse 'RetrieveDatapointMessagesToolMessage' from JSON`,
1068
- );
1069
- }
1070
-
1071
- /** @internal */
1072
- export const RetrieveDatapointContentDatasets2$inboundSchema: z.ZodType<
1073
- RetrieveDatapointContentDatasets2,
1074
- z.ZodTypeDef,
1075
- unknown
1076
- > = z.union([
1077
- components.TextContentPartSchema$inboundSchema.and(
1078
- z.object({ type: z.literal("text") }),
1079
- ),
1080
- components.RefusalPartSchema$inboundSchema,
1081
- components.ReasoningPartSchema$inboundSchema,
1082
- components.RedactedReasoningPartSchema$inboundSchema,
1083
- ]);
1084
-
1085
- export function retrieveDatapointContentDatasets2FromJSON(
1086
- jsonString: string,
1087
- ): SafeParseResult<RetrieveDatapointContentDatasets2, SDKValidationError> {
1088
- return safeParse(
1089
- jsonString,
1090
- (x) => RetrieveDatapointContentDatasets2$inboundSchema.parse(JSON.parse(x)),
1091
- `Failed to parse 'RetrieveDatapointContentDatasets2' from JSON`,
1092
- );
1093
- }
1094
-
1095
- /** @internal */
1096
- export const RetrieveDatapointMessagesDatasetsResponse200Content$inboundSchema:
1097
- z.ZodType<
1098
- RetrieveDatapointMessagesDatasetsResponse200Content,
1099
- z.ZodTypeDef,
1100
- unknown
1101
- > = z.union([
1102
- z.string(),
1103
- z.array(
1104
- z.union([
1105
- components.TextContentPartSchema$inboundSchema.and(
1106
- z.object({ type: z.literal("text") }),
1107
- ),
1108
- components.RefusalPartSchema$inboundSchema,
1109
- components.ReasoningPartSchema$inboundSchema,
1110
- components.RedactedReasoningPartSchema$inboundSchema,
1111
- ]),
1112
- ),
1113
- ]);
1114
-
1115
- export function retrieveDatapointMessagesDatasetsResponse200ContentFromJSON(
1116
- jsonString: string,
1117
- ): SafeParseResult<
1118
- RetrieveDatapointMessagesDatasetsResponse200Content,
1119
- SDKValidationError
1120
- > {
1121
- return safeParse(
1122
- jsonString,
1123
- (x) =>
1124
- RetrieveDatapointMessagesDatasetsResponse200Content$inboundSchema.parse(
1125
- JSON.parse(x),
1126
- ),
1127
- `Failed to parse 'RetrieveDatapointMessagesDatasetsResponse200Content' from JSON`,
1128
- );
1129
- }
1130
-
1131
- /** @internal */
1132
- export const RetrieveDatapointMessagesAudio$inboundSchema: z.ZodType<
1133
- RetrieveDatapointMessagesAudio,
1134
- z.ZodTypeDef,
1135
- unknown
1136
- > = z.object({
1137
- id: z.string(),
1138
- });
1139
-
1140
- export function retrieveDatapointMessagesAudioFromJSON(
1141
- jsonString: string,
1142
- ): SafeParseResult<RetrieveDatapointMessagesAudio, SDKValidationError> {
1143
- return safeParse(
1144
- jsonString,
1145
- (x) => RetrieveDatapointMessagesAudio$inboundSchema.parse(JSON.parse(x)),
1146
- `Failed to parse 'RetrieveDatapointMessagesAudio' from JSON`,
1147
- );
1148
- }
1149
-
1150
- /** @internal */
1151
- export const RetrieveDatapointMessagesType$inboundSchema: z.ZodNativeEnum<
1152
- typeof RetrieveDatapointMessagesType
1153
- > = z.nativeEnum(RetrieveDatapointMessagesType);
1154
-
1155
- /** @internal */
1156
- export const RetrieveDatapointMessagesFunction$inboundSchema: z.ZodType<
1157
- RetrieveDatapointMessagesFunction,
1158
- z.ZodTypeDef,
1159
- unknown
1160
- > = z.object({
1161
- name: z.string().optional(),
1162
- arguments: z.string().optional(),
1163
- });
1164
-
1165
- export function retrieveDatapointMessagesFunctionFromJSON(
1166
- jsonString: string,
1167
- ): SafeParseResult<RetrieveDatapointMessagesFunction, SDKValidationError> {
1168
- return safeParse(
1169
- jsonString,
1170
- (x) => RetrieveDatapointMessagesFunction$inboundSchema.parse(JSON.parse(x)),
1171
- `Failed to parse 'RetrieveDatapointMessagesFunction' from JSON`,
1172
- );
1173
- }
1174
-
1175
- /** @internal */
1176
- export const RetrieveDatapointMessagesGoogle$inboundSchema: z.ZodType<
1177
- RetrieveDatapointMessagesGoogle,
1178
- z.ZodTypeDef,
1179
- unknown
1180
- > = z.object({
1181
- thought_signature: z.string().optional(),
1182
- }).transform((v) => {
1183
- return remap$(v, {
1184
- "thought_signature": "thoughtSignature",
1185
- });
1186
- });
1187
-
1188
- export function retrieveDatapointMessagesGoogleFromJSON(
1189
- jsonString: string,
1190
- ): SafeParseResult<RetrieveDatapointMessagesGoogle, SDKValidationError> {
1191
- return safeParse(
1192
- jsonString,
1193
- (x) => RetrieveDatapointMessagesGoogle$inboundSchema.parse(JSON.parse(x)),
1194
- `Failed to parse 'RetrieveDatapointMessagesGoogle' from JSON`,
1195
- );
1196
- }
1197
-
1198
- /** @internal */
1199
- export const RetrieveDatapointMessagesExtraContent$inboundSchema: z.ZodType<
1200
- RetrieveDatapointMessagesExtraContent,
1201
- z.ZodTypeDef,
1202
- unknown
1203
- > = z.object({
1204
- google: z.lazy(() => RetrieveDatapointMessagesGoogle$inboundSchema)
1205
- .optional(),
1206
- });
1207
-
1208
- export function retrieveDatapointMessagesExtraContentFromJSON(
1209
- jsonString: string,
1210
- ): SafeParseResult<RetrieveDatapointMessagesExtraContent, SDKValidationError> {
1211
- return safeParse(
1212
- jsonString,
1213
- (x) =>
1214
- RetrieveDatapointMessagesExtraContent$inboundSchema.parse(JSON.parse(x)),
1215
- `Failed to parse 'RetrieveDatapointMessagesExtraContent' from JSON`,
1216
- );
1217
- }
1218
-
1219
- /** @internal */
1220
- export const RetrieveDatapointMessagesToolCalls$inboundSchema: z.ZodType<
1221
- RetrieveDatapointMessagesToolCalls,
1222
- z.ZodTypeDef,
1223
- unknown
1224
- > = z.object({
1225
- id: z.string(),
1226
- type: RetrieveDatapointMessagesType$inboundSchema,
1227
- function: z.lazy(() => RetrieveDatapointMessagesFunction$inboundSchema),
1228
- thought_signature: z.string().optional(),
1229
- extra_content: z.lazy(() =>
1230
- RetrieveDatapointMessagesExtraContent$inboundSchema
1231
- ).optional(),
1232
- }).transform((v) => {
1233
- return remap$(v, {
1234
- "thought_signature": "thoughtSignature",
1235
- "extra_content": "extraContent",
1236
- });
1237
- });
1238
-
1239
- export function retrieveDatapointMessagesToolCallsFromJSON(
1240
- jsonString: string,
1241
- ): SafeParseResult<RetrieveDatapointMessagesToolCalls, SDKValidationError> {
1242
- return safeParse(
1243
- jsonString,
1244
- (x) =>
1245
- RetrieveDatapointMessagesToolCalls$inboundSchema.parse(JSON.parse(x)),
1246
- `Failed to parse 'RetrieveDatapointMessagesToolCalls' from JSON`,
1247
- );
1248
- }
1249
-
1250
- /** @internal */
1251
- export const RetrieveDatapointMessagesAssistantMessage$inboundSchema: z.ZodType<
1252
- RetrieveDatapointMessagesAssistantMessage,
1253
- z.ZodTypeDef,
1254
- unknown
1255
- > = z.object({
1256
- reasoning_content: z.string().optional(),
1257
- content: z.nullable(
1258
- z.union([
1259
- z.string(),
1260
- z.array(
1261
- z.union([
1262
- components.TextContentPartSchema$inboundSchema.and(
1263
- z.object({ type: z.literal("text") }),
1264
- ),
1265
- components.RefusalPartSchema$inboundSchema,
1266
- components.ReasoningPartSchema$inboundSchema,
1267
- components.RedactedReasoningPartSchema$inboundSchema,
1268
- ]),
1269
- ),
1270
- ]),
1271
- ).optional(),
1272
- refusal: z.nullable(z.string()).optional(),
1273
- role: z.literal("assistant"),
1274
- name: z.string().optional(),
1275
- audio: z.nullable(z.lazy(() => RetrieveDatapointMessagesAudio$inboundSchema))
1276
- .optional(),
1277
- tool_calls: z.array(
1278
- z.lazy(() => RetrieveDatapointMessagesToolCalls$inboundSchema),
1279
- ).optional(),
1280
- }).transform((v) => {
1281
- return remap$(v, {
1282
- "reasoning_content": "reasoningContent",
1283
- "tool_calls": "toolCalls",
1284
- });
1285
- });
1286
-
1287
- export function retrieveDatapointMessagesAssistantMessageFromJSON(
1288
- jsonString: string,
1289
- ): SafeParseResult<
1290
- RetrieveDatapointMessagesAssistantMessage,
1291
- SDKValidationError
1292
- > {
1293
- return safeParse(
1294
- jsonString,
1295
- (x) =>
1296
- RetrieveDatapointMessagesAssistantMessage$inboundSchema.parse(
1297
- JSON.parse(x),
1298
- ),
1299
- `Failed to parse 'RetrieveDatapointMessagesAssistantMessage' from JSON`,
1300
- );
1301
- }
1302
-
1303
- /** @internal */
1304
- export const RetrieveDatapoint2DatasetsType$inboundSchema: z.ZodNativeEnum<
1305
- typeof RetrieveDatapoint2DatasetsType
1306
- > = z.nativeEnum(RetrieveDatapoint2DatasetsType);
1307
-
1308
- /** @internal */
1309
- export const RetrieveDatapoint2Ttl$inboundSchema: z.ZodNativeEnum<
1310
- typeof RetrieveDatapoint2Ttl
1311
- > = z.nativeEnum(RetrieveDatapoint2Ttl);
1312
-
1313
- /** @internal */
1314
- export const RetrieveDatapoint2CacheControl$inboundSchema: z.ZodType<
1315
- RetrieveDatapoint2CacheControl,
1316
- z.ZodTypeDef,
1317
- unknown
1318
- > = z.object({
1319
- type: RetrieveDatapoint2DatasetsType$inboundSchema,
1320
- ttl: RetrieveDatapoint2Ttl$inboundSchema.default("5m"),
1321
- });
1322
-
1323
- export function retrieveDatapoint2CacheControlFromJSON(
1324
- jsonString: string,
1325
- ): SafeParseResult<RetrieveDatapoint2CacheControl, SDKValidationError> {
1326
- return safeParse(
1327
- jsonString,
1328
- (x) => RetrieveDatapoint2CacheControl$inboundSchema.parse(JSON.parse(x)),
1329
- `Failed to parse 'RetrieveDatapoint2CacheControl' from JSON`,
1330
- );
1331
- }
1332
-
1333
- /** @internal */
1334
- export const RetrieveDatapoint24$inboundSchema: z.ZodType<
1335
- RetrieveDatapoint24,
1336
- z.ZodTypeDef,
1337
- unknown
1338
- > = z.object({
1339
- type: z.literal("file"),
1340
- cache_control: z.lazy(() => RetrieveDatapoint2CacheControl$inboundSchema)
1341
- .optional(),
1342
- file: components.FileContentPartSchema$inboundSchema,
1343
- }).transform((v) => {
1344
- return remap$(v, {
1345
- "cache_control": "cacheControl",
1346
- });
1347
- });
1348
-
1349
- export function retrieveDatapoint24FromJSON(
1350
- jsonString: string,
1351
- ): SafeParseResult<RetrieveDatapoint24, SDKValidationError> {
1352
- return safeParse(
1353
- jsonString,
1354
- (x) => RetrieveDatapoint24$inboundSchema.parse(JSON.parse(x)),
1355
- `Failed to parse 'RetrieveDatapoint24' from JSON`,
1356
- );
1357
- }
1358
-
1359
- /** @internal */
1360
- export const RetrieveDatapointContent2$inboundSchema: z.ZodType<
1361
- RetrieveDatapointContent2,
1362
- z.ZodTypeDef,
1363
- unknown
1364
- > = z.union([
1365
- components.TextContentPartSchema$inboundSchema.and(
1366
- z.object({ type: z.literal("text") }),
1367
- ),
1368
- components.ImageContentPartSchema$inboundSchema,
1369
- components.AudioContentPartSchema$inboundSchema,
1370
- z.lazy(() => RetrieveDatapoint24$inboundSchema),
1371
- ]);
1372
-
1373
- export function retrieveDatapointContent2FromJSON(
1374
- jsonString: string,
1375
- ): SafeParseResult<RetrieveDatapointContent2, SDKValidationError> {
1376
- return safeParse(
1377
- jsonString,
1378
- (x) => RetrieveDatapointContent2$inboundSchema.parse(JSON.parse(x)),
1379
- `Failed to parse 'RetrieveDatapointContent2' from JSON`,
1380
- );
1381
- }
1382
-
1383
- /** @internal */
1384
- export const RetrieveDatapointMessagesDatasetsResponseContent$inboundSchema:
1385
- z.ZodType<
1386
- RetrieveDatapointMessagesDatasetsResponseContent,
1387
- z.ZodTypeDef,
1388
- unknown
1389
- > = z.union([
1390
- z.string(),
1391
- z.array(
1392
- z.union([
1393
- components.TextContentPartSchema$inboundSchema.and(
1394
- z.object({ type: z.literal("text") }),
1395
- ),
1396
- components.ImageContentPartSchema$inboundSchema,
1397
- components.AudioContentPartSchema$inboundSchema,
1398
- z.lazy(() => RetrieveDatapoint24$inboundSchema),
1399
- ]),
1400
- ),
1401
- ]);
1402
-
1403
- export function retrieveDatapointMessagesDatasetsResponseContentFromJSON(
1404
- jsonString: string,
1405
- ): SafeParseResult<
1406
- RetrieveDatapointMessagesDatasetsResponseContent,
1407
- SDKValidationError
1408
- > {
1409
- return safeParse(
1410
- jsonString,
1411
- (x) =>
1412
- RetrieveDatapointMessagesDatasetsResponseContent$inboundSchema.parse(
1413
- JSON.parse(x),
1414
- ),
1415
- `Failed to parse 'RetrieveDatapointMessagesDatasetsResponseContent' from JSON`,
1416
- );
1417
- }
1418
-
1419
- /** @internal */
1420
- export const RetrieveDatapointMessagesUserMessage$inboundSchema: z.ZodType<
1421
- RetrieveDatapointMessagesUserMessage,
1422
- z.ZodTypeDef,
1423
- unknown
1424
- > = z.object({
1425
- role: z.literal("user"),
1426
- name: z.string().optional(),
1427
- content: z.union([
1428
- z.string(),
1429
- z.array(
1430
- z.union([
1431
- components.TextContentPartSchema$inboundSchema.and(
1432
- z.object({ type: z.literal("text") }),
1433
- ),
1434
- components.ImageContentPartSchema$inboundSchema,
1435
- components.AudioContentPartSchema$inboundSchema,
1436
- z.lazy(() => RetrieveDatapoint24$inboundSchema),
1437
- ]),
1438
- ),
1439
- ]),
1440
- });
1441
-
1442
- export function retrieveDatapointMessagesUserMessageFromJSON(
1443
- jsonString: string,
1444
- ): SafeParseResult<RetrieveDatapointMessagesUserMessage, SDKValidationError> {
1445
- return safeParse(
1446
- jsonString,
1447
- (x) =>
1448
- RetrieveDatapointMessagesUserMessage$inboundSchema.parse(JSON.parse(x)),
1449
- `Failed to parse 'RetrieveDatapointMessagesUserMessage' from JSON`,
1450
- );
1451
- }
1452
-
1453
- /** @internal */
1454
- export const RetrieveDatapointMessagesDatasetsContent$inboundSchema: z.ZodType<
1455
- RetrieveDatapointMessagesDatasetsContent,
1456
- z.ZodTypeDef,
1457
- unknown
1458
- > = z.union([
1459
- z.string(),
1460
- z.array(components.TextContentPartSchema$inboundSchema),
1461
- ]);
1462
-
1463
- export function retrieveDatapointMessagesDatasetsContentFromJSON(
1464
- jsonString: string,
1465
- ): SafeParseResult<
1466
- RetrieveDatapointMessagesDatasetsContent,
1467
- SDKValidationError
1468
- > {
1469
- return safeParse(
1470
- jsonString,
1471
- (x) =>
1472
- RetrieveDatapointMessagesDatasetsContent$inboundSchema.parse(
1473
- JSON.parse(x),
1474
- ),
1475
- `Failed to parse 'RetrieveDatapointMessagesDatasetsContent' from JSON`,
1476
- );
1477
- }
1478
-
1479
- /** @internal */
1480
- export const RetrieveDatapointMessagesDeveloperMessage$inboundSchema: z.ZodType<
1481
- RetrieveDatapointMessagesDeveloperMessage,
1482
- z.ZodTypeDef,
1483
- unknown
1484
- > = z.object({
1485
- role: z.literal("developer"),
1486
- content: z.union([
1487
- z.string(),
1488
- z.array(components.TextContentPartSchema$inboundSchema),
1489
- ]),
1490
- name: z.string().optional(),
1491
- });
1492
-
1493
- export function retrieveDatapointMessagesDeveloperMessageFromJSON(
1494
- jsonString: string,
1495
- ): SafeParseResult<
1496
- RetrieveDatapointMessagesDeveloperMessage,
1497
- SDKValidationError
1498
- > {
1499
- return safeParse(
1500
- jsonString,
1501
- (x) =>
1502
- RetrieveDatapointMessagesDeveloperMessage$inboundSchema.parse(
1503
- JSON.parse(x),
1504
- ),
1505
- `Failed to parse 'RetrieveDatapointMessagesDeveloperMessage' from JSON`,
1506
- );
1507
- }
1508
-
1509
- /** @internal */
1510
- export const RetrieveDatapointMessagesContent$inboundSchema: z.ZodType<
1511
- RetrieveDatapointMessagesContent,
1512
- z.ZodTypeDef,
1513
- unknown
1514
- > = z.union([
1515
- z.string(),
1516
- z.array(components.TextContentPartSchema$inboundSchema),
1517
- ]);
1518
-
1519
- export function retrieveDatapointMessagesContentFromJSON(
1520
- jsonString: string,
1521
- ): SafeParseResult<RetrieveDatapointMessagesContent, SDKValidationError> {
1522
- return safeParse(
1523
- jsonString,
1524
- (x) => RetrieveDatapointMessagesContent$inboundSchema.parse(JSON.parse(x)),
1525
- `Failed to parse 'RetrieveDatapointMessagesContent' from JSON`,
1526
- );
1527
- }
1528
-
1529
- /** @internal */
1530
- export const RetrieveDatapointMessagesSystemMessage$inboundSchema: z.ZodType<
1531
- RetrieveDatapointMessagesSystemMessage,
1532
- z.ZodTypeDef,
1533
- unknown
1534
- > = z.object({
1535
- role: z.literal("system"),
1536
- content: z.union([
1537
- z.string(),
1538
- z.array(components.TextContentPartSchema$inboundSchema),
1539
- ]),
1540
- name: z.string().optional(),
1541
- });
1542
-
1543
- export function retrieveDatapointMessagesSystemMessageFromJSON(
1544
- jsonString: string,
1545
- ): SafeParseResult<RetrieveDatapointMessagesSystemMessage, SDKValidationError> {
1546
- return safeParse(
1547
- jsonString,
1548
- (x) =>
1549
- RetrieveDatapointMessagesSystemMessage$inboundSchema.parse(JSON.parse(x)),
1550
- `Failed to parse 'RetrieveDatapointMessagesSystemMessage' from JSON`,
1551
- );
1552
- }
1553
-
1554
- /** @internal */
1555
- export const RetrieveDatapointMessages$inboundSchema: z.ZodType<
1556
- RetrieveDatapointMessages,
1557
- z.ZodTypeDef,
1558
- unknown
1559
- > = z.union([
1560
- z.lazy(() => RetrieveDatapointMessagesSystemMessage$inboundSchema),
1561
- z.lazy(() => RetrieveDatapointMessagesDeveloperMessage$inboundSchema),
1562
- z.lazy(() => RetrieveDatapointMessagesUserMessage$inboundSchema),
1563
- z.lazy(() => RetrieveDatapointMessagesAssistantMessage$inboundSchema),
1564
- z.lazy(() => RetrieveDatapointMessagesToolMessage$inboundSchema),
1565
- ]);
1566
-
1567
- export function retrieveDatapointMessagesFromJSON(
1568
- jsonString: string,
1569
- ): SafeParseResult<RetrieveDatapointMessages, SDKValidationError> {
1570
- return safeParse(
1571
- jsonString,
1572
- (x) => RetrieveDatapointMessages$inboundSchema.parse(JSON.parse(x)),
1573
- `Failed to parse 'RetrieveDatapointMessages' from JSON`,
1574
- );
1575
- }
1576
-
1577
- /** @internal */
1578
- export const RetrieveDatapointEvaluationsDatasetsResponse200EvaluationType$inboundSchema:
1579
- z.ZodNativeEnum<
1580
- typeof RetrieveDatapointEvaluationsDatasetsResponse200EvaluationType
1581
- > = z.nativeEnum(
1582
- RetrieveDatapointEvaluationsDatasetsResponse200EvaluationType,
1583
- );
1584
-
1585
- /** @internal */
1586
- export const RetrieveDatapointEvaluationsDatasetsResponse200Source$inboundSchema:
1587
- z.ZodNativeEnum<
1588
- typeof RetrieveDatapointEvaluationsDatasetsResponse200Source
1589
- > = z.nativeEnum(RetrieveDatapointEvaluationsDatasetsResponse200Source);
1590
-
1591
- /** @internal */
1592
- export const RetrieveDatapointEvaluationsDatasetsResponse200Kind$inboundSchema:
1593
- z.ZodNativeEnum<typeof RetrieveDatapointEvaluationsDatasetsResponse200Kind> =
1594
- z.nativeEnum(RetrieveDatapointEvaluationsDatasetsResponse200Kind);
1595
-
1596
- /** @internal */
1597
- export const RetrieveDatapointEvaluationsDatasetsResponse200Annotator$inboundSchema:
1598
- z.ZodType<
1599
- RetrieveDatapointEvaluationsDatasetsResponse200Annotator,
1600
- z.ZodTypeDef,
1601
- unknown
1602
- > = z.object({
1603
- kind: RetrieveDatapointEvaluationsDatasetsResponse200Kind$inboundSchema,
1604
- actor_id: z.string(),
1605
- }).transform((v) => {
1606
- return remap$(v, {
1607
- "actor_id": "actorId",
1608
- });
1609
- });
1610
-
1611
- export function retrieveDatapointEvaluationsDatasetsResponse200AnnotatorFromJSON(
1612
- jsonString: string,
1613
- ): SafeParseResult<
1614
- RetrieveDatapointEvaluationsDatasetsResponse200Annotator,
1615
- SDKValidationError
1616
- > {
1617
- return safeParse(
1618
- jsonString,
1619
- (x) =>
1620
- RetrieveDatapointEvaluationsDatasetsResponse200Annotator$inboundSchema
1621
- .parse(JSON.parse(x)),
1622
- `Failed to parse 'RetrieveDatapointEvaluationsDatasetsResponse200Annotator' from JSON`,
1623
- );
1624
- }
1625
-
1626
- /** @internal */
1627
- export const RetrieveDatapointEvaluationsDatasetsResponse200OutputSchema$inboundSchema:
1628
- z.ZodNativeEnum<
1629
- typeof RetrieveDatapointEvaluationsDatasetsResponse200OutputSchema
1630
- > = z.nativeEnum(RetrieveDatapointEvaluationsDatasetsResponse200OutputSchema);
1631
-
1632
- /** @internal */
1633
- export const RetrieveDatapointEvaluations4$inboundSchema: z.ZodType<
1634
- RetrieveDatapointEvaluations4,
1635
- z.ZodTypeDef,
1636
- unknown
1637
- > = z.object({
1638
- id: z.string(),
1639
- evaluation_type:
1640
- RetrieveDatapointEvaluationsDatasetsResponse200EvaluationType$inboundSchema,
1641
- human_review_id: z.string().optional(),
1642
- source: RetrieveDatapointEvaluationsDatasetsResponse200Source$inboundSchema
1643
- .default("orq"),
1644
- annotator: z.lazy(() =>
1645
- RetrieveDatapointEvaluationsDatasetsResponse200Annotator$inboundSchema
1646
- ).optional(),
1647
- output_schema:
1648
- RetrieveDatapointEvaluationsDatasetsResponse200OutputSchema$inboundSchema
1649
- .optional(),
1650
- parent_annotation_id: z.string().optional(),
1651
- explanation: z.string().optional(),
1652
- reviewed_by_id: z.string(),
1653
- reviewed_at: z.string().datetime({ offset: true }).default(
1654
- "2026-09-21T07:21:40.019Z",
1655
- ).transform(v => new Date(v)),
1656
- type: z.literal("string_array"),
1657
- values: z.array(z.string()),
1658
- }).transform((v) => {
1659
- return remap$(v, {
1660
- "evaluation_type": "evaluationType",
1661
- "human_review_id": "humanReviewId",
1662
- "output_schema": "outputSchema",
1663
- "parent_annotation_id": "parentAnnotationId",
1664
- "reviewed_by_id": "reviewedById",
1665
- "reviewed_at": "reviewedAt",
1666
- });
1667
- });
1668
-
1669
- export function retrieveDatapointEvaluations4FromJSON(
1670
- jsonString: string,
1671
- ): SafeParseResult<RetrieveDatapointEvaluations4, SDKValidationError> {
1672
- return safeParse(
1673
- jsonString,
1674
- (x) => RetrieveDatapointEvaluations4$inboundSchema.parse(JSON.parse(x)),
1675
- `Failed to parse 'RetrieveDatapointEvaluations4' from JSON`,
1676
- );
1677
- }
1678
-
1679
- /** @internal */
1680
- export const RetrieveDatapointEvaluationsDatasetsResponseEvaluationType$inboundSchema:
1681
- z.ZodNativeEnum<
1682
- typeof RetrieveDatapointEvaluationsDatasetsResponseEvaluationType
1683
- > = z.nativeEnum(RetrieveDatapointEvaluationsDatasetsResponseEvaluationType);
1684
-
1685
- /** @internal */
1686
- export const RetrieveDatapointEvaluationsDatasetsResponseSource$inboundSchema:
1687
- z.ZodNativeEnum<typeof RetrieveDatapointEvaluationsDatasetsResponseSource> = z
1688
- .nativeEnum(RetrieveDatapointEvaluationsDatasetsResponseSource);
1689
-
1690
- /** @internal */
1691
- export const RetrieveDatapointEvaluationsDatasetsResponseKind$inboundSchema:
1692
- z.ZodNativeEnum<typeof RetrieveDatapointEvaluationsDatasetsResponseKind> = z
1693
- .nativeEnum(RetrieveDatapointEvaluationsDatasetsResponseKind);
1694
-
1695
- /** @internal */
1696
- export const RetrieveDatapointEvaluationsDatasetsResponseAnnotator$inboundSchema:
1697
- z.ZodType<
1698
- RetrieveDatapointEvaluationsDatasetsResponseAnnotator,
1699
- z.ZodTypeDef,
1700
- unknown
1701
- > = z.object({
1702
- kind: RetrieveDatapointEvaluationsDatasetsResponseKind$inboundSchema,
1703
- actor_id: z.string(),
1704
- }).transform((v) => {
1705
- return remap$(v, {
1706
- "actor_id": "actorId",
1707
- });
1708
- });
1709
-
1710
- export function retrieveDatapointEvaluationsDatasetsResponseAnnotatorFromJSON(
1711
- jsonString: string,
1712
- ): SafeParseResult<
1713
- RetrieveDatapointEvaluationsDatasetsResponseAnnotator,
1714
- SDKValidationError
1715
- > {
1716
- return safeParse(
1717
- jsonString,
1718
- (x) =>
1719
- RetrieveDatapointEvaluationsDatasetsResponseAnnotator$inboundSchema.parse(
1720
- JSON.parse(x),
1721
- ),
1722
- `Failed to parse 'RetrieveDatapointEvaluationsDatasetsResponseAnnotator' from JSON`,
1723
- );
1724
- }
1725
-
1726
- /** @internal */
1727
- export const RetrieveDatapointEvaluationsDatasetsResponseOutputSchema$inboundSchema:
1728
- z.ZodNativeEnum<
1729
- typeof RetrieveDatapointEvaluationsDatasetsResponseOutputSchema
1730
- > = z.nativeEnum(RetrieveDatapointEvaluationsDatasetsResponseOutputSchema);
1731
-
1732
- /** @internal */
1733
- export const Evaluations3$inboundSchema: z.ZodType<
1734
- Evaluations3,
1735
- z.ZodTypeDef,
1736
- unknown
1737
- > = z.object({
1738
- id: z.string(),
1739
- evaluation_type:
1740
- RetrieveDatapointEvaluationsDatasetsResponseEvaluationType$inboundSchema,
1741
- human_review_id: z.string().optional(),
1742
- source: RetrieveDatapointEvaluationsDatasetsResponseSource$inboundSchema
1743
- .default("orq"),
1744
- annotator: z.lazy(() =>
1745
- RetrieveDatapointEvaluationsDatasetsResponseAnnotator$inboundSchema
1746
- ).optional(),
1747
- output_schema:
1748
- RetrieveDatapointEvaluationsDatasetsResponseOutputSchema$inboundSchema
1749
- .optional(),
1750
- parent_annotation_id: z.string().optional(),
1751
- explanation: z.string().optional(),
1752
- reviewed_by_id: z.string(),
1753
- reviewed_at: z.string().datetime({ offset: true }).default(
1754
- "2026-09-21T07:21:40.018Z",
1755
- ).transform(v => new Date(v)),
1756
- type: z.literal("boolean"),
1757
- value: z.boolean(),
1758
- }).transform((v) => {
1759
- return remap$(v, {
1760
- "evaluation_type": "evaluationType",
1761
- "human_review_id": "humanReviewId",
1762
- "output_schema": "outputSchema",
1763
- "parent_annotation_id": "parentAnnotationId",
1764
- "reviewed_by_id": "reviewedById",
1765
- "reviewed_at": "reviewedAt",
1766
- });
1767
- });
1768
-
1769
- export function evaluations3FromJSON(
1770
- jsonString: string,
1771
- ): SafeParseResult<Evaluations3, SDKValidationError> {
1772
- return safeParse(
1773
- jsonString,
1774
- (x) => Evaluations3$inboundSchema.parse(JSON.parse(x)),
1775
- `Failed to parse 'Evaluations3' from JSON`,
1776
- );
1777
- }
1778
-
1779
- /** @internal */
1780
- export const RetrieveDatapointEvaluationsDatasetsEvaluationType$inboundSchema:
1781
- z.ZodNativeEnum<typeof RetrieveDatapointEvaluationsDatasetsEvaluationType> = z
1782
- .nativeEnum(RetrieveDatapointEvaluationsDatasetsEvaluationType);
1783
-
1784
- /** @internal */
1785
- export const RetrieveDatapointEvaluationsDatasetsSource$inboundSchema:
1786
- z.ZodNativeEnum<typeof RetrieveDatapointEvaluationsDatasetsSource> = z
1787
- .nativeEnum(RetrieveDatapointEvaluationsDatasetsSource);
1788
-
1789
- /** @internal */
1790
- export const RetrieveDatapointEvaluationsDatasetsKind$inboundSchema:
1791
- z.ZodNativeEnum<typeof RetrieveDatapointEvaluationsDatasetsKind> = z
1792
- .nativeEnum(RetrieveDatapointEvaluationsDatasetsKind);
1793
-
1794
- /** @internal */
1795
- export const RetrieveDatapointEvaluationsDatasetsAnnotator$inboundSchema:
1796
- z.ZodType<
1797
- RetrieveDatapointEvaluationsDatasetsAnnotator,
1798
- z.ZodTypeDef,
1799
- unknown
1800
- > = z.object({
1801
- kind: RetrieveDatapointEvaluationsDatasetsKind$inboundSchema,
1802
- actor_id: z.string(),
1803
- }).transform((v) => {
1804
- return remap$(v, {
1805
- "actor_id": "actorId",
1806
- });
1807
- });
1808
-
1809
- export function retrieveDatapointEvaluationsDatasetsAnnotatorFromJSON(
1810
- jsonString: string,
1811
- ): SafeParseResult<
1812
- RetrieveDatapointEvaluationsDatasetsAnnotator,
1813
- SDKValidationError
1814
- > {
1815
- return safeParse(
1816
- jsonString,
1817
- (x) =>
1818
- RetrieveDatapointEvaluationsDatasetsAnnotator$inboundSchema.parse(
1819
- JSON.parse(x),
1820
- ),
1821
- `Failed to parse 'RetrieveDatapointEvaluationsDatasetsAnnotator' from JSON`,
1822
- );
1823
- }
1824
-
1825
- /** @internal */
1826
- export const RetrieveDatapointEvaluationsDatasetsOutputSchema$inboundSchema:
1827
- z.ZodNativeEnum<typeof RetrieveDatapointEvaluationsDatasetsOutputSchema> = z
1828
- .nativeEnum(RetrieveDatapointEvaluationsDatasetsOutputSchema);
1829
-
1830
- /** @internal */
1831
- export const RetrieveDatapointEvaluations2$inboundSchema: z.ZodType<
1832
- RetrieveDatapointEvaluations2,
1833
- z.ZodTypeDef,
1834
- unknown
1835
- > = z.object({
1836
- id: z.string(),
1837
- evaluation_type:
1838
- RetrieveDatapointEvaluationsDatasetsEvaluationType$inboundSchema,
1839
- human_review_id: z.string().optional(),
1840
- source: RetrieveDatapointEvaluationsDatasetsSource$inboundSchema.default(
1841
- "orq",
1842
- ),
1843
- annotator: z.lazy(() =>
1844
- RetrieveDatapointEvaluationsDatasetsAnnotator$inboundSchema
1845
- ).optional(),
1846
- output_schema: RetrieveDatapointEvaluationsDatasetsOutputSchema$inboundSchema
1847
- .optional(),
1848
- parent_annotation_id: z.string().optional(),
1849
- explanation: z.string().optional(),
1850
- reviewed_by_id: z.string(),
1851
- reviewed_at: z.string().datetime({ offset: true }).default(
1852
- "2026-09-21T07:21:40.018Z",
1853
- ).transform(v => new Date(v)),
1854
- type: z.literal("number"),
1855
- value: z.number(),
1856
- }).transform((v) => {
1857
- return remap$(v, {
1858
- "evaluation_type": "evaluationType",
1859
- "human_review_id": "humanReviewId",
1860
- "output_schema": "outputSchema",
1861
- "parent_annotation_id": "parentAnnotationId",
1862
- "reviewed_by_id": "reviewedById",
1863
- "reviewed_at": "reviewedAt",
1864
- });
1865
- });
1866
-
1867
- export function retrieveDatapointEvaluations2FromJSON(
1868
- jsonString: string,
1869
- ): SafeParseResult<RetrieveDatapointEvaluations2, SDKValidationError> {
1870
- return safeParse(
1871
- jsonString,
1872
- (x) => RetrieveDatapointEvaluations2$inboundSchema.parse(JSON.parse(x)),
1873
- `Failed to parse 'RetrieveDatapointEvaluations2' from JSON`,
1874
- );
1875
- }
1876
-
1877
- /** @internal */
1878
- export const RetrieveDatapointEvaluationsEvaluationType$inboundSchema:
1879
- z.ZodNativeEnum<typeof RetrieveDatapointEvaluationsEvaluationType> = z
1880
- .nativeEnum(RetrieveDatapointEvaluationsEvaluationType);
1881
-
1882
- /** @internal */
1883
- export const RetrieveDatapointEvaluationsSource$inboundSchema: z.ZodNativeEnum<
1884
- typeof RetrieveDatapointEvaluationsSource
1885
- > = z.nativeEnum(RetrieveDatapointEvaluationsSource);
1886
-
1887
- /** @internal */
1888
- export const RetrieveDatapointEvaluationsKind$inboundSchema: z.ZodNativeEnum<
1889
- typeof RetrieveDatapointEvaluationsKind
1890
- > = z.nativeEnum(RetrieveDatapointEvaluationsKind);
1891
-
1892
- /** @internal */
1893
- export const RetrieveDatapointEvaluationsAnnotator$inboundSchema: z.ZodType<
1894
- RetrieveDatapointEvaluationsAnnotator,
1895
- z.ZodTypeDef,
1896
- unknown
1897
- > = z.object({
1898
- kind: RetrieveDatapointEvaluationsKind$inboundSchema,
1899
- actor_id: z.string(),
1900
- }).transform((v) => {
1901
- return remap$(v, {
1902
- "actor_id": "actorId",
1903
- });
1904
- });
1905
-
1906
- export function retrieveDatapointEvaluationsAnnotatorFromJSON(
1907
- jsonString: string,
1908
- ): SafeParseResult<RetrieveDatapointEvaluationsAnnotator, SDKValidationError> {
1909
- return safeParse(
1910
- jsonString,
1911
- (x) =>
1912
- RetrieveDatapointEvaluationsAnnotator$inboundSchema.parse(JSON.parse(x)),
1913
- `Failed to parse 'RetrieveDatapointEvaluationsAnnotator' from JSON`,
1914
- );
1915
- }
1916
-
1917
- /** @internal */
1918
- export const RetrieveDatapointEvaluationsOutputSchema$inboundSchema:
1919
- z.ZodNativeEnum<typeof RetrieveDatapointEvaluationsOutputSchema> = z
1920
- .nativeEnum(RetrieveDatapointEvaluationsOutputSchema);
1921
-
1922
- /** @internal */
1923
- export const RetrieveDatapointEvaluations1$inboundSchema: z.ZodType<
1924
- RetrieveDatapointEvaluations1,
1925
- z.ZodTypeDef,
1926
- unknown
1927
- > = z.object({
1928
- id: z.string(),
1929
- evaluation_type: RetrieveDatapointEvaluationsEvaluationType$inboundSchema,
1930
- human_review_id: z.string().optional(),
1931
- source: RetrieveDatapointEvaluationsSource$inboundSchema.default("orq"),
1932
- annotator: z.lazy(() => RetrieveDatapointEvaluationsAnnotator$inboundSchema)
1933
- .optional(),
1934
- output_schema: RetrieveDatapointEvaluationsOutputSchema$inboundSchema
1935
- .optional(),
1936
- parent_annotation_id: z.string().optional(),
1937
- explanation: z.string().optional(),
1938
- reviewed_by_id: z.string(),
1939
- reviewed_at: z.string().datetime({ offset: true }).default(
1940
- "2026-09-21T07:21:40.018Z",
1941
- ).transform(v => new Date(v)),
1942
- type: z.literal("string"),
1943
- value: z.string(),
1944
- }).transform((v) => {
1945
- return remap$(v, {
1946
- "evaluation_type": "evaluationType",
1947
- "human_review_id": "humanReviewId",
1948
- "output_schema": "outputSchema",
1949
- "parent_annotation_id": "parentAnnotationId",
1950
- "reviewed_by_id": "reviewedById",
1951
- "reviewed_at": "reviewedAt",
1952
- });
1953
- });
1954
-
1955
- export function retrieveDatapointEvaluations1FromJSON(
1956
- jsonString: string,
1957
- ): SafeParseResult<RetrieveDatapointEvaluations1, SDKValidationError> {
1958
- return safeParse(
1959
- jsonString,
1960
- (x) => RetrieveDatapointEvaluations1$inboundSchema.parse(JSON.parse(x)),
1961
- `Failed to parse 'RetrieveDatapointEvaluations1' from JSON`,
1962
- );
1963
- }
1964
-
1965
- /** @internal */
1966
- export const RetrieveDatapointEvaluations$inboundSchema: z.ZodType<
1967
- RetrieveDatapointEvaluations,
1968
- z.ZodTypeDef,
1969
- unknown
1970
- > = z.union([
1971
- z.lazy(() => RetrieveDatapointEvaluations1$inboundSchema),
1972
- z.lazy(() => RetrieveDatapointEvaluations2$inboundSchema),
1973
- z.lazy(() => Evaluations3$inboundSchema),
1974
- z.lazy(() => RetrieveDatapointEvaluations4$inboundSchema),
1975
- ]);
1976
-
1977
- export function retrieveDatapointEvaluationsFromJSON(
1978
- jsonString: string,
1979
- ): SafeParseResult<RetrieveDatapointEvaluations, SDKValidationError> {
1980
- return safeParse(
1981
- jsonString,
1982
- (x) => RetrieveDatapointEvaluations$inboundSchema.parse(JSON.parse(x)),
1983
- `Failed to parse 'RetrieveDatapointEvaluations' from JSON`,
1984
- );
1985
- }
1986
-
1987
- /** @internal */
1988
- export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
1989
- RetrieveDatapointResponseBody,
1990
- z.ZodTypeDef,
1991
- unknown
1992
- > = z.object({
1993
- _id: z.string(),
1994
- workspace_id: z.string(),
1995
- inputs: z.record(z.any()).optional(),
1996
- messages: z.array(
1997
- z.union([
1998
- z.lazy(() => RetrieveDatapointMessagesSystemMessage$inboundSchema),
1999
- z.lazy(() => RetrieveDatapointMessagesDeveloperMessage$inboundSchema),
2000
- z.lazy(() => RetrieveDatapointMessagesUserMessage$inboundSchema),
2001
- z.lazy(() => RetrieveDatapointMessagesAssistantMessage$inboundSchema),
2002
- z.lazy(() => RetrieveDatapointMessagesToolMessage$inboundSchema),
2003
- ]),
2004
- ).optional(),
2005
- expected_output: z.string().optional(),
2006
- evaluations: z.array(
2007
- z.union([
2008
- z.lazy(() => RetrieveDatapointEvaluations1$inboundSchema),
2009
- z.lazy(() => RetrieveDatapointEvaluations2$inboundSchema),
2010
- z.lazy(() => Evaluations3$inboundSchema),
2011
- z.lazy(() => RetrieveDatapointEvaluations4$inboundSchema),
2012
- ]),
2013
- ).optional(),
2014
- dataset_id: z.string(),
2015
- snapshot_version: z.string().optional(),
2016
- created_by_id: z.nullable(z.string()).optional(),
2017
- updated_by_id: z.nullable(z.string()).optional(),
2018
- created: z.string().datetime({ offset: true }).transform(v => new Date(v))
2019
- .optional(),
2020
- updated: z.string().datetime({ offset: true }).default(
2021
- "2026-09-21T07:21:34.711Z",
2022
- ).transform(v => new Date(v)),
2023
- }).transform((v) => {
2024
- return remap$(v, {
2025
- "_id": "id",
2026
- "workspace_id": "workspaceId",
2027
- "expected_output": "expectedOutput",
2028
- "dataset_id": "datasetId",
2029
- "snapshot_version": "snapshotVersion",
2030
- "created_by_id": "createdById",
2031
- "updated_by_id": "updatedById",
2032
- });
2033
- });
2034
-
2035
- export function retrieveDatapointResponseBodyFromJSON(
2036
- jsonString: string,
2037
- ): SafeParseResult<RetrieveDatapointResponseBody, SDKValidationError> {
2038
- return safeParse(
2039
- jsonString,
2040
- (x) => RetrieveDatapointResponseBody$inboundSchema.parse(JSON.parse(x)),
2041
- `Failed to parse 'RetrieveDatapointResponseBody' from JSON`,
2042
- );
2043
- }