@openrouter/sdk 0.0.1-beta.10 → 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/chatSend.d.ts +7 -0
- package/esm/funcs/chatSend.js +1 -7
- 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 +3 -3
- package/esm/lib/config.js +3 -3
- 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/chatgenerationparams.d.ts +2 -2
- package/esm/models/chatgenerationparams.js +2 -2
- 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/completioncreateparams.d.ts +2 -2
- package/esm/models/completioncreateparams.js +2 -2
- 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/chat.d.ts +7 -0
- package/esm/sdk/chat.js +0 -6
- 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/vitest.config.ts +11 -0
- 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
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
|
}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/vitest.config.ts
ADDED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { OpenEnum } from "../types/enums.js";
|
|
3
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
-
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
-
export declare const ErrorResponseCode: {
|
|
6
|
-
readonly OneHundred: 100;
|
|
7
|
-
readonly OneHundredAndOne: 101;
|
|
8
|
-
readonly OneHundredAndTwo: 102;
|
|
9
|
-
readonly TwoHundred: 200;
|
|
10
|
-
readonly TwoHundredAndOne: 201;
|
|
11
|
-
readonly TwoHundredAndTwo: 202;
|
|
12
|
-
readonly TwoHundredAndThree: 203;
|
|
13
|
-
readonly TwoHundredAndFour: 204;
|
|
14
|
-
readonly TwoHundredAndFive: 205;
|
|
15
|
-
readonly TwoHundredAndSix: 206;
|
|
16
|
-
readonly TwoHundredAndSeven: 207;
|
|
17
|
-
readonly TwoHundredAndEight: 208;
|
|
18
|
-
readonly ThreeHundred: 300;
|
|
19
|
-
readonly ThreeHundredAndOne: 301;
|
|
20
|
-
readonly ThreeHundredAndTwo: 302;
|
|
21
|
-
readonly ThreeHundredAndThree: 303;
|
|
22
|
-
readonly ThreeHundredAndFour: 304;
|
|
23
|
-
readonly ThreeHundredAndFive: 305;
|
|
24
|
-
readonly ThreeHundredAndSeven: 307;
|
|
25
|
-
readonly ThreeHundredAndEight: 308;
|
|
26
|
-
readonly FourHundred: 400;
|
|
27
|
-
readonly FourHundredAndOne: 401;
|
|
28
|
-
readonly FourHundredAndTwo: 402;
|
|
29
|
-
readonly FourHundredAndThree: 403;
|
|
30
|
-
readonly FourHundredAndFour: 404;
|
|
31
|
-
readonly FourHundredAndFive: 405;
|
|
32
|
-
readonly FourHundredAndSix: 406;
|
|
33
|
-
readonly FourHundredAndSeven: 407;
|
|
34
|
-
readonly FourHundredAndEight: 408;
|
|
35
|
-
readonly FourHundredAndNine: 409;
|
|
36
|
-
readonly FourHundredAndTen: 410;
|
|
37
|
-
readonly FourHundredAndEleven: 411;
|
|
38
|
-
readonly FourHundredAndTwelve: 412;
|
|
39
|
-
readonly FourHundredAndThirteen: 413;
|
|
40
|
-
readonly FourHundredAndFourteen: 414;
|
|
41
|
-
readonly FourHundredAndFifteen: 415;
|
|
42
|
-
readonly FourHundredAndSixteen: 416;
|
|
43
|
-
readonly FourHundredAndSeventeen: 417;
|
|
44
|
-
readonly FourHundredAndEighteen: 418;
|
|
45
|
-
readonly FourHundredAndTwentyTwo: 422;
|
|
46
|
-
readonly FourHundredAndTwentyThree: 423;
|
|
47
|
-
readonly FourHundredAndTwentyFour: 424;
|
|
48
|
-
readonly FourHundredAndTwentyFive: 425;
|
|
49
|
-
readonly FourHundredAndTwentySix: 426;
|
|
50
|
-
readonly FourHundredAndTwentyEight: 428;
|
|
51
|
-
readonly FourHundredAndTwentyNine: 429;
|
|
52
|
-
readonly FourHundredAndThirtyOne: 431;
|
|
53
|
-
readonly FourHundredAndFiftyOne: 451;
|
|
54
|
-
readonly FourHundredAndNinetyEight: 498;
|
|
55
|
-
readonly FourHundredAndNinetyNine: 499;
|
|
56
|
-
readonly FiveHundred: 500;
|
|
57
|
-
readonly FiveHundredAndOne: 501;
|
|
58
|
-
readonly FiveHundredAndTwo: 502;
|
|
59
|
-
readonly FiveHundredAndThree: 503;
|
|
60
|
-
readonly FiveHundredAndFour: 504;
|
|
61
|
-
readonly FiveHundredAndFive: 505;
|
|
62
|
-
readonly FiveHundredAndSix: 506;
|
|
63
|
-
readonly FiveHundredAndSeven: 507;
|
|
64
|
-
readonly FiveHundredAndEight: 508;
|
|
65
|
-
readonly FiveHundredAndTen: 510;
|
|
66
|
-
readonly FiveHundredAndEleven: 511;
|
|
67
|
-
readonly FiveHundredAndTwenty: 520;
|
|
68
|
-
readonly FiveHundredAndTwentyOne: 521;
|
|
69
|
-
readonly FiveHundredAndTwentyTwo: 522;
|
|
70
|
-
readonly FiveHundredAndTwentyThree: 523;
|
|
71
|
-
readonly FiveHundredAndTwentyFour: 524;
|
|
72
|
-
readonly FiveHundredAndTwentyFive: 525;
|
|
73
|
-
readonly FiveHundredAndTwentySix: 526;
|
|
74
|
-
readonly FiveHundredAndTwentyNine: 529;
|
|
75
|
-
readonly FiveHundredAndThirty: 530;
|
|
76
|
-
};
|
|
77
|
-
export type ErrorResponseCode = OpenEnum<typeof ErrorResponseCode>;
|
|
78
|
-
export type ErrorResponseError = {
|
|
79
|
-
code: ErrorResponseCode;
|
|
80
|
-
message: string;
|
|
81
|
-
metadata?: {
|
|
82
|
-
[k: string]: any | null;
|
|
83
|
-
} | null | undefined;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Error response
|
|
87
|
-
*/
|
|
88
|
-
export type ErrorResponse = {
|
|
89
|
-
error: ErrorResponseError;
|
|
90
|
-
userId?: string | null | undefined;
|
|
91
|
-
};
|
|
92
|
-
/** @internal */
|
|
93
|
-
export declare const ErrorResponseCode$inboundSchema: z.ZodType<ErrorResponseCode, unknown>;
|
|
94
|
-
/** @internal */
|
|
95
|
-
export declare const ErrorResponseCode$outboundSchema: z.ZodType<ErrorResponseCode, ErrorResponseCode>;
|
|
96
|
-
/**
|
|
97
|
-
* @internal
|
|
98
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
99
|
-
*/
|
|
100
|
-
export declare namespace ErrorResponseCode$ {
|
|
101
|
-
/** @deprecated use `ErrorResponseCode$inboundSchema` instead. */
|
|
102
|
-
const inboundSchema: z.ZodType<ErrorResponseCode, unknown, z.core.$ZodTypeInternals<ErrorResponseCode, unknown>>;
|
|
103
|
-
/** @deprecated use `ErrorResponseCode$outboundSchema` instead. */
|
|
104
|
-
const outboundSchema: z.ZodType<ErrorResponseCode, ErrorResponseCode, z.core.$ZodTypeInternals<ErrorResponseCode, ErrorResponseCode>>;
|
|
105
|
-
}
|
|
106
|
-
/** @internal */
|
|
107
|
-
export declare const ErrorResponseError$inboundSchema: z.ZodType<ErrorResponseError, unknown>;
|
|
108
|
-
/** @internal */
|
|
109
|
-
export type ErrorResponseError$Outbound = {
|
|
110
|
-
code: number;
|
|
111
|
-
message: string;
|
|
112
|
-
metadata?: {
|
|
113
|
-
[k: string]: any | null;
|
|
114
|
-
} | null | undefined;
|
|
115
|
-
};
|
|
116
|
-
/** @internal */
|
|
117
|
-
export declare const ErrorResponseError$outboundSchema: z.ZodType<ErrorResponseError$Outbound, ErrorResponseError>;
|
|
118
|
-
/**
|
|
119
|
-
* @internal
|
|
120
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
121
|
-
*/
|
|
122
|
-
export declare namespace ErrorResponseError$ {
|
|
123
|
-
/** @deprecated use `ErrorResponseError$inboundSchema` instead. */
|
|
124
|
-
const inboundSchema: z.ZodType<ErrorResponseError, unknown, z.core.$ZodTypeInternals<ErrorResponseError, unknown>>;
|
|
125
|
-
/** @deprecated use `ErrorResponseError$outboundSchema` instead. */
|
|
126
|
-
const outboundSchema: z.ZodType<ErrorResponseError$Outbound, ErrorResponseError, z.core.$ZodTypeInternals<ErrorResponseError$Outbound, ErrorResponseError>>;
|
|
127
|
-
/** @deprecated use `ErrorResponseError$Outbound` instead. */
|
|
128
|
-
type Outbound = ErrorResponseError$Outbound;
|
|
129
|
-
}
|
|
130
|
-
export declare function errorResponseErrorToJSON(errorResponseError: ErrorResponseError): string;
|
|
131
|
-
export declare function errorResponseErrorFromJSON(jsonString: string): SafeParseResult<ErrorResponseError, SDKValidationError>;
|
|
132
|
-
/** @internal */
|
|
133
|
-
export declare const ErrorResponse$inboundSchema: z.ZodType<ErrorResponse, unknown>;
|
|
134
|
-
/** @internal */
|
|
135
|
-
export type ErrorResponse$Outbound = {
|
|
136
|
-
error: ErrorResponseError$Outbound;
|
|
137
|
-
user_id?: string | null | undefined;
|
|
138
|
-
};
|
|
139
|
-
/** @internal */
|
|
140
|
-
export declare const ErrorResponse$outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse>;
|
|
141
|
-
/**
|
|
142
|
-
* @internal
|
|
143
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
144
|
-
*/
|
|
145
|
-
export declare namespace ErrorResponse$ {
|
|
146
|
-
/** @deprecated use `ErrorResponse$inboundSchema` instead. */
|
|
147
|
-
const inboundSchema: z.ZodType<ErrorResponse, unknown, z.core.$ZodTypeInternals<ErrorResponse, unknown>>;
|
|
148
|
-
/** @deprecated use `ErrorResponse$outboundSchema` instead. */
|
|
149
|
-
const outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse, z.core.$ZodTypeInternals<ErrorResponse$Outbound, ErrorResponse>>;
|
|
150
|
-
/** @deprecated use `ErrorResponse$Outbound` instead. */
|
|
151
|
-
type Outbound = ErrorResponse$Outbound;
|
|
152
|
-
}
|
|
153
|
-
export declare function errorResponseToJSON(errorResponse: ErrorResponse): string;
|
|
154
|
-
export declare function errorResponseFromJSON(jsonString: string): SafeParseResult<ErrorResponse, SDKValidationError>;
|
|
155
|
-
//# sourceMappingURL=errorresponse.d.ts.map
|
|
@@ -1,167 +0,0 @@
|
|
|
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
|
-
import { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
8
|
-
export const ErrorResponseCode = {
|
|
9
|
-
OneHundred: 100,
|
|
10
|
-
OneHundredAndOne: 101,
|
|
11
|
-
OneHundredAndTwo: 102,
|
|
12
|
-
TwoHundred: 200,
|
|
13
|
-
TwoHundredAndOne: 201,
|
|
14
|
-
TwoHundredAndTwo: 202,
|
|
15
|
-
TwoHundredAndThree: 203,
|
|
16
|
-
TwoHundredAndFour: 204,
|
|
17
|
-
TwoHundredAndFive: 205,
|
|
18
|
-
TwoHundredAndSix: 206,
|
|
19
|
-
TwoHundredAndSeven: 207,
|
|
20
|
-
TwoHundredAndEight: 208,
|
|
21
|
-
ThreeHundred: 300,
|
|
22
|
-
ThreeHundredAndOne: 301,
|
|
23
|
-
ThreeHundredAndTwo: 302,
|
|
24
|
-
ThreeHundredAndThree: 303,
|
|
25
|
-
ThreeHundredAndFour: 304,
|
|
26
|
-
ThreeHundredAndFive: 305,
|
|
27
|
-
ThreeHundredAndSeven: 307,
|
|
28
|
-
ThreeHundredAndEight: 308,
|
|
29
|
-
FourHundred: 400,
|
|
30
|
-
FourHundredAndOne: 401,
|
|
31
|
-
FourHundredAndTwo: 402,
|
|
32
|
-
FourHundredAndThree: 403,
|
|
33
|
-
FourHundredAndFour: 404,
|
|
34
|
-
FourHundredAndFive: 405,
|
|
35
|
-
FourHundredAndSix: 406,
|
|
36
|
-
FourHundredAndSeven: 407,
|
|
37
|
-
FourHundredAndEight: 408,
|
|
38
|
-
FourHundredAndNine: 409,
|
|
39
|
-
FourHundredAndTen: 410,
|
|
40
|
-
FourHundredAndEleven: 411,
|
|
41
|
-
FourHundredAndTwelve: 412,
|
|
42
|
-
FourHundredAndThirteen: 413,
|
|
43
|
-
FourHundredAndFourteen: 414,
|
|
44
|
-
FourHundredAndFifteen: 415,
|
|
45
|
-
FourHundredAndSixteen: 416,
|
|
46
|
-
FourHundredAndSeventeen: 417,
|
|
47
|
-
FourHundredAndEighteen: 418,
|
|
48
|
-
FourHundredAndTwentyTwo: 422,
|
|
49
|
-
FourHundredAndTwentyThree: 423,
|
|
50
|
-
FourHundredAndTwentyFour: 424,
|
|
51
|
-
FourHundredAndTwentyFive: 425,
|
|
52
|
-
FourHundredAndTwentySix: 426,
|
|
53
|
-
FourHundredAndTwentyEight: 428,
|
|
54
|
-
FourHundredAndTwentyNine: 429,
|
|
55
|
-
FourHundredAndThirtyOne: 431,
|
|
56
|
-
FourHundredAndFiftyOne: 451,
|
|
57
|
-
FourHundredAndNinetyEight: 498,
|
|
58
|
-
FourHundredAndNinetyNine: 499,
|
|
59
|
-
FiveHundred: 500,
|
|
60
|
-
FiveHundredAndOne: 501,
|
|
61
|
-
FiveHundredAndTwo: 502,
|
|
62
|
-
FiveHundredAndThree: 503,
|
|
63
|
-
FiveHundredAndFour: 504,
|
|
64
|
-
FiveHundredAndFive: 505,
|
|
65
|
-
FiveHundredAndSix: 506,
|
|
66
|
-
FiveHundredAndSeven: 507,
|
|
67
|
-
FiveHundredAndEight: 508,
|
|
68
|
-
FiveHundredAndTen: 510,
|
|
69
|
-
FiveHundredAndEleven: 511,
|
|
70
|
-
FiveHundredAndTwenty: 520,
|
|
71
|
-
FiveHundredAndTwentyOne: 521,
|
|
72
|
-
FiveHundredAndTwentyTwo: 522,
|
|
73
|
-
FiveHundredAndTwentyThree: 523,
|
|
74
|
-
FiveHundredAndTwentyFour: 524,
|
|
75
|
-
FiveHundredAndTwentyFive: 525,
|
|
76
|
-
FiveHundredAndTwentySix: 526,
|
|
77
|
-
FiveHundredAndTwentyNine: 529,
|
|
78
|
-
FiveHundredAndThirty: 530,
|
|
79
|
-
};
|
|
80
|
-
/** @internal */
|
|
81
|
-
export const ErrorResponseCode$inboundSchema = z
|
|
82
|
-
.union([
|
|
83
|
-
z.enum(ErrorResponseCode),
|
|
84
|
-
z.number().transform(catchUnrecognizedEnum),
|
|
85
|
-
]);
|
|
86
|
-
/** @internal */
|
|
87
|
-
export const ErrorResponseCode$outboundSchema = z.union([
|
|
88
|
-
z.enum(ErrorResponseCode),
|
|
89
|
-
z.number().and(z.custom()),
|
|
90
|
-
]);
|
|
91
|
-
/**
|
|
92
|
-
* @internal
|
|
93
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
94
|
-
*/
|
|
95
|
-
export var ErrorResponseCode$;
|
|
96
|
-
(function (ErrorResponseCode$) {
|
|
97
|
-
/** @deprecated use `ErrorResponseCode$inboundSchema` instead. */
|
|
98
|
-
ErrorResponseCode$.inboundSchema = ErrorResponseCode$inboundSchema;
|
|
99
|
-
/** @deprecated use `ErrorResponseCode$outboundSchema` instead. */
|
|
100
|
-
ErrorResponseCode$.outboundSchema = ErrorResponseCode$outboundSchema;
|
|
101
|
-
})(ErrorResponseCode$ || (ErrorResponseCode$ = {}));
|
|
102
|
-
/** @internal */
|
|
103
|
-
export const ErrorResponseError$inboundSchema = z.object({
|
|
104
|
-
code: ErrorResponseCode$inboundSchema,
|
|
105
|
-
message: z.string(),
|
|
106
|
-
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
107
|
-
});
|
|
108
|
-
/** @internal */
|
|
109
|
-
export const ErrorResponseError$outboundSchema = z.object({
|
|
110
|
-
code: ErrorResponseCode$outboundSchema,
|
|
111
|
-
message: z.string(),
|
|
112
|
-
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
113
|
-
});
|
|
114
|
-
/**
|
|
115
|
-
* @internal
|
|
116
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
117
|
-
*/
|
|
118
|
-
export var ErrorResponseError$;
|
|
119
|
-
(function (ErrorResponseError$) {
|
|
120
|
-
/** @deprecated use `ErrorResponseError$inboundSchema` instead. */
|
|
121
|
-
ErrorResponseError$.inboundSchema = ErrorResponseError$inboundSchema;
|
|
122
|
-
/** @deprecated use `ErrorResponseError$outboundSchema` instead. */
|
|
123
|
-
ErrorResponseError$.outboundSchema = ErrorResponseError$outboundSchema;
|
|
124
|
-
})(ErrorResponseError$ || (ErrorResponseError$ = {}));
|
|
125
|
-
export function errorResponseErrorToJSON(errorResponseError) {
|
|
126
|
-
return JSON.stringify(ErrorResponseError$outboundSchema.parse(errorResponseError));
|
|
127
|
-
}
|
|
128
|
-
export function errorResponseErrorFromJSON(jsonString) {
|
|
129
|
-
return safeParse(jsonString, (x) => ErrorResponseError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorResponseError' from JSON`);
|
|
130
|
-
}
|
|
131
|
-
/** @internal */
|
|
132
|
-
export const ErrorResponse$inboundSchema = z
|
|
133
|
-
.object({
|
|
134
|
-
error: z.lazy(() => ErrorResponseError$inboundSchema),
|
|
135
|
-
user_id: z.nullable(z.string()).optional(),
|
|
136
|
-
}).transform((v) => {
|
|
137
|
-
return remap$(v, {
|
|
138
|
-
"user_id": "userId",
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
/** @internal */
|
|
142
|
-
export const ErrorResponse$outboundSchema = z.object({
|
|
143
|
-
error: z.lazy(() => ErrorResponseError$outboundSchema),
|
|
144
|
-
userId: z.nullable(z.string()).optional(),
|
|
145
|
-
}).transform((v) => {
|
|
146
|
-
return remap$(v, {
|
|
147
|
-
userId: "user_id",
|
|
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 var ErrorResponse$;
|
|
155
|
-
(function (ErrorResponse$) {
|
|
156
|
-
/** @deprecated use `ErrorResponse$inboundSchema` instead. */
|
|
157
|
-
ErrorResponse$.inboundSchema = ErrorResponse$inboundSchema;
|
|
158
|
-
/** @deprecated use `ErrorResponse$outboundSchema` instead. */
|
|
159
|
-
ErrorResponse$.outboundSchema = ErrorResponse$outboundSchema;
|
|
160
|
-
})(ErrorResponse$ || (ErrorResponse$ = {}));
|
|
161
|
-
export function errorResponseToJSON(errorResponse) {
|
|
162
|
-
return JSON.stringify(ErrorResponse$outboundSchema.parse(errorResponse));
|
|
163
|
-
}
|
|
164
|
-
export function errorResponseFromJSON(jsonString) {
|
|
165
|
-
return safeParse(jsonString, (x) => ErrorResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorResponse' from JSON`);
|
|
166
|
-
}
|
|
167
|
-
//# sourceMappingURL=errorresponse.js.map
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import * as models from "../index.js";
|
|
3
|
-
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
-
/**
|
|
5
|
-
* Error response
|
|
6
|
-
*/
|
|
7
|
-
export type ErrorResponseData = {
|
|
8
|
-
error: models.ErrorResponseError;
|
|
9
|
-
userId?: string | null | undefined;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Error response
|
|
13
|
-
*/
|
|
14
|
-
export declare class ErrorResponse extends OpenRouterError {
|
|
15
|
-
error: models.ErrorResponseError;
|
|
16
|
-
userId?: string | null | undefined;
|
|
17
|
-
/** The original data that was passed to this error instance. */
|
|
18
|
-
data$: ErrorResponseData;
|
|
19
|
-
constructor(err: ErrorResponseData, httpMeta: {
|
|
20
|
-
response: Response;
|
|
21
|
-
request: Request;
|
|
22
|
-
body: string;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
/** @internal */
|
|
26
|
-
export declare const ErrorResponse$inboundSchema: z.ZodType<ErrorResponse, unknown>;
|
|
27
|
-
/** @internal */
|
|
28
|
-
export type ErrorResponse$Outbound = {
|
|
29
|
-
error: models.ErrorResponseError$Outbound;
|
|
30
|
-
user_id?: string | null | undefined;
|
|
31
|
-
};
|
|
32
|
-
/** @internal */
|
|
33
|
-
export declare const ErrorResponse$outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse>;
|
|
34
|
-
/**
|
|
35
|
-
* @internal
|
|
36
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
37
|
-
*/
|
|
38
|
-
export declare namespace ErrorResponse$ {
|
|
39
|
-
/** @deprecated use `ErrorResponse$inboundSchema` instead. */
|
|
40
|
-
const inboundSchema: z.ZodType<ErrorResponse, unknown, z.core.$ZodTypeInternals<ErrorResponse, unknown>>;
|
|
41
|
-
/** @deprecated use `ErrorResponse$outboundSchema` instead. */
|
|
42
|
-
const outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse, z.core.$ZodTypeInternals<ErrorResponse$Outbound, ErrorResponse>>;
|
|
43
|
-
/** @deprecated use `ErrorResponse$Outbound` instead. */
|
|
44
|
-
type Outbound = ErrorResponse$Outbound;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=errorresponse.d.ts.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import * as operations from "../operations/index.js";
|
|
3
|
-
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
-
/**
|
|
5
|
-
* Internal Server Error
|
|
6
|
-
*/
|
|
7
|
-
export type InternalServerErrorData = {
|
|
8
|
-
/**
|
|
9
|
-
* Error details
|
|
10
|
-
*/
|
|
11
|
-
error: operations.ErrorT;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Internal Server Error
|
|
15
|
-
*/
|
|
16
|
-
export declare class InternalServerError extends OpenRouterError {
|
|
17
|
-
/**
|
|
18
|
-
* Error details
|
|
19
|
-
*/
|
|
20
|
-
error: operations.ErrorT;
|
|
21
|
-
/** The original data that was passed to this error instance. */
|
|
22
|
-
data$: InternalServerErrorData;
|
|
23
|
-
constructor(err: InternalServerErrorData, httpMeta: {
|
|
24
|
-
response: Response;
|
|
25
|
-
request: Request;
|
|
26
|
-
body: string;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
/** @internal */
|
|
30
|
-
export declare const InternalServerError$inboundSchema: z.ZodType<InternalServerError, unknown>;
|
|
31
|
-
/** @internal */
|
|
32
|
-
export type InternalServerError$Outbound = {
|
|
33
|
-
error: operations.ErrorT$Outbound;
|
|
34
|
-
};
|
|
35
|
-
/** @internal */
|
|
36
|
-
export declare const InternalServerError$outboundSchema: z.ZodType<InternalServerError$Outbound, InternalServerError>;
|
|
37
|
-
/**
|
|
38
|
-
* @internal
|
|
39
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
40
|
-
*/
|
|
41
|
-
export declare namespace InternalServerError$ {
|
|
42
|
-
/** @deprecated use `InternalServerError$inboundSchema` instead. */
|
|
43
|
-
const inboundSchema: z.ZodType<InternalServerError, unknown, z.core.$ZodTypeInternals<InternalServerError, unknown>>;
|
|
44
|
-
/** @deprecated use `InternalServerError$outboundSchema` instead. */
|
|
45
|
-
const outboundSchema: z.ZodType<InternalServerError$Outbound, InternalServerError, z.core.$ZodTypeInternals<InternalServerError$Outbound, InternalServerError>>;
|
|
46
|
-
/** @deprecated use `InternalServerError$Outbound` instead. */
|
|
47
|
-
type Outbound = InternalServerError$Outbound;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=listproviders.d.ts.map
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v4";
|
|
5
|
-
import * as operations from "../operations/index.js";
|
|
6
|
-
import { OpenRouterError } from "./openroutererror.js";
|
|
7
|
-
/**
|
|
8
|
-
* Internal Server Error
|
|
9
|
-
*/
|
|
10
|
-
export class InternalServerError extends OpenRouterError {
|
|
11
|
-
constructor(err, httpMeta) {
|
|
12
|
-
const message = err.error?.message
|
|
13
|
-
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
14
|
-
super(message, httpMeta);
|
|
15
|
-
this.data$ = err;
|
|
16
|
-
this.error = err.error;
|
|
17
|
-
this.name = "InternalServerError";
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const InternalServerError$inboundSchema = z.object({
|
|
22
|
-
error: z.lazy(() => operations.ErrorT$inboundSchema),
|
|
23
|
-
request$: z.custom(x => x instanceof Request),
|
|
24
|
-
response$: z.custom(x => x instanceof Response),
|
|
25
|
-
body$: z.string(),
|
|
26
|
-
})
|
|
27
|
-
.transform((v) => {
|
|
28
|
-
return new InternalServerError(v, {
|
|
29
|
-
request: v.request$,
|
|
30
|
-
response: v.response$,
|
|
31
|
-
body: v.body$,
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
/** @internal */
|
|
35
|
-
export const InternalServerError$outboundSchema = z.custom(x => x instanceof InternalServerError)
|
|
36
|
-
.transform(v => v.data$)
|
|
37
|
-
.pipe(z.object({
|
|
38
|
-
error: z.lazy(() => operations.ErrorT$outboundSchema),
|
|
39
|
-
}));
|
|
40
|
-
/**
|
|
41
|
-
* @internal
|
|
42
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
-
*/
|
|
44
|
-
export var InternalServerError$;
|
|
45
|
-
(function (InternalServerError$) {
|
|
46
|
-
/** @deprecated use `InternalServerError$inboundSchema` instead. */
|
|
47
|
-
InternalServerError$.inboundSchema = InternalServerError$inboundSchema;
|
|
48
|
-
/** @deprecated use `InternalServerError$outboundSchema` instead. */
|
|
49
|
-
InternalServerError$.outboundSchema = InternalServerError$outboundSchema;
|
|
50
|
-
})(InternalServerError$ || (InternalServerError$ = {}));
|
|
51
|
-
//# sourceMappingURL=listproviders.js.map
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
import * as models from "../index.js";
|
|
5
|
-
export type ListModelsCountResponse = models.ErrorResponse | models.ModelsCountResponse;
|
|
6
|
-
/** @internal */
|
|
7
|
-
export declare const ListModelsCountResponse$inboundSchema: z.ZodType<ListModelsCountResponse, unknown>;
|
|
8
|
-
/** @internal */
|
|
9
|
-
export type ListModelsCountResponse$Outbound = models.ErrorResponse$Outbound | models.ModelsCountResponse$Outbound;
|
|
10
|
-
/** @internal */
|
|
11
|
-
export declare const ListModelsCountResponse$outboundSchema: z.ZodType<ListModelsCountResponse$Outbound, ListModelsCountResponse>;
|
|
12
|
-
/**
|
|
13
|
-
* @internal
|
|
14
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
15
|
-
*/
|
|
16
|
-
export declare namespace ListModelsCountResponse$ {
|
|
17
|
-
/** @deprecated use `ListModelsCountResponse$inboundSchema` instead. */
|
|
18
|
-
const inboundSchema: z.ZodType<ListModelsCountResponse, unknown, z.core.$ZodTypeInternals<ListModelsCountResponse, unknown>>;
|
|
19
|
-
/** @deprecated use `ListModelsCountResponse$outboundSchema` instead. */
|
|
20
|
-
const outboundSchema: z.ZodType<ListModelsCountResponse$Outbound, ListModelsCountResponse, z.core.$ZodTypeInternals<ListModelsCountResponse$Outbound, ListModelsCountResponse>>;
|
|
21
|
-
/** @deprecated use `ListModelsCountResponse$Outbound` instead. */
|
|
22
|
-
type Outbound = ListModelsCountResponse$Outbound;
|
|
23
|
-
}
|
|
24
|
-
export declare function listModelsCountResponseToJSON(listModelsCountResponse: ListModelsCountResponse): string;
|
|
25
|
-
export declare function listModelsCountResponseFromJSON(jsonString: string): SafeParseResult<ListModelsCountResponse, SDKValidationError>;
|
|
26
|
-
//# sourceMappingURL=listmodelscount.d.ts.map
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
import * as models from "../index.js";
|
|
7
|
-
/** @internal */
|
|
8
|
-
export const ListModelsCountResponse$inboundSchema = z.union([
|
|
9
|
-
models.ErrorResponse$inboundSchema,
|
|
10
|
-
models.ModelsCountResponse$inboundSchema,
|
|
11
|
-
]);
|
|
12
|
-
/** @internal */
|
|
13
|
-
export const ListModelsCountResponse$outboundSchema = z.union([
|
|
14
|
-
models.ErrorResponse$outboundSchema,
|
|
15
|
-
models.ModelsCountResponse$outboundSchema,
|
|
16
|
-
]);
|
|
17
|
-
/**
|
|
18
|
-
* @internal
|
|
19
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
20
|
-
*/
|
|
21
|
-
export var ListModelsCountResponse$;
|
|
22
|
-
(function (ListModelsCountResponse$) {
|
|
23
|
-
/** @deprecated use `ListModelsCountResponse$inboundSchema` instead. */
|
|
24
|
-
ListModelsCountResponse$.inboundSchema = ListModelsCountResponse$inboundSchema;
|
|
25
|
-
/** @deprecated use `ListModelsCountResponse$outboundSchema` instead. */
|
|
26
|
-
ListModelsCountResponse$.outboundSchema = ListModelsCountResponse$outboundSchema;
|
|
27
|
-
})(ListModelsCountResponse$ || (ListModelsCountResponse$ = {}));
|
|
28
|
-
export function listModelsCountResponseToJSON(listModelsCountResponse) {
|
|
29
|
-
return JSON.stringify(ListModelsCountResponse$outboundSchema.parse(listModelsCountResponse));
|
|
30
|
-
}
|
|
31
|
-
export function listModelsCountResponseFromJSON(jsonString) {
|
|
32
|
-
return safeParse(jsonString, (x) => ListModelsCountResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListModelsCountResponse' from JSON`);
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=listmodelscount.js.map
|