@openrouter/sdk 1.3.5 → 1.3.6
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/byokUpdate.d.ts +1 -1
- package/esm/funcs/byokUpdate.js +1 -1
- package/esm/funcs/internsListInterns.js +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/internlistresponse.d.ts +4 -0
- package/esm/models/internlistresponse.js +2 -0
- package/esm/models/operations/listinterns.d.ts +5 -0
- package/esm/models/operations/listinterns.js +2 -0
- package/jsr.json +1 -1
- package/package.json +4 -4
|
@@ -15,5 +15,5 @@ import { Result } from "../types/fp.js";
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys (`null` clears the restriction). [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
|
-
export declare function byokUpdate(client: OpenRouterCore, request: operations.UpdateBYOKKeyRequest, options?: RequestOptions): APIPromise<Result<models.UpdateBYOKKeyResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
export declare function byokUpdate(client: OpenRouterCore, request: operations.UpdateBYOKKeyRequest, options?: RequestOptions): APIPromise<Result<models.UpdateBYOKKeyResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=byokUpdate.d.ts.map
|
package/esm/funcs/byokUpdate.js
CHANGED
|
@@ -97,7 +97,7 @@ async function $do(client, request, options) {
|
|
|
97
97
|
const responseFields = {
|
|
98
98
|
HttpMeta: { Response: response, Request: req },
|
|
99
99
|
};
|
|
100
|
-
const [result] = await M.match(M.json(200, models.UpdateBYOKKeyResponse$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 });
|
|
100
|
+
const [result] = await M.match(M.json(200, models.UpdateBYOKKeyResponse$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 });
|
|
101
101
|
if (!result.ok) {
|
|
102
102
|
return [result, { status: "complete", request: req, response }];
|
|
103
103
|
}
|
|
@@ -36,6 +36,7 @@ async function $do(client, request, options) {
|
|
|
36
36
|
"status": payload?.status,
|
|
37
37
|
}, { explode: false }), encodeFormQuery({
|
|
38
38
|
"limit": payload?.limit,
|
|
39
|
+
"starting_after": payload?.starting_after,
|
|
39
40
|
"workspace_id": payload?.workspace_id,
|
|
40
41
|
}));
|
|
41
42
|
const headers = new Headers(compactMap({
|
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.3.
|
|
53
|
+
readonly sdkVersion: "1.3.6";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.3.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.3.6 2.914.0 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.3.
|
|
32
|
+
sdkVersion: "1.3.6",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.3.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.3.6 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -11,6 +11,10 @@ export type InternListResponse = {
|
|
|
11
11
|
* True when more interns match the current filters.
|
|
12
12
|
*/
|
|
13
13
|
hasMore: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Opaque cursor, present when `has_more` is true. Pass it as `starting_after` to fetch the next page.
|
|
16
|
+
*/
|
|
17
|
+
nextCursor?: string | undefined;
|
|
14
18
|
};
|
|
15
19
|
/** @internal */
|
|
16
20
|
export declare const InternListResponse$inboundSchema: z.ZodType<InternListResponse, unknown>;
|
|
@@ -10,9 +10,11 @@ import { Intern$inboundSchema } from "./intern.js";
|
|
|
10
10
|
export const InternListResponse$inboundSchema = z.object({
|
|
11
11
|
data: z.array(Intern$inboundSchema),
|
|
12
12
|
has_more: z.boolean(),
|
|
13
|
+
next_cursor: z.string().optional(),
|
|
13
14
|
}).transform((v) => {
|
|
14
15
|
return remap$(v, {
|
|
15
16
|
"has_more": "hasMore",
|
|
17
|
+
"next_cursor": "nextCursor",
|
|
16
18
|
});
|
|
17
19
|
});
|
|
18
20
|
export function internListResponseFromJSON(jsonString) {
|
|
@@ -60,6 +60,10 @@ export type ListInternsRequest = {
|
|
|
60
60
|
* Comma-separated lifecycle statuses to include.
|
|
61
61
|
*/
|
|
62
62
|
status?: Array<Status> | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* The opaque `next_cursor` of the previous page. Returns the interns that come after it in the newest-first order. A malformed cursor is a 400.
|
|
65
|
+
*/
|
|
66
|
+
startingAfter?: string | undefined;
|
|
63
67
|
/**
|
|
64
68
|
* Only return interns in this workspace. It must match the API key workspace.
|
|
65
69
|
*/
|
|
@@ -74,6 +78,7 @@ export type ListInternsRequest$Outbound = {
|
|
|
74
78
|
appCategories?: string | undefined;
|
|
75
79
|
limit?: number | undefined;
|
|
76
80
|
status?: Array<string> | undefined;
|
|
81
|
+
starting_after?: string | undefined;
|
|
77
82
|
workspace_id?: string | undefined;
|
|
78
83
|
};
|
|
79
84
|
/** @internal */
|
|
@@ -25,10 +25,12 @@ export const ListInternsRequest$outboundSchema = z.object({
|
|
|
25
25
|
appCategories: z.string().optional(),
|
|
26
26
|
limit: z.int().optional(),
|
|
27
27
|
status: z.array(Status$outboundSchema).optional(),
|
|
28
|
+
startingAfter: z.string().optional(),
|
|
28
29
|
workspaceId: z.string().optional(),
|
|
29
30
|
}).transform((v) => {
|
|
30
31
|
return remap$(v, {
|
|
31
32
|
httpReferer: "HTTP-Referer",
|
|
33
|
+
startingAfter: "starting_after",
|
|
32
34
|
workspaceId: "workspace_id",
|
|
33
35
|
});
|
|
34
36
|
});
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
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",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"typecheck": "tsc --noEmit",
|
|
77
|
-
"typecheck:transit": "exit 0",
|
|
78
76
|
"compile": "tsc",
|
|
79
77
|
"postinstall": "node scripts/check-types.js || true",
|
|
80
78
|
"prepare": "npm run build",
|
|
81
79
|
"test:e2e": "vitest --run --project e2e",
|
|
82
80
|
"test:transit": "exit 0",
|
|
81
|
+
"typecheck:transit": "exit 0",
|
|
82
|
+
"test": "vitest --run --project unit",
|
|
83
83
|
"test:watch": "vitest --watch --project unit",
|
|
84
|
-
"
|
|
84
|
+
"typecheck": "tsc --noEmit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|