From e30114ea368bef1d4e21d32a3309b1d0f4071fd1 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Feb 2026 11:10:53 +0000 Subject: [PATCH] feat: add typescript-redux-query client generator Add the typescript-redux-query OpenAPI generator to produce Redux Query API clients for both the main Deadlock API and Assets API. Updated Makefile with generation and clean targets, and README with client listing, installation instructions, and make target documentation. https://claude.ai/code/session_01TLWA3qotBMoGUf7DY3siEz --- Makefile | 20 ++++++++++++++++++-- README.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c40aaf9b..f8cf09af 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -all: python typescript rust kotlin go php jetbrains-client csharp +all: python typescript typescript-redux-query rust kotlin go php jetbrains-client csharp python: generate-api-python generate-assets-api-python @@ -33,6 +33,22 @@ generate-assets-api-typescript: pnpx @openapitools/openapi-generator-cli generate --git-user-id deadlock-api --git-repo-id openapi-clients -i https://assets.deadlock-api.com/openapi.json -g typescript-axios -o typescript/assets-api/ --skip-validate-spec --additional-properties=npmName=assets_deadlock_api_client,useSingleRequestParameter=true @echo "--> Assets API client generated successfully in typescript/assets-api/" +typescript-redux-query: generate-api-typescript-redux-query generate-assets-api-typescript-redux-query + +generate-api-typescript-redux-query: + @echo "--> Creating directory for the main API client..." + @mkdir -p typescript-redux-query/api + @echo "--> Generating Typescript Redux Query client for the main API..." + pnpx @openapitools/openapi-generator-cli generate --git-user-id deadlock-api --git-repo-id openapi-clients -i https://api.deadlock-api.com/openapi.json -g typescript-redux-query -o typescript-redux-query/api/ --skip-validate-spec --additional-properties=npmName=deadlock_api_client_redux_query,useSingleRequestParameter=true,supportsES6=true + @echo "--> Main API client generated successfully in typescript-redux-query/api/" + +generate-assets-api-typescript-redux-query: + @echo "--> Creating directory for the assets API client..." + @mkdir -p typescript-redux-query/assets-api + @echo "--> Generating Typescript Redux Query client for the assets API..." + pnpx @openapitools/openapi-generator-cli generate --git-user-id deadlock-api --git-repo-id openapi-clients -i https://assets.deadlock-api.com/openapi.json -g typescript-redux-query -o typescript-redux-query/assets-api/ --skip-validate-spec --additional-properties=npmName=assets_deadlock_api_client_redux_query,useSingleRequestParameter=true,supportsES6=true + @echo "--> Assets API client generated successfully in typescript-redux-query/assets-api/" + rust: generate-api-rust generate-assets-api-rust generate-api-rust: @@ -152,5 +168,5 @@ generate-assets-api-csharp: # Target to clean up all generated directories. clean: @echo "--> Removing generated client directories..." - @rm -rf openapitools.json python/api python/assets-api typescript/api typescript/assets-api rust/api rust/assets-api kotlin/api kotlin/assets-api go/api go/assets-api php/api php/assets-api jetbrains-client/api jetbrains-client/assets-api csharp/api csharp/assets-api + @rm -rf openapitools.json python/api python/assets-api typescript/api typescript/assets-api typescript-redux-query/api typescript-redux-query/assets-api rust/api rust/assets-api kotlin/api kotlin/assets-api go/api go/assets-api php/api php/assets-api jetbrains-client/api jetbrains-client/assets-api csharp/api csharp/assets-api @echo "--> Cleanup complete." diff --git a/README.md b/README.md index 7001b2a6..a71348d9 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,9 @@ The clients are organized by language and API: - **TypeScript**: - `typescript/api`: Client for the main Deadlock API. - `typescript/assets-api`: Client for the Deadlock Assets API. +- **TypeScript Redux Query**: + - `typescript-redux-query/api`: Client for the main Deadlock API. + - `typescript-redux-query/assets-api`: Client for the Deadlock Assets API. - **Kotlin & Java**: - `kotlin/api`: Client for the main Deadlock API. - `kotlin/assets-api`: Client for the Deadlock Assets API. @@ -99,6 +102,33 @@ Use `npm`, `yarn`, `pnpm`, or `bun` to install the clients: pnpm add github:deadlock-api/openapi-clients#path:/typescript/assets-api ``` +### TypeScript Redux Query + +Use `npm`, `yarn`, `pnpm`, or `bun` to install the clients: + +- **API Client:** + ```bash + # npm + npm install 'https://gitpkg.vercel.app/deadlock-api/openapi-clients/typescript-redux-query/api?master' + + # yarn + yarn add 'https://gitpkg.vercel.app/deadlock-api/openapi-clients/typescript-redux-query/api?master' + + # pnpm + pnpm add github:deadlock-api/openapi-clients#path:/typescript-redux-query/api + ``` +- **Assets API Client:** + ```bash + # npm + npm install 'https://gitpkg.vercel.app/deadlock-api/openapi-clients/typescript-redux-query/assets-api?master' + + # yarn + yarn add 'https://gitpkg.vercel.app/deadlock-api/openapi-clients/typescript-redux-query/assets-api?master' + + # pnpm + pnpm add github:deadlock-api/openapi-clients#path:/typescript-redux-query/assets-api + ``` + ### Kotlin & Java Use `gradle` or `maven` to install the clients: @@ -181,6 +211,7 @@ You can regenerate the clients manually using the provided `Makefile`: make python make rust make typescript + make typescript-redux-query make kotlin make java make go