From 0cbaad242ab8702c7899e7bff2c940bb13af7016 Mon Sep 17 00:00:00 2001 From: Jordan Yee Date: Thu, 18 Apr 2024 14:42:19 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20changed=20response=20to?= =?UTF-8?q?=20tagged=20union?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - packages/types/types/response.ts | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6f07a567..99c02082 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ }, "packageManager": "pnpm@8.14.3", "engines": { - "node": "20", "pnpm": "8" } } diff --git a/packages/types/types/response.ts b/packages/types/types/response.ts index 31098fd2..7cbf0df5 100644 --- a/packages/types/types/response.ts +++ b/packages/types/types/response.ts @@ -14,7 +14,6 @@ export type BaseResponse = { * The status code of the request. */ statusCode: number; - success: boolean; }; /** @@ -26,6 +25,8 @@ export type Response = BaseResponse & { * The payload returned by the REST API. */ payload: T; + + success: true; }; /** @@ -40,6 +41,8 @@ export type ErrorResponse = BaseResponse & { * The detailed error message. */ message: string; + + success: false; }; /**