@openrouter/sdk 0.13.16 → 0.13.17
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/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/imagegencompletedevent.d.ts +4 -0
- package/esm/models/imagegencompletedevent.js +2 -0
- package/esm/models/imagegenerationresponse.d.ts +4 -0
- package/esm/models/imagegenerationresponse.js +2 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "0.13.
|
|
52
|
+
readonly sdkVersion: "0.13.17";
|
|
53
53
|
readonly genVersion: "2.884.4";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.13.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.13.17 2.884.4 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
|
|
|
26
26
|
export const SDK_METADATA = {
|
|
27
27
|
language: "typescript",
|
|
28
28
|
openapiDocVersion: "1.0.0",
|
|
29
|
-
sdkVersion: "0.13.
|
|
29
|
+
sdkVersion: "0.13.17",
|
|
30
30
|
genVersion: "2.884.4",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 0.13.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 0.13.17 2.884.4 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -14,6 +14,10 @@ export type ImageGenCompletedEvent = {
|
|
|
14
14
|
* Unix timestamp (seconds) when the image was generated
|
|
15
15
|
*/
|
|
16
16
|
created: number;
|
|
17
|
+
/**
|
|
18
|
+
* Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG). Present for non-raster outputs such as SVG (`image/svg+xml`).
|
|
19
|
+
*/
|
|
20
|
+
mediaType?: string | undefined;
|
|
17
21
|
/**
|
|
18
22
|
* The event type
|
|
19
23
|
*/
|
|
@@ -10,11 +10,13 @@ import { ImageGenerationUsage$inboundSchema, } from "./imagegenerationusage.js";
|
|
|
10
10
|
export const ImageGenCompletedEvent$inboundSchema = z.object({
|
|
11
11
|
b64_json: z.string(),
|
|
12
12
|
created: z.int(),
|
|
13
|
+
media_type: z.string().optional(),
|
|
13
14
|
type: z.literal("image_generation.completed"),
|
|
14
15
|
usage: ImageGenerationUsage$inboundSchema.optional(),
|
|
15
16
|
}).transform((v) => {
|
|
16
17
|
return remap$(v, {
|
|
17
18
|
"b64_json": "b64Json",
|
|
19
|
+
"media_type": "mediaType",
|
|
18
20
|
});
|
|
19
21
|
});
|
|
20
22
|
export function imageGenCompletedEventFromJSON(jsonString) {
|
|
@@ -7,6 +7,10 @@ export type ImageGenerationResponseData = {
|
|
|
7
7
|
* Base64-encoded image bytes
|
|
8
8
|
*/
|
|
9
9
|
b64Json: string;
|
|
10
|
+
/**
|
|
11
|
+
* Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG). Present for non-raster outputs such as SVG (`image/svg+xml`).
|
|
12
|
+
*/
|
|
13
|
+
mediaType?: string | undefined;
|
|
10
14
|
};
|
|
11
15
|
/**
|
|
12
16
|
* Image generation response
|
|
@@ -9,9 +9,11 @@ import { ImageGenerationUsage$inboundSchema, } from "./imagegenerationusage.js";
|
|
|
9
9
|
/** @internal */
|
|
10
10
|
export const ImageGenerationResponseData$inboundSchema = z.object({
|
|
11
11
|
b64_json: z.string(),
|
|
12
|
+
media_type: z.string().optional(),
|
|
12
13
|
}).transform((v) => {
|
|
13
14
|
return remap$(v, {
|
|
14
15
|
"b64_json": "b64Json",
|
|
16
|
+
"media_type": "mediaType",
|
|
15
17
|
});
|
|
16
18
|
});
|
|
17
19
|
export function imageGenerationResponseDataFromJSON(jsonString) {
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.17",
|
|
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
|
-
"
|
|
76
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
77
77
|
"prepare": "npm run build",
|
|
78
78
|
"test": "vitest --run --project unit",
|
|
79
79
|
"test:e2e": "vitest --run --project e2e",
|
|
80
80
|
"test:watch": "vitest --watch --project unit",
|
|
81
|
-
"
|
|
81
|
+
"typecheck:transit": "exit 0",
|
|
82
|
+
"compile": "tsc",
|
|
82
83
|
"test:transit": "exit 0",
|
|
83
|
-
"typecheck": "tsc --noEmit"
|
|
84
|
-
"typecheck:transit": "exit 0"
|
|
84
|
+
"typecheck": "tsc --noEmit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|