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

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "@moduletrace/datasquirel", "name": "@moduletrace/datasquirel",
"version": "3.3.6", "version": "3.3.7",
"description": "Cloud-based SQL data management tool", "description": "Cloud-based SQL data management tool",
"main": "index.js", "main": "index.js",
"bin": { "bin": {