diff --git a/.changeset/thirty-olives-kneel.md b/.changeset/thirty-olives-kneel.md new file mode 100644 index 000000000..882eb6ff5 --- /dev/null +++ b/.changeset/thirty-olives-kneel.md @@ -0,0 +1,5 @@ +--- +'@hey-api/openapi-ts': patch +--- + +fix: export utils diff --git a/README.md b/README.md index dbbe59044..8ad1da2a7 100644 --- a/README.md +++ b/README.md @@ -35,4 +35,4 @@ Automatically update your code when the APIs it depends on change. [Find out mor ## Migration Guides -[OpenAPI Typescript Codegen](https://heyapi.dev/openapi-ts/migrating.html#openapi-typescript-codegen). +[OpenAPI Typescript Codegen](https://heyapi.dev/openapi-ts/migrating.html#openapi-typescript-codegen) diff --git a/packages/client-axios/README.md b/packages/client-axios/README.md index 34b053667..3f6101a86 100644 --- a/packages/client-axios/README.md +++ b/packages/client-axios/README.md @@ -36,4 +36,4 @@ Automatically update your code when the APIs it depends on change. [Find out mor ## Migration Guides -[OpenAPI Typescript Codegen](https://heyapi.dev/openapi-ts/migrating.html#openapi-typescript-codegen). +[OpenAPI Typescript Codegen](https://heyapi.dev/openapi-ts/migrating.html#openapi-typescript-codegen) diff --git a/packages/client-fetch/README.md b/packages/client-fetch/README.md index 36fcc9baf..01bd3510b 100644 --- a/packages/client-fetch/README.md +++ b/packages/client-fetch/README.md @@ -36,4 +36,4 @@ Automatically update your code when the APIs it depends on change. [Find out mor ## Migration Guides -[OpenAPI Typescript Codegen](https://heyapi.dev/openapi-ts/migrating.html#openapi-typescript-codegen). +[OpenAPI Typescript Codegen](https://heyapi.dev/openapi-ts/migrating.html#openapi-typescript-codegen) diff --git a/packages/openapi-ts/README.md b/packages/openapi-ts/README.md index dbbe59044..8ad1da2a7 100644 --- a/packages/openapi-ts/README.md +++ b/packages/openapi-ts/README.md @@ -35,4 +35,4 @@ Automatically update your code when the APIs it depends on change. [Find out mor ## Migration Guides -[OpenAPI Typescript Codegen](https://heyapi.dev/openapi-ts/migrating.html#openapi-typescript-codegen). +[OpenAPI Typescript Codegen](https://heyapi.dev/openapi-ts/migrating.html#openapi-typescript-codegen) diff --git a/packages/openapi-ts/src/index.ts b/packages/openapi-ts/src/index.ts index 57b859239..a1e8f831a 100644 --- a/packages/openapi-ts/src/index.ts +++ b/packages/openapi-ts/src/index.ts @@ -545,12 +545,9 @@ export const defaultPlugins = [ */ export const defineConfig = (config: UserConfig): UserConfig => config; -export default { - createClient, - defineConfig, -}; - export type { IR } from './ir/types'; export type { OpenApi } from './openApi/types'; export type { Plugin } from './plugins/types'; export type { UserConfig } from './types/config'; +export type { LegacyIR } from './types/types'; +export { utils } from './utils/exports'; diff --git a/packages/openapi-ts/src/types/types.d.ts b/packages/openapi-ts/src/types/types.d.ts new file mode 100644 index 000000000..028093740 --- /dev/null +++ b/packages/openapi-ts/src/types/types.d.ts @@ -0,0 +1,5 @@ +import type { Operation } from './client'; + +export namespace LegacyIR { + export type LegacyOperation = Operation; +} diff --git a/packages/openapi-ts/src/utils/exports.ts b/packages/openapi-ts/src/utils/exports.ts new file mode 100644 index 000000000..e529c9363 --- /dev/null +++ b/packages/openapi-ts/src/utils/exports.ts @@ -0,0 +1,6 @@ +import { stringCase } from './stringCase'; + +// publicly exposed utils +export const utils = { + stringCase, +};