@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.
- package/bin/mcp-server.js +104 -104
- package/bin/mcp-server.js.map +26 -26
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +16 -16
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +16 -16
- package/package.json +1 -1
- package/packages/orq-rc/README.md +128 -87
- package/packages/orq-rc/docs/sdks/batches/README.md +307 -0
- package/packages/orq-rc/docs/sdks/proxy/README.md +1212 -0
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/batchesCancel.ts +166 -0
- package/packages/orq-rc/src/funcs/batchesCreate.ts +160 -0
- package/packages/orq-rc/src/funcs/batchesList.ts +165 -0
- package/packages/orq-rc/src/funcs/batchesRetrieve.ts +166 -0
- package/packages/orq-rc/src/funcs/proxyAudioSpeech.ts +159 -0
- package/packages/orq-rc/src/funcs/proxyAudioTranscriptions.ts +233 -0
- package/packages/orq-rc/src/funcs/proxyAudioTranslations.ts +223 -0
- package/packages/orq-rc/src/funcs/proxyChatCompletions.ts +172 -0
- package/packages/orq-rc/src/funcs/proxyCompletions.ts +168 -0
- package/packages/orq-rc/src/funcs/proxyEmbeddings.ts +161 -0
- package/packages/orq-rc/src/funcs/proxyImagesEdit.ts +173 -0
- package/packages/orq-rc/src/funcs/proxyImagesGenerate.ts +163 -0
- package/packages/orq-rc/src/funcs/proxyImagesVariation.ts +179 -0
- package/packages/orq-rc/src/funcs/proxyModerations.ts +164 -0
- package/packages/orq-rc/src/funcs/proxyRerank.ts +158 -0
- package/packages/orq-rc/src/funcs/proxyResponsesCreate.ts +171 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +33 -1
- package/packages/orq-rc/src/mcp-server/tools/batchesCancel.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/batchesCreate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/batchesList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/batchesRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyAudioSpeech.ts +33 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyAudioTranscriptions.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyAudioTranslations.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyChatCompletions.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyCompletions.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyEmbeddings.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyImagesEdit.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyImagesGenerate.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyImagesVariation.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyModerations.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyRerank.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyResponsesCreate.ts +37 -0
- package/packages/orq-rc/src/models/components/deployments.ts +861 -0
- package/packages/orq-rc/src/models/components/index.ts +1 -0
- package/packages/orq-rc/src/models/components/publiccontact.ts +114 -0
- package/packages/orq-rc/src/models/errors/index.ts +3 -0
- package/packages/orq-rc/src/models/errors/postv2proxyaudiotranscriptions.ts +163 -0
- package/packages/orq-rc/src/models/errors/postv2proxyaudiotranslations.ts +162 -0
- package/packages/orq-rc/src/models/errors/postv2proxymoderations.ts +151 -0
- package/packages/orq-rc/src/models/operations/cancelbatch.ts +474 -0
- package/packages/orq-rc/src/models/operations/createbatch.ts +531 -0
- package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/createchatcompletion.ts +11697 -0
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2205 -1224
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/createresponse.ts +6908 -0
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +2282 -1214
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +938 -51
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +1471 -305
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/getevals.ts +107 -92
- package/packages/orq-rc/src/models/operations/index.ts +16 -0
- package/packages/orq-rc/src/models/operations/listbatches.ts +570 -0
- package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +498 -2
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2proxyaudiospeech.ts +393 -0
- package/packages/orq-rc/src/models/operations/postv2proxyaudiotranscriptions.ts +731 -0
- package/packages/orq-rc/src/models/operations/postv2proxyaudiotranslations.ts +741 -0
- package/packages/orq-rc/src/models/operations/postv2proxycompletions.ts +5831 -0
- package/packages/orq-rc/src/models/operations/postv2proxyembeddings.ts +543 -0
- package/packages/orq-rc/src/models/operations/postv2proxyimagesedits.ts +596 -0
- package/packages/orq-rc/src/models/operations/postv2proxyimagesgenerations.ts +1107 -0
- package/packages/orq-rc/src/models/operations/postv2proxyimagesvariations.ts +592 -0
- package/packages/orq-rc/src/models/operations/postv2proxymoderations.ts +802 -0
- package/packages/orq-rc/src/models/operations/postv2proxyrerank.ts +526 -0
- package/packages/orq-rc/src/models/operations/retrievebatch.ts +474 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +478 -2
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +974 -2
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
- package/packages/orq-rc/src/sdk/batches.ts +81 -0
- package/packages/orq-rc/src/sdk/proxy.ts +211 -0
- package/packages/orq-rc/src/sdk/sdk.ts +12 -0
- package/packages/orq-rc/temp/example.ts +5 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +16 -16
|
@@ -0,0 +1,741 @@
|
|
|
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 { blobLikeSchema } from "../../types/blobs.js";
|
|
9
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
10
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
|
|
15
|
+
*/
|
|
16
|
+
export const PostV2ProxyAudioTranslationsResponseFormat = {
|
|
17
|
+
Json: "json",
|
|
18
|
+
Text: "text",
|
|
19
|
+
Srt: "srt",
|
|
20
|
+
VerboseJson: "verbose_json",
|
|
21
|
+
Vtt: "vtt",
|
|
22
|
+
} as const;
|
|
23
|
+
/**
|
|
24
|
+
* The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
|
|
25
|
+
*/
|
|
26
|
+
export type PostV2ProxyAudioTranslationsResponseFormat = ClosedEnum<
|
|
27
|
+
typeof PostV2ProxyAudioTranslationsResponseFormat
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The granularity of the timestamps in the transcription. Word provides word-level timestamps and character provides character-level timestamps per word.
|
|
32
|
+
*/
|
|
33
|
+
export const PostV2ProxyAudioTranslationsTimestampsGranularity = {
|
|
34
|
+
None: "none",
|
|
35
|
+
Word: "word",
|
|
36
|
+
Character: "character",
|
|
37
|
+
} as const;
|
|
38
|
+
/**
|
|
39
|
+
* The granularity of the timestamps in the transcription. Word provides word-level timestamps and character provides character-level timestamps per word.
|
|
40
|
+
*/
|
|
41
|
+
export type PostV2ProxyAudioTranslationsTimestampsGranularity = ClosedEnum<
|
|
42
|
+
typeof PostV2ProxyAudioTranslationsTimestampsGranularity
|
|
43
|
+
>;
|
|
44
|
+
|
|
45
|
+
export type PostV2ProxyAudioTranslationsFile = {
|
|
46
|
+
fileName: string;
|
|
47
|
+
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Translates audio into English.
|
|
52
|
+
*/
|
|
53
|
+
export type PostV2ProxyAudioTranslationsRequestBody = {
|
|
54
|
+
/**
|
|
55
|
+
* ID of the model to use
|
|
56
|
+
*/
|
|
57
|
+
model?: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
|
|
60
|
+
*/
|
|
61
|
+
prompt?: string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* When enable_logging is set to false, zero retention mode is used. This disables history features like request stitching and is only available to enterprise customers.
|
|
64
|
+
*/
|
|
65
|
+
enableLogging?: boolean | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Whether to annotate which speaker is currently talking in the uploaded file.
|
|
68
|
+
*/
|
|
69
|
+
diarize?: boolean | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
|
|
72
|
+
*/
|
|
73
|
+
responseFormat?: PostV2ProxyAudioTranslationsResponseFormat | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Whether to tag audio events like (laughter), (footsteps), etc. in the transcription.
|
|
76
|
+
*/
|
|
77
|
+
tagAudioEvents?: boolean | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* The maximum amount of speakers talking in the uploaded file. Helps with predicting who speaks when, the maximum is 32.
|
|
80
|
+
*/
|
|
81
|
+
numSpeakers?: number | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* The granularity of the timestamps in the transcription. Word provides word-level timestamps and character provides character-level timestamps per word.
|
|
84
|
+
*/
|
|
85
|
+
timestampsGranularity?:
|
|
86
|
+
| PostV2ProxyAudioTranslationsTimestampsGranularity
|
|
87
|
+
| undefined;
|
|
88
|
+
/**
|
|
89
|
+
* The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
|
|
90
|
+
*/
|
|
91
|
+
temperature?: number | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
|
94
|
+
*/
|
|
95
|
+
file: PostV2ProxyAudioTranslationsFile | Blob;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export type ResponseBodyWords = {
|
|
99
|
+
word?: string | undefined;
|
|
100
|
+
start?: number | undefined;
|
|
101
|
+
end?: number | undefined;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export type ResponseBodySegments = {
|
|
105
|
+
id: number;
|
|
106
|
+
seek: number;
|
|
107
|
+
start: number;
|
|
108
|
+
end: number;
|
|
109
|
+
text: string;
|
|
110
|
+
tokens: Array<number>;
|
|
111
|
+
temperature: number;
|
|
112
|
+
avgLogprob: number;
|
|
113
|
+
compressionRatio: number;
|
|
114
|
+
noSpeechProb: number;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export type PostV2ProxyAudioTranslationsResponseBody2 = {
|
|
118
|
+
task?: string | undefined;
|
|
119
|
+
language?: string | undefined;
|
|
120
|
+
duration?: number | undefined;
|
|
121
|
+
text: string;
|
|
122
|
+
words?: Array<ResponseBodyWords> | undefined;
|
|
123
|
+
segments?: Array<ResponseBodySegments> | undefined;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export type PostV2ProxyAudioTranslationsResponseBody1 = {
|
|
127
|
+
text: string;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Returns the translated text
|
|
132
|
+
*/
|
|
133
|
+
export type PostV2ProxyAudioTranslationsResponseBody =
|
|
134
|
+
| PostV2ProxyAudioTranslationsResponseBody1
|
|
135
|
+
| PostV2ProxyAudioTranslationsResponseBody2
|
|
136
|
+
| string;
|
|
137
|
+
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const PostV2ProxyAudioTranslationsResponseFormat$inboundSchema:
|
|
140
|
+
z.ZodNativeEnum<typeof PostV2ProxyAudioTranslationsResponseFormat> = z
|
|
141
|
+
.nativeEnum(PostV2ProxyAudioTranslationsResponseFormat);
|
|
142
|
+
|
|
143
|
+
/** @internal */
|
|
144
|
+
export const PostV2ProxyAudioTranslationsResponseFormat$outboundSchema:
|
|
145
|
+
z.ZodNativeEnum<typeof PostV2ProxyAudioTranslationsResponseFormat> =
|
|
146
|
+
PostV2ProxyAudioTranslationsResponseFormat$inboundSchema;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @internal
|
|
150
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
151
|
+
*/
|
|
152
|
+
export namespace PostV2ProxyAudioTranslationsResponseFormat$ {
|
|
153
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseFormat$inboundSchema` instead. */
|
|
154
|
+
export const inboundSchema =
|
|
155
|
+
PostV2ProxyAudioTranslationsResponseFormat$inboundSchema;
|
|
156
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseFormat$outboundSchema` instead. */
|
|
157
|
+
export const outboundSchema =
|
|
158
|
+
PostV2ProxyAudioTranslationsResponseFormat$outboundSchema;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** @internal */
|
|
162
|
+
export const PostV2ProxyAudioTranslationsTimestampsGranularity$inboundSchema:
|
|
163
|
+
z.ZodNativeEnum<typeof PostV2ProxyAudioTranslationsTimestampsGranularity> = z
|
|
164
|
+
.nativeEnum(PostV2ProxyAudioTranslationsTimestampsGranularity);
|
|
165
|
+
|
|
166
|
+
/** @internal */
|
|
167
|
+
export const PostV2ProxyAudioTranslationsTimestampsGranularity$outboundSchema:
|
|
168
|
+
z.ZodNativeEnum<typeof PostV2ProxyAudioTranslationsTimestampsGranularity> =
|
|
169
|
+
PostV2ProxyAudioTranslationsTimestampsGranularity$inboundSchema;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* @internal
|
|
173
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
174
|
+
*/
|
|
175
|
+
export namespace PostV2ProxyAudioTranslationsTimestampsGranularity$ {
|
|
176
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsTimestampsGranularity$inboundSchema` instead. */
|
|
177
|
+
export const inboundSchema =
|
|
178
|
+
PostV2ProxyAudioTranslationsTimestampsGranularity$inboundSchema;
|
|
179
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsTimestampsGranularity$outboundSchema` instead. */
|
|
180
|
+
export const outboundSchema =
|
|
181
|
+
PostV2ProxyAudioTranslationsTimestampsGranularity$outboundSchema;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** @internal */
|
|
185
|
+
export const PostV2ProxyAudioTranslationsFile$inboundSchema: z.ZodType<
|
|
186
|
+
PostV2ProxyAudioTranslationsFile,
|
|
187
|
+
z.ZodTypeDef,
|
|
188
|
+
unknown
|
|
189
|
+
> = z.object({
|
|
190
|
+
fileName: z.string(),
|
|
191
|
+
content: z.union([
|
|
192
|
+
z.instanceof(ReadableStream<Uint8Array>),
|
|
193
|
+
z.instanceof(Blob),
|
|
194
|
+
z.instanceof(ArrayBuffer),
|
|
195
|
+
z.instanceof(Uint8Array),
|
|
196
|
+
]),
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
/** @internal */
|
|
200
|
+
export type PostV2ProxyAudioTranslationsFile$Outbound = {
|
|
201
|
+
fileName: string;
|
|
202
|
+
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/** @internal */
|
|
206
|
+
export const PostV2ProxyAudioTranslationsFile$outboundSchema: z.ZodType<
|
|
207
|
+
PostV2ProxyAudioTranslationsFile$Outbound,
|
|
208
|
+
z.ZodTypeDef,
|
|
209
|
+
PostV2ProxyAudioTranslationsFile
|
|
210
|
+
> = z.object({
|
|
211
|
+
fileName: z.string(),
|
|
212
|
+
content: z.union([
|
|
213
|
+
z.instanceof(ReadableStream<Uint8Array>),
|
|
214
|
+
z.instanceof(Blob),
|
|
215
|
+
z.instanceof(ArrayBuffer),
|
|
216
|
+
z.instanceof(Uint8Array),
|
|
217
|
+
]),
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @internal
|
|
222
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
223
|
+
*/
|
|
224
|
+
export namespace PostV2ProxyAudioTranslationsFile$ {
|
|
225
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsFile$inboundSchema` instead. */
|
|
226
|
+
export const inboundSchema = PostV2ProxyAudioTranslationsFile$inboundSchema;
|
|
227
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsFile$outboundSchema` instead. */
|
|
228
|
+
export const outboundSchema = PostV2ProxyAudioTranslationsFile$outboundSchema;
|
|
229
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsFile$Outbound` instead. */
|
|
230
|
+
export type Outbound = PostV2ProxyAudioTranslationsFile$Outbound;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export function postV2ProxyAudioTranslationsFileToJSON(
|
|
234
|
+
postV2ProxyAudioTranslationsFile: PostV2ProxyAudioTranslationsFile,
|
|
235
|
+
): string {
|
|
236
|
+
return JSON.stringify(
|
|
237
|
+
PostV2ProxyAudioTranslationsFile$outboundSchema.parse(
|
|
238
|
+
postV2ProxyAudioTranslationsFile,
|
|
239
|
+
),
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export function postV2ProxyAudioTranslationsFileFromJSON(
|
|
244
|
+
jsonString: string,
|
|
245
|
+
): SafeParseResult<PostV2ProxyAudioTranslationsFile, SDKValidationError> {
|
|
246
|
+
return safeParse(
|
|
247
|
+
jsonString,
|
|
248
|
+
(x) => PostV2ProxyAudioTranslationsFile$inboundSchema.parse(JSON.parse(x)),
|
|
249
|
+
`Failed to parse 'PostV2ProxyAudioTranslationsFile' from JSON`,
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/** @internal */
|
|
254
|
+
export const PostV2ProxyAudioTranslationsRequestBody$inboundSchema: z.ZodType<
|
|
255
|
+
PostV2ProxyAudioTranslationsRequestBody,
|
|
256
|
+
z.ZodTypeDef,
|
|
257
|
+
unknown
|
|
258
|
+
> = z.object({
|
|
259
|
+
model: z.string().default("openai/whisper-1"),
|
|
260
|
+
prompt: z.string().optional(),
|
|
261
|
+
enable_logging: z.boolean().default(true),
|
|
262
|
+
diarize: z.boolean().default(false),
|
|
263
|
+
response_format: PostV2ProxyAudioTranslationsResponseFormat$inboundSchema
|
|
264
|
+
.optional(),
|
|
265
|
+
tag_audio_events: z.boolean().default(true),
|
|
266
|
+
num_speakers: z.number().optional(),
|
|
267
|
+
timestamps_granularity:
|
|
268
|
+
PostV2ProxyAudioTranslationsTimestampsGranularity$inboundSchema.default(
|
|
269
|
+
"word",
|
|
270
|
+
),
|
|
271
|
+
temperature: z.number().optional(),
|
|
272
|
+
file: z.lazy(() => PostV2ProxyAudioTranslationsFile$inboundSchema),
|
|
273
|
+
}).transform((v) => {
|
|
274
|
+
return remap$(v, {
|
|
275
|
+
"enable_logging": "enableLogging",
|
|
276
|
+
"response_format": "responseFormat",
|
|
277
|
+
"tag_audio_events": "tagAudioEvents",
|
|
278
|
+
"num_speakers": "numSpeakers",
|
|
279
|
+
"timestamps_granularity": "timestampsGranularity",
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
/** @internal */
|
|
284
|
+
export type PostV2ProxyAudioTranslationsRequestBody$Outbound = {
|
|
285
|
+
model: string;
|
|
286
|
+
prompt?: string | undefined;
|
|
287
|
+
enable_logging: boolean;
|
|
288
|
+
diarize: boolean;
|
|
289
|
+
response_format?: string | undefined;
|
|
290
|
+
tag_audio_events: boolean;
|
|
291
|
+
num_speakers?: number | undefined;
|
|
292
|
+
timestamps_granularity: string;
|
|
293
|
+
temperature?: number | undefined;
|
|
294
|
+
file: PostV2ProxyAudioTranslationsFile$Outbound | Blob;
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
/** @internal */
|
|
298
|
+
export const PostV2ProxyAudioTranslationsRequestBody$outboundSchema: z.ZodType<
|
|
299
|
+
PostV2ProxyAudioTranslationsRequestBody$Outbound,
|
|
300
|
+
z.ZodTypeDef,
|
|
301
|
+
PostV2ProxyAudioTranslationsRequestBody
|
|
302
|
+
> = z.object({
|
|
303
|
+
model: z.string().default("openai/whisper-1"),
|
|
304
|
+
prompt: z.string().optional(),
|
|
305
|
+
enableLogging: z.boolean().default(true),
|
|
306
|
+
diarize: z.boolean().default(false),
|
|
307
|
+
responseFormat: PostV2ProxyAudioTranslationsResponseFormat$outboundSchema
|
|
308
|
+
.optional(),
|
|
309
|
+
tagAudioEvents: z.boolean().default(true),
|
|
310
|
+
numSpeakers: z.number().optional(),
|
|
311
|
+
timestampsGranularity:
|
|
312
|
+
PostV2ProxyAudioTranslationsTimestampsGranularity$outboundSchema.default(
|
|
313
|
+
"word",
|
|
314
|
+
),
|
|
315
|
+
temperature: z.number().optional(),
|
|
316
|
+
file: z.lazy(() => PostV2ProxyAudioTranslationsFile$outboundSchema).or(
|
|
317
|
+
blobLikeSchema,
|
|
318
|
+
),
|
|
319
|
+
}).transform((v) => {
|
|
320
|
+
return remap$(v, {
|
|
321
|
+
enableLogging: "enable_logging",
|
|
322
|
+
responseFormat: "response_format",
|
|
323
|
+
tagAudioEvents: "tag_audio_events",
|
|
324
|
+
numSpeakers: "num_speakers",
|
|
325
|
+
timestampsGranularity: "timestamps_granularity",
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* @internal
|
|
331
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
332
|
+
*/
|
|
333
|
+
export namespace PostV2ProxyAudioTranslationsRequestBody$ {
|
|
334
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsRequestBody$inboundSchema` instead. */
|
|
335
|
+
export const inboundSchema =
|
|
336
|
+
PostV2ProxyAudioTranslationsRequestBody$inboundSchema;
|
|
337
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsRequestBody$outboundSchema` instead. */
|
|
338
|
+
export const outboundSchema =
|
|
339
|
+
PostV2ProxyAudioTranslationsRequestBody$outboundSchema;
|
|
340
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsRequestBody$Outbound` instead. */
|
|
341
|
+
export type Outbound = PostV2ProxyAudioTranslationsRequestBody$Outbound;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export function postV2ProxyAudioTranslationsRequestBodyToJSON(
|
|
345
|
+
postV2ProxyAudioTranslationsRequestBody:
|
|
346
|
+
PostV2ProxyAudioTranslationsRequestBody,
|
|
347
|
+
): string {
|
|
348
|
+
return JSON.stringify(
|
|
349
|
+
PostV2ProxyAudioTranslationsRequestBody$outboundSchema.parse(
|
|
350
|
+
postV2ProxyAudioTranslationsRequestBody,
|
|
351
|
+
),
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export function postV2ProxyAudioTranslationsRequestBodyFromJSON(
|
|
356
|
+
jsonString: string,
|
|
357
|
+
): SafeParseResult<
|
|
358
|
+
PostV2ProxyAudioTranslationsRequestBody,
|
|
359
|
+
SDKValidationError
|
|
360
|
+
> {
|
|
361
|
+
return safeParse(
|
|
362
|
+
jsonString,
|
|
363
|
+
(x) =>
|
|
364
|
+
PostV2ProxyAudioTranslationsRequestBody$inboundSchema.parse(
|
|
365
|
+
JSON.parse(x),
|
|
366
|
+
),
|
|
367
|
+
`Failed to parse 'PostV2ProxyAudioTranslationsRequestBody' from JSON`,
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/** @internal */
|
|
372
|
+
export const ResponseBodyWords$inboundSchema: z.ZodType<
|
|
373
|
+
ResponseBodyWords,
|
|
374
|
+
z.ZodTypeDef,
|
|
375
|
+
unknown
|
|
376
|
+
> = z.object({
|
|
377
|
+
word: z.string().optional(),
|
|
378
|
+
start: z.number().optional(),
|
|
379
|
+
end: z.number().optional(),
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
/** @internal */
|
|
383
|
+
export type ResponseBodyWords$Outbound = {
|
|
384
|
+
word?: string | undefined;
|
|
385
|
+
start?: number | undefined;
|
|
386
|
+
end?: number | undefined;
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
/** @internal */
|
|
390
|
+
export const ResponseBodyWords$outboundSchema: z.ZodType<
|
|
391
|
+
ResponseBodyWords$Outbound,
|
|
392
|
+
z.ZodTypeDef,
|
|
393
|
+
ResponseBodyWords
|
|
394
|
+
> = z.object({
|
|
395
|
+
word: z.string().optional(),
|
|
396
|
+
start: z.number().optional(),
|
|
397
|
+
end: z.number().optional(),
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* @internal
|
|
402
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
403
|
+
*/
|
|
404
|
+
export namespace ResponseBodyWords$ {
|
|
405
|
+
/** @deprecated use `ResponseBodyWords$inboundSchema` instead. */
|
|
406
|
+
export const inboundSchema = ResponseBodyWords$inboundSchema;
|
|
407
|
+
/** @deprecated use `ResponseBodyWords$outboundSchema` instead. */
|
|
408
|
+
export const outboundSchema = ResponseBodyWords$outboundSchema;
|
|
409
|
+
/** @deprecated use `ResponseBodyWords$Outbound` instead. */
|
|
410
|
+
export type Outbound = ResponseBodyWords$Outbound;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export function responseBodyWordsToJSON(
|
|
414
|
+
responseBodyWords: ResponseBodyWords,
|
|
415
|
+
): string {
|
|
416
|
+
return JSON.stringify(
|
|
417
|
+
ResponseBodyWords$outboundSchema.parse(responseBodyWords),
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export function responseBodyWordsFromJSON(
|
|
422
|
+
jsonString: string,
|
|
423
|
+
): SafeParseResult<ResponseBodyWords, SDKValidationError> {
|
|
424
|
+
return safeParse(
|
|
425
|
+
jsonString,
|
|
426
|
+
(x) => ResponseBodyWords$inboundSchema.parse(JSON.parse(x)),
|
|
427
|
+
`Failed to parse 'ResponseBodyWords' from JSON`,
|
|
428
|
+
);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/** @internal */
|
|
432
|
+
export const ResponseBodySegments$inboundSchema: z.ZodType<
|
|
433
|
+
ResponseBodySegments,
|
|
434
|
+
z.ZodTypeDef,
|
|
435
|
+
unknown
|
|
436
|
+
> = z.object({
|
|
437
|
+
id: z.number(),
|
|
438
|
+
seek: z.number(),
|
|
439
|
+
start: z.number(),
|
|
440
|
+
end: z.number(),
|
|
441
|
+
text: z.string(),
|
|
442
|
+
tokens: z.array(z.number()),
|
|
443
|
+
temperature: z.number(),
|
|
444
|
+
avg_logprob: z.number(),
|
|
445
|
+
compression_ratio: z.number(),
|
|
446
|
+
no_speech_prob: z.number(),
|
|
447
|
+
}).transform((v) => {
|
|
448
|
+
return remap$(v, {
|
|
449
|
+
"avg_logprob": "avgLogprob",
|
|
450
|
+
"compression_ratio": "compressionRatio",
|
|
451
|
+
"no_speech_prob": "noSpeechProb",
|
|
452
|
+
});
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
/** @internal */
|
|
456
|
+
export type ResponseBodySegments$Outbound = {
|
|
457
|
+
id: number;
|
|
458
|
+
seek: number;
|
|
459
|
+
start: number;
|
|
460
|
+
end: number;
|
|
461
|
+
text: string;
|
|
462
|
+
tokens: Array<number>;
|
|
463
|
+
temperature: number;
|
|
464
|
+
avg_logprob: number;
|
|
465
|
+
compression_ratio: number;
|
|
466
|
+
no_speech_prob: number;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
/** @internal */
|
|
470
|
+
export const ResponseBodySegments$outboundSchema: z.ZodType<
|
|
471
|
+
ResponseBodySegments$Outbound,
|
|
472
|
+
z.ZodTypeDef,
|
|
473
|
+
ResponseBodySegments
|
|
474
|
+
> = z.object({
|
|
475
|
+
id: z.number(),
|
|
476
|
+
seek: z.number(),
|
|
477
|
+
start: z.number(),
|
|
478
|
+
end: z.number(),
|
|
479
|
+
text: z.string(),
|
|
480
|
+
tokens: z.array(z.number()),
|
|
481
|
+
temperature: z.number(),
|
|
482
|
+
avgLogprob: z.number(),
|
|
483
|
+
compressionRatio: z.number(),
|
|
484
|
+
noSpeechProb: z.number(),
|
|
485
|
+
}).transform((v) => {
|
|
486
|
+
return remap$(v, {
|
|
487
|
+
avgLogprob: "avg_logprob",
|
|
488
|
+
compressionRatio: "compression_ratio",
|
|
489
|
+
noSpeechProb: "no_speech_prob",
|
|
490
|
+
});
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* @internal
|
|
495
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
496
|
+
*/
|
|
497
|
+
export namespace ResponseBodySegments$ {
|
|
498
|
+
/** @deprecated use `ResponseBodySegments$inboundSchema` instead. */
|
|
499
|
+
export const inboundSchema = ResponseBodySegments$inboundSchema;
|
|
500
|
+
/** @deprecated use `ResponseBodySegments$outboundSchema` instead. */
|
|
501
|
+
export const outboundSchema = ResponseBodySegments$outboundSchema;
|
|
502
|
+
/** @deprecated use `ResponseBodySegments$Outbound` instead. */
|
|
503
|
+
export type Outbound = ResponseBodySegments$Outbound;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
export function responseBodySegmentsToJSON(
|
|
507
|
+
responseBodySegments: ResponseBodySegments,
|
|
508
|
+
): string {
|
|
509
|
+
return JSON.stringify(
|
|
510
|
+
ResponseBodySegments$outboundSchema.parse(responseBodySegments),
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export function responseBodySegmentsFromJSON(
|
|
515
|
+
jsonString: string,
|
|
516
|
+
): SafeParseResult<ResponseBodySegments, SDKValidationError> {
|
|
517
|
+
return safeParse(
|
|
518
|
+
jsonString,
|
|
519
|
+
(x) => ResponseBodySegments$inboundSchema.parse(JSON.parse(x)),
|
|
520
|
+
`Failed to parse 'ResponseBodySegments' from JSON`,
|
|
521
|
+
);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/** @internal */
|
|
525
|
+
export const PostV2ProxyAudioTranslationsResponseBody2$inboundSchema: z.ZodType<
|
|
526
|
+
PostV2ProxyAudioTranslationsResponseBody2,
|
|
527
|
+
z.ZodTypeDef,
|
|
528
|
+
unknown
|
|
529
|
+
> = z.object({
|
|
530
|
+
task: z.string().optional(),
|
|
531
|
+
language: z.string().optional(),
|
|
532
|
+
duration: z.number().optional(),
|
|
533
|
+
text: z.string(),
|
|
534
|
+
words: z.array(z.lazy(() => ResponseBodyWords$inboundSchema)).optional(),
|
|
535
|
+
segments: z.array(z.lazy(() => ResponseBodySegments$inboundSchema))
|
|
536
|
+
.optional(),
|
|
537
|
+
});
|
|
538
|
+
|
|
539
|
+
/** @internal */
|
|
540
|
+
export type PostV2ProxyAudioTranslationsResponseBody2$Outbound = {
|
|
541
|
+
task?: string | undefined;
|
|
542
|
+
language?: string | undefined;
|
|
543
|
+
duration?: number | undefined;
|
|
544
|
+
text: string;
|
|
545
|
+
words?: Array<ResponseBodyWords$Outbound> | undefined;
|
|
546
|
+
segments?: Array<ResponseBodySegments$Outbound> | undefined;
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
/** @internal */
|
|
550
|
+
export const PostV2ProxyAudioTranslationsResponseBody2$outboundSchema:
|
|
551
|
+
z.ZodType<
|
|
552
|
+
PostV2ProxyAudioTranslationsResponseBody2$Outbound,
|
|
553
|
+
z.ZodTypeDef,
|
|
554
|
+
PostV2ProxyAudioTranslationsResponseBody2
|
|
555
|
+
> = z.object({
|
|
556
|
+
task: z.string().optional(),
|
|
557
|
+
language: z.string().optional(),
|
|
558
|
+
duration: z.number().optional(),
|
|
559
|
+
text: z.string(),
|
|
560
|
+
words: z.array(z.lazy(() => ResponseBodyWords$outboundSchema)).optional(),
|
|
561
|
+
segments: z.array(z.lazy(() => ResponseBodySegments$outboundSchema))
|
|
562
|
+
.optional(),
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* @internal
|
|
567
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
568
|
+
*/
|
|
569
|
+
export namespace PostV2ProxyAudioTranslationsResponseBody2$ {
|
|
570
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseBody2$inboundSchema` instead. */
|
|
571
|
+
export const inboundSchema =
|
|
572
|
+
PostV2ProxyAudioTranslationsResponseBody2$inboundSchema;
|
|
573
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseBody2$outboundSchema` instead. */
|
|
574
|
+
export const outboundSchema =
|
|
575
|
+
PostV2ProxyAudioTranslationsResponseBody2$outboundSchema;
|
|
576
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseBody2$Outbound` instead. */
|
|
577
|
+
export type Outbound = PostV2ProxyAudioTranslationsResponseBody2$Outbound;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export function postV2ProxyAudioTranslationsResponseBody2ToJSON(
|
|
581
|
+
postV2ProxyAudioTranslationsResponseBody2:
|
|
582
|
+
PostV2ProxyAudioTranslationsResponseBody2,
|
|
583
|
+
): string {
|
|
584
|
+
return JSON.stringify(
|
|
585
|
+
PostV2ProxyAudioTranslationsResponseBody2$outboundSchema.parse(
|
|
586
|
+
postV2ProxyAudioTranslationsResponseBody2,
|
|
587
|
+
),
|
|
588
|
+
);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
export function postV2ProxyAudioTranslationsResponseBody2FromJSON(
|
|
592
|
+
jsonString: string,
|
|
593
|
+
): SafeParseResult<
|
|
594
|
+
PostV2ProxyAudioTranslationsResponseBody2,
|
|
595
|
+
SDKValidationError
|
|
596
|
+
> {
|
|
597
|
+
return safeParse(
|
|
598
|
+
jsonString,
|
|
599
|
+
(x) =>
|
|
600
|
+
PostV2ProxyAudioTranslationsResponseBody2$inboundSchema.parse(
|
|
601
|
+
JSON.parse(x),
|
|
602
|
+
),
|
|
603
|
+
`Failed to parse 'PostV2ProxyAudioTranslationsResponseBody2' from JSON`,
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/** @internal */
|
|
608
|
+
export const PostV2ProxyAudioTranslationsResponseBody1$inboundSchema: z.ZodType<
|
|
609
|
+
PostV2ProxyAudioTranslationsResponseBody1,
|
|
610
|
+
z.ZodTypeDef,
|
|
611
|
+
unknown
|
|
612
|
+
> = z.object({
|
|
613
|
+
text: z.string(),
|
|
614
|
+
});
|
|
615
|
+
|
|
616
|
+
/** @internal */
|
|
617
|
+
export type PostV2ProxyAudioTranslationsResponseBody1$Outbound = {
|
|
618
|
+
text: string;
|
|
619
|
+
};
|
|
620
|
+
|
|
621
|
+
/** @internal */
|
|
622
|
+
export const PostV2ProxyAudioTranslationsResponseBody1$outboundSchema:
|
|
623
|
+
z.ZodType<
|
|
624
|
+
PostV2ProxyAudioTranslationsResponseBody1$Outbound,
|
|
625
|
+
z.ZodTypeDef,
|
|
626
|
+
PostV2ProxyAudioTranslationsResponseBody1
|
|
627
|
+
> = z.object({
|
|
628
|
+
text: z.string(),
|
|
629
|
+
});
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* @internal
|
|
633
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
634
|
+
*/
|
|
635
|
+
export namespace PostV2ProxyAudioTranslationsResponseBody1$ {
|
|
636
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseBody1$inboundSchema` instead. */
|
|
637
|
+
export const inboundSchema =
|
|
638
|
+
PostV2ProxyAudioTranslationsResponseBody1$inboundSchema;
|
|
639
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseBody1$outboundSchema` instead. */
|
|
640
|
+
export const outboundSchema =
|
|
641
|
+
PostV2ProxyAudioTranslationsResponseBody1$outboundSchema;
|
|
642
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseBody1$Outbound` instead. */
|
|
643
|
+
export type Outbound = PostV2ProxyAudioTranslationsResponseBody1$Outbound;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
export function postV2ProxyAudioTranslationsResponseBody1ToJSON(
|
|
647
|
+
postV2ProxyAudioTranslationsResponseBody1:
|
|
648
|
+
PostV2ProxyAudioTranslationsResponseBody1,
|
|
649
|
+
): string {
|
|
650
|
+
return JSON.stringify(
|
|
651
|
+
PostV2ProxyAudioTranslationsResponseBody1$outboundSchema.parse(
|
|
652
|
+
postV2ProxyAudioTranslationsResponseBody1,
|
|
653
|
+
),
|
|
654
|
+
);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
export function postV2ProxyAudioTranslationsResponseBody1FromJSON(
|
|
658
|
+
jsonString: string,
|
|
659
|
+
): SafeParseResult<
|
|
660
|
+
PostV2ProxyAudioTranslationsResponseBody1,
|
|
661
|
+
SDKValidationError
|
|
662
|
+
> {
|
|
663
|
+
return safeParse(
|
|
664
|
+
jsonString,
|
|
665
|
+
(x) =>
|
|
666
|
+
PostV2ProxyAudioTranslationsResponseBody1$inboundSchema.parse(
|
|
667
|
+
JSON.parse(x),
|
|
668
|
+
),
|
|
669
|
+
`Failed to parse 'PostV2ProxyAudioTranslationsResponseBody1' from JSON`,
|
|
670
|
+
);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/** @internal */
|
|
674
|
+
export const PostV2ProxyAudioTranslationsResponseBody$inboundSchema: z.ZodType<
|
|
675
|
+
PostV2ProxyAudioTranslationsResponseBody,
|
|
676
|
+
z.ZodTypeDef,
|
|
677
|
+
unknown
|
|
678
|
+
> = z.union([
|
|
679
|
+
z.lazy(() => PostV2ProxyAudioTranslationsResponseBody1$inboundSchema),
|
|
680
|
+
z.lazy(() => PostV2ProxyAudioTranslationsResponseBody2$inboundSchema),
|
|
681
|
+
z.string(),
|
|
682
|
+
]);
|
|
683
|
+
|
|
684
|
+
/** @internal */
|
|
685
|
+
export type PostV2ProxyAudioTranslationsResponseBody$Outbound =
|
|
686
|
+
| PostV2ProxyAudioTranslationsResponseBody1$Outbound
|
|
687
|
+
| PostV2ProxyAudioTranslationsResponseBody2$Outbound
|
|
688
|
+
| string;
|
|
689
|
+
|
|
690
|
+
/** @internal */
|
|
691
|
+
export const PostV2ProxyAudioTranslationsResponseBody$outboundSchema: z.ZodType<
|
|
692
|
+
PostV2ProxyAudioTranslationsResponseBody$Outbound,
|
|
693
|
+
z.ZodTypeDef,
|
|
694
|
+
PostV2ProxyAudioTranslationsResponseBody
|
|
695
|
+
> = z.union([
|
|
696
|
+
z.lazy(() => PostV2ProxyAudioTranslationsResponseBody1$outboundSchema),
|
|
697
|
+
z.lazy(() => PostV2ProxyAudioTranslationsResponseBody2$outboundSchema),
|
|
698
|
+
z.string(),
|
|
699
|
+
]);
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* @internal
|
|
703
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
704
|
+
*/
|
|
705
|
+
export namespace PostV2ProxyAudioTranslationsResponseBody$ {
|
|
706
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseBody$inboundSchema` instead. */
|
|
707
|
+
export const inboundSchema =
|
|
708
|
+
PostV2ProxyAudioTranslationsResponseBody$inboundSchema;
|
|
709
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseBody$outboundSchema` instead. */
|
|
710
|
+
export const outboundSchema =
|
|
711
|
+
PostV2ProxyAudioTranslationsResponseBody$outboundSchema;
|
|
712
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseBody$Outbound` instead. */
|
|
713
|
+
export type Outbound = PostV2ProxyAudioTranslationsResponseBody$Outbound;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
export function postV2ProxyAudioTranslationsResponseBodyToJSON(
|
|
717
|
+
postV2ProxyAudioTranslationsResponseBody:
|
|
718
|
+
PostV2ProxyAudioTranslationsResponseBody,
|
|
719
|
+
): string {
|
|
720
|
+
return JSON.stringify(
|
|
721
|
+
PostV2ProxyAudioTranslationsResponseBody$outboundSchema.parse(
|
|
722
|
+
postV2ProxyAudioTranslationsResponseBody,
|
|
723
|
+
),
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export function postV2ProxyAudioTranslationsResponseBodyFromJSON(
|
|
728
|
+
jsonString: string,
|
|
729
|
+
): SafeParseResult<
|
|
730
|
+
PostV2ProxyAudioTranslationsResponseBody,
|
|
731
|
+
SDKValidationError
|
|
732
|
+
> {
|
|
733
|
+
return safeParse(
|
|
734
|
+
jsonString,
|
|
735
|
+
(x) =>
|
|
736
|
+
PostV2ProxyAudioTranslationsResponseBody$inboundSchema.parse(
|
|
737
|
+
JSON.parse(x),
|
|
738
|
+
),
|
|
739
|
+
`Failed to parse 'PostV2ProxyAudioTranslationsResponseBody' from JSON`,
|
|
740
|
+
);
|
|
741
|
+
}
|