From f9e318730f4527047f1855729d76d62c1438e405 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Sep 2025 23:21:30 +0000 Subject: [PATCH 1/5] Initial plan From da960781ed94fe5a15fc417c688cd15f3725a889 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Sep 2025 23:43:58 +0000 Subject: [PATCH 2/5] Replace BodyInit with custom RequestBody type to remove DOM dependency Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com> --- .../body-response-text-plain/client/client.gen.ts | 3 ++- .../body-response-text-plain/client/types.gen.ts | 13 +++++++++++++ .../2.0.x/form-data/client/client.gen.ts | 3 ++- .../2.0.x/form-data/client/types.gen.ts | 13 +++++++++++++ .../common/default-class/client/client.gen.ts | 3 ++- .../common/default-class/client/types.gen.ts | 13 +++++++++++++ .../@angular/common/default/client/client.gen.ts | 3 ++- .../@angular/common/default/client/types.gen.ts | 13 +++++++++++++ .../client/client.gen.ts | 3 ++- .../sdk-nested-classes-instance/client/types.gen.ts | 13 +++++++++++++ .../sdk-nested-classes/client/client.gen.ts | 3 ++- .../sdk-nested-classes/client/types.gen.ts | 13 +++++++++++++ .../@hey-api/sdk/default/client/client.gen.ts | 3 ++- .../@hey-api/sdk/default/client/types.gen.ts | 13 +++++++++++++ .../@hey-api/sdk/instance/client/client.gen.ts | 3 ++- .../@hey-api/sdk/instance/client/types.gen.ts | 13 +++++++++++++ .../@hey-api/sdk/throwOnError/client/client.gen.ts | 3 ++- .../@hey-api/sdk/throwOnError/client/types.gen.ts | 13 +++++++++++++ .../type-format-valibot/client/client.gen.ts | 3 ++- .../type-format-valibot/client/types.gen.ts | 13 +++++++++++++ .../type-format-zod/client/client.gen.ts | 3 ++- .../type-format-zod/client/types.gen.ts | 13 +++++++++++++ .../client/client.gen.ts | 3 ++- .../client/types.gen.ts | 13 +++++++++++++ .../client/client.gen.ts | 3 ++- .../client/types.gen.ts | 13 +++++++++++++ .../@pinia/colada/asClass/client/client.gen.ts | 3 ++- .../@pinia/colada/asClass/client/types.gen.ts | 13 +++++++++++++ .../@pinia/colada/fetch/client/client.gen.ts | 3 ++- .../plugins/@pinia/colada/fetch/client/types.gen.ts | 13 +++++++++++++ .../asClass/client/client.gen.ts | 3 ++- .../asClass/client/types.gen.ts | 13 +++++++++++++ .../axios/client/client.gen.ts | 4 ++-- .../axios/client/types.gen.ts | 13 +++++++++++++ .../fetch/client/client.gen.ts | 3 ++- .../fetch/client/types.gen.ts | 13 +++++++++++++ .../name-builder/client/client.gen.ts | 3 ++- .../name-builder/client/types.gen.ts | 13 +++++++++++++ .../react-query/asClass/client/client.gen.ts | 3 ++- .../react-query/asClass/client/types.gen.ts | 13 +++++++++++++ .../react-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/react-query/axios/client/types.gen.ts | 13 +++++++++++++ .../react-query/fetch/client/client.gen.ts | 3 ++- .../@tanstack/react-query/fetch/client/types.gen.ts | 13 +++++++++++++ .../react-query/name-builder/client/client.gen.ts | 3 ++- .../react-query/name-builder/client/types.gen.ts | 13 +++++++++++++ .../solid-query/asClass/client/client.gen.ts | 3 ++- .../solid-query/asClass/client/types.gen.ts | 13 +++++++++++++ .../solid-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/solid-query/axios/client/types.gen.ts | 13 +++++++++++++ .../solid-query/fetch/client/client.gen.ts | 3 ++- .../@tanstack/solid-query/fetch/client/types.gen.ts | 13 +++++++++++++ .../solid-query/name-builder/client/client.gen.ts | 3 ++- .../solid-query/name-builder/client/types.gen.ts | 13 +++++++++++++ .../svelte-query/asClass/client/client.gen.ts | 3 ++- .../svelte-query/asClass/client/types.gen.ts | 13 +++++++++++++ .../svelte-query/axios/client/client.gen.ts | 4 ++-- .../svelte-query/axios/client/types.gen.ts | 13 +++++++++++++ .../svelte-query/fetch/client/client.gen.ts | 3 ++- .../svelte-query/fetch/client/types.gen.ts | 13 +++++++++++++ .../svelte-query/name-builder/client/client.gen.ts | 3 ++- .../svelte-query/name-builder/client/types.gen.ts | 13 +++++++++++++ .../vue-query/asClass/client/client.gen.ts | 3 ++- .../@tanstack/vue-query/asClass/client/types.gen.ts | 13 +++++++++++++ .../@tanstack/vue-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/vue-query/axios/client/types.gen.ts | 13 +++++++++++++ .../@tanstack/vue-query/fetch/client/client.gen.ts | 3 ++- .../@tanstack/vue-query/fetch/client/types.gen.ts | 13 +++++++++++++ .../vue-query/name-builder/client/client.gen.ts | 3 ++- .../vue-query/name-builder/client/types.gen.ts | 13 +++++++++++++ .../2.0.x/schema-unknown/client/client.gen.ts | 3 ++- .../2.0.x/schema-unknown/client/types.gen.ts | 13 +++++++++++++ .../2.0.x/security-api-key/client/client.gen.ts | 3 ++- .../2.0.x/security-api-key/client/types.gen.ts | 13 +++++++++++++ .../2.0.x/security-basic/client/client.gen.ts | 3 ++- .../2.0.x/security-basic/client/types.gen.ts | 13 +++++++++++++ .../2.0.x/security-false/client/client.gen.ts | 3 ++- .../2.0.x/security-false/client/types.gen.ts | 13 +++++++++++++ .../2.0.x/security-oauth2/client/client.gen.ts | 3 ++- .../2.0.x/security-oauth2/client/types.gen.ts | 13 +++++++++++++ .../2.0.x/servers-base-path/client/client.gen.ts | 3 ++- .../2.0.x/servers-base-path/client/types.gen.ts | 13 +++++++++++++ .../2.0.x/servers-host/client/client.gen.ts | 3 ++- .../2.0.x/servers-host/client/types.gen.ts | 13 +++++++++++++ .../2.0.x/servers/client/client.gen.ts | 3 ++- .../__snapshots__/2.0.x/servers/client/types.gen.ts | 13 +++++++++++++ .../transforms-read-write/client/client.gen.ts | 3 ++- .../2.0.x/transforms-read-write/client/types.gen.ts | 13 +++++++++++++ .../body-response-text-plain/client/client.gen.ts | 3 ++- .../body-response-text-plain/client/types.gen.ts | 13 +++++++++++++ .../3.0.x/content-types/client/client.gen.ts | 4 ++-- .../3.0.x/content-types/client/types.gen.ts | 13 +++++++++++++ .../internal-name-conflict/client/client.gen.ts | 3 ++- .../internal-name-conflict/client/types.gen.ts | 13 +++++++++++++ .../client/client.gen.ts | 4 ++-- .../client/types.gen.ts | 13 +++++++++++++ .../parameter-explode-false/client/client.gen.ts | 3 ++- .../parameter-explode-false/client/types.gen.ts | 13 +++++++++++++ .../common/default-class/client/client.gen.ts | 3 ++- .../common/default-class/client/types.gen.ts | 13 +++++++++++++ .../@angular/common/default/client/client.gen.ts | 3 ++- .../@angular/common/default/client/types.gen.ts | 13 +++++++++++++ .../client/client.gen.ts | 3 ++- .../sdk-nested-classes-instance/client/types.gen.ts | 13 +++++++++++++ .../sdk-nested-classes/client/client.gen.ts | 3 ++- .../sdk-nested-classes/client/types.gen.ts | 13 +++++++++++++ .../@hey-api/sdk/default/client/client.gen.ts | 3 ++- .../@hey-api/sdk/default/client/types.gen.ts | 13 +++++++++++++ .../@hey-api/sdk/instance/client/client.gen.ts | 3 ++- .../@hey-api/sdk/instance/client/types.gen.ts | 13 +++++++++++++ .../@hey-api/sdk/throwOnError/client/client.gen.ts | 3 ++- .../@hey-api/sdk/throwOnError/client/types.gen.ts | 13 +++++++++++++ .../type-format-valibot/client/client.gen.ts | 3 ++- .../type-format-valibot/client/types.gen.ts | 13 +++++++++++++ .../type-format-zod/client/client.gen.ts | 3 ++- .../type-format-zod/client/types.gen.ts | 13 +++++++++++++ .../client/client.gen.ts | 3 ++- .../client/types.gen.ts | 13 +++++++++++++ .../client/client.gen.ts | 3 ++- .../client/types.gen.ts | 13 +++++++++++++ .../@pinia/colada/asClass/client/client.gen.ts | 3 ++- .../@pinia/colada/asClass/client/types.gen.ts | 13 +++++++++++++ .../@pinia/colada/fetch/client/client.gen.ts | 3 ++- .../plugins/@pinia/colada/fetch/client/types.gen.ts | 13 +++++++++++++ .../asClass/client/client.gen.ts | 3 ++- .../asClass/client/types.gen.ts | 13 +++++++++++++ .../axios/client/client.gen.ts | 4 ++-- .../axios/client/types.gen.ts | 13 +++++++++++++ .../fetch/client/client.gen.ts | 3 ++- .../fetch/client/types.gen.ts | 13 +++++++++++++ .../name-builder/client/client.gen.ts | 3 ++- .../name-builder/client/types.gen.ts | 13 +++++++++++++ .../react-query/asClass/client/client.gen.ts | 3 ++- .../react-query/asClass/client/types.gen.ts | 13 +++++++++++++ .../react-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/react-query/axios/client/types.gen.ts | 13 +++++++++++++ .../react-query/fetch/client/client.gen.ts | 3 ++- .../@tanstack/react-query/fetch/client/types.gen.ts | 13 +++++++++++++ .../react-query/name-builder/client/client.gen.ts | 3 ++- .../react-query/name-builder/client/types.gen.ts | 13 +++++++++++++ .../solid-query/asClass/client/client.gen.ts | 3 ++- .../solid-query/asClass/client/types.gen.ts | 13 +++++++++++++ .../solid-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/solid-query/axios/client/types.gen.ts | 13 +++++++++++++ .../solid-query/fetch/client/client.gen.ts | 3 ++- .../@tanstack/solid-query/fetch/client/types.gen.ts | 13 +++++++++++++ .../solid-query/name-builder/client/client.gen.ts | 3 ++- .../solid-query/name-builder/client/types.gen.ts | 13 +++++++++++++ .../svelte-query/asClass/client/client.gen.ts | 3 ++- .../svelte-query/asClass/client/types.gen.ts | 13 +++++++++++++ .../svelte-query/axios/client/client.gen.ts | 4 ++-- .../svelte-query/axios/client/types.gen.ts | 13 +++++++++++++ .../svelte-query/fetch/client/client.gen.ts | 3 ++- .../svelte-query/fetch/client/types.gen.ts | 13 +++++++++++++ .../svelte-query/name-builder/client/client.gen.ts | 3 ++- .../svelte-query/name-builder/client/types.gen.ts | 13 +++++++++++++ .../vue-query/asClass/client/client.gen.ts | 3 ++- .../@tanstack/vue-query/asClass/client/types.gen.ts | 13 +++++++++++++ .../@tanstack/vue-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/vue-query/axios/client/types.gen.ts | 13 +++++++++++++ .../@tanstack/vue-query/fetch/client/client.gen.ts | 3 ++- .../@tanstack/vue-query/fetch/client/types.gen.ts | 13 +++++++++++++ .../vue-query/name-builder/client/client.gen.ts | 3 ++- .../vue-query/name-builder/client/types.gen.ts | 13 +++++++++++++ .../3.0.x/security-api-key/client/client.gen.ts | 3 ++- .../3.0.x/security-api-key/client/types.gen.ts | 13 +++++++++++++ .../3.0.x/security-false/client/client.gen.ts | 3 ++- .../3.0.x/security-false/client/types.gen.ts | 13 +++++++++++++ .../3.0.x/security-http-bearer/client/client.gen.ts | 3 ++- .../3.0.x/security-http-bearer/client/types.gen.ts | 13 +++++++++++++ .../3.0.x/security-oauth2/client/client.gen.ts | 3 ++- .../3.0.x/security-oauth2/client/types.gen.ts | 13 +++++++++++++ .../security-open-id-connect/client/client.gen.ts | 3 ++- .../security-open-id-connect/client/types.gen.ts | 13 +++++++++++++ .../3.0.x/servers/client/client.gen.ts | 3 ++- .../__snapshots__/3.0.x/servers/client/types.gen.ts | 13 +++++++++++++ .../3.0.x/transformers-all-of/client/client.gen.ts | 3 ++- .../3.0.x/transformers-all-of/client/types.gen.ts | 13 +++++++++++++ .../transformers-any-of-null/client/client.gen.ts | 3 ++- .../transformers-any-of-null/client/types.gen.ts | 13 +++++++++++++ .../3.0.x/transformers-array/client/client.gen.ts | 3 ++- .../3.0.x/transformers-array/client/types.gen.ts | 13 +++++++++++++ .../transforms-read-write/client/client.gen.ts | 3 ++- .../3.0.x/transforms-read-write/client/types.gen.ts | 13 +++++++++++++ .../body-response-text-plain/client/client.gen.ts | 3 ++- .../body-response-text-plain/client/types.gen.ts | 13 +++++++++++++ .../base-url-false/client/client.gen.ts | 4 ++-- .../client-axios/base-url-false/client/types.gen.ts | 13 +++++++++++++ .../base-url-number/client/client.gen.ts | 4 ++-- .../base-url-number/client/types.gen.ts | 13 +++++++++++++ .../base-url-strict/client/client.gen.ts | 4 ++-- .../base-url-strict/client/types.gen.ts | 13 +++++++++++++ .../base-url-string/client/client.gen.ts | 4 ++-- .../base-url-string/client/types.gen.ts | 13 +++++++++++++ .../client-axios/clean-false/client/client.gen.ts | 4 ++-- .../client-axios/clean-false/client/types.gen.ts | 13 +++++++++++++ .../client-axios/default/client/client.gen.ts | 4 ++-- .../client-axios/default/client/types.gen.ts | 13 +++++++++++++ .../sdk-client-optional/client/client.gen.ts | 4 ++-- .../sdk-client-optional/client/types.gen.ts | 13 +++++++++++++ .../sdk-client-required/client/client.gen.ts | 4 ++-- .../sdk-client-required/client/types.gen.ts | 13 +++++++++++++ .../tsconfig-nodenext-sdk/client/client.gen.ts | 4 ++-- .../tsconfig-nodenext-sdk/client/types.gen.ts | 13 +++++++++++++ .../base-url-false/client/client.gen.ts | 3 ++- .../client-fetch/base-url-false/client/types.gen.ts | 13 +++++++++++++ .../base-url-number/client/client.gen.ts | 3 ++- .../base-url-number/client/types.gen.ts | 13 +++++++++++++ .../base-url-strict/client/client.gen.ts | 3 ++- .../base-url-strict/client/types.gen.ts | 13 +++++++++++++ .../base-url-string/client/client.gen.ts | 3 ++- .../base-url-string/client/types.gen.ts | 13 +++++++++++++ .../client-fetch/clean-false/client/client.gen.ts | 3 ++- .../client-fetch/clean-false/client/types.gen.ts | 13 +++++++++++++ .../client-fetch/default/client/client.gen.ts | 3 ++- .../client-fetch/default/client/types.gen.ts | 13 +++++++++++++ .../sdk-client-optional/client/client.gen.ts | 3 ++- .../sdk-client-optional/client/types.gen.ts | 13 +++++++++++++ .../sdk-client-required/client/client.gen.ts | 3 ++- .../sdk-client-required/client/types.gen.ts | 13 +++++++++++++ .../tsconfig-nodenext-sdk/client/client.gen.ts | 3 ++- .../tsconfig-nodenext-sdk/client/types.gen.ts | 13 +++++++++++++ .../client-next/base-url-false/client/client.gen.ts | 3 ++- .../client-next/base-url-false/client/types.gen.ts | 13 +++++++++++++ .../base-url-number/client/client.gen.ts | 3 ++- .../client-next/base-url-number/client/types.gen.ts | 13 +++++++++++++ .../base-url-strict/client/client.gen.ts | 3 ++- .../client-next/base-url-strict/client/types.gen.ts | 13 +++++++++++++ .../base-url-string/client/client.gen.ts | 3 ++- .../client-next/base-url-string/client/types.gen.ts | 13 +++++++++++++ .../client-next/clean-false/client/client.gen.ts | 3 ++- .../client-next/clean-false/client/types.gen.ts | 13 +++++++++++++ .../client-next/default/client/client.gen.ts | 3 ++- .../client-next/default/client/types.gen.ts | 13 +++++++++++++ .../sdk-client-optional/client/client.gen.ts | 3 ++- .../sdk-client-optional/client/types.gen.ts | 13 +++++++++++++ .../sdk-client-required/client/client.gen.ts | 3 ++- .../sdk-client-required/client/types.gen.ts | 13 +++++++++++++ .../tsconfig-nodenext-sdk/client/client.gen.ts | 3 ++- .../tsconfig-nodenext-sdk/client/types.gen.ts | 13 +++++++++++++ .../client-nuxt/base-url-false/client/client.gen.ts | 4 ++-- .../client-nuxt/base-url-false/client/types.gen.ts | 13 +++++++++++++ .../base-url-number/client/client.gen.ts | 4 ++-- .../client-nuxt/base-url-number/client/types.gen.ts | 13 +++++++++++++ .../base-url-strict/client/client.gen.ts | 4 ++-- .../client-nuxt/base-url-strict/client/types.gen.ts | 13 +++++++++++++ .../base-url-string/client/client.gen.ts | 4 ++-- .../client-nuxt/base-url-string/client/types.gen.ts | 13 +++++++++++++ .../client-nuxt/clean-false/client/client.gen.ts | 4 ++-- .../client-nuxt/clean-false/client/types.gen.ts | 13 +++++++++++++ .../client-nuxt/default/client/client.gen.ts | 4 ++-- .../client-nuxt/default/client/types.gen.ts | 13 +++++++++++++ .../sdk-client-optional/client/client.gen.ts | 4 ++-- .../sdk-client-optional/client/types.gen.ts | 13 +++++++++++++ .../sdk-client-required/client/client.gen.ts | 4 ++-- .../sdk-client-required/client/types.gen.ts | 13 +++++++++++++ .../tsconfig-nodenext-sdk/client/client.gen.ts | 4 ++-- .../tsconfig-nodenext-sdk/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/content-types/client/client.gen.ts | 4 ++-- .../3.1.x/content-types/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/headers/client/client.gen.ts | 3 ++- .../__snapshots__/3.1.x/headers/client/types.gen.ts | 13 +++++++++++++ .../internal-name-conflict/client/client.gen.ts | 3 ++- .../internal-name-conflict/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/pagination-ref/client/client.gen.ts | 3 ++- .../3.1.x/pagination-ref/client/types.gen.ts | 13 +++++++++++++ .../client/client.gen.ts | 4 ++-- .../client/types.gen.ts | 13 +++++++++++++ .../parameter-explode-false/client/client.gen.ts | 3 ++- .../parameter-explode-false/client/types.gen.ts | 13 +++++++++++++ .../common/default-class/client/client.gen.ts | 3 ++- .../common/default-class/client/types.gen.ts | 13 +++++++++++++ .../@angular/common/default/client/client.gen.ts | 3 ++- .../@angular/common/default/client/types.gen.ts | 13 +++++++++++++ .../client/client.gen.ts | 3 ++- .../sdk-nested-classes-instance/client/types.gen.ts | 13 +++++++++++++ .../sdk-nested-classes/client/client.gen.ts | 3 ++- .../sdk-nested-classes/client/types.gen.ts | 13 +++++++++++++ .../@hey-api/sdk/default/client/client.gen.ts | 3 ++- .../@hey-api/sdk/default/client/types.gen.ts | 13 +++++++++++++ .../@hey-api/sdk/instance/client/client.gen.ts | 3 ++- .../@hey-api/sdk/instance/client/types.gen.ts | 13 +++++++++++++ .../@hey-api/sdk/throwOnError/client/client.gen.ts | 3 ++- .../@hey-api/sdk/throwOnError/client/types.gen.ts | 13 +++++++++++++ .../type-format-valibot/client/client.gen.ts | 3 ++- .../type-format-valibot/client/types.gen.ts | 13 +++++++++++++ .../type-format-zod/client/client.gen.ts | 3 ++- .../type-format-zod/client/types.gen.ts | 13 +++++++++++++ .../client/client.gen.ts | 3 ++- .../client/types.gen.ts | 13 +++++++++++++ .../client/client.gen.ts | 3 ++- .../client/types.gen.ts | 13 +++++++++++++ .../@pinia/colada/asClass/client/client.gen.ts | 3 ++- .../@pinia/colada/asClass/client/types.gen.ts | 13 +++++++++++++ .../@pinia/colada/fetch/client/client.gen.ts | 3 ++- .../plugins/@pinia/colada/fetch/client/types.gen.ts | 13 +++++++++++++ .../asClass/client/client.gen.ts | 3 ++- .../asClass/client/types.gen.ts | 13 +++++++++++++ .../axios/client/client.gen.ts | 4 ++-- .../axios/client/types.gen.ts | 13 +++++++++++++ .../fetch/client/client.gen.ts | 3 ++- .../fetch/client/types.gen.ts | 13 +++++++++++++ .../name-builder/client/client.gen.ts | 3 ++- .../name-builder/client/types.gen.ts | 13 +++++++++++++ .../react-query/asClass/client/client.gen.ts | 3 ++- .../react-query/asClass/client/types.gen.ts | 13 +++++++++++++ .../react-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/react-query/axios/client/types.gen.ts | 13 +++++++++++++ .../react-query/fetch/client/client.gen.ts | 3 ++- .../@tanstack/react-query/fetch/client/types.gen.ts | 13 +++++++++++++ .../react-query/name-builder/client/client.gen.ts | 3 ++- .../react-query/name-builder/client/types.gen.ts | 13 +++++++++++++ .../solid-query/asClass/client/client.gen.ts | 3 ++- .../solid-query/asClass/client/types.gen.ts | 13 +++++++++++++ .../solid-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/solid-query/axios/client/types.gen.ts | 13 +++++++++++++ .../solid-query/fetch/client/client.gen.ts | 3 ++- .../@tanstack/solid-query/fetch/client/types.gen.ts | 13 +++++++++++++ .../solid-query/name-builder/client/client.gen.ts | 3 ++- .../solid-query/name-builder/client/types.gen.ts | 13 +++++++++++++ .../svelte-query/asClass/client/client.gen.ts | 3 ++- .../svelte-query/asClass/client/types.gen.ts | 13 +++++++++++++ .../svelte-query/axios/client/client.gen.ts | 4 ++-- .../svelte-query/axios/client/types.gen.ts | 13 +++++++++++++ .../svelte-query/fetch/client/client.gen.ts | 3 ++- .../svelte-query/fetch/client/types.gen.ts | 13 +++++++++++++ .../svelte-query/name-builder/client/client.gen.ts | 3 ++- .../svelte-query/name-builder/client/types.gen.ts | 13 +++++++++++++ .../vue-query/asClass/client/client.gen.ts | 3 ++- .../@tanstack/vue-query/asClass/client/types.gen.ts | 13 +++++++++++++ .../@tanstack/vue-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/vue-query/axios/client/types.gen.ts | 13 +++++++++++++ .../@tanstack/vue-query/fetch/client/client.gen.ts | 3 ++- .../@tanstack/vue-query/fetch/client/types.gen.ts | 13 +++++++++++++ .../vue-query/name-builder/client/client.gen.ts | 3 ++- .../vue-query/name-builder/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/security-api-key/client/client.gen.ts | 3 ++- .../3.1.x/security-api-key/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/security-false/client/client.gen.ts | 3 ++- .../3.1.x/security-false/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/security-http-bearer/client/client.gen.ts | 3 ++- .../3.1.x/security-http-bearer/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/security-oauth2/client/client.gen.ts | 3 ++- .../3.1.x/security-oauth2/client/types.gen.ts | 13 +++++++++++++ .../security-open-id-connect/client/client.gen.ts | 3 ++- .../security-open-id-connect/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/servers/client/client.gen.ts | 3 ++- .../__snapshots__/3.1.x/servers/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/sse-angular/client/client.gen.ts | 3 ++- .../3.1.x/sse-angular/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/sse-axios/client/client.gen.ts | 4 ++-- .../3.1.x/sse-axios/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/sse-fetch/client/client.gen.ts | 3 ++- .../3.1.x/sse-fetch/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/sse-next/client/client.gen.ts | 3 ++- .../3.1.x/sse-next/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/sse-nuxt/client/client.gen.ts | 4 ++-- .../3.1.x/sse-nuxt/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/transformers-all-of/client/client.gen.ts | 3 ++- .../3.1.x/transformers-all-of/client/types.gen.ts | 13 +++++++++++++ .../transformers-any-of-null/client/client.gen.ts | 3 ++- .../transformers-any-of-null/client/types.gen.ts | 13 +++++++++++++ .../3.1.x/transformers-array/client/client.gen.ts | 3 ++- .../3.1.x/transformers-array/client/types.gen.ts | 13 +++++++++++++ .../transforms-read-write/client/client.gen.ts | 3 ++- .../3.1.x/transforms-read-write/client/types.gen.ts | 13 +++++++++++++ .../plugins/@tanstack/meta/client/client.gen.ts | 3 ++- .../plugins/@tanstack/meta/client/types.gen.ts | 13 +++++++++++++ .../generated/v3_no_index/client/client.gen.ts.snap | 3 ++- .../generated/v3_no_index/client/types.gen.ts.snap | 13 +++++++++++++ .../@hey-api/client-angular/bundle/client.ts | 3 ++- .../plugins/@hey-api/client-angular/bundle/types.ts | 13 +++++++++++++ .../plugins/@hey-api/client-axios/bundle/client.ts | 4 ++-- .../plugins/@hey-api/client-axios/bundle/types.ts | 13 +++++++++++++ .../plugins/@hey-api/client-fetch/bundle/client.ts | 3 ++- .../plugins/@hey-api/client-fetch/bundle/types.ts | 13 +++++++++++++ .../plugins/@hey-api/client-next/bundle/client.ts | 3 ++- .../plugins/@hey-api/client-next/bundle/types.ts | 13 +++++++++++++ .../plugins/@hey-api/client-nuxt/bundle/client.ts | 4 ++-- .../plugins/@hey-api/client-nuxt/bundle/types.ts | 13 +++++++++++++ 380 files changed, 2850 insertions(+), 231 deletions(-) diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts index 1555ca230..22b6087b2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts @@ -22,6 +22,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -211,7 +212,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/types.gen.ts index 6cdf8ad48..9a7a6ec4f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/types.gen.ts @@ -20,6 +20,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts index 1555ca230..22b6087b2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts @@ -22,6 +22,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -211,7 +212,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/types.gen.ts index 6cdf8ad48..9a7a6ec4f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/types.gen.ts @@ -20,6 +20,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/client.gen.ts index 1555ca230..22b6087b2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/client.gen.ts @@ -22,6 +22,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -211,7 +212,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/types.gen.ts index 6cdf8ad48..9a7a6ec4f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/types.gen.ts @@ -20,6 +20,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/client.gen.ts index 1555ca230..22b6087b2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/client.gen.ts @@ -22,6 +22,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -211,7 +212,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/types.gen.ts index 6cdf8ad48..9a7a6ec4f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/types.gen.ts @@ -20,6 +20,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts index 17fc6d73c..ffae63f6c 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen.js'; import type { HttpMethod } from '../core/types.gen.js'; import { getValidRequestBody } from '../core/utils.gen.js'; -import type { Client, Config, RequestOptions } from './types.gen.js'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen.js'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/types.gen.ts index 7ad021531..93fdc864f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen.js'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts index 67961302b..65ea5f964 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen.js'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen.js'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/types.gen.ts index d68ab68c4..b37dc1d50 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen.js'; import type { Middleware } from './utils.gen.js'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts index 53d0433b9..3b01de588 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -210,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/types.gen.ts index 76f0bf322..b2a006b00 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts index 53d0433b9..3b01de588 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -210,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/types.gen.ts index 76f0bf322..b2a006b00 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts index 53d0433b9..3b01de588 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -210,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/types.gen.ts index 76f0bf322..b2a006b00 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts index 53d0433b9..3b01de588 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -210,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/types.gen.ts index 76f0bf322..b2a006b00 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts index 53d0433b9..3b01de588 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -210,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/types.gen.ts index 76f0bf322..b2a006b00 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts index 53d0433b9..3b01de588 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -210,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/types.gen.ts index 76f0bf322..b2a006b00 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts index 53d0433b9..3b01de588 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -210,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/types.gen.ts index 76f0bf322..b2a006b00 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts index 53d0433b9..3b01de588 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -210,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/types.gen.ts index 76f0bf322..b2a006b00 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts index 12468638a..a509a6de5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen.js'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen.js'; @@ -210,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/types.gen.ts index 907e6c9ee..a17084355 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen.js'; import type { Middleware } from './utils.gen.js'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts index 3dbbcd126..f13fbd66f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/types.gen.ts index ac663764d..504845a34 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/types.gen.ts @@ -21,6 +21,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts index 3dbbcd126..f13fbd66f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/types.gen.ts index ac663764d..504845a34 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/types.gen.ts @@ -21,6 +21,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts index 3dbbcd126..f13fbd66f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/types.gen.ts index ac663764d..504845a34 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/types.gen.ts @@ -21,6 +21,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts index 3dbbcd126..f13fbd66f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/types.gen.ts index ac663764d..504845a34 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/types.gen.ts @@ -21,6 +21,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts index 3dbbcd126..f13fbd66f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/types.gen.ts index ac663764d..504845a34 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/types.gen.ts @@ -21,6 +21,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts index 3dbbcd126..f13fbd66f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/types.gen.ts index ac663764d..504845a34 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/types.gen.ts @@ -21,6 +21,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts index 3dbbcd126..f13fbd66f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/types.gen.ts index ac663764d..504845a34 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/types.gen.ts @@ -21,6 +21,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts index 3dbbcd126..f13fbd66f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/types.gen.ts index ac663764d..504845a34 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/types.gen.ts @@ -21,6 +21,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts index 5bb268ce4..0351a2b49 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen.js'; import type { HttpMethod } from '../core/types.gen.js'; -import type { Client, Config, RequestOptions } from './types.gen.js'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen.js'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/types.gen.ts index 588c13b49..2f00b2985 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/types.gen.ts @@ -21,6 +21,19 @@ import type { Config as CoreConfig, } from '../core/types.gen.js'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/client.gen.ts index 1555ca230..22b6087b2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/client.gen.ts @@ -22,6 +22,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -211,7 +212,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/types.gen.ts index 6cdf8ad48..9a7a6ec4f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/types.gen.ts @@ -20,6 +20,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/client.gen.ts index 1555ca230..22b6087b2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/client.gen.ts @@ -22,6 +22,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -211,7 +212,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/types.gen.ts index 6cdf8ad48..9a7a6ec4f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/types.gen.ts @@ -20,6 +20,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/client.gen.ts index 1555ca230..22b6087b2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/client.gen.ts @@ -22,6 +22,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -211,7 +212,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/types.gen.ts index 6cdf8ad48..9a7a6ec4f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/types.gen.ts @@ -20,6 +20,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/client.gen.ts index c8a60c6fa..6573f558e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/types.gen.ts index 21789fe0d..bba0fa89e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/types.gen.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/client.gen.ts index 53d0433b9..3b01de588 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -210,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/types.gen.ts index 76f0bf322..b2a006b00 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/client.gen.ts index 3dbbcd126..f13fbd66f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestOptions } from './types.gen'; +import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/types.gen.ts index ac663764d..504845a34 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/types.gen.ts @@ -21,6 +21,19 @@ import type { Config as CoreConfig, } from '../core/types.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/types.gen.ts index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/types.gen.ts @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/test/generated/v3_no_index/client/client.gen.ts.snap b/packages/openapi-ts-tests/main/test/__snapshots__/test/generated/v3_no_index/client/client.gen.ts.snap index a439d2748..ce7fa7c6f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/test/generated/v3_no_index/client/client.gen.ts.snap +++ b/packages/openapi-ts-tests/main/test/__snapshots__/test/generated/v3_no_index/client/client.gen.ts.snap @@ -6,6 +6,7 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -222,7 +223,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/test/generated/v3_no_index/client/types.gen.ts.snap b/packages/openapi-ts-tests/main/test/__snapshots__/test/generated/v3_no_index/client/types.gen.ts.snap index 1a005b51e..dd0339265 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/test/generated/v3_no_index/client/types.gen.ts.snap +++ b/packages/openapi-ts-tests/main/test/__snapshots__/test/generated/v3_no_index/client/types.gen.ts.snap @@ -11,6 +11,19 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts index fd34020b6..a9dc35380 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts @@ -20,6 +20,7 @@ import { getValidRequestBody } from '../../client-core/bundle/utils'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -209,7 +210,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/types.ts b/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/types.ts index 1eb603e4b..1131a72f1 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/types.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/types.ts @@ -18,6 +18,19 @@ import type { } from '../../client-core/bundle/types'; import type { Middleware } from './utils'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts index fb7e69a3a..7eb7a0f1e 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts @@ -4,7 +4,7 @@ import axios from 'axios'; import { createSseClient } from '../../client-core/bundle/serverSentEvents'; import type { HttpMethod } from '../../client-core/bundle/types'; import { getValidRequestBody } from '../../client-core/bundle/utils'; -import type { Client, Config, RequestOptions } from './types'; +import type { Client, Config, RequestBody, RequestOptions } from './types'; import { buildUrl, createConfig, @@ -122,7 +122,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/types.ts b/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/types.ts index 5ae681aa3..2d89d2b1b 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/types.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/types.ts @@ -17,6 +17,19 @@ import type { Config as CoreConfig, } from '../../client-core/bundle/types'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts index b4932899a..44b25598b 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts @@ -4,6 +4,7 @@ import { getValidRequestBody } from '../../client-core/bundle/utils'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types'; @@ -220,7 +221,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/types.ts b/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/types.ts index 456f59dcf..e66234ba9 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/types.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/types.ts @@ -9,6 +9,19 @@ import type { } from '../../client-core/bundle/types'; import type { Middleware } from './utils'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts index e3fb833f8..818a3cb87 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts @@ -4,6 +4,7 @@ import { getValidRequestBody } from '../../client-core/bundle/utils'; import type { Client, Config, + RequestBody, RequestOptions, ResolvedRequestOptions, } from './types'; @@ -208,7 +209,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/types.ts b/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/types.ts index c61ad1f22..c8801a837 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/types.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/types.ts @@ -9,6 +9,19 @@ import type { } from '../../client-core/bundle/types'; import type { Middleware } from './utils'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts index 432ffbd40..c473ff808 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts @@ -8,7 +8,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../../client-core/bundle/serverSentEvents'; import type { HttpMethod } from '../../client-core/bundle/types'; -import type { Client, Config, RequestOptions } from './types'; +import type { Client, Config, RequestBody, RequestOptions } from './types'; import { buildUrl, createConfig, @@ -190,7 +190,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as BodyInit | null | undefined, + body: opts.body as RequestBody, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/types.ts b/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/types.ts index 0290d9ec4..40a028abd 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/types.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/types.ts @@ -19,6 +19,19 @@ import type { Config as CoreConfig, } from '../../client-core/bundle/types'; +/** + * Compatible body type for requests that doesn't depend on DOM types. + * Equivalent to the standard BodyInit type but without DOM-specific types + * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. + */ +export type RequestBody = + | string + | ArrayBuffer + | ArrayBufferView + | URLSearchParams + | null + | undefined; + export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; From 98d5e35ec4c6417e1f573f352a119fd466cdc611 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Sep 2025 01:06:28 +0000 Subject: [PATCH 3/5] Simplify BodyInit fix by casting to any instead of custom type Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com> --- .../common/default-class/client/client.gen.ts | 3 +-- .../common/default-class/client/types.gen.ts | 13 ------------- .../@angular/common/default/client/client.gen.ts | 3 +-- .../@angular/common/default/client/types.gen.ts | 13 ------------- .../client/client.gen.ts | 3 +-- .../sdk-nested-classes-instance/client/types.gen.ts | 13 ------------- .../sdk-nested-classes/client/client.gen.ts | 3 +-- .../sdk-nested-classes/client/types.gen.ts | 13 ------------- .../@hey-api/sdk/default/client/client.gen.ts | 3 +-- .../@hey-api/sdk/default/client/types.gen.ts | 13 ------------- .../@hey-api/sdk/instance/client/client.gen.ts | 3 +-- .../@hey-api/sdk/instance/client/types.gen.ts | 13 ------------- .../@hey-api/sdk/throwOnError/client/client.gen.ts | 3 +-- .../@hey-api/sdk/throwOnError/client/types.gen.ts | 13 ------------- .../type-format-valibot/client/client.gen.ts | 3 +-- .../type-format-valibot/client/types.gen.ts | 13 ------------- .../type-format-zod/client/client.gen.ts | 3 +-- .../type-format-zod/client/types.gen.ts | 13 ------------- .../client/client.gen.ts | 3 +-- .../client/types.gen.ts | 13 ------------- .../client/client.gen.ts | 3 +-- .../client/types.gen.ts | 13 ------------- .../@pinia/colada/asClass/client/client.gen.ts | 3 +-- .../@pinia/colada/asClass/client/types.gen.ts | 13 ------------- .../@pinia/colada/fetch/client/client.gen.ts | 3 +-- .../plugins/@pinia/colada/fetch/client/types.gen.ts | 13 ------------- .../asClass/client/client.gen.ts | 3 +-- .../asClass/client/types.gen.ts | 13 ------------- .../axios/client/client.gen.ts | 4 ++-- .../axios/client/types.gen.ts | 13 ------------- .../fetch/client/client.gen.ts | 3 +-- .../fetch/client/types.gen.ts | 13 ------------- .../name-builder/client/client.gen.ts | 3 +-- .../name-builder/client/types.gen.ts | 13 ------------- .../react-query/asClass/client/client.gen.ts | 3 +-- .../react-query/asClass/client/types.gen.ts | 13 ------------- .../react-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/react-query/axios/client/types.gen.ts | 13 ------------- .../react-query/fetch/client/client.gen.ts | 3 +-- .../@tanstack/react-query/fetch/client/types.gen.ts | 13 ------------- .../react-query/name-builder/client/client.gen.ts | 3 +-- .../react-query/name-builder/client/types.gen.ts | 13 ------------- .../solid-query/asClass/client/client.gen.ts | 3 +-- .../solid-query/asClass/client/types.gen.ts | 13 ------------- .../solid-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/solid-query/axios/client/types.gen.ts | 13 ------------- .../solid-query/fetch/client/client.gen.ts | 3 +-- .../@tanstack/solid-query/fetch/client/types.gen.ts | 13 ------------- .../solid-query/name-builder/client/client.gen.ts | 3 +-- .../solid-query/name-builder/client/types.gen.ts | 13 ------------- .../svelte-query/asClass/client/client.gen.ts | 3 +-- .../svelte-query/asClass/client/types.gen.ts | 13 ------------- .../svelte-query/axios/client/client.gen.ts | 4 ++-- .../svelte-query/axios/client/types.gen.ts | 13 ------------- .../svelte-query/fetch/client/client.gen.ts | 3 +-- .../svelte-query/fetch/client/types.gen.ts | 13 ------------- .../svelte-query/name-builder/client/client.gen.ts | 3 +-- .../svelte-query/name-builder/client/types.gen.ts | 13 ------------- .../vue-query/asClass/client/client.gen.ts | 3 +-- .../@tanstack/vue-query/asClass/client/types.gen.ts | 13 ------------- .../@tanstack/vue-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/vue-query/axios/client/types.gen.ts | 13 ------------- .../@tanstack/vue-query/fetch/client/client.gen.ts | 3 +-- .../@tanstack/vue-query/fetch/client/types.gen.ts | 13 ------------- .../vue-query/name-builder/client/client.gen.ts | 3 +-- .../vue-query/name-builder/client/types.gen.ts | 13 ------------- .../body-response-text-plain/client/client.gen.ts | 3 +-- .../body-response-text-plain/client/types.gen.ts | 13 ------------- .../3.0.x/content-types/client/client.gen.ts | 4 ++-- .../3.0.x/content-types/client/types.gen.ts | 13 ------------- .../internal-name-conflict/client/client.gen.ts | 3 +-- .../internal-name-conflict/client/types.gen.ts | 13 ------------- .../client/client.gen.ts | 4 ++-- .../client/types.gen.ts | 13 ------------- .../parameter-explode-false/client/client.gen.ts | 3 +-- .../parameter-explode-false/client/types.gen.ts | 13 ------------- .../common/default-class/client/client.gen.ts | 3 +-- .../common/default-class/client/types.gen.ts | 13 ------------- .../@angular/common/default/client/client.gen.ts | 3 +-- .../@angular/common/default/client/types.gen.ts | 13 ------------- .../client/client.gen.ts | 3 +-- .../sdk-nested-classes-instance/client/types.gen.ts | 13 ------------- .../sdk-nested-classes/client/client.gen.ts | 3 +-- .../sdk-nested-classes/client/types.gen.ts | 13 ------------- .../@hey-api/sdk/default/client/client.gen.ts | 3 +-- .../@hey-api/sdk/default/client/types.gen.ts | 13 ------------- .../@hey-api/sdk/instance/client/client.gen.ts | 3 +-- .../@hey-api/sdk/instance/client/types.gen.ts | 13 ------------- .../@hey-api/sdk/throwOnError/client/client.gen.ts | 3 +-- .../@hey-api/sdk/throwOnError/client/types.gen.ts | 13 ------------- .../type-format-valibot/client/client.gen.ts | 3 +-- .../type-format-valibot/client/types.gen.ts | 13 ------------- .../type-format-zod/client/client.gen.ts | 3 +-- .../type-format-zod/client/types.gen.ts | 13 ------------- .../client/client.gen.ts | 3 +-- .../client/types.gen.ts | 13 ------------- .../client/client.gen.ts | 3 +-- .../client/types.gen.ts | 13 ------------- .../@pinia/colada/asClass/client/client.gen.ts | 3 +-- .../@pinia/colada/asClass/client/types.gen.ts | 13 ------------- .../@pinia/colada/fetch/client/client.gen.ts | 3 +-- .../plugins/@pinia/colada/fetch/client/types.gen.ts | 13 ------------- .../asClass/client/client.gen.ts | 3 +-- .../asClass/client/types.gen.ts | 13 ------------- .../axios/client/client.gen.ts | 4 ++-- .../axios/client/types.gen.ts | 13 ------------- .../fetch/client/client.gen.ts | 3 +-- .../fetch/client/types.gen.ts | 13 ------------- .../name-builder/client/client.gen.ts | 3 +-- .../name-builder/client/types.gen.ts | 13 ------------- .../react-query/asClass/client/client.gen.ts | 3 +-- .../react-query/asClass/client/types.gen.ts | 13 ------------- .../react-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/react-query/axios/client/types.gen.ts | 13 ------------- .../react-query/fetch/client/client.gen.ts | 3 +-- .../@tanstack/react-query/fetch/client/types.gen.ts | 13 ------------- .../react-query/name-builder/client/client.gen.ts | 3 +-- .../react-query/name-builder/client/types.gen.ts | 13 ------------- .../solid-query/asClass/client/client.gen.ts | 3 +-- .../solid-query/asClass/client/types.gen.ts | 13 ------------- .../solid-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/solid-query/axios/client/types.gen.ts | 13 ------------- .../solid-query/fetch/client/client.gen.ts | 3 +-- .../@tanstack/solid-query/fetch/client/types.gen.ts | 13 ------------- .../solid-query/name-builder/client/client.gen.ts | 3 +-- .../solid-query/name-builder/client/types.gen.ts | 13 ------------- .../svelte-query/asClass/client/client.gen.ts | 3 +-- .../svelte-query/asClass/client/types.gen.ts | 13 ------------- .../svelte-query/axios/client/client.gen.ts | 4 ++-- .../svelte-query/axios/client/types.gen.ts | 13 ------------- .../svelte-query/fetch/client/client.gen.ts | 3 +-- .../svelte-query/fetch/client/types.gen.ts | 13 ------------- .../svelte-query/name-builder/client/client.gen.ts | 3 +-- .../svelte-query/name-builder/client/types.gen.ts | 13 ------------- .../vue-query/asClass/client/client.gen.ts | 3 +-- .../@tanstack/vue-query/asClass/client/types.gen.ts | 13 ------------- .../@tanstack/vue-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/vue-query/axios/client/types.gen.ts | 13 ------------- .../@tanstack/vue-query/fetch/client/client.gen.ts | 3 +-- .../@tanstack/vue-query/fetch/client/types.gen.ts | 13 ------------- .../vue-query/name-builder/client/client.gen.ts | 3 +-- .../vue-query/name-builder/client/types.gen.ts | 13 ------------- .../3.0.x/security-api-key/client/client.gen.ts | 3 +-- .../3.0.x/security-api-key/client/types.gen.ts | 13 ------------- .../3.0.x/security-false/client/client.gen.ts | 3 +-- .../3.0.x/security-false/client/types.gen.ts | 13 ------------- .../3.0.x/security-http-bearer/client/client.gen.ts | 3 +-- .../3.0.x/security-http-bearer/client/types.gen.ts | 13 ------------- .../3.0.x/security-oauth2/client/client.gen.ts | 3 +-- .../3.0.x/security-oauth2/client/types.gen.ts | 13 ------------- .../security-open-id-connect/client/client.gen.ts | 3 +-- .../security-open-id-connect/client/types.gen.ts | 13 ------------- .../3.0.x/servers/client/client.gen.ts | 3 +-- .../__snapshots__/3.0.x/servers/client/types.gen.ts | 13 ------------- .../3.0.x/transformers-all-of/client/client.gen.ts | 3 +-- .../3.0.x/transformers-all-of/client/types.gen.ts | 13 ------------- .../transformers-any-of-null/client/client.gen.ts | 3 +-- .../transformers-any-of-null/client/types.gen.ts | 13 ------------- .../3.0.x/transformers-array/client/client.gen.ts | 3 +-- .../3.0.x/transformers-array/client/types.gen.ts | 13 ------------- .../transforms-read-write/client/client.gen.ts | 3 +-- .../3.0.x/transforms-read-write/client/types.gen.ts | 13 ------------- .../body-response-text-plain/client/client.gen.ts | 3 +-- .../body-response-text-plain/client/types.gen.ts | 13 ------------- .../base-url-false/client/client.gen.ts | 4 ++-- .../client-axios/base-url-false/client/types.gen.ts | 13 ------------- .../base-url-number/client/client.gen.ts | 4 ++-- .../base-url-number/client/types.gen.ts | 13 ------------- .../base-url-strict/client/client.gen.ts | 4 ++-- .../base-url-strict/client/types.gen.ts | 13 ------------- .../base-url-string/client/client.gen.ts | 4 ++-- .../base-url-string/client/types.gen.ts | 13 ------------- .../client-axios/clean-false/client/client.gen.ts | 4 ++-- .../client-axios/clean-false/client/types.gen.ts | 13 ------------- .../client-axios/default/client/client.gen.ts | 4 ++-- .../client-axios/default/client/types.gen.ts | 13 ------------- .../sdk-client-optional/client/client.gen.ts | 4 ++-- .../sdk-client-optional/client/types.gen.ts | 13 ------------- .../sdk-client-required/client/client.gen.ts | 4 ++-- .../sdk-client-required/client/types.gen.ts | 13 ------------- .../tsconfig-nodenext-sdk/client/client.gen.ts | 4 ++-- .../tsconfig-nodenext-sdk/client/types.gen.ts | 13 ------------- .../base-url-false/client/client.gen.ts | 3 +-- .../client-fetch/base-url-false/client/types.gen.ts | 13 ------------- .../base-url-number/client/client.gen.ts | 3 +-- .../base-url-number/client/types.gen.ts | 13 ------------- .../base-url-strict/client/client.gen.ts | 3 +-- .../base-url-strict/client/types.gen.ts | 13 ------------- .../base-url-string/client/client.gen.ts | 3 +-- .../base-url-string/client/types.gen.ts | 13 ------------- .../client-fetch/clean-false/client/client.gen.ts | 3 +-- .../client-fetch/clean-false/client/types.gen.ts | 13 ------------- .../client-fetch/default/client/client.gen.ts | 3 +-- .../client-fetch/default/client/types.gen.ts | 13 ------------- .../sdk-client-optional/client/client.gen.ts | 3 +-- .../sdk-client-optional/client/types.gen.ts | 13 ------------- .../sdk-client-required/client/client.gen.ts | 3 +-- .../sdk-client-required/client/types.gen.ts | 13 ------------- .../tsconfig-nodenext-sdk/client/client.gen.ts | 3 +-- .../tsconfig-nodenext-sdk/client/types.gen.ts | 13 ------------- .../client-next/base-url-false/client/client.gen.ts | 3 +-- .../client-next/base-url-false/client/types.gen.ts | 13 ------------- .../base-url-number/client/client.gen.ts | 3 +-- .../client-next/base-url-number/client/types.gen.ts | 13 ------------- .../base-url-strict/client/client.gen.ts | 3 +-- .../client-next/base-url-strict/client/types.gen.ts | 13 ------------- .../base-url-string/client/client.gen.ts | 3 +-- .../client-next/base-url-string/client/types.gen.ts | 13 ------------- .../client-next/clean-false/client/client.gen.ts | 3 +-- .../client-next/clean-false/client/types.gen.ts | 13 ------------- .../client-next/default/client/client.gen.ts | 3 +-- .../client-next/default/client/types.gen.ts | 13 ------------- .../sdk-client-optional/client/client.gen.ts | 3 +-- .../sdk-client-optional/client/types.gen.ts | 13 ------------- .../sdk-client-required/client/client.gen.ts | 3 +-- .../sdk-client-required/client/types.gen.ts | 13 ------------- .../tsconfig-nodenext-sdk/client/client.gen.ts | 3 +-- .../tsconfig-nodenext-sdk/client/types.gen.ts | 13 ------------- .../client-nuxt/base-url-false/client/client.gen.ts | 4 ++-- .../client-nuxt/base-url-false/client/types.gen.ts | 13 ------------- .../base-url-number/client/client.gen.ts | 4 ++-- .../client-nuxt/base-url-number/client/types.gen.ts | 13 ------------- .../base-url-strict/client/client.gen.ts | 4 ++-- .../client-nuxt/base-url-strict/client/types.gen.ts | 13 ------------- .../base-url-string/client/client.gen.ts | 4 ++-- .../client-nuxt/base-url-string/client/types.gen.ts | 13 ------------- .../client-nuxt/clean-false/client/client.gen.ts | 4 ++-- .../client-nuxt/clean-false/client/types.gen.ts | 13 ------------- .../client-nuxt/default/client/client.gen.ts | 4 ++-- .../client-nuxt/default/client/types.gen.ts | 13 ------------- .../sdk-client-optional/client/client.gen.ts | 4 ++-- .../sdk-client-optional/client/types.gen.ts | 13 ------------- .../sdk-client-required/client/client.gen.ts | 4 ++-- .../sdk-client-required/client/types.gen.ts | 13 ------------- .../tsconfig-nodenext-sdk/client/client.gen.ts | 4 ++-- .../tsconfig-nodenext-sdk/client/types.gen.ts | 13 ------------- .../3.1.x/content-types/client/client.gen.ts | 4 ++-- .../3.1.x/content-types/client/types.gen.ts | 13 ------------- .../3.1.x/headers/client/client.gen.ts | 3 +-- .../__snapshots__/3.1.x/headers/client/types.gen.ts | 13 ------------- .../internal-name-conflict/client/client.gen.ts | 3 +-- .../internal-name-conflict/client/types.gen.ts | 13 ------------- .../3.1.x/pagination-ref/client/client.gen.ts | 3 +-- .../3.1.x/pagination-ref/client/types.gen.ts | 13 ------------- .../client/client.gen.ts | 4 ++-- .../client/types.gen.ts | 13 ------------- .../parameter-explode-false/client/client.gen.ts | 3 +-- .../parameter-explode-false/client/types.gen.ts | 13 ------------- .../common/default-class/client/client.gen.ts | 3 +-- .../common/default-class/client/types.gen.ts | 13 ------------- .../@angular/common/default/client/client.gen.ts | 3 +-- .../@angular/common/default/client/types.gen.ts | 13 ------------- .../client/client.gen.ts | 3 +-- .../sdk-nested-classes-instance/client/types.gen.ts | 13 ------------- .../sdk-nested-classes/client/client.gen.ts | 3 +-- .../sdk-nested-classes/client/types.gen.ts | 13 ------------- .../@hey-api/sdk/default/client/client.gen.ts | 3 +-- .../@hey-api/sdk/default/client/types.gen.ts | 13 ------------- .../@hey-api/sdk/instance/client/client.gen.ts | 3 +-- .../@hey-api/sdk/instance/client/types.gen.ts | 13 ------------- .../@hey-api/sdk/throwOnError/client/client.gen.ts | 3 +-- .../@hey-api/sdk/throwOnError/client/types.gen.ts | 13 ------------- .../type-format-valibot/client/client.gen.ts | 3 +-- .../type-format-valibot/client/types.gen.ts | 13 ------------- .../type-format-zod/client/client.gen.ts | 3 +-- .../type-format-zod/client/types.gen.ts | 13 ------------- .../client/client.gen.ts | 3 +-- .../client/types.gen.ts | 13 ------------- .../client/client.gen.ts | 3 +-- .../client/types.gen.ts | 13 ------------- .../@pinia/colada/asClass/client/client.gen.ts | 3 +-- .../@pinia/colada/asClass/client/types.gen.ts | 13 ------------- .../@pinia/colada/fetch/client/client.gen.ts | 3 +-- .../plugins/@pinia/colada/fetch/client/types.gen.ts | 13 ------------- .../asClass/client/client.gen.ts | 3 +-- .../asClass/client/types.gen.ts | 13 ------------- .../axios/client/client.gen.ts | 4 ++-- .../axios/client/types.gen.ts | 13 ------------- .../fetch/client/client.gen.ts | 3 +-- .../fetch/client/types.gen.ts | 13 ------------- .../name-builder/client/client.gen.ts | 3 +-- .../name-builder/client/types.gen.ts | 13 ------------- .../react-query/asClass/client/client.gen.ts | 3 +-- .../react-query/asClass/client/types.gen.ts | 13 ------------- .../react-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/react-query/axios/client/types.gen.ts | 13 ------------- .../react-query/fetch/client/client.gen.ts | 3 +-- .../@tanstack/react-query/fetch/client/types.gen.ts | 13 ------------- .../react-query/name-builder/client/client.gen.ts | 3 +-- .../react-query/name-builder/client/types.gen.ts | 13 ------------- .../solid-query/asClass/client/client.gen.ts | 3 +-- .../solid-query/asClass/client/types.gen.ts | 13 ------------- .../solid-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/solid-query/axios/client/types.gen.ts | 13 ------------- .../solid-query/fetch/client/client.gen.ts | 3 +-- .../@tanstack/solid-query/fetch/client/types.gen.ts | 13 ------------- .../solid-query/name-builder/client/client.gen.ts | 3 +-- .../solid-query/name-builder/client/types.gen.ts | 13 ------------- .../svelte-query/asClass/client/client.gen.ts | 3 +-- .../svelte-query/asClass/client/types.gen.ts | 13 ------------- .../svelte-query/axios/client/client.gen.ts | 4 ++-- .../svelte-query/axios/client/types.gen.ts | 13 ------------- .../svelte-query/fetch/client/client.gen.ts | 3 +-- .../svelte-query/fetch/client/types.gen.ts | 13 ------------- .../svelte-query/name-builder/client/client.gen.ts | 3 +-- .../svelte-query/name-builder/client/types.gen.ts | 13 ------------- .../vue-query/asClass/client/client.gen.ts | 3 +-- .../@tanstack/vue-query/asClass/client/types.gen.ts | 13 ------------- .../@tanstack/vue-query/axios/client/client.gen.ts | 4 ++-- .../@tanstack/vue-query/axios/client/types.gen.ts | 13 ------------- .../@tanstack/vue-query/fetch/client/client.gen.ts | 3 +-- .../@tanstack/vue-query/fetch/client/types.gen.ts | 13 ------------- .../vue-query/name-builder/client/client.gen.ts | 3 +-- .../vue-query/name-builder/client/types.gen.ts | 13 ------------- .../3.1.x/security-api-key/client/client.gen.ts | 3 +-- .../3.1.x/security-api-key/client/types.gen.ts | 13 ------------- .../3.1.x/security-false/client/client.gen.ts | 3 +-- .../3.1.x/security-false/client/types.gen.ts | 13 ------------- .../3.1.x/security-http-bearer/client/client.gen.ts | 3 +-- .../3.1.x/security-http-bearer/client/types.gen.ts | 13 ------------- .../3.1.x/security-oauth2/client/client.gen.ts | 3 +-- .../3.1.x/security-oauth2/client/types.gen.ts | 13 ------------- .../security-open-id-connect/client/client.gen.ts | 3 +-- .../security-open-id-connect/client/types.gen.ts | 13 ------------- .../3.1.x/servers/client/client.gen.ts | 3 +-- .../__snapshots__/3.1.x/servers/client/types.gen.ts | 13 ------------- .../3.1.x/sse-angular/client/client.gen.ts | 3 +-- .../3.1.x/sse-angular/client/types.gen.ts | 13 ------------- .../3.1.x/sse-axios/client/client.gen.ts | 4 ++-- .../3.1.x/sse-axios/client/types.gen.ts | 13 ------------- .../3.1.x/sse-fetch/client/client.gen.ts | 3 +-- .../3.1.x/sse-fetch/client/types.gen.ts | 13 ------------- .../3.1.x/sse-next/client/client.gen.ts | 3 +-- .../3.1.x/sse-next/client/types.gen.ts | 13 ------------- .../3.1.x/sse-nuxt/client/client.gen.ts | 4 ++-- .../3.1.x/sse-nuxt/client/types.gen.ts | 13 ------------- .../3.1.x/transformers-all-of/client/client.gen.ts | 3 +-- .../3.1.x/transformers-all-of/client/types.gen.ts | 13 ------------- .../transformers-any-of-null/client/client.gen.ts | 3 +-- .../transformers-any-of-null/client/types.gen.ts | 13 ------------- .../3.1.x/transformers-array/client/client.gen.ts | 3 +-- .../3.1.x/transformers-array/client/types.gen.ts | 13 ------------- .../transforms-read-write/client/client.gen.ts | 3 +-- .../3.1.x/transforms-read-write/client/types.gen.ts | 13 ------------- .../@hey-api/client-angular/bundle/client.ts | 3 +-- .../plugins/@hey-api/client-angular/bundle/types.ts | 13 ------------- .../plugins/@hey-api/client-axios/bundle/client.ts | 4 ++-- .../plugins/@hey-api/client-axios/bundle/types.ts | 13 ------------- .../plugins/@hey-api/client-fetch/bundle/client.ts | 3 +-- .../plugins/@hey-api/client-fetch/bundle/types.ts | 13 ------------- .../plugins/@hey-api/client-next/bundle/client.ts | 3 +-- .../plugins/@hey-api/client-next/bundle/types.ts | 13 ------------- .../plugins/@hey-api/client-nuxt/bundle/client.ts | 4 ++-- .../plugins/@hey-api/client-nuxt/bundle/types.ts | 13 ------------- 354 files changed, 218 insertions(+), 2655 deletions(-) diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts index 22b6087b2..ec02840e5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts @@ -22,7 +22,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -212,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/types.gen.ts index 9a7a6ec4f..6cdf8ad48 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/types.gen.ts @@ -20,19 +20,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts index 22b6087b2..ec02840e5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts @@ -22,7 +22,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -212,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/types.gen.ts index 9a7a6ec4f..6cdf8ad48 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/types.gen.ts @@ -20,19 +20,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/client.gen.ts index 22b6087b2..ec02840e5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/client.gen.ts @@ -22,7 +22,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -212,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/types.gen.ts index 9a7a6ec4f..6cdf8ad48 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/types.gen.ts @@ -20,19 +20,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/client.gen.ts index 22b6087b2..ec02840e5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/client.gen.ts @@ -22,7 +22,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -212,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/types.gen.ts index 9a7a6ec4f..6cdf8ad48 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/types.gen.ts @@ -20,19 +20,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts index ffae63f6c..aeac2ae6e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen.js'; import type { HttpMethod } from '../core/types.gen.js'; import { getValidRequestBody } from '../core/utils.gen.js'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen.js'; +import type { Client, Config, RequestOptions } from './types.gen.js'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/types.gen.ts index 93fdc864f..7ad021531 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen.js'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts index 65ea5f964..dc5e9a114 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen.js'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen.js'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/types.gen.ts index b37dc1d50..d68ab68c4 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen.js'; import type { Middleware } from './utils.gen.js'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts index 3b01de588..86e2201f9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -211,7 +210,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/types.gen.ts index b2a006b00..76f0bf322 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts index 3b01de588..86e2201f9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -211,7 +210,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/types.gen.ts index b2a006b00..76f0bf322 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts index 3b01de588..86e2201f9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -211,7 +210,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/types.gen.ts index b2a006b00..76f0bf322 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts index 3b01de588..86e2201f9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -211,7 +210,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/types.gen.ts index b2a006b00..76f0bf322 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts index 3b01de588..86e2201f9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -211,7 +210,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/types.gen.ts index b2a006b00..76f0bf322 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts index 3b01de588..86e2201f9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -211,7 +210,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/types.gen.ts index b2a006b00..76f0bf322 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts index 3b01de588..86e2201f9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -211,7 +210,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/types.gen.ts index b2a006b00..76f0bf322 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts index 3b01de588..86e2201f9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -211,7 +210,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/types.gen.ts index b2a006b00..76f0bf322 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts index a509a6de5..d4809da32 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen.js'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen.js'; @@ -211,7 +210,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/types.gen.ts index a17084355..907e6c9ee 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen.js'; import type { Middleware } from './utils.gen.js'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts index f13fbd66f..c7116afdf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as RequestBody, + body: opts.body as any, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/types.gen.ts index 504845a34..ac663764d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/types.gen.ts @@ -21,19 +21,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts index f13fbd66f..c7116afdf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as RequestBody, + body: opts.body as any, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/types.gen.ts index 504845a34..ac663764d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/types.gen.ts @@ -21,19 +21,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts index f13fbd66f..c7116afdf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as RequestBody, + body: opts.body as any, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/types.gen.ts index 504845a34..ac663764d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/types.gen.ts @@ -21,19 +21,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts index f13fbd66f..c7116afdf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as RequestBody, + body: opts.body as any, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/types.gen.ts index 504845a34..ac663764d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/types.gen.ts @@ -21,19 +21,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts index f13fbd66f..c7116afdf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as RequestBody, + body: opts.body as any, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/types.gen.ts index 504845a34..ac663764d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/types.gen.ts @@ -21,19 +21,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts index f13fbd66f..c7116afdf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as RequestBody, + body: opts.body as any, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/types.gen.ts index 504845a34..ac663764d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/types.gen.ts @@ -21,19 +21,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts index f13fbd66f..c7116afdf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as RequestBody, + body: opts.body as any, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/types.gen.ts index 504845a34..ac663764d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/types.gen.ts @@ -21,19 +21,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts index f13fbd66f..c7116afdf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as RequestBody, + body: opts.body as any, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/types.gen.ts index 504845a34..ac663764d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/types.gen.ts @@ -21,19 +21,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts index 0351a2b49..71fd5ebbb 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen.js'; import type { HttpMethod } from '../core/types.gen.js'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen.js'; +import type { Client, Config, RequestOptions } from './types.gen.js'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as RequestBody, + body: opts.body as any, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/types.gen.ts index 2f00b2985..588c13b49 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/types.gen.ts @@ -21,19 +21,6 @@ import type { Config as CoreConfig, } from '../core/types.gen.js'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/client.gen.ts index 22b6087b2..ec02840e5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/client.gen.ts @@ -22,7 +22,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -212,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/types.gen.ts index 9a7a6ec4f..6cdf8ad48 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/types.gen.ts @@ -20,19 +20,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/client.gen.ts index 22b6087b2..ec02840e5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/client.gen.ts @@ -22,7 +22,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -212,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/types.gen.ts index 9a7a6ec4f..6cdf8ad48 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/types.gen.ts @@ -20,19 +20,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/client.gen.ts index 22b6087b2..ec02840e5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/client.gen.ts @@ -22,7 +22,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -212,7 +211,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/types.gen.ts index 9a7a6ec4f..6cdf8ad48 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/types.gen.ts @@ -20,19 +20,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/client.gen.ts index 6573f558e..8bf0745ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/client.gen.ts @@ -6,7 +6,7 @@ import axios from 'axios'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/types.gen.ts index bba0fa89e..21789fe0d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/types.gen.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/client.gen.ts index 3b01de588..86e2201f9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -211,7 +210,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/types.gen.ts index b2a006b00..76f0bf322 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/client.gen.ts index f13fbd66f..c7116afdf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/client.gen.ts @@ -10,7 +10,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../core/serverSentEvents.gen'; import type { HttpMethod } from '../core/types.gen'; -import type { Client, Config, RequestBody, RequestOptions } from './types.gen'; +import type { Client, Config, RequestOptions } from './types.gen'; import { buildUrl, createConfig, @@ -192,7 +192,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as RequestBody, + body: opts.body as any, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/types.gen.ts index 504845a34..ac663764d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/types.gen.ts @@ -21,19 +21,6 @@ import type { Config as CoreConfig, } from '../core/types.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts index a9dc35380..4808c32c2 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts @@ -20,7 +20,6 @@ import { getValidRequestBody } from '../../client-core/bundle/utils'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, ResponseStyle, @@ -210,7 +209,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/types.ts b/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/types.ts index 1131a72f1..1eb603e4b 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/types.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/types.ts @@ -18,19 +18,6 @@ import type { } from '../../client-core/bundle/types'; import type { Middleware } from './utils'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts index 7eb7a0f1e..fbc044980 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts @@ -4,7 +4,7 @@ import axios from 'axios'; import { createSseClient } from '../../client-core/bundle/serverSentEvents'; import type { HttpMethod } from '../../client-core/bundle/types'; import { getValidRequestBody } from '../../client-core/bundle/utils'; -import type { Client, Config, RequestBody, RequestOptions } from './types'; +import type { Client, Config, RequestOptions } from './types'; import { buildUrl, createConfig, @@ -122,7 +122,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/types.ts b/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/types.ts index 2d89d2b1b..5ae681aa3 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/types.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/types.ts @@ -17,19 +17,6 @@ import type { Config as CoreConfig, } from '../../client-core/bundle/types'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts index 44b25598b..e93a9a2d5 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts @@ -4,7 +4,6 @@ import { getValidRequestBody } from '../../client-core/bundle/utils'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types'; @@ -221,7 +220,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/types.ts b/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/types.ts index e66234ba9..456f59dcf 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/types.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/types.ts @@ -9,19 +9,6 @@ import type { } from '../../client-core/bundle/types'; import type { Middleware } from './utils'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts index 818a3cb87..39e525643 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts @@ -4,7 +4,6 @@ import { getValidRequestBody } from '../../client-core/bundle/utils'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types'; @@ -209,7 +208,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/types.ts b/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/types.ts index c8801a837..c61ad1f22 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/types.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/types.ts @@ -9,19 +9,6 @@ import type { } from '../../client-core/bundle/types'; import type { Middleware } from './utils'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export interface Config extends Omit, CoreConfig { diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts index c473ff808..b01240a23 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts @@ -8,7 +8,7 @@ import { reactive, ref, watch } from 'vue'; import { createSseClient } from '../../client-core/bundle/serverSentEvents'; import type { HttpMethod } from '../../client-core/bundle/types'; -import type { Client, Config, RequestBody, RequestOptions } from './types'; +import type { Client, Config, RequestOptions } from './types'; import { buildUrl, createConfig, @@ -190,7 +190,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...unwrapRefs(opts), - body: opts.body as RequestBody, + body: opts.body as any, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/types.ts b/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/types.ts index 40a028abd..0290d9ec4 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/types.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/types.ts @@ -19,19 +19,6 @@ import type { Config as CoreConfig, } from '../../client-core/bundle/types'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type MatrixStyle = 'label' | 'matrix' | 'simple'; From 961eade9e2b017a84c2892191c8cd02cb6c4037f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Sep 2025 01:52:26 +0000 Subject: [PATCH 4/5] Update test snapshots to remove RequestBody type definitions Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com> --- .../body-response-text-plain/client/client.gen.ts | 3 +-- .../body-response-text-plain/client/types.gen.ts | 13 ------------- .../2.0.x/form-data/client/client.gen.ts | 3 +-- .../2.0.x/form-data/client/types.gen.ts | 13 ------------- .../2.0.x/schema-unknown/client/client.gen.ts | 3 +-- .../2.0.x/schema-unknown/client/types.gen.ts | 13 ------------- .../2.0.x/security-api-key/client/client.gen.ts | 3 +-- .../2.0.x/security-api-key/client/types.gen.ts | 13 ------------- .../2.0.x/security-basic/client/client.gen.ts | 3 +-- .../2.0.x/security-basic/client/types.gen.ts | 13 ------------- .../2.0.x/security-false/client/client.gen.ts | 3 +-- .../2.0.x/security-false/client/types.gen.ts | 13 ------------- .../2.0.x/security-oauth2/client/client.gen.ts | 3 +-- .../2.0.x/security-oauth2/client/types.gen.ts | 13 ------------- .../2.0.x/servers-base-path/client/client.gen.ts | 3 +-- .../2.0.x/servers-base-path/client/types.gen.ts | 13 ------------- .../2.0.x/servers-host/client/client.gen.ts | 3 +-- .../2.0.x/servers-host/client/types.gen.ts | 13 ------------- .../2.0.x/servers/client/client.gen.ts | 3 +-- .../__snapshots__/2.0.x/servers/client/types.gen.ts | 13 ------------- .../transforms-read-write/client/client.gen.ts | 3 +-- .../2.0.x/transforms-read-write/client/types.gen.ts | 13 ------------- .../plugins/@tanstack/meta/client/client.gen.ts | 3 +-- .../plugins/@tanstack/meta/client/types.gen.ts | 13 ------------- 24 files changed, 12 insertions(+), 180 deletions(-) diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts index ce7fa7c6f..a7de753ab 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts @@ -6,7 +6,6 @@ import { getValidRequestBody } from '../core/utils.gen'; import type { Client, Config, - RequestBody, RequestOptions, ResolvedRequestOptions, } from './types.gen'; @@ -223,7 +222,7 @@ export const createClient = (config: Config = {}): Client => { const { opts, url } = await beforeRequest(options); return createSseClient({ ...opts, - body: opts.body as RequestBody, + body: opts.body as any, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/types.gen.ts index dd0339265..1a005b51e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/types.gen.ts @@ -11,19 +11,6 @@ import type { } from '../core/types.gen'; import type { Middleware } from './utils.gen'; -/** - * Compatible body type for requests that doesn't depend on DOM types. - * Equivalent to the standard BodyInit type but without DOM-specific types - * like Blob, FormData, or ReadableStream that require DOM lib in TypeScript. - */ -export type RequestBody = - | string - | ArrayBuffer - | ArrayBufferView - | URLSearchParams - | null - | undefined; - export type ResponseStyle = 'data' | 'fields'; export interface Config From d972e53edfd3d52a540a10b0e60cd6dd75517d83 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Sep 2025 02:34:21 +0000 Subject: [PATCH 5/5] Changes before error encountered Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com> --- .../2.0.x/body-response-text-plain/client/client.gen.ts | 4 ++-- .../test/__snapshots__/2.0.x/form-data/client/client.gen.ts | 4 ++-- .../__snapshots__/2.0.x/schema-unknown/client/client.gen.ts | 4 ++-- .../2.0.x/security-api-key/client/client.gen.ts | 4 ++-- .../__snapshots__/2.0.x/security-basic/client/client.gen.ts | 4 ++-- .../__snapshots__/2.0.x/security-false/client/client.gen.ts | 4 ++-- .../__snapshots__/2.0.x/security-oauth2/client/client.gen.ts | 4 ++-- .../2.0.x/servers-base-path/client/client.gen.ts | 4 ++-- .../__snapshots__/2.0.x/servers-host/client/client.gen.ts | 4 ++-- .../test/__snapshots__/2.0.x/servers/client/client.gen.ts | 4 ++-- .../2.0.x/transforms-read-write/client/client.gen.ts | 4 ++-- .../client-axios/base-url-false/client/client.gen.ts | 4 ++-- .../client-axios/base-url-number/client/client.gen.ts | 4 ++-- .../client-axios/base-url-strict/client/client.gen.ts | 4 ++-- .../client-axios/base-url-string/client/client.gen.ts | 4 ++-- .../@hey-api/client-axios/clean-false/client/client.gen.ts | 4 ++-- .../@hey-api/client-axios/default/client/client.gen.ts | 4 ++-- .../client-axios/sdk-client-optional/client/client.gen.ts | 4 ++-- .../client-axios/sdk-client-required/client/client.gen.ts | 4 ++-- .../client-axios/tsconfig-nodenext-sdk/client/client.gen.ts | 4 ++-- .../client-fetch/base-url-false/client/client.gen.ts | 4 ++-- .../client-fetch/base-url-number/client/client.gen.ts | 4 ++-- .../client-fetch/base-url-strict/client/client.gen.ts | 4 ++-- .../client-fetch/base-url-string/client/client.gen.ts | 4 ++-- .../@hey-api/client-fetch/clean-false/client/client.gen.ts | 4 ++-- .../@hey-api/client-fetch/default/client/client.gen.ts | 4 ++-- .../client-fetch/sdk-client-optional/client/client.gen.ts | 4 ++-- .../client-fetch/sdk-client-required/client/client.gen.ts | 4 ++-- .../client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts | 4 ++-- .../@hey-api/client-next/base-url-false/client/client.gen.ts | 4 ++-- .../client-next/base-url-number/client/client.gen.ts | 4 ++-- .../client-next/base-url-strict/client/client.gen.ts | 4 ++-- .../client-next/base-url-string/client/client.gen.ts | 4 ++-- .../@hey-api/client-next/clean-false/client/client.gen.ts | 4 ++-- .../@hey-api/client-next/default/client/client.gen.ts | 4 ++-- .../client-next/sdk-client-optional/client/client.gen.ts | 4 ++-- .../client-next/sdk-client-required/client/client.gen.ts | 4 ++-- .../client-next/tsconfig-nodenext-sdk/client/client.gen.ts | 4 ++-- .../@hey-api/client-nuxt/base-url-false/client/client.gen.ts | 5 +++-- .../client-nuxt/base-url-number/client/client.gen.ts | 5 +++-- .../client-nuxt/base-url-strict/client/client.gen.ts | 5 +++-- .../client-nuxt/base-url-string/client/client.gen.ts | 5 +++-- .../@hey-api/client-nuxt/clean-false/client/client.gen.ts | 5 +++-- .../@hey-api/client-nuxt/default/client/client.gen.ts | 5 +++-- .../client-nuxt/sdk-client-optional/client/client.gen.ts | 5 +++-- .../client-nuxt/sdk-client-required/client/client.gen.ts | 5 +++-- .../client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts | 5 +++-- .../src/plugins/@hey-api/client-angular/bundle/client.ts | 4 ++-- .../src/plugins/@hey-api/client-axios/bundle/client.ts | 4 ++-- .../src/plugins/@hey-api/client-fetch/bundle/client.ts | 4 ++-- .../src/plugins/@hey-api/client-next/bundle/client.ts | 4 ++-- .../src/plugins/@hey-api/client-nuxt/bundle/client.ts | 5 +++-- 52 files changed, 114 insertions(+), 104 deletions(-) diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts index 8bf0745ab..3308740e2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts @@ -122,9 +122,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts index 8bf0745ab..3308740e2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts @@ -122,9 +122,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts index 8bf0745ab..3308740e2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts @@ -122,9 +122,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts index 8bf0745ab..3308740e2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts @@ -122,9 +122,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts index 8bf0745ab..3308740e2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts @@ -122,9 +122,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts index 8bf0745ab..3308740e2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts @@ -122,9 +122,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts index 8bf0745ab..3308740e2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts @@ -122,9 +122,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts index 8bf0745ab..3308740e2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts @@ -122,9 +122,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts index aeac2ae6e..ec277a4a2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts @@ -122,9 +122,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts index a7de753ab..a2f252543 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts index dc5e9a114..cae80040e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts index 86e2201f9..bcad1abf2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts @@ -208,9 +208,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts index 86e2201f9..bcad1abf2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts @@ -208,9 +208,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts index 86e2201f9..bcad1abf2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts @@ -208,9 +208,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts index 86e2201f9..bcad1abf2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts @@ -208,9 +208,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts index 86e2201f9..bcad1abf2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts @@ -208,9 +208,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts index 86e2201f9..bcad1abf2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts @@ -208,9 +208,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts index 86e2201f9..bcad1abf2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts @@ -208,9 +208,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts index 86e2201f9..bcad1abf2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts @@ -208,9 +208,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts index d4809da32..07742b92e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts @@ -208,9 +208,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts index c7116afdf..0ec9e73a5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts @@ -190,9 +190,10 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const unwrappedOpts = unwrapRefs(opts); + const { body, ...sseOpts } = unwrappedOpts; return createSseClient({ - ...unwrapRefs(opts), - body: opts.body as any, + ...sseOpts, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts index c7116afdf..0ec9e73a5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts @@ -190,9 +190,10 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const unwrappedOpts = unwrapRefs(opts); + const { body, ...sseOpts } = unwrappedOpts; return createSseClient({ - ...unwrapRefs(opts), - body: opts.body as any, + ...sseOpts, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts index c7116afdf..0ec9e73a5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts @@ -190,9 +190,10 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const unwrappedOpts = unwrapRefs(opts); + const { body, ...sseOpts } = unwrappedOpts; return createSseClient({ - ...unwrapRefs(opts), - body: opts.body as any, + ...sseOpts, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts index c7116afdf..0ec9e73a5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts @@ -190,9 +190,10 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const unwrappedOpts = unwrapRefs(opts); + const { body, ...sseOpts } = unwrappedOpts; return createSseClient({ - ...unwrapRefs(opts), - body: opts.body as any, + ...sseOpts, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts index c7116afdf..0ec9e73a5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts @@ -190,9 +190,10 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const unwrappedOpts = unwrapRefs(opts); + const { body, ...sseOpts } = unwrappedOpts; return createSseClient({ - ...unwrapRefs(opts), - body: opts.body as any, + ...sseOpts, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts index c7116afdf..0ec9e73a5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts @@ -190,9 +190,10 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const unwrappedOpts = unwrapRefs(opts); + const { body, ...sseOpts } = unwrappedOpts; return createSseClient({ - ...unwrapRefs(opts), - body: opts.body as any, + ...sseOpts, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts index c7116afdf..0ec9e73a5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts @@ -190,9 +190,10 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const unwrappedOpts = unwrapRefs(opts); + const { body, ...sseOpts } = unwrappedOpts; return createSseClient({ - ...unwrapRefs(opts), - body: opts.body as any, + ...sseOpts, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts index c7116afdf..0ec9e73a5 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts @@ -190,9 +190,10 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const unwrappedOpts = unwrapRefs(opts); + const { body, ...sseOpts } = unwrappedOpts; return createSseClient({ - ...unwrapRefs(opts), - body: opts.body as any, + ...sseOpts, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts index 71fd5ebbb..bc204c5fb 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts @@ -190,9 +190,10 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const unwrappedOpts = unwrapRefs(opts); + const { body, ...sseOpts } = unwrappedOpts; return createSseClient({ - ...unwrapRefs(opts), - body: opts.body as any, + ...sseOpts, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal, diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts index 4808c32c2..4d9ea1b44 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts @@ -207,9 +207,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, url, diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts index fbc044980..1a1f46feb 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts @@ -120,9 +120,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as Record, method, // @ts-expect-error diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts index e93a9a2d5..282f139de 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts @@ -218,9 +218,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts index 39e525643..eeae5be7b 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts @@ -206,9 +206,9 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const { body, ...sseOpts } = opts; return createSseClient({ - ...opts, - body: opts.body as any, + ...sseOpts, headers: opts.headers as unknown as Record, method, onRequest: async (url, init) => { diff --git a/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts b/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts index b01240a23..eedaa1cab 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts @@ -188,9 +188,10 @@ export const createClient = (config: Config = {}): Client => { const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { const { opts, url } = await beforeRequest(options); + const unwrappedOpts = unwrapRefs(opts); + const { body, ...sseOpts } = unwrappedOpts; return createSseClient({ - ...unwrapRefs(opts), - body: opts.body as any, + ...sseOpts, method, onRequest: undefined, signal: unwrapRefs(opts.signal) as AbortSignal,