@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
|
@@ -0,0 +1,63 @@
|
|
|
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 * as models from "../index.js";
|
|
7
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
8
|
+
/**
|
|
9
|
+
* Infrastructure Timeout - Provider request timed out at edge network
|
|
10
|
+
*/
|
|
11
|
+
export class EdgeNetworkTimeoutResponseError extends OpenRouterError {
|
|
12
|
+
constructor(err, httpMeta) {
|
|
13
|
+
const message = err.error?.message
|
|
14
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
15
|
+
super(message, httpMeta);
|
|
16
|
+
this.data$ = err;
|
|
17
|
+
this.error = err.error;
|
|
18
|
+
if (err.userId != null)
|
|
19
|
+
this.userId = err.userId;
|
|
20
|
+
this.name = "EdgeNetworkTimeoutResponseError";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const EdgeNetworkTimeoutResponseError$inboundSchema = z.object({
|
|
25
|
+
error: models.EdgeNetworkTimeoutResponseErrorData$inboundSchema,
|
|
26
|
+
user_id: z.nullable(z.string()).optional(),
|
|
27
|
+
request$: z.custom(x => x instanceof Request),
|
|
28
|
+
response$: z.custom(x => x instanceof Response),
|
|
29
|
+
body$: z.string(),
|
|
30
|
+
})
|
|
31
|
+
.transform((v) => {
|
|
32
|
+
const remapped = remap$(v, {
|
|
33
|
+
"user_id": "userId",
|
|
34
|
+
});
|
|
35
|
+
return new EdgeNetworkTimeoutResponseError(remapped, {
|
|
36
|
+
request: v.request$,
|
|
37
|
+
response: v.response$,
|
|
38
|
+
body: v.body$,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const EdgeNetworkTimeoutResponseError$outboundSchema = z.custom(x => x instanceof EdgeNetworkTimeoutResponseError)
|
|
43
|
+
.transform(v => v.data$)
|
|
44
|
+
.pipe(z.object({
|
|
45
|
+
error: models.EdgeNetworkTimeoutResponseErrorData$outboundSchema,
|
|
46
|
+
userId: z.nullable(z.string()).optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
userId: "user_id",
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export var EdgeNetworkTimeoutResponseError$;
|
|
57
|
+
(function (EdgeNetworkTimeoutResponseError$) {
|
|
58
|
+
/** @deprecated use `EdgeNetworkTimeoutResponseError$inboundSchema` instead. */
|
|
59
|
+
EdgeNetworkTimeoutResponseError$.inboundSchema = EdgeNetworkTimeoutResponseError$inboundSchema;
|
|
60
|
+
/** @deprecated use `EdgeNetworkTimeoutResponseError$outboundSchema` instead. */
|
|
61
|
+
EdgeNetworkTimeoutResponseError$.outboundSchema = EdgeNetworkTimeoutResponseError$outboundSchema;
|
|
62
|
+
})(EdgeNetworkTimeoutResponseError$ || (EdgeNetworkTimeoutResponseError$ = {}));
|
|
63
|
+
//# sourceMappingURL=edgenetworktimeoutresponseerror.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Forbidden - Authentication successful but insufficient permissions
|
|
6
|
+
*/
|
|
7
|
+
export type ForbiddenResponseErrorData = {
|
|
8
|
+
/**
|
|
9
|
+
* Error data for ForbiddenResponse
|
|
10
|
+
*/
|
|
11
|
+
error: models.ForbiddenResponseErrorData;
|
|
12
|
+
userId?: string | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Forbidden - Authentication successful but insufficient permissions
|
|
16
|
+
*/
|
|
17
|
+
export declare class ForbiddenResponseError extends OpenRouterError {
|
|
18
|
+
/**
|
|
19
|
+
* Error data for ForbiddenResponse
|
|
20
|
+
*/
|
|
21
|
+
error: models.ForbiddenResponseErrorData;
|
|
22
|
+
userId?: string | null | undefined;
|
|
23
|
+
/** The original data that was passed to this error instance. */
|
|
24
|
+
data$: ForbiddenResponseErrorData;
|
|
25
|
+
constructor(err: ForbiddenResponseErrorData, httpMeta: {
|
|
26
|
+
response: Response;
|
|
27
|
+
request: Request;
|
|
28
|
+
body: string;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const ForbiddenResponseError$inboundSchema: z.ZodType<ForbiddenResponseError, unknown>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type ForbiddenResponseError$Outbound = {
|
|
35
|
+
error: models.ForbiddenResponseErrorData$Outbound;
|
|
36
|
+
user_id?: string | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const ForbiddenResponseError$outboundSchema: z.ZodType<ForbiddenResponseError$Outbound, ForbiddenResponseError>;
|
|
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 declare namespace ForbiddenResponseError$ {
|
|
45
|
+
/** @deprecated use `ForbiddenResponseError$inboundSchema` instead. */
|
|
46
|
+
const inboundSchema: z.ZodType<ForbiddenResponseError, unknown, z.core.$ZodTypeInternals<ForbiddenResponseError, unknown>>;
|
|
47
|
+
/** @deprecated use `ForbiddenResponseError$outboundSchema` instead. */
|
|
48
|
+
const outboundSchema: z.ZodType<ForbiddenResponseError$Outbound, ForbiddenResponseError, z.core.$ZodTypeInternals<ForbiddenResponseError$Outbound, ForbiddenResponseError>>;
|
|
49
|
+
/** @deprecated use `ForbiddenResponseError$Outbound` instead. */
|
|
50
|
+
type Outbound = ForbiddenResponseError$Outbound;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=forbiddenresponseerror.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
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 * as models from "../index.js";
|
|
7
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
8
|
+
/**
|
|
9
|
+
* Forbidden - Authentication successful but insufficient permissions
|
|
10
|
+
*/
|
|
11
|
+
export class ForbiddenResponseError extends OpenRouterError {
|
|
12
|
+
constructor(err, httpMeta) {
|
|
13
|
+
const message = err.error?.message
|
|
14
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
15
|
+
super(message, httpMeta);
|
|
16
|
+
this.data$ = err;
|
|
17
|
+
this.error = err.error;
|
|
18
|
+
if (err.userId != null)
|
|
19
|
+
this.userId = err.userId;
|
|
20
|
+
this.name = "ForbiddenResponseError";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const ForbiddenResponseError$inboundSchema = z.object({
|
|
25
|
+
error: models.ForbiddenResponseErrorData$inboundSchema,
|
|
26
|
+
user_id: z.nullable(z.string()).optional(),
|
|
27
|
+
request$: z.custom(x => x instanceof Request),
|
|
28
|
+
response$: z.custom(x => x instanceof Response),
|
|
29
|
+
body$: z.string(),
|
|
30
|
+
})
|
|
31
|
+
.transform((v) => {
|
|
32
|
+
const remapped = remap$(v, {
|
|
33
|
+
"user_id": "userId",
|
|
34
|
+
});
|
|
35
|
+
return new ForbiddenResponseError(remapped, {
|
|
36
|
+
request: v.request$,
|
|
37
|
+
response: v.response$,
|
|
38
|
+
body: v.body$,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const ForbiddenResponseError$outboundSchema = z.custom(x => x instanceof ForbiddenResponseError)
|
|
43
|
+
.transform(v => v.data$)
|
|
44
|
+
.pipe(z.object({
|
|
45
|
+
error: models.ForbiddenResponseErrorData$outboundSchema,
|
|
46
|
+
userId: z.nullable(z.string()).optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
userId: "user_id",
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export var ForbiddenResponseError$;
|
|
57
|
+
(function (ForbiddenResponseError$) {
|
|
58
|
+
/** @deprecated use `ForbiddenResponseError$inboundSchema` instead. */
|
|
59
|
+
ForbiddenResponseError$.inboundSchema = ForbiddenResponseError$inboundSchema;
|
|
60
|
+
/** @deprecated use `ForbiddenResponseError$outboundSchema` instead. */
|
|
61
|
+
ForbiddenResponseError$.outboundSchema = ForbiddenResponseError$outboundSchema;
|
|
62
|
+
})(ForbiddenResponseError$ || (ForbiddenResponseError$ = {}));
|
|
63
|
+
//# sourceMappingURL=forbiddenresponseerror.js.map
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
+
export * from "./badgatewayresponseerror.js";
|
|
2
|
+
export * from "./badrequestresponseerror.js";
|
|
1
3
|
export * from "./chaterror.js";
|
|
2
|
-
export * from "./
|
|
4
|
+
export * from "./edgenetworktimeoutresponseerror.js";
|
|
5
|
+
export * from "./forbiddenresponseerror.js";
|
|
3
6
|
export * from "./httpclienterrors.js";
|
|
4
|
-
export * from "./
|
|
7
|
+
export * from "./internalserverresponseerror.js";
|
|
8
|
+
export * from "./notfoundresponseerror.js";
|
|
5
9
|
export * from "./openrouterdefaulterror.js";
|
|
6
10
|
export * from "./openroutererror.js";
|
|
11
|
+
export * from "./payloadtoolargeresponseerror.js";
|
|
12
|
+
export * from "./paymentrequiredresponseerror.js";
|
|
13
|
+
export * from "./provideroverloadedresponseerror.js";
|
|
14
|
+
export * from "./requesttimeoutresponseerror.js";
|
|
7
15
|
export * from "./responsevalidationerror.js";
|
|
8
16
|
export * from "./sdkvalidationerror.js";
|
|
17
|
+
export * from "./serviceunavailableresponseerror.js";
|
|
18
|
+
export * from "./toomanyrequestsresponseerror.js";
|
|
19
|
+
export * from "./unauthorizedresponseerror.js";
|
|
20
|
+
export * from "./unprocessableentityresponseerror.js";
|
|
9
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
+
export * from "./badgatewayresponseerror.js";
|
|
5
|
+
export * from "./badrequestresponseerror.js";
|
|
4
6
|
export * from "./chaterror.js";
|
|
5
|
-
export * from "./
|
|
7
|
+
export * from "./edgenetworktimeoutresponseerror.js";
|
|
8
|
+
export * from "./forbiddenresponseerror.js";
|
|
6
9
|
export * from "./httpclienterrors.js";
|
|
7
|
-
export * from "./
|
|
10
|
+
export * from "./internalserverresponseerror.js";
|
|
11
|
+
export * from "./notfoundresponseerror.js";
|
|
8
12
|
export * from "./openrouterdefaulterror.js";
|
|
9
13
|
export * from "./openroutererror.js";
|
|
14
|
+
export * from "./payloadtoolargeresponseerror.js";
|
|
15
|
+
export * from "./paymentrequiredresponseerror.js";
|
|
16
|
+
export * from "./provideroverloadedresponseerror.js";
|
|
17
|
+
export * from "./requesttimeoutresponseerror.js";
|
|
10
18
|
export * from "./responsevalidationerror.js";
|
|
11
19
|
export * from "./sdkvalidationerror.js";
|
|
20
|
+
export * from "./serviceunavailableresponseerror.js";
|
|
21
|
+
export * from "./toomanyrequestsresponseerror.js";
|
|
22
|
+
export * from "./unauthorizedresponseerror.js";
|
|
23
|
+
export * from "./unprocessableentityresponseerror.js";
|
|
12
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Internal Server Error - Unexpected server error
|
|
6
|
+
*/
|
|
7
|
+
export type InternalServerResponseErrorData = {
|
|
8
|
+
/**
|
|
9
|
+
* Error data for InternalServerResponse
|
|
10
|
+
*/
|
|
11
|
+
error: models.InternalServerResponseErrorData;
|
|
12
|
+
userId?: string | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Internal Server Error - Unexpected server error
|
|
16
|
+
*/
|
|
17
|
+
export declare class InternalServerResponseError extends OpenRouterError {
|
|
18
|
+
/**
|
|
19
|
+
* Error data for InternalServerResponse
|
|
20
|
+
*/
|
|
21
|
+
error: models.InternalServerResponseErrorData;
|
|
22
|
+
userId?: string | null | undefined;
|
|
23
|
+
/** The original data that was passed to this error instance. */
|
|
24
|
+
data$: InternalServerResponseErrorData;
|
|
25
|
+
constructor(err: InternalServerResponseErrorData, httpMeta: {
|
|
26
|
+
response: Response;
|
|
27
|
+
request: Request;
|
|
28
|
+
body: string;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const InternalServerResponseError$inboundSchema: z.ZodType<InternalServerResponseError, unknown>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type InternalServerResponseError$Outbound = {
|
|
35
|
+
error: models.InternalServerResponseErrorData$Outbound;
|
|
36
|
+
user_id?: string | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const InternalServerResponseError$outboundSchema: z.ZodType<InternalServerResponseError$Outbound, InternalServerResponseError>;
|
|
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 declare namespace InternalServerResponseError$ {
|
|
45
|
+
/** @deprecated use `InternalServerResponseError$inboundSchema` instead. */
|
|
46
|
+
const inboundSchema: z.ZodType<InternalServerResponseError, unknown, z.core.$ZodTypeInternals<InternalServerResponseError, unknown>>;
|
|
47
|
+
/** @deprecated use `InternalServerResponseError$outboundSchema` instead. */
|
|
48
|
+
const outboundSchema: z.ZodType<InternalServerResponseError$Outbound, InternalServerResponseError, z.core.$ZodTypeInternals<InternalServerResponseError$Outbound, InternalServerResponseError>>;
|
|
49
|
+
/** @deprecated use `InternalServerResponseError$Outbound` instead. */
|
|
50
|
+
type Outbound = InternalServerResponseError$Outbound;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=internalserverresponseerror.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
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 * as models from "../index.js";
|
|
7
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
8
|
+
/**
|
|
9
|
+
* Internal Server Error - Unexpected server error
|
|
10
|
+
*/
|
|
11
|
+
export class InternalServerResponseError extends OpenRouterError {
|
|
12
|
+
constructor(err, httpMeta) {
|
|
13
|
+
const message = err.error?.message
|
|
14
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
15
|
+
super(message, httpMeta);
|
|
16
|
+
this.data$ = err;
|
|
17
|
+
this.error = err.error;
|
|
18
|
+
if (err.userId != null)
|
|
19
|
+
this.userId = err.userId;
|
|
20
|
+
this.name = "InternalServerResponseError";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const InternalServerResponseError$inboundSchema = z.object({
|
|
25
|
+
error: models.InternalServerResponseErrorData$inboundSchema,
|
|
26
|
+
user_id: z.nullable(z.string()).optional(),
|
|
27
|
+
request$: z.custom(x => x instanceof Request),
|
|
28
|
+
response$: z.custom(x => x instanceof Response),
|
|
29
|
+
body$: z.string(),
|
|
30
|
+
})
|
|
31
|
+
.transform((v) => {
|
|
32
|
+
const remapped = remap$(v, {
|
|
33
|
+
"user_id": "userId",
|
|
34
|
+
});
|
|
35
|
+
return new InternalServerResponseError(remapped, {
|
|
36
|
+
request: v.request$,
|
|
37
|
+
response: v.response$,
|
|
38
|
+
body: v.body$,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const InternalServerResponseError$outboundSchema = z.custom(x => x instanceof InternalServerResponseError)
|
|
43
|
+
.transform(v => v.data$)
|
|
44
|
+
.pipe(z.object({
|
|
45
|
+
error: models.InternalServerResponseErrorData$outboundSchema,
|
|
46
|
+
userId: z.nullable(z.string()).optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
userId: "user_id",
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export var InternalServerResponseError$;
|
|
57
|
+
(function (InternalServerResponseError$) {
|
|
58
|
+
/** @deprecated use `InternalServerResponseError$inboundSchema` instead. */
|
|
59
|
+
InternalServerResponseError$.inboundSchema = InternalServerResponseError$inboundSchema;
|
|
60
|
+
/** @deprecated use `InternalServerResponseError$outboundSchema` instead. */
|
|
61
|
+
InternalServerResponseError$.outboundSchema = InternalServerResponseError$outboundSchema;
|
|
62
|
+
})(InternalServerResponseError$ || (InternalServerResponseError$ = {}));
|
|
63
|
+
//# sourceMappingURL=internalserverresponseerror.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Not Found - Resource does not exist
|
|
6
|
+
*/
|
|
7
|
+
export type NotFoundResponseErrorData = {
|
|
8
|
+
/**
|
|
9
|
+
* Error data for NotFoundResponse
|
|
10
|
+
*/
|
|
11
|
+
error: models.NotFoundResponseErrorData;
|
|
12
|
+
userId?: string | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Not Found - Resource does not exist
|
|
16
|
+
*/
|
|
17
|
+
export declare class NotFoundResponseError extends OpenRouterError {
|
|
18
|
+
/**
|
|
19
|
+
* Error data for NotFoundResponse
|
|
20
|
+
*/
|
|
21
|
+
error: models.NotFoundResponseErrorData;
|
|
22
|
+
userId?: string | null | undefined;
|
|
23
|
+
/** The original data that was passed to this error instance. */
|
|
24
|
+
data$: NotFoundResponseErrorData;
|
|
25
|
+
constructor(err: NotFoundResponseErrorData, httpMeta: {
|
|
26
|
+
response: Response;
|
|
27
|
+
request: Request;
|
|
28
|
+
body: string;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const NotFoundResponseError$inboundSchema: z.ZodType<NotFoundResponseError, unknown>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type NotFoundResponseError$Outbound = {
|
|
35
|
+
error: models.NotFoundResponseErrorData$Outbound;
|
|
36
|
+
user_id?: string | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const NotFoundResponseError$outboundSchema: z.ZodType<NotFoundResponseError$Outbound, NotFoundResponseError>;
|
|
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 declare namespace NotFoundResponseError$ {
|
|
45
|
+
/** @deprecated use `NotFoundResponseError$inboundSchema` instead. */
|
|
46
|
+
const inboundSchema: z.ZodType<NotFoundResponseError, unknown, z.core.$ZodTypeInternals<NotFoundResponseError, unknown>>;
|
|
47
|
+
/** @deprecated use `NotFoundResponseError$outboundSchema` instead. */
|
|
48
|
+
const outboundSchema: z.ZodType<NotFoundResponseError$Outbound, NotFoundResponseError, z.core.$ZodTypeInternals<NotFoundResponseError$Outbound, NotFoundResponseError>>;
|
|
49
|
+
/** @deprecated use `NotFoundResponseError$Outbound` instead. */
|
|
50
|
+
type Outbound = NotFoundResponseError$Outbound;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=notfoundresponseerror.d.ts.map
|
|
@@ -6,9 +6,9 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
6
6
|
import * as models from "../index.js";
|
|
7
7
|
import { OpenRouterError } from "./openroutererror.js";
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Not Found - Resource does not exist
|
|
10
10
|
*/
|
|
11
|
-
export class
|
|
11
|
+
export class NotFoundResponseError extends OpenRouterError {
|
|
12
12
|
constructor(err, httpMeta) {
|
|
13
13
|
const message = err.error?.message
|
|
14
14
|
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
@@ -17,13 +17,12 @@ export class ErrorResponse extends OpenRouterError {
|
|
|
17
17
|
this.error = err.error;
|
|
18
18
|
if (err.userId != null)
|
|
19
19
|
this.userId = err.userId;
|
|
20
|
-
this.name = "
|
|
20
|
+
this.name = "NotFoundResponseError";
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
/** @internal */
|
|
24
|
-
export const
|
|
25
|
-
.
|
|
26
|
-
error: z.lazy(() => models.ErrorResponseError$inboundSchema),
|
|
24
|
+
export const NotFoundResponseError$inboundSchema = z.object({
|
|
25
|
+
error: models.NotFoundResponseErrorData$inboundSchema,
|
|
27
26
|
user_id: z.nullable(z.string()).optional(),
|
|
28
27
|
request$: z.custom(x => x instanceof Request),
|
|
29
28
|
response$: z.custom(x => x instanceof Response),
|
|
@@ -33,17 +32,17 @@ export const ErrorResponse$inboundSchema = z
|
|
|
33
32
|
const remapped = remap$(v, {
|
|
34
33
|
"user_id": "userId",
|
|
35
34
|
});
|
|
36
|
-
return new
|
|
35
|
+
return new NotFoundResponseError(remapped, {
|
|
37
36
|
request: v.request$,
|
|
38
37
|
response: v.response$,
|
|
39
38
|
body: v.body$,
|
|
40
39
|
});
|
|
41
40
|
});
|
|
42
41
|
/** @internal */
|
|
43
|
-
export const
|
|
42
|
+
export const NotFoundResponseError$outboundSchema = z.custom(x => x instanceof NotFoundResponseError)
|
|
44
43
|
.transform(v => v.data$)
|
|
45
44
|
.pipe(z.object({
|
|
46
|
-
error:
|
|
45
|
+
error: models.NotFoundResponseErrorData$outboundSchema,
|
|
47
46
|
userId: z.nullable(z.string()).optional(),
|
|
48
47
|
}).transform((v) => {
|
|
49
48
|
return remap$(v, {
|
|
@@ -54,11 +53,11 @@ export const ErrorResponse$outboundSchema = z.custom(x => x instanceof ErrorResp
|
|
|
54
53
|
* @internal
|
|
55
54
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
55
|
*/
|
|
57
|
-
export var
|
|
58
|
-
(function (
|
|
59
|
-
/** @deprecated use `
|
|
60
|
-
|
|
61
|
-
/** @deprecated use `
|
|
62
|
-
|
|
63
|
-
})(
|
|
64
|
-
//# sourceMappingURL=
|
|
56
|
+
export var NotFoundResponseError$;
|
|
57
|
+
(function (NotFoundResponseError$) {
|
|
58
|
+
/** @deprecated use `NotFoundResponseError$inboundSchema` instead. */
|
|
59
|
+
NotFoundResponseError$.inboundSchema = NotFoundResponseError$inboundSchema;
|
|
60
|
+
/** @deprecated use `NotFoundResponseError$outboundSchema` instead. */
|
|
61
|
+
NotFoundResponseError$.outboundSchema = NotFoundResponseError$outboundSchema;
|
|
62
|
+
})(NotFoundResponseError$ || (NotFoundResponseError$ = {}));
|
|
63
|
+
//# sourceMappingURL=notfoundresponseerror.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Payload Too Large - Request payload exceeds size limits
|
|
6
|
+
*/
|
|
7
|
+
export type PayloadTooLargeResponseErrorData = {
|
|
8
|
+
/**
|
|
9
|
+
* Error data for PayloadTooLargeResponse
|
|
10
|
+
*/
|
|
11
|
+
error: models.PayloadTooLargeResponseErrorData;
|
|
12
|
+
userId?: string | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Payload Too Large - Request payload exceeds size limits
|
|
16
|
+
*/
|
|
17
|
+
export declare class PayloadTooLargeResponseError extends OpenRouterError {
|
|
18
|
+
/**
|
|
19
|
+
* Error data for PayloadTooLargeResponse
|
|
20
|
+
*/
|
|
21
|
+
error: models.PayloadTooLargeResponseErrorData;
|
|
22
|
+
userId?: string | null | undefined;
|
|
23
|
+
/** The original data that was passed to this error instance. */
|
|
24
|
+
data$: PayloadTooLargeResponseErrorData;
|
|
25
|
+
constructor(err: PayloadTooLargeResponseErrorData, httpMeta: {
|
|
26
|
+
response: Response;
|
|
27
|
+
request: Request;
|
|
28
|
+
body: string;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const PayloadTooLargeResponseError$inboundSchema: z.ZodType<PayloadTooLargeResponseError, unknown>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type PayloadTooLargeResponseError$Outbound = {
|
|
35
|
+
error: models.PayloadTooLargeResponseErrorData$Outbound;
|
|
36
|
+
user_id?: string | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const PayloadTooLargeResponseError$outboundSchema: z.ZodType<PayloadTooLargeResponseError$Outbound, PayloadTooLargeResponseError>;
|
|
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 declare namespace PayloadTooLargeResponseError$ {
|
|
45
|
+
/** @deprecated use `PayloadTooLargeResponseError$inboundSchema` instead. */
|
|
46
|
+
const inboundSchema: z.ZodType<PayloadTooLargeResponseError, unknown, z.core.$ZodTypeInternals<PayloadTooLargeResponseError, unknown>>;
|
|
47
|
+
/** @deprecated use `PayloadTooLargeResponseError$outboundSchema` instead. */
|
|
48
|
+
const outboundSchema: z.ZodType<PayloadTooLargeResponseError$Outbound, PayloadTooLargeResponseError, z.core.$ZodTypeInternals<PayloadTooLargeResponseError$Outbound, PayloadTooLargeResponseError>>;
|
|
49
|
+
/** @deprecated use `PayloadTooLargeResponseError$Outbound` instead. */
|
|
50
|
+
type Outbound = PayloadTooLargeResponseError$Outbound;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=payloadtoolargeresponseerror.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
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 * as models from "../index.js";
|
|
7
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
8
|
+
/**
|
|
9
|
+
* Payload Too Large - Request payload exceeds size limits
|
|
10
|
+
*/
|
|
11
|
+
export class PayloadTooLargeResponseError extends OpenRouterError {
|
|
12
|
+
constructor(err, httpMeta) {
|
|
13
|
+
const message = err.error?.message
|
|
14
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
15
|
+
super(message, httpMeta);
|
|
16
|
+
this.data$ = err;
|
|
17
|
+
this.error = err.error;
|
|
18
|
+
if (err.userId != null)
|
|
19
|
+
this.userId = err.userId;
|
|
20
|
+
this.name = "PayloadTooLargeResponseError";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const PayloadTooLargeResponseError$inboundSchema = z.object({
|
|
25
|
+
error: models.PayloadTooLargeResponseErrorData$inboundSchema,
|
|
26
|
+
user_id: z.nullable(z.string()).optional(),
|
|
27
|
+
request$: z.custom(x => x instanceof Request),
|
|
28
|
+
response$: z.custom(x => x instanceof Response),
|
|
29
|
+
body$: z.string(),
|
|
30
|
+
})
|
|
31
|
+
.transform((v) => {
|
|
32
|
+
const remapped = remap$(v, {
|
|
33
|
+
"user_id": "userId",
|
|
34
|
+
});
|
|
35
|
+
return new PayloadTooLargeResponseError(remapped, {
|
|
36
|
+
request: v.request$,
|
|
37
|
+
response: v.response$,
|
|
38
|
+
body: v.body$,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const PayloadTooLargeResponseError$outboundSchema = z.custom(x => x instanceof PayloadTooLargeResponseError)
|
|
43
|
+
.transform(v => v.data$)
|
|
44
|
+
.pipe(z.object({
|
|
45
|
+
error: models.PayloadTooLargeResponseErrorData$outboundSchema,
|
|
46
|
+
userId: z.nullable(z.string()).optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
userId: "user_id",
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export var PayloadTooLargeResponseError$;
|
|
57
|
+
(function (PayloadTooLargeResponseError$) {
|
|
58
|
+
/** @deprecated use `PayloadTooLargeResponseError$inboundSchema` instead. */
|
|
59
|
+
PayloadTooLargeResponseError$.inboundSchema = PayloadTooLargeResponseError$inboundSchema;
|
|
60
|
+
/** @deprecated use `PayloadTooLargeResponseError$outboundSchema` instead. */
|
|
61
|
+
PayloadTooLargeResponseError$.outboundSchema = PayloadTooLargeResponseError$outboundSchema;
|
|
62
|
+
})(PayloadTooLargeResponseError$ || (PayloadTooLargeResponseError$ = {}));
|
|
63
|
+
//# sourceMappingURL=payloadtoolargeresponseerror.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Payment Required - Insufficient credits or quota to complete request
|
|
6
|
+
*/
|
|
7
|
+
export type PaymentRequiredResponseErrorData = {
|
|
8
|
+
/**
|
|
9
|
+
* Error data for PaymentRequiredResponse
|
|
10
|
+
*/
|
|
11
|
+
error: models.PaymentRequiredResponseErrorData;
|
|
12
|
+
userId?: string | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Payment Required - Insufficient credits or quota to complete request
|
|
16
|
+
*/
|
|
17
|
+
export declare class PaymentRequiredResponseError extends OpenRouterError {
|
|
18
|
+
/**
|
|
19
|
+
* Error data for PaymentRequiredResponse
|
|
20
|
+
*/
|
|
21
|
+
error: models.PaymentRequiredResponseErrorData;
|
|
22
|
+
userId?: string | null | undefined;
|
|
23
|
+
/** The original data that was passed to this error instance. */
|
|
24
|
+
data$: PaymentRequiredResponseErrorData;
|
|
25
|
+
constructor(err: PaymentRequiredResponseErrorData, httpMeta: {
|
|
26
|
+
response: Response;
|
|
27
|
+
request: Request;
|
|
28
|
+
body: string;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const PaymentRequiredResponseError$inboundSchema: z.ZodType<PaymentRequiredResponseError, unknown>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type PaymentRequiredResponseError$Outbound = {
|
|
35
|
+
error: models.PaymentRequiredResponseErrorData$Outbound;
|
|
36
|
+
user_id?: string | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const PaymentRequiredResponseError$outboundSchema: z.ZodType<PaymentRequiredResponseError$Outbound, PaymentRequiredResponseError>;
|
|
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 declare namespace PaymentRequiredResponseError$ {
|
|
45
|
+
/** @deprecated use `PaymentRequiredResponseError$inboundSchema` instead. */
|
|
46
|
+
const inboundSchema: z.ZodType<PaymentRequiredResponseError, unknown, z.core.$ZodTypeInternals<PaymentRequiredResponseError, unknown>>;
|
|
47
|
+
/** @deprecated use `PaymentRequiredResponseError$outboundSchema` instead. */
|
|
48
|
+
const outboundSchema: z.ZodType<PaymentRequiredResponseError$Outbound, PaymentRequiredResponseError, z.core.$ZodTypeInternals<PaymentRequiredResponseError$Outbound, PaymentRequiredResponseError>>;
|
|
49
|
+
/** @deprecated use `PaymentRequiredResponseError$Outbound` instead. */
|
|
50
|
+
type Outbound = PaymentRequiredResponseError$Outbound;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=paymentrequiredresponseerror.d.ts.map
|