@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,802 @@
|
|
|
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 { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models.
|
|
13
|
+
*/
|
|
14
|
+
export type Input = string | Array<string>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Classifies if text violates content policy
|
|
18
|
+
*/
|
|
19
|
+
export type PostV2ProxyModerationsRequestBody = {
|
|
20
|
+
/**
|
|
21
|
+
* Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models.
|
|
22
|
+
*/
|
|
23
|
+
input: string | Array<string>;
|
|
24
|
+
/**
|
|
25
|
+
* The content moderation model you would like to use. Defaults to omni-moderation-latest
|
|
26
|
+
*/
|
|
27
|
+
model?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A list of the categories, and whether they are flagged or not
|
|
32
|
+
*/
|
|
33
|
+
export type Categories = {
|
|
34
|
+
/**
|
|
35
|
+
* Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.
|
|
36
|
+
*/
|
|
37
|
+
hate: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Hateful content that also includes violence or serious harm towards the targeted group.
|
|
40
|
+
*/
|
|
41
|
+
hateThreatening: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Content that expresses, incites, or promotes harassing language towards any target.
|
|
44
|
+
*/
|
|
45
|
+
harassment: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Harassment content that also includes violence or serious harm towards any target.
|
|
48
|
+
*/
|
|
49
|
+
harassmentThreatening: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Content that includes instructions or advice that facilitate the planning or execution of wrongdoing.
|
|
52
|
+
*/
|
|
53
|
+
illicit: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Content that includes instructions or advice that facilitate the planning or execution of wrongdoing that also includes violence.
|
|
56
|
+
*/
|
|
57
|
+
illicitViolent: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.
|
|
60
|
+
*/
|
|
61
|
+
selfHarm: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm.
|
|
64
|
+
*/
|
|
65
|
+
selfHarmIntent: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Content that encourages performing acts of self-harm, or that gives instructions or advice on how to commit such acts.
|
|
68
|
+
*/
|
|
69
|
+
selfHarmInstructions: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services.
|
|
72
|
+
*/
|
|
73
|
+
sexual: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Sexual content that includes an individual who is under 18 years old.
|
|
76
|
+
*/
|
|
77
|
+
sexualMinors: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Content that depicts death, violence, or physical injury.
|
|
80
|
+
*/
|
|
81
|
+
violence: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Content that depicts death, violence, or physical injury in graphic detail.
|
|
84
|
+
*/
|
|
85
|
+
violenceGraphic: boolean;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* A list of the categories along with their scores as predicted by model
|
|
90
|
+
*/
|
|
91
|
+
export type CategoryScores = {
|
|
92
|
+
/**
|
|
93
|
+
* The score for the category hate
|
|
94
|
+
*/
|
|
95
|
+
hate: number;
|
|
96
|
+
/**
|
|
97
|
+
* The score for the category hate/threatening
|
|
98
|
+
*/
|
|
99
|
+
hateThreatening: number;
|
|
100
|
+
/**
|
|
101
|
+
* The score for the category harassment
|
|
102
|
+
*/
|
|
103
|
+
harassment: number;
|
|
104
|
+
/**
|
|
105
|
+
* The score for the category harassment/threatening
|
|
106
|
+
*/
|
|
107
|
+
harassmentThreatening: number;
|
|
108
|
+
/**
|
|
109
|
+
* The score for the category illicit
|
|
110
|
+
*/
|
|
111
|
+
illicit: number;
|
|
112
|
+
/**
|
|
113
|
+
* The score for the category illicit/violent
|
|
114
|
+
*/
|
|
115
|
+
illicitViolent: number;
|
|
116
|
+
/**
|
|
117
|
+
* The score for the category self-harm
|
|
118
|
+
*/
|
|
119
|
+
selfHarm: number;
|
|
120
|
+
/**
|
|
121
|
+
* The score for the category self-harm/intent
|
|
122
|
+
*/
|
|
123
|
+
selfHarmIntent: number;
|
|
124
|
+
/**
|
|
125
|
+
* The score for the category self-harm/instructions
|
|
126
|
+
*/
|
|
127
|
+
selfHarmInstructions: number;
|
|
128
|
+
/**
|
|
129
|
+
* The score for the category sexual
|
|
130
|
+
*/
|
|
131
|
+
sexual: number;
|
|
132
|
+
/**
|
|
133
|
+
* The score for the category sexual/minors
|
|
134
|
+
*/
|
|
135
|
+
sexualMinors: number;
|
|
136
|
+
/**
|
|
137
|
+
* The score for the category violence
|
|
138
|
+
*/
|
|
139
|
+
violence: number;
|
|
140
|
+
/**
|
|
141
|
+
* The score for the category violence/graphic
|
|
142
|
+
*/
|
|
143
|
+
violenceGraphic: number;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* A list of the categories along with the input type(s) that the score applies to
|
|
148
|
+
*/
|
|
149
|
+
export type CategoryAppliedInputTypes = {
|
|
150
|
+
/**
|
|
151
|
+
* The applied input type(s) for the category hate
|
|
152
|
+
*/
|
|
153
|
+
hate: Array<string>;
|
|
154
|
+
/**
|
|
155
|
+
* The applied input type(s) for the category hate/threatening
|
|
156
|
+
*/
|
|
157
|
+
hateThreatening: Array<string>;
|
|
158
|
+
/**
|
|
159
|
+
* The applied input type(s) for the category harassment
|
|
160
|
+
*/
|
|
161
|
+
harassment: Array<string>;
|
|
162
|
+
/**
|
|
163
|
+
* The applied input type(s) for the category harassment/threatening
|
|
164
|
+
*/
|
|
165
|
+
harassmentThreatening: Array<string>;
|
|
166
|
+
/**
|
|
167
|
+
* The applied input type(s) for the category illicit
|
|
168
|
+
*/
|
|
169
|
+
illicit: Array<string>;
|
|
170
|
+
/**
|
|
171
|
+
* The applied input type(s) for the category illicit/violent
|
|
172
|
+
*/
|
|
173
|
+
illicitViolent: Array<string>;
|
|
174
|
+
/**
|
|
175
|
+
* The applied input type(s) for the category self-harm
|
|
176
|
+
*/
|
|
177
|
+
selfHarm: Array<string>;
|
|
178
|
+
/**
|
|
179
|
+
* The applied input type(s) for the category self-harm/intent
|
|
180
|
+
*/
|
|
181
|
+
selfHarmIntent: Array<string>;
|
|
182
|
+
/**
|
|
183
|
+
* The applied input type(s) for the category self-harm/instructions
|
|
184
|
+
*/
|
|
185
|
+
selfHarmInstructions: Array<string>;
|
|
186
|
+
/**
|
|
187
|
+
* The applied input type(s) for the category sexual
|
|
188
|
+
*/
|
|
189
|
+
sexual: Array<string>;
|
|
190
|
+
/**
|
|
191
|
+
* The applied input type(s) for the category sexual/minors
|
|
192
|
+
*/
|
|
193
|
+
sexualMinors: Array<string>;
|
|
194
|
+
/**
|
|
195
|
+
* The applied input type(s) for the category violence
|
|
196
|
+
*/
|
|
197
|
+
violence: Array<string>;
|
|
198
|
+
/**
|
|
199
|
+
* The applied input type(s) for the category violence/graphic
|
|
200
|
+
*/
|
|
201
|
+
violenceGraphic: Array<string>;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export type Results = {
|
|
205
|
+
/**
|
|
206
|
+
* Whether any of the categories are flagged
|
|
207
|
+
*/
|
|
208
|
+
flagged: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* A list of the categories, and whether they are flagged or not
|
|
211
|
+
*/
|
|
212
|
+
categories: Categories;
|
|
213
|
+
/**
|
|
214
|
+
* A list of the categories along with their scores as predicted by model
|
|
215
|
+
*/
|
|
216
|
+
categoryScores: CategoryScores;
|
|
217
|
+
/**
|
|
218
|
+
* A list of the categories along with the input type(s) that the score applies to
|
|
219
|
+
*/
|
|
220
|
+
categoryAppliedInputTypes?: CategoryAppliedInputTypes | undefined;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Returns moderation classification results
|
|
225
|
+
*/
|
|
226
|
+
export type PostV2ProxyModerationsResponseBody = {
|
|
227
|
+
/**
|
|
228
|
+
* The unique identifier for the moderation request
|
|
229
|
+
*/
|
|
230
|
+
id: string;
|
|
231
|
+
/**
|
|
232
|
+
* The model used to generate the moderation results
|
|
233
|
+
*/
|
|
234
|
+
model: string;
|
|
235
|
+
/**
|
|
236
|
+
* A list of moderation objects
|
|
237
|
+
*/
|
|
238
|
+
results: Array<Results>;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
/** @internal */
|
|
242
|
+
export const Input$inboundSchema: z.ZodType<Input, z.ZodTypeDef, unknown> = z
|
|
243
|
+
.union([z.string(), z.array(z.string())]);
|
|
244
|
+
|
|
245
|
+
/** @internal */
|
|
246
|
+
export type Input$Outbound = string | Array<string>;
|
|
247
|
+
|
|
248
|
+
/** @internal */
|
|
249
|
+
export const Input$outboundSchema: z.ZodType<
|
|
250
|
+
Input$Outbound,
|
|
251
|
+
z.ZodTypeDef,
|
|
252
|
+
Input
|
|
253
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @internal
|
|
257
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
258
|
+
*/
|
|
259
|
+
export namespace Input$ {
|
|
260
|
+
/** @deprecated use `Input$inboundSchema` instead. */
|
|
261
|
+
export const inboundSchema = Input$inboundSchema;
|
|
262
|
+
/** @deprecated use `Input$outboundSchema` instead. */
|
|
263
|
+
export const outboundSchema = Input$outboundSchema;
|
|
264
|
+
/** @deprecated use `Input$Outbound` instead. */
|
|
265
|
+
export type Outbound = Input$Outbound;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export function inputToJSON(input: Input): string {
|
|
269
|
+
return JSON.stringify(Input$outboundSchema.parse(input));
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export function inputFromJSON(
|
|
273
|
+
jsonString: string,
|
|
274
|
+
): SafeParseResult<Input, SDKValidationError> {
|
|
275
|
+
return safeParse(
|
|
276
|
+
jsonString,
|
|
277
|
+
(x) => Input$inboundSchema.parse(JSON.parse(x)),
|
|
278
|
+
`Failed to parse 'Input' from JSON`,
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/** @internal */
|
|
283
|
+
export const PostV2ProxyModerationsRequestBody$inboundSchema: z.ZodType<
|
|
284
|
+
PostV2ProxyModerationsRequestBody,
|
|
285
|
+
z.ZodTypeDef,
|
|
286
|
+
unknown
|
|
287
|
+
> = z.object({
|
|
288
|
+
input: z.union([z.string(), z.array(z.string())]),
|
|
289
|
+
model: z.string().optional(),
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
/** @internal */
|
|
293
|
+
export type PostV2ProxyModerationsRequestBody$Outbound = {
|
|
294
|
+
input: string | Array<string>;
|
|
295
|
+
model?: string | undefined;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
/** @internal */
|
|
299
|
+
export const PostV2ProxyModerationsRequestBody$outboundSchema: z.ZodType<
|
|
300
|
+
PostV2ProxyModerationsRequestBody$Outbound,
|
|
301
|
+
z.ZodTypeDef,
|
|
302
|
+
PostV2ProxyModerationsRequestBody
|
|
303
|
+
> = z.object({
|
|
304
|
+
input: z.union([z.string(), z.array(z.string())]),
|
|
305
|
+
model: z.string().optional(),
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* @internal
|
|
310
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
311
|
+
*/
|
|
312
|
+
export namespace PostV2ProxyModerationsRequestBody$ {
|
|
313
|
+
/** @deprecated use `PostV2ProxyModerationsRequestBody$inboundSchema` instead. */
|
|
314
|
+
export const inboundSchema = PostV2ProxyModerationsRequestBody$inboundSchema;
|
|
315
|
+
/** @deprecated use `PostV2ProxyModerationsRequestBody$outboundSchema` instead. */
|
|
316
|
+
export const outboundSchema =
|
|
317
|
+
PostV2ProxyModerationsRequestBody$outboundSchema;
|
|
318
|
+
/** @deprecated use `PostV2ProxyModerationsRequestBody$Outbound` instead. */
|
|
319
|
+
export type Outbound = PostV2ProxyModerationsRequestBody$Outbound;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export function postV2ProxyModerationsRequestBodyToJSON(
|
|
323
|
+
postV2ProxyModerationsRequestBody: PostV2ProxyModerationsRequestBody,
|
|
324
|
+
): string {
|
|
325
|
+
return JSON.stringify(
|
|
326
|
+
PostV2ProxyModerationsRequestBody$outboundSchema.parse(
|
|
327
|
+
postV2ProxyModerationsRequestBody,
|
|
328
|
+
),
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export function postV2ProxyModerationsRequestBodyFromJSON(
|
|
333
|
+
jsonString: string,
|
|
334
|
+
): SafeParseResult<PostV2ProxyModerationsRequestBody, SDKValidationError> {
|
|
335
|
+
return safeParse(
|
|
336
|
+
jsonString,
|
|
337
|
+
(x) => PostV2ProxyModerationsRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
338
|
+
`Failed to parse 'PostV2ProxyModerationsRequestBody' from JSON`,
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/** @internal */
|
|
343
|
+
export const Categories$inboundSchema: z.ZodType<
|
|
344
|
+
Categories,
|
|
345
|
+
z.ZodTypeDef,
|
|
346
|
+
unknown
|
|
347
|
+
> = z.object({
|
|
348
|
+
hate: z.boolean(),
|
|
349
|
+
"hate/threatening": z.boolean(),
|
|
350
|
+
harassment: z.boolean(),
|
|
351
|
+
"harassment/threatening": z.boolean(),
|
|
352
|
+
illicit: z.boolean(),
|
|
353
|
+
"illicit/violent": z.boolean(),
|
|
354
|
+
"self-harm": z.boolean(),
|
|
355
|
+
"self-harm/intent": z.boolean(),
|
|
356
|
+
"self-harm/instructions": z.boolean(),
|
|
357
|
+
sexual: z.boolean(),
|
|
358
|
+
"sexual/minors": z.boolean(),
|
|
359
|
+
violence: z.boolean(),
|
|
360
|
+
"violence/graphic": z.boolean(),
|
|
361
|
+
}).transform((v) => {
|
|
362
|
+
return remap$(v, {
|
|
363
|
+
"hate/threatening": "hateThreatening",
|
|
364
|
+
"harassment/threatening": "harassmentThreatening",
|
|
365
|
+
"illicit/violent": "illicitViolent",
|
|
366
|
+
"self-harm": "selfHarm",
|
|
367
|
+
"self-harm/intent": "selfHarmIntent",
|
|
368
|
+
"self-harm/instructions": "selfHarmInstructions",
|
|
369
|
+
"sexual/minors": "sexualMinors",
|
|
370
|
+
"violence/graphic": "violenceGraphic",
|
|
371
|
+
});
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
/** @internal */
|
|
375
|
+
export type Categories$Outbound = {
|
|
376
|
+
hate: boolean;
|
|
377
|
+
"hate/threatening": boolean;
|
|
378
|
+
harassment: boolean;
|
|
379
|
+
"harassment/threatening": boolean;
|
|
380
|
+
illicit: boolean;
|
|
381
|
+
"illicit/violent": boolean;
|
|
382
|
+
"self-harm": boolean;
|
|
383
|
+
"self-harm/intent": boolean;
|
|
384
|
+
"self-harm/instructions": boolean;
|
|
385
|
+
sexual: boolean;
|
|
386
|
+
"sexual/minors": boolean;
|
|
387
|
+
violence: boolean;
|
|
388
|
+
"violence/graphic": boolean;
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
/** @internal */
|
|
392
|
+
export const Categories$outboundSchema: z.ZodType<
|
|
393
|
+
Categories$Outbound,
|
|
394
|
+
z.ZodTypeDef,
|
|
395
|
+
Categories
|
|
396
|
+
> = z.object({
|
|
397
|
+
hate: z.boolean(),
|
|
398
|
+
hateThreatening: z.boolean(),
|
|
399
|
+
harassment: z.boolean(),
|
|
400
|
+
harassmentThreatening: z.boolean(),
|
|
401
|
+
illicit: z.boolean(),
|
|
402
|
+
illicitViolent: z.boolean(),
|
|
403
|
+
selfHarm: z.boolean(),
|
|
404
|
+
selfHarmIntent: z.boolean(),
|
|
405
|
+
selfHarmInstructions: z.boolean(),
|
|
406
|
+
sexual: z.boolean(),
|
|
407
|
+
sexualMinors: z.boolean(),
|
|
408
|
+
violence: z.boolean(),
|
|
409
|
+
violenceGraphic: z.boolean(),
|
|
410
|
+
}).transform((v) => {
|
|
411
|
+
return remap$(v, {
|
|
412
|
+
hateThreatening: "hate/threatening",
|
|
413
|
+
harassmentThreatening: "harassment/threatening",
|
|
414
|
+
illicitViolent: "illicit/violent",
|
|
415
|
+
selfHarm: "self-harm",
|
|
416
|
+
selfHarmIntent: "self-harm/intent",
|
|
417
|
+
selfHarmInstructions: "self-harm/instructions",
|
|
418
|
+
sexualMinors: "sexual/minors",
|
|
419
|
+
violenceGraphic: "violence/graphic",
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* @internal
|
|
425
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
426
|
+
*/
|
|
427
|
+
export namespace Categories$ {
|
|
428
|
+
/** @deprecated use `Categories$inboundSchema` instead. */
|
|
429
|
+
export const inboundSchema = Categories$inboundSchema;
|
|
430
|
+
/** @deprecated use `Categories$outboundSchema` instead. */
|
|
431
|
+
export const outboundSchema = Categories$outboundSchema;
|
|
432
|
+
/** @deprecated use `Categories$Outbound` instead. */
|
|
433
|
+
export type Outbound = Categories$Outbound;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
export function categoriesToJSON(categories: Categories): string {
|
|
437
|
+
return JSON.stringify(Categories$outboundSchema.parse(categories));
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export function categoriesFromJSON(
|
|
441
|
+
jsonString: string,
|
|
442
|
+
): SafeParseResult<Categories, SDKValidationError> {
|
|
443
|
+
return safeParse(
|
|
444
|
+
jsonString,
|
|
445
|
+
(x) => Categories$inboundSchema.parse(JSON.parse(x)),
|
|
446
|
+
`Failed to parse 'Categories' from JSON`,
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/** @internal */
|
|
451
|
+
export const CategoryScores$inboundSchema: z.ZodType<
|
|
452
|
+
CategoryScores,
|
|
453
|
+
z.ZodTypeDef,
|
|
454
|
+
unknown
|
|
455
|
+
> = z.object({
|
|
456
|
+
hate: z.number(),
|
|
457
|
+
"hate/threatening": z.number(),
|
|
458
|
+
harassment: z.number(),
|
|
459
|
+
"harassment/threatening": z.number(),
|
|
460
|
+
illicit: z.number(),
|
|
461
|
+
"illicit/violent": z.number(),
|
|
462
|
+
"self-harm": z.number(),
|
|
463
|
+
"self-harm/intent": z.number(),
|
|
464
|
+
"self-harm/instructions": z.number(),
|
|
465
|
+
sexual: z.number(),
|
|
466
|
+
"sexual/minors": z.number(),
|
|
467
|
+
violence: z.number(),
|
|
468
|
+
"violence/graphic": z.number(),
|
|
469
|
+
}).transform((v) => {
|
|
470
|
+
return remap$(v, {
|
|
471
|
+
"hate/threatening": "hateThreatening",
|
|
472
|
+
"harassment/threatening": "harassmentThreatening",
|
|
473
|
+
"illicit/violent": "illicitViolent",
|
|
474
|
+
"self-harm": "selfHarm",
|
|
475
|
+
"self-harm/intent": "selfHarmIntent",
|
|
476
|
+
"self-harm/instructions": "selfHarmInstructions",
|
|
477
|
+
"sexual/minors": "sexualMinors",
|
|
478
|
+
"violence/graphic": "violenceGraphic",
|
|
479
|
+
});
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
/** @internal */
|
|
483
|
+
export type CategoryScores$Outbound = {
|
|
484
|
+
hate: number;
|
|
485
|
+
"hate/threatening": number;
|
|
486
|
+
harassment: number;
|
|
487
|
+
"harassment/threatening": number;
|
|
488
|
+
illicit: number;
|
|
489
|
+
"illicit/violent": number;
|
|
490
|
+
"self-harm": number;
|
|
491
|
+
"self-harm/intent": number;
|
|
492
|
+
"self-harm/instructions": number;
|
|
493
|
+
sexual: number;
|
|
494
|
+
"sexual/minors": number;
|
|
495
|
+
violence: number;
|
|
496
|
+
"violence/graphic": number;
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
/** @internal */
|
|
500
|
+
export const CategoryScores$outboundSchema: z.ZodType<
|
|
501
|
+
CategoryScores$Outbound,
|
|
502
|
+
z.ZodTypeDef,
|
|
503
|
+
CategoryScores
|
|
504
|
+
> = z.object({
|
|
505
|
+
hate: z.number(),
|
|
506
|
+
hateThreatening: z.number(),
|
|
507
|
+
harassment: z.number(),
|
|
508
|
+
harassmentThreatening: z.number(),
|
|
509
|
+
illicit: z.number(),
|
|
510
|
+
illicitViolent: z.number(),
|
|
511
|
+
selfHarm: z.number(),
|
|
512
|
+
selfHarmIntent: z.number(),
|
|
513
|
+
selfHarmInstructions: z.number(),
|
|
514
|
+
sexual: z.number(),
|
|
515
|
+
sexualMinors: z.number(),
|
|
516
|
+
violence: z.number(),
|
|
517
|
+
violenceGraphic: z.number(),
|
|
518
|
+
}).transform((v) => {
|
|
519
|
+
return remap$(v, {
|
|
520
|
+
hateThreatening: "hate/threatening",
|
|
521
|
+
harassmentThreatening: "harassment/threatening",
|
|
522
|
+
illicitViolent: "illicit/violent",
|
|
523
|
+
selfHarm: "self-harm",
|
|
524
|
+
selfHarmIntent: "self-harm/intent",
|
|
525
|
+
selfHarmInstructions: "self-harm/instructions",
|
|
526
|
+
sexualMinors: "sexual/minors",
|
|
527
|
+
violenceGraphic: "violence/graphic",
|
|
528
|
+
});
|
|
529
|
+
});
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* @internal
|
|
533
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
534
|
+
*/
|
|
535
|
+
export namespace CategoryScores$ {
|
|
536
|
+
/** @deprecated use `CategoryScores$inboundSchema` instead. */
|
|
537
|
+
export const inboundSchema = CategoryScores$inboundSchema;
|
|
538
|
+
/** @deprecated use `CategoryScores$outboundSchema` instead. */
|
|
539
|
+
export const outboundSchema = CategoryScores$outboundSchema;
|
|
540
|
+
/** @deprecated use `CategoryScores$Outbound` instead. */
|
|
541
|
+
export type Outbound = CategoryScores$Outbound;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export function categoryScoresToJSON(categoryScores: CategoryScores): string {
|
|
545
|
+
return JSON.stringify(CategoryScores$outboundSchema.parse(categoryScores));
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
export function categoryScoresFromJSON(
|
|
549
|
+
jsonString: string,
|
|
550
|
+
): SafeParseResult<CategoryScores, SDKValidationError> {
|
|
551
|
+
return safeParse(
|
|
552
|
+
jsonString,
|
|
553
|
+
(x) => CategoryScores$inboundSchema.parse(JSON.parse(x)),
|
|
554
|
+
`Failed to parse 'CategoryScores' from JSON`,
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/** @internal */
|
|
559
|
+
export const CategoryAppliedInputTypes$inboundSchema: z.ZodType<
|
|
560
|
+
CategoryAppliedInputTypes,
|
|
561
|
+
z.ZodTypeDef,
|
|
562
|
+
unknown
|
|
563
|
+
> = z.object({
|
|
564
|
+
hate: z.array(z.string()),
|
|
565
|
+
"hate/threatening": z.array(z.string()),
|
|
566
|
+
harassment: z.array(z.string()),
|
|
567
|
+
"harassment/threatening": z.array(z.string()),
|
|
568
|
+
illicit: z.array(z.string()),
|
|
569
|
+
"illicit/violent": z.array(z.string()),
|
|
570
|
+
"self-harm": z.array(z.string()),
|
|
571
|
+
"self-harm/intent": z.array(z.string()),
|
|
572
|
+
"self-harm/instructions": z.array(z.string()),
|
|
573
|
+
sexual: z.array(z.string()),
|
|
574
|
+
"sexual/minors": z.array(z.string()),
|
|
575
|
+
violence: z.array(z.string()),
|
|
576
|
+
"violence/graphic": z.array(z.string()),
|
|
577
|
+
}).transform((v) => {
|
|
578
|
+
return remap$(v, {
|
|
579
|
+
"hate/threatening": "hateThreatening",
|
|
580
|
+
"harassment/threatening": "harassmentThreatening",
|
|
581
|
+
"illicit/violent": "illicitViolent",
|
|
582
|
+
"self-harm": "selfHarm",
|
|
583
|
+
"self-harm/intent": "selfHarmIntent",
|
|
584
|
+
"self-harm/instructions": "selfHarmInstructions",
|
|
585
|
+
"sexual/minors": "sexualMinors",
|
|
586
|
+
"violence/graphic": "violenceGraphic",
|
|
587
|
+
});
|
|
588
|
+
});
|
|
589
|
+
|
|
590
|
+
/** @internal */
|
|
591
|
+
export type CategoryAppliedInputTypes$Outbound = {
|
|
592
|
+
hate: Array<string>;
|
|
593
|
+
"hate/threatening": Array<string>;
|
|
594
|
+
harassment: Array<string>;
|
|
595
|
+
"harassment/threatening": Array<string>;
|
|
596
|
+
illicit: Array<string>;
|
|
597
|
+
"illicit/violent": Array<string>;
|
|
598
|
+
"self-harm": Array<string>;
|
|
599
|
+
"self-harm/intent": Array<string>;
|
|
600
|
+
"self-harm/instructions": Array<string>;
|
|
601
|
+
sexual: Array<string>;
|
|
602
|
+
"sexual/minors": Array<string>;
|
|
603
|
+
violence: Array<string>;
|
|
604
|
+
"violence/graphic": Array<string>;
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
/** @internal */
|
|
608
|
+
export const CategoryAppliedInputTypes$outboundSchema: z.ZodType<
|
|
609
|
+
CategoryAppliedInputTypes$Outbound,
|
|
610
|
+
z.ZodTypeDef,
|
|
611
|
+
CategoryAppliedInputTypes
|
|
612
|
+
> = z.object({
|
|
613
|
+
hate: z.array(z.string()),
|
|
614
|
+
hateThreatening: z.array(z.string()),
|
|
615
|
+
harassment: z.array(z.string()),
|
|
616
|
+
harassmentThreatening: z.array(z.string()),
|
|
617
|
+
illicit: z.array(z.string()),
|
|
618
|
+
illicitViolent: z.array(z.string()),
|
|
619
|
+
selfHarm: z.array(z.string()),
|
|
620
|
+
selfHarmIntent: z.array(z.string()),
|
|
621
|
+
selfHarmInstructions: z.array(z.string()),
|
|
622
|
+
sexual: z.array(z.string()),
|
|
623
|
+
sexualMinors: z.array(z.string()),
|
|
624
|
+
violence: z.array(z.string()),
|
|
625
|
+
violenceGraphic: z.array(z.string()),
|
|
626
|
+
}).transform((v) => {
|
|
627
|
+
return remap$(v, {
|
|
628
|
+
hateThreatening: "hate/threatening",
|
|
629
|
+
harassmentThreatening: "harassment/threatening",
|
|
630
|
+
illicitViolent: "illicit/violent",
|
|
631
|
+
selfHarm: "self-harm",
|
|
632
|
+
selfHarmIntent: "self-harm/intent",
|
|
633
|
+
selfHarmInstructions: "self-harm/instructions",
|
|
634
|
+
sexualMinors: "sexual/minors",
|
|
635
|
+
violenceGraphic: "violence/graphic",
|
|
636
|
+
});
|
|
637
|
+
});
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* @internal
|
|
641
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
642
|
+
*/
|
|
643
|
+
export namespace CategoryAppliedInputTypes$ {
|
|
644
|
+
/** @deprecated use `CategoryAppliedInputTypes$inboundSchema` instead. */
|
|
645
|
+
export const inboundSchema = CategoryAppliedInputTypes$inboundSchema;
|
|
646
|
+
/** @deprecated use `CategoryAppliedInputTypes$outboundSchema` instead. */
|
|
647
|
+
export const outboundSchema = CategoryAppliedInputTypes$outboundSchema;
|
|
648
|
+
/** @deprecated use `CategoryAppliedInputTypes$Outbound` instead. */
|
|
649
|
+
export type Outbound = CategoryAppliedInputTypes$Outbound;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
export function categoryAppliedInputTypesToJSON(
|
|
653
|
+
categoryAppliedInputTypes: CategoryAppliedInputTypes,
|
|
654
|
+
): string {
|
|
655
|
+
return JSON.stringify(
|
|
656
|
+
CategoryAppliedInputTypes$outboundSchema.parse(categoryAppliedInputTypes),
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
export function categoryAppliedInputTypesFromJSON(
|
|
661
|
+
jsonString: string,
|
|
662
|
+
): SafeParseResult<CategoryAppliedInputTypes, SDKValidationError> {
|
|
663
|
+
return safeParse(
|
|
664
|
+
jsonString,
|
|
665
|
+
(x) => CategoryAppliedInputTypes$inboundSchema.parse(JSON.parse(x)),
|
|
666
|
+
`Failed to parse 'CategoryAppliedInputTypes' from JSON`,
|
|
667
|
+
);
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/** @internal */
|
|
671
|
+
export const Results$inboundSchema: z.ZodType<Results, z.ZodTypeDef, unknown> =
|
|
672
|
+
z.object({
|
|
673
|
+
flagged: z.boolean(),
|
|
674
|
+
categories: z.lazy(() => Categories$inboundSchema),
|
|
675
|
+
category_scores: z.lazy(() => CategoryScores$inboundSchema),
|
|
676
|
+
category_applied_input_types: z.lazy(() =>
|
|
677
|
+
CategoryAppliedInputTypes$inboundSchema
|
|
678
|
+
).optional(),
|
|
679
|
+
}).transform((v) => {
|
|
680
|
+
return remap$(v, {
|
|
681
|
+
"category_scores": "categoryScores",
|
|
682
|
+
"category_applied_input_types": "categoryAppliedInputTypes",
|
|
683
|
+
});
|
|
684
|
+
});
|
|
685
|
+
|
|
686
|
+
/** @internal */
|
|
687
|
+
export type Results$Outbound = {
|
|
688
|
+
flagged: boolean;
|
|
689
|
+
categories: Categories$Outbound;
|
|
690
|
+
category_scores: CategoryScores$Outbound;
|
|
691
|
+
category_applied_input_types?: CategoryAppliedInputTypes$Outbound | undefined;
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
/** @internal */
|
|
695
|
+
export const Results$outboundSchema: z.ZodType<
|
|
696
|
+
Results$Outbound,
|
|
697
|
+
z.ZodTypeDef,
|
|
698
|
+
Results
|
|
699
|
+
> = z.object({
|
|
700
|
+
flagged: z.boolean(),
|
|
701
|
+
categories: z.lazy(() => Categories$outboundSchema),
|
|
702
|
+
categoryScores: z.lazy(() => CategoryScores$outboundSchema),
|
|
703
|
+
categoryAppliedInputTypes: z.lazy(() =>
|
|
704
|
+
CategoryAppliedInputTypes$outboundSchema
|
|
705
|
+
).optional(),
|
|
706
|
+
}).transform((v) => {
|
|
707
|
+
return remap$(v, {
|
|
708
|
+
categoryScores: "category_scores",
|
|
709
|
+
categoryAppliedInputTypes: "category_applied_input_types",
|
|
710
|
+
});
|
|
711
|
+
});
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* @internal
|
|
715
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
716
|
+
*/
|
|
717
|
+
export namespace Results$ {
|
|
718
|
+
/** @deprecated use `Results$inboundSchema` instead. */
|
|
719
|
+
export const inboundSchema = Results$inboundSchema;
|
|
720
|
+
/** @deprecated use `Results$outboundSchema` instead. */
|
|
721
|
+
export const outboundSchema = Results$outboundSchema;
|
|
722
|
+
/** @deprecated use `Results$Outbound` instead. */
|
|
723
|
+
export type Outbound = Results$Outbound;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
export function resultsToJSON(results: Results): string {
|
|
727
|
+
return JSON.stringify(Results$outboundSchema.parse(results));
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
export function resultsFromJSON(
|
|
731
|
+
jsonString: string,
|
|
732
|
+
): SafeParseResult<Results, SDKValidationError> {
|
|
733
|
+
return safeParse(
|
|
734
|
+
jsonString,
|
|
735
|
+
(x) => Results$inboundSchema.parse(JSON.parse(x)),
|
|
736
|
+
`Failed to parse 'Results' from JSON`,
|
|
737
|
+
);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/** @internal */
|
|
741
|
+
export const PostV2ProxyModerationsResponseBody$inboundSchema: z.ZodType<
|
|
742
|
+
PostV2ProxyModerationsResponseBody,
|
|
743
|
+
z.ZodTypeDef,
|
|
744
|
+
unknown
|
|
745
|
+
> = z.object({
|
|
746
|
+
id: z.string(),
|
|
747
|
+
model: z.string(),
|
|
748
|
+
results: z.array(z.lazy(() => Results$inboundSchema)),
|
|
749
|
+
});
|
|
750
|
+
|
|
751
|
+
/** @internal */
|
|
752
|
+
export type PostV2ProxyModerationsResponseBody$Outbound = {
|
|
753
|
+
id: string;
|
|
754
|
+
model: string;
|
|
755
|
+
results: Array<Results$Outbound>;
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
/** @internal */
|
|
759
|
+
export const PostV2ProxyModerationsResponseBody$outboundSchema: z.ZodType<
|
|
760
|
+
PostV2ProxyModerationsResponseBody$Outbound,
|
|
761
|
+
z.ZodTypeDef,
|
|
762
|
+
PostV2ProxyModerationsResponseBody
|
|
763
|
+
> = z.object({
|
|
764
|
+
id: z.string(),
|
|
765
|
+
model: z.string(),
|
|
766
|
+
results: z.array(z.lazy(() => Results$outboundSchema)),
|
|
767
|
+
});
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* @internal
|
|
771
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
772
|
+
*/
|
|
773
|
+
export namespace PostV2ProxyModerationsResponseBody$ {
|
|
774
|
+
/** @deprecated use `PostV2ProxyModerationsResponseBody$inboundSchema` instead. */
|
|
775
|
+
export const inboundSchema = PostV2ProxyModerationsResponseBody$inboundSchema;
|
|
776
|
+
/** @deprecated use `PostV2ProxyModerationsResponseBody$outboundSchema` instead. */
|
|
777
|
+
export const outboundSchema =
|
|
778
|
+
PostV2ProxyModerationsResponseBody$outboundSchema;
|
|
779
|
+
/** @deprecated use `PostV2ProxyModerationsResponseBody$Outbound` instead. */
|
|
780
|
+
export type Outbound = PostV2ProxyModerationsResponseBody$Outbound;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
export function postV2ProxyModerationsResponseBodyToJSON(
|
|
784
|
+
postV2ProxyModerationsResponseBody: PostV2ProxyModerationsResponseBody,
|
|
785
|
+
): string {
|
|
786
|
+
return JSON.stringify(
|
|
787
|
+
PostV2ProxyModerationsResponseBody$outboundSchema.parse(
|
|
788
|
+
postV2ProxyModerationsResponseBody,
|
|
789
|
+
),
|
|
790
|
+
);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
export function postV2ProxyModerationsResponseBodyFromJSON(
|
|
794
|
+
jsonString: string,
|
|
795
|
+
): SafeParseResult<PostV2ProxyModerationsResponseBody, SDKValidationError> {
|
|
796
|
+
return safeParse(
|
|
797
|
+
jsonString,
|
|
798
|
+
(x) =>
|
|
799
|
+
PostV2ProxyModerationsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
800
|
+
`Failed to parse 'PostV2ProxyModerationsResponseBody' from JSON`,
|
|
801
|
+
);
|
|
802
|
+
}
|