@orq-ai/node 3.11.7 → 3.11.9
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/lib/config.js.map +1 -1
- 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/knowledge/README.md +1 -1
- package/packages/orq-rc/docs/sdks/proxy/README.md +1284 -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/knowledgeSearch.ts +1 -1
- 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/knowledgeSearch.ts +1 -1
- 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 +878 -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/knowledge.ts +1 -1
- 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,1107 @@
|
|
|
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 * as components from "../components/index.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Allows to set transparency for the background of the generated image(s). This parameter is only supported for `openai/gpt-image-1`.
|
|
15
|
+
*/
|
|
16
|
+
export const Background = {
|
|
17
|
+
Transparent: "transparent",
|
|
18
|
+
Opaque: "opaque",
|
|
19
|
+
Auto: "auto",
|
|
20
|
+
} as const;
|
|
21
|
+
/**
|
|
22
|
+
* Allows to set transparency for the background of the generated image(s). This parameter is only supported for `openai/gpt-image-1`.
|
|
23
|
+
*/
|
|
24
|
+
export type Background = ClosedEnum<typeof Background>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Control the content-moderation level for images generated by `openai/gpt-image-1`.
|
|
28
|
+
*/
|
|
29
|
+
export const Moderation = {
|
|
30
|
+
Low: "low",
|
|
31
|
+
Auto: "auto",
|
|
32
|
+
} as const;
|
|
33
|
+
/**
|
|
34
|
+
* Control the content-moderation level for images generated by `openai/gpt-image-1`.
|
|
35
|
+
*/
|
|
36
|
+
export type Moderation = ClosedEnum<typeof Moderation>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The format in which the generated images are returned. This parameter is only supported for `openai/gpt-image-1`.
|
|
40
|
+
*/
|
|
41
|
+
export const OutputFormat = {
|
|
42
|
+
Png: "png",
|
|
43
|
+
Jpeg: "jpeg",
|
|
44
|
+
Webp: "webp",
|
|
45
|
+
} as const;
|
|
46
|
+
/**
|
|
47
|
+
* The format in which the generated images are returned. This parameter is only supported for `openai/gpt-image-1`.
|
|
48
|
+
*/
|
|
49
|
+
export type OutputFormat = ClosedEnum<typeof OutputFormat>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The quality of the image that will be generated. Auto will automatically select the best quality for the given model.
|
|
53
|
+
*/
|
|
54
|
+
export const Quality = {
|
|
55
|
+
Auto: "auto",
|
|
56
|
+
High: "high",
|
|
57
|
+
Medium: "medium",
|
|
58
|
+
Low: "low",
|
|
59
|
+
Hd: "hd",
|
|
60
|
+
Standard: "standard",
|
|
61
|
+
} as const;
|
|
62
|
+
/**
|
|
63
|
+
* The quality of the image that will be generated. Auto will automatically select the best quality for the given model.
|
|
64
|
+
*/
|
|
65
|
+
export type Quality = ClosedEnum<typeof Quality>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The format in which generated images with are returned. This parameter isn't supported for `openai/gpt-image-1` which will always return base64-encoded images.
|
|
69
|
+
*/
|
|
70
|
+
export const PostV2ProxyImagesGenerationsResponseFormat = {
|
|
71
|
+
Url: "url",
|
|
72
|
+
B64Json: "b64_json",
|
|
73
|
+
} as const;
|
|
74
|
+
/**
|
|
75
|
+
* The format in which generated images with are returned. This parameter isn't supported for `openai/gpt-image-1` which will always return base64-encoded images.
|
|
76
|
+
*/
|
|
77
|
+
export type PostV2ProxyImagesGenerationsResponseFormat = ClosedEnum<
|
|
78
|
+
typeof PostV2ProxyImagesGenerationsResponseFormat
|
|
79
|
+
>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Retry configuration for the request
|
|
83
|
+
*/
|
|
84
|
+
export type PostV2ProxyImagesGenerationsRetry = {
|
|
85
|
+
/**
|
|
86
|
+
* Number of retry attempts (1-5)
|
|
87
|
+
*/
|
|
88
|
+
count?: number | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* HTTP status codes that trigger retry logic
|
|
91
|
+
*/
|
|
92
|
+
onCodes?: Array<number> | undefined;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export type PostV2ProxyImagesGenerationsFallbacks = {
|
|
96
|
+
/**
|
|
97
|
+
* Fallback model identifier
|
|
98
|
+
*/
|
|
99
|
+
model: string;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Thread information to group related requests
|
|
104
|
+
*/
|
|
105
|
+
export type PostV2ProxyImagesGenerationsThread = {
|
|
106
|
+
/**
|
|
107
|
+
* Unique thread identifier to group related invocations.
|
|
108
|
+
*/
|
|
109
|
+
id: string;
|
|
110
|
+
/**
|
|
111
|
+
* Optional tags to differentiate or categorize threads
|
|
112
|
+
*/
|
|
113
|
+
tags?: Array<string> | undefined;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const PostV2ProxyImagesGenerationsType = {
|
|
117
|
+
ExactMatch: "exact_match",
|
|
118
|
+
} as const;
|
|
119
|
+
export type PostV2ProxyImagesGenerationsType = ClosedEnum<
|
|
120
|
+
typeof PostV2ProxyImagesGenerationsType
|
|
121
|
+
>;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Cache configuration for the request.
|
|
125
|
+
*/
|
|
126
|
+
export type PostV2ProxyImagesGenerationsCache = {
|
|
127
|
+
/**
|
|
128
|
+
* Time to live for cached responses in seconds. Maximum 259200 seconds (3 days).
|
|
129
|
+
*/
|
|
130
|
+
ttl?: number | undefined;
|
|
131
|
+
type: PostV2ProxyImagesGenerationsType;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export type PostV2ProxyImagesGenerationsOrq = {
|
|
135
|
+
/**
|
|
136
|
+
* The name to display on the trace. If not specified, the default system name will be used.
|
|
137
|
+
*/
|
|
138
|
+
name?: string | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* Retry configuration for the request
|
|
141
|
+
*/
|
|
142
|
+
retry?: PostV2ProxyImagesGenerationsRetry | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* Array of fallback models to use if primary model fails
|
|
145
|
+
*/
|
|
146
|
+
fallbacks?: Array<PostV2ProxyImagesGenerationsFallbacks> | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* Information about the contact making the request. If the contact does not exist, it will be created automatically.
|
|
149
|
+
*/
|
|
150
|
+
contact?: components.PublicContact | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* Thread information to group related requests
|
|
153
|
+
*/
|
|
154
|
+
thread?: PostV2ProxyImagesGenerationsThread | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* Cache configuration for the request.
|
|
157
|
+
*/
|
|
158
|
+
cache?: PostV2ProxyImagesGenerationsCache | undefined;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* input
|
|
163
|
+
*/
|
|
164
|
+
export type PostV2ProxyImagesGenerationsRequestBody = {
|
|
165
|
+
/**
|
|
166
|
+
* A text description of the desired image(s).
|
|
167
|
+
*/
|
|
168
|
+
prompt: string;
|
|
169
|
+
/**
|
|
170
|
+
* Allows to set transparency for the background of the generated image(s). This parameter is only supported for `openai/gpt-image-1`.
|
|
171
|
+
*/
|
|
172
|
+
background?: Background | null | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* The model to use for image generation. Defaults to dall-e-2 unless a parameter specific to gpt-image-1 is used.
|
|
175
|
+
*/
|
|
176
|
+
model: string;
|
|
177
|
+
/**
|
|
178
|
+
* Control the content-moderation level for images generated by `openai/gpt-image-1`.
|
|
179
|
+
*/
|
|
180
|
+
moderation?: Moderation | null | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* The number of images to generate. Must be between 1 and 10. For dall-e-3, only n=1 is supported.
|
|
183
|
+
*/
|
|
184
|
+
n?: number | null | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* The compression level (0-100%) for the generated images. This parameter is only supported for gpt-image-1 with the webp or jpeg output formats.
|
|
187
|
+
*/
|
|
188
|
+
outputCompression?: number | null | undefined;
|
|
189
|
+
/**
|
|
190
|
+
* The format in which the generated images are returned. This parameter is only supported for `openai/gpt-image-1`.
|
|
191
|
+
*/
|
|
192
|
+
outputFormat?: OutputFormat | null | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* The quality of the image that will be generated. Auto will automatically select the best quality for the given model.
|
|
195
|
+
*/
|
|
196
|
+
quality?: Quality | null | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* The format in which generated images with are returned. This parameter isn't supported for `openai/gpt-image-1` which will always return base64-encoded images.
|
|
199
|
+
*/
|
|
200
|
+
responseFormat?:
|
|
201
|
+
| PostV2ProxyImagesGenerationsResponseFormat
|
|
202
|
+
| null
|
|
203
|
+
| undefined;
|
|
204
|
+
/**
|
|
205
|
+
* The size of the generated images. Must be one of the specified sizes for each model.
|
|
206
|
+
*/
|
|
207
|
+
size?: string | null | undefined;
|
|
208
|
+
/**
|
|
209
|
+
* The style of the generated images. This parameter is only supported for dall-e-3.
|
|
210
|
+
*/
|
|
211
|
+
style?: string | null | undefined;
|
|
212
|
+
orq?: PostV2ProxyImagesGenerationsOrq | undefined;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
export type PostV2ProxyImagesGenerationsData = {
|
|
216
|
+
/**
|
|
217
|
+
* The prompt that was used to generate the image, if there was any revision to the prompt.
|
|
218
|
+
*/
|
|
219
|
+
revisedPrompt?: string | null | undefined;
|
|
220
|
+
/**
|
|
221
|
+
* The base64-encoded JSON of the generated image, if `response_format` is `b64_json`
|
|
222
|
+
*/
|
|
223
|
+
b64Json?: string | undefined;
|
|
224
|
+
/**
|
|
225
|
+
* The url of the generated image, if `response_format` is `url` (default)
|
|
226
|
+
*/
|
|
227
|
+
url?: string | undefined;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
export type InputTokensDetails = {
|
|
231
|
+
imageTokens?: number | undefined;
|
|
232
|
+
textTokens?: number | undefined;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
export type PostV2ProxyImagesGenerationsUsage = {
|
|
236
|
+
inputTokens?: number | undefined;
|
|
237
|
+
inputTokensDetails: InputTokensDetails;
|
|
238
|
+
outputTokens?: number | undefined;
|
|
239
|
+
totalTokens?: number | undefined;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Represents an image generation response from the API.
|
|
244
|
+
*/
|
|
245
|
+
export type PostV2ProxyImagesGenerationsResponseBody = {
|
|
246
|
+
created?: number | undefined;
|
|
247
|
+
/**
|
|
248
|
+
* Represents the url or the content of an image generated.
|
|
249
|
+
*/
|
|
250
|
+
data: Array<PostV2ProxyImagesGenerationsData>;
|
|
251
|
+
usage?: PostV2ProxyImagesGenerationsUsage | undefined;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
/** @internal */
|
|
255
|
+
export const Background$inboundSchema: z.ZodNativeEnum<typeof Background> = z
|
|
256
|
+
.nativeEnum(Background);
|
|
257
|
+
|
|
258
|
+
/** @internal */
|
|
259
|
+
export const Background$outboundSchema: z.ZodNativeEnum<typeof Background> =
|
|
260
|
+
Background$inboundSchema;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* @internal
|
|
264
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
265
|
+
*/
|
|
266
|
+
export namespace Background$ {
|
|
267
|
+
/** @deprecated use `Background$inboundSchema` instead. */
|
|
268
|
+
export const inboundSchema = Background$inboundSchema;
|
|
269
|
+
/** @deprecated use `Background$outboundSchema` instead. */
|
|
270
|
+
export const outboundSchema = Background$outboundSchema;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/** @internal */
|
|
274
|
+
export const Moderation$inboundSchema: z.ZodNativeEnum<typeof Moderation> = z
|
|
275
|
+
.nativeEnum(Moderation);
|
|
276
|
+
|
|
277
|
+
/** @internal */
|
|
278
|
+
export const Moderation$outboundSchema: z.ZodNativeEnum<typeof Moderation> =
|
|
279
|
+
Moderation$inboundSchema;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @internal
|
|
283
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
284
|
+
*/
|
|
285
|
+
export namespace Moderation$ {
|
|
286
|
+
/** @deprecated use `Moderation$inboundSchema` instead. */
|
|
287
|
+
export const inboundSchema = Moderation$inboundSchema;
|
|
288
|
+
/** @deprecated use `Moderation$outboundSchema` instead. */
|
|
289
|
+
export const outboundSchema = Moderation$outboundSchema;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/** @internal */
|
|
293
|
+
export const OutputFormat$inboundSchema: z.ZodNativeEnum<typeof OutputFormat> =
|
|
294
|
+
z.nativeEnum(OutputFormat);
|
|
295
|
+
|
|
296
|
+
/** @internal */
|
|
297
|
+
export const OutputFormat$outboundSchema: z.ZodNativeEnum<typeof OutputFormat> =
|
|
298
|
+
OutputFormat$inboundSchema;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* @internal
|
|
302
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
303
|
+
*/
|
|
304
|
+
export namespace OutputFormat$ {
|
|
305
|
+
/** @deprecated use `OutputFormat$inboundSchema` instead. */
|
|
306
|
+
export const inboundSchema = OutputFormat$inboundSchema;
|
|
307
|
+
/** @deprecated use `OutputFormat$outboundSchema` instead. */
|
|
308
|
+
export const outboundSchema = OutputFormat$outboundSchema;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/** @internal */
|
|
312
|
+
export const Quality$inboundSchema: z.ZodNativeEnum<typeof Quality> = z
|
|
313
|
+
.nativeEnum(Quality);
|
|
314
|
+
|
|
315
|
+
/** @internal */
|
|
316
|
+
export const Quality$outboundSchema: z.ZodNativeEnum<typeof Quality> =
|
|
317
|
+
Quality$inboundSchema;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* @internal
|
|
321
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
322
|
+
*/
|
|
323
|
+
export namespace Quality$ {
|
|
324
|
+
/** @deprecated use `Quality$inboundSchema` instead. */
|
|
325
|
+
export const inboundSchema = Quality$inboundSchema;
|
|
326
|
+
/** @deprecated use `Quality$outboundSchema` instead. */
|
|
327
|
+
export const outboundSchema = Quality$outboundSchema;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/** @internal */
|
|
331
|
+
export const PostV2ProxyImagesGenerationsResponseFormat$inboundSchema:
|
|
332
|
+
z.ZodNativeEnum<typeof PostV2ProxyImagesGenerationsResponseFormat> = z
|
|
333
|
+
.nativeEnum(PostV2ProxyImagesGenerationsResponseFormat);
|
|
334
|
+
|
|
335
|
+
/** @internal */
|
|
336
|
+
export const PostV2ProxyImagesGenerationsResponseFormat$outboundSchema:
|
|
337
|
+
z.ZodNativeEnum<typeof PostV2ProxyImagesGenerationsResponseFormat> =
|
|
338
|
+
PostV2ProxyImagesGenerationsResponseFormat$inboundSchema;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* @internal
|
|
342
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
343
|
+
*/
|
|
344
|
+
export namespace PostV2ProxyImagesGenerationsResponseFormat$ {
|
|
345
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsResponseFormat$inboundSchema` instead. */
|
|
346
|
+
export const inboundSchema =
|
|
347
|
+
PostV2ProxyImagesGenerationsResponseFormat$inboundSchema;
|
|
348
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsResponseFormat$outboundSchema` instead. */
|
|
349
|
+
export const outboundSchema =
|
|
350
|
+
PostV2ProxyImagesGenerationsResponseFormat$outboundSchema;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/** @internal */
|
|
354
|
+
export const PostV2ProxyImagesGenerationsRetry$inboundSchema: z.ZodType<
|
|
355
|
+
PostV2ProxyImagesGenerationsRetry,
|
|
356
|
+
z.ZodTypeDef,
|
|
357
|
+
unknown
|
|
358
|
+
> = z.object({
|
|
359
|
+
count: z.number().default(3),
|
|
360
|
+
on_codes: z.array(z.number()).optional(),
|
|
361
|
+
}).transform((v) => {
|
|
362
|
+
return remap$(v, {
|
|
363
|
+
"on_codes": "onCodes",
|
|
364
|
+
});
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
/** @internal */
|
|
368
|
+
export type PostV2ProxyImagesGenerationsRetry$Outbound = {
|
|
369
|
+
count: number;
|
|
370
|
+
on_codes?: Array<number> | undefined;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
/** @internal */
|
|
374
|
+
export const PostV2ProxyImagesGenerationsRetry$outboundSchema: z.ZodType<
|
|
375
|
+
PostV2ProxyImagesGenerationsRetry$Outbound,
|
|
376
|
+
z.ZodTypeDef,
|
|
377
|
+
PostV2ProxyImagesGenerationsRetry
|
|
378
|
+
> = z.object({
|
|
379
|
+
count: z.number().default(3),
|
|
380
|
+
onCodes: z.array(z.number()).optional(),
|
|
381
|
+
}).transform((v) => {
|
|
382
|
+
return remap$(v, {
|
|
383
|
+
onCodes: "on_codes",
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* @internal
|
|
389
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
390
|
+
*/
|
|
391
|
+
export namespace PostV2ProxyImagesGenerationsRetry$ {
|
|
392
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsRetry$inboundSchema` instead. */
|
|
393
|
+
export const inboundSchema = PostV2ProxyImagesGenerationsRetry$inboundSchema;
|
|
394
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsRetry$outboundSchema` instead. */
|
|
395
|
+
export const outboundSchema =
|
|
396
|
+
PostV2ProxyImagesGenerationsRetry$outboundSchema;
|
|
397
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsRetry$Outbound` instead. */
|
|
398
|
+
export type Outbound = PostV2ProxyImagesGenerationsRetry$Outbound;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export function postV2ProxyImagesGenerationsRetryToJSON(
|
|
402
|
+
postV2ProxyImagesGenerationsRetry: PostV2ProxyImagesGenerationsRetry,
|
|
403
|
+
): string {
|
|
404
|
+
return JSON.stringify(
|
|
405
|
+
PostV2ProxyImagesGenerationsRetry$outboundSchema.parse(
|
|
406
|
+
postV2ProxyImagesGenerationsRetry,
|
|
407
|
+
),
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export function postV2ProxyImagesGenerationsRetryFromJSON(
|
|
412
|
+
jsonString: string,
|
|
413
|
+
): SafeParseResult<PostV2ProxyImagesGenerationsRetry, SDKValidationError> {
|
|
414
|
+
return safeParse(
|
|
415
|
+
jsonString,
|
|
416
|
+
(x) => PostV2ProxyImagesGenerationsRetry$inboundSchema.parse(JSON.parse(x)),
|
|
417
|
+
`Failed to parse 'PostV2ProxyImagesGenerationsRetry' from JSON`,
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/** @internal */
|
|
422
|
+
export const PostV2ProxyImagesGenerationsFallbacks$inboundSchema: z.ZodType<
|
|
423
|
+
PostV2ProxyImagesGenerationsFallbacks,
|
|
424
|
+
z.ZodTypeDef,
|
|
425
|
+
unknown
|
|
426
|
+
> = z.object({
|
|
427
|
+
model: z.string(),
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
/** @internal */
|
|
431
|
+
export type PostV2ProxyImagesGenerationsFallbacks$Outbound = {
|
|
432
|
+
model: string;
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
/** @internal */
|
|
436
|
+
export const PostV2ProxyImagesGenerationsFallbacks$outboundSchema: z.ZodType<
|
|
437
|
+
PostV2ProxyImagesGenerationsFallbacks$Outbound,
|
|
438
|
+
z.ZodTypeDef,
|
|
439
|
+
PostV2ProxyImagesGenerationsFallbacks
|
|
440
|
+
> = z.object({
|
|
441
|
+
model: z.string(),
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* @internal
|
|
446
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
447
|
+
*/
|
|
448
|
+
export namespace PostV2ProxyImagesGenerationsFallbacks$ {
|
|
449
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsFallbacks$inboundSchema` instead. */
|
|
450
|
+
export const inboundSchema =
|
|
451
|
+
PostV2ProxyImagesGenerationsFallbacks$inboundSchema;
|
|
452
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsFallbacks$outboundSchema` instead. */
|
|
453
|
+
export const outboundSchema =
|
|
454
|
+
PostV2ProxyImagesGenerationsFallbacks$outboundSchema;
|
|
455
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsFallbacks$Outbound` instead. */
|
|
456
|
+
export type Outbound = PostV2ProxyImagesGenerationsFallbacks$Outbound;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export function postV2ProxyImagesGenerationsFallbacksToJSON(
|
|
460
|
+
postV2ProxyImagesGenerationsFallbacks: PostV2ProxyImagesGenerationsFallbacks,
|
|
461
|
+
): string {
|
|
462
|
+
return JSON.stringify(
|
|
463
|
+
PostV2ProxyImagesGenerationsFallbacks$outboundSchema.parse(
|
|
464
|
+
postV2ProxyImagesGenerationsFallbacks,
|
|
465
|
+
),
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export function postV2ProxyImagesGenerationsFallbacksFromJSON(
|
|
470
|
+
jsonString: string,
|
|
471
|
+
): SafeParseResult<PostV2ProxyImagesGenerationsFallbacks, SDKValidationError> {
|
|
472
|
+
return safeParse(
|
|
473
|
+
jsonString,
|
|
474
|
+
(x) =>
|
|
475
|
+
PostV2ProxyImagesGenerationsFallbacks$inboundSchema.parse(JSON.parse(x)),
|
|
476
|
+
`Failed to parse 'PostV2ProxyImagesGenerationsFallbacks' from JSON`,
|
|
477
|
+
);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/** @internal */
|
|
481
|
+
export const PostV2ProxyImagesGenerationsThread$inboundSchema: z.ZodType<
|
|
482
|
+
PostV2ProxyImagesGenerationsThread,
|
|
483
|
+
z.ZodTypeDef,
|
|
484
|
+
unknown
|
|
485
|
+
> = z.object({
|
|
486
|
+
id: z.string(),
|
|
487
|
+
tags: z.array(z.string()).optional(),
|
|
488
|
+
});
|
|
489
|
+
|
|
490
|
+
/** @internal */
|
|
491
|
+
export type PostV2ProxyImagesGenerationsThread$Outbound = {
|
|
492
|
+
id: string;
|
|
493
|
+
tags?: Array<string> | undefined;
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
/** @internal */
|
|
497
|
+
export const PostV2ProxyImagesGenerationsThread$outboundSchema: z.ZodType<
|
|
498
|
+
PostV2ProxyImagesGenerationsThread$Outbound,
|
|
499
|
+
z.ZodTypeDef,
|
|
500
|
+
PostV2ProxyImagesGenerationsThread
|
|
501
|
+
> = z.object({
|
|
502
|
+
id: z.string(),
|
|
503
|
+
tags: z.array(z.string()).optional(),
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* @internal
|
|
508
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
509
|
+
*/
|
|
510
|
+
export namespace PostV2ProxyImagesGenerationsThread$ {
|
|
511
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsThread$inboundSchema` instead. */
|
|
512
|
+
export const inboundSchema = PostV2ProxyImagesGenerationsThread$inboundSchema;
|
|
513
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsThread$outboundSchema` instead. */
|
|
514
|
+
export const outboundSchema =
|
|
515
|
+
PostV2ProxyImagesGenerationsThread$outboundSchema;
|
|
516
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsThread$Outbound` instead. */
|
|
517
|
+
export type Outbound = PostV2ProxyImagesGenerationsThread$Outbound;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export function postV2ProxyImagesGenerationsThreadToJSON(
|
|
521
|
+
postV2ProxyImagesGenerationsThread: PostV2ProxyImagesGenerationsThread,
|
|
522
|
+
): string {
|
|
523
|
+
return JSON.stringify(
|
|
524
|
+
PostV2ProxyImagesGenerationsThread$outboundSchema.parse(
|
|
525
|
+
postV2ProxyImagesGenerationsThread,
|
|
526
|
+
),
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export function postV2ProxyImagesGenerationsThreadFromJSON(
|
|
531
|
+
jsonString: string,
|
|
532
|
+
): SafeParseResult<PostV2ProxyImagesGenerationsThread, SDKValidationError> {
|
|
533
|
+
return safeParse(
|
|
534
|
+
jsonString,
|
|
535
|
+
(x) =>
|
|
536
|
+
PostV2ProxyImagesGenerationsThread$inboundSchema.parse(JSON.parse(x)),
|
|
537
|
+
`Failed to parse 'PostV2ProxyImagesGenerationsThread' from JSON`,
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/** @internal */
|
|
542
|
+
export const PostV2ProxyImagesGenerationsType$inboundSchema: z.ZodNativeEnum<
|
|
543
|
+
typeof PostV2ProxyImagesGenerationsType
|
|
544
|
+
> = z.nativeEnum(PostV2ProxyImagesGenerationsType);
|
|
545
|
+
|
|
546
|
+
/** @internal */
|
|
547
|
+
export const PostV2ProxyImagesGenerationsType$outboundSchema: z.ZodNativeEnum<
|
|
548
|
+
typeof PostV2ProxyImagesGenerationsType
|
|
549
|
+
> = PostV2ProxyImagesGenerationsType$inboundSchema;
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* @internal
|
|
553
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
554
|
+
*/
|
|
555
|
+
export namespace PostV2ProxyImagesGenerationsType$ {
|
|
556
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsType$inboundSchema` instead. */
|
|
557
|
+
export const inboundSchema = PostV2ProxyImagesGenerationsType$inboundSchema;
|
|
558
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsType$outboundSchema` instead. */
|
|
559
|
+
export const outboundSchema = PostV2ProxyImagesGenerationsType$outboundSchema;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/** @internal */
|
|
563
|
+
export const PostV2ProxyImagesGenerationsCache$inboundSchema: z.ZodType<
|
|
564
|
+
PostV2ProxyImagesGenerationsCache,
|
|
565
|
+
z.ZodTypeDef,
|
|
566
|
+
unknown
|
|
567
|
+
> = z.object({
|
|
568
|
+
ttl: z.number().default(1800),
|
|
569
|
+
type: PostV2ProxyImagesGenerationsType$inboundSchema,
|
|
570
|
+
});
|
|
571
|
+
|
|
572
|
+
/** @internal */
|
|
573
|
+
export type PostV2ProxyImagesGenerationsCache$Outbound = {
|
|
574
|
+
ttl: number;
|
|
575
|
+
type: string;
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
/** @internal */
|
|
579
|
+
export const PostV2ProxyImagesGenerationsCache$outboundSchema: z.ZodType<
|
|
580
|
+
PostV2ProxyImagesGenerationsCache$Outbound,
|
|
581
|
+
z.ZodTypeDef,
|
|
582
|
+
PostV2ProxyImagesGenerationsCache
|
|
583
|
+
> = z.object({
|
|
584
|
+
ttl: z.number().default(1800),
|
|
585
|
+
type: PostV2ProxyImagesGenerationsType$outboundSchema,
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* @internal
|
|
590
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
591
|
+
*/
|
|
592
|
+
export namespace PostV2ProxyImagesGenerationsCache$ {
|
|
593
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsCache$inboundSchema` instead. */
|
|
594
|
+
export const inboundSchema = PostV2ProxyImagesGenerationsCache$inboundSchema;
|
|
595
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsCache$outboundSchema` instead. */
|
|
596
|
+
export const outboundSchema =
|
|
597
|
+
PostV2ProxyImagesGenerationsCache$outboundSchema;
|
|
598
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsCache$Outbound` instead. */
|
|
599
|
+
export type Outbound = PostV2ProxyImagesGenerationsCache$Outbound;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
export function postV2ProxyImagesGenerationsCacheToJSON(
|
|
603
|
+
postV2ProxyImagesGenerationsCache: PostV2ProxyImagesGenerationsCache,
|
|
604
|
+
): string {
|
|
605
|
+
return JSON.stringify(
|
|
606
|
+
PostV2ProxyImagesGenerationsCache$outboundSchema.parse(
|
|
607
|
+
postV2ProxyImagesGenerationsCache,
|
|
608
|
+
),
|
|
609
|
+
);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
export function postV2ProxyImagesGenerationsCacheFromJSON(
|
|
613
|
+
jsonString: string,
|
|
614
|
+
): SafeParseResult<PostV2ProxyImagesGenerationsCache, SDKValidationError> {
|
|
615
|
+
return safeParse(
|
|
616
|
+
jsonString,
|
|
617
|
+
(x) => PostV2ProxyImagesGenerationsCache$inboundSchema.parse(JSON.parse(x)),
|
|
618
|
+
`Failed to parse 'PostV2ProxyImagesGenerationsCache' from JSON`,
|
|
619
|
+
);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/** @internal */
|
|
623
|
+
export const PostV2ProxyImagesGenerationsOrq$inboundSchema: z.ZodType<
|
|
624
|
+
PostV2ProxyImagesGenerationsOrq,
|
|
625
|
+
z.ZodTypeDef,
|
|
626
|
+
unknown
|
|
627
|
+
> = z.object({
|
|
628
|
+
name: z.string().optional(),
|
|
629
|
+
retry: z.lazy(() => PostV2ProxyImagesGenerationsRetry$inboundSchema)
|
|
630
|
+
.optional(),
|
|
631
|
+
fallbacks: z.array(
|
|
632
|
+
z.lazy(() => PostV2ProxyImagesGenerationsFallbacks$inboundSchema),
|
|
633
|
+
).optional(),
|
|
634
|
+
contact: components.PublicContact$inboundSchema.optional(),
|
|
635
|
+
thread: z.lazy(() => PostV2ProxyImagesGenerationsThread$inboundSchema)
|
|
636
|
+
.optional(),
|
|
637
|
+
cache: z.lazy(() => PostV2ProxyImagesGenerationsCache$inboundSchema)
|
|
638
|
+
.optional(),
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
/** @internal */
|
|
642
|
+
export type PostV2ProxyImagesGenerationsOrq$Outbound = {
|
|
643
|
+
name?: string | undefined;
|
|
644
|
+
retry?: PostV2ProxyImagesGenerationsRetry$Outbound | undefined;
|
|
645
|
+
fallbacks?: Array<PostV2ProxyImagesGenerationsFallbacks$Outbound> | undefined;
|
|
646
|
+
contact?: components.PublicContact$Outbound | undefined;
|
|
647
|
+
thread?: PostV2ProxyImagesGenerationsThread$Outbound | undefined;
|
|
648
|
+
cache?: PostV2ProxyImagesGenerationsCache$Outbound | undefined;
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
/** @internal */
|
|
652
|
+
export const PostV2ProxyImagesGenerationsOrq$outboundSchema: z.ZodType<
|
|
653
|
+
PostV2ProxyImagesGenerationsOrq$Outbound,
|
|
654
|
+
z.ZodTypeDef,
|
|
655
|
+
PostV2ProxyImagesGenerationsOrq
|
|
656
|
+
> = z.object({
|
|
657
|
+
name: z.string().optional(),
|
|
658
|
+
retry: z.lazy(() => PostV2ProxyImagesGenerationsRetry$outboundSchema)
|
|
659
|
+
.optional(),
|
|
660
|
+
fallbacks: z.array(
|
|
661
|
+
z.lazy(() => PostV2ProxyImagesGenerationsFallbacks$outboundSchema),
|
|
662
|
+
).optional(),
|
|
663
|
+
contact: components.PublicContact$outboundSchema.optional(),
|
|
664
|
+
thread: z.lazy(() => PostV2ProxyImagesGenerationsThread$outboundSchema)
|
|
665
|
+
.optional(),
|
|
666
|
+
cache: z.lazy(() => PostV2ProxyImagesGenerationsCache$outboundSchema)
|
|
667
|
+
.optional(),
|
|
668
|
+
});
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* @internal
|
|
672
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
673
|
+
*/
|
|
674
|
+
export namespace PostV2ProxyImagesGenerationsOrq$ {
|
|
675
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsOrq$inboundSchema` instead. */
|
|
676
|
+
export const inboundSchema = PostV2ProxyImagesGenerationsOrq$inboundSchema;
|
|
677
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsOrq$outboundSchema` instead. */
|
|
678
|
+
export const outboundSchema = PostV2ProxyImagesGenerationsOrq$outboundSchema;
|
|
679
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsOrq$Outbound` instead. */
|
|
680
|
+
export type Outbound = PostV2ProxyImagesGenerationsOrq$Outbound;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
export function postV2ProxyImagesGenerationsOrqToJSON(
|
|
684
|
+
postV2ProxyImagesGenerationsOrq: PostV2ProxyImagesGenerationsOrq,
|
|
685
|
+
): string {
|
|
686
|
+
return JSON.stringify(
|
|
687
|
+
PostV2ProxyImagesGenerationsOrq$outboundSchema.parse(
|
|
688
|
+
postV2ProxyImagesGenerationsOrq,
|
|
689
|
+
),
|
|
690
|
+
);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export function postV2ProxyImagesGenerationsOrqFromJSON(
|
|
694
|
+
jsonString: string,
|
|
695
|
+
): SafeParseResult<PostV2ProxyImagesGenerationsOrq, SDKValidationError> {
|
|
696
|
+
return safeParse(
|
|
697
|
+
jsonString,
|
|
698
|
+
(x) => PostV2ProxyImagesGenerationsOrq$inboundSchema.parse(JSON.parse(x)),
|
|
699
|
+
`Failed to parse 'PostV2ProxyImagesGenerationsOrq' from JSON`,
|
|
700
|
+
);
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/** @internal */
|
|
704
|
+
export const PostV2ProxyImagesGenerationsRequestBody$inboundSchema: z.ZodType<
|
|
705
|
+
PostV2ProxyImagesGenerationsRequestBody,
|
|
706
|
+
z.ZodTypeDef,
|
|
707
|
+
unknown
|
|
708
|
+
> = z.object({
|
|
709
|
+
prompt: z.string(),
|
|
710
|
+
background: z.nullable(Background$inboundSchema.default("auto")),
|
|
711
|
+
model: z.string(),
|
|
712
|
+
moderation: z.nullable(Moderation$inboundSchema.default("auto")),
|
|
713
|
+
n: z.nullable(z.number().int().default(1)),
|
|
714
|
+
output_compression: z.nullable(z.number().int().default(100)),
|
|
715
|
+
output_format: z.nullable(OutputFormat$inboundSchema.default("png")),
|
|
716
|
+
quality: z.nullable(Quality$inboundSchema.default("auto")),
|
|
717
|
+
response_format: z.nullable(
|
|
718
|
+
PostV2ProxyImagesGenerationsResponseFormat$inboundSchema.default("url"),
|
|
719
|
+
),
|
|
720
|
+
size: z.nullable(z.string()).optional(),
|
|
721
|
+
style: z.nullable(z.string()).optional(),
|
|
722
|
+
orq: z.lazy(() => PostV2ProxyImagesGenerationsOrq$inboundSchema).optional(),
|
|
723
|
+
}).transform((v) => {
|
|
724
|
+
return remap$(v, {
|
|
725
|
+
"output_compression": "outputCompression",
|
|
726
|
+
"output_format": "outputFormat",
|
|
727
|
+
"response_format": "responseFormat",
|
|
728
|
+
});
|
|
729
|
+
});
|
|
730
|
+
|
|
731
|
+
/** @internal */
|
|
732
|
+
export type PostV2ProxyImagesGenerationsRequestBody$Outbound = {
|
|
733
|
+
prompt: string;
|
|
734
|
+
background: string | null;
|
|
735
|
+
model: string;
|
|
736
|
+
moderation: string | null;
|
|
737
|
+
n: number | null;
|
|
738
|
+
output_compression: number | null;
|
|
739
|
+
output_format: string | null;
|
|
740
|
+
quality: string | null;
|
|
741
|
+
response_format: string | null;
|
|
742
|
+
size?: string | null | undefined;
|
|
743
|
+
style?: string | null | undefined;
|
|
744
|
+
orq?: PostV2ProxyImagesGenerationsOrq$Outbound | undefined;
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
/** @internal */
|
|
748
|
+
export const PostV2ProxyImagesGenerationsRequestBody$outboundSchema: z.ZodType<
|
|
749
|
+
PostV2ProxyImagesGenerationsRequestBody$Outbound,
|
|
750
|
+
z.ZodTypeDef,
|
|
751
|
+
PostV2ProxyImagesGenerationsRequestBody
|
|
752
|
+
> = z.object({
|
|
753
|
+
prompt: z.string(),
|
|
754
|
+
background: z.nullable(Background$outboundSchema.default("auto")),
|
|
755
|
+
model: z.string(),
|
|
756
|
+
moderation: z.nullable(Moderation$outboundSchema.default("auto")),
|
|
757
|
+
n: z.nullable(z.number().int().default(1)),
|
|
758
|
+
outputCompression: z.nullable(z.number().int().default(100)),
|
|
759
|
+
outputFormat: z.nullable(OutputFormat$outboundSchema.default("png")),
|
|
760
|
+
quality: z.nullable(Quality$outboundSchema.default("auto")),
|
|
761
|
+
responseFormat: z.nullable(
|
|
762
|
+
PostV2ProxyImagesGenerationsResponseFormat$outboundSchema.default("url"),
|
|
763
|
+
),
|
|
764
|
+
size: z.nullable(z.string()).optional(),
|
|
765
|
+
style: z.nullable(z.string()).optional(),
|
|
766
|
+
orq: z.lazy(() => PostV2ProxyImagesGenerationsOrq$outboundSchema).optional(),
|
|
767
|
+
}).transform((v) => {
|
|
768
|
+
return remap$(v, {
|
|
769
|
+
outputCompression: "output_compression",
|
|
770
|
+
outputFormat: "output_format",
|
|
771
|
+
responseFormat: "response_format",
|
|
772
|
+
});
|
|
773
|
+
});
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* @internal
|
|
777
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
778
|
+
*/
|
|
779
|
+
export namespace PostV2ProxyImagesGenerationsRequestBody$ {
|
|
780
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsRequestBody$inboundSchema` instead. */
|
|
781
|
+
export const inboundSchema =
|
|
782
|
+
PostV2ProxyImagesGenerationsRequestBody$inboundSchema;
|
|
783
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsRequestBody$outboundSchema` instead. */
|
|
784
|
+
export const outboundSchema =
|
|
785
|
+
PostV2ProxyImagesGenerationsRequestBody$outboundSchema;
|
|
786
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsRequestBody$Outbound` instead. */
|
|
787
|
+
export type Outbound = PostV2ProxyImagesGenerationsRequestBody$Outbound;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
export function postV2ProxyImagesGenerationsRequestBodyToJSON(
|
|
791
|
+
postV2ProxyImagesGenerationsRequestBody:
|
|
792
|
+
PostV2ProxyImagesGenerationsRequestBody,
|
|
793
|
+
): string {
|
|
794
|
+
return JSON.stringify(
|
|
795
|
+
PostV2ProxyImagesGenerationsRequestBody$outboundSchema.parse(
|
|
796
|
+
postV2ProxyImagesGenerationsRequestBody,
|
|
797
|
+
),
|
|
798
|
+
);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
export function postV2ProxyImagesGenerationsRequestBodyFromJSON(
|
|
802
|
+
jsonString: string,
|
|
803
|
+
): SafeParseResult<
|
|
804
|
+
PostV2ProxyImagesGenerationsRequestBody,
|
|
805
|
+
SDKValidationError
|
|
806
|
+
> {
|
|
807
|
+
return safeParse(
|
|
808
|
+
jsonString,
|
|
809
|
+
(x) =>
|
|
810
|
+
PostV2ProxyImagesGenerationsRequestBody$inboundSchema.parse(
|
|
811
|
+
JSON.parse(x),
|
|
812
|
+
),
|
|
813
|
+
`Failed to parse 'PostV2ProxyImagesGenerationsRequestBody' from JSON`,
|
|
814
|
+
);
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/** @internal */
|
|
818
|
+
export const PostV2ProxyImagesGenerationsData$inboundSchema: z.ZodType<
|
|
819
|
+
PostV2ProxyImagesGenerationsData,
|
|
820
|
+
z.ZodTypeDef,
|
|
821
|
+
unknown
|
|
822
|
+
> = z.object({
|
|
823
|
+
revised_prompt: z.nullable(z.string()).optional(),
|
|
824
|
+
b64_json: z.string().optional(),
|
|
825
|
+
url: z.string().optional(),
|
|
826
|
+
}).transform((v) => {
|
|
827
|
+
return remap$(v, {
|
|
828
|
+
"revised_prompt": "revisedPrompt",
|
|
829
|
+
"b64_json": "b64Json",
|
|
830
|
+
});
|
|
831
|
+
});
|
|
832
|
+
|
|
833
|
+
/** @internal */
|
|
834
|
+
export type PostV2ProxyImagesGenerationsData$Outbound = {
|
|
835
|
+
revised_prompt?: string | null | undefined;
|
|
836
|
+
b64_json?: string | undefined;
|
|
837
|
+
url?: string | undefined;
|
|
838
|
+
};
|
|
839
|
+
|
|
840
|
+
/** @internal */
|
|
841
|
+
export const PostV2ProxyImagesGenerationsData$outboundSchema: z.ZodType<
|
|
842
|
+
PostV2ProxyImagesGenerationsData$Outbound,
|
|
843
|
+
z.ZodTypeDef,
|
|
844
|
+
PostV2ProxyImagesGenerationsData
|
|
845
|
+
> = z.object({
|
|
846
|
+
revisedPrompt: z.nullable(z.string()).optional(),
|
|
847
|
+
b64Json: z.string().optional(),
|
|
848
|
+
url: z.string().optional(),
|
|
849
|
+
}).transform((v) => {
|
|
850
|
+
return remap$(v, {
|
|
851
|
+
revisedPrompt: "revised_prompt",
|
|
852
|
+
b64Json: "b64_json",
|
|
853
|
+
});
|
|
854
|
+
});
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* @internal
|
|
858
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
859
|
+
*/
|
|
860
|
+
export namespace PostV2ProxyImagesGenerationsData$ {
|
|
861
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsData$inboundSchema` instead. */
|
|
862
|
+
export const inboundSchema = PostV2ProxyImagesGenerationsData$inboundSchema;
|
|
863
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsData$outboundSchema` instead. */
|
|
864
|
+
export const outboundSchema = PostV2ProxyImagesGenerationsData$outboundSchema;
|
|
865
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsData$Outbound` instead. */
|
|
866
|
+
export type Outbound = PostV2ProxyImagesGenerationsData$Outbound;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export function postV2ProxyImagesGenerationsDataToJSON(
|
|
870
|
+
postV2ProxyImagesGenerationsData: PostV2ProxyImagesGenerationsData,
|
|
871
|
+
): string {
|
|
872
|
+
return JSON.stringify(
|
|
873
|
+
PostV2ProxyImagesGenerationsData$outboundSchema.parse(
|
|
874
|
+
postV2ProxyImagesGenerationsData,
|
|
875
|
+
),
|
|
876
|
+
);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
export function postV2ProxyImagesGenerationsDataFromJSON(
|
|
880
|
+
jsonString: string,
|
|
881
|
+
): SafeParseResult<PostV2ProxyImagesGenerationsData, SDKValidationError> {
|
|
882
|
+
return safeParse(
|
|
883
|
+
jsonString,
|
|
884
|
+
(x) => PostV2ProxyImagesGenerationsData$inboundSchema.parse(JSON.parse(x)),
|
|
885
|
+
`Failed to parse 'PostV2ProxyImagesGenerationsData' from JSON`,
|
|
886
|
+
);
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
/** @internal */
|
|
890
|
+
export const InputTokensDetails$inboundSchema: z.ZodType<
|
|
891
|
+
InputTokensDetails,
|
|
892
|
+
z.ZodTypeDef,
|
|
893
|
+
unknown
|
|
894
|
+
> = z.object({
|
|
895
|
+
image_tokens: z.number().optional(),
|
|
896
|
+
text_tokens: z.number().optional(),
|
|
897
|
+
}).transform((v) => {
|
|
898
|
+
return remap$(v, {
|
|
899
|
+
"image_tokens": "imageTokens",
|
|
900
|
+
"text_tokens": "textTokens",
|
|
901
|
+
});
|
|
902
|
+
});
|
|
903
|
+
|
|
904
|
+
/** @internal */
|
|
905
|
+
export type InputTokensDetails$Outbound = {
|
|
906
|
+
image_tokens?: number | undefined;
|
|
907
|
+
text_tokens?: number | undefined;
|
|
908
|
+
};
|
|
909
|
+
|
|
910
|
+
/** @internal */
|
|
911
|
+
export const InputTokensDetails$outboundSchema: z.ZodType<
|
|
912
|
+
InputTokensDetails$Outbound,
|
|
913
|
+
z.ZodTypeDef,
|
|
914
|
+
InputTokensDetails
|
|
915
|
+
> = z.object({
|
|
916
|
+
imageTokens: z.number().optional(),
|
|
917
|
+
textTokens: z.number().optional(),
|
|
918
|
+
}).transform((v) => {
|
|
919
|
+
return remap$(v, {
|
|
920
|
+
imageTokens: "image_tokens",
|
|
921
|
+
textTokens: "text_tokens",
|
|
922
|
+
});
|
|
923
|
+
});
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* @internal
|
|
927
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
928
|
+
*/
|
|
929
|
+
export namespace InputTokensDetails$ {
|
|
930
|
+
/** @deprecated use `InputTokensDetails$inboundSchema` instead. */
|
|
931
|
+
export const inboundSchema = InputTokensDetails$inboundSchema;
|
|
932
|
+
/** @deprecated use `InputTokensDetails$outboundSchema` instead. */
|
|
933
|
+
export const outboundSchema = InputTokensDetails$outboundSchema;
|
|
934
|
+
/** @deprecated use `InputTokensDetails$Outbound` instead. */
|
|
935
|
+
export type Outbound = InputTokensDetails$Outbound;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
export function inputTokensDetailsToJSON(
|
|
939
|
+
inputTokensDetails: InputTokensDetails,
|
|
940
|
+
): string {
|
|
941
|
+
return JSON.stringify(
|
|
942
|
+
InputTokensDetails$outboundSchema.parse(inputTokensDetails),
|
|
943
|
+
);
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
export function inputTokensDetailsFromJSON(
|
|
947
|
+
jsonString: string,
|
|
948
|
+
): SafeParseResult<InputTokensDetails, SDKValidationError> {
|
|
949
|
+
return safeParse(
|
|
950
|
+
jsonString,
|
|
951
|
+
(x) => InputTokensDetails$inboundSchema.parse(JSON.parse(x)),
|
|
952
|
+
`Failed to parse 'InputTokensDetails' from JSON`,
|
|
953
|
+
);
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
/** @internal */
|
|
957
|
+
export const PostV2ProxyImagesGenerationsUsage$inboundSchema: z.ZodType<
|
|
958
|
+
PostV2ProxyImagesGenerationsUsage,
|
|
959
|
+
z.ZodTypeDef,
|
|
960
|
+
unknown
|
|
961
|
+
> = z.object({
|
|
962
|
+
input_tokens: z.number().optional(),
|
|
963
|
+
input_tokens_details: z.lazy(() => InputTokensDetails$inboundSchema),
|
|
964
|
+
output_tokens: z.number().optional(),
|
|
965
|
+
total_tokens: z.number().optional(),
|
|
966
|
+
}).transform((v) => {
|
|
967
|
+
return remap$(v, {
|
|
968
|
+
"input_tokens": "inputTokens",
|
|
969
|
+
"input_tokens_details": "inputTokensDetails",
|
|
970
|
+
"output_tokens": "outputTokens",
|
|
971
|
+
"total_tokens": "totalTokens",
|
|
972
|
+
});
|
|
973
|
+
});
|
|
974
|
+
|
|
975
|
+
/** @internal */
|
|
976
|
+
export type PostV2ProxyImagesGenerationsUsage$Outbound = {
|
|
977
|
+
input_tokens?: number | undefined;
|
|
978
|
+
input_tokens_details: InputTokensDetails$Outbound;
|
|
979
|
+
output_tokens?: number | undefined;
|
|
980
|
+
total_tokens?: number | undefined;
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
/** @internal */
|
|
984
|
+
export const PostV2ProxyImagesGenerationsUsage$outboundSchema: z.ZodType<
|
|
985
|
+
PostV2ProxyImagesGenerationsUsage$Outbound,
|
|
986
|
+
z.ZodTypeDef,
|
|
987
|
+
PostV2ProxyImagesGenerationsUsage
|
|
988
|
+
> = z.object({
|
|
989
|
+
inputTokens: z.number().optional(),
|
|
990
|
+
inputTokensDetails: z.lazy(() => InputTokensDetails$outboundSchema),
|
|
991
|
+
outputTokens: z.number().optional(),
|
|
992
|
+
totalTokens: z.number().optional(),
|
|
993
|
+
}).transform((v) => {
|
|
994
|
+
return remap$(v, {
|
|
995
|
+
inputTokens: "input_tokens",
|
|
996
|
+
inputTokensDetails: "input_tokens_details",
|
|
997
|
+
outputTokens: "output_tokens",
|
|
998
|
+
totalTokens: "total_tokens",
|
|
999
|
+
});
|
|
1000
|
+
});
|
|
1001
|
+
|
|
1002
|
+
/**
|
|
1003
|
+
* @internal
|
|
1004
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1005
|
+
*/
|
|
1006
|
+
export namespace PostV2ProxyImagesGenerationsUsage$ {
|
|
1007
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsUsage$inboundSchema` instead. */
|
|
1008
|
+
export const inboundSchema = PostV2ProxyImagesGenerationsUsage$inboundSchema;
|
|
1009
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsUsage$outboundSchema` instead. */
|
|
1010
|
+
export const outboundSchema =
|
|
1011
|
+
PostV2ProxyImagesGenerationsUsage$outboundSchema;
|
|
1012
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsUsage$Outbound` instead. */
|
|
1013
|
+
export type Outbound = PostV2ProxyImagesGenerationsUsage$Outbound;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
export function postV2ProxyImagesGenerationsUsageToJSON(
|
|
1017
|
+
postV2ProxyImagesGenerationsUsage: PostV2ProxyImagesGenerationsUsage,
|
|
1018
|
+
): string {
|
|
1019
|
+
return JSON.stringify(
|
|
1020
|
+
PostV2ProxyImagesGenerationsUsage$outboundSchema.parse(
|
|
1021
|
+
postV2ProxyImagesGenerationsUsage,
|
|
1022
|
+
),
|
|
1023
|
+
);
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
export function postV2ProxyImagesGenerationsUsageFromJSON(
|
|
1027
|
+
jsonString: string,
|
|
1028
|
+
): SafeParseResult<PostV2ProxyImagesGenerationsUsage, SDKValidationError> {
|
|
1029
|
+
return safeParse(
|
|
1030
|
+
jsonString,
|
|
1031
|
+
(x) => PostV2ProxyImagesGenerationsUsage$inboundSchema.parse(JSON.parse(x)),
|
|
1032
|
+
`Failed to parse 'PostV2ProxyImagesGenerationsUsage' from JSON`,
|
|
1033
|
+
);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
/** @internal */
|
|
1037
|
+
export const PostV2ProxyImagesGenerationsResponseBody$inboundSchema: z.ZodType<
|
|
1038
|
+
PostV2ProxyImagesGenerationsResponseBody,
|
|
1039
|
+
z.ZodTypeDef,
|
|
1040
|
+
unknown
|
|
1041
|
+
> = z.object({
|
|
1042
|
+
created: z.number().optional(),
|
|
1043
|
+
data: z.array(z.lazy(() => PostV2ProxyImagesGenerationsData$inboundSchema)),
|
|
1044
|
+
usage: z.lazy(() => PostV2ProxyImagesGenerationsUsage$inboundSchema)
|
|
1045
|
+
.optional(),
|
|
1046
|
+
});
|
|
1047
|
+
|
|
1048
|
+
/** @internal */
|
|
1049
|
+
export type PostV2ProxyImagesGenerationsResponseBody$Outbound = {
|
|
1050
|
+
created?: number | undefined;
|
|
1051
|
+
data: Array<PostV2ProxyImagesGenerationsData$Outbound>;
|
|
1052
|
+
usage?: PostV2ProxyImagesGenerationsUsage$Outbound | undefined;
|
|
1053
|
+
};
|
|
1054
|
+
|
|
1055
|
+
/** @internal */
|
|
1056
|
+
export const PostV2ProxyImagesGenerationsResponseBody$outboundSchema: z.ZodType<
|
|
1057
|
+
PostV2ProxyImagesGenerationsResponseBody$Outbound,
|
|
1058
|
+
z.ZodTypeDef,
|
|
1059
|
+
PostV2ProxyImagesGenerationsResponseBody
|
|
1060
|
+
> = z.object({
|
|
1061
|
+
created: z.number().optional(),
|
|
1062
|
+
data: z.array(z.lazy(() => PostV2ProxyImagesGenerationsData$outboundSchema)),
|
|
1063
|
+
usage: z.lazy(() => PostV2ProxyImagesGenerationsUsage$outboundSchema)
|
|
1064
|
+
.optional(),
|
|
1065
|
+
});
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* @internal
|
|
1069
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1070
|
+
*/
|
|
1071
|
+
export namespace PostV2ProxyImagesGenerationsResponseBody$ {
|
|
1072
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsResponseBody$inboundSchema` instead. */
|
|
1073
|
+
export const inboundSchema =
|
|
1074
|
+
PostV2ProxyImagesGenerationsResponseBody$inboundSchema;
|
|
1075
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsResponseBody$outboundSchema` instead. */
|
|
1076
|
+
export const outboundSchema =
|
|
1077
|
+
PostV2ProxyImagesGenerationsResponseBody$outboundSchema;
|
|
1078
|
+
/** @deprecated use `PostV2ProxyImagesGenerationsResponseBody$Outbound` instead. */
|
|
1079
|
+
export type Outbound = PostV2ProxyImagesGenerationsResponseBody$Outbound;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
export function postV2ProxyImagesGenerationsResponseBodyToJSON(
|
|
1083
|
+
postV2ProxyImagesGenerationsResponseBody:
|
|
1084
|
+
PostV2ProxyImagesGenerationsResponseBody,
|
|
1085
|
+
): string {
|
|
1086
|
+
return JSON.stringify(
|
|
1087
|
+
PostV2ProxyImagesGenerationsResponseBody$outboundSchema.parse(
|
|
1088
|
+
postV2ProxyImagesGenerationsResponseBody,
|
|
1089
|
+
),
|
|
1090
|
+
);
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
export function postV2ProxyImagesGenerationsResponseBodyFromJSON(
|
|
1094
|
+
jsonString: string,
|
|
1095
|
+
): SafeParseResult<
|
|
1096
|
+
PostV2ProxyImagesGenerationsResponseBody,
|
|
1097
|
+
SDKValidationError
|
|
1098
|
+
> {
|
|
1099
|
+
return safeParse(
|
|
1100
|
+
jsonString,
|
|
1101
|
+
(x) =>
|
|
1102
|
+
PostV2ProxyImagesGenerationsResponseBody$inboundSchema.parse(
|
|
1103
|
+
JSON.parse(x),
|
|
1104
|
+
),
|
|
1105
|
+
`Failed to parse 'PostV2ProxyImagesGenerationsResponseBody' from JSON`,
|
|
1106
|
+
);
|
|
1107
|
+
}
|