@openrouter/sdk 0.0.1-beta.11 → 0.0.1-beta.12
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/FUNCTIONS.md +110 -1
- package/REACT_QUERY.md +110 -1
- package/README.md +682 -14
- package/esm/funcs/analyticsGetUserActivity.d.ts +1 -1
- package/esm/funcs/analyticsGetUserActivity.js +2 -2
- package/esm/funcs/apiKeysCreate.d.ts +1 -1
- package/esm/funcs/apiKeysCreate.js +2 -2
- package/esm/funcs/apiKeysDelete.d.ts +1 -1
- package/esm/funcs/apiKeysDelete.js +2 -2
- package/esm/funcs/apiKeysGet.d.ts +1 -1
- package/esm/funcs/apiKeysGet.js +2 -2
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.d.ts +1 -1
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +2 -2
- package/esm/funcs/apiKeysList.d.ts +1 -1
- package/esm/funcs/apiKeysList.js +2 -2
- package/esm/funcs/apiKeysUpdate.d.ts +1 -1
- package/esm/funcs/apiKeysUpdate.js +2 -2
- package/esm/funcs/betaResponsesSend.d.ts +9 -1
- package/esm/funcs/betaResponsesSend.js +36 -12
- package/esm/funcs/creditsCreateCoinbaseCharge.d.ts +1 -1
- package/esm/funcs/creditsCreateCoinbaseCharge.js +15 -5
- package/esm/funcs/creditsGetCredits.d.ts +1 -1
- package/esm/funcs/creditsGetCredits.js +2 -2
- package/esm/funcs/endpointsList.d.ts +1 -1
- package/esm/funcs/endpointsList.js +2 -2
- package/esm/funcs/endpointsListZdrEndpoints.d.ts +2 -1
- package/esm/funcs/endpointsListZdrEndpoints.js +6 -2
- package/esm/funcs/generationsGetGeneration.d.ts +1 -1
- package/esm/funcs/generationsGetGeneration.js +13 -2
- package/esm/funcs/modelsCount.d.ts +3 -2
- package/esm/funcs/modelsCount.js +7 -3
- package/esm/funcs/modelsList.d.ts +2 -1
- package/esm/funcs/modelsList.js +6 -2
- package/esm/funcs/modelsListForUser.d.ts +3 -1
- package/esm/funcs/modelsListForUser.js +7 -3
- package/esm/funcs/parametersGetParameters.d.ts +1 -1
- package/esm/funcs/parametersGetParameters.js +2 -2
- package/esm/funcs/providersList.d.ts +1 -1
- package/esm/funcs/providersList.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/badgatewayresponseerrordata.d.ts +40 -0
- package/esm/models/badgatewayresponseerrordata.js +35 -0
- package/esm/models/badrequestresponseerrordata.d.ts +40 -0
- package/esm/models/badrequestresponseerrordata.js +35 -0
- package/esm/models/chatmessagecontentitemaudio.d.ts +10 -10
- package/esm/models/chatmessagecontentitemaudio.js +14 -14
- package/esm/models/chatstreamingresponsechunk.d.ts +15 -15
- package/esm/models/chatstreamingresponsechunk.js +15 -15
- package/esm/models/createchargerequest.d.ts +31 -2
- package/esm/models/createchargerequest.js +47 -2
- package/esm/models/defaultparameters.d.ts +36 -0
- package/esm/models/defaultparameters.js +46 -0
- package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +40 -0
- package/esm/models/edgenetworktimeoutresponseerrordata.js +35 -0
- package/esm/models/endpointstatus.d.ts +26 -0
- package/esm/models/endpointstatus.js +36 -0
- package/esm/models/errors/badgatewayresponseerror.d.ts +52 -0
- package/esm/models/errors/badgatewayresponseerror.js +63 -0
- package/esm/models/errors/badrequestresponseerror.d.ts +52 -0
- package/esm/models/errors/badrequestresponseerror.js +63 -0
- package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +52 -0
- package/esm/models/errors/edgenetworktimeoutresponseerror.js +63 -0
- package/esm/models/errors/forbiddenresponseerror.d.ts +52 -0
- package/esm/models/errors/forbiddenresponseerror.js +63 -0
- package/esm/models/errors/index.d.ts +14 -2
- package/esm/models/errors/index.js +14 -2
- package/esm/models/errors/internalserverresponseerror.d.ts +52 -0
- package/esm/models/errors/internalserverresponseerror.js +63 -0
- package/esm/models/errors/notfoundresponseerror.d.ts +52 -0
- package/esm/models/errors/{errorresponse.js → notfoundresponseerror.js} +16 -17
- package/esm/models/errors/payloadtoolargeresponseerror.d.ts +52 -0
- package/esm/models/errors/payloadtoolargeresponseerror.js +63 -0
- package/esm/models/errors/paymentrequiredresponseerror.d.ts +52 -0
- package/esm/models/errors/paymentrequiredresponseerror.js +63 -0
- package/esm/models/errors/provideroverloadedresponseerror.d.ts +52 -0
- package/esm/models/errors/provideroverloadedresponseerror.js +63 -0
- package/esm/models/errors/requesttimeoutresponseerror.d.ts +52 -0
- package/esm/models/errors/requesttimeoutresponseerror.js +63 -0
- package/esm/models/errors/serviceunavailableresponseerror.d.ts +52 -0
- package/esm/models/errors/serviceunavailableresponseerror.js +63 -0
- package/esm/models/errors/toomanyrequestsresponseerror.d.ts +52 -0
- package/esm/models/errors/toomanyrequestsresponseerror.js +63 -0
- package/esm/models/errors/unauthorizedresponseerror.d.ts +52 -0
- package/esm/models/errors/unauthorizedresponseerror.js +63 -0
- package/esm/models/errors/unprocessableentityresponseerror.d.ts +52 -0
- package/esm/models/errors/unprocessableentityresponseerror.js +63 -0
- package/esm/models/forbiddenresponseerrordata.d.ts +40 -0
- package/esm/models/forbiddenresponseerrordata.js +35 -0
- package/esm/models/index.d.ts +37 -1
- package/esm/models/index.js +37 -1
- package/esm/models/inputmodality.d.ts +24 -0
- package/esm/models/inputmodality.js +34 -0
- package/esm/models/instructtype.d.ts +48 -0
- package/esm/models/instructtype.js +55 -0
- package/esm/models/internalserverresponseerrordata.d.ts +40 -0
- package/esm/models/internalserverresponseerrordata.js +35 -0
- package/esm/models/listendpointsresponse.d.ts +126 -2
- package/esm/models/listendpointsresponse.js +115 -2
- package/esm/models/model.d.ts +101 -0
- package/esm/models/model.js +82 -0
- package/esm/models/modelarchitecture.d.ts +104 -0
- package/esm/models/modelarchitecture.js +107 -0
- package/esm/models/modelgroup.d.ts +45 -0
- package/esm/models/modelgroup.js +53 -0
- package/esm/models/modelscountresponse.d.ts +40 -2
- package/esm/models/modelscountresponse.js +31 -2
- package/esm/models/modelslistresponse.d.ts +10 -2
- package/esm/models/modelslistresponse.js +7 -2
- package/esm/models/notfoundresponseerrordata.d.ts +40 -0
- package/esm/models/notfoundresponseerrordata.js +35 -0
- package/esm/models/openairesponsesincludable.d.ts +25 -0
- package/esm/models/openairesponsesincludable.js +35 -0
- package/esm/models/openairesponsesinputunion.d.ts +78 -78
- package/esm/models/openairesponsesinputunion.js +124 -126
- package/esm/models/openresponseseasyinputmessage.d.ts +246 -0
- package/esm/models/openresponseseasyinputmessage.js +283 -0
- package/esm/models/openresponsesfunctioncalloutput.d.ts +64 -0
- package/esm/models/openresponsesfunctioncalloutput.js +67 -0
- package/esm/models/openresponsesfunctiontoolcall.d.ts +66 -0
- package/esm/models/openresponsesfunctiontoolcall.js +69 -0
- package/esm/models/openresponsesinput.d.ts +60 -0
- package/esm/models/openresponsesinput.js +113 -0
- package/esm/models/openresponsesinputmessageitem.d.ts +193 -0
- package/esm/models/openresponsesinputmessageitem.js +210 -0
- package/esm/models/openresponsesnonstreamingresponse.d.ts +13 -13
- package/esm/models/openresponsesnonstreamingresponse.js +13 -13
- package/esm/models/openresponsesreasoning.d.ts +179 -0
- package/esm/models/openresponsesreasoning.js +194 -0
- package/esm/models/openresponsesreasoningconfig.d.ts +40 -0
- package/esm/models/openresponsesreasoningconfig.js +48 -0
- package/esm/models/openresponsesrequest.d.ts +736 -2
- package/esm/models/openresponsesrequest.js +789 -2
- package/esm/models/openresponsesresponsetext.d.ts +59 -0
- package/esm/models/openresponsesresponsetext.js +64 -0
- package/esm/models/operations/createapialpharesponses.d.ts +3 -3
- package/esm/models/operations/createapialpharesponses.js +0 -2
- package/esm/models/operations/getmodels.d.ts +2 -2
- package/esm/models/operations/getmodels.js +2 -10
- package/esm/models/operations/index.d.ts +0 -1
- package/esm/models/operations/index.js +0 -1
- package/esm/models/operations/listendpointszdr.d.ts +3 -24
- package/esm/models/operations/listendpointszdr.js +2 -29
- package/esm/models/operations/listmodelsuser.d.ts +0 -22
- package/esm/models/operations/listmodelsuser.js +0 -28
- package/esm/models/operations/listproviders.d.ts +0 -36
- package/esm/models/operations/listproviders.js +0 -28
- package/esm/models/outputmodality.d.ts +23 -0
- package/esm/models/outputmodality.js +33 -0
- package/esm/models/parameter.d.ts +43 -0
- package/esm/models/parameter.js +54 -0
- package/esm/models/payloadtoolargeresponseerrordata.d.ts +40 -0
- package/esm/models/payloadtoolargeresponseerrordata.js +35 -0
- package/esm/models/paymentrequiredresponseerrordata.d.ts +40 -0
- package/esm/models/paymentrequiredresponseerrordata.js +35 -0
- package/esm/models/perrequestlimits.d.ts +40 -0
- package/esm/models/perrequestlimits.js +44 -0
- package/esm/models/providername.d.ts +106 -0
- package/esm/models/providername.js +116 -0
- package/esm/models/provideroverloadedresponseerrordata.d.ts +40 -0
- package/esm/models/provideroverloadedresponseerrordata.js +35 -0
- package/esm/models/publicendpoint.d.ts +140 -2
- package/esm/models/publicendpoint.js +156 -2
- package/esm/models/publicpricing.d.ts +87 -0
- package/esm/models/publicpricing.js +73 -0
- package/esm/models/quantization.d.ts +29 -0
- package/esm/models/quantization.js +39 -0
- package/esm/models/requesttimeoutresponseerrordata.d.ts +40 -0
- package/esm/models/requesttimeoutresponseerrordata.js +35 -0
- package/esm/models/responseserrorfield.d.ts +10 -10
- package/esm/models/responseserrorfield.js +14 -14
- package/esm/models/responsetextconfig.d.ts +10 -10
- package/esm/models/responsetextconfig.js +14 -15
- package/esm/models/serviceunavailableresponseerrordata.d.ts +40 -0
- package/esm/models/serviceunavailableresponseerrordata.js +35 -0
- package/esm/models/toomanyrequestsresponseerrordata.d.ts +40 -0
- package/esm/models/toomanyrequestsresponseerrordata.js +35 -0
- package/esm/models/topproviderinfo.d.ts +45 -0
- package/esm/models/topproviderinfo.js +48 -0
- package/esm/models/unauthorizedresponseerrordata.d.ts +40 -0
- package/esm/models/unauthorizedresponseerrordata.js +35 -0
- package/esm/models/unprocessableentityresponseerrordata.d.ts +40 -0
- package/esm/models/unprocessableentityresponseerrordata.js +35 -0
- package/esm/react-query/modelsCount.d.ts +2 -2
- package/esm/react-query/modelsListForUser.d.ts +2 -1
- package/esm/sdk/models.d.ts +3 -2
- package/esm/sdk/responses.d.ts +7 -0
- package/esm/sdk/responses.js +0 -6
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/esm/models/errorresponse.d.ts +0 -155
- package/esm/models/errorresponse.js +0 -167
- package/esm/models/errors/errorresponse.d.ts +0 -46
- package/esm/models/errors/listproviders.d.ts +0 -49
- package/esm/models/errors/listproviders.js +0 -51
- package/esm/models/operations/listmodelscount.d.ts +0 -26
- package/esm/models/operations/listmodelscount.js +0 -34
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
6
|
import { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
7
|
-
export const
|
|
7
|
+
export const CodeEnum = {
|
|
8
8
|
ServerError: "server_error",
|
|
9
9
|
RateLimitExceeded: "rate_limit_exceeded",
|
|
10
10
|
InvalidPrompt: "invalid_prompt",
|
|
@@ -25,35 +25,35 @@ export const ResponsesErrorFieldCode = {
|
|
|
25
25
|
ImageFileNotFound: "image_file_not_found",
|
|
26
26
|
};
|
|
27
27
|
/** @internal */
|
|
28
|
-
export const
|
|
28
|
+
export const CodeEnum$inboundSchema = z
|
|
29
29
|
.union([
|
|
30
|
-
z.enum(
|
|
30
|
+
z.enum(CodeEnum),
|
|
31
31
|
z.string().transform(catchUnrecognizedEnum),
|
|
32
32
|
]);
|
|
33
33
|
/** @internal */
|
|
34
|
-
export const
|
|
35
|
-
z.enum(
|
|
34
|
+
export const CodeEnum$outboundSchema = z.union([
|
|
35
|
+
z.enum(CodeEnum),
|
|
36
36
|
z.string().and(z.custom()),
|
|
37
37
|
]);
|
|
38
38
|
/**
|
|
39
39
|
* @internal
|
|
40
40
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
41
41
|
*/
|
|
42
|
-
export var
|
|
43
|
-
(function (
|
|
44
|
-
/** @deprecated use `
|
|
45
|
-
|
|
46
|
-
/** @deprecated use `
|
|
47
|
-
|
|
48
|
-
})(
|
|
42
|
+
export var CodeEnum$;
|
|
43
|
+
(function (CodeEnum$) {
|
|
44
|
+
/** @deprecated use `CodeEnum$inboundSchema` instead. */
|
|
45
|
+
CodeEnum$.inboundSchema = CodeEnum$inboundSchema;
|
|
46
|
+
/** @deprecated use `CodeEnum$outboundSchema` instead. */
|
|
47
|
+
CodeEnum$.outboundSchema = CodeEnum$outboundSchema;
|
|
48
|
+
})(CodeEnum$ || (CodeEnum$ = {}));
|
|
49
49
|
/** @internal */
|
|
50
50
|
export const ResponsesErrorField$inboundSchema = z.object({
|
|
51
|
-
code:
|
|
51
|
+
code: CodeEnum$inboundSchema,
|
|
52
52
|
message: z.string(),
|
|
53
53
|
});
|
|
54
54
|
/** @internal */
|
|
55
55
|
export const ResponsesErrorField$outboundSchema = z.object({
|
|
56
|
-
code:
|
|
56
|
+
code: CodeEnum$outboundSchema,
|
|
57
57
|
message: z.string(),
|
|
58
58
|
});
|
|
59
59
|
/**
|
|
@@ -3,12 +3,12 @@ import { OpenEnum } from "../types/enums.js";
|
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
import { ResponseFormatTextConfig, ResponseFormatTextConfig$Outbound } from "./responseformattextconfig.js";
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const ResponseTextConfigVerbosity: {
|
|
7
7
|
readonly High: "high";
|
|
8
8
|
readonly Low: "low";
|
|
9
9
|
readonly Medium: "medium";
|
|
10
10
|
};
|
|
11
|
-
export type
|
|
11
|
+
export type ResponseTextConfigVerbosity = OpenEnum<typeof ResponseTextConfigVerbosity>;
|
|
12
12
|
/**
|
|
13
13
|
* Text output configuration including format and verbosity
|
|
14
14
|
*/
|
|
@@ -17,21 +17,21 @@ export type ResponseTextConfig = {
|
|
|
17
17
|
* Text response format configuration
|
|
18
18
|
*/
|
|
19
19
|
format?: ResponseFormatTextConfig | undefined;
|
|
20
|
-
verbosity?:
|
|
20
|
+
verbosity?: ResponseTextConfigVerbosity | null | undefined;
|
|
21
21
|
};
|
|
22
22
|
/** @internal */
|
|
23
|
-
export declare const
|
|
23
|
+
export declare const ResponseTextConfigVerbosity$inboundSchema: z.ZodType<ResponseTextConfigVerbosity, unknown>;
|
|
24
24
|
/** @internal */
|
|
25
|
-
export declare const
|
|
25
|
+
export declare const ResponseTextConfigVerbosity$outboundSchema: z.ZodType<ResponseTextConfigVerbosity, ResponseTextConfigVerbosity>;
|
|
26
26
|
/**
|
|
27
27
|
* @internal
|
|
28
28
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
29
29
|
*/
|
|
30
|
-
export declare namespace
|
|
31
|
-
/** @deprecated use `
|
|
32
|
-
const inboundSchema: z.ZodType<
|
|
33
|
-
/** @deprecated use `
|
|
34
|
-
const outboundSchema: z.ZodType<
|
|
30
|
+
export declare namespace ResponseTextConfigVerbosity$ {
|
|
31
|
+
/** @deprecated use `ResponseTextConfigVerbosity$inboundSchema` instead. */
|
|
32
|
+
const inboundSchema: z.ZodType<ResponseTextConfigVerbosity, unknown, z.core.$ZodTypeInternals<ResponseTextConfigVerbosity, unknown>>;
|
|
33
|
+
/** @deprecated use `ResponseTextConfigVerbosity$outboundSchema` instead. */
|
|
34
|
+
const outboundSchema: z.ZodType<ResponseTextConfigVerbosity, ResponseTextConfigVerbosity, z.core.$ZodTypeInternals<ResponseTextConfigVerbosity, ResponseTextConfigVerbosity>>;
|
|
35
35
|
}
|
|
36
36
|
/** @internal */
|
|
37
37
|
export declare const ResponseTextConfig$inboundSchema: z.ZodType<ResponseTextConfig, unknown>;
|
|
@@ -5,43 +5,42 @@ import * as z from "zod/v4";
|
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
6
|
import { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
7
7
|
import { ResponseFormatTextConfig$inboundSchema, ResponseFormatTextConfig$outboundSchema, } from "./responseformattextconfig.js";
|
|
8
|
-
export const
|
|
8
|
+
export const ResponseTextConfigVerbosity = {
|
|
9
9
|
High: "high",
|
|
10
10
|
Low: "low",
|
|
11
11
|
Medium: "medium",
|
|
12
12
|
};
|
|
13
13
|
/** @internal */
|
|
14
|
-
export const
|
|
14
|
+
export const ResponseTextConfigVerbosity$inboundSchema = z
|
|
15
15
|
.union([
|
|
16
|
-
z.enum(
|
|
16
|
+
z.enum(ResponseTextConfigVerbosity),
|
|
17
17
|
z.string().transform(catchUnrecognizedEnum),
|
|
18
18
|
]);
|
|
19
19
|
/** @internal */
|
|
20
|
-
export const
|
|
21
|
-
.
|
|
22
|
-
z.enum(Verbosity),
|
|
20
|
+
export const ResponseTextConfigVerbosity$outboundSchema = z.union([
|
|
21
|
+
z.enum(ResponseTextConfigVerbosity),
|
|
23
22
|
z.string().and(z.custom()),
|
|
24
23
|
]);
|
|
25
24
|
/**
|
|
26
25
|
* @internal
|
|
27
26
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
28
27
|
*/
|
|
29
|
-
export var
|
|
30
|
-
(function (
|
|
31
|
-
/** @deprecated use `
|
|
32
|
-
|
|
33
|
-
/** @deprecated use `
|
|
34
|
-
|
|
35
|
-
})(
|
|
28
|
+
export var ResponseTextConfigVerbosity$;
|
|
29
|
+
(function (ResponseTextConfigVerbosity$) {
|
|
30
|
+
/** @deprecated use `ResponseTextConfigVerbosity$inboundSchema` instead. */
|
|
31
|
+
ResponseTextConfigVerbosity$.inboundSchema = ResponseTextConfigVerbosity$inboundSchema;
|
|
32
|
+
/** @deprecated use `ResponseTextConfigVerbosity$outboundSchema` instead. */
|
|
33
|
+
ResponseTextConfigVerbosity$.outboundSchema = ResponseTextConfigVerbosity$outboundSchema;
|
|
34
|
+
})(ResponseTextConfigVerbosity$ || (ResponseTextConfigVerbosity$ = {}));
|
|
36
35
|
/** @internal */
|
|
37
36
|
export const ResponseTextConfig$inboundSchema = z.object({
|
|
38
37
|
format: ResponseFormatTextConfig$inboundSchema.optional(),
|
|
39
|
-
verbosity: z.nullable(
|
|
38
|
+
verbosity: z.nullable(ResponseTextConfigVerbosity$inboundSchema).optional(),
|
|
40
39
|
});
|
|
41
40
|
/** @internal */
|
|
42
41
|
export const ResponseTextConfig$outboundSchema = z.object({
|
|
43
42
|
format: ResponseFormatTextConfig$outboundSchema.optional(),
|
|
44
|
-
verbosity: z.nullable(
|
|
43
|
+
verbosity: z.nullable(ResponseTextConfigVerbosity$outboundSchema).optional(),
|
|
45
44
|
});
|
|
46
45
|
/**
|
|
47
46
|
* @internal
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Error data for ServiceUnavailableResponse
|
|
6
|
+
*/
|
|
7
|
+
export type ServiceUnavailableResponseErrorData = {
|
|
8
|
+
code: number;
|
|
9
|
+
message: string;
|
|
10
|
+
metadata?: {
|
|
11
|
+
[k: string]: any | null;
|
|
12
|
+
} | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const ServiceUnavailableResponseErrorData$inboundSchema: z.ZodType<ServiceUnavailableResponseErrorData, unknown>;
|
|
16
|
+
/** @internal */
|
|
17
|
+
export type ServiceUnavailableResponseErrorData$Outbound = {
|
|
18
|
+
code: number;
|
|
19
|
+
message: string;
|
|
20
|
+
metadata?: {
|
|
21
|
+
[k: string]: any | null;
|
|
22
|
+
} | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const ServiceUnavailableResponseErrorData$outboundSchema: z.ZodType<ServiceUnavailableResponseErrorData$Outbound, ServiceUnavailableResponseErrorData>;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
29
|
+
*/
|
|
30
|
+
export declare namespace ServiceUnavailableResponseErrorData$ {
|
|
31
|
+
/** @deprecated use `ServiceUnavailableResponseErrorData$inboundSchema` instead. */
|
|
32
|
+
const inboundSchema: z.ZodType<ServiceUnavailableResponseErrorData, unknown, z.core.$ZodTypeInternals<ServiceUnavailableResponseErrorData, unknown>>;
|
|
33
|
+
/** @deprecated use `ServiceUnavailableResponseErrorData$outboundSchema` instead. */
|
|
34
|
+
const outboundSchema: z.ZodType<ServiceUnavailableResponseErrorData$Outbound, ServiceUnavailableResponseErrorData, z.core.$ZodTypeInternals<ServiceUnavailableResponseErrorData$Outbound, ServiceUnavailableResponseErrorData>>;
|
|
35
|
+
/** @deprecated use `ServiceUnavailableResponseErrorData$Outbound` instead. */
|
|
36
|
+
type Outbound = ServiceUnavailableResponseErrorData$Outbound;
|
|
37
|
+
}
|
|
38
|
+
export declare function serviceUnavailableResponseErrorDataToJSON(serviceUnavailableResponseErrorData: ServiceUnavailableResponseErrorData): string;
|
|
39
|
+
export declare function serviceUnavailableResponseErrorDataFromJSON(jsonString: string): SafeParseResult<ServiceUnavailableResponseErrorData, SDKValidationError>;
|
|
40
|
+
//# sourceMappingURL=serviceunavailableresponseerrordata.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const ServiceUnavailableResponseErrorData$inboundSchema = z.object({
|
|
8
|
+
code: z.number().int(),
|
|
9
|
+
message: z.string(),
|
|
10
|
+
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
11
|
+
});
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ServiceUnavailableResponseErrorData$outboundSchema = z.object({
|
|
14
|
+
code: z.number().int(),
|
|
15
|
+
message: z.string(),
|
|
16
|
+
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
|
+
*/
|
|
22
|
+
export var ServiceUnavailableResponseErrorData$;
|
|
23
|
+
(function (ServiceUnavailableResponseErrorData$) {
|
|
24
|
+
/** @deprecated use `ServiceUnavailableResponseErrorData$inboundSchema` instead. */
|
|
25
|
+
ServiceUnavailableResponseErrorData$.inboundSchema = ServiceUnavailableResponseErrorData$inboundSchema;
|
|
26
|
+
/** @deprecated use `ServiceUnavailableResponseErrorData$outboundSchema` instead. */
|
|
27
|
+
ServiceUnavailableResponseErrorData$.outboundSchema = ServiceUnavailableResponseErrorData$outboundSchema;
|
|
28
|
+
})(ServiceUnavailableResponseErrorData$ || (ServiceUnavailableResponseErrorData$ = {}));
|
|
29
|
+
export function serviceUnavailableResponseErrorDataToJSON(serviceUnavailableResponseErrorData) {
|
|
30
|
+
return JSON.stringify(ServiceUnavailableResponseErrorData$outboundSchema.parse(serviceUnavailableResponseErrorData));
|
|
31
|
+
}
|
|
32
|
+
export function serviceUnavailableResponseErrorDataFromJSON(jsonString) {
|
|
33
|
+
return safeParse(jsonString, (x) => ServiceUnavailableResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ServiceUnavailableResponseErrorData' from JSON`);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=serviceunavailableresponseerrordata.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Error data for TooManyRequestsResponse
|
|
6
|
+
*/
|
|
7
|
+
export type TooManyRequestsResponseErrorData = {
|
|
8
|
+
code: number;
|
|
9
|
+
message: string;
|
|
10
|
+
metadata?: {
|
|
11
|
+
[k: string]: any | null;
|
|
12
|
+
} | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const TooManyRequestsResponseErrorData$inboundSchema: z.ZodType<TooManyRequestsResponseErrorData, unknown>;
|
|
16
|
+
/** @internal */
|
|
17
|
+
export type TooManyRequestsResponseErrorData$Outbound = {
|
|
18
|
+
code: number;
|
|
19
|
+
message: string;
|
|
20
|
+
metadata?: {
|
|
21
|
+
[k: string]: any | null;
|
|
22
|
+
} | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const TooManyRequestsResponseErrorData$outboundSchema: z.ZodType<TooManyRequestsResponseErrorData$Outbound, TooManyRequestsResponseErrorData>;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
29
|
+
*/
|
|
30
|
+
export declare namespace TooManyRequestsResponseErrorData$ {
|
|
31
|
+
/** @deprecated use `TooManyRequestsResponseErrorData$inboundSchema` instead. */
|
|
32
|
+
const inboundSchema: z.ZodType<TooManyRequestsResponseErrorData, unknown, z.core.$ZodTypeInternals<TooManyRequestsResponseErrorData, unknown>>;
|
|
33
|
+
/** @deprecated use `TooManyRequestsResponseErrorData$outboundSchema` instead. */
|
|
34
|
+
const outboundSchema: z.ZodType<TooManyRequestsResponseErrorData$Outbound, TooManyRequestsResponseErrorData, z.core.$ZodTypeInternals<TooManyRequestsResponseErrorData$Outbound, TooManyRequestsResponseErrorData>>;
|
|
35
|
+
/** @deprecated use `TooManyRequestsResponseErrorData$Outbound` instead. */
|
|
36
|
+
type Outbound = TooManyRequestsResponseErrorData$Outbound;
|
|
37
|
+
}
|
|
38
|
+
export declare function tooManyRequestsResponseErrorDataToJSON(tooManyRequestsResponseErrorData: TooManyRequestsResponseErrorData): string;
|
|
39
|
+
export declare function tooManyRequestsResponseErrorDataFromJSON(jsonString: string): SafeParseResult<TooManyRequestsResponseErrorData, SDKValidationError>;
|
|
40
|
+
//# sourceMappingURL=toomanyrequestsresponseerrordata.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const TooManyRequestsResponseErrorData$inboundSchema = z.object({
|
|
8
|
+
code: z.number().int(),
|
|
9
|
+
message: z.string(),
|
|
10
|
+
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
11
|
+
});
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const TooManyRequestsResponseErrorData$outboundSchema = z.object({
|
|
14
|
+
code: z.number().int(),
|
|
15
|
+
message: z.string(),
|
|
16
|
+
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
|
+
*/
|
|
22
|
+
export var TooManyRequestsResponseErrorData$;
|
|
23
|
+
(function (TooManyRequestsResponseErrorData$) {
|
|
24
|
+
/** @deprecated use `TooManyRequestsResponseErrorData$inboundSchema` instead. */
|
|
25
|
+
TooManyRequestsResponseErrorData$.inboundSchema = TooManyRequestsResponseErrorData$inboundSchema;
|
|
26
|
+
/** @deprecated use `TooManyRequestsResponseErrorData$outboundSchema` instead. */
|
|
27
|
+
TooManyRequestsResponseErrorData$.outboundSchema = TooManyRequestsResponseErrorData$outboundSchema;
|
|
28
|
+
})(TooManyRequestsResponseErrorData$ || (TooManyRequestsResponseErrorData$ = {}));
|
|
29
|
+
export function tooManyRequestsResponseErrorDataToJSON(tooManyRequestsResponseErrorData) {
|
|
30
|
+
return JSON.stringify(TooManyRequestsResponseErrorData$outboundSchema.parse(tooManyRequestsResponseErrorData));
|
|
31
|
+
}
|
|
32
|
+
export function tooManyRequestsResponseErrorDataFromJSON(jsonString) {
|
|
33
|
+
return safeParse(jsonString, (x) => TooManyRequestsResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TooManyRequestsResponseErrorData' from JSON`);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=toomanyrequestsresponseerrordata.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Information about the top provider for this model
|
|
6
|
+
*/
|
|
7
|
+
export type TopProviderInfo = {
|
|
8
|
+
/**
|
|
9
|
+
* Context length from the top provider
|
|
10
|
+
*/
|
|
11
|
+
contextLength?: number | null | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Maximum completion tokens from the top provider
|
|
14
|
+
*/
|
|
15
|
+
maxCompletionTokens?: number | null | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the top provider moderates content
|
|
18
|
+
*/
|
|
19
|
+
isModerated: boolean;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const TopProviderInfo$inboundSchema: z.ZodType<TopProviderInfo, unknown>;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type TopProviderInfo$Outbound = {
|
|
25
|
+
context_length?: number | null | undefined;
|
|
26
|
+
max_completion_tokens?: number | null | undefined;
|
|
27
|
+
is_moderated: boolean;
|
|
28
|
+
};
|
|
29
|
+
/** @internal */
|
|
30
|
+
export declare const TopProviderInfo$outboundSchema: z.ZodType<TopProviderInfo$Outbound, TopProviderInfo>;
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
34
|
+
*/
|
|
35
|
+
export declare namespace TopProviderInfo$ {
|
|
36
|
+
/** @deprecated use `TopProviderInfo$inboundSchema` instead. */
|
|
37
|
+
const inboundSchema: z.ZodType<TopProviderInfo, unknown, z.core.$ZodTypeInternals<TopProviderInfo, unknown>>;
|
|
38
|
+
/** @deprecated use `TopProviderInfo$outboundSchema` instead. */
|
|
39
|
+
const outboundSchema: z.ZodType<TopProviderInfo$Outbound, TopProviderInfo, z.core.$ZodTypeInternals<TopProviderInfo$Outbound, TopProviderInfo>>;
|
|
40
|
+
/** @deprecated use `TopProviderInfo$Outbound` instead. */
|
|
41
|
+
type Outbound = TopProviderInfo$Outbound;
|
|
42
|
+
}
|
|
43
|
+
export declare function topProviderInfoToJSON(topProviderInfo: TopProviderInfo): string;
|
|
44
|
+
export declare function topProviderInfoFromJSON(jsonString: string): SafeParseResult<TopProviderInfo, SDKValidationError>;
|
|
45
|
+
//# sourceMappingURL=topproviderinfo.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const TopProviderInfo$inboundSchema = z.object({
|
|
9
|
+
context_length: z.nullable(z.number()).optional(),
|
|
10
|
+
max_completion_tokens: z.nullable(z.number()).optional(),
|
|
11
|
+
is_moderated: z.boolean(),
|
|
12
|
+
}).transform((v) => {
|
|
13
|
+
return remap$(v, {
|
|
14
|
+
"context_length": "contextLength",
|
|
15
|
+
"max_completion_tokens": "maxCompletionTokens",
|
|
16
|
+
"is_moderated": "isModerated",
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const TopProviderInfo$outboundSchema = z.object({
|
|
21
|
+
contextLength: z.nullable(z.number()).optional(),
|
|
22
|
+
maxCompletionTokens: z.nullable(z.number()).optional(),
|
|
23
|
+
isModerated: z.boolean(),
|
|
24
|
+
}).transform((v) => {
|
|
25
|
+
return remap$(v, {
|
|
26
|
+
contextLength: "context_length",
|
|
27
|
+
maxCompletionTokens: "max_completion_tokens",
|
|
28
|
+
isModerated: "is_moderated",
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
34
|
+
*/
|
|
35
|
+
export var TopProviderInfo$;
|
|
36
|
+
(function (TopProviderInfo$) {
|
|
37
|
+
/** @deprecated use `TopProviderInfo$inboundSchema` instead. */
|
|
38
|
+
TopProviderInfo$.inboundSchema = TopProviderInfo$inboundSchema;
|
|
39
|
+
/** @deprecated use `TopProviderInfo$outboundSchema` instead. */
|
|
40
|
+
TopProviderInfo$.outboundSchema = TopProviderInfo$outboundSchema;
|
|
41
|
+
})(TopProviderInfo$ || (TopProviderInfo$ = {}));
|
|
42
|
+
export function topProviderInfoToJSON(topProviderInfo) {
|
|
43
|
+
return JSON.stringify(TopProviderInfo$outboundSchema.parse(topProviderInfo));
|
|
44
|
+
}
|
|
45
|
+
export function topProviderInfoFromJSON(jsonString) {
|
|
46
|
+
return safeParse(jsonString, (x) => TopProviderInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TopProviderInfo' from JSON`);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=topproviderinfo.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Error data for UnauthorizedResponse
|
|
6
|
+
*/
|
|
7
|
+
export type UnauthorizedResponseErrorData = {
|
|
8
|
+
code: number;
|
|
9
|
+
message: string;
|
|
10
|
+
metadata?: {
|
|
11
|
+
[k: string]: any | null;
|
|
12
|
+
} | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const UnauthorizedResponseErrorData$inboundSchema: z.ZodType<UnauthorizedResponseErrorData, unknown>;
|
|
16
|
+
/** @internal */
|
|
17
|
+
export type UnauthorizedResponseErrorData$Outbound = {
|
|
18
|
+
code: number;
|
|
19
|
+
message: string;
|
|
20
|
+
metadata?: {
|
|
21
|
+
[k: string]: any | null;
|
|
22
|
+
} | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const UnauthorizedResponseErrorData$outboundSchema: z.ZodType<UnauthorizedResponseErrorData$Outbound, UnauthorizedResponseErrorData>;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
29
|
+
*/
|
|
30
|
+
export declare namespace UnauthorizedResponseErrorData$ {
|
|
31
|
+
/** @deprecated use `UnauthorizedResponseErrorData$inboundSchema` instead. */
|
|
32
|
+
const inboundSchema: z.ZodType<UnauthorizedResponseErrorData, unknown, z.core.$ZodTypeInternals<UnauthorizedResponseErrorData, unknown>>;
|
|
33
|
+
/** @deprecated use `UnauthorizedResponseErrorData$outboundSchema` instead. */
|
|
34
|
+
const outboundSchema: z.ZodType<UnauthorizedResponseErrorData$Outbound, UnauthorizedResponseErrorData, z.core.$ZodTypeInternals<UnauthorizedResponseErrorData$Outbound, UnauthorizedResponseErrorData>>;
|
|
35
|
+
/** @deprecated use `UnauthorizedResponseErrorData$Outbound` instead. */
|
|
36
|
+
type Outbound = UnauthorizedResponseErrorData$Outbound;
|
|
37
|
+
}
|
|
38
|
+
export declare function unauthorizedResponseErrorDataToJSON(unauthorizedResponseErrorData: UnauthorizedResponseErrorData): string;
|
|
39
|
+
export declare function unauthorizedResponseErrorDataFromJSON(jsonString: string): SafeParseResult<UnauthorizedResponseErrorData, SDKValidationError>;
|
|
40
|
+
//# sourceMappingURL=unauthorizedresponseerrordata.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const UnauthorizedResponseErrorData$inboundSchema = z.object({
|
|
8
|
+
code: z.number().int(),
|
|
9
|
+
message: z.string(),
|
|
10
|
+
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
11
|
+
});
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const UnauthorizedResponseErrorData$outboundSchema = z.object({
|
|
14
|
+
code: z.number().int(),
|
|
15
|
+
message: z.string(),
|
|
16
|
+
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
|
+
*/
|
|
22
|
+
export var UnauthorizedResponseErrorData$;
|
|
23
|
+
(function (UnauthorizedResponseErrorData$) {
|
|
24
|
+
/** @deprecated use `UnauthorizedResponseErrorData$inboundSchema` instead. */
|
|
25
|
+
UnauthorizedResponseErrorData$.inboundSchema = UnauthorizedResponseErrorData$inboundSchema;
|
|
26
|
+
/** @deprecated use `UnauthorizedResponseErrorData$outboundSchema` instead. */
|
|
27
|
+
UnauthorizedResponseErrorData$.outboundSchema = UnauthorizedResponseErrorData$outboundSchema;
|
|
28
|
+
})(UnauthorizedResponseErrorData$ || (UnauthorizedResponseErrorData$ = {}));
|
|
29
|
+
export function unauthorizedResponseErrorDataToJSON(unauthorizedResponseErrorData) {
|
|
30
|
+
return JSON.stringify(UnauthorizedResponseErrorData$outboundSchema.parse(unauthorizedResponseErrorData));
|
|
31
|
+
}
|
|
32
|
+
export function unauthorizedResponseErrorDataFromJSON(jsonString) {
|
|
33
|
+
return safeParse(jsonString, (x) => UnauthorizedResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UnauthorizedResponseErrorData' from JSON`);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=unauthorizedresponseerrordata.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Error data for UnprocessableEntityResponse
|
|
6
|
+
*/
|
|
7
|
+
export type UnprocessableEntityResponseErrorData = {
|
|
8
|
+
code: number;
|
|
9
|
+
message: string;
|
|
10
|
+
metadata?: {
|
|
11
|
+
[k: string]: any | null;
|
|
12
|
+
} | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const UnprocessableEntityResponseErrorData$inboundSchema: z.ZodType<UnprocessableEntityResponseErrorData, unknown>;
|
|
16
|
+
/** @internal */
|
|
17
|
+
export type UnprocessableEntityResponseErrorData$Outbound = {
|
|
18
|
+
code: number;
|
|
19
|
+
message: string;
|
|
20
|
+
metadata?: {
|
|
21
|
+
[k: string]: any | null;
|
|
22
|
+
} | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const UnprocessableEntityResponseErrorData$outboundSchema: z.ZodType<UnprocessableEntityResponseErrorData$Outbound, UnprocessableEntityResponseErrorData>;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
29
|
+
*/
|
|
30
|
+
export declare namespace UnprocessableEntityResponseErrorData$ {
|
|
31
|
+
/** @deprecated use `UnprocessableEntityResponseErrorData$inboundSchema` instead. */
|
|
32
|
+
const inboundSchema: z.ZodType<UnprocessableEntityResponseErrorData, unknown, z.core.$ZodTypeInternals<UnprocessableEntityResponseErrorData, unknown>>;
|
|
33
|
+
/** @deprecated use `UnprocessableEntityResponseErrorData$outboundSchema` instead. */
|
|
34
|
+
const outboundSchema: z.ZodType<UnprocessableEntityResponseErrorData$Outbound, UnprocessableEntityResponseErrorData, z.core.$ZodTypeInternals<UnprocessableEntityResponseErrorData$Outbound, UnprocessableEntityResponseErrorData>>;
|
|
35
|
+
/** @deprecated use `UnprocessableEntityResponseErrorData$Outbound` instead. */
|
|
36
|
+
type Outbound = UnprocessableEntityResponseErrorData$Outbound;
|
|
37
|
+
}
|
|
38
|
+
export declare function unprocessableEntityResponseErrorDataToJSON(unprocessableEntityResponseErrorData: UnprocessableEntityResponseErrorData): string;
|
|
39
|
+
export declare function unprocessableEntityResponseErrorDataFromJSON(jsonString: string): SafeParseResult<UnprocessableEntityResponseErrorData, SDKValidationError>;
|
|
40
|
+
//# sourceMappingURL=unprocessableentityresponseerrordata.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const UnprocessableEntityResponseErrorData$inboundSchema = z.object({
|
|
8
|
+
code: z.number().int(),
|
|
9
|
+
message: z.string(),
|
|
10
|
+
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
11
|
+
});
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const UnprocessableEntityResponseErrorData$outboundSchema = z.object({
|
|
14
|
+
code: z.number().int(),
|
|
15
|
+
message: z.string(),
|
|
16
|
+
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
|
+
*/
|
|
22
|
+
export var UnprocessableEntityResponseErrorData$;
|
|
23
|
+
(function (UnprocessableEntityResponseErrorData$) {
|
|
24
|
+
/** @deprecated use `UnprocessableEntityResponseErrorData$inboundSchema` instead. */
|
|
25
|
+
UnprocessableEntityResponseErrorData$.inboundSchema = UnprocessableEntityResponseErrorData$inboundSchema;
|
|
26
|
+
/** @deprecated use `UnprocessableEntityResponseErrorData$outboundSchema` instead. */
|
|
27
|
+
UnprocessableEntityResponseErrorData$.outboundSchema = UnprocessableEntityResponseErrorData$outboundSchema;
|
|
28
|
+
})(UnprocessableEntityResponseErrorData$ || (UnprocessableEntityResponseErrorData$ = {}));
|
|
29
|
+
export function unprocessableEntityResponseErrorDataToJSON(unprocessableEntityResponseErrorData) {
|
|
30
|
+
return JSON.stringify(UnprocessableEntityResponseErrorData$outboundSchema.parse(unprocessableEntityResponseErrorData));
|
|
31
|
+
}
|
|
32
|
+
export function unprocessableEntityResponseErrorDataFromJSON(jsonString) {
|
|
33
|
+
return safeParse(jsonString, (x) => UnprocessableEntityResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UnprocessableEntityResponseErrorData' from JSON`);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=unprocessableentityresponseerrordata.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { InvalidateQueryFilters, QueryClient, QueryFunctionContext, QueryKey, UseQueryResult, UseSuspenseQueryResult } from "@tanstack/react-query";
|
|
2
2
|
import { OpenRouterCore } from "../core.js";
|
|
3
3
|
import { RequestOptions } from "../lib/sdks.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as models from "../models/index.js";
|
|
5
5
|
import { QueryHookOptions, SuspenseQueryHookOptions } from "./_types.js";
|
|
6
|
-
export type ModelsCountQueryData =
|
|
6
|
+
export type ModelsCountQueryData = models.ModelsCountResponse;
|
|
7
7
|
/**
|
|
8
8
|
* Get total count of available models
|
|
9
9
|
*/
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { InvalidateQueryFilters, QueryClient, QueryFunctionContext, QueryKey, UseQueryResult, UseSuspenseQueryResult } from "@tanstack/react-query";
|
|
2
2
|
import { OpenRouterCore } from "../core.js";
|
|
3
3
|
import { RequestOptions } from "../lib/sdks.js";
|
|
4
|
+
import * as models from "../models/index.js";
|
|
4
5
|
import * as operations from "../models/operations/index.js";
|
|
5
6
|
import { QueryHookOptions, SuspenseQueryHookOptions } from "./_types.js";
|
|
6
|
-
export type ModelsListForUserQueryData =
|
|
7
|
+
export type ModelsListForUserQueryData = models.ModelsListResponse;
|
|
7
8
|
/**
|
|
8
9
|
* List models filtered by user provider preferences
|
|
9
10
|
*/
|
package/esm/sdk/models.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
+
import * as models from "../models/index.js";
|
|
2
3
|
import * as operations from "../models/operations/index.js";
|
|
3
4
|
export declare class Models extends ClientSDK {
|
|
4
5
|
/**
|
|
5
6
|
* Get total count of available models
|
|
6
7
|
*/
|
|
7
|
-
count(options?: RequestOptions): Promise<
|
|
8
|
+
count(options?: RequestOptions): Promise<models.ModelsCountResponse>;
|
|
8
9
|
/**
|
|
9
10
|
* List all models and their properties
|
|
10
11
|
*/
|
|
@@ -12,6 +13,6 @@ export declare class Models extends ClientSDK {
|
|
|
12
13
|
/**
|
|
13
14
|
* List models filtered by user provider preferences
|
|
14
15
|
*/
|
|
15
|
-
listForUser(security: operations.ListModelsUserSecurity, options?: RequestOptions): Promise<
|
|
16
|
+
listForUser(security: operations.ListModelsUserSecurity, options?: RequestOptions): Promise<models.ModelsListResponse>;
|
|
16
17
|
}
|
|
17
18
|
//# sourceMappingURL=models.d.ts.map
|
package/esm/sdk/responses.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventStream } from "../lib/event-streams.js";
|
|
1
2
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
3
|
import * as models from "../models/index.js";
|
|
3
4
|
import * as operations from "../models/operations/index.js";
|
|
@@ -8,6 +9,12 @@ export declare class Responses extends ClientSDK {
|
|
|
8
9
|
* @remarks
|
|
9
10
|
* Creates a streaming or non-streaming response using OpenResponses API format
|
|
10
11
|
*/
|
|
12
|
+
send(request: models.OpenResponsesRequest & {
|
|
13
|
+
stream?: false | undefined;
|
|
14
|
+
}, options?: RequestOptions): Promise<models.OpenResponsesNonStreamingResponse>;
|
|
15
|
+
send(request: models.OpenResponsesRequest & {
|
|
16
|
+
stream: true;
|
|
17
|
+
}, options?: RequestOptions): Promise<EventStream<operations.CreateApiAlphaResponsesResponseBody>>;
|
|
11
18
|
send(request: models.OpenResponsesRequest, options?: RequestOptions): Promise<operations.CreateApiAlphaResponsesResponse>;
|
|
12
19
|
}
|
|
13
20
|
//# sourceMappingURL=responses.d.ts.map
|
package/esm/sdk/responses.js
CHANGED
|
@@ -5,12 +5,6 @@ import { betaResponsesSend } from "../funcs/betaResponsesSend.js";
|
|
|
5
5
|
import { ClientSDK } from "../lib/sdks.js";
|
|
6
6
|
import { unwrapAsync } from "../types/fp.js";
|
|
7
7
|
export class Responses extends ClientSDK {
|
|
8
|
-
/**
|
|
9
|
-
* Create a response
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
* Creates a streaming or non-streaming response using OpenResponses API format
|
|
13
|
-
*/
|
|
14
8
|
async send(request, options) {
|
|
15
9
|
return unwrapAsync(betaResponsesSend(this, request, options));
|
|
16
10
|
}
|