From 7dbad27599775d8ee04414b1ea89346e49455289 Mon Sep 17 00:00:00 2001 From: suhaotian Date: Sun, 22 Sep 2024 10:47:31 +1000 Subject: [PATCH] v0.2.2: Fix(types): support custom handler in `fe-sdk` --- CHANGELOG.mdx | 5 +++++ examples/server/packages/fe-sdk-demo/package.json | 2 +- packages/tsdk-server-adapters/package.json | 2 +- packages/tsdk/fe-sdk-template/src/gen-api.ts | 6 +++++- packages/tsdk/package.json | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.mdx b/CHANGELOG.mdx index 7881d64..998b3de 100644 --- a/CHANGELOG.mdx +++ b/CHANGELOG.mdx @@ -3,6 +3,11 @@ This is the log of notable changes to the `tsdk` that are developer-facing. +### 0.2.2 2024/9/22 + +- Fix(types): support custom handler in `fe-sdk` + + ### 0.2.1 2024/9/21 - Feat: support custom handler in `fe-sdk` diff --git a/examples/server/packages/fe-sdk-demo/package.json b/examples/server/packages/fe-sdk-demo/package.json index 640b88f..d7f855f 100644 --- a/examples/server/packages/fe-sdk-demo/package.json +++ b/examples/server/packages/fe-sdk-demo/package.json @@ -10,7 +10,7 @@ "dependencies": { "zod": "^3.23.8", "axios": "^1.7.7", - "xior": "^0.5.5", + "xior": "^0.6.1", "change-case": "^4.1.2", "kysely": "^0.26.3", "@tanstack/react-query": "^5.22.2", diff --git a/packages/tsdk-server-adapters/package.json b/packages/tsdk-server-adapters/package.json index 507963b..cfd48e7 100644 --- a/packages/tsdk-server-adapters/package.json +++ b/packages/tsdk-server-adapters/package.json @@ -1,6 +1,6 @@ { "name": "tsdk-server-adapters", - "version": "0.2.1", + "version": "0.2.2", "main": "lib/index.js", "repository": "tsdk-monorepo/tsdk", "bugs": "https://github.com/tsdk-monorepo/tsdk/issues", diff --git a/packages/tsdk/fe-sdk-template/src/gen-api.ts b/packages/tsdk/fe-sdk-template/src/gen-api.ts index 1b38a1f..1840bb6 100644 --- a/packages/tsdk/fe-sdk-template/src/gen-api.ts +++ b/packages/tsdk/fe-sdk-template/src/gen-api.ts @@ -45,7 +45,11 @@ export function getHandler() { export default function genAPICall( apiConfig: APIConfig ): { - (data: ReqPayload, requestConfig?: RequestConfig | ObjectLiteral): Promise; + ( + data: ReqPayload, + requestConfig?: RequestConfig | ObjectLiteral, + customHandler?: typeof handler + ): Promise; config: APIConfig; } { function APICall( diff --git a/packages/tsdk/package.json b/packages/tsdk/package.json index cfa13fd..8ceac70 100644 --- a/packages/tsdk/package.json +++ b/packages/tsdk/package.json @@ -1,6 +1,6 @@ { "name": "tsdk", - "version": "0.2.1", + "version": "0.2.2", "description": "Type-safe API development and code share tool for TypeScript projects.", "repository": "tsdk-monorepo/tsdk", "bugs": "https://github.com/tsdk-monorepo/tsdk/issues",