Updates
This commit is contained in:
parent
0e49418bc4
commit
9f256832ee
12
package-shared/types/index.d.ts
vendored
12
package-shared/types/index.d.ts
vendored
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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": {
|
||||
|
Loading…
Reference in New Issue
Block a user