@orq-ai/node 3.6.10 → 3.6.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 (98) hide show
  1. package/bin/mcp-server.js +40 -40
  2. package/bin/mcp-server.js.map +21 -21
  3. package/jsr.json +1 -1
  4. package/lib/config.d.ts +3 -3
  5. package/lib/config.js +3 -3
  6. package/mcp-server/mcp-server.js +1 -1
  7. package/mcp-server/server.js +1 -1
  8. package/models/operations/bulkcreatedatapoints.js +2 -2
  9. package/models/operations/createcontact.js +2 -2
  10. package/models/operations/createdataset.js +2 -2
  11. package/models/operations/createdatasetitem.js +2 -2
  12. package/models/operations/createdatasource.js +2 -2
  13. package/models/operations/fileget.js +2 -2
  14. package/models/operations/filelist.js +2 -2
  15. package/models/operations/fileupload.js +2 -2
  16. package/models/operations/listdatasetdatapoints.js +2 -2
  17. package/models/operations/listdatasets.js +2 -2
  18. package/models/operations/listdatasources.js +2 -2
  19. package/models/operations/retrievedatapoint.js +2 -2
  20. package/models/operations/retrievedataset.js +2 -2
  21. package/models/operations/retrievedatasource.js +2 -2
  22. package/models/operations/updatedatapoint.js +2 -2
  23. package/models/operations/updatedataset.js +2 -2
  24. package/models/operations/updatedatasource.js +2 -2
  25. package/package.json +1 -1
  26. package/packages/orq-rc/README.md +92 -79
  27. package/packages/orq-rc/docs/sdks/evals/README.md +315 -14
  28. package/packages/orq-rc/jsr.json +1 -1
  29. package/packages/orq-rc/package-lock.json +2 -2
  30. package/packages/orq-rc/package.json +1 -1
  31. package/packages/orq-rc/src/funcs/evalsAll.ts +169 -0
  32. package/packages/orq-rc/src/funcs/{evalsRunBertScore.ts → evalsBertScore.ts} +19 -17
  33. package/packages/orq-rc/src/funcs/evalsDelete.ts +169 -0
  34. package/packages/orq-rc/src/funcs/evalsInvoke.ts +173 -0
  35. package/packages/orq-rc/src/funcs/evalsUpdate.ts +169 -0
  36. package/packages/orq-rc/src/lib/config.ts +2 -2
  37. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  38. package/packages/orq-rc/src/mcp-server/server.ts +11 -3
  39. package/packages/orq-rc/src/mcp-server/tools/evalsAll.ts +35 -0
  40. package/packages/orq-rc/src/mcp-server/tools/{evalsRunBertScore.ts → evalsBertScore.ts} +5 -5
  41. package/packages/orq-rc/src/mcp-server/tools/evalsDelete.ts +33 -0
  42. package/packages/orq-rc/src/mcp-server/tools/evalsInvoke.ts +35 -0
  43. package/packages/orq-rc/src/mcp-server/tools/evalsUpdate.ts +35 -0
  44. package/packages/orq-rc/src/models/errors/deleteeval.ts +71 -0
  45. package/packages/orq-rc/src/models/errors/evalsbertscore.ts +137 -0
  46. package/packages/orq-rc/src/models/errors/getevals.ts +71 -0
  47. package/packages/orq-rc/src/models/errors/index.ts +5 -1
  48. package/packages/orq-rc/src/models/errors/invokeeval.ts +137 -0
  49. package/packages/orq-rc/src/models/errors/updateeval.ts +71 -0
  50. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  51. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  52. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  53. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  54. package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
  55. package/packages/orq-rc/src/models/operations/deleteeval.ts +66 -0
  56. package/packages/orq-rc/src/models/operations/evalsbertscore.ts +197 -0
  57. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  58. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  59. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  60. package/packages/orq-rc/src/models/operations/getevals.ts +6187 -0
  61. package/packages/orq-rc/src/models/operations/index.ts +5 -1
  62. package/packages/orq-rc/src/models/operations/invokeeval.ts +2492 -0
  63. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  64. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  65. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  66. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  67. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  68. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  69. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  70. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  71. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  72. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  73. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  74. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  75. package/packages/orq-rc/src/models/operations/updateeval.ts +4131 -0
  76. package/packages/orq-rc/src/sdk/evals.ts +65 -5
  77. package/src/lib/config.ts +3 -3
  78. package/src/mcp-server/mcp-server.ts +1 -1
  79. package/src/mcp-server/server.ts +1 -1
  80. package/src/models/operations/bulkcreatedatapoints.ts +2 -2
  81. package/src/models/operations/createcontact.ts +2 -2
  82. package/src/models/operations/createdataset.ts +2 -2
  83. package/src/models/operations/createdatasetitem.ts +2 -2
  84. package/src/models/operations/createdatasource.ts +2 -2
  85. package/src/models/operations/fileget.ts +2 -2
  86. package/src/models/operations/filelist.ts +2 -2
  87. package/src/models/operations/fileupload.ts +2 -2
  88. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  89. package/src/models/operations/listdatasets.ts +2 -2
  90. package/src/models/operations/listdatasources.ts +2 -2
  91. package/src/models/operations/retrievedatapoint.ts +2 -2
  92. package/src/models/operations/retrievedataset.ts +2 -2
  93. package/src/models/operations/retrievedatasource.ts +2 -2
  94. package/src/models/operations/updatedatapoint.ts +2 -2
  95. package/src/models/operations/updatedataset.ts +2 -2
  96. package/src/models/operations/updatedatasource.ts +2 -2
  97. package/packages/orq-rc/src/models/errors/runbertscore.ts +0 -137
  98. package/packages/orq-rc/src/models/operations/runbertscore.ts +0 -197
