@orq-ai/node 3.11.7 → 3.11.8

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 (155) hide show
  1. package/bin/mcp-server.js +104 -104
  2. package/bin/mcp-server.js.map +26 -26
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  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/createeval.js +16 -16
  14. package/models/operations/fileget.js +2 -2
  15. package/models/operations/filelist.js +2 -2
  16. package/models/operations/fileupload.js +2 -2
  17. package/models/operations/getevals.js +28 -28
  18. package/models/operations/listcontacts.js +2 -2
  19. package/models/operations/listdatasetdatapoints.js +2 -2
  20. package/models/operations/listdatasets.js +2 -2
  21. package/models/operations/listdatasources.js +2 -2
  22. package/models/operations/retrievecontact.js +2 -2
  23. package/models/operations/retrievedatapoint.js +2 -2
  24. package/models/operations/retrievedataset.js +2 -2
  25. package/models/operations/retrievedatasource.js +2 -2
  26. package/models/operations/updatecontact.js +2 -2
  27. package/models/operations/updatedatapoint.js +2 -2
  28. package/models/operations/updatedataset.js +2 -2
  29. package/models/operations/updatedatasource.js +2 -2
  30. package/models/operations/updateeval.js +16 -16
  31. package/package.json +1 -1
  32. package/packages/orq-rc/README.md +128 -87
  33. package/packages/orq-rc/docs/sdks/batches/README.md +307 -0
  34. package/packages/orq-rc/docs/sdks/proxy/README.md +1212 -0
  35. package/packages/orq-rc/examples/package-lock.json +1 -1
  36. package/packages/orq-rc/jsr.json +1 -1
  37. package/packages/orq-rc/package-lock.json +2 -2
  38. package/packages/orq-rc/package.json +1 -1
  39. package/packages/orq-rc/src/funcs/batchesCancel.ts +166 -0
  40. package/packages/orq-rc/src/funcs/batchesCreate.ts +160 -0
  41. package/packages/orq-rc/src/funcs/batchesList.ts +165 -0
  42. package/packages/orq-rc/src/funcs/batchesRetrieve.ts +166 -0
  43. package/packages/orq-rc/src/funcs/proxyAudioSpeech.ts +159 -0
  44. package/packages/orq-rc/src/funcs/proxyAudioTranscriptions.ts +233 -0
  45. package/packages/orq-rc/src/funcs/proxyAudioTranslations.ts +223 -0
  46. package/packages/orq-rc/src/funcs/proxyChatCompletions.ts +172 -0
  47. package/packages/orq-rc/src/funcs/proxyCompletions.ts +168 -0
  48. package/packages/orq-rc/src/funcs/proxyEmbeddings.ts +161 -0
  49. package/packages/orq-rc/src/funcs/proxyImagesEdit.ts +173 -0
  50. package/packages/orq-rc/src/funcs/proxyImagesGenerate.ts +163 -0
  51. package/packages/orq-rc/src/funcs/proxyImagesVariation.ts +179 -0
  52. package/packages/orq-rc/src/funcs/proxyModerations.ts +164 -0
  53. package/packages/orq-rc/src/funcs/proxyRerank.ts +158 -0
  54. package/packages/orq-rc/src/funcs/proxyResponsesCreate.ts +171 -0
  55. package/packages/orq-rc/src/lib/config.ts +3 -3
  56. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  57. package/packages/orq-rc/src/mcp-server/server.ts +33 -1
  58. package/packages/orq-rc/src/mcp-server/tools/batchesCancel.ts +37 -0
  59. package/packages/orq-rc/src/mcp-server/tools/batchesCreate.ts +37 -0
  60. package/packages/orq-rc/src/mcp-server/tools/batchesList.ts +37 -0
  61. package/packages/orq-rc/src/mcp-server/tools/batchesRetrieve.ts +37 -0
  62. package/packages/orq-rc/src/mcp-server/tools/proxyAudioSpeech.ts +33 -0
  63. package/packages/orq-rc/src/mcp-server/tools/proxyAudioTranscriptions.ts +35 -0
  64. package/packages/orq-rc/src/mcp-server/tools/proxyAudioTranslations.ts +35 -0
  65. package/packages/orq-rc/src/mcp-server/tools/proxyChatCompletions.ts +37 -0
  66. package/packages/orq-rc/src/mcp-server/tools/proxyCompletions.ts +37 -0
  67. package/packages/orq-rc/src/mcp-server/tools/proxyEmbeddings.ts +37 -0
  68. package/packages/orq-rc/src/mcp-server/tools/proxyImagesEdit.ts +35 -0
  69. package/packages/orq-rc/src/mcp-server/tools/proxyImagesGenerate.ts +35 -0
  70. package/packages/orq-rc/src/mcp-server/tools/proxyImagesVariation.ts +35 -0
  71. package/packages/orq-rc/src/mcp-server/tools/proxyModerations.ts +35 -0
  72. package/packages/orq-rc/src/mcp-server/tools/proxyRerank.ts +36 -0
  73. package/packages/orq-rc/src/mcp-server/tools/proxyResponsesCreate.ts +37 -0
  74. package/packages/orq-rc/src/models/components/deployments.ts +861 -0
  75. package/packages/orq-rc/src/models/components/index.ts +1 -0
  76. package/packages/orq-rc/src/models/components/publiccontact.ts +114 -0
  77. package/packages/orq-rc/src/models/errors/index.ts +3 -0
  78. package/packages/orq-rc/src/models/errors/postv2proxyaudiotranscriptions.ts +163 -0
  79. package/packages/orq-rc/src/models/errors/postv2proxyaudiotranslations.ts +162 -0
  80. package/packages/orq-rc/src/models/errors/postv2proxymoderations.ts +151 -0
  81. package/packages/orq-rc/src/models/operations/cancelbatch.ts +474 -0
  82. package/packages/orq-rc/src/models/operations/createbatch.ts +531 -0
  83. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  84. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +11697 -0
  85. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  86. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  87. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2205 -1224
  88. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  89. package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
  90. package/packages/orq-rc/src/models/operations/createresponse.ts +6908 -0
  91. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +2282 -1214
  92. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +938 -51
  93. package/packages/orq-rc/src/models/operations/deploymentstream.ts +1471 -305
  94. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  95. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  96. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  97. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/getevals.ts +107 -92
  99. package/packages/orq-rc/src/models/operations/index.ts +16 -0
  100. package/packages/orq-rc/src/models/operations/listbatches.ts +570 -0
  101. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  102. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  103. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +498 -2
  104. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  105. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  106. package/packages/orq-rc/src/models/operations/postv2proxyaudiospeech.ts +393 -0
  107. package/packages/orq-rc/src/models/operations/postv2proxyaudiotranscriptions.ts +731 -0
  108. package/packages/orq-rc/src/models/operations/postv2proxyaudiotranslations.ts +741 -0
  109. package/packages/orq-rc/src/models/operations/postv2proxycompletions.ts +5831 -0
  110. package/packages/orq-rc/src/models/operations/postv2proxyembeddings.ts +543 -0
  111. package/packages/orq-rc/src/models/operations/postv2proxyimagesedits.ts +596 -0
  112. package/packages/orq-rc/src/models/operations/postv2proxyimagesgenerations.ts +1107 -0
  113. package/packages/orq-rc/src/models/operations/postv2proxyimagesvariations.ts +592 -0
  114. package/packages/orq-rc/src/models/operations/postv2proxymoderations.ts +802 -0
  115. package/packages/orq-rc/src/models/operations/postv2proxyrerank.ts +526 -0
  116. package/packages/orq-rc/src/models/operations/retrievebatch.ts +474 -0
  117. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  118. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +478 -2
  119. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  120. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  121. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  122. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  123. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +974 -2
  124. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  125. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  126. package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
  127. package/packages/orq-rc/src/sdk/batches.ts +81 -0
  128. package/packages/orq-rc/src/sdk/proxy.ts +211 -0
  129. package/packages/orq-rc/src/sdk/sdk.ts +12 -0
  130. package/packages/orq-rc/temp/example.ts +5 -0
  131. package/src/lib/config.ts +3 -3
  132. package/src/mcp-server/mcp-server.ts +1 -1
  133. package/src/mcp-server/server.ts +1 -1
  134. package/src/models/operations/createcontact.ts +2 -2
  135. package/src/models/operations/createdataset.ts +2 -2
  136. package/src/models/operations/createdatasetitem.ts +2 -2
  137. package/src/models/operations/createdatasource.ts +2 -2
  138. package/src/models/operations/createeval.ts +16 -16
  139. package/src/models/operations/fileget.ts +2 -2
  140. package/src/models/operations/filelist.ts +2 -2
  141. package/src/models/operations/fileupload.ts +2 -2
  142. package/src/models/operations/getevals.ts +28 -28
  143. package/src/models/operations/listcontacts.ts +2 -2
  144. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  145. package/src/models/operations/listdatasets.ts +2 -2
  146. package/src/models/operations/listdatasources.ts +2 -2
  147. package/src/models/operations/retrievecontact.ts +2 -2
  148. package/src/models/operations/retrievedatapoint.ts +2 -2
  149. package/src/models/operations/retrievedataset.ts +2 -2
  150. package/src/models/operations/retrievedatasource.ts +2 -2
  151. package/src/models/operations/updatecontact.ts +2 -2
  152. package/src/models/operations/updatedatapoint.ts +2 -2
  153. package/src/models/operations/updatedataset.ts +2 -2
  154. package/src/models/operations/updatedatasource.ts +2 -2
  155. package/src/models/operations/updateeval.ts +16 -16
