diff --git a/package-shared/types/index.d.ts b/package-shared/types/index.d.ts index bf4519e..0cc65bb 100644 --- a/package-shared/types/index.d.ts +++ b/package-shared/types/index.d.ts @@ -1225,7 +1225,11 @@ export type CookieObject = { sameSite?: "Strict" | "Lax" | "None"; priority?: "Low" | "Medium" | "High"; }; -export type HttpRequestParams = RequestOptions & { +export type HttpRequestParams = RequestOptions & { scheme?: "http" | "https"; body?: ReqObj; query?: ReqObj; @@ -1240,7 +1244,11 @@ export type HttpRequestFunctionType = (param: HttpRequestParams) => Promise>; -export type HttpFunctionResponse = { +export type HttpFunctionResponse = { status: number; data?: ResObj; error?: string; diff --git a/package-shared/types/index.ts b/package-shared/types/index.ts index 417da19..9d6b14e 100644 --- a/package-shared/types/index.ts +++ b/package-shared/types/index.ts @@ -1444,7 +1444,9 @@ export type CookieObject = { priority?: "Low" | "Medium" | "High"; }; -export type HttpRequestParams = RequestOptions & { +export type HttpRequestParams< + ReqObj extends { [key: string]: any } = { [key: string]: any } +> = RequestOptions & { scheme?: "http" | "https"; body?: ReqObj; query?: ReqObj; @@ -1456,7 +1458,9 @@ export type HttpRequestFunctionType< ResObj extends { [key: string]: any } = { [key: string]: any } > = (param: HttpRequestParams) => Promise>; -export type HttpFunctionResponse = { +export type HttpFunctionResponse< + ResObj extends { [key: string]: any } = { [key: string]: any } +> = { status: number; data?: ResObj; error?: string; diff --git a/package.json b/package.json index f4adc0c..fda12cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@moduletrace/datasquirel", - "version": "3.3.6", + "version": "3.3.7", "description": "Cloud-based SQL data management tool", "main": "index.js", "bin": {