Skip to content

Commit

Permalink
v0.2.2: Fix(types): support custom handler in fe-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
suhaotian committed Sep 22, 2024
1 parent 6eff3bd commit 7dbad27
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion examples/server/packages/fe-sdk-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/tsdk-server-adapters/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 5 additions & 1 deletion packages/tsdk/fe-sdk-template/src/gen-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ export function getHandler() {
export default function genAPICall<ReqPayload, ResData>(
apiConfig: APIConfig
): {
(data: ReqPayload, requestConfig?: RequestConfig<ReqPayload> | ObjectLiteral): Promise<ResData>;
(
data: ReqPayload,
requestConfig?: RequestConfig<ReqPayload> | ObjectLiteral,
customHandler?: typeof handler
): Promise<ResData>;
config: APIConfig;
} {
function APICall(
Expand Down
2 changes: 1 addition & 1 deletion packages/tsdk/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 7dbad27

Please sign in to comment.