@opencode-ai/sdk 1.0.44 → 1.0.45
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.
|
@@ -72,9 +72,7 @@ export const createClient = (config = {}) => {
|
|
|
72
72
|
...result,
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
const parseAs = (opts.parseAs === "auto"
|
|
76
|
-
? getParseAs(response.headers.get("Content-Type"))
|
|
77
|
-
: opts.parseAs) ?? "json";
|
|
75
|
+
const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
|
|
78
76
|
let data;
|
|
79
77
|
switch (parseAs) {
|
|
80
78
|
case "arrayBuffer":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { QuerySerializerOptions } from "../core/bodySerializer.gen.js";
|
|
2
2
|
import type { Client, ClientOptions, Config, RequestOptions } from "./types.gen.js";
|
|
3
|
-
export declare const createQuerySerializer: <T = unknown>({ allowReserved, array, object
|
|
3
|
+
export declare const createQuerySerializer: <T = unknown>({ allowReserved, array, object }?: QuerySerializerOptions) => (queryParams: T) => string;
|
|
4
4
|
/**
|
|
5
5
|
* Infers parseAs value from provided Content-Type header.
|
|
6
6
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { getAuthToken } from "../core/auth.gen.js";
|
|
3
3
|
import { jsonBodySerializer } from "../core/bodySerializer.gen.js";
|
|
4
|
-
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam
|
|
4
|
+
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam } from "../core/pathSerializer.gen.js";
|
|
5
5
|
import { getUrl } from "../core/utils.gen.js";
|
|
6
|
-
export const createQuerySerializer = ({ allowReserved, array, object
|
|
6
|
+
export const createQuerySerializer = ({ allowReserved, array, object } = {}) => {
|
|
7
7
|
const querySerializer = (queryParams) => {
|
|
8
8
|
const search = [];
|
|
9
9
|
if (queryParams && typeof queryParams === "object") {
|
|
@@ -82,9 +82,7 @@ const checkForExistence = (options, name) => {
|
|
|
82
82
|
if (!name) {
|
|
83
83
|
return false;
|
|
84
84
|
}
|
|
85
|
-
if (options.headers.has(name) ||
|
|
86
|
-
options.query?.[name] ||
|
|
87
|
-
options.headers.get("Cookie")?.includes(`${name}=`)) {
|
|
85
|
+
if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
|
|
88
86
|
return true;
|
|
89
87
|
}
|
|
90
88
|
return false;
|
package/dist/gen/client.gen.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { createClient, createConfig
|
|
2
|
+
import { createClient, createConfig } from "./client/index.js";
|
|
3
3
|
export const client = createClient(createConfig({
|
|
4
4
|
baseUrl: "http://localhost:4096",
|
|
5
5
|
}));
|
|
@@ -25,7 +25,7 @@ export declare const separatorObjectExplode: (style: ObjectSeparatorStyle) => ".
|
|
|
25
25
|
export declare const serializeArrayParam: ({ allowReserved, explode, name, style, value, }: SerializeOptions<ArraySeparatorStyle> & {
|
|
26
26
|
value: unknown[];
|
|
27
27
|
}) => string;
|
|
28
|
-
export declare const serializePrimitiveParam: ({ allowReserved, name, value
|
|
28
|
+
export declare const serializePrimitiveParam: ({ allowReserved, name, value }: SerializePrimitiveParam) => string;
|
|
29
29
|
export declare const serializeObjectParam: ({ allowReserved, explode, name, style, value, valueOnly, }: SerializeOptions<ObjectSeparatorStyle> & {
|
|
30
30
|
value: Record<string, unknown> | Date;
|
|
31
31
|
valueOnly?: boolean;
|
|
@@ -64,7 +64,7 @@ export const serializeArrayParam = ({ allowReserved, explode, name, style, value
|
|
|
64
64
|
.join(separator);
|
|
65
65
|
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
66
66
|
};
|
|
67
|
-
export const serializePrimitiveParam = ({ allowReserved, name, value
|
|
67
|
+
export const serializePrimitiveParam = ({ allowReserved, name, value }) => {
|
|
68
68
|
if (value === undefined || value === null) {
|
|
69
69
|
return "";
|
|
70
70
|
}
|