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";
|
sameSite?: "Strict" | "Lax" | "None";
|
||||||
priority?: "Low" | "Medium" | "High";
|
priority?: "Low" | "Medium" | "High";
|
||||||
};
|
};
|
||||||
export type HttpRequestParams = RequestOptions & {
|
export type HttpRequestParams<ReqObj> = RequestOptions & {
|
||||||
scheme?: "http" | "https";
|
scheme?: "http" | "https";
|
||||||
body?: {
|
body?: ReqObj;
|
||||||
[key: string]: any;
|
query?: ReqObj;
|
||||||
};
|
|
||||||
query?: {
|
|
||||||
[key: string]: any;
|
|
||||||
};
|
|
||||||
urlEncodedFormBody?: boolean;
|
urlEncodedFormBody?: boolean;
|
||||||
};
|
};
|
||||||
export type HttpRequestFunctionType = (param: HttpRequestParams) => Promise<HttpFunctionResponse>;
|
export type HttpRequestFunctionType<ReqObj extends {
|
||||||
export type HttpFunctionResponse = {
|
[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;
|
status: number;
|
||||||
data?: {
|
data?: ResObj;
|
||||||
[key: string]: any;
|
|
||||||
};
|
|
||||||
error?: string;
|
error?: string;
|
||||||
str?: string;
|
str?: string;
|
||||||
};
|
};
|
||||||
|
@ -1444,20 +1444,21 @@ export type CookieObject = {
|
|||||||
priority?: "Low" | "Medium" | "High";
|
priority?: "Low" | "Medium" | "High";
|
||||||
};
|
};
|
||||||
|
|
||||||
export type HttpRequestParams = RequestOptions & {
|
export type HttpRequestParams<ReqObj> = RequestOptions & {
|
||||||
scheme?: "http" | "https";
|
scheme?: "http" | "https";
|
||||||
body?: { [key: string]: any };
|
body?: ReqObj;
|
||||||
query?: { [key: string]: any };
|
query?: ReqObj;
|
||||||
urlEncodedFormBody?: boolean;
|
urlEncodedFormBody?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type HttpRequestFunctionType = (
|
export type HttpRequestFunctionType<
|
||||||
param: HttpRequestParams
|
ReqObj extends { [key: string]: any } = { [key: string]: any },
|
||||||
) => Promise<HttpFunctionResponse>;
|
ResObj extends { [key: string]: any } = { [key: string]: any }
|
||||||
|
> = (param: HttpRequestParams<ReqObj>) => Promise<HttpFunctionResponse<ResObj>>;
|
||||||
|
|
||||||
export type HttpFunctionResponse = {
|
export type HttpFunctionResponse<ResObj> = {
|
||||||
status: number;
|
status: number;
|
||||||
data?: { [key: string]: any };
|
data?: ResObj;
|
||||||
error?: string;
|
error?: string;
|
||||||
str?: string;
|
str?: string;
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@moduletrace/datasquirel",
|
"name": "@moduletrace/datasquirel",
|
||||||
"version": "3.3.5",
|
"version": "3.3.6",
|
||||||
"description": "Cloud-based SQL data management tool",
|
"description": "Cloud-based SQL data management tool",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
Loading…
Reference in New Issue
Block a user