type fix
This commit is contained in:
parent
b2f5ff1377
commit
9f77036b91
@ -1,10 +1 @@
|
|||||||
export type HttpRequestExtraParams = {
|
export {};
|
||||||
scheme?: "http" | "https";
|
|
||||||
body?: {
|
|
||||||
[x: string]: any;
|
|
||||||
};
|
|
||||||
query?: {
|
|
||||||
[x: string]: any;
|
|
||||||
};
|
|
||||||
urlEncodedFormBody?: boolean;
|
|
||||||
};
|
|
||||||
|
@ -6,18 +6,9 @@ import querystring from "querystring";
|
|||||||
import serializeQuery from "../../utils/serialize-query";
|
import serializeQuery from "../../utils/serialize-query";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {object} HttpRequestExtraParams
|
|
||||||
* @property {"http" | "https"} [scheme]
|
|
||||||
* @property {Object<string, any>} [body]
|
|
||||||
* @property {Object<string, any>} [query]
|
|
||||||
* @property {boolean} [urlEncodedFormBody]
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* # Generate a http Request
|
* # Generate a http Request
|
||||||
* @param {import("node:https").RequestOptions & HttpRequestExtraParams} params
|
* @param {import("../../types").HttpRequestParams} params *
|
||||||
*
|
|
||||||
* @returns { Promise<Object<string, any> | string | null> }
|
* @returns { Promise<Object<string, any> | string | null> }
|
||||||
*/
|
*/
|
||||||
async function httpRequest(params) {
|
async function httpRequest(params) {
|
||||||
|
11
package-shared/types/index.d.ts
vendored
11
package-shared/types/index.d.ts
vendored
@ -1,3 +1,4 @@
|
|||||||
|
import { RequestOptions } from "https";
|
||||||
import { Editor } from "tinymce";
|
import { Editor } from "tinymce";
|
||||||
export type DSQL_DatabaseFullName = string;
|
export type DSQL_DatabaseFullName = string;
|
||||||
export interface DSQL_DatabaseSchemaType {
|
export interface DSQL_DatabaseSchemaType {
|
||||||
@ -1224,4 +1225,14 @@ export type CookieObject = {
|
|||||||
sameSite?: "Strict" | "Lax" | "None";
|
sameSite?: "Strict" | "Lax" | "None";
|
||||||
priority?: "Low" | "Medium" | "High";
|
priority?: "Low" | "Medium" | "High";
|
||||||
};
|
};
|
||||||
|
export type HttpRequestParams = RequestOptions & {
|
||||||
|
scheme?: "http" | "https";
|
||||||
|
body?: {
|
||||||
|
[key: string]: any;
|
||||||
|
};
|
||||||
|
query?: {
|
||||||
|
[key: string]: any;
|
||||||
|
};
|
||||||
|
urlEncodedFormBody?: boolean;
|
||||||
|
};
|
||||||
export {};
|
export {};
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import type { IncomingMessage, ServerResponse } from "http";
|
import type { IncomingMessage, ServerResponse } from "http";
|
||||||
|
import { RequestOptions } from "https";
|
||||||
|
|
||||||
import { Editor } from "tinymce";
|
import { Editor } from "tinymce";
|
||||||
export type DSQL_DatabaseFullName = string;
|
export type DSQL_DatabaseFullName = string;
|
||||||
@ -1442,3 +1443,10 @@ export type CookieObject = {
|
|||||||
sameSite?: "Strict" | "Lax" | "None";
|
sameSite?: "Strict" | "Lax" | "None";
|
||||||
priority?: "Low" | "Medium" | "High";
|
priority?: "Low" | "Medium" | "High";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type HttpRequestParams = RequestOptions & {
|
||||||
|
scheme?: "http" | "https";
|
||||||
|
body?: { [key: string]: any };
|
||||||
|
query?: { [key: string]: any };
|
||||||
|
urlEncodedFormBody?: boolean;
|
||||||
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@moduletrace/datasquirel",
|
"name": "@moduletrace/datasquirel",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"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