- 3901553: Add MIT license metadata to package manifests.
- Updated dependencies [3901553]
- @openapi-qraft/plugin@2.15.0-beta.10
- @qraft/cli-utils@1.0.0-beta.9
- @qraft/plugin@1.0.0-beta.9
- d1af027: Fix compatibility with
@tanstack/react-query@^5.100.14by relying on TypeScript's built-inNoInfertype instead of importingNoInferfrom TanStack Query.- @openapi-qraft/plugin@2.15.0-beta.9
- @qraft/cli-utils@1.0.0-beta.8
- @qraft/plugin@1.0.0-beta.8
-
c993e89: Clarify and narrow the type surface of context-based React API clients.
Context-based clients created without options remain the React-friendly static hooks client: create them outside components, provide
queryClient,requestFn, andbaseUrlthrough the generated React Context, and call hooks inside components.When the same context-based factory is called with an explicit options object, including the full
queryClient,requestFn, andbaseUrlset, it now exposes only method callbacks and operation calls. React hooks are intentionally omitted from that runtime-configured surface so the API does not encourage creating a hooks client during a component render. This keeps hook usage tied to the static client shape that React Compiler can reason about, while still allowing callback code to build a method-only client from the current Context value for cache updates, invalidation, and imperative request methods.
- Updated dependencies [67008b3]
- @openapi-qraft/plugin@2.15.0-beta.8
- @qraft/cli-utils@1.0.0-beta.7
- @qraft/plugin@1.0.0-beta.7
- f43bc5c: When an operation has only optional parameters, the imperative operation function now accepts
QueryFnOptions(e.g.signal,meta) without requiring aparametersargument. This matches how optional request fields are already handled for hooks and improves typing for directqraft.<service>.<operation>(…)calls. - 6a2f1ed: Updated repository dependencies to current compatible versions across the workspace.
- a2327db: Added an optional
--root-securityflag that applies the OpenAPI document’s top-levelsecurityas the default for operations that omit their ownsecurity, while any operation-levelsecuritystill overrides it as defined by the specification. - 55a23fd: Updated the openapi-typescript package to the current compatible version.
- Updated dependencies [6a2f1ed]
- Updated dependencies [55a23fd]
- @openapi-qraft/plugin@2.15.0-beta.7
- @qraft/cli-utils@1.0.0-beta.6
- @qraft/plugin@1.0.0-beta.6
- Updated dependencies [5041c44]
- @qraft/cli-utils@1.0.0-beta.5
- @openapi-qraft/plugin@2.15.0-beta.6
- @qraft/plugin@1.0.0-beta.5
- 37eaa3c: Add
context:option to--create-api-client-fnfor React Context-based API clients. Enables creating API clients outside components with static hooks, making them compatible with React Compiler optimization.
- @openapi-qraft/plugin@2.15.0-beta.5
- @qraft/cli-utils@1.0.0-beta.4
- @qraft/plugin@1.0.0-beta.4
- 04fb1bd: Fixed callback typing and client factory overload generation for partial callback clients.
- Added
getMutationCacheto mutation state callback typing inqraftAPIClient, so it is available on generated clients when relevant callbacks are provided. - Fixed generated
createAPIClientoperation-client overloads to returnAPIBasicQueryClientServices<..., Callbacks>andAPIBasicClientServices<..., Callbacks>(instead of incorrectly locking toDefaultCallbacks) for partial callback configurations. - @openapi-qraft/plugin@2.15.0-beta.4
- @qraft/cli-utils@1.0.0-beta.3
- @qraft/plugin@1.0.0-beta.3
- Added
- @openapi-qraft/plugin@2.15.0-beta.3
- @qraft/cli-utils@1.0.0-beta.2
- @qraft/plugin@1.0.0-beta.2
- @openapi-qraft/plugin@2.15.0-beta.2
- @qraft/cli-utils@1.0.0-beta.1
- @qraft/plugin@1.0.0-beta.1
-
a282960: Introduce unified CLI tool
@qraft/clithat extends code generation capabilities beyond OpenAPI to support AsyncAPI specifications. The new CLI provides three main commands:qraft openapi- Generate type-safe code from OpenAPI documents (React Query hooks and TypeScript types)qraft asyncapi- Generate TypeScript types from AsyncAPI documentsqraft redocly- Generate code from Redocly configuration files supporting both OpenAPI and AsyncAPI APIs
The CLI uses a plugin-based architecture where plugins are installed as peer dependencies, allowing users to install only the plugins they need. It maintains full backward compatibility with existing OpenAPI workflows while adding seamless support for event-driven API specifications.
- 7074f50: Fix incorrect overload order in
ServiceOperationUseQueryandServiceOperationUseInfiniteQueryinterfaces. The overloads were swapped, causing TypeScript to incorrectly infer return types. Now the first overload correctly handles cases withinitialData(returnsDefinedUseQueryResult), and the second handles cases without it (returnsUseQueryResult). - Updated dependencies [a282960]
- @openapi-qraft/plugin@2.15.0-beta.1
- @qraft/cli-utils@1.0.0-beta.0
- @qraft/plugin@1.0.0-beta.0
- 87730d2: Add
--operation-parameters-type-wrapperoption to configure custom ParametersWrapper types for specific operation patterns. The ParametersWrapper type now accepts four generic parameters: TSchema, TOperation, TData, and TError, allowing for more flexible parameter type customization.
- @openapi-qraft/plugin@2.15.0-beta.0
- 3a7f9e1: Fix TS4023 error in services index export by using explicit
typeoftype annotation instead ofas constassertion.
- @openapi-qraft/plugin@2.14.0
- 58cf835: Update
@redocly/openapi-core,openapi-typescriptandora.
- eafe0b0: Fix incorrect service basename in TSDoc examples.
- Updated dependencies [58cf835]
- @openapi-qraft/plugin@2.13.0
- cdc4bf3: Resolve unmet peerDependencies.
- 5430c32: Reorder generated service operation methods for better organization.
- Updated dependencies [cdc4bf3]
- @openapi-qraft/plugin@2.12.0
- 56f4ae9: Added
getMutationCache()method to query client operations.
- @openapi-qraft/plugin@2.11.0
- @openapi-qraft/plugin@2.10.2
- Updated dependencies [8f90621]
- @openapi-qraft/plugin@2.10.1
- @openapi-qraft/plugin@2.10.0
- @openapi-qraft/plugin@2.9.0
- @openapi-qraft/plugin@2.8.0
- e45cdda: Moved
UseSuspenseInfiniteQueryOptionstype import from@tanstack/react-queryto@openapi-qraft/tanstack-query-react-typesand optimized generic parameters order for better compatibility with TanStack Query versions 5.79.2 and earlier.- @openapi-qraft/plugin@2.7.2
- @openapi-qraft/plugin@2.7.1
-
9c1c611: New
--override-import-typeoption for the CLI that has been implemented to allow overriding import paths for specific types in generated filesThis feature has been designed to enable using custom type implementations instead of the default ones
-
c990dc0: Updated the generated services to always import types from
@tanstack/react-queryinstead of@tanstack/query-core. This simplifies the generated code and makes it easier to override types if needed.
- @openapi-qraft/plugin@2.7.0
- @openapi-qraft/plugin@2.6.4
- @openapi-qraft/plugin@2.6.3
- @openapi-qraft/plugin@2.6.2
- @openapi-qraft/plugin@2.6.2-beta.0
- 8d6385a: Added
operationInvokeFnas an allowed callback. - 64e5860: Do not generate default
createAPIClientwhen custom is provided.- @openapi-qraft/plugin@2.6.1
-
c71e7f9: ### Multiple API Client Generation
- Added support for generating multiple custom API client functions for a single OpenAPI specification with the new
--create-api-client-fnoption - Improved modularity by allowing the creation of API clients with specific sets of services and callbacks
- Enhanced type inference by removing generic type parameters from
qraftAPIClientfunction, making it more user-friendly
- Removed generic type parameters from
qraftAPIClientfunction - types are now automatically inferred from arguments - Updated return type of
createAPIClientwhich may require changes to code that references this type in contexts or variables- Added a migration guide and codemod script to help users update their code to the new API
- Added support for generating multiple custom API client functions for a single OpenAPI specification with the new
- Updated dependencies [c71e7f9]
- @openapi-qraft/plugin@2.6.0
- 8b7e980: Added support for generating query hooks for writable HTTP methods via
--queryable-write-operationsoption. - c9afb3b: Generate
nulltype and returnnulldata for the empty (204) responses instead of an empty object{}.
- @openapi-qraft/plugin@2.5.0
- c9afb3b: Generate
nulltype and returnnulldata for the empty (204) responses instead of an empty object{}.
- @openapi-qraft/plugin@2.5.0-beta.3
-
ece9c58: Generate types for empty responses
Now, for both successful and error responses, we generate types for all possible response outcomes. For instance, if a 204 (No Content) response is possible, we now explicitly generate a type for it (represented as
undefinedin the generated code) instead of omitting it. -
Updated dependencies [ece9c58]
- @openapi-qraft/plugin@2.5.0-beta.2
- 2811346: Fixed generation of
invokeFnfor read-only operations when using--queryable-write-operations.- @openapi-qraft/plugin@2.5.0-beta.1
- 8b7e980: Added support for generating query hooks for writable HTTP methods via
--queryable-write-operationsoption.
- @openapi-qraft/plugin@2.5.0-beta.0
- @openapi-qraft/plugin@2.4.1
- Updated dependencies [cc314c3]
- @openapi-qraft/plugin@2.4.0
- 1741d74: Allow the use of fetch* query methods without optional parameters when appropriate.
- cae8247: Allow read-only objects to be used as query and body parameters in client methods.
- @openapi-qraft/plugin@2.3.2
-
ae16908: Simplified the generated code by replacing inlined
schematypes with references to named types where applicable. -
37fbcd3: Enabled provenance support in GitHub Actions for npm publishing.
Special thanks to GauBen for implementing provenance publishing support in Yarn — this work inspired this change.
-
Updated dependencies [37fbcd3]
- @openapi-qraft/plugin@2.3.1
- 37fbcd3: Enabled provenance support in GitHub Actions for npm publishing.
- Updated dependencies [37fbcd3]
- @openapi-qraft/plugin@2.3.1-provenance-test.0
- e26f895: Replaced empty object
{}types in mutation parameters with{ query?: never; header?: never; path?: never; }to prevent accidental argument passing.
- @openapi-qraft/plugin@2.3.0
- 83c9d49: Add missing
peerDependencies.- @openapi-qraft/plugin@2.2.3
- 3e90392: Added TSDoc
@examplegeneration foruseSuspenseQueryanduseSuspenseQuerieshooks.- @openapi-qraft/plugin@2.2.2
- 92de06c: Added support for the verbatimModuleSyntax option in the TypeScript configuration.
- @openapi-qraft/plugin@2.2.1
- Updated dependencies [9cef242]
- @openapi-qraft/plugin@2.2.0
- 168b761: Improve types inferring on Infinite Queries
- @openapi-qraft/plugin@2.1.2
- @openapi-qraft/plugin@2.1.1
- @openapi-qraft/plugin@2.1.0
- @openapi-qraft/plugin@2.1.0-beta.0
- @openapi-qraft/plugin@2.0.2
- def57df: Ensure external libraries are declared in
peerDependenciesto prevent conflicts and duplication. - Updated dependencies [def57df]
- @openapi-qraft/plugin@2.0.1
- def57df: Ensure external libraries are declared in
peerDependenciesto prevent conflicts and duplication. - Updated dependencies [def57df]
- @openapi-qraft/plugin@2.0.1-beta.0
- 5b64278: Refactored service method generation in OpenAPI Qraft v2 with improved DX, including full TSDoc support and optimized autocomplete performance.
- 266611a: Enhance
createAPIClientto acceptrequestFn,baseUrl, and optionallyqueryClient. - 54fd011: Changed the exports from the schema file to include only the essential types:
$defs,paths,components,operations,webhooks. This adjustment improves the development experience by preventing the export of all schema types, which could result in an excessive number of exported types, complicating development and reducing clarity.
-
56687f3: Added support for calling
qraftAPIClient(...)with{ queryClient }, enabling non-fetching actions likeresetQueries(). -
8bbe14b: Added two new utility functions:
ensureQueryDataandensureInfiniteQueryData. These methods improve data fetching workflows by allowing seamless retrieval of cached data or fetching it when unavailable.ensureQueryDatasupports standard queries, whileensureInfiniteQueryDatais tailored for infinite queries, including paginated data handling. -
2a53608: Updated TypeScript to version 5.5.4
-
cd3fe16: Added a filtering mechanism to remove unused type imports from generated service files. This improves code readability by including only the necessary types and reduces clutter in the output.
-
0b3cda1: Updated the
qraftAPIClient(...)to return only the set of services corresponding to the methods for which callbacks were passed. -
76634bf: ### Changeset:
createPredefinedParametersRequestFnIntroduced
createPredefinedParametersRequestFn, generated by the@openapi-qraft/cliusing the--operation-predefined-parametersoption. This function allows for the automatic application of predefined parameters to selected API operations by wrapping the baserequestFn. It simplifies managing parameters, reducing boilerplate code, and supports both static and dynamic values, enhancing flexibility in API request handling.
- 4ef9ce0: Clarified
FetchInfiniteQueryOptionstype to align with the latest TanStack Query version (5.56.2). - 7ab718b: Enhanced the
--explicit-import-extensionsoption to support.tsin addition to.js, making it easier for projects using TypeScript to explicitly specify import extensions. - 78638a5: Extended TSDoc generation for existing
useQuery,useMutation,useInfiniteQuery,useIsFetchinganduseIsMutatinghooks, now including detailed usage examples. - 7e51026: Added the ability to call
getQueryKey,getMutationKey, and similar non-request operations without providingrequestFnorbaseUrl - 3ed94dc: Implemented support for requests with multiple media types. Now, if an endpoint accepts more than one media type (e.g., JSON and form-data), types will be generated to account for all possible cases, ensuring compatibility with both JSON and form-data input formats.
- 62ff8e0: Refactor
ServiceandServiceOperationtypes. - fc6b4e7: Use
import typefor types in generatedqraftPredefinedParametersRequestFn. - Updated dependencies [16b380f]
- Updated dependencies [8c77eb2]
- Updated dependencies [2a53608]
- Updated dependencies [76634bf]
- Updated dependencies [c111be6]
- Updated dependencies [62ff8e0]
- @openapi-qraft/plugin@2.0.0
- 62ff8e0: Refactor
ServiceandServiceOperationtypes. - Updated dependencies [62ff8e0]
- @openapi-qraft/plugin@2.0.0-next.19
- @openapi-qraft/plugin@2.0.0-next.18
- 8bbe14b: Added two new utility functions:
ensureQueryDataandensureInfiniteQueryData. These methods improve data fetching workflows by allowing seamless retrieval of cached data or fetching it when unavailable.ensureQueryDatasupports standard queries, whileensureInfiniteQueryDatais tailored for infinite queries, including paginated data handling. - cd3fe16: Added a filtering mechanism to remove unused type imports from generated service files. This improves code readability by including only the necessary types and reduces clutter in the output.
- Updated dependencies [16b380f]
- @openapi-qraft/plugin@2.0.0-next.17
- @openapi-qraft/plugin@2.0.0-next.16
- @openapi-qraft/plugin@2.0.0-next.15
- 54fd011: Changed the exports from the schema file to include only the essential types:
$defs,paths,components,operations,webhooks. This adjustment improves the development experience by preventing the export of all schema types, which could result in an excessive number of exported types, complicating development and reducing clarity.
- 7ab718b: Enhanced the
--explicit-import-extensionsoption to support.tsin addition to.js, making it easier for projects using TypeScript to explicitly specify import extensions.- @openapi-qraft/plugin@2.0.0-next.14
- Updated dependencies [c111be6]
- @openapi-qraft/plugin@2.0.0-next.13
- @openapi-qraft/plugin@2.0.0-next.12
- 3ed94dc: Implemented support for requests with multiple media types. Now, if an endpoint accepts more than one media type (e.g., JSON and form-data), types will be generated to account for all possible cases, ensuring compatibility with both JSON and form-data input formats.
- @openapi-qraft/plugin@2.0.0-next.11
- Updated dependencies [8c77eb2]
- @openapi-qraft/plugin@2.0.0-next.10
- 4ef9ce0: Clarified
FetchInfiniteQueryOptionstype to align with the latest TanStack Query version (5.56.2). - 78638a5: Extended TSDoc generation for existing
useQuery,useMutation,useInfiniteQuery,useIsFetchinganduseIsMutatinghooks, now including detailed usage examples.- @openapi-qraft/plugin@2.0.0-next.9
- 5b64278: Refactored service method generation in OpenAPI Qraft v2 with improved DX, including full TSDoc support and optimized autocomplete performance.
- @openapi-qraft/plugin@2.0.0-next.8
- @openapi-qraft/plugin@2.0.0-next.7
- fc6b4e7: Use
import typefor types in generatedqraftPredefinedParametersRequestFn.- @openapi-qraft/plugin@2.0.0-next.6
- 56687f3: Added support for calling
qraftAPIClient(...)with{ queryClient }, enabling non-fetching actions likeresetQueries().
- @openapi-qraft/plugin@2.0.0-next.5
- @openapi-qraft/plugin@2.0.0-next.4
- 7e51026: Added the ability to call
getQueryKey,getMutationKey, and similar non-request operations without providingrequestFnorbaseUrl- @openapi-qraft/plugin@2.0.0-next.3
- @openapi-qraft/plugin@2.0.0-next.2
-
2a53608: Updated TypeScript to version 5.5.4
-
76634bf: ### Changeset:
createPredefinedParametersRequestFnIntroduced
createPredefinedParametersRequestFn, generated by the@openapi-qraft/cliusing the--operation-predefined-parametersoption. This function allows for the automatic application of predefined parameters to selected API operations by wrapping the baserequestFn. It simplifies managing parameters, reducing boilerplate code, and supports both static and dynamic values, enhancing flexibility in API request handling.
- Updated dependencies [2a53608]
- Updated dependencies [76634bf]
- @openapi-qraft/plugin@2.0.0-next.1
- 266611a: Enhance
createAPIClientto acceptrequestFn,baseUrl, and optionallyqueryClient.
- 0b3cda1: Updated the
qraftAPIClient(...)to return only the set of services corresponding to the methods for which callbacks were passed.
- @openapi-qraft/plugin@2.0.0-next.0
- 49dc44f: Added Operation comments to service variable declarations.
- Updated dependencies [77f0812]
- Updated dependencies [7430754]
- Updated dependencies [346a408]
- Updated dependencies [787f568]
- @openapi-qraft/plugin@1.14.0
- @openapi-qraft/plugin@1.14.0-beta.5
- Updated dependencies [346a408]
- @openapi-qraft/plugin@1.14.0-beta.4
- Updated dependencies [c5c4426]
- @openapi-qraft/plugin@1.14.0-beta.3
- Updated dependencies [7430754]
- @openapi-qraft/plugin@1.14.0-beta.2
- 49dc44f: Added Operation comments to service variable declarations.
- Updated dependencies [77f0812]
- Updated dependencies [787f568]
- @openapi-qraft/plugin@1.14.0-beta.0
- Updated dependencies [63ba3ff]
- @openapi-qraft/plugin@1.13.1
- Updated dependencies [6eec6d9]
- @openapi-qraft/plugin@1.13.0
- Updated dependencies [6eec6d9]
- @openapi-qraft/plugin@1.13.0-beta.2
- @openapi-qraft/plugin@1.13.0-beta.1
- @openapi-qraft/plugin@1.13.0-beta.0
- eea0b30: Fixes the issue where enums were exported only as types, preventing their use as values.
- @openapi-qraft/plugin@1.12.1
- eea0b30: Fixes the issue where enums were exported only as types, preventing their use as values.
- @openapi-qraft/plugin@1.12.1-beta.0
- 9cd9909: Added CommonJS distribution support and various module resolution types.
- Updated dependencies [d4bc3af]
- @openapi-qraft/plugin@1.12.0
- @openapi-qraft/plugin@1.12.0-beta.2
- @openapi-qraft/plugin@1.12.0-beta.1
- 9cd9909: Added CommonJS distribution support and various module resolution types.
- Updated dependencies [d4bc3af]
- Updated dependencies [3d2dd60]
- @openapi-qraft/plugin@1.12.0-beta.0
- @openapi-qraft/plugin@1.11.0-beta.5
- @openapi-qraft/plugin@1.11.0-beta.4
- @openapi-qraft/plugin@1.11.0-beta.3
- @openapi-qraft/plugin@1.11.0-beta.2
- Updated dependencies [3d2dd60]
- @openapi-qraft/plugin@1.11.0-beta.1
- 1a4eaf8: Exported callbacks from the package index file.
- @openapi-qraft/plugin@1.11.0-beta.0
- 759180d: Refactor the service output type to a flatter structure. This improves TypeScript compilation and enables easier distribution of the code as a library.
- cbabbba: Removed
as constfrom Services variable for compatibility with older TypeScript versions.- @openapi-qraft/plugin@1.10.1
- 759180d: Refactor the service output type to a flatter structure. This improves TypeScript compilation and enables easier distribution of the code as a library.
- @openapi-qraft/plugin@1.10.1-beta.2
- cbabbba: Removed
as constfrom Services variable for compatibility with older TypeScript versions.- @openapi-qraft/plugin@1.10.1-beta.1
- @openapi-qraft/plugin@1.10.1-beta.0
- 4d8bd3c: Added
securityoutput for service operations. The schema object for each operation now includes a list of supported security schemes, detailing the authentication methods applicable to that operation.
- Updated dependencies [b04f28d]
- @openapi-qraft/plugin@1.10.0
- Updated dependencies [943a9d3]
- Updated dependencies [3a75364]
- @openapi-qraft/plugin@1.9.0
- 27d501a: Removed
ServicesCallbacksFiltertypes from react-client to resolve conflict with the Operation Invoke method.
- Updated dependencies [788fa00]
- @openapi-qraft/plugin@1.8.0