@@ -0,0 +1,2492 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * The role of the prompt message
14
+ */
15
+ export const InvokeEvalRole = {
16
+ System: "system",
17
+ Assistant: "assistant",
18
+ User: "user",
19
+ Exception: "exception",
20
+ Tool: "tool",
21
+ Prompt: "prompt",
22
+ Correction: "correction",
23
+ ExpectedOutput: "expected_output",
24
+ } as const;
25
+ /**
26
+ * The role of the prompt message
27
+ */
28
+ export type InvokeEvalRole = ClosedEnum<typeof InvokeEvalRole>;
29
+
30
+ /**
31
+ * The type of the content part. Always `file`.
32
+ */
33
+ export const InvokeEval2EvalsRequestType = {
34
+ File: "file",
35
+ } as const;
36
+ /**
37
+ * The type of the content part. Always `file`.
38
+ */
39
+ export type InvokeEval2EvalsRequestType = ClosedEnum<
40
+ typeof InvokeEval2EvalsRequestType
41
+ >;
42
+
43
+ export type InvokeEval2File = {
44
+ /**
45
+ * The base64 encoded file data, used when passing the file to the model as a string.
46
+ */
47
+ fileData: string;
48
+ /**
49
+ * The name of the file, used when passing the file to the model as a string.
50
+ */
51
+ filename?: string | undefined;
52
+ };
53
+
54
+ export type InvokeEval23 = {
55
+ /**
56
+ * The type of the content part. Always `file`.
57
+ */
58
+ type: InvokeEval2EvalsRequestType;
59
+ file: InvokeEval2File;
60
+ };
61
+
62
+ export const InvokeEval2EvalsType = {
63
+ ImageUrl: "image_url",
64
+ } as const;
65
+ export type InvokeEval2EvalsType = ClosedEnum<typeof InvokeEval2EvalsType>;
66
+
67
+ export type InvokeEval2ImageUrl = {
68
+ /**
69
+ * Either a URL of the image or the base64 encoded data URI.
70
+ */
71
+ url: string;
72
+ /**
73
+ * Specifies the detail level of the image. Currently only supported with OpenAI models
74
+ */
75
+ detail?: string | undefined;
76
+ };
77
+
78
+ /**
79
+ * The image part of the prompt message. Only supported with vision models.
80
+ */
81
+ export type InvokeEval22 = {
82
+ type: InvokeEval2EvalsType;
83
+ imageUrl: InvokeEval2ImageUrl;
84
+ };
85
+
86
+ export const InvokeEval2Type = {
87
+ Text: "text",
88
+ } as const;
89
+ export type InvokeEval2Type = ClosedEnum<typeof InvokeEval2Type>;
90
+
91
+ /**
92
+ * Text content part of a prompt message
93
+ */
94
+ export type InvokeEval21 = {
95
+ type: InvokeEval2Type;
96
+ text: string;
97
+ };
98
+
99
+ export type InvokeEvalContent2 = InvokeEval21 | InvokeEval22 | InvokeEval23;
100
+
101
+ /**
102
+ * 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.
103
+ */
104
+ export type InvokeEvalContent =
105
+ | string
106
+ | Array<InvokeEval21 | InvokeEval22 | InvokeEval23>;
107
+
108
+ export const InvokeEvalType = {
109
+ Function: "function",
110
+ } as const;
111
+ export type InvokeEvalType = ClosedEnum<typeof InvokeEvalType>;
112
+
113
+ export type InvokeEvalFunction = {
114
+ name: string;
115
+ /**
116
+ * JSON string arguments for the functions
117
+ */
118
+ arguments: string;
119
+ };
120
+
121
+ export type InvokeEvalToolCalls = {
122
+ id?: string | undefined;
123
+ index?: number | undefined;
124
+ type: InvokeEvalType;
125
+ function: InvokeEvalFunction;
126
+ };
127
+
128
+ export type InvokeEvalMessages = {
129
+ /**
130
+ * The role of the prompt message
131
+ */
132
+ role: InvokeEvalRole;
133
+ /**
134
+ * 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.
135
+ */
136
+ content: string | Array<InvokeEval21 | InvokeEval22 | InvokeEval23>;
137
+ toolCalls?: Array<InvokeEvalToolCalls> | undefined;
138
+ toolCallId?: string | undefined;
139
+ };
140
+
141
+ export type InvokeEvalRequestBody = {
142
+ /**
143
+ * Latest user message
144
+ */
145
+ input?: string | undefined;
146
+ /**
147
+ * The generated response from the model
148
+ */
149
+ output?: string | undefined;
150
+ /**
151
+ * The reference used to compare the output
152
+ */
153
+ reference?: string | undefined;
154
+ /**
155
+ * Knowledge base retrievals
156
+ */
157
+ retrievals?: Array<string> | undefined;
158
+ /**
159
+ * The messages used to generate the output, without the last user message
160
+ */
161
+ messages?: Array<InvokeEvalMessages> | undefined;
162
+ };
163
+
164
+ export type InvokeEvalRequest = {
165
+ /**
166
+ * Evaluator ID
167
+ */
168
+ id: string;
169
+ requestBody?: InvokeEvalRequestBody | undefined;
170
+ };
171
+
172
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type = {
173
+ HttpEval: "http_eval",
174
+ } as const;
175
+ export type InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type =
176
+ ClosedEnum<typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type>;
177
+
178
+ export type InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue =
179
+ | number
180
+ | boolean;
181
+
182
+ export type InvokeEvalResponseBodyEvalsResponse200Value = {
183
+ type: string;
184
+ value: number | boolean;
185
+ };
186
+
187
+ export type Eight = {
188
+ type: InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type;
189
+ value?: InvokeEvalResponseBodyEvalsResponse200Value | null | undefined;
190
+ };
191
+
192
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type = {
193
+ LlmEvaluator: "llm_evaluator",
194
+ } as const;
195
+ export type InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type =
196
+ ClosedEnum<typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type>;
197
+
198
+ export type InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value =
199
+ | number
200
+ | boolean
201
+ | string;
202
+
203
+ export type InvokeEvalResponseBodyEvalsResponseValue = {
204
+ workflowRunId: string;
205
+ value: number | boolean | string;
206
+ explanation?: string | null | undefined;
207
+ };
208
+
209
+ export type Seven = {
210
+ type: InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type;
211
+ value: InvokeEvalResponseBodyEvalsResponseValue | null;
212
+ };
213
+
214
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type = {
215
+ BertScore: "bert_score",
216
+ } as const;
217
+ export type InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type =
218
+ ClosedEnum<typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type>;
219
+
220
+ export type InvokeEvalResponseBodyEvalsValue = {
221
+ f1: number;
222
+ precision: number;
223
+ recall: number;
224
+ };
225
+
226
+ export type Six = {
227
+ type: InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type;
228
+ value: InvokeEvalResponseBodyEvalsValue;
229
+ };
230
+
231
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType = {
232
+ RougeN: "rouge_n",
233
+ } as const;
234
+ export type InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType =
235
+ ClosedEnum<typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType>;
236
+
237
+ export type Rouge1 = {
238
+ f1: number;
239
+ precision: number;
240
+ recall: number;
241
+ };
242
+
243
+ export type Rouge2 = {
244
+ f1: number;
245
+ precision: number;
246
+ recall: number;
247
+ };
248
+
249
+ export type RougeL = {
250
+ f1: number;
251
+ precision: number;
252
+ recall: number;
253
+ };
254
+
255
+ export type InvokeEvalResponseBodyValue = {
256
+ rouge1: Rouge1;
257
+ rouge2: Rouge2;
258
+ rougeL: RougeL;
259
+ };
260
+
261
+ export type Five = {
262
+ type: InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType;
263
+ value: InvokeEvalResponseBodyValue;
264
+ };
265
+
266
+ export const InvokeEvalResponseBodyEvalsResponse200Type = {
267
+ StringArray: "string_array",
268
+ } as const;
269
+ export type InvokeEvalResponseBodyEvalsResponse200Type = ClosedEnum<
270
+ typeof InvokeEvalResponseBodyEvalsResponse200Type
271
+ >;
272
+
273
+ export type ResponseBody4 = {
274
+ type: InvokeEvalResponseBodyEvalsResponse200Type;
275
+ values: Array<string | null>;
276
+ };
277
+
278
+ export const InvokeEvalResponseBodyEvalsResponseType = {
279
+ Boolean: "boolean",
280
+ } as const;
281
+ export type InvokeEvalResponseBodyEvalsResponseType = ClosedEnum<
282
+ typeof InvokeEvalResponseBodyEvalsResponseType
283
+ >;
284
+
285
+ export type ResponseBodyValue = boolean | string | number;
286
+
287
+ export type ResponseBody3 = {
288
+ type: InvokeEvalResponseBodyEvalsResponseType;
289
+ value: boolean | string | number | null;
290
+ };
291
+
292
+ export const InvokeEvalResponseBodyEvalsType = {
293
+ Number: "number",
294
+ } as const;
295
+ export type InvokeEvalResponseBodyEvalsType = ClosedEnum<
296
+ typeof InvokeEvalResponseBodyEvalsType
297
+ >;
298
+
299
+ export type ResponseBody2 = {
300
+ type: InvokeEvalResponseBodyEvalsType;
301
+ value: number | null;
302
+ };
303
+
304
+ export const InvokeEvalResponseBodyType = {
305
+ String: "string",
306
+ } as const;
307
+ export type InvokeEvalResponseBodyType = ClosedEnum<
308
+ typeof InvokeEvalResponseBodyType
309
+ >;
310
+
311
+ export type ResponseBody1 = {
312
+ type: InvokeEvalResponseBodyType;
313
+ value: string | null;
314
+ };
315
+
316
+ /**
317
+ * Returns the result of the evaluator run
318
+ */
319
+ export type InvokeEvalResponseBody =
320
+ | ResponseBody1
321
+ | ResponseBody2
322
+ | ResponseBody3
323
+ | ResponseBody4
324
+ | Five
325
+ | Six
326
+ | Seven
327
+ | Eight;
328
+
329
+ /** @internal */
330
+ export const InvokeEvalRole$inboundSchema: z.ZodNativeEnum<
331
+ typeof InvokeEvalRole
332
+ > = z.nativeEnum(InvokeEvalRole);
333
+
334
+ /** @internal */
335
+ export const InvokeEvalRole$outboundSchema: z.ZodNativeEnum<
336
+ typeof InvokeEvalRole
337
+ > = InvokeEvalRole$inboundSchema;
338
+
339
+ /**
340
+ * @internal
341
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
342
+ */
343
+ export namespace InvokeEvalRole$ {
344
+ /** @deprecated use `InvokeEvalRole$inboundSchema` instead. */
345
+ export const inboundSchema = InvokeEvalRole$inboundSchema;
346
+ /** @deprecated use `InvokeEvalRole$outboundSchema` instead. */
347
+ export const outboundSchema = InvokeEvalRole$outboundSchema;
348
+ }
349
+
350
+ /** @internal */
351
+ export const InvokeEval2EvalsRequestType$inboundSchema: z.ZodNativeEnum<
352
+ typeof InvokeEval2EvalsRequestType
353
+ > = z.nativeEnum(InvokeEval2EvalsRequestType);
354
+
355
+ /** @internal */
356
+ export const InvokeEval2EvalsRequestType$outboundSchema: z.ZodNativeEnum<
357
+ typeof InvokeEval2EvalsRequestType
358
+ > = InvokeEval2EvalsRequestType$inboundSchema;
359
+
360
+ /**
361
+ * @internal
362
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
363
+ */
364
+ export namespace InvokeEval2EvalsRequestType$ {
365
+ /** @deprecated use `InvokeEval2EvalsRequestType$inboundSchema` instead. */
366
+ export const inboundSchema = InvokeEval2EvalsRequestType$inboundSchema;
367
+ /** @deprecated use `InvokeEval2EvalsRequestType$outboundSchema` instead. */
368
+ export const outboundSchema = InvokeEval2EvalsRequestType$outboundSchema;
369
+ }
370
+
371
+ /** @internal */
372
+ export const InvokeEval2File$inboundSchema: z.ZodType<
373
+ InvokeEval2File,
374
+ z.ZodTypeDef,
375
+ unknown
376
+ > = z.object({
377
+ file_data: z.string(),
378
+ filename: z.string().optional(),
379
+ }).transform((v) => {
380
+ return remap$(v, {
381
+ "file_data": "fileData",
382
+ });
383
+ });
384
+
385
+ /** @internal */
386
+ export type InvokeEval2File$Outbound = {
387
+ file_data: string;
388
+ filename?: string | undefined;
389
+ };
390
+
391
+ /** @internal */
392
+ export const InvokeEval2File$outboundSchema: z.ZodType<
393
+ InvokeEval2File$Outbound,
394
+ z.ZodTypeDef,
395
+ InvokeEval2File
396
+ > = z.object({
397
+ fileData: z.string(),
398
+ filename: z.string().optional(),
399
+ }).transform((v) => {
400
+ return remap$(v, {
401
+ fileData: "file_data",
402
+ });
403
+ });
404
+
405
+ /**
406
+ * @internal
407
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
408
+ */
409
+ export namespace InvokeEval2File$ {
410
+ /** @deprecated use `InvokeEval2File$inboundSchema` instead. */
411
+ export const inboundSchema = InvokeEval2File$inboundSchema;
412
+ /** @deprecated use `InvokeEval2File$outboundSchema` instead. */
413
+ export const outboundSchema = InvokeEval2File$outboundSchema;
414
+ /** @deprecated use `InvokeEval2File$Outbound` instead. */
415
+ export type Outbound = InvokeEval2File$Outbound;
416
+ }
417
+
418
+ export function invokeEval2FileToJSON(
419
+ invokeEval2File: InvokeEval2File,
420
+ ): string {
421
+ return JSON.stringify(InvokeEval2File$outboundSchema.parse(invokeEval2File));
422
+ }
423
+
424
+ export function invokeEval2FileFromJSON(
425
+ jsonString: string,
426
+ ): SafeParseResult<InvokeEval2File, SDKValidationError> {
427
+ return safeParse(
428
+ jsonString,
429
+ (x) => InvokeEval2File$inboundSchema.parse(JSON.parse(x)),
430
+ `Failed to parse 'InvokeEval2File' from JSON`,
431
+ );
432
+ }
433
+
434
+ /** @internal */
435
+ export const InvokeEval23$inboundSchema: z.ZodType<
436
+ InvokeEval23,
437
+ z.ZodTypeDef,
438
+ unknown
439
+ > = z.object({
440
+ type: InvokeEval2EvalsRequestType$inboundSchema,
441
+ file: z.lazy(() => InvokeEval2File$inboundSchema),
442
+ });
443
+
444
+ /** @internal */
445
+ export type InvokeEval23$Outbound = {
446
+ type: string;
447
+ file: InvokeEval2File$Outbound;
448
+ };
449
+
450
+ /** @internal */
451
+ export const InvokeEval23$outboundSchema: z.ZodType<
452
+ InvokeEval23$Outbound,
453
+ z.ZodTypeDef,
454
+ InvokeEval23
455
+ > = z.object({
456
+ type: InvokeEval2EvalsRequestType$outboundSchema,
457
+ file: z.lazy(() => InvokeEval2File$outboundSchema),
458
+ });
459
+
460
+ /**
461
+ * @internal
462
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
463
+ */
464
+ export namespace InvokeEval23$ {
465
+ /** @deprecated use `InvokeEval23$inboundSchema` instead. */
466
+ export const inboundSchema = InvokeEval23$inboundSchema;
467
+ /** @deprecated use `InvokeEval23$outboundSchema` instead. */
468
+ export const outboundSchema = InvokeEval23$outboundSchema;
469
+ /** @deprecated use `InvokeEval23$Outbound` instead. */
470
+ export type Outbound = InvokeEval23$Outbound;
471
+ }
472
+
473
+ export function invokeEval23ToJSON(invokeEval23: InvokeEval23): string {
474
+ return JSON.stringify(InvokeEval23$outboundSchema.parse(invokeEval23));
475
+ }
476
+
477
+ export function invokeEval23FromJSON(
478
+ jsonString: string,
479
+ ): SafeParseResult<InvokeEval23, SDKValidationError> {
480
+ return safeParse(
481
+ jsonString,
482
+ (x) => InvokeEval23$inboundSchema.parse(JSON.parse(x)),
483
+ `Failed to parse 'InvokeEval23' from JSON`,
484
+ );
485
+ }
486
+
487
+ /** @internal */
488
+ export const InvokeEval2EvalsType$inboundSchema: z.ZodNativeEnum<
489
+ typeof InvokeEval2EvalsType
490
+ > = z.nativeEnum(InvokeEval2EvalsType);
491
+
492
+ /** @internal */
493
+ export const InvokeEval2EvalsType$outboundSchema: z.ZodNativeEnum<
494
+ typeof InvokeEval2EvalsType
495
+ > = InvokeEval2EvalsType$inboundSchema;
496
+
497
+ /**
498
+ * @internal
499
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
500
+ */
501
+ export namespace InvokeEval2EvalsType$ {
502
+ /** @deprecated use `InvokeEval2EvalsType$inboundSchema` instead. */
503
+ export const inboundSchema = InvokeEval2EvalsType$inboundSchema;
504
+ /** @deprecated use `InvokeEval2EvalsType$outboundSchema` instead. */
505
+ export const outboundSchema = InvokeEval2EvalsType$outboundSchema;
506
+ }
507
+
508
+ /** @internal */
509
+ export const InvokeEval2ImageUrl$inboundSchema: z.ZodType<
510
+ InvokeEval2ImageUrl,
511
+ z.ZodTypeDef,
512
+ unknown
513
+ > = z.object({
514
+ url: z.string(),
515
+ detail: z.string().optional(),
516
+ });
517
+
518
+ /** @internal */
519
+ export type InvokeEval2ImageUrl$Outbound = {
520
+ url: string;
521
+ detail?: string | undefined;
522
+ };
523
+
524
+ /** @internal */
525
+ export const InvokeEval2ImageUrl$outboundSchema: z.ZodType<
526
+ InvokeEval2ImageUrl$Outbound,
527
+ z.ZodTypeDef,
528
+ InvokeEval2ImageUrl
529
+ > = z.object({
530
+ url: z.string(),
531
+ detail: z.string().optional(),
532
+ });
533
+
534
+ /**
535
+ * @internal
536
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
537
+ */
538
+ export namespace InvokeEval2ImageUrl$ {
539
+ /** @deprecated use `InvokeEval2ImageUrl$inboundSchema` instead. */
540
+ export const inboundSchema = InvokeEval2ImageUrl$inboundSchema;
541
+ /** @deprecated use `InvokeEval2ImageUrl$outboundSchema` instead. */
542
+ export const outboundSchema = InvokeEval2ImageUrl$outboundSchema;
543
+ /** @deprecated use `InvokeEval2ImageUrl$Outbound` instead. */
544
+ export type Outbound = InvokeEval2ImageUrl$Outbound;
545
+ }
546
+
547
+ export function invokeEval2ImageUrlToJSON(
548
+ invokeEval2ImageUrl: InvokeEval2ImageUrl,
549
+ ): string {
550
+ return JSON.stringify(
551
+ InvokeEval2ImageUrl$outboundSchema.parse(invokeEval2ImageUrl),
552
+ );
553
+ }
554
+
555
+ export function invokeEval2ImageUrlFromJSON(
556
+ jsonString: string,
557
+ ): SafeParseResult<InvokeEval2ImageUrl, SDKValidationError> {
558
+ return safeParse(
559
+ jsonString,
560
+ (x) => InvokeEval2ImageUrl$inboundSchema.parse(JSON.parse(x)),
561
+ `Failed to parse 'InvokeEval2ImageUrl' from JSON`,
562
+ );
563
+ }
564
+
565
+ /** @internal */
566
+ export const InvokeEval22$inboundSchema: z.ZodType<
567
+ InvokeEval22,
568
+ z.ZodTypeDef,
569
+ unknown
570
+ > = z.object({
571
+ type: InvokeEval2EvalsType$inboundSchema,
572
+ image_url: z.lazy(() => InvokeEval2ImageUrl$inboundSchema),
573
+ }).transform((v) => {
574
+ return remap$(v, {
575
+ "image_url": "imageUrl",
576
+ });
577
+ });
578
+
579
+ /** @internal */
580
+ export type InvokeEval22$Outbound = {
581
+ type: string;
582
+ image_url: InvokeEval2ImageUrl$Outbound;
583
+ };
584
+
585
+ /** @internal */
586
+ export const InvokeEval22$outboundSchema: z.ZodType<
587
+ InvokeEval22$Outbound,
588
+ z.ZodTypeDef,
589
+ InvokeEval22
590
+ > = z.object({
591
+ type: InvokeEval2EvalsType$outboundSchema,
592
+ imageUrl: z.lazy(() => InvokeEval2ImageUrl$outboundSchema),
593
+ }).transform((v) => {
594
+ return remap$(v, {
595
+ imageUrl: "image_url",
596
+ });
597
+ });
598
+
599
+ /**
600
+ * @internal
601
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
602
+ */
603
+ export namespace InvokeEval22$ {
604
+ /** @deprecated use `InvokeEval22$inboundSchema` instead. */
605
+ export const inboundSchema = InvokeEval22$inboundSchema;
606
+ /** @deprecated use `InvokeEval22$outboundSchema` instead. */
607
+ export const outboundSchema = InvokeEval22$outboundSchema;
608
+ /** @deprecated use `InvokeEval22$Outbound` instead. */
609
+ export type Outbound = InvokeEval22$Outbound;
610
+ }
611
+
612
+ export function invokeEval22ToJSON(invokeEval22: InvokeEval22): string {
613
+ return JSON.stringify(InvokeEval22$outboundSchema.parse(invokeEval22));
614
+ }
615
+
616
+ export function invokeEval22FromJSON(
617
+ jsonString: string,
618
+ ): SafeParseResult<InvokeEval22, SDKValidationError> {
619
+ return safeParse(
620
+ jsonString,
621
+ (x) => InvokeEval22$inboundSchema.parse(JSON.parse(x)),
622
+ `Failed to parse 'InvokeEval22' from JSON`,
623
+ );
624
+ }
625
+
626
+ /** @internal */
627
+ export const InvokeEval2Type$inboundSchema: z.ZodNativeEnum<
628
+ typeof InvokeEval2Type
629
+ > = z.nativeEnum(InvokeEval2Type);
630
+
631
+ /** @internal */
632
+ export const InvokeEval2Type$outboundSchema: z.ZodNativeEnum<
633
+ typeof InvokeEval2Type
634
+ > = InvokeEval2Type$inboundSchema;
635
+
636
+ /**
637
+ * @internal
638
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
639
+ */
640
+ export namespace InvokeEval2Type$ {
641
+ /** @deprecated use `InvokeEval2Type$inboundSchema` instead. */
642
+ export const inboundSchema = InvokeEval2Type$inboundSchema;
643
+ /** @deprecated use `InvokeEval2Type$outboundSchema` instead. */
644
+ export const outboundSchema = InvokeEval2Type$outboundSchema;
645
+ }
646
+
647
+ /** @internal */
648
+ export const InvokeEval21$inboundSchema: z.ZodType<
649
+ InvokeEval21,
650
+ z.ZodTypeDef,
651
+ unknown
652
+ > = z.object({
653
+ type: InvokeEval2Type$inboundSchema,
654
+ text: z.string(),
655
+ });
656
+
657
+ /** @internal */
658
+ export type InvokeEval21$Outbound = {
659
+ type: string;
660
+ text: string;
661
+ };
662
+
663
+ /** @internal */
664
+ export const InvokeEval21$outboundSchema: z.ZodType<
665
+ InvokeEval21$Outbound,
666
+ z.ZodTypeDef,
667
+ InvokeEval21
668
+ > = z.object({
669
+ type: InvokeEval2Type$outboundSchema,
670
+ text: z.string(),
671
+ });
672
+
673
+ /**
674
+ * @internal
675
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
676
+ */
677
+ export namespace InvokeEval21$ {
678
+ /** @deprecated use `InvokeEval21$inboundSchema` instead. */
679
+ export const inboundSchema = InvokeEval21$inboundSchema;
680
+ /** @deprecated use `InvokeEval21$outboundSchema` instead. */
681
+ export const outboundSchema = InvokeEval21$outboundSchema;
682
+ /** @deprecated use `InvokeEval21$Outbound` instead. */
683
+ export type Outbound = InvokeEval21$Outbound;
684
+ }
685
+
686
+ export function invokeEval21ToJSON(invokeEval21: InvokeEval21): string {
687
+ return JSON.stringify(InvokeEval21$outboundSchema.parse(invokeEval21));
688
+ }
689
+
690
+ export function invokeEval21FromJSON(
691
+ jsonString: string,
692
+ ): SafeParseResult<InvokeEval21, SDKValidationError> {
693
+ return safeParse(
694
+ jsonString,
695
+ (x) => InvokeEval21$inboundSchema.parse(JSON.parse(x)),
696
+ `Failed to parse 'InvokeEval21' from JSON`,
697
+ );
698
+ }
699
+
700
+ /** @internal */
701
+ export const InvokeEvalContent2$inboundSchema: z.ZodType<
702
+ InvokeEvalContent2,
703
+ z.ZodTypeDef,
704
+ unknown
705
+ > = z.union([
706
+ z.lazy(() => InvokeEval21$inboundSchema),
707
+ z.lazy(() => InvokeEval22$inboundSchema),
708
+ z.lazy(() => InvokeEval23$inboundSchema),
709
+ ]);
710
+
711
+ /** @internal */
712
+ export type InvokeEvalContent2$Outbound =
713
+ | InvokeEval21$Outbound
714
+ | InvokeEval22$Outbound
715
+ | InvokeEval23$Outbound;
716
+
717
+ /** @internal */
718
+ export const InvokeEvalContent2$outboundSchema: z.ZodType<
719
+ InvokeEvalContent2$Outbound,
720
+ z.ZodTypeDef,
721
+ InvokeEvalContent2
722
+ > = z.union([
723
+ z.lazy(() => InvokeEval21$outboundSchema),
724
+ z.lazy(() => InvokeEval22$outboundSchema),
725
+ z.lazy(() => InvokeEval23$outboundSchema),
726
+ ]);
727
+
728
+ /**
729
+ * @internal
730
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
731
+ */
732
+ export namespace InvokeEvalContent2$ {
733
+ /** @deprecated use `InvokeEvalContent2$inboundSchema` instead. */
734
+ export const inboundSchema = InvokeEvalContent2$inboundSchema;
735
+ /** @deprecated use `InvokeEvalContent2$outboundSchema` instead. */
736
+ export const outboundSchema = InvokeEvalContent2$outboundSchema;
737
+ /** @deprecated use `InvokeEvalContent2$Outbound` instead. */
738
+ export type Outbound = InvokeEvalContent2$Outbound;
739
+ }
740
+
741
+ export function invokeEvalContent2ToJSON(
742
+ invokeEvalContent2: InvokeEvalContent2,
743
+ ): string {
744
+ return JSON.stringify(
745
+ InvokeEvalContent2$outboundSchema.parse(invokeEvalContent2),
746
+ );
747
+ }
748
+
749
+ export function invokeEvalContent2FromJSON(
750
+ jsonString: string,
751
+ ): SafeParseResult<InvokeEvalContent2, SDKValidationError> {
752
+ return safeParse(
753
+ jsonString,
754
+ (x) => InvokeEvalContent2$inboundSchema.parse(JSON.parse(x)),
755
+ `Failed to parse 'InvokeEvalContent2' from JSON`,
756
+ );
757
+ }
758
+
759
+ /** @internal */
760
+ export const InvokeEvalContent$inboundSchema: z.ZodType<
761
+ InvokeEvalContent,
762
+ z.ZodTypeDef,
763
+ unknown
764
+ > = z.union([
765
+ z.string(),
766
+ z.array(z.union([
767
+ z.lazy(() => InvokeEval21$inboundSchema),
768
+ z.lazy(() => InvokeEval22$inboundSchema),
769
+ z.lazy(() => InvokeEval23$inboundSchema),
770
+ ])),
771
+ ]);
772
+
773
+ /** @internal */
774
+ export type InvokeEvalContent$Outbound =
775
+ | string
776
+ | Array<
777
+ InvokeEval21$Outbound | InvokeEval22$Outbound | InvokeEval23$Outbound
778
+ >;
779
+
780
+ /** @internal */
781
+ export const InvokeEvalContent$outboundSchema: z.ZodType<
782
+ InvokeEvalContent$Outbound,
783
+ z.ZodTypeDef,
784
+ InvokeEvalContent
785
+ > = z.union([
786
+ z.string(),
787
+ z.array(z.union([
788
+ z.lazy(() => InvokeEval21$outboundSchema),
789
+ z.lazy(() => InvokeEval22$outboundSchema),
790
+ z.lazy(() => InvokeEval23$outboundSchema),
791
+ ])),
792
+ ]);
793
+
794
+ /**
795
+ * @internal
796
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
797
+ */
798
+ export namespace InvokeEvalContent$ {
799
+ /** @deprecated use `InvokeEvalContent$inboundSchema` instead. */
800
+ export const inboundSchema = InvokeEvalContent$inboundSchema;
801
+ /** @deprecated use `InvokeEvalContent$outboundSchema` instead. */
802
+ export const outboundSchema = InvokeEvalContent$outboundSchema;
803
+ /** @deprecated use `InvokeEvalContent$Outbound` instead. */
804
+ export type Outbound = InvokeEvalContent$Outbound;
805
+ }
806
+
807
+ export function invokeEvalContentToJSON(
808
+ invokeEvalContent: InvokeEvalContent,
809
+ ): string {
810
+ return JSON.stringify(
811
+ InvokeEvalContent$outboundSchema.parse(invokeEvalContent),
812
+ );
813
+ }
814
+
815
+ export function invokeEvalContentFromJSON(
816
+ jsonString: string,
817
+ ): SafeParseResult<InvokeEvalContent, SDKValidationError> {
818
+ return safeParse(
819
+ jsonString,
820
+ (x) => InvokeEvalContent$inboundSchema.parse(JSON.parse(x)),
821
+ `Failed to parse 'InvokeEvalContent' from JSON`,
822
+ );
823
+ }
824
+
825
+ /** @internal */
826
+ export const InvokeEvalType$inboundSchema: z.ZodNativeEnum<
827
+ typeof InvokeEvalType
828
+ > = z.nativeEnum(InvokeEvalType);
829
+
830
+ /** @internal */
831
+ export const InvokeEvalType$outboundSchema: z.ZodNativeEnum<
832
+ typeof InvokeEvalType
833
+ > = InvokeEvalType$inboundSchema;
834
+
835
+ /**
836
+ * @internal
837
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
838
+ */
839
+ export namespace InvokeEvalType$ {
840
+ /** @deprecated use `InvokeEvalType$inboundSchema` instead. */
841
+ export const inboundSchema = InvokeEvalType$inboundSchema;
842
+ /** @deprecated use `InvokeEvalType$outboundSchema` instead. */
843
+ export const outboundSchema = InvokeEvalType$outboundSchema;
844
+ }
845
+
846
+ /** @internal */
847
+ export const InvokeEvalFunction$inboundSchema: z.ZodType<
848
+ InvokeEvalFunction,
849
+ z.ZodTypeDef,
850
+ unknown
851
+ > = z.object({
852
+ name: z.string(),
853
+ arguments: z.string(),
854
+ });
855
+
856
+ /** @internal */
857
+ export type InvokeEvalFunction$Outbound = {
858
+ name: string;
859
+ arguments: string;
860
+ };
861
+
862
+ /** @internal */
863
+ export const InvokeEvalFunction$outboundSchema: z.ZodType<
864
+ InvokeEvalFunction$Outbound,
865
+ z.ZodTypeDef,
866
+ InvokeEvalFunction
867
+ > = z.object({
868
+ name: z.string(),
869
+ arguments: z.string(),
870
+ });
871
+
872
+ /**
873
+ * @internal
874
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
875
+ */
876
+ export namespace InvokeEvalFunction$ {
877
+ /** @deprecated use `InvokeEvalFunction$inboundSchema` instead. */
878
+ export const inboundSchema = InvokeEvalFunction$inboundSchema;
879
+ /** @deprecated use `InvokeEvalFunction$outboundSchema` instead. */
880
+ export const outboundSchema = InvokeEvalFunction$outboundSchema;
881
+ /** @deprecated use `InvokeEvalFunction$Outbound` instead. */
882
+ export type Outbound = InvokeEvalFunction$Outbound;
883
+ }
884
+
885
+ export function invokeEvalFunctionToJSON(
886
+ invokeEvalFunction: InvokeEvalFunction,
887
+ ): string {
888
+ return JSON.stringify(
889
+ InvokeEvalFunction$outboundSchema.parse(invokeEvalFunction),
890
+ );
891
+ }
892
+
893
+ export function invokeEvalFunctionFromJSON(
894
+ jsonString: string,
895
+ ): SafeParseResult<InvokeEvalFunction, SDKValidationError> {
896
+ return safeParse(
897
+ jsonString,
898
+ (x) => InvokeEvalFunction$inboundSchema.parse(JSON.parse(x)),
899
+ `Failed to parse 'InvokeEvalFunction' from JSON`,
900
+ );
901
+ }
902
+
903
+ /** @internal */
904
+ export const InvokeEvalToolCalls$inboundSchema: z.ZodType<
905
+ InvokeEvalToolCalls,
906
+ z.ZodTypeDef,
907
+ unknown
908
+ > = z.object({
909
+ id: z.string().optional(),
910
+ index: z.number().optional(),
911
+ type: InvokeEvalType$inboundSchema,
912
+ function: z.lazy(() => InvokeEvalFunction$inboundSchema),
913
+ });
914
+
915
+ /** @internal */
916
+ export type InvokeEvalToolCalls$Outbound = {
917
+ id?: string | undefined;
918
+ index?: number | undefined;
919
+ type: string;
920
+ function: InvokeEvalFunction$Outbound;
921
+ };
922
+
923
+ /** @internal */
924
+ export const InvokeEvalToolCalls$outboundSchema: z.ZodType<
925
+ InvokeEvalToolCalls$Outbound,
926
+ z.ZodTypeDef,
927
+ InvokeEvalToolCalls
928
+ > = z.object({
929
+ id: z.string().optional(),
930
+ index: z.number().optional(),
931
+ type: InvokeEvalType$outboundSchema,
932
+ function: z.lazy(() => InvokeEvalFunction$outboundSchema),
933
+ });
934
+
935
+ /**
936
+ * @internal
937
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
938
+ */
939
+ export namespace InvokeEvalToolCalls$ {
940
+ /** @deprecated use `InvokeEvalToolCalls$inboundSchema` instead. */
941
+ export const inboundSchema = InvokeEvalToolCalls$inboundSchema;
942
+ /** @deprecated use `InvokeEvalToolCalls$outboundSchema` instead. */
943
+ export const outboundSchema = InvokeEvalToolCalls$outboundSchema;
944
+ /** @deprecated use `InvokeEvalToolCalls$Outbound` instead. */
945
+ export type Outbound = InvokeEvalToolCalls$Outbound;
946
+ }
947
+
948
+ export function invokeEvalToolCallsToJSON(
949
+ invokeEvalToolCalls: InvokeEvalToolCalls,
950
+ ): string {
951
+ return JSON.stringify(
952
+ InvokeEvalToolCalls$outboundSchema.parse(invokeEvalToolCalls),
953
+ );
954
+ }
955
+
956
+ export function invokeEvalToolCallsFromJSON(
957
+ jsonString: string,
958
+ ): SafeParseResult<InvokeEvalToolCalls, SDKValidationError> {
959
+ return safeParse(
960
+ jsonString,
961
+ (x) => InvokeEvalToolCalls$inboundSchema.parse(JSON.parse(x)),
962
+ `Failed to parse 'InvokeEvalToolCalls' from JSON`,
963
+ );
964
+ }
965
+
966
+ /** @internal */
967
+ export const InvokeEvalMessages$inboundSchema: z.ZodType<
968
+ InvokeEvalMessages,
969
+ z.ZodTypeDef,
970
+ unknown
971
+ > = z.object({
972
+ role: InvokeEvalRole$inboundSchema,
973
+ content: z.union([
974
+ z.string(),
975
+ z.array(z.union([
976
+ z.lazy(() => InvokeEval21$inboundSchema),
977
+ z.lazy(() => InvokeEval22$inboundSchema),
978
+ z.lazy(() => InvokeEval23$inboundSchema),
979
+ ])),
980
+ ]),
981
+ tool_calls: z.array(z.lazy(() => InvokeEvalToolCalls$inboundSchema))
982
+ .optional(),
983
+ tool_call_id: z.string().optional(),
984
+ }).transform((v) => {
985
+ return remap$(v, {
986
+ "tool_calls": "toolCalls",
987
+ "tool_call_id": "toolCallId",
988
+ });
989
+ });
990
+
991
+ /** @internal */
992
+ export type InvokeEvalMessages$Outbound = {
993
+ role: string;
994
+ content:
995
+ | string
996
+ | Array<
997
+ InvokeEval21$Outbound | InvokeEval22$Outbound | InvokeEval23$Outbound
998
+ >;
999
+ tool_calls?: Array<InvokeEvalToolCalls$Outbound> | undefined;
1000
+ tool_call_id?: string | undefined;
1001
+ };
1002
+
1003
+ /** @internal */
1004
+ export const InvokeEvalMessages$outboundSchema: z.ZodType<
1005
+ InvokeEvalMessages$Outbound,
1006
+ z.ZodTypeDef,
1007
+ InvokeEvalMessages
1008
+ > = z.object({
1009
+ role: InvokeEvalRole$outboundSchema,
1010
+ content: z.union([
1011
+ z.string(),
1012
+ z.array(z.union([
1013
+ z.lazy(() => InvokeEval21$outboundSchema),
1014
+ z.lazy(() => InvokeEval22$outboundSchema),
1015
+ z.lazy(() => InvokeEval23$outboundSchema),
1016
+ ])),
1017
+ ]),
1018
+ toolCalls: z.array(z.lazy(() => InvokeEvalToolCalls$outboundSchema))
1019
+ .optional(),
1020
+ toolCallId: z.string().optional(),
1021
+ }).transform((v) => {
1022
+ return remap$(v, {
1023
+ toolCalls: "tool_calls",
1024
+ toolCallId: "tool_call_id",
1025
+ });
1026
+ });
1027
+
1028
+ /**
1029
+ * @internal
1030
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1031
+ */
1032
+ export namespace InvokeEvalMessages$ {
1033
+ /** @deprecated use `InvokeEvalMessages$inboundSchema` instead. */
1034
+ export const inboundSchema = InvokeEvalMessages$inboundSchema;
1035
+ /** @deprecated use `InvokeEvalMessages$outboundSchema` instead. */
1036
+ export const outboundSchema = InvokeEvalMessages$outboundSchema;
1037
+ /** @deprecated use `InvokeEvalMessages$Outbound` instead. */
1038
+ export type Outbound = InvokeEvalMessages$Outbound;
1039
+ }
1040
+
1041
+ export function invokeEvalMessagesToJSON(
1042
+ invokeEvalMessages: InvokeEvalMessages,
1043
+ ): string {
1044
+ return JSON.stringify(
1045
+ InvokeEvalMessages$outboundSchema.parse(invokeEvalMessages),
1046
+ );
1047
+ }
1048
+
1049
+ export function invokeEvalMessagesFromJSON(
1050
+ jsonString: string,
1051
+ ): SafeParseResult<InvokeEvalMessages, SDKValidationError> {
1052
+ return safeParse(
1053
+ jsonString,
1054
+ (x) => InvokeEvalMessages$inboundSchema.parse(JSON.parse(x)),
1055
+ `Failed to parse 'InvokeEvalMessages' from JSON`,
1056
+ );
1057
+ }
1058
+
1059
+ /** @internal */
1060
+ export const InvokeEvalRequestBody$inboundSchema: z.ZodType<
1061
+ InvokeEvalRequestBody,
1062
+ z.ZodTypeDef,
1063
+ unknown
1064
+ > = z.object({
1065
+ input: z.string().optional(),
1066
+ output: z.string().optional(),
1067
+ reference: z.string().optional(),
1068
+ retrievals: z.array(z.string()).optional(),
1069
+ messages: z.array(z.lazy(() => InvokeEvalMessages$inboundSchema)).optional(),
1070
+ });
1071
+
1072
+ /** @internal */
1073
+ export type InvokeEvalRequestBody$Outbound = {
1074
+ input?: string | undefined;
1075
+ output?: string | undefined;
1076
+ reference?: string | undefined;
1077
+ retrievals?: Array<string> | undefined;
1078
+ messages?: Array<InvokeEvalMessages$Outbound> | undefined;
1079
+ };
1080
+
1081
+ /** @internal */
1082
+ export const InvokeEvalRequestBody$outboundSchema: z.ZodType<
1083
+ InvokeEvalRequestBody$Outbound,
1084
+ z.ZodTypeDef,
1085
+ InvokeEvalRequestBody
1086
+ > = z.object({
1087
+ input: z.string().optional(),
1088
+ output: z.string().optional(),
1089
+ reference: z.string().optional(),
1090
+ retrievals: z.array(z.string()).optional(),
1091
+ messages: z.array(z.lazy(() => InvokeEvalMessages$outboundSchema)).optional(),
1092
+ });
1093
+
1094
+ /**
1095
+ * @internal
1096
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1097
+ */
1098
+ export namespace InvokeEvalRequestBody$ {
1099
+ /** @deprecated use `InvokeEvalRequestBody$inboundSchema` instead. */
1100
+ export const inboundSchema = InvokeEvalRequestBody$inboundSchema;
1101
+ /** @deprecated use `InvokeEvalRequestBody$outboundSchema` instead. */
1102
+ export const outboundSchema = InvokeEvalRequestBody$outboundSchema;
1103
+ /** @deprecated use `InvokeEvalRequestBody$Outbound` instead. */
1104
+ export type Outbound = InvokeEvalRequestBody$Outbound;
1105
+ }
1106
+
1107
+ export function invokeEvalRequestBodyToJSON(
1108
+ invokeEvalRequestBody: InvokeEvalRequestBody,
1109
+ ): string {
1110
+ return JSON.stringify(
1111
+ InvokeEvalRequestBody$outboundSchema.parse(invokeEvalRequestBody),
1112
+ );
1113
+ }
1114
+
1115
+ export function invokeEvalRequestBodyFromJSON(
1116
+ jsonString: string,
1117
+ ): SafeParseResult<InvokeEvalRequestBody, SDKValidationError> {
1118
+ return safeParse(
1119
+ jsonString,
1120
+ (x) => InvokeEvalRequestBody$inboundSchema.parse(JSON.parse(x)),
1121
+ `Failed to parse 'InvokeEvalRequestBody' from JSON`,
1122
+ );
1123
+ }
1124
+
1125
+ /** @internal */
1126
+ export const InvokeEvalRequest$inboundSchema: z.ZodType<
1127
+ InvokeEvalRequest,
1128
+ z.ZodTypeDef,
1129
+ unknown
1130
+ > = z.object({
1131
+ id: z.string(),
1132
+ RequestBody: z.lazy(() => InvokeEvalRequestBody$inboundSchema).optional(),
1133
+ }).transform((v) => {
1134
+ return remap$(v, {
1135
+ "RequestBody": "requestBody",
1136
+ });
1137
+ });
1138
+
1139
+ /** @internal */
1140
+ export type InvokeEvalRequest$Outbound = {
1141
+ id: string;
1142
+ RequestBody?: InvokeEvalRequestBody$Outbound | undefined;
1143
+ };
1144
+
1145
+ /** @internal */
1146
+ export const InvokeEvalRequest$outboundSchema: z.ZodType<
1147
+ InvokeEvalRequest$Outbound,
1148
+ z.ZodTypeDef,
1149
+ InvokeEvalRequest
1150
+ > = z.object({
1151
+ id: z.string(),
1152
+ requestBody: z.lazy(() => InvokeEvalRequestBody$outboundSchema).optional(),
1153
+ }).transform((v) => {
1154
+ return remap$(v, {
1155
+ requestBody: "RequestBody",
1156
+ });
1157
+ });
1158
+
1159
+ /**
1160
+ * @internal
1161
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1162
+ */
1163
+ export namespace InvokeEvalRequest$ {
1164
+ /** @deprecated use `InvokeEvalRequest$inboundSchema` instead. */
1165
+ export const inboundSchema = InvokeEvalRequest$inboundSchema;
1166
+ /** @deprecated use `InvokeEvalRequest$outboundSchema` instead. */
1167
+ export const outboundSchema = InvokeEvalRequest$outboundSchema;
1168
+ /** @deprecated use `InvokeEvalRequest$Outbound` instead. */
1169
+ export type Outbound = InvokeEvalRequest$Outbound;
1170
+ }
1171
+
1172
+ export function invokeEvalRequestToJSON(
1173
+ invokeEvalRequest: InvokeEvalRequest,
1174
+ ): string {
1175
+ return JSON.stringify(
1176
+ InvokeEvalRequest$outboundSchema.parse(invokeEvalRequest),
1177
+ );
1178
+ }
1179
+
1180
+ export function invokeEvalRequestFromJSON(
1181
+ jsonString: string,
1182
+ ): SafeParseResult<InvokeEvalRequest, SDKValidationError> {
1183
+ return safeParse(
1184
+ jsonString,
1185
+ (x) => InvokeEvalRequest$inboundSchema.parse(JSON.parse(x)),
1186
+ `Failed to parse 'InvokeEvalRequest' from JSON`,
1187
+ );
1188
+ }
1189
+
1190
+ /** @internal */
1191
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$inboundSchema:
1192
+ z.ZodNativeEnum<
1193
+ typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type
1194
+ > = z.nativeEnum(InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type);
1195
+
1196
+ /** @internal */
1197
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$outboundSchema:
1198
+ z.ZodNativeEnum<
1199
+ typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type
1200
+ > = InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$inboundSchema;
1201
+
1202
+ /**
1203
+ * @internal
1204
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1205
+ */
1206
+ export namespace InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$ {
1207
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$inboundSchema` instead. */
1208
+ export const inboundSchema =
1209
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$inboundSchema;
1210
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$outboundSchema` instead. */
1211
+ export const outboundSchema =
1212
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$outboundSchema;
1213
+ }
1214
+
1215
+ /** @internal */
1216
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema:
1217
+ z.ZodType<
1218
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue,
1219
+ z.ZodTypeDef,
1220
+ unknown
1221
+ > = z.union([z.number(), z.boolean()]);
1222
+
1223
+ /** @internal */
1224
+ export type InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$Outbound =
1225
+ | number
1226
+ | boolean;
1227
+
1228
+ /** @internal */
1229
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$outboundSchema:
1230
+ z.ZodType<
1231
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$Outbound,
1232
+ z.ZodTypeDef,
1233
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue
1234
+ > = z.union([z.number(), z.boolean()]);
1235
+
1236
+ /**
1237
+ * @internal
1238
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1239
+ */
1240
+ export namespace InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$ {
1241
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema` instead. */
1242
+ export const inboundSchema =
1243
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema;
1244
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$outboundSchema` instead. */
1245
+ export const outboundSchema =
1246
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$outboundSchema;
1247
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$Outbound` instead. */
1248
+ export type Outbound =
1249
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$Outbound;
1250
+ }
1251
+
1252
+ export function invokeEvalResponseBodyEvalsResponse200ApplicationJSONValueToJSON(
1253
+ invokeEvalResponseBodyEvalsResponse200ApplicationJSONValue:
1254
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue,
1255
+ ): string {
1256
+ return JSON.stringify(
1257
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$outboundSchema
1258
+ .parse(invokeEvalResponseBodyEvalsResponse200ApplicationJSONValue),
1259
+ );
1260
+ }
1261
+
1262
+ export function invokeEvalResponseBodyEvalsResponse200ApplicationJSONValueFromJSON(
1263
+ jsonString: string,
1264
+ ): SafeParseResult<
1265
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue,
1266
+ SDKValidationError
1267
+ > {
1268
+ return safeParse(
1269
+ jsonString,
1270
+ (x) =>
1271
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema
1272
+ .parse(JSON.parse(x)),
1273
+ `Failed to parse 'InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue' from JSON`,
1274
+ );
1275
+ }
1276
+
1277
+ /** @internal */
1278
+ export const InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema:
1279
+ z.ZodType<
1280
+ InvokeEvalResponseBodyEvalsResponse200Value,
1281
+ z.ZodTypeDef,
1282
+ unknown
1283
+ > = z.object({
1284
+ type: z.string(),
1285
+ value: z.union([z.number(), z.boolean()]),
1286
+ });
1287
+
1288
+ /** @internal */
1289
+ export type InvokeEvalResponseBodyEvalsResponse200Value$Outbound = {
1290
+ type: string;
1291
+ value: number | boolean;
1292
+ };
1293
+
1294
+ /** @internal */
1295
+ export const InvokeEvalResponseBodyEvalsResponse200Value$outboundSchema:
1296
+ z.ZodType<
1297
+ InvokeEvalResponseBodyEvalsResponse200Value$Outbound,
1298
+ z.ZodTypeDef,
1299
+ InvokeEvalResponseBodyEvalsResponse200Value
1300
+ > = z.object({
1301
+ type: z.string(),
1302
+ value: z.union([z.number(), z.boolean()]),
1303
+ });
1304
+
1305
+ /**
1306
+ * @internal
1307
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1308
+ */
1309
+ export namespace InvokeEvalResponseBodyEvalsResponse200Value$ {
1310
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema` instead. */
1311
+ export const inboundSchema =
1312
+ InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema;
1313
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200Value$outboundSchema` instead. */
1314
+ export const outboundSchema =
1315
+ InvokeEvalResponseBodyEvalsResponse200Value$outboundSchema;
1316
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200Value$Outbound` instead. */
1317
+ export type Outbound = InvokeEvalResponseBodyEvalsResponse200Value$Outbound;
1318
+ }
1319
+
1320
+ export function invokeEvalResponseBodyEvalsResponse200ValueToJSON(
1321
+ invokeEvalResponseBodyEvalsResponse200Value:
1322
+ InvokeEvalResponseBodyEvalsResponse200Value,
1323
+ ): string {
1324
+ return JSON.stringify(
1325
+ InvokeEvalResponseBodyEvalsResponse200Value$outboundSchema.parse(
1326
+ invokeEvalResponseBodyEvalsResponse200Value,
1327
+ ),
1328
+ );
1329
+ }
1330
+
1331
+ export function invokeEvalResponseBodyEvalsResponse200ValueFromJSON(
1332
+ jsonString: string,
1333
+ ): SafeParseResult<
1334
+ InvokeEvalResponseBodyEvalsResponse200Value,
1335
+ SDKValidationError
1336
+ > {
1337
+ return safeParse(
1338
+ jsonString,
1339
+ (x) =>
1340
+ InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema.parse(
1341
+ JSON.parse(x),
1342
+ ),
1343
+ `Failed to parse 'InvokeEvalResponseBodyEvalsResponse200Value' from JSON`,
1344
+ );
1345
+ }
1346
+
1347
+ /** @internal */
1348
+ export const Eight$inboundSchema: z.ZodType<Eight, z.ZodTypeDef, unknown> = z
1349
+ .object({
1350
+ type:
1351
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$inboundSchema,
1352
+ value: z.nullable(
1353
+ z.lazy(() => InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema),
1354
+ ).optional(),
1355
+ });
1356
+
1357
+ /** @internal */
1358
+ export type Eight$Outbound = {
1359
+ type: string;
1360
+ value?:
1361
+ | InvokeEvalResponseBodyEvalsResponse200Value$Outbound
1362
+ | null
1363
+ | undefined;
1364
+ };
1365
+
1366
+ /** @internal */
1367
+ export const Eight$outboundSchema: z.ZodType<
1368
+ Eight$Outbound,
1369
+ z.ZodTypeDef,
1370
+ Eight
1371
+ > = z.object({
1372
+ type:
1373
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$outboundSchema,
1374
+ value: z.nullable(
1375
+ z.lazy(() => InvokeEvalResponseBodyEvalsResponse200Value$outboundSchema),
1376
+ ).optional(),
1377
+ });
1378
+
1379
+ /**
1380
+ * @internal
1381
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1382
+ */
1383
+ export namespace Eight$ {
1384
+ /** @deprecated use `Eight$inboundSchema` instead. */
1385
+ export const inboundSchema = Eight$inboundSchema;
1386
+ /** @deprecated use `Eight$outboundSchema` instead. */
1387
+ export const outboundSchema = Eight$outboundSchema;
1388
+ /** @deprecated use `Eight$Outbound` instead. */
1389
+ export type Outbound = Eight$Outbound;
1390
+ }
1391
+
1392
+ export function eightToJSON(eight: Eight): string {
1393
+ return JSON.stringify(Eight$outboundSchema.parse(eight));
1394
+ }
1395
+
1396
+ export function eightFromJSON(
1397
+ jsonString: string,
1398
+ ): SafeParseResult<Eight, SDKValidationError> {
1399
+ return safeParse(
1400
+ jsonString,
1401
+ (x) => Eight$inboundSchema.parse(JSON.parse(x)),
1402
+ `Failed to parse 'Eight' from JSON`,
1403
+ );
1404
+ }
1405
+
1406
+ /** @internal */
1407
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$inboundSchema:
1408
+ z.ZodNativeEnum<
1409
+ typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type
1410
+ > = z.nativeEnum(InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type);
1411
+
1412
+ /** @internal */
1413
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$outboundSchema:
1414
+ z.ZodNativeEnum<
1415
+ typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type
1416
+ > = InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$inboundSchema;
1417
+
1418
+ /**
1419
+ * @internal
1420
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1421
+ */
1422
+ export namespace InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$ {
1423
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$inboundSchema` instead. */
1424
+ export const inboundSchema =
1425
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$inboundSchema;
1426
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$outboundSchema` instead. */
1427
+ export const outboundSchema =
1428
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$outboundSchema;
1429
+ }
1430
+
1431
+ /** @internal */
1432
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema:
1433
+ z.ZodType<
1434
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value,
1435
+ z.ZodTypeDef,
1436
+ unknown
1437
+ > = z.union([z.number(), z.boolean(), z.string()]);
1438
+
1439
+ /** @internal */
1440
+ export type InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$Outbound =
1441
+ | number
1442
+ | boolean
1443
+ | string;
1444
+
1445
+ /** @internal */
1446
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$outboundSchema:
1447
+ z.ZodType<
1448
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$Outbound,
1449
+ z.ZodTypeDef,
1450
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value
1451
+ > = z.union([z.number(), z.boolean(), z.string()]);
1452
+
1453
+ /**
1454
+ * @internal
1455
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1456
+ */
1457
+ export namespace InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$ {
1458
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema` instead. */
1459
+ export const inboundSchema =
1460
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema;
1461
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$outboundSchema` instead. */
1462
+ export const outboundSchema =
1463
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$outboundSchema;
1464
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$Outbound` instead. */
1465
+ export type Outbound =
1466
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$Outbound;
1467
+ }
1468
+
1469
+ export function invokeEvalResponseBodyEvalsResponse200ApplicationJSON7ValueToJSON(
1470
+ invokeEvalResponseBodyEvalsResponse200ApplicationJson7Value:
1471
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value,
1472
+ ): string {
1473
+ return JSON.stringify(
1474
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$outboundSchema
1475
+ .parse(invokeEvalResponseBodyEvalsResponse200ApplicationJson7Value),
1476
+ );
1477
+ }
1478
+
1479
+ export function invokeEvalResponseBodyEvalsResponse200ApplicationJSON7ValueFromJSON(
1480
+ jsonString: string,
1481
+ ): SafeParseResult<
1482
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value,
1483
+ SDKValidationError
1484
+ > {
1485
+ return safeParse(
1486
+ jsonString,
1487
+ (x) =>
1488
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema
1489
+ .parse(JSON.parse(x)),
1490
+ `Failed to parse 'InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value' from JSON`,
1491
+ );
1492
+ }
1493
+
1494
+ /** @internal */
1495
+ export const InvokeEvalResponseBodyEvalsResponseValue$inboundSchema: z.ZodType<
1496
+ InvokeEvalResponseBodyEvalsResponseValue,
1497
+ z.ZodTypeDef,
1498
+ unknown
1499
+ > = z.object({
1500
+ workflow_run_id: z.string(),
1501
+ value: z.union([z.number(), z.boolean(), z.string()]),
1502
+ explanation: z.nullable(z.string()).optional(),
1503
+ }).transform((v) => {
1504
+ return remap$(v, {
1505
+ "workflow_run_id": "workflowRunId",
1506
+ });
1507
+ });
1508
+
1509
+ /** @internal */
1510
+ export type InvokeEvalResponseBodyEvalsResponseValue$Outbound = {
1511
+ workflow_run_id: string;
1512
+ value: number | boolean | string;
1513
+ explanation?: string | null | undefined;
1514
+ };
1515
+
1516
+ /** @internal */
1517
+ export const InvokeEvalResponseBodyEvalsResponseValue$outboundSchema: z.ZodType<
1518
+ InvokeEvalResponseBodyEvalsResponseValue$Outbound,
1519
+ z.ZodTypeDef,
1520
+ InvokeEvalResponseBodyEvalsResponseValue
1521
+ > = z.object({
1522
+ workflowRunId: z.string(),
1523
+ value: z.union([z.number(), z.boolean(), z.string()]),
1524
+ explanation: z.nullable(z.string()).optional(),
1525
+ }).transform((v) => {
1526
+ return remap$(v, {
1527
+ workflowRunId: "workflow_run_id",
1528
+ });
1529
+ });
1530
+
1531
+ /**
1532
+ * @internal
1533
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1534
+ */
1535
+ export namespace InvokeEvalResponseBodyEvalsResponseValue$ {
1536
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponseValue$inboundSchema` instead. */
1537
+ export const inboundSchema =
1538
+ InvokeEvalResponseBodyEvalsResponseValue$inboundSchema;
1539
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponseValue$outboundSchema` instead. */
1540
+ export const outboundSchema =
1541
+ InvokeEvalResponseBodyEvalsResponseValue$outboundSchema;
1542
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponseValue$Outbound` instead. */
1543
+ export type Outbound = InvokeEvalResponseBodyEvalsResponseValue$Outbound;
1544
+ }
1545
+
1546
+ export function invokeEvalResponseBodyEvalsResponseValueToJSON(
1547
+ invokeEvalResponseBodyEvalsResponseValue:
1548
+ InvokeEvalResponseBodyEvalsResponseValue,
1549
+ ): string {
1550
+ return JSON.stringify(
1551
+ InvokeEvalResponseBodyEvalsResponseValue$outboundSchema.parse(
1552
+ invokeEvalResponseBodyEvalsResponseValue,
1553
+ ),
1554
+ );
1555
+ }
1556
+
1557
+ export function invokeEvalResponseBodyEvalsResponseValueFromJSON(
1558
+ jsonString: string,
1559
+ ): SafeParseResult<
1560
+ InvokeEvalResponseBodyEvalsResponseValue,
1561
+ SDKValidationError
1562
+ > {
1563
+ return safeParse(
1564
+ jsonString,
1565
+ (x) =>
1566
+ InvokeEvalResponseBodyEvalsResponseValue$inboundSchema.parse(
1567
+ JSON.parse(x),
1568
+ ),
1569
+ `Failed to parse 'InvokeEvalResponseBodyEvalsResponseValue' from JSON`,
1570
+ );
1571
+ }
1572
+
1573
+ /** @internal */
1574
+ export const Seven$inboundSchema: z.ZodType<Seven, z.ZodTypeDef, unknown> = z
1575
+ .object({
1576
+ type:
1577
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$inboundSchema,
1578
+ value: z.nullable(
1579
+ z.lazy(() => InvokeEvalResponseBodyEvalsResponseValue$inboundSchema),
1580
+ ),
1581
+ });
1582
+
1583
+ /** @internal */
1584
+ export type Seven$Outbound = {
1585
+ type: string;
1586
+ value: InvokeEvalResponseBodyEvalsResponseValue$Outbound | null;
1587
+ };
1588
+
1589
+ /** @internal */
1590
+ export const Seven$outboundSchema: z.ZodType<
1591
+ Seven$Outbound,
1592
+ z.ZodTypeDef,
1593
+ Seven
1594
+ > = z.object({
1595
+ type:
1596
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$outboundSchema,
1597
+ value: z.nullable(
1598
+ z.lazy(() => InvokeEvalResponseBodyEvalsResponseValue$outboundSchema),
1599
+ ),
1600
+ });
1601
+
1602
+ /**
1603
+ * @internal
1604
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1605
+ */
1606
+ export namespace Seven$ {
1607
+ /** @deprecated use `Seven$inboundSchema` instead. */
1608
+ export const inboundSchema = Seven$inboundSchema;
1609
+ /** @deprecated use `Seven$outboundSchema` instead. */
1610
+ export const outboundSchema = Seven$outboundSchema;
1611
+ /** @deprecated use `Seven$Outbound` instead. */
1612
+ export type Outbound = Seven$Outbound;
1613
+ }
1614
+
1615
+ export function sevenToJSON(seven: Seven): string {
1616
+ return JSON.stringify(Seven$outboundSchema.parse(seven));
1617
+ }
1618
+
1619
+ export function sevenFromJSON(
1620
+ jsonString: string,
1621
+ ): SafeParseResult<Seven, SDKValidationError> {
1622
+ return safeParse(
1623
+ jsonString,
1624
+ (x) => Seven$inboundSchema.parse(JSON.parse(x)),
1625
+ `Failed to parse 'Seven' from JSON`,
1626
+ );
1627
+ }
1628
+
1629
+ /** @internal */
1630
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$inboundSchema:
1631
+ z.ZodNativeEnum<
1632
+ typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type
1633
+ > = z.nativeEnum(InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type);
1634
+
1635
+ /** @internal */
1636
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$outboundSchema:
1637
+ z.ZodNativeEnum<
1638
+ typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type
1639
+ > = InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$inboundSchema;
1640
+
1641
+ /**
1642
+ * @internal
1643
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1644
+ */
1645
+ export namespace InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$ {
1646
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$inboundSchema` instead. */
1647
+ export const inboundSchema =
1648
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$inboundSchema;
1649
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$outboundSchema` instead. */
1650
+ export const outboundSchema =
1651
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$outboundSchema;
1652
+ }
1653
+
1654
+ /** @internal */
1655
+ export const InvokeEvalResponseBodyEvalsValue$inboundSchema: z.ZodType<
1656
+ InvokeEvalResponseBodyEvalsValue,
1657
+ z.ZodTypeDef,
1658
+ unknown
1659
+ > = z.object({
1660
+ f1: z.number(),
1661
+ precision: z.number(),
1662
+ recall: z.number(),
1663
+ });
1664
+
1665
+ /** @internal */
1666
+ export type InvokeEvalResponseBodyEvalsValue$Outbound = {
1667
+ f1: number;
1668
+ precision: number;
1669
+ recall: number;
1670
+ };
1671
+
1672
+ /** @internal */
1673
+ export const InvokeEvalResponseBodyEvalsValue$outboundSchema: z.ZodType<
1674
+ InvokeEvalResponseBodyEvalsValue$Outbound,
1675
+ z.ZodTypeDef,
1676
+ InvokeEvalResponseBodyEvalsValue
1677
+ > = z.object({
1678
+ f1: z.number(),
1679
+ precision: z.number(),
1680
+ recall: z.number(),
1681
+ });
1682
+
1683
+ /**
1684
+ * @internal
1685
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1686
+ */
1687
+ export namespace InvokeEvalResponseBodyEvalsValue$ {
1688
+ /** @deprecated use `InvokeEvalResponseBodyEvalsValue$inboundSchema` instead. */
1689
+ export const inboundSchema = InvokeEvalResponseBodyEvalsValue$inboundSchema;
1690
+ /** @deprecated use `InvokeEvalResponseBodyEvalsValue$outboundSchema` instead. */
1691
+ export const outboundSchema = InvokeEvalResponseBodyEvalsValue$outboundSchema;
1692
+ /** @deprecated use `InvokeEvalResponseBodyEvalsValue$Outbound` instead. */
1693
+ export type Outbound = InvokeEvalResponseBodyEvalsValue$Outbound;
1694
+ }
1695
+
1696
+ export function invokeEvalResponseBodyEvalsValueToJSON(
1697
+ invokeEvalResponseBodyEvalsValue: InvokeEvalResponseBodyEvalsValue,
1698
+ ): string {
1699
+ return JSON.stringify(
1700
+ InvokeEvalResponseBodyEvalsValue$outboundSchema.parse(
1701
+ invokeEvalResponseBodyEvalsValue,
1702
+ ),
1703
+ );
1704
+ }
1705
+
1706
+ export function invokeEvalResponseBodyEvalsValueFromJSON(
1707
+ jsonString: string,
1708
+ ): SafeParseResult<InvokeEvalResponseBodyEvalsValue, SDKValidationError> {
1709
+ return safeParse(
1710
+ jsonString,
1711
+ (x) => InvokeEvalResponseBodyEvalsValue$inboundSchema.parse(JSON.parse(x)),
1712
+ `Failed to parse 'InvokeEvalResponseBodyEvalsValue' from JSON`,
1713
+ );
1714
+ }
1715
+
1716
+ /** @internal */
1717
+ export const Six$inboundSchema: z.ZodType<Six, z.ZodTypeDef, unknown> = z
1718
+ .object({
1719
+ type:
1720
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$inboundSchema,
1721
+ value: z.lazy(() => InvokeEvalResponseBodyEvalsValue$inboundSchema),
1722
+ });
1723
+
1724
+ /** @internal */
1725
+ export type Six$Outbound = {
1726
+ type: string;
1727
+ value: InvokeEvalResponseBodyEvalsValue$Outbound;
1728
+ };
1729
+
1730
+ /** @internal */
1731
+ export const Six$outboundSchema: z.ZodType<Six$Outbound, z.ZodTypeDef, Six> = z
1732
+ .object({
1733
+ type:
1734
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$outboundSchema,
1735
+ value: z.lazy(() => InvokeEvalResponseBodyEvalsValue$outboundSchema),
1736
+ });
1737
+
1738
+ /**
1739
+ * @internal
1740
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1741
+ */
1742
+ export namespace Six$ {
1743
+ /** @deprecated use `Six$inboundSchema` instead. */
1744
+ export const inboundSchema = Six$inboundSchema;
1745
+ /** @deprecated use `Six$outboundSchema` instead. */
1746
+ export const outboundSchema = Six$outboundSchema;
1747
+ /** @deprecated use `Six$Outbound` instead. */
1748
+ export type Outbound = Six$Outbound;
1749
+ }
1750
+
1751
+ export function sixToJSON(six: Six): string {
1752
+ return JSON.stringify(Six$outboundSchema.parse(six));
1753
+ }
1754
+
1755
+ export function sixFromJSON(
1756
+ jsonString: string,
1757
+ ): SafeParseResult<Six, SDKValidationError> {
1758
+ return safeParse(
1759
+ jsonString,
1760
+ (x) => Six$inboundSchema.parse(JSON.parse(x)),
1761
+ `Failed to parse 'Six' from JSON`,
1762
+ );
1763
+ }
1764
+
1765
+ /** @internal */
1766
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$inboundSchema:
1767
+ z.ZodNativeEnum<
1768
+ typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType
1769
+ > = z.nativeEnum(InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType);
1770
+
1771
+ /** @internal */
1772
+ export const InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$outboundSchema:
1773
+ z.ZodNativeEnum<
1774
+ typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType
1775
+ > = InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$inboundSchema;
1776
+
1777
+ /**
1778
+ * @internal
1779
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1780
+ */
1781
+ export namespace InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$ {
1782
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$inboundSchema` instead. */
1783
+ export const inboundSchema =
1784
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$inboundSchema;
1785
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$outboundSchema` instead. */
1786
+ export const outboundSchema =
1787
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$outboundSchema;
1788
+ }
1789
+
1790
+ /** @internal */
1791
+ export const Rouge1$inboundSchema: z.ZodType<Rouge1, z.ZodTypeDef, unknown> = z
1792
+ .object({
1793
+ f1: z.number(),
1794
+ precision: z.number(),
1795
+ recall: z.number(),
1796
+ });
1797
+
1798
+ /** @internal */
1799
+ export type Rouge1$Outbound = {
1800
+ f1: number;
1801
+ precision: number;
1802
+ recall: number;
1803
+ };
1804
+
1805
+ /** @internal */
1806
+ export const Rouge1$outboundSchema: z.ZodType<
1807
+ Rouge1$Outbound,
1808
+ z.ZodTypeDef,
1809
+ Rouge1
1810
+ > = z.object({
1811
+ f1: z.number(),
1812
+ precision: z.number(),
1813
+ recall: z.number(),
1814
+ });
1815
+
1816
+ /**
1817
+ * @internal
1818
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1819
+ */
1820
+ export namespace Rouge1$ {
1821
+ /** @deprecated use `Rouge1$inboundSchema` instead. */
1822
+ export const inboundSchema = Rouge1$inboundSchema;
1823
+ /** @deprecated use `Rouge1$outboundSchema` instead. */
1824
+ export const outboundSchema = Rouge1$outboundSchema;
1825
+ /** @deprecated use `Rouge1$Outbound` instead. */
1826
+ export type Outbound = Rouge1$Outbound;
1827
+ }
1828
+
1829
+ export function rouge1ToJSON(rouge1: Rouge1): string {
1830
+ return JSON.stringify(Rouge1$outboundSchema.parse(rouge1));
1831
+ }
1832
+
1833
+ export function rouge1FromJSON(
1834
+ jsonString: string,
1835
+ ): SafeParseResult<Rouge1, SDKValidationError> {
1836
+ return safeParse(
1837
+ jsonString,
1838
+ (x) => Rouge1$inboundSchema.parse(JSON.parse(x)),
1839
+ `Failed to parse 'Rouge1' from JSON`,
1840
+ );
1841
+ }
1842
+
1843
+ /** @internal */
1844
+ export const Rouge2$inboundSchema: z.ZodType<Rouge2, z.ZodTypeDef, unknown> = z
1845
+ .object({
1846
+ f1: z.number(),
1847
+ precision: z.number(),
1848
+ recall: z.number(),
1849
+ });
1850
+
1851
+ /** @internal */
1852
+ export type Rouge2$Outbound = {
1853
+ f1: number;
1854
+ precision: number;
1855
+ recall: number;
1856
+ };
1857
+
1858
+ /** @internal */
1859
+ export const Rouge2$outboundSchema: z.ZodType<
1860
+ Rouge2$Outbound,
1861
+ z.ZodTypeDef,
1862
+ Rouge2
1863
+ > = z.object({
1864
+ f1: z.number(),
1865
+ precision: z.number(),
1866
+ recall: z.number(),
1867
+ });
1868
+
1869
+ /**
1870
+ * @internal
1871
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1872
+ */
1873
+ export namespace Rouge2$ {
1874
+ /** @deprecated use `Rouge2$inboundSchema` instead. */
1875
+ export const inboundSchema = Rouge2$inboundSchema;
1876
+ /** @deprecated use `Rouge2$outboundSchema` instead. */
1877
+ export const outboundSchema = Rouge2$outboundSchema;
1878
+ /** @deprecated use `Rouge2$Outbound` instead. */
1879
+ export type Outbound = Rouge2$Outbound;
1880
+ }
1881
+
1882
+ export function rouge2ToJSON(rouge2: Rouge2): string {
1883
+ return JSON.stringify(Rouge2$outboundSchema.parse(rouge2));
1884
+ }
1885
+
1886
+ export function rouge2FromJSON(
1887
+ jsonString: string,
1888
+ ): SafeParseResult<Rouge2, SDKValidationError> {
1889
+ return safeParse(
1890
+ jsonString,
1891
+ (x) => Rouge2$inboundSchema.parse(JSON.parse(x)),
1892
+ `Failed to parse 'Rouge2' from JSON`,
1893
+ );
1894
+ }
1895
+
1896
+ /** @internal */
1897
+ export const RougeL$inboundSchema: z.ZodType<RougeL, z.ZodTypeDef, unknown> = z
1898
+ .object({
1899
+ f1: z.number(),
1900
+ precision: z.number(),
1901
+ recall: z.number(),
1902
+ });
1903
+
1904
+ /** @internal */
1905
+ export type RougeL$Outbound = {
1906
+ f1: number;
1907
+ precision: number;
1908
+ recall: number;
1909
+ };
1910
+
1911
+ /** @internal */
1912
+ export const RougeL$outboundSchema: z.ZodType<
1913
+ RougeL$Outbound,
1914
+ z.ZodTypeDef,
1915
+ RougeL
1916
+ > = z.object({
1917
+ f1: z.number(),
1918
+ precision: z.number(),
1919
+ recall: z.number(),
1920
+ });
1921
+
1922
+ /**
1923
+ * @internal
1924
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1925
+ */
1926
+ export namespace RougeL$ {
1927
+ /** @deprecated use `RougeL$inboundSchema` instead. */
1928
+ export const inboundSchema = RougeL$inboundSchema;
1929
+ /** @deprecated use `RougeL$outboundSchema` instead. */
1930
+ export const outboundSchema = RougeL$outboundSchema;
1931
+ /** @deprecated use `RougeL$Outbound` instead. */
1932
+ export type Outbound = RougeL$Outbound;
1933
+ }
1934
+
1935
+ export function rougeLToJSON(rougeL: RougeL): string {
1936
+ return JSON.stringify(RougeL$outboundSchema.parse(rougeL));
1937
+ }
1938
+
1939
+ export function rougeLFromJSON(
1940
+ jsonString: string,
1941
+ ): SafeParseResult<RougeL, SDKValidationError> {
1942
+ return safeParse(
1943
+ jsonString,
1944
+ (x) => RougeL$inboundSchema.parse(JSON.parse(x)),
1945
+ `Failed to parse 'RougeL' from JSON`,
1946
+ );
1947
+ }
1948
+
1949
+ /** @internal */
1950
+ export const InvokeEvalResponseBodyValue$inboundSchema: z.ZodType<
1951
+ InvokeEvalResponseBodyValue,
1952
+ z.ZodTypeDef,
1953
+ unknown
1954
+ > = z.object({
1955
+ rouge_1: z.lazy(() => Rouge1$inboundSchema),
1956
+ rouge_2: z.lazy(() => Rouge2$inboundSchema),
1957
+ rouge_l: z.lazy(() => RougeL$inboundSchema),
1958
+ }).transform((v) => {
1959
+ return remap$(v, {
1960
+ "rouge_1": "rouge1",
1961
+ "rouge_2": "rouge2",
1962
+ "rouge_l": "rougeL",
1963
+ });
1964
+ });
1965
+
1966
+ /** @internal */
1967
+ export type InvokeEvalResponseBodyValue$Outbound = {
1968
+ rouge_1: Rouge1$Outbound;
1969
+ rouge_2: Rouge2$Outbound;
1970
+ rouge_l: RougeL$Outbound;
1971
+ };
1972
+
1973
+ /** @internal */
1974
+ export const InvokeEvalResponseBodyValue$outboundSchema: z.ZodType<
1975
+ InvokeEvalResponseBodyValue$Outbound,
1976
+ z.ZodTypeDef,
1977
+ InvokeEvalResponseBodyValue
1978
+ > = z.object({
1979
+ rouge1: z.lazy(() => Rouge1$outboundSchema),
1980
+ rouge2: z.lazy(() => Rouge2$outboundSchema),
1981
+ rougeL: z.lazy(() => RougeL$outboundSchema),
1982
+ }).transform((v) => {
1983
+ return remap$(v, {
1984
+ rouge1: "rouge_1",
1985
+ rouge2: "rouge_2",
1986
+ rougeL: "rouge_l",
1987
+ });
1988
+ });
1989
+
1990
+ /**
1991
+ * @internal
1992
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1993
+ */
1994
+ export namespace InvokeEvalResponseBodyValue$ {
1995
+ /** @deprecated use `InvokeEvalResponseBodyValue$inboundSchema` instead. */
1996
+ export const inboundSchema = InvokeEvalResponseBodyValue$inboundSchema;
1997
+ /** @deprecated use `InvokeEvalResponseBodyValue$outboundSchema` instead. */
1998
+ export const outboundSchema = InvokeEvalResponseBodyValue$outboundSchema;
1999
+ /** @deprecated use `InvokeEvalResponseBodyValue$Outbound` instead. */
2000
+ export type Outbound = InvokeEvalResponseBodyValue$Outbound;
2001
+ }
2002
+
2003
+ export function invokeEvalResponseBodyValueToJSON(
2004
+ invokeEvalResponseBodyValue: InvokeEvalResponseBodyValue,
2005
+ ): string {
2006
+ return JSON.stringify(
2007
+ InvokeEvalResponseBodyValue$outboundSchema.parse(
2008
+ invokeEvalResponseBodyValue,
2009
+ ),
2010
+ );
2011
+ }
2012
+
2013
+ export function invokeEvalResponseBodyValueFromJSON(
2014
+ jsonString: string,
2015
+ ): SafeParseResult<InvokeEvalResponseBodyValue, SDKValidationError> {
2016
+ return safeParse(
2017
+ jsonString,
2018
+ (x) => InvokeEvalResponseBodyValue$inboundSchema.parse(JSON.parse(x)),
2019
+ `Failed to parse 'InvokeEvalResponseBodyValue' from JSON`,
2020
+ );
2021
+ }
2022
+
2023
+ /** @internal */
2024
+ export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
2025
+ .object({
2026
+ type:
2027
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$inboundSchema,
2028
+ value: z.lazy(() => InvokeEvalResponseBodyValue$inboundSchema),
2029
+ });
2030
+
2031
+ /** @internal */
2032
+ export type Five$Outbound = {
2033
+ type: string;
2034
+ value: InvokeEvalResponseBodyValue$Outbound;
2035
+ };
2036
+
2037
+ /** @internal */
2038
+ export const Five$outboundSchema: z.ZodType<Five$Outbound, z.ZodTypeDef, Five> =
2039
+ z.object({
2040
+ type:
2041
+ InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$outboundSchema,
2042
+ value: z.lazy(() => InvokeEvalResponseBodyValue$outboundSchema),
2043
+ });
2044
+
2045
+ /**
2046
+ * @internal
2047
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2048
+ */
2049
+ export namespace Five$ {
2050
+ /** @deprecated use `Five$inboundSchema` instead. */
2051
+ export const inboundSchema = Five$inboundSchema;
2052
+ /** @deprecated use `Five$outboundSchema` instead. */
2053
+ export const outboundSchema = Five$outboundSchema;
2054
+ /** @deprecated use `Five$Outbound` instead. */
2055
+ export type Outbound = Five$Outbound;
2056
+ }
2057
+
2058
+ export function fiveToJSON(five: Five): string {
2059
+ return JSON.stringify(Five$outboundSchema.parse(five));
2060
+ }
2061
+
2062
+ export function fiveFromJSON(
2063
+ jsonString: string,
2064
+ ): SafeParseResult<Five, SDKValidationError> {
2065
+ return safeParse(
2066
+ jsonString,
2067
+ (x) => Five$inboundSchema.parse(JSON.parse(x)),
2068
+ `Failed to parse 'Five' from JSON`,
2069
+ );
2070
+ }
2071
+
2072
+ /** @internal */
2073
+ export const InvokeEvalResponseBodyEvalsResponse200Type$inboundSchema:
2074
+ z.ZodNativeEnum<typeof InvokeEvalResponseBodyEvalsResponse200Type> = z
2075
+ .nativeEnum(InvokeEvalResponseBodyEvalsResponse200Type);
2076
+
2077
+ /** @internal */
2078
+ export const InvokeEvalResponseBodyEvalsResponse200Type$outboundSchema:
2079
+ z.ZodNativeEnum<typeof InvokeEvalResponseBodyEvalsResponse200Type> =
2080
+ InvokeEvalResponseBodyEvalsResponse200Type$inboundSchema;
2081
+
2082
+ /**
2083
+ * @internal
2084
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2085
+ */
2086
+ export namespace InvokeEvalResponseBodyEvalsResponse200Type$ {
2087
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200Type$inboundSchema` instead. */
2088
+ export const inboundSchema =
2089
+ InvokeEvalResponseBodyEvalsResponse200Type$inboundSchema;
2090
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponse200Type$outboundSchema` instead. */
2091
+ export const outboundSchema =
2092
+ InvokeEvalResponseBodyEvalsResponse200Type$outboundSchema;
2093
+ }
2094
+
2095
+ /** @internal */
2096
+ export const ResponseBody4$inboundSchema: z.ZodType<
2097
+ ResponseBody4,
2098
+ z.ZodTypeDef,
2099
+ unknown
2100
+ > = z.object({
2101
+ type: InvokeEvalResponseBodyEvalsResponse200Type$inboundSchema,
2102
+ values: z.array(z.nullable(z.string())),
2103
+ });
2104
+
2105
+ /** @internal */
2106
+ export type ResponseBody4$Outbound = {
2107
+ type: string;
2108
+ values: Array<string | null>;
2109
+ };
2110
+
2111
+ /** @internal */
2112
+ export const ResponseBody4$outboundSchema: z.ZodType<
2113
+ ResponseBody4$Outbound,
2114
+ z.ZodTypeDef,
2115
+ ResponseBody4
2116
+ > = z.object({
2117
+ type: InvokeEvalResponseBodyEvalsResponse200Type$outboundSchema,
2118
+ values: z.array(z.nullable(z.string())),
2119
+ });
2120
+
2121
+ /**
2122
+ * @internal
2123
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2124
+ */
2125
+ export namespace ResponseBody4$ {
2126
+ /** @deprecated use `ResponseBody4$inboundSchema` instead. */
2127
+ export const inboundSchema = ResponseBody4$inboundSchema;
2128
+ /** @deprecated use `ResponseBody4$outboundSchema` instead. */
2129
+ export const outboundSchema = ResponseBody4$outboundSchema;
2130
+ /** @deprecated use `ResponseBody4$Outbound` instead. */
2131
+ export type Outbound = ResponseBody4$Outbound;
2132
+ }
2133
+
2134
+ export function responseBody4ToJSON(responseBody4: ResponseBody4): string {
2135
+ return JSON.stringify(ResponseBody4$outboundSchema.parse(responseBody4));
2136
+ }
2137
+
2138
+ export function responseBody4FromJSON(
2139
+ jsonString: string,
2140
+ ): SafeParseResult<ResponseBody4, SDKValidationError> {
2141
+ return safeParse(
2142
+ jsonString,
2143
+ (x) => ResponseBody4$inboundSchema.parse(JSON.parse(x)),
2144
+ `Failed to parse 'ResponseBody4' from JSON`,
2145
+ );
2146
+ }
2147
+
2148
+ /** @internal */
2149
+ export const InvokeEvalResponseBodyEvalsResponseType$inboundSchema:
2150
+ z.ZodNativeEnum<typeof InvokeEvalResponseBodyEvalsResponseType> = z
2151
+ .nativeEnum(InvokeEvalResponseBodyEvalsResponseType);
2152
+
2153
+ /** @internal */
2154
+ export const InvokeEvalResponseBodyEvalsResponseType$outboundSchema:
2155
+ z.ZodNativeEnum<typeof InvokeEvalResponseBodyEvalsResponseType> =
2156
+ InvokeEvalResponseBodyEvalsResponseType$inboundSchema;
2157
+
2158
+ /**
2159
+ * @internal
2160
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2161
+ */
2162
+ export namespace InvokeEvalResponseBodyEvalsResponseType$ {
2163
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponseType$inboundSchema` instead. */
2164
+ export const inboundSchema =
2165
+ InvokeEvalResponseBodyEvalsResponseType$inboundSchema;
2166
+ /** @deprecated use `InvokeEvalResponseBodyEvalsResponseType$outboundSchema` instead. */
2167
+ export const outboundSchema =
2168
+ InvokeEvalResponseBodyEvalsResponseType$outboundSchema;
2169
+ }
2170
+
2171
+ /** @internal */
2172
+ export const ResponseBodyValue$inboundSchema: z.ZodType<
2173
+ ResponseBodyValue,
2174
+ z.ZodTypeDef,
2175
+ unknown
2176
+ > = z.union([z.boolean(), z.string(), z.number()]);
2177
+
2178
+ /** @internal */
2179
+ export type ResponseBodyValue$Outbound = boolean | string | number;
2180
+
2181
+ /** @internal */
2182
+ export const ResponseBodyValue$outboundSchema: z.ZodType<
2183
+ ResponseBodyValue$Outbound,
2184
+ z.ZodTypeDef,
2185
+ ResponseBodyValue
2186
+ > = z.union([z.boolean(), z.string(), z.number()]);
2187
+
2188
+ /**
2189
+ * @internal
2190
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2191
+ */
2192
+ export namespace ResponseBodyValue$ {
2193
+ /** @deprecated use `ResponseBodyValue$inboundSchema` instead. */
2194
+ export const inboundSchema = ResponseBodyValue$inboundSchema;
2195
+ /** @deprecated use `ResponseBodyValue$outboundSchema` instead. */
2196
+ export const outboundSchema = ResponseBodyValue$outboundSchema;
2197
+ /** @deprecated use `ResponseBodyValue$Outbound` instead. */
2198
+ export type Outbound = ResponseBodyValue$Outbound;
2199
+ }
2200
+
2201
+ export function responseBodyValueToJSON(
2202
+ responseBodyValue: ResponseBodyValue,
2203
+ ): string {
2204
+ return JSON.stringify(
2205
+ ResponseBodyValue$outboundSchema.parse(responseBodyValue),
2206
+ );
2207
+ }
2208
+
2209
+ export function responseBodyValueFromJSON(
2210
+ jsonString: string,
2211
+ ): SafeParseResult<ResponseBodyValue, SDKValidationError> {
2212
+ return safeParse(
2213
+ jsonString,
2214
+ (x) => ResponseBodyValue$inboundSchema.parse(JSON.parse(x)),
2215
+ `Failed to parse 'ResponseBodyValue' from JSON`,
2216
+ );
2217
+ }
2218
+
2219
+ /** @internal */
2220
+ export const ResponseBody3$inboundSchema: z.ZodType<
2221
+ ResponseBody3,
2222
+ z.ZodTypeDef,
2223
+ unknown
2224
+ > = z.object({
2225
+ type: InvokeEvalResponseBodyEvalsResponseType$inboundSchema,
2226
+ value: z.nullable(z.union([z.boolean(), z.string(), z.number()])),
2227
+ });
2228
+
2229
+ /** @internal */
2230
+ export type ResponseBody3$Outbound = {
2231
+ type: string;
2232
+ value: boolean | string | number | null;
2233
+ };
2234
+
2235
+ /** @internal */
2236
+ export const ResponseBody3$outboundSchema: z.ZodType<
2237
+ ResponseBody3$Outbound,
2238
+ z.ZodTypeDef,
2239
+ ResponseBody3
2240
+ > = z.object({
2241
+ type: InvokeEvalResponseBodyEvalsResponseType$outboundSchema,
2242
+ value: z.nullable(z.union([z.boolean(), z.string(), z.number()])),
2243
+ });
2244
+
2245
+ /**
2246
+ * @internal
2247
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2248
+ */
2249
+ export namespace ResponseBody3$ {
2250
+ /** @deprecated use `ResponseBody3$inboundSchema` instead. */
2251
+ export const inboundSchema = ResponseBody3$inboundSchema;
2252
+ /** @deprecated use `ResponseBody3$outboundSchema` instead. */
2253
+ export const outboundSchema = ResponseBody3$outboundSchema;
2254
+ /** @deprecated use `ResponseBody3$Outbound` instead. */
2255
+ export type Outbound = ResponseBody3$Outbound;
2256
+ }
2257
+
2258
+ export function responseBody3ToJSON(responseBody3: ResponseBody3): string {
2259
+ return JSON.stringify(ResponseBody3$outboundSchema.parse(responseBody3));
2260
+ }
2261
+
2262
+ export function responseBody3FromJSON(
2263
+ jsonString: string,
2264
+ ): SafeParseResult<ResponseBody3, SDKValidationError> {
2265
+ return safeParse(
2266
+ jsonString,
2267
+ (x) => ResponseBody3$inboundSchema.parse(JSON.parse(x)),
2268
+ `Failed to parse 'ResponseBody3' from JSON`,
2269
+ );
2270
+ }
2271
+
2272
+ /** @internal */
2273
+ export const InvokeEvalResponseBodyEvalsType$inboundSchema: z.ZodNativeEnum<
2274
+ typeof InvokeEvalResponseBodyEvalsType
2275
+ > = z.nativeEnum(InvokeEvalResponseBodyEvalsType);
2276
+
2277
+ /** @internal */
2278
+ export const InvokeEvalResponseBodyEvalsType$outboundSchema: z.ZodNativeEnum<
2279
+ typeof InvokeEvalResponseBodyEvalsType
2280
+ > = InvokeEvalResponseBodyEvalsType$inboundSchema;
2281
+
2282
+ /**
2283
+ * @internal
2284
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2285
+ */
2286
+ export namespace InvokeEvalResponseBodyEvalsType$ {
2287
+ /** @deprecated use `InvokeEvalResponseBodyEvalsType$inboundSchema` instead. */
2288
+ export const inboundSchema = InvokeEvalResponseBodyEvalsType$inboundSchema;
2289
+ /** @deprecated use `InvokeEvalResponseBodyEvalsType$outboundSchema` instead. */
2290
+ export const outboundSchema = InvokeEvalResponseBodyEvalsType$outboundSchema;
2291
+ }
2292
+
2293
+ /** @internal */
2294
+ export const ResponseBody2$inboundSchema: z.ZodType<
2295
+ ResponseBody2,
2296
+ z.ZodTypeDef,
2297
+ unknown
2298
+ > = z.object({
2299
+ type: InvokeEvalResponseBodyEvalsType$inboundSchema,
2300
+ value: z.nullable(z.number()),
2301
+ });
2302
+
2303
+ /** @internal */
2304
+ export type ResponseBody2$Outbound = {
2305
+ type: string;
2306
+ value: number | null;
2307
+ };
2308
+
2309
+ /** @internal */
2310
+ export const ResponseBody2$outboundSchema: z.ZodType<
2311
+ ResponseBody2$Outbound,
2312
+ z.ZodTypeDef,
2313
+ ResponseBody2
2314
+ > = z.object({
2315
+ type: InvokeEvalResponseBodyEvalsType$outboundSchema,
2316
+ value: z.nullable(z.number()),
2317
+ });
2318
+
2319
+ /**
2320
+ * @internal
2321
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2322
+ */
2323
+ export namespace ResponseBody2$ {
2324
+ /** @deprecated use `ResponseBody2$inboundSchema` instead. */
2325
+ export const inboundSchema = ResponseBody2$inboundSchema;
2326
+ /** @deprecated use `ResponseBody2$outboundSchema` instead. */
2327
+ export const outboundSchema = ResponseBody2$outboundSchema;
2328
+ /** @deprecated use `ResponseBody2$Outbound` instead. */
2329
+ export type Outbound = ResponseBody2$Outbound;
2330
+ }
2331
+
2332
+ export function responseBody2ToJSON(responseBody2: ResponseBody2): string {
2333
+ return JSON.stringify(ResponseBody2$outboundSchema.parse(responseBody2));
2334
+ }
2335
+
2336
+ export function responseBody2FromJSON(
2337
+ jsonString: string,
2338
+ ): SafeParseResult<ResponseBody2, SDKValidationError> {
2339
+ return safeParse(
2340
+ jsonString,
2341
+ (x) => ResponseBody2$inboundSchema.parse(JSON.parse(x)),
2342
+ `Failed to parse 'ResponseBody2' from JSON`,
2343
+ );
2344
+ }
2345
+
2346
+ /** @internal */
2347
+ export const InvokeEvalResponseBodyType$inboundSchema: z.ZodNativeEnum<
2348
+ typeof InvokeEvalResponseBodyType
2349
+ > = z.nativeEnum(InvokeEvalResponseBodyType);
2350
+
2351
+ /** @internal */
2352
+ export const InvokeEvalResponseBodyType$outboundSchema: z.ZodNativeEnum<
2353
+ typeof InvokeEvalResponseBodyType
2354
+ > = InvokeEvalResponseBodyType$inboundSchema;
2355
+
2356
+ /**
2357
+ * @internal
2358
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2359
+ */
2360
+ export namespace InvokeEvalResponseBodyType$ {
2361
+ /** @deprecated use `InvokeEvalResponseBodyType$inboundSchema` instead. */
2362
+ export const inboundSchema = InvokeEvalResponseBodyType$inboundSchema;
2363
+ /** @deprecated use `InvokeEvalResponseBodyType$outboundSchema` instead. */
2364
+ export const outboundSchema = InvokeEvalResponseBodyType$outboundSchema;
2365
+ }
2366
+
2367
+ /** @internal */
2368
+ export const ResponseBody1$inboundSchema: z.ZodType<
2369
+ ResponseBody1,
2370
+ z.ZodTypeDef,
2371
+ unknown
2372
+ > = z.object({
2373
+ type: InvokeEvalResponseBodyType$inboundSchema,
2374
+ value: z.nullable(z.string()),
2375
+ });
2376
+
2377
+ /** @internal */
2378
+ export type ResponseBody1$Outbound = {
2379
+ type: string;
2380
+ value: string | null;
2381
+ };
2382
+
2383
+ /** @internal */
2384
+ export const ResponseBody1$outboundSchema: z.ZodType<
2385
+ ResponseBody1$Outbound,
2386
+ z.ZodTypeDef,
2387
+ ResponseBody1
2388
+ > = z.object({
2389
+ type: InvokeEvalResponseBodyType$outboundSchema,
2390
+ value: z.nullable(z.string()),
2391
+ });
2392
+
2393
+ /**
2394
+ * @internal
2395
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2396
+ */
2397
+ export namespace ResponseBody1$ {
2398
+ /** @deprecated use `ResponseBody1$inboundSchema` instead. */
2399
+ export const inboundSchema = ResponseBody1$inboundSchema;
2400
+ /** @deprecated use `ResponseBody1$outboundSchema` instead. */
2401
+ export const outboundSchema = ResponseBody1$outboundSchema;
2402
+ /** @deprecated use `ResponseBody1$Outbound` instead. */
2403
+ export type Outbound = ResponseBody1$Outbound;
2404
+ }
2405
+
2406
+ export function responseBody1ToJSON(responseBody1: ResponseBody1): string {
2407
+ return JSON.stringify(ResponseBody1$outboundSchema.parse(responseBody1));
2408
+ }
2409
+
2410
+ export function responseBody1FromJSON(
2411
+ jsonString: string,
2412
+ ): SafeParseResult<ResponseBody1, SDKValidationError> {
2413
+ return safeParse(
2414
+ jsonString,
2415
+ (x) => ResponseBody1$inboundSchema.parse(JSON.parse(x)),
2416
+ `Failed to parse 'ResponseBody1' from JSON`,
2417
+ );
2418
+ }
2419
+
2420
+ /** @internal */
2421
+ export const InvokeEvalResponseBody$inboundSchema: z.ZodType<
2422
+ InvokeEvalResponseBody,
2423
+ z.ZodTypeDef,
2424
+ unknown
2425
+ > = z.union([
2426
+ z.lazy(() => ResponseBody1$inboundSchema),
2427
+ z.lazy(() => ResponseBody2$inboundSchema),
2428
+ z.lazy(() => ResponseBody3$inboundSchema),
2429
+ z.lazy(() => ResponseBody4$inboundSchema),
2430
+ z.lazy(() => Five$inboundSchema),
2431
+ z.lazy(() => Six$inboundSchema),
2432
+ z.lazy(() => Seven$inboundSchema),
2433
+ z.lazy(() => Eight$inboundSchema),
2434
+ ]);
2435
+
2436
+ /** @internal */
2437
+ export type InvokeEvalResponseBody$Outbound =
2438
+ | ResponseBody1$Outbound
2439
+ | ResponseBody2$Outbound
2440
+ | ResponseBody3$Outbound
2441
+ | ResponseBody4$Outbound
2442
+ | Five$Outbound
2443
+ | Six$Outbound
2444
+ | Seven$Outbound
2445
+ | Eight$Outbound;
2446
+
2447
+ /** @internal */
2448
+ export const InvokeEvalResponseBody$outboundSchema: z.ZodType<
2449
+ InvokeEvalResponseBody$Outbound,
2450
+ z.ZodTypeDef,
2451
+ InvokeEvalResponseBody
2452
+ > = z.union([
2453
+ z.lazy(() => ResponseBody1$outboundSchema),
2454
+ z.lazy(() => ResponseBody2$outboundSchema),
2455
+ z.lazy(() => ResponseBody3$outboundSchema),
2456
+ z.lazy(() => ResponseBody4$outboundSchema),
2457
+ z.lazy(() => Five$outboundSchema),
2458
+ z.lazy(() => Six$outboundSchema),
2459
+ z.lazy(() => Seven$outboundSchema),
2460
+ z.lazy(() => Eight$outboundSchema),
2461
+ ]);
2462
+
2463
+ /**
2464
+ * @internal
2465
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2466
+ */
2467
+ export namespace InvokeEvalResponseBody$ {
2468
+ /** @deprecated use `InvokeEvalResponseBody$inboundSchema` instead. */
2469
+ export const inboundSchema = InvokeEvalResponseBody$inboundSchema;
2470
+ /** @deprecated use `InvokeEvalResponseBody$outboundSchema` instead. */
2471
+ export const outboundSchema = InvokeEvalResponseBody$outboundSchema;
2472
+ /** @deprecated use `InvokeEvalResponseBody$Outbound` instead. */
2473
+ export type Outbound = InvokeEvalResponseBody$Outbound;
2474
+ }
2475
+
2476
+ export function invokeEvalResponseBodyToJSON(
2477
+ invokeEvalResponseBody: InvokeEvalResponseBody,
2478
+ ): string {
2479
+ return JSON.stringify(
2480
+ InvokeEvalResponseBody$outboundSchema.parse(invokeEvalResponseBody),
2481
+ );
2482
+ }
2483
+
2484
+ export function invokeEvalResponseBodyFromJSON(
2485
+ jsonString: string,
2486
+ ): SafeParseResult<InvokeEvalResponseBody, SDKValidationError> {
2487
+ return safeParse(
2488
+ jsonString,
2489
+ (x) => InvokeEvalResponseBody$inboundSchema.parse(JSON.parse(x)),
2490
+ `Failed to parse 'InvokeEvalResponseBody' from JSON`,
2491
+ );
2492
+ }