@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,393 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export const Six = {
13
+ ElevenlabsElevenFlashV2: "elevenlabs/eleven_flash_v2",
14
+ } as const;
15
+ export type Six = ClosedEnum<typeof Six>;
16
+
17
+ export const Five = {
18
+ ElevenlabsElevenFlashV25: "elevenlabs/eleven_flash_v2_5",
19
+ } as const;
20
+ export type Five = ClosedEnum<typeof Five>;
21
+
22
+ export const Model4 = {
23
+ ElevenlabsElevenMultilingualV2: "elevenlabs/eleven_multilingual_v2",
24
+ } as const;
25
+ export type Model4 = ClosedEnum<typeof Model4>;
26
+
27
+ export const Model3 = {
28
+ ElevenlabsElevenTurboV25: "elevenlabs/eleven_turbo_v2_5",
29
+ } as const;
30
+ export type Model3 = ClosedEnum<typeof Model3>;
31
+
32
+ export const Model2 = {
33
+ OpenaiTts1Hd: "openai/tts-1-hd",
34
+ } as const;
35
+ export type Model2 = ClosedEnum<typeof Model2>;
36
+
37
+ export const Model1 = {
38
+ OpenaiTts1: "openai/tts-1",
39
+ } as const;
40
+ export type Model1 = ClosedEnum<typeof Model1>;
41
+
42
+ /**
43
+ * ID of the model to use
44
+ */
45
+ export type Model = Model1 | Model2 | Model3 | Model4 | Five | Six;
46
+
47
+ /**
48
+ * The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. If a format is provided but not supported by the provider, the response will be in the default format. When the provided format is not supported by the provider, the response will be in the default format.
49
+ */
50
+ export const PostV2ProxyAudioSpeechResponseFormat = {
51
+ Mp3: "mp3",
52
+ Opus: "opus",
53
+ Aac: "aac",
54
+ Flac: "flac",
55
+ Wav: "wav",
56
+ Pcm: "pcm",
57
+ } as const;
58
+ /**
59
+ * The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. If a format is provided but not supported by the provider, the response will be in the default format. When the provided format is not supported by the provider, the response will be in the default format.
60
+ */
61
+ export type PostV2ProxyAudioSpeechResponseFormat = ClosedEnum<
62
+ typeof PostV2ProxyAudioSpeechResponseFormat
63
+ >;
64
+
65
+ /**
66
+ * input
67
+ */
68
+ export type PostV2ProxyAudioSpeechRequestBody = {
69
+ /**
70
+ * The text to generate audio for. The maximum length is 4096 characters
71
+ */
72
+ input: string;
73
+ /**
74
+ * ID of the model to use
75
+ */
76
+ model: Model1 | Model2 | Model3 | Model4 | Five | Six;
77
+ /**
78
+ * The voice to use.
79
+ *
80
+ * @remarks
81
+ *
82
+ * Available voices for OpenAI
83
+ *
84
+ * `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`
85
+ *
86
+ * Available voices for ElevenLabs
87
+ *
88
+ * `aria`, `roger`, `sarah`, `laura`, `charlie`, `george`, `callum`, `river`, `liam`, `charlotte`, `alice`, `matilda`, `will`, `jessica`, `eric`, `chris`, `brian`, `daniel`, `lily`, `bill`
89
+ */
90
+ voice: string;
91
+ /**
92
+ * The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. If a format is provided but not supported by the provider, the response will be in the default format. When the provided format is not supported by the provider, the response will be in the default format.
93
+ */
94
+ responseFormat?: PostV2ProxyAudioSpeechResponseFormat | undefined;
95
+ /**
96
+ * The speed of the generated audio.
97
+ */
98
+ speed?: number | undefined;
99
+ };
100
+
101
+ /** @internal */
102
+ export const Six$inboundSchema: z.ZodNativeEnum<typeof Six> = z.nativeEnum(Six);
103
+
104
+ /** @internal */
105
+ export const Six$outboundSchema: z.ZodNativeEnum<typeof Six> =
106
+ Six$inboundSchema;
107
+
108
+ /**
109
+ * @internal
110
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
111
+ */
112
+ export namespace Six$ {
113
+ /** @deprecated use `Six$inboundSchema` instead. */
114
+ export const inboundSchema = Six$inboundSchema;
115
+ /** @deprecated use `Six$outboundSchema` instead. */
116
+ export const outboundSchema = Six$outboundSchema;
117
+ }
118
+
119
+ /** @internal */
120
+ export const Five$inboundSchema: z.ZodNativeEnum<typeof Five> = z.nativeEnum(
121
+ Five,
122
+ );
123
+
124
+ /** @internal */
125
+ export const Five$outboundSchema: z.ZodNativeEnum<typeof Five> =
126
+ Five$inboundSchema;
127
+
128
+ /**
129
+ * @internal
130
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
131
+ */
132
+ export namespace Five$ {
133
+ /** @deprecated use `Five$inboundSchema` instead. */
134
+ export const inboundSchema = Five$inboundSchema;
135
+ /** @deprecated use `Five$outboundSchema` instead. */
136
+ export const outboundSchema = Five$outboundSchema;
137
+ }
138
+
139
+ /** @internal */
140
+ export const Model4$inboundSchema: z.ZodNativeEnum<typeof Model4> = z
141
+ .nativeEnum(Model4);
142
+
143
+ /** @internal */
144
+ export const Model4$outboundSchema: z.ZodNativeEnum<typeof Model4> =
145
+ Model4$inboundSchema;
146
+
147
+ /**
148
+ * @internal
149
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
150
+ */
151
+ export namespace Model4$ {
152
+ /** @deprecated use `Model4$inboundSchema` instead. */
153
+ export const inboundSchema = Model4$inboundSchema;
154
+ /** @deprecated use `Model4$outboundSchema` instead. */
155
+ export const outboundSchema = Model4$outboundSchema;
156
+ }
157
+
158
+ /** @internal */
159
+ export const Model3$inboundSchema: z.ZodNativeEnum<typeof Model3> = z
160
+ .nativeEnum(Model3);
161
+
162
+ /** @internal */
163
+ export const Model3$outboundSchema: z.ZodNativeEnum<typeof Model3> =
164
+ Model3$inboundSchema;
165
+
166
+ /**
167
+ * @internal
168
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
169
+ */
170
+ export namespace Model3$ {
171
+ /** @deprecated use `Model3$inboundSchema` instead. */
172
+ export const inboundSchema = Model3$inboundSchema;
173
+ /** @deprecated use `Model3$outboundSchema` instead. */
174
+ export const outboundSchema = Model3$outboundSchema;
175
+ }
176
+
177
+ /** @internal */
178
+ export const Model2$inboundSchema: z.ZodNativeEnum<typeof Model2> = z
179
+ .nativeEnum(Model2);
180
+
181
+ /** @internal */
182
+ export const Model2$outboundSchema: z.ZodNativeEnum<typeof Model2> =
183
+ Model2$inboundSchema;
184
+
185
+ /**
186
+ * @internal
187
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
188
+ */
189
+ export namespace Model2$ {
190
+ /** @deprecated use `Model2$inboundSchema` instead. */
191
+ export const inboundSchema = Model2$inboundSchema;
192
+ /** @deprecated use `Model2$outboundSchema` instead. */
193
+ export const outboundSchema = Model2$outboundSchema;
194
+ }
195
+
196
+ /** @internal */
197
+ export const Model1$inboundSchema: z.ZodNativeEnum<typeof Model1> = z
198
+ .nativeEnum(Model1);
199
+
200
+ /** @internal */
201
+ export const Model1$outboundSchema: z.ZodNativeEnum<typeof Model1> =
202
+ Model1$inboundSchema;
203
+
204
+ /**
205
+ * @internal
206
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
207
+ */
208
+ export namespace Model1$ {
209
+ /** @deprecated use `Model1$inboundSchema` instead. */
210
+ export const inboundSchema = Model1$inboundSchema;
211
+ /** @deprecated use `Model1$outboundSchema` instead. */
212
+ export const outboundSchema = Model1$outboundSchema;
213
+ }
214
+
215
+ /** @internal */
216
+ export const Model$inboundSchema: z.ZodType<Model, z.ZodTypeDef, unknown> = z
217
+ .union([
218
+ Model1$inboundSchema,
219
+ Model2$inboundSchema,
220
+ Model3$inboundSchema,
221
+ Model4$inboundSchema,
222
+ Five$inboundSchema,
223
+ Six$inboundSchema,
224
+ ]);
225
+
226
+ /** @internal */
227
+ export type Model$Outbound =
228
+ | string
229
+ | string
230
+ | string
231
+ | string
232
+ | string
233
+ | string;
234
+
235
+ /** @internal */
236
+ export const Model$outboundSchema: z.ZodType<
237
+ Model$Outbound,
238
+ z.ZodTypeDef,
239
+ Model
240
+ > = z.union([
241
+ Model1$outboundSchema,
242
+ Model2$outboundSchema,
243
+ Model3$outboundSchema,
244
+ Model4$outboundSchema,
245
+ Five$outboundSchema,
246
+ Six$outboundSchema,
247
+ ]);
248
+
249
+ /**
250
+ * @internal
251
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
252
+ */
253
+ export namespace Model$ {
254
+ /** @deprecated use `Model$inboundSchema` instead. */
255
+ export const inboundSchema = Model$inboundSchema;
256
+ /** @deprecated use `Model$outboundSchema` instead. */
257
+ export const outboundSchema = Model$outboundSchema;
258
+ /** @deprecated use `Model$Outbound` instead. */
259
+ export type Outbound = Model$Outbound;
260
+ }
261
+
262
+ export function modelToJSON(model: Model): string {
263
+ return JSON.stringify(Model$outboundSchema.parse(model));
264
+ }
265
+
266
+ export function modelFromJSON(
267
+ jsonString: string,
268
+ ): SafeParseResult<Model, SDKValidationError> {
269
+ return safeParse(
270
+ jsonString,
271
+ (x) => Model$inboundSchema.parse(JSON.parse(x)),
272
+ `Failed to parse 'Model' from JSON`,
273
+ );
274
+ }
275
+
276
+ /** @internal */
277
+ export const PostV2ProxyAudioSpeechResponseFormat$inboundSchema:
278
+ z.ZodNativeEnum<typeof PostV2ProxyAudioSpeechResponseFormat> = z.nativeEnum(
279
+ PostV2ProxyAudioSpeechResponseFormat,
280
+ );
281
+
282
+ /** @internal */
283
+ export const PostV2ProxyAudioSpeechResponseFormat$outboundSchema:
284
+ z.ZodNativeEnum<typeof PostV2ProxyAudioSpeechResponseFormat> =
285
+ PostV2ProxyAudioSpeechResponseFormat$inboundSchema;
286
+
287
+ /**
288
+ * @internal
289
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
290
+ */
291
+ export namespace PostV2ProxyAudioSpeechResponseFormat$ {
292
+ /** @deprecated use `PostV2ProxyAudioSpeechResponseFormat$inboundSchema` instead. */
293
+ export const inboundSchema =
294
+ PostV2ProxyAudioSpeechResponseFormat$inboundSchema;
295
+ /** @deprecated use `PostV2ProxyAudioSpeechResponseFormat$outboundSchema` instead. */
296
+ export const outboundSchema =
297
+ PostV2ProxyAudioSpeechResponseFormat$outboundSchema;
298
+ }
299
+
300
+ /** @internal */
301
+ export const PostV2ProxyAudioSpeechRequestBody$inboundSchema: z.ZodType<
302
+ PostV2ProxyAudioSpeechRequestBody,
303
+ z.ZodTypeDef,
304
+ unknown
305
+ > = z.object({
306
+ input: z.string(),
307
+ model: z.union([
308
+ Model1$inboundSchema,
309
+ Model2$inboundSchema,
310
+ Model3$inboundSchema,
311
+ Model4$inboundSchema,
312
+ Five$inboundSchema,
313
+ Six$inboundSchema,
314
+ ]),
315
+ voice: z.string(),
316
+ response_format: PostV2ProxyAudioSpeechResponseFormat$inboundSchema.default(
317
+ "mp3",
318
+ ),
319
+ speed: z.number().default(1),
320
+ }).transform((v) => {
321
+ return remap$(v, {
322
+ "response_format": "responseFormat",
323
+ });
324
+ });
325
+
326
+ /** @internal */
327
+ export type PostV2ProxyAudioSpeechRequestBody$Outbound = {
328
+ input: string;
329
+ model: string | string | string | string | string | string;
330
+ voice: string;
331
+ response_format: string;
332
+ speed: number;
333
+ };
334
+
335
+ /** @internal */
336
+ export const PostV2ProxyAudioSpeechRequestBody$outboundSchema: z.ZodType<
337
+ PostV2ProxyAudioSpeechRequestBody$Outbound,
338
+ z.ZodTypeDef,
339
+ PostV2ProxyAudioSpeechRequestBody
340
+ > = z.object({
341
+ input: z.string(),
342
+ model: z.union([
343
+ Model1$outboundSchema,
344
+ Model2$outboundSchema,
345
+ Model3$outboundSchema,
346
+ Model4$outboundSchema,
347
+ Five$outboundSchema,
348
+ Six$outboundSchema,
349
+ ]),
350
+ voice: z.string(),
351
+ responseFormat: PostV2ProxyAudioSpeechResponseFormat$outboundSchema.default(
352
+ "mp3",
353
+ ),
354
+ speed: z.number().default(1),
355
+ }).transform((v) => {
356
+ return remap$(v, {
357
+ responseFormat: "response_format",
358
+ });
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 PostV2ProxyAudioSpeechRequestBody$ {
366
+ /** @deprecated use `PostV2ProxyAudioSpeechRequestBody$inboundSchema` instead. */
367
+ export const inboundSchema = PostV2ProxyAudioSpeechRequestBody$inboundSchema;
368
+ /** @deprecated use `PostV2ProxyAudioSpeechRequestBody$outboundSchema` instead. */
369
+ export const outboundSchema =
370
+ PostV2ProxyAudioSpeechRequestBody$outboundSchema;
371
+ /** @deprecated use `PostV2ProxyAudioSpeechRequestBody$Outbound` instead. */
372
+ export type Outbound = PostV2ProxyAudioSpeechRequestBody$Outbound;
373
+ }
374
+
375
+ export function postV2ProxyAudioSpeechRequestBodyToJSON(
376
+ postV2ProxyAudioSpeechRequestBody: PostV2ProxyAudioSpeechRequestBody,
377
+ ): string {
378
+ return JSON.stringify(
379
+ PostV2ProxyAudioSpeechRequestBody$outboundSchema.parse(
380
+ postV2ProxyAudioSpeechRequestBody,
381
+ ),
382
+ );
383
+ }
384
+
385
+ export function postV2ProxyAudioSpeechRequestBodyFromJSON(
386
+ jsonString: string,
387
+ ): SafeParseResult<PostV2ProxyAudioSpeechRequestBody, SDKValidationError> {
388
+ return safeParse(
389
+ jsonString,
390
+ (x) => PostV2ProxyAudioSpeechRequestBody$inboundSchema.parse(JSON.parse(x)),
391
+ `Failed to parse 'PostV2ProxyAudioSpeechRequestBody' from JSON`,
392
+ );
393
+ }