This commit is contained in:
Benjamin Toby 2025-01-09 10:42:04 +01:00
parent 0e49418bc4
commit 9f256832ee
3 changed files with 17 additions and 5 deletions

View File

@ -1225,7 +1225,11 @@ export type CookieObject = {
sameSite?: "Strict" | "Lax" | "None";
priority?: "Low" | "Medium" | "High";
};
export type HttpRequestParams<ReqObj> = RequestOptions & {
export type HttpRequestParams<ReqObj extends {
[key: string]: any;
} = {
[key: string]: any;
}> = RequestOptions & {
scheme?: "http" | "https";
body?: ReqObj;
query?: ReqObj;
@ -1240,7 +1244,11 @@ export type HttpRequestFunctionType<ReqObj extends {
} = {
[key: string]: any;
}> = (param: HttpRequestParams<ReqObj>) => Promise<HttpFunctionResponse<ResObj>>;
export type HttpFunctionResponse<ResObj> = {
export type HttpFunctionResponse<ResObj extends {
[key: string]: any;
} = {
[key: string]: any;
}> = {
status: number;
data?: ResObj;
error?: string;

View File

@ -1444,7 +1444,9 @@ export type CookieObject = {
priority?: "Low" | "Medium" | "High";
};
export type HttpRequestParams<ReqObj> = 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<ReqObj>) => Promise<HttpFunctionResponse<ResObj>>;
export type HttpFunctionResponse<ResObj> = {
export type HttpFunctionResponse<
ResObj extends { [key: string]: any } = { [key: string]: any }
> = {
status: number;
data?: ResObj;
error?: string;

View File

@ -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": {