@openrouter/sdk 1.5.3 → 1.5.5
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/esm/funcs/externalUsersGet.d.ts +1 -1
- package/esm/funcs/externalUsersGet.js +2 -2
- package/esm/funcs/externalUsersList.d.ts +1 -1
- package/esm/funcs/externalUsersList.js +2 -2
- package/esm/funcs/generationsSubmitFeedback.d.ts +1 -1
- package/esm/funcs/generationsSubmitFeedback.js +2 -2
- package/esm/funcs/presetsGet.d.ts +1 -1
- package/esm/funcs/presetsGet.js +2 -2
- package/esm/funcs/presetsGetVersion.d.ts +1 -1
- package/esm/funcs/presetsGetVersion.js +2 -2
- package/esm/funcs/presetsList.d.ts +1 -1
- package/esm/funcs/presetsList.js +2 -2
- package/esm/funcs/presetsListVersions.d.ts +1 -1
- package/esm/funcs/presetsListVersions.js +2 -2
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/privateendpointpricing.d.ts +2 -2
- package/jsr.json +1 -1
- package/package.json +5 -5
|
@@ -15,5 +15,5 @@ import { Result } from "../types/fp.js";
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* Retrieve an active or inactive registration by its URL-encoded, caller-supplied tracking ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
|
-
export declare function externalUsersGet(client: OpenRouterCore, request: operations.GetExternalUserRequest, options?: RequestOptions): APIPromise<Result<models.ExternalUserResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
export declare function externalUsersGet(client: OpenRouterCore, request: operations.GetExternalUserRequest, options?: RequestOptions): APIPromise<Result<models.ExternalUserResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=externalUsersGet.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { ExternalUserResponse$inboundSchema as models_ExternalUserResponse$inboundSchema } from "../models/externaluserresponse.js";
|
|
14
14
|
import { GetExternalUserRequest$outboundSchema as operations_GetExternalUserRequest$outboundSchema } from "../models/operations/getexternaluser.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
@@ -94,7 +94,7 @@ async function $do(client, request, options) {
|
|
|
94
94
|
const responseFields = {
|
|
95
95
|
HttpMeta: { Response: response, Request: req },
|
|
96
96
|
};
|
|
97
|
-
const [result] = await M.match(M.json(200, models_ExternalUserResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
97
|
+
const [result] = await M.match(M.json(200, models_ExternalUserResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
98
98
|
if (!result.ok) {
|
|
99
99
|
return [result, { status: "complete", request: req, response }];
|
|
100
100
|
}
|
|
@@ -15,7 +15,7 @@ import { PageIterator } from "../types/operations.js";
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* List registrations belonging to the authenticated organization. Inactive registrations are excluded by default. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
|
-
export declare function externalUsersList(client: OpenRouterCore, request?: operations.ListExternalUsersRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListExternalUsersResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
18
|
+
export declare function externalUsersList(client: OpenRouterCore, request?: operations.ListExternalUsersRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListExternalUsersResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
19
19
|
offset: number;
|
|
20
20
|
}>>;
|
|
21
21
|
//# sourceMappingURL=externalUsersList.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { ListExternalUsersRequest$outboundSchema as operations_ListExternalUsersRequest$outboundSchema, ListExternalUsersResponse$inboundSchema as operations_ListExternalUsersResponse$inboundSchema } from "../models/operations/listexternalusers.js";
|
|
14
14
|
import { APIPromise } from "../types/async.js";
|
|
15
15
|
import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
@@ -97,7 +97,7 @@ async function $do(client, request, options) {
|
|
|
97
97
|
};
|
|
98
98
|
const [result, raw] = await M.match(M.json(200, operations_ListExternalUsersResponse$inboundSchema, {
|
|
99
99
|
key: "Result",
|
|
100
|
-
}), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
100
|
+
}), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
101
101
|
if (!result.ok) {
|
|
102
102
|
return [haltIterator(result), {
|
|
103
103
|
status: "complete",
|
|
@@ -15,5 +15,5 @@ import { Result } from "../types/fp.js";
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* Submit structured feedback on a generation the authenticated user made. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
|
-
export declare function generationsSubmitFeedback(client: OpenRouterCore, request: operations.SubmitGenerationFeedbackRequest, options?: RequestOptions): APIPromise<Result<models.SubmitGenerationFeedbackResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
export declare function generationsSubmitFeedback(client: OpenRouterCore, request: operations.SubmitGenerationFeedbackRequest, options?: RequestOptions): APIPromise<Result<models.SubmitGenerationFeedbackResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.ConflictResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=generationsSubmitFeedback.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ConflictResponseError$inboundSchema as errors_ConflictResponseError$inboundSchema } from "../models/errors/conflictresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { SubmitGenerationFeedbackResponse$inboundSchema as models_SubmitGenerationFeedbackResponse$inboundSchema } from "../models/submitgenerationfeedbackresponse.js";
|
|
14
14
|
import { SubmitGenerationFeedbackRequest$outboundSchema as operations_SubmitGenerationFeedbackRequest$outboundSchema } from "../models/operations/submitgenerationfeedback.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
@@ -91,7 +91,7 @@ async function $do(client, request, options) {
|
|
|
91
91
|
const responseFields = {
|
|
92
92
|
HttpMeta: { Response: response, Request: req },
|
|
93
93
|
};
|
|
94
|
-
const [result] = await M.match(M.json(200, models_SubmitGenerationFeedbackResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
94
|
+
const [result] = await M.match(M.json(200, models_SubmitGenerationFeedbackResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(409, errors_ConflictResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
95
95
|
if (!result.ok) {
|
|
96
96
|
return [result, { status: "complete", request: req, response }];
|
|
97
97
|
}
|
|
@@ -17,5 +17,5 @@ import { Result } from "../types/fp.js";
|
|
|
17
17
|
*
|
|
18
18
|
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
19
19
|
*/
|
|
20
|
-
export declare function presetsGet(client: OpenRouterCore, request: operations.GetPresetRequest, options?: RequestOptions): APIPromise<Result<models.GetPresetResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
20
|
+
export declare function presetsGet(client: OpenRouterCore, request: operations.GetPresetRequest, options?: RequestOptions): APIPromise<Result<models.GetPresetResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
21
21
|
//# sourceMappingURL=presetsGet.d.ts.map
|
package/esm/funcs/presetsGet.js
CHANGED
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { GetPresetResponse$inboundSchema as models_GetPresetResponse$inboundSchema } from "../models/getpresetresponse.js";
|
|
14
14
|
import { GetPresetRequest$outboundSchema as operations_GetPresetRequest$outboundSchema } from "../models/operations/getpreset.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
@@ -96,7 +96,7 @@ async function $do(client, request, options) {
|
|
|
96
96
|
const responseFields = {
|
|
97
97
|
HttpMeta: { Response: response, Request: req },
|
|
98
98
|
};
|
|
99
|
-
const [result] = await M.match(M.json(200, models_GetPresetResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
99
|
+
const [result] = await M.match(M.json(200, models_GetPresetResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
100
100
|
if (!result.ok) {
|
|
101
101
|
return [result, { status: "complete", request: req, response }];
|
|
102
102
|
}
|
|
@@ -17,5 +17,5 @@ import { Result } from "../types/fp.js";
|
|
|
17
17
|
*
|
|
18
18
|
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
19
19
|
*/
|
|
20
|
-
export declare function presetsGetVersion(client: OpenRouterCore, request: operations.GetPresetVersionRequest, options?: RequestOptions): APIPromise<Result<models.GetPresetVersionResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
20
|
+
export declare function presetsGetVersion(client: OpenRouterCore, request: operations.GetPresetVersionRequest, options?: RequestOptions): APIPromise<Result<models.GetPresetVersionResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
21
21
|
//# sourceMappingURL=presetsGetVersion.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { GetPresetVersionResponse$inboundSchema as models_GetPresetVersionResponse$inboundSchema } from "../models/getpresetversionresponse.js";
|
|
14
14
|
import { GetPresetVersionRequest$outboundSchema as operations_GetPresetVersionRequest$outboundSchema } from "../models/operations/getpresetversion.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
@@ -100,7 +100,7 @@ async function $do(client, request, options) {
|
|
|
100
100
|
const responseFields = {
|
|
101
101
|
HttpMeta: { Response: response, Request: req },
|
|
102
102
|
};
|
|
103
|
-
const [result] = await M.match(M.json(200, models_GetPresetVersionResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
103
|
+
const [result] = await M.match(M.json(200, models_GetPresetVersionResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
104
104
|
if (!result.ok) {
|
|
105
105
|
return [result, { status: "complete", request: req, response }];
|
|
106
106
|
}
|
|
@@ -17,7 +17,7 @@ import { PageIterator } from "../types/operations.js";
|
|
|
17
17
|
*
|
|
18
18
|
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
19
19
|
*/
|
|
20
|
-
export declare function presetsList(client: OpenRouterCore, request?: operations.ListPresetsRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListPresetsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
20
|
+
export declare function presetsList(client: OpenRouterCore, request?: operations.ListPresetsRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListPresetsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
21
21
|
offset: number;
|
|
22
22
|
}>>;
|
|
23
23
|
//# sourceMappingURL=presetsList.d.ts.map
|
package/esm/funcs/presetsList.js
CHANGED
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { ListPresetsRequest$outboundSchema as operations_ListPresetsRequest$outboundSchema, ListPresetsResponse$inboundSchema as operations_ListPresetsResponse$inboundSchema } from "../models/operations/listpresets.js";
|
|
14
14
|
import { APIPromise } from "../types/async.js";
|
|
15
15
|
import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
@@ -97,7 +97,7 @@ async function $do(client, request, options) {
|
|
|
97
97
|
};
|
|
98
98
|
const [result, raw] = await M.match(M.json(200, operations_ListPresetsResponse$inboundSchema, {
|
|
99
99
|
key: "Result",
|
|
100
|
-
}), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
100
|
+
}), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
101
101
|
if (!result.ok) {
|
|
102
102
|
return [haltIterator(result), {
|
|
103
103
|
status: "complete",
|
|
@@ -17,7 +17,7 @@ import { PageIterator } from "../types/operations.js";
|
|
|
17
17
|
*
|
|
18
18
|
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
19
19
|
*/
|
|
20
|
-
export declare function presetsListVersions(client: OpenRouterCore, request: operations.ListPresetVersionsRequest, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListPresetVersionsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
20
|
+
export declare function presetsListVersions(client: OpenRouterCore, request: operations.ListPresetVersionsRequest, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListPresetVersionsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
21
21
|
offset: number;
|
|
22
22
|
}>>;
|
|
23
23
|
//# sourceMappingURL=presetsListVersions.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { ListPresetVersionsRequest$outboundSchema as operations_ListPresetVersionsRequest$outboundSchema, ListPresetVersionsResponse$inboundSchema as operations_ListPresetVersionsResponse$inboundSchema } from "../models/operations/listpresetversions.js";
|
|
14
14
|
import { APIPromise } from "../types/async.js";
|
|
15
15
|
import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
@@ -103,7 +103,7 @@ async function $do(client, request, options) {
|
|
|
103
103
|
};
|
|
104
104
|
const [result, raw] = await M.match(M.json(200, operations_ListPresetVersionsResponse$inboundSchema, {
|
|
105
105
|
key: "Result",
|
|
106
|
-
}), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
106
|
+
}), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
107
107
|
if (!result.ok) {
|
|
108
108
|
return [haltIterator(result), {
|
|
109
109
|
status: "complete",
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
50
50
|
export declare const SDK_METADATA: {
|
|
51
51
|
readonly language: "typescript";
|
|
52
52
|
readonly openapiDocVersion: "1.0.0";
|
|
53
|
-
readonly sdkVersion: "1.5.
|
|
53
|
+
readonly sdkVersion: "1.5.5";
|
|
54
54
|
readonly genVersion: "2.948.4";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.5 2.948.4 1.0.0 @openrouter/sdk";
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
|
|
|
29
29
|
export const SDK_METADATA = {
|
|
30
30
|
language: "typescript",
|
|
31
31
|
openapiDocVersion: "1.0.0",
|
|
32
|
-
sdkVersion: "1.5.
|
|
32
|
+
sdkVersion: "1.5.5",
|
|
33
33
|
genVersion: "2.948.4",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.5 2.948.4 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -6,11 +6,11 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export type PrivateEndpointPricing = {
|
|
8
8
|
/**
|
|
9
|
-
* USD per cache-read prompt token, as a decimal string.
|
|
9
|
+
* USD per cache-read prompt token, as a decimal string. When omitted, inherited from the public endpoint of the same model and provider: scaled by its cache-read to prompt ratio, or left at the pricing strategy default when it publishes no cache-read rate. Required when there is no such endpoint and the provider bills cache reads.
|
|
10
10
|
*/
|
|
11
11
|
cacheRead?: string | undefined;
|
|
12
12
|
/**
|
|
13
|
-
* USD per cache-write prompt token, as a decimal string.
|
|
13
|
+
* USD per cache-write prompt token, as a decimal string. When omitted, inherited from the public endpoint of the same model and provider: scaled by its cache-write to prompt ratio, or left at the pricing strategy default when it publishes no cache-write rate. Required when there is no such endpoint and the provider bills cache writes.
|
|
14
14
|
*/
|
|
15
15
|
cacheWrite?: string | undefined;
|
|
16
16
|
/**
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
+
"typecheck:transit": "exit 0",
|
|
76
77
|
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
77
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
78
78
|
"prepare": "npm run build",
|
|
79
|
+
"typecheck": "tsc --noEmit",
|
|
80
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
79
81
|
"test": "vitest --run --project unit",
|
|
80
82
|
"test:e2e": "vitest --run --project e2e",
|
|
81
|
-
"test:watch": "vitest --watch --project unit",
|
|
82
|
-
"typecheck": "tsc --noEmit",
|
|
83
83
|
"test:transit": "exit 0",
|
|
84
|
-
"
|
|
84
|
+
"test:watch": "vitest --watch --project unit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|