Save before potential major change
This commit is contained in:
parent
8ca2779741
commit
1ab41929b2
52
index.d.ts
vendored
Normal file
52
index.d.ts
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
import get = require("./utils/get");
|
||||||
|
import post = require("./utils/post");
|
||||||
|
export namespace media {
|
||||||
|
export { uploadImage };
|
||||||
|
export { uploadFile };
|
||||||
|
export { deleteFile };
|
||||||
|
}
|
||||||
|
export namespace user {
|
||||||
|
export { createUser };
|
||||||
|
export { loginUser };
|
||||||
|
export { sendEmailCode };
|
||||||
|
export { logoutUser };
|
||||||
|
export { userAuth };
|
||||||
|
export { reAuthUser };
|
||||||
|
export { updateUser };
|
||||||
|
export { getUser };
|
||||||
|
export { getToken };
|
||||||
|
export { validateToken };
|
||||||
|
export namespace social {
|
||||||
|
export { loginWithGoogle };
|
||||||
|
export { loginWithGithub };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
import getSchema = require("./utils/get-schema");
|
||||||
|
import sanitizeSql = require("./utils/functions/sanitizeSql");
|
||||||
|
import datasquirelClient = require("./client");
|
||||||
|
export namespace sql {
|
||||||
|
export { sqlGenerator };
|
||||||
|
export { sqlInsertGenerator };
|
||||||
|
export { sqlDeleteGenerator };
|
||||||
|
export { trimSql as trim };
|
||||||
|
}
|
||||||
|
import uploadImage = require("./utils/upload-image");
|
||||||
|
import uploadFile = require("./utils/upload-file");
|
||||||
|
import deleteFile = require("./utils/delete-file");
|
||||||
|
import createUser = require("./users/add-user");
|
||||||
|
import loginUser = require("./users/login-user");
|
||||||
|
import sendEmailCode = require("./users/send-email-code");
|
||||||
|
import logoutUser = require("./users/logout-user");
|
||||||
|
import userAuth = require("./users/user-auth");
|
||||||
|
import reAuthUser = require("./users/reauth-user");
|
||||||
|
import updateUser = require("./users/update-user");
|
||||||
|
import getUser = require("./users/get-user");
|
||||||
|
import getToken = require("./users/get-token");
|
||||||
|
import validateToken = require("./users/validate-token");
|
||||||
|
import loginWithGoogle = require("./users/social/google-auth");
|
||||||
|
import loginWithGithub = require("./users/social/github-auth");
|
||||||
|
import sqlGenerator = require("./package-shared/functions/dsql/sql/sql-generator");
|
||||||
|
import sqlInsertGenerator = require("./package-shared/functions/dsql/sql/sql-insert-generator");
|
||||||
|
import sqlDeleteGenerator = require("./package-shared/functions/dsql/sql/sql-delete-generator");
|
||||||
|
import trimSql = require("./package-shared/utils/trim-sql");
|
||||||
|
export { get, post, getSchema, sanitizeSql, datasquirelClient as client };
|
2
package-shared/functions/api/users/api-get-user.d.ts
vendored
Normal file
2
package-shared/functions/api/users/api-get-user.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
declare const _exports: import("../../../types").APIGetUserFunction;
|
||||||
|
export = _exports;
|
14
package-shared/functions/backend/serverError.d.ts
vendored
Normal file
14
package-shared/functions/backend/serverError.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
declare function _exports({ user, message, component, noMail, req, }: {
|
||||||
|
user?: {
|
||||||
|
id?: number | string;
|
||||||
|
first_name?: string;
|
||||||
|
last_name?: string;
|
||||||
|
email?: string;
|
||||||
|
} & any;
|
||||||
|
message: string;
|
||||||
|
component?: string;
|
||||||
|
noMail?: boolean;
|
||||||
|
req?: import("next").NextApiRequest & IncomingMessage;
|
||||||
|
}): Promise<void>;
|
||||||
|
export = _exports;
|
||||||
|
import { IncomingMessage } from "http";
|
7
package-shared/functions/backend/varDatabaseDbHandler.d.ts
vendored
Normal file
7
package-shared/functions/backend/varDatabaseDbHandler.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
declare function _exports({ queryString, queryValuesArray, database, tableSchema, }: {
|
||||||
|
queryString: string;
|
||||||
|
queryValuesArray?: any[];
|
||||||
|
database?: string;
|
||||||
|
tableSchema?: import("../../types").DSQL_TableSchemaType;
|
||||||
|
}): Promise<any>;
|
||||||
|
export = _exports;
|
1378
package-shared/types/index.ts
Normal file
1378
package-shared/types/index.ts
Normal file
File diff suppressed because it is too large
Load Diff
24
package-shared/utils/grab-host-names.d.ts
vendored
Normal file
24
package-shared/utils/grab-host-names.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
export = grabHostNames;
|
||||||
|
/**
|
||||||
|
* @typedef {object} GrabHostNamesReturn
|
||||||
|
* @property {string} host
|
||||||
|
* @property {number | string} port
|
||||||
|
* @property {typeof http | typeof https} scheme
|
||||||
|
* @property {string | number} user_id
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* # Grab Names For Query
|
||||||
|
* @returns {GrabHostNamesReturn}
|
||||||
|
*/
|
||||||
|
declare function grabHostNames(): GrabHostNamesReturn;
|
||||||
|
declare namespace grabHostNames {
|
||||||
|
export { GrabHostNamesReturn };
|
||||||
|
}
|
||||||
|
type GrabHostNamesReturn = {
|
||||||
|
host: string;
|
||||||
|
port: number | string;
|
||||||
|
scheme: typeof http | typeof https;
|
||||||
|
user_id: string | number;
|
||||||
|
};
|
||||||
|
import http = require("http");
|
||||||
|
import https = require("https");
|
31
users/get-user.d.ts
vendored
Normal file
31
users/get-user.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
export = getUser;
|
||||||
|
/** ****************************************************************************** */
|
||||||
|
/** ****************************************************************************** */
|
||||||
|
/** ****************************************************************************** */
|
||||||
|
/** ****************************************************************************** */
|
||||||
|
/** ****************************************************************************** */
|
||||||
|
/** ****************************************************************************** */
|
||||||
|
/**
|
||||||
|
* ==============================================================================
|
||||||
|
* Main Function
|
||||||
|
* ==============================================================================
|
||||||
|
* @async
|
||||||
|
*
|
||||||
|
* @param {object} params - Single Param object containing params
|
||||||
|
* @param {String} params.key - API Key
|
||||||
|
* @param {String} params.database - Target Database
|
||||||
|
* @param {number} params.userId - user id
|
||||||
|
* @param {string[]} [params.fields] - fields to select
|
||||||
|
* @param {boolean} [params.user_id] - User ID
|
||||||
|
* @param {boolean} [params.useLocal] - Whether to use a remote database instead of API
|
||||||
|
*
|
||||||
|
* @returns { Promise<import("../package-shared/types").GetUserFunctionReturn>}
|
||||||
|
*/
|
||||||
|
declare function getUser({ key, userId, database, fields, user_id, useLocal }: {
|
||||||
|
key: string;
|
||||||
|
database: string;
|
||||||
|
userId: number;
|
||||||
|
fields?: string[];
|
||||||
|
user_id?: boolean;
|
||||||
|
useLocal?: boolean;
|
||||||
|
}): Promise<import("../package-shared/types").GetUserFunctionReturn>;
|
Loading…
Reference in New Issue
Block a user