@@ -0,0 +1,531 @@
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 time frame within which the batch should be processed. Currently only 24h is supported.
14
+ */
15
+ export const CompletionWindow = {
16
+ TwentyFourh: "24h",
17
+ } as const;
18
+ /**
19
+ * The time frame within which the batch should be processed. Currently only 24h is supported.
20
+ */
21
+ export type CompletionWindow = ClosedEnum<typeof CompletionWindow>;
22
+
23
+ export type CreateBatchRequestBody = {
24
+ /**
25
+ * The ID of an uploaded file that contains requests for the new batch.
26
+ *
27
+ * @remarks
28
+ *
29
+ * See [upload file](https://docs.orq.ai/reference/fileupload-1) for how to upload a file.
30
+ *
31
+ * Your input file must be formatted as a [JSONL](https://jsonlines.org/) file, and must be uploaded with the purpose batch. The file can contain up to 50,000 requests, and can be up to 200 MB in size.
32
+ */
33
+ inputFileId: string;
34
+ /**
35
+ * The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.
36
+ */
37
+ endpoint: string;
38
+ /**
39
+ * The time frame within which the batch should be processed. Currently only 24h is supported.
40
+ */
41
+ completionWindow: CompletionWindow;
42
+ /**
43
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
44
+ *
45
+ * @remarks
46
+ *
47
+ * Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
48
+ */
49
+ metadata?: { [k: string]: any } | undefined;
50
+ };
51
+
52
+ /**
53
+ * The object type, which is always batch.
54
+ */
55
+ export const CreateBatchObject = {
56
+ Batch: "batch",
57
+ } as const;
58
+ /**
59
+ * The object type, which is always batch.
60
+ */
61
+ export type CreateBatchObject = ClosedEnum<typeof CreateBatchObject>;
62
+
63
+ /**
64
+ * Errors associated with the batch.
65
+ */
66
+ export type Errors = {};
67
+
68
+ /**
69
+ * The request counts for different statuses within the batch.
70
+ */
71
+ export type RequestCounts = {
72
+ /**
73
+ * Total number of requests in the batch.
74
+ */
75
+ total: number;
76
+ /**
77
+ * Number of requests that have been completed successfully.
78
+ */
79
+ completed: number;
80
+ /**
81
+ * Number of requests that have failed.
82
+ */
83
+ failed: number;
84
+ };
85
+
86
+ /**
87
+ * A list of paginated Batch objects.
88
+ */
89
+ export type CreateBatchResponseBody = {
90
+ /**
91
+ * The ID of the batch job.
92
+ */
93
+ id: string;
94
+ /**
95
+ * The object type, which is always batch.
96
+ */
97
+ object: CreateBatchObject;
98
+ /**
99
+ * The OpenAI API endpoint used by the batch.
100
+ */
101
+ endpoint: string;
102
+ /**
103
+ * Errors associated with the batch.
104
+ */
105
+ errors: Errors;
106
+ /**
107
+ * The ID of the input file for the batch.
108
+ */
109
+ inputFileId: string;
110
+ /**
111
+ * The time frame within which the batch should be processed.
112
+ */
113
+ completionWindow: string;
114
+ /**
115
+ * The current status of the batch.
116
+ */
117
+ status: string;
118
+ /**
119
+ * The ID of the file containing the outputs of successfully executed requests.
120
+ */
121
+ outputFileId: string | null;
122
+ /**
123
+ * The ID of the file containing the outputs of requests with errors.
124
+ */
125
+ errorFileId: string | null;
126
+ /**
127
+ * The Unix timestamp (in seconds) for when the batch was created.
128
+ */
129
+ createdAt: number;
130
+ /**
131
+ * The Unix timestamp (in seconds) for when the batch started processing.
132
+ */
133
+ inProgressAt: number | null;
134
+ /**
135
+ * The Unix timestamp (in seconds) for when the batch will expire.
136
+ */
137
+ expiresAt: number | null;
138
+ /**
139
+ * The Unix timestamp (in seconds) for when the batch started finalizing.
140
+ */
141
+ finalizingAt: number | null;
142
+ /**
143
+ * The Unix timestamp (in seconds) for when the batch was completed.
144
+ */
145
+ completedAt: number | null;
146
+ /**
147
+ * The Unix timestamp (in seconds) for when the batch failed.
148
+ */
149
+ failedAt: number | null;
150
+ /**
151
+ * The Unix timestamp (in seconds) for when the batch expired.
152
+ */
153
+ expiredAt: number | null;
154
+ /**
155
+ * The Unix timestamp (in seconds) for when the batch started cancelling.
156
+ */
157
+ cancellingAt: number | null;
158
+ /**
159
+ * The Unix timestamp (in seconds) for when the batch was cancelled.
160
+ */
161
+ cancelledAt: number | null;
162
+ /**
163
+ * The request counts for different statuses within the batch.
164
+ */
165
+ requestCounts: RequestCounts;
166
+ /**
167
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
168
+ *
169
+ * @remarks
170
+ *
171
+ * Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
172
+ */
173
+ metadata?: { [k: string]: any } | undefined;
174
+ };
175
+
176
+ /** @internal */
177
+ export const CompletionWindow$inboundSchema: z.ZodNativeEnum<
178
+ typeof CompletionWindow
179
+ > = z.nativeEnum(CompletionWindow);
180
+
181
+ /** @internal */
182
+ export const CompletionWindow$outboundSchema: z.ZodNativeEnum<
183
+ typeof CompletionWindow
184
+ > = CompletionWindow$inboundSchema;
185
+
186
+ /**
187
+ * @internal
188
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
189
+ */
190
+ export namespace CompletionWindow$ {
191
+ /** @deprecated use `CompletionWindow$inboundSchema` instead. */
192
+ export const inboundSchema = CompletionWindow$inboundSchema;
193
+ /** @deprecated use `CompletionWindow$outboundSchema` instead. */
194
+ export const outboundSchema = CompletionWindow$outboundSchema;
195
+ }
196
+
197
+ /** @internal */
198
+ export const CreateBatchRequestBody$inboundSchema: z.ZodType<
199
+ CreateBatchRequestBody,
200
+ z.ZodTypeDef,
201
+ unknown
202
+ > = z.object({
203
+ input_file_id: z.string(),
204
+ endpoint: z.string(),
205
+ completion_window: CompletionWindow$inboundSchema,
206
+ metadata: z.record(z.any()).optional(),
207
+ }).transform((v) => {
208
+ return remap$(v, {
209
+ "input_file_id": "inputFileId",
210
+ "completion_window": "completionWindow",
211
+ });
212
+ });
213
+
214
+ /** @internal */
215
+ export type CreateBatchRequestBody$Outbound = {
216
+ input_file_id: string;
217
+ endpoint: string;
218
+ completion_window: string;
219
+ metadata?: { [k: string]: any } | undefined;
220
+ };
221
+
222
+ /** @internal */
223
+ export const CreateBatchRequestBody$outboundSchema: z.ZodType<
224
+ CreateBatchRequestBody$Outbound,
225
+ z.ZodTypeDef,
226
+ CreateBatchRequestBody
227
+ > = z.object({
228
+ inputFileId: z.string(),
229
+ endpoint: z.string(),
230
+ completionWindow: CompletionWindow$outboundSchema,
231
+ metadata: z.record(z.any()).optional(),
232
+ }).transform((v) => {
233
+ return remap$(v, {
234
+ inputFileId: "input_file_id",
235
+ completionWindow: "completion_window",
236
+ });
237
+ });
238
+
239
+ /**
240
+ * @internal
241
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
242
+ */
243
+ export namespace CreateBatchRequestBody$ {
244
+ /** @deprecated use `CreateBatchRequestBody$inboundSchema` instead. */
245
+ export const inboundSchema = CreateBatchRequestBody$inboundSchema;
246
+ /** @deprecated use `CreateBatchRequestBody$outboundSchema` instead. */
247
+ export const outboundSchema = CreateBatchRequestBody$outboundSchema;
248
+ /** @deprecated use `CreateBatchRequestBody$Outbound` instead. */
249
+ export type Outbound = CreateBatchRequestBody$Outbound;
250
+ }
251
+
252
+ export function createBatchRequestBodyToJSON(
253
+ createBatchRequestBody: CreateBatchRequestBody,
254
+ ): string {
255
+ return JSON.stringify(
256
+ CreateBatchRequestBody$outboundSchema.parse(createBatchRequestBody),
257
+ );
258
+ }
259
+
260
+ export function createBatchRequestBodyFromJSON(
261
+ jsonString: string,
262
+ ): SafeParseResult<CreateBatchRequestBody, SDKValidationError> {
263
+ return safeParse(
264
+ jsonString,
265
+ (x) => CreateBatchRequestBody$inboundSchema.parse(JSON.parse(x)),
266
+ `Failed to parse 'CreateBatchRequestBody' from JSON`,
267
+ );
268
+ }
269
+
270
+ /** @internal */
271
+ export const CreateBatchObject$inboundSchema: z.ZodNativeEnum<
272
+ typeof CreateBatchObject
273
+ > = z.nativeEnum(CreateBatchObject);
274
+
275
+ /** @internal */
276
+ export const CreateBatchObject$outboundSchema: z.ZodNativeEnum<
277
+ typeof CreateBatchObject
278
+ > = CreateBatchObject$inboundSchema;
279
+
280
+ /**
281
+ * @internal
282
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
283
+ */
284
+ export namespace CreateBatchObject$ {
285
+ /** @deprecated use `CreateBatchObject$inboundSchema` instead. */
286
+ export const inboundSchema = CreateBatchObject$inboundSchema;
287
+ /** @deprecated use `CreateBatchObject$outboundSchema` instead. */
288
+ export const outboundSchema = CreateBatchObject$outboundSchema;
289
+ }
290
+
291
+ /** @internal */
292
+ export const Errors$inboundSchema: z.ZodType<Errors, z.ZodTypeDef, unknown> = z
293
+ .object({});
294
+
295
+ /** @internal */
296
+ export type Errors$Outbound = {};
297
+
298
+ /** @internal */
299
+ export const Errors$outboundSchema: z.ZodType<
300
+ Errors$Outbound,
301
+ z.ZodTypeDef,
302
+ Errors
303
+ > = z.object({});
304
+
305
+ /**
306
+ * @internal
307
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
308
+ */
309
+ export namespace Errors$ {
310
+ /** @deprecated use `Errors$inboundSchema` instead. */
311
+ export const inboundSchema = Errors$inboundSchema;
312
+ /** @deprecated use `Errors$outboundSchema` instead. */
313
+ export const outboundSchema = Errors$outboundSchema;
314
+ /** @deprecated use `Errors$Outbound` instead. */
315
+ export type Outbound = Errors$Outbound;
316
+ }
317
+
318
+ export function errorsToJSON(errors: Errors): string {
319
+ return JSON.stringify(Errors$outboundSchema.parse(errors));
320
+ }
321
+
322
+ export function errorsFromJSON(
323
+ jsonString: string,
324
+ ): SafeParseResult<Errors, SDKValidationError> {
325
+ return safeParse(
326
+ jsonString,
327
+ (x) => Errors$inboundSchema.parse(JSON.parse(x)),
328
+ `Failed to parse 'Errors' from JSON`,
329
+ );
330
+ }
331
+
332
+ /** @internal */
333
+ export const RequestCounts$inboundSchema: z.ZodType<
334
+ RequestCounts,
335
+ z.ZodTypeDef,
336
+ unknown
337
+ > = z.object({
338
+ total: z.number().int(),
339
+ completed: z.number().int(),
340
+ failed: z.number().int(),
341
+ });
342
+
343
+ /** @internal */
344
+ export type RequestCounts$Outbound = {
345
+ total: number;
346
+ completed: number;
347
+ failed: number;
348
+ };
349
+
350
+ /** @internal */
351
+ export const RequestCounts$outboundSchema: z.ZodType<
352
+ RequestCounts$Outbound,
353
+ z.ZodTypeDef,
354
+ RequestCounts
355
+ > = z.object({
356
+ total: z.number().int(),
357
+ completed: z.number().int(),
358
+ failed: z.number().int(),
359
+ });
360
+
361
+ /**
362
+ * @internal
363
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
364
+ */
365
+ export namespace RequestCounts$ {
366
+ /** @deprecated use `RequestCounts$inboundSchema` instead. */
367
+ export const inboundSchema = RequestCounts$inboundSchema;
368
+ /** @deprecated use `RequestCounts$outboundSchema` instead. */
369
+ export const outboundSchema = RequestCounts$outboundSchema;
370
+ /** @deprecated use `RequestCounts$Outbound` instead. */
371
+ export type Outbound = RequestCounts$Outbound;
372
+ }
373
+
374
+ export function requestCountsToJSON(requestCounts: RequestCounts): string {
375
+ return JSON.stringify(RequestCounts$outboundSchema.parse(requestCounts));
376
+ }
377
+
378
+ export function requestCountsFromJSON(
379
+ jsonString: string,
380
+ ): SafeParseResult<RequestCounts, SDKValidationError> {
381
+ return safeParse(
382
+ jsonString,
383
+ (x) => RequestCounts$inboundSchema.parse(JSON.parse(x)),
384
+ `Failed to parse 'RequestCounts' from JSON`,
385
+ );
386
+ }
387
+
388
+ /** @internal */
389
+ export const CreateBatchResponseBody$inboundSchema: z.ZodType<
390
+ CreateBatchResponseBody,
391
+ z.ZodTypeDef,
392
+ unknown
393
+ > = z.object({
394
+ id: z.string(),
395
+ object: CreateBatchObject$inboundSchema,
396
+ endpoint: z.string(),
397
+ errors: z.lazy(() => Errors$inboundSchema),
398
+ input_file_id: z.string(),
399
+ completion_window: z.string(),
400
+ status: z.string(),
401
+ output_file_id: z.nullable(z.string()),
402
+ error_file_id: z.nullable(z.string()),
403
+ created_at: z.number().int(),
404
+ in_progress_at: z.nullable(z.number().int()),
405
+ expires_at: z.nullable(z.number().int()),
406
+ finalizing_at: z.nullable(z.number().int()),
407
+ completed_at: z.nullable(z.number().int()),
408
+ failed_at: z.nullable(z.number().int()),
409
+ expired_at: z.nullable(z.number().int()),
410
+ cancelling_at: z.nullable(z.number().int()),
411
+ cancelled_at: z.nullable(z.number().int()),
412
+ request_counts: z.lazy(() => RequestCounts$inboundSchema),
413
+ metadata: z.record(z.any()).optional(),
414
+ }).transform((v) => {
415
+ return remap$(v, {
416
+ "input_file_id": "inputFileId",
417
+ "completion_window": "completionWindow",
418
+ "output_file_id": "outputFileId",
419
+ "error_file_id": "errorFileId",
420
+ "created_at": "createdAt",
421
+ "in_progress_at": "inProgressAt",
422
+ "expires_at": "expiresAt",
423
+ "finalizing_at": "finalizingAt",
424
+ "completed_at": "completedAt",
425
+ "failed_at": "failedAt",
426
+ "expired_at": "expiredAt",
427
+ "cancelling_at": "cancellingAt",
428
+ "cancelled_at": "cancelledAt",
429
+ "request_counts": "requestCounts",
430
+ });
431
+ });
432
+
433
+ /** @internal */
434
+ export type CreateBatchResponseBody$Outbound = {
435
+ id: string;
436
+ object: string;
437
+ endpoint: string;
438
+ errors: Errors$Outbound;
439
+ input_file_id: string;
440
+ completion_window: string;
441
+ status: string;
442
+ output_file_id: string | null;
443
+ error_file_id: string | null;
444
+ created_at: number;
445
+ in_progress_at: number | null;
446
+ expires_at: number | null;
447
+ finalizing_at: number | null;
448
+ completed_at: number | null;
449
+ failed_at: number | null;
450
+ expired_at: number | null;
451
+ cancelling_at: number | null;
452
+ cancelled_at: number | null;
453
+ request_counts: RequestCounts$Outbound;
454
+ metadata?: { [k: string]: any } | undefined;
455
+ };
456
+
457
+ /** @internal */
458
+ export const CreateBatchResponseBody$outboundSchema: z.ZodType<
459
+ CreateBatchResponseBody$Outbound,
460
+ z.ZodTypeDef,
461
+ CreateBatchResponseBody
462
+ > = z.object({
463
+ id: z.string(),
464
+ object: CreateBatchObject$outboundSchema,
465
+ endpoint: z.string(),
466
+ errors: z.lazy(() => Errors$outboundSchema),
467
+ inputFileId: z.string(),
468
+ completionWindow: z.string(),
469
+ status: z.string(),
470
+ outputFileId: z.nullable(z.string()),
471
+ errorFileId: z.nullable(z.string()),
472
+ createdAt: z.number().int(),
473
+ inProgressAt: z.nullable(z.number().int()),
474
+ expiresAt: z.nullable(z.number().int()),
475
+ finalizingAt: z.nullable(z.number().int()),
476
+ completedAt: z.nullable(z.number().int()),
477
+ failedAt: z.nullable(z.number().int()),
478
+ expiredAt: z.nullable(z.number().int()),
479
+ cancellingAt: z.nullable(z.number().int()),
480
+ cancelledAt: z.nullable(z.number().int()),
481
+ requestCounts: z.lazy(() => RequestCounts$outboundSchema),
482
+ metadata: z.record(z.any()).optional(),
483
+ }).transform((v) => {
484
+ return remap$(v, {
485
+ inputFileId: "input_file_id",
486
+ completionWindow: "completion_window",
487
+ outputFileId: "output_file_id",
488
+ errorFileId: "error_file_id",
489
+ createdAt: "created_at",
490
+ inProgressAt: "in_progress_at",
491
+ expiresAt: "expires_at",
492
+ finalizingAt: "finalizing_at",
493
+ completedAt: "completed_at",
494
+ failedAt: "failed_at",
495
+ expiredAt: "expired_at",
496
+ cancellingAt: "cancelling_at",
497
+ cancelledAt: "cancelled_at",
498
+ requestCounts: "request_counts",
499
+ });
500
+ });
501
+
502
+ /**
503
+ * @internal
504
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
505
+ */
506
+ export namespace CreateBatchResponseBody$ {
507
+ /** @deprecated use `CreateBatchResponseBody$inboundSchema` instead. */
508
+ export const inboundSchema = CreateBatchResponseBody$inboundSchema;
509
+ /** @deprecated use `CreateBatchResponseBody$outboundSchema` instead. */
510
+ export const outboundSchema = CreateBatchResponseBody$outboundSchema;
511
+ /** @deprecated use `CreateBatchResponseBody$Outbound` instead. */
512
+ export type Outbound = CreateBatchResponseBody$Outbound;
513
+ }
514
+
515
+ export function createBatchResponseBodyToJSON(
516
+ createBatchResponseBody: CreateBatchResponseBody,
517
+ ): string {
518
+ return JSON.stringify(
519
+ CreateBatchResponseBody$outboundSchema.parse(createBatchResponseBody),
520
+ );
521
+ }
522
+
523
+ export function createBatchResponseBodyFromJSON(
524
+ jsonString: string,
525
+ ): SafeParseResult<CreateBatchResponseBody, SDKValidationError> {
526
+ return safeParse(
527
+ jsonString,
528
+ (x) => CreateBatchResponseBody$inboundSchema.parse(JSON.parse(x)),
529
+ `Failed to parse 'CreateBatchResponseBody' from JSON`,
530
+ );
531
+ }
@@ -655,7 +655,7 @@ export const CreateBudgetResponseBody$inboundSchema: z.ZodType<
655
655
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
656
656
  .optional(),
657
657
  updated: z.string().datetime({ offset: true }).default(
658
- "2025-08-20T11:38:10.692Z",
658
+ "2025-08-27T07:41:07.739Z",
659
659
  ).transform(v => new Date(v)),
660
660
  }).transform((v) => {
661
661
  return remap$(v, {
@@ -693,7 +693,7 @@ export const CreateBudgetResponseBody$outboundSchema: z.ZodType<
693
693
  isActive: z.boolean(),
694
694
  consumption: z.lazy(() => Consumption$outboundSchema).optional(),
695
695
  created: z.date().transform(v => v.toISOString()).optional(),
696
- updated: z.date().default(() => new Date("2025-08-20T11:38:10.692Z"))
696
+ updated: z.date().default(() => new Date("2025-08-27T07:41:07.739Z"))
697
697
  .transform(v => v.toISOString()),
698
698
  }).transform((v) => {
699
699
  return remap$(v, {