Updates
This commit is contained in:
parent
4bda9149c6
commit
0e49418bc4
26
package-shared/types/index.d.ts
vendored
26
package-shared/types/index.d.ts
vendored
@ -1225,22 +1225,24 @@ export type CookieObject = {
|
||||
sameSite?: "Strict" | "Lax" | "None";
|
||||
priority?: "Low" | "Medium" | "High";
|
||||
};
|
||||
export type HttpRequestParams = RequestOptions & {
|
||||
export type HttpRequestParams<ReqObj> = RequestOptions & {
|
||||
scheme?: "http" | "https";
|
||||
body?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
query?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
body?: ReqObj;
|
||||
query?: ReqObj;
|
||||
urlEncodedFormBody?: boolean;
|
||||
};
|
||||
export type HttpRequestFunctionType = (param: HttpRequestParams) => Promise<HttpFunctionResponse>;
|
||||
export type HttpFunctionResponse = {
|
||||
status: number;
|
||||
data?: {
|
||||
export type HttpRequestFunctionType<ReqObj extends {
|
||||
[key: string]: any;
|
||||
};
|
||||
} = {
|
||||
[key: string]: any;
|
||||
}, ResObj extends {
|
||||
[key: string]: any;
|
||||
} = {
|
||||
[key: string]: any;
|
||||
}> = (param: HttpRequestParams<ReqObj>) => Promise<HttpFunctionResponse<ResObj>>;
|
||||
export type HttpFunctionResponse<ResObj> = {
|
||||
status: number;
|
||||
data?: ResObj;
|
||||
error?: string;
|
||||
str?: string;
|
||||
};
|
||||
|
@ -1444,20 +1444,21 @@ export type CookieObject = {
|
||||
priority?: "Low" | "Medium" | "High";
|
||||
};
|
||||
|
||||
export type HttpRequestParams = RequestOptions & {
|
||||
export type HttpRequestParams<ReqObj> = RequestOptions & {
|
||||
scheme?: "http" | "https";
|
||||
body?: { [key: string]: any };
|
||||
query?: { [key: string]: any };
|
||||
body?: ReqObj;
|
||||
query?: ReqObj;
|
||||
urlEncodedFormBody?: boolean;
|
||||
};
|
||||
|
||||
export type HttpRequestFunctionType = (
|
||||
param: HttpRequestParams
|
||||
) => Promise<HttpFunctionResponse>;
|
||||
export type HttpRequestFunctionType<
|
||||
ReqObj extends { [key: string]: any } = { [key: string]: any },
|
||||
ResObj extends { [key: string]: any } = { [key: string]: any }
|
||||
> = (param: HttpRequestParams<ReqObj>) => Promise<HttpFunctionResponse<ResObj>>;
|
||||
|
||||
export type HttpFunctionResponse = {
|
||||
export type HttpFunctionResponse<ResObj> = {
|
||||
status: number;
|
||||
data?: { [key: string]: any };
|
||||
data?: ResObj;
|
||||
error?: string;
|
||||
str?: string;
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "3.3.5",
|
||||
"version": "3.3.6",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
Loading…
Reference in New Issue
Block a user