type fix
This commit is contained in:
parent
b2f5ff1377
commit
9f77036b91
@ -1,10 +1 @@
|
||||
export type HttpRequestExtraParams = {
|
||||
scheme?: "http" | "https";
|
||||
body?: {
|
||||
[x: string]: any;
|
||||
};
|
||||
query?: {
|
||||
[x: string]: any;
|
||||
};
|
||||
urlEncodedFormBody?: boolean;
|
||||
};
|
||||
export {};
|
||||
|
@ -6,18 +6,9 @@ import querystring from "querystring";
|
||||
import serializeQuery from "../../utils/serialize-query";
|
||||
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
|
||||
* @param {import("node:https").RequestOptions & HttpRequestExtraParams} params
|
||||
*
|
||||
* @param {import("../../types").HttpRequestParams} params *
|
||||
* @returns { Promise<Object<string, any> | string | null> }
|
||||
*/
|
||||
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";
|
||||
export type DSQL_DatabaseFullName = string;
|
||||
export interface DSQL_DatabaseSchemaType {
|
||||
@ -1224,4 +1225,14 @@ export type CookieObject = {
|
||||
sameSite?: "Strict" | "Lax" | "None";
|
||||
priority?: "Low" | "Medium" | "High";
|
||||
};
|
||||
export type HttpRequestParams = RequestOptions & {
|
||||
scheme?: "http" | "https";
|
||||
body?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
query?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
urlEncodedFormBody?: boolean;
|
||||
};
|
||||
export {};
|
||||
|
@ -1,4 +1,5 @@
|
||||
import type { IncomingMessage, ServerResponse } from "http";
|
||||
import { RequestOptions } from "https";
|
||||
|
||||
import { Editor } from "tinymce";
|
||||
export type DSQL_DatabaseFullName = string;
|
||||
@ -1442,3 +1443,10 @@ export type CookieObject = {
|
||||
sameSite?: "Strict" | "Lax" | "None";
|
||||
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",
|
||||
"version": "3.3.1",
|
||||
"version": "3.3.2",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
Loading…
Reference in New Issue
Block a user