Updates
This commit is contained in:
parent
2a4e111160
commit
6be3ede31a
@ -7,5 +7,5 @@ declare function _exports({ code, clientId, clientSecret, database, additionalFi
|
|||||||
res?: any;
|
res?: any;
|
||||||
email?: string;
|
email?: string;
|
||||||
userId?: string | number;
|
userId?: string | number;
|
||||||
}): Promise<import("../../../../types").APIGoogleLoginFunctionReturn>;
|
}): Promise<import("../../../../types").APILoginFunctionReturn>;
|
||||||
export = _exports;
|
export = _exports;
|
||||||
|
@ -16,7 +16,7 @@ const camelJoinedtoCamelSpace = require("../../../../utils/camelJoinedtoCamelSpa
|
|||||||
* @param {string} [param.email]
|
* @param {string} [param.email]
|
||||||
* @param {string | number} [param.userId]
|
* @param {string | number} [param.userId]
|
||||||
*
|
*
|
||||||
* @returns {Promise<import("../../../../types").APIGoogleLoginFunctionReturn>}
|
* @returns {Promise<import("../../../../types").APILoginFunctionReturn>}
|
||||||
*/
|
*/
|
||||||
module.exports = async function apiGithubLogin({
|
module.exports = async function apiGithubLogin({
|
||||||
code,
|
code,
|
||||||
|
5
package-shared/types/index.d.ts
vendored
5
package-shared/types/index.d.ts
vendored
@ -159,10 +159,7 @@ export interface GetReqQueryObject {
|
|||||||
queryValues?: string;
|
queryValues?: string;
|
||||||
tableName?: string;
|
tableName?: string;
|
||||||
}
|
}
|
||||||
export type SerializeQueryFnType = (param0: SerializeQueryParams) => string;
|
export type SerializeQueryFnType = (query: any) => string;
|
||||||
export interface SerializeQueryParams {
|
|
||||||
query: any;
|
|
||||||
}
|
|
||||||
export type DATASQUIREL_LoggedInUser = {
|
export type DATASQUIREL_LoggedInUser = {
|
||||||
id: number;
|
id: number;
|
||||||
uuid?: string;
|
uuid?: string;
|
||||||
|
@ -188,13 +188,7 @@ export interface GetReqQueryObject {
|
|||||||
tableName?: string;
|
tableName?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SerializeQueryFnType = (param0: SerializeQueryParams) => string;
|
export type SerializeQueryFnType = (query: any) => string;
|
||||||
|
|
||||||
export interface SerializeQueryParams {
|
|
||||||
query: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
export type DATASQUIREL_LoggedInUser = {
|
export type DATASQUIREL_LoggedInUser = {
|
||||||
id: number;
|
id: number;
|
||||||
|
2
package-shared/utils/serialize-query.d.ts
vendored
2
package-shared/utils/serialize-query.d.ts
vendored
@ -1,2 +1,2 @@
|
|||||||
export = serializeQuery;
|
export = serializeQuery;
|
||||||
declare function serializeQuery(param0: import("../types").SerializeQueryParams): string;
|
declare function serializeQuery(query: any): string;
|
||||||
|
@ -3,8 +3,22 @@
|
|||||||
const EJSON = require("./ejson");
|
const EJSON = require("./ejson");
|
||||||
|
|
||||||
/** @type {import("../types").SerializeQueryFnType} */
|
/** @type {import("../types").SerializeQueryFnType} */
|
||||||
function serializeQuery({ query }) {
|
function serializeQuery(query) {
|
||||||
let str = "?";
|
let str = "?";
|
||||||
|
|
||||||
|
if (typeof query !== "object") {
|
||||||
|
console.log("Invalid Query type");
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
if (Array.isArray(query)) {
|
||||||
|
console.log("Query is an Array. This is invalid.");
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
if (!query) {
|
||||||
|
console.log("No Query provided.");
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
const keys = Object.keys(query);
|
const keys = Object.keys(query);
|
||||||
|
|
||||||
/** @type {string[]} */
|
/** @type {string[]} */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@moduletrace/datasquirel",
|
"name": "@moduletrace/datasquirel",
|
||||||
"version": "3.0.8",
|
"version": "3.0.9",
|
||||||
"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