@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,114 @@
|
|
|
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
|
+
* Information about the contact making the request. If the contact does not exist, it will be created automatically.
|
|
13
|
+
*/
|
|
14
|
+
export type PublicContact = {
|
|
15
|
+
/**
|
|
16
|
+
* Unique identifier for the contact
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Display name of the contact
|
|
21
|
+
*/
|
|
22
|
+
displayName?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Email address of the contact
|
|
25
|
+
*/
|
|
26
|
+
email?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* A hash of key/value pairs containing any other data about the contact
|
|
29
|
+
*/
|
|
30
|
+
metadata?: Array<{ [k: string]: any }> | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* URL to the contact's avatar or logo
|
|
33
|
+
*/
|
|
34
|
+
logoUrl?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* A list of tags associated with the contact
|
|
37
|
+
*/
|
|
38
|
+
tags?: Array<string> | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const PublicContact$inboundSchema: z.ZodType<
|
|
43
|
+
PublicContact,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
unknown
|
|
46
|
+
> = z.object({
|
|
47
|
+
id: z.string(),
|
|
48
|
+
display_name: z.string().optional(),
|
|
49
|
+
email: z.string().optional(),
|
|
50
|
+
metadata: z.array(z.record(z.any())).optional(),
|
|
51
|
+
logo_url: z.string().optional(),
|
|
52
|
+
tags: z.array(z.string()).optional(),
|
|
53
|
+
}).transform((v) => {
|
|
54
|
+
return remap$(v, {
|
|
55
|
+
"display_name": "displayName",
|
|
56
|
+
"logo_url": "logoUrl",
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export type PublicContact$Outbound = {
|
|
62
|
+
id: string;
|
|
63
|
+
display_name?: string | undefined;
|
|
64
|
+
email?: string | undefined;
|
|
65
|
+
metadata?: Array<{ [k: string]: any }> | undefined;
|
|
66
|
+
logo_url?: string | undefined;
|
|
67
|
+
tags?: Array<string> | undefined;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
export const PublicContact$outboundSchema: z.ZodType<
|
|
72
|
+
PublicContact$Outbound,
|
|
73
|
+
z.ZodTypeDef,
|
|
74
|
+
PublicContact
|
|
75
|
+
> = z.object({
|
|
76
|
+
id: z.string(),
|
|
77
|
+
displayName: z.string().optional(),
|
|
78
|
+
email: z.string().optional(),
|
|
79
|
+
metadata: z.array(z.record(z.any())).optional(),
|
|
80
|
+
logoUrl: z.string().optional(),
|
|
81
|
+
tags: z.array(z.string()).optional(),
|
|
82
|
+
}).transform((v) => {
|
|
83
|
+
return remap$(v, {
|
|
84
|
+
displayName: "display_name",
|
|
85
|
+
logoUrl: "logo_url",
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @internal
|
|
91
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
92
|
+
*/
|
|
93
|
+
export namespace PublicContact$ {
|
|
94
|
+
/** @deprecated use `PublicContact$inboundSchema` instead. */
|
|
95
|
+
export const inboundSchema = PublicContact$inboundSchema;
|
|
96
|
+
/** @deprecated use `PublicContact$outboundSchema` instead. */
|
|
97
|
+
export const outboundSchema = PublicContact$outboundSchema;
|
|
98
|
+
/** @deprecated use `PublicContact$Outbound` instead. */
|
|
99
|
+
export type Outbound = PublicContact$Outbound;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function publicContactToJSON(publicContact: PublicContact): string {
|
|
103
|
+
return JSON.stringify(PublicContact$outboundSchema.parse(publicContact));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function publicContactFromJSON(
|
|
107
|
+
jsonString: string,
|
|
108
|
+
): SafeParseResult<PublicContact, SDKValidationError> {
|
|
109
|
+
return safeParse(
|
|
110
|
+
jsonString,
|
|
111
|
+
(x) => PublicContact$inboundSchema.parse(JSON.parse(x)),
|
|
112
|
+
`Failed to parse 'PublicContact' from JSON`,
|
|
113
|
+
);
|
|
114
|
+
}
|
|
@@ -48,6 +48,9 @@ export * from "./getpromptversion.js";
|
|
|
48
48
|
export * from "./honoapierror.js";
|
|
49
49
|
export * from "./httpclienterrors.js";
|
|
50
50
|
export * from "./invokeeval.js";
|
|
51
|
+
export * from "./postv2proxyaudiotranscriptions.js";
|
|
52
|
+
export * from "./postv2proxyaudiotranslations.js";
|
|
53
|
+
export * from "./postv2proxymoderations.js";
|
|
51
54
|
export * from "./responsevalidationerror.js";
|
|
52
55
|
export * from "./retrievecontact.js";
|
|
53
56
|
export * from "./sdkvalidationerror.js";
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { OrqError } from "./orqerror.js";
|
|
9
|
+
import { SDKValidationError } from "./sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type PostV2ProxyAudioTranscriptionsError = {
|
|
12
|
+
message: string;
|
|
13
|
+
type: string;
|
|
14
|
+
param: string | null;
|
|
15
|
+
code: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Returns validation error
|
|
20
|
+
*/
|
|
21
|
+
export type PostV2ProxyAudioTranscriptionsResponseBodyData = {
|
|
22
|
+
error: PostV2ProxyAudioTranscriptionsError;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Returns validation error
|
|
27
|
+
*/
|
|
28
|
+
export class PostV2ProxyAudioTranscriptionsResponseBody extends OrqError {
|
|
29
|
+
error: PostV2ProxyAudioTranscriptionsError;
|
|
30
|
+
|
|
31
|
+
/** The original data that was passed to this error instance. */
|
|
32
|
+
data$: PostV2ProxyAudioTranscriptionsResponseBodyData;
|
|
33
|
+
|
|
34
|
+
constructor(
|
|
35
|
+
err: PostV2ProxyAudioTranscriptionsResponseBodyData,
|
|
36
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
37
|
+
) {
|
|
38
|
+
const message = err.error?.message
|
|
39
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
40
|
+
super(message, httpMeta);
|
|
41
|
+
this.data$ = err;
|
|
42
|
+
this.error = err.error;
|
|
43
|
+
|
|
44
|
+
this.name = "PostV2ProxyAudioTranscriptionsResponseBody";
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const PostV2ProxyAudioTranscriptionsError$inboundSchema: z.ZodType<
|
|
50
|
+
PostV2ProxyAudioTranscriptionsError,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
unknown
|
|
53
|
+
> = z.object({
|
|
54
|
+
message: z.string(),
|
|
55
|
+
type: z.string(),
|
|
56
|
+
param: z.nullable(z.string()),
|
|
57
|
+
code: z.string(),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export type PostV2ProxyAudioTranscriptionsError$Outbound = {
|
|
62
|
+
message: string;
|
|
63
|
+
type: string;
|
|
64
|
+
param: string | null;
|
|
65
|
+
code: string;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const PostV2ProxyAudioTranscriptionsError$outboundSchema: z.ZodType<
|
|
70
|
+
PostV2ProxyAudioTranscriptionsError$Outbound,
|
|
71
|
+
z.ZodTypeDef,
|
|
72
|
+
PostV2ProxyAudioTranscriptionsError
|
|
73
|
+
> = z.object({
|
|
74
|
+
message: z.string(),
|
|
75
|
+
type: z.string(),
|
|
76
|
+
param: z.nullable(z.string()),
|
|
77
|
+
code: z.string(),
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @internal
|
|
82
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
83
|
+
*/
|
|
84
|
+
export namespace PostV2ProxyAudioTranscriptionsError$ {
|
|
85
|
+
/** @deprecated use `PostV2ProxyAudioTranscriptionsError$inboundSchema` instead. */
|
|
86
|
+
export const inboundSchema =
|
|
87
|
+
PostV2ProxyAudioTranscriptionsError$inboundSchema;
|
|
88
|
+
/** @deprecated use `PostV2ProxyAudioTranscriptionsError$outboundSchema` instead. */
|
|
89
|
+
export const outboundSchema =
|
|
90
|
+
PostV2ProxyAudioTranscriptionsError$outboundSchema;
|
|
91
|
+
/** @deprecated use `PostV2ProxyAudioTranscriptionsError$Outbound` instead. */
|
|
92
|
+
export type Outbound = PostV2ProxyAudioTranscriptionsError$Outbound;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function postV2ProxyAudioTranscriptionsErrorToJSON(
|
|
96
|
+
postV2ProxyAudioTranscriptionsError: PostV2ProxyAudioTranscriptionsError,
|
|
97
|
+
): string {
|
|
98
|
+
return JSON.stringify(
|
|
99
|
+
PostV2ProxyAudioTranscriptionsError$outboundSchema.parse(
|
|
100
|
+
postV2ProxyAudioTranscriptionsError,
|
|
101
|
+
),
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function postV2ProxyAudioTranscriptionsErrorFromJSON(
|
|
106
|
+
jsonString: string,
|
|
107
|
+
): SafeParseResult<PostV2ProxyAudioTranscriptionsError, SDKValidationError> {
|
|
108
|
+
return safeParse(
|
|
109
|
+
jsonString,
|
|
110
|
+
(x) =>
|
|
111
|
+
PostV2ProxyAudioTranscriptionsError$inboundSchema.parse(JSON.parse(x)),
|
|
112
|
+
`Failed to parse 'PostV2ProxyAudioTranscriptionsError' from JSON`,
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** @internal */
|
|
117
|
+
export const PostV2ProxyAudioTranscriptionsResponseBody$inboundSchema:
|
|
118
|
+
z.ZodType<PostV2ProxyAudioTranscriptionsResponseBody, z.ZodTypeDef, unknown> =
|
|
119
|
+
z.object({
|
|
120
|
+
error: z.lazy(() => PostV2ProxyAudioTranscriptionsError$inboundSchema),
|
|
121
|
+
request$: z.instanceof(Request),
|
|
122
|
+
response$: z.instanceof(Response),
|
|
123
|
+
body$: z.string(),
|
|
124
|
+
})
|
|
125
|
+
.transform((v) => {
|
|
126
|
+
return new PostV2ProxyAudioTranscriptionsResponseBody(v, {
|
|
127
|
+
request: v.request$,
|
|
128
|
+
response: v.response$,
|
|
129
|
+
body: v.body$,
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
export type PostV2ProxyAudioTranscriptionsResponseBody$Outbound = {
|
|
135
|
+
error: PostV2ProxyAudioTranscriptionsError$Outbound;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const PostV2ProxyAudioTranscriptionsResponseBody$outboundSchema:
|
|
140
|
+
z.ZodType<
|
|
141
|
+
PostV2ProxyAudioTranscriptionsResponseBody$Outbound,
|
|
142
|
+
z.ZodTypeDef,
|
|
143
|
+
PostV2ProxyAudioTranscriptionsResponseBody
|
|
144
|
+
> = z.instanceof(PostV2ProxyAudioTranscriptionsResponseBody)
|
|
145
|
+
.transform(v => v.data$)
|
|
146
|
+
.pipe(z.object({
|
|
147
|
+
error: z.lazy(() => PostV2ProxyAudioTranscriptionsError$outboundSchema),
|
|
148
|
+
}));
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @internal
|
|
152
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
153
|
+
*/
|
|
154
|
+
export namespace PostV2ProxyAudioTranscriptionsResponseBody$ {
|
|
155
|
+
/** @deprecated use `PostV2ProxyAudioTranscriptionsResponseBody$inboundSchema` instead. */
|
|
156
|
+
export const inboundSchema =
|
|
157
|
+
PostV2ProxyAudioTranscriptionsResponseBody$inboundSchema;
|
|
158
|
+
/** @deprecated use `PostV2ProxyAudioTranscriptionsResponseBody$outboundSchema` instead. */
|
|
159
|
+
export const outboundSchema =
|
|
160
|
+
PostV2ProxyAudioTranscriptionsResponseBody$outboundSchema;
|
|
161
|
+
/** @deprecated use `PostV2ProxyAudioTranscriptionsResponseBody$Outbound` instead. */
|
|
162
|
+
export type Outbound = PostV2ProxyAudioTranscriptionsResponseBody$Outbound;
|
|
163
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { OrqError } from "./orqerror.js";
|
|
9
|
+
import { SDKValidationError } from "./sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type PostV2ProxyAudioTranslationsError = {
|
|
12
|
+
message: string;
|
|
13
|
+
type: string;
|
|
14
|
+
param: string | null;
|
|
15
|
+
code: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Returns validation error
|
|
20
|
+
*/
|
|
21
|
+
export type PostV2ProxyAudioTranslationsResponseBodyData = {
|
|
22
|
+
error: PostV2ProxyAudioTranslationsError;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Returns validation error
|
|
27
|
+
*/
|
|
28
|
+
export class PostV2ProxyAudioTranslationsResponseBody extends OrqError {
|
|
29
|
+
error: PostV2ProxyAudioTranslationsError;
|
|
30
|
+
|
|
31
|
+
/** The original data that was passed to this error instance. */
|
|
32
|
+
data$: PostV2ProxyAudioTranslationsResponseBodyData;
|
|
33
|
+
|
|
34
|
+
constructor(
|
|
35
|
+
err: PostV2ProxyAudioTranslationsResponseBodyData,
|
|
36
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
37
|
+
) {
|
|
38
|
+
const message = err.error?.message
|
|
39
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
40
|
+
super(message, httpMeta);
|
|
41
|
+
this.data$ = err;
|
|
42
|
+
this.error = err.error;
|
|
43
|
+
|
|
44
|
+
this.name = "PostV2ProxyAudioTranslationsResponseBody";
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const PostV2ProxyAudioTranslationsError$inboundSchema: z.ZodType<
|
|
50
|
+
PostV2ProxyAudioTranslationsError,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
unknown
|
|
53
|
+
> = z.object({
|
|
54
|
+
message: z.string(),
|
|
55
|
+
type: z.string(),
|
|
56
|
+
param: z.nullable(z.string()),
|
|
57
|
+
code: z.string(),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export type PostV2ProxyAudioTranslationsError$Outbound = {
|
|
62
|
+
message: string;
|
|
63
|
+
type: string;
|
|
64
|
+
param: string | null;
|
|
65
|
+
code: string;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const PostV2ProxyAudioTranslationsError$outboundSchema: z.ZodType<
|
|
70
|
+
PostV2ProxyAudioTranslationsError$Outbound,
|
|
71
|
+
z.ZodTypeDef,
|
|
72
|
+
PostV2ProxyAudioTranslationsError
|
|
73
|
+
> = z.object({
|
|
74
|
+
message: z.string(),
|
|
75
|
+
type: z.string(),
|
|
76
|
+
param: z.nullable(z.string()),
|
|
77
|
+
code: z.string(),
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @internal
|
|
82
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
83
|
+
*/
|
|
84
|
+
export namespace PostV2ProxyAudioTranslationsError$ {
|
|
85
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsError$inboundSchema` instead. */
|
|
86
|
+
export const inboundSchema = PostV2ProxyAudioTranslationsError$inboundSchema;
|
|
87
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsError$outboundSchema` instead. */
|
|
88
|
+
export const outboundSchema =
|
|
89
|
+
PostV2ProxyAudioTranslationsError$outboundSchema;
|
|
90
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsError$Outbound` instead. */
|
|
91
|
+
export type Outbound = PostV2ProxyAudioTranslationsError$Outbound;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function postV2ProxyAudioTranslationsErrorToJSON(
|
|
95
|
+
postV2ProxyAudioTranslationsError: PostV2ProxyAudioTranslationsError,
|
|
96
|
+
): string {
|
|
97
|
+
return JSON.stringify(
|
|
98
|
+
PostV2ProxyAudioTranslationsError$outboundSchema.parse(
|
|
99
|
+
postV2ProxyAudioTranslationsError,
|
|
100
|
+
),
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function postV2ProxyAudioTranslationsErrorFromJSON(
|
|
105
|
+
jsonString: string,
|
|
106
|
+
): SafeParseResult<PostV2ProxyAudioTranslationsError, SDKValidationError> {
|
|
107
|
+
return safeParse(
|
|
108
|
+
jsonString,
|
|
109
|
+
(x) => PostV2ProxyAudioTranslationsError$inboundSchema.parse(JSON.parse(x)),
|
|
110
|
+
`Failed to parse 'PostV2ProxyAudioTranslationsError' from JSON`,
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export const PostV2ProxyAudioTranslationsResponseBody$inboundSchema: z.ZodType<
|
|
116
|
+
PostV2ProxyAudioTranslationsResponseBody,
|
|
117
|
+
z.ZodTypeDef,
|
|
118
|
+
unknown
|
|
119
|
+
> = z.object({
|
|
120
|
+
error: z.lazy(() => PostV2ProxyAudioTranslationsError$inboundSchema),
|
|
121
|
+
request$: z.instanceof(Request),
|
|
122
|
+
response$: z.instanceof(Response),
|
|
123
|
+
body$: z.string(),
|
|
124
|
+
})
|
|
125
|
+
.transform((v) => {
|
|
126
|
+
return new PostV2ProxyAudioTranslationsResponseBody(v, {
|
|
127
|
+
request: v.request$,
|
|
128
|
+
response: v.response$,
|
|
129
|
+
body: v.body$,
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
export type PostV2ProxyAudioTranslationsResponseBody$Outbound = {
|
|
135
|
+
error: PostV2ProxyAudioTranslationsError$Outbound;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const PostV2ProxyAudioTranslationsResponseBody$outboundSchema: z.ZodType<
|
|
140
|
+
PostV2ProxyAudioTranslationsResponseBody$Outbound,
|
|
141
|
+
z.ZodTypeDef,
|
|
142
|
+
PostV2ProxyAudioTranslationsResponseBody
|
|
143
|
+
> = z.instanceof(PostV2ProxyAudioTranslationsResponseBody)
|
|
144
|
+
.transform(v => v.data$)
|
|
145
|
+
.pipe(z.object({
|
|
146
|
+
error: z.lazy(() => PostV2ProxyAudioTranslationsError$outboundSchema),
|
|
147
|
+
}));
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @internal
|
|
151
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
152
|
+
*/
|
|
153
|
+
export namespace PostV2ProxyAudioTranslationsResponseBody$ {
|
|
154
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseBody$inboundSchema` instead. */
|
|
155
|
+
export const inboundSchema =
|
|
156
|
+
PostV2ProxyAudioTranslationsResponseBody$inboundSchema;
|
|
157
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseBody$outboundSchema` instead. */
|
|
158
|
+
export const outboundSchema =
|
|
159
|
+
PostV2ProxyAudioTranslationsResponseBody$outboundSchema;
|
|
160
|
+
/** @deprecated use `PostV2ProxyAudioTranslationsResponseBody$Outbound` instead. */
|
|
161
|
+
export type Outbound = PostV2ProxyAudioTranslationsResponseBody$Outbound;
|
|
162
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { OrqError } from "./orqerror.js";
|
|
9
|
+
import { SDKValidationError } from "./sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type ErrorT = {
|
|
12
|
+
message: string;
|
|
13
|
+
type: string;
|
|
14
|
+
param: string | null;
|
|
15
|
+
code: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Returns validation error
|
|
20
|
+
*/
|
|
21
|
+
export type PostV2ProxyModerationsResponseBodyData = {
|
|
22
|
+
error: ErrorT;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Returns validation error
|
|
27
|
+
*/
|
|
28
|
+
export class PostV2ProxyModerationsResponseBody extends OrqError {
|
|
29
|
+
error: ErrorT;
|
|
30
|
+
|
|
31
|
+
/** The original data that was passed to this error instance. */
|
|
32
|
+
data$: PostV2ProxyModerationsResponseBodyData;
|
|
33
|
+
|
|
34
|
+
constructor(
|
|
35
|
+
err: PostV2ProxyModerationsResponseBodyData,
|
|
36
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
37
|
+
) {
|
|
38
|
+
const message = err.error?.message
|
|
39
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
40
|
+
super(message, httpMeta);
|
|
41
|
+
this.data$ = err;
|
|
42
|
+
this.error = err.error;
|
|
43
|
+
|
|
44
|
+
this.name = "PostV2ProxyModerationsResponseBody";
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown> = z
|
|
50
|
+
.object({
|
|
51
|
+
message: z.string(),
|
|
52
|
+
type: z.string(),
|
|
53
|
+
param: z.nullable(z.string()),
|
|
54
|
+
code: z.string(),
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export type ErrorT$Outbound = {
|
|
59
|
+
message: string;
|
|
60
|
+
type: string;
|
|
61
|
+
param: string | null;
|
|
62
|
+
code: string;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/** @internal */
|
|
66
|
+
export const ErrorT$outboundSchema: z.ZodType<
|
|
67
|
+
ErrorT$Outbound,
|
|
68
|
+
z.ZodTypeDef,
|
|
69
|
+
ErrorT
|
|
70
|
+
> = z.object({
|
|
71
|
+
message: z.string(),
|
|
72
|
+
type: z.string(),
|
|
73
|
+
param: z.nullable(z.string()),
|
|
74
|
+
code: z.string(),
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
80
|
+
*/
|
|
81
|
+
export namespace ErrorT$ {
|
|
82
|
+
/** @deprecated use `ErrorT$inboundSchema` instead. */
|
|
83
|
+
export const inboundSchema = ErrorT$inboundSchema;
|
|
84
|
+
/** @deprecated use `ErrorT$outboundSchema` instead. */
|
|
85
|
+
export const outboundSchema = ErrorT$outboundSchema;
|
|
86
|
+
/** @deprecated use `ErrorT$Outbound` instead. */
|
|
87
|
+
export type Outbound = ErrorT$Outbound;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function errorToJSON(errorT: ErrorT): string {
|
|
91
|
+
return JSON.stringify(ErrorT$outboundSchema.parse(errorT));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function errorFromJSON(
|
|
95
|
+
jsonString: string,
|
|
96
|
+
): SafeParseResult<ErrorT, SDKValidationError> {
|
|
97
|
+
return safeParse(
|
|
98
|
+
jsonString,
|
|
99
|
+
(x) => ErrorT$inboundSchema.parse(JSON.parse(x)),
|
|
100
|
+
`Failed to parse 'ErrorT' from JSON`,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const PostV2ProxyModerationsResponseBody$inboundSchema: z.ZodType<
|
|
106
|
+
PostV2ProxyModerationsResponseBody,
|
|
107
|
+
z.ZodTypeDef,
|
|
108
|
+
unknown
|
|
109
|
+
> = z.object({
|
|
110
|
+
error: z.lazy(() => ErrorT$inboundSchema),
|
|
111
|
+
request$: z.instanceof(Request),
|
|
112
|
+
response$: z.instanceof(Response),
|
|
113
|
+
body$: z.string(),
|
|
114
|
+
})
|
|
115
|
+
.transform((v) => {
|
|
116
|
+
return new PostV2ProxyModerationsResponseBody(v, {
|
|
117
|
+
request: v.request$,
|
|
118
|
+
response: v.response$,
|
|
119
|
+
body: v.body$,
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
/** @internal */
|
|
124
|
+
export type PostV2ProxyModerationsResponseBody$Outbound = {
|
|
125
|
+
error: ErrorT$Outbound;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/** @internal */
|
|
129
|
+
export const PostV2ProxyModerationsResponseBody$outboundSchema: z.ZodType<
|
|
130
|
+
PostV2ProxyModerationsResponseBody$Outbound,
|
|
131
|
+
z.ZodTypeDef,
|
|
132
|
+
PostV2ProxyModerationsResponseBody
|
|
133
|
+
> = z.instanceof(PostV2ProxyModerationsResponseBody)
|
|
134
|
+
.transform(v => v.data$)
|
|
135
|
+
.pipe(z.object({
|
|
136
|
+
error: z.lazy(() => ErrorT$outboundSchema),
|
|
137
|
+
}));
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @internal
|
|
141
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
142
|
+
*/
|
|
143
|
+
export namespace PostV2ProxyModerationsResponseBody$ {
|
|
144
|
+
/** @deprecated use `PostV2ProxyModerationsResponseBody$inboundSchema` instead. */
|
|
145
|
+
export const inboundSchema = PostV2ProxyModerationsResponseBody$inboundSchema;
|
|
146
|
+
/** @deprecated use `PostV2ProxyModerationsResponseBody$outboundSchema` instead. */
|
|
147
|
+
export const outboundSchema =
|
|
148
|
+
PostV2ProxyModerationsResponseBody$outboundSchema;
|
|
149
|
+
/** @deprecated use `PostV2ProxyModerationsResponseBody$Outbound` instead. */
|
|
150
|
+
export type Outbound = PostV2ProxyModerationsResponseBody$Outbound;
|
|
151
|
+
}
|