diff options
| author | opencode <[email protected]> | 2025-09-17 07:14:33 +0000 |
|---|---|---|
| committer | opencode <[email protected]> | 2025-09-17 07:14:33 +0000 |
| commit | e618cbc4470bf66cf7f905053d1a5bf368aefd3a (patch) | |
| tree | 631d99a0fd0a12a9497a8955eb3737e7730d7fb7 /packages/sdk/js/src/gen/core/utils.gen.ts | |
| parent | abd99aeb7db5564cbfdf99b42e6a10bf3ccbafd5 (diff) | |
| download | opencode-e618cbc4470bf66cf7f905053d1a5bf368aefd3a.tar.gz opencode-e618cbc4470bf66cf7f905053d1a5bf368aefd3a.zip | |
release: v0.9.8
Diffstat (limited to 'packages/sdk/js/src/gen/core/utils.gen.ts')
| -rw-r--r-- | packages/sdk/js/src/gen/core/utils.gen.ts | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/packages/sdk/js/src/gen/core/utils.gen.ts b/packages/sdk/js/src/gen/core/utils.gen.ts index 8a45f7269..be18c608a 100644 --- a/packages/sdk/js/src/gen/core/utils.gen.ts +++ b/packages/sdk/js/src/gen/core/utils.gen.ts @@ -1,6 +1,6 @@ // This file is auto-generated by @hey-api/openapi-ts -import type { BodySerializer, QuerySerializer } from "./bodySerializer.gen.js" +import type { QuerySerializer } from "./bodySerializer.gen.js" import { type ArraySeparatorStyle, serializeArrayParam, @@ -107,31 +107,3 @@ export const getUrl = ({ } return url } - -export function getValidRequestBody(options: { - body?: unknown - bodySerializer?: BodySerializer | null - serializedBody?: unknown -}) { - const hasBody = options.body !== undefined - const isSerializedBody = hasBody && options.bodySerializer - - if (isSerializedBody) { - if ("serializedBody" in options) { - const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== "" - - return hasSerializedBody ? options.serializedBody : null - } - - // not all clients implement a serializedBody property (i.e. client-axios) - return options.body !== "" ? options.body : null - } - - // plain/text body - if (hasBody) { - return options.body - } - - // no body was provided - return undefined -} |
