This commit is contained in:
Benjamin Toby
2024-12-06 11:44:26 +01:00
parent 1ab41929b2
commit c49513c189
54 changed files with 628 additions and 425 deletions
@@ -0,0 +1,10 @@
declare function _exports({ query, user }: {
query: {
invite: number;
database_access: string;
priviledge: string;
email: string;
};
user: import("../../types").UserType;
}): Promise<any>;
export = _exports;
+4
View File
@@ -0,0 +1,4 @@
declare function _exports({ userId }: {
userId: number | string;
}): Promise<any>;
export = _exports;
@@ -0,0 +1,5 @@
declare function _exports({ userId, database }: {
userId: number;
database: string;
}): Promise<any>;
export = _exports;
@@ -0,0 +1,5 @@
declare function _exports(): {
keyCookieName: string;
csrfCookieName: string;
};
export = _exports;
+30
View File
@@ -0,0 +1,30 @@
export = runQuery;
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/**
* Run DSQL users queries
* ==============================================================================
* @param {object} params - An object containing the function parameters.
* @param {string} params.dbFullName - Database full name. Eg. "datasquire_user_2_test"
* @param {string | any} params.query - Query string or object
* @param {boolean} [params.readOnly] - Is this operation read only?
* @param {boolean} [params.local] - Is this operation read only?
* @param {import("../../../types").DSQL_DatabaseSchemaType} [params.dbSchema] - Database schema
* @param {(string | number)[]} [params.queryValuesArray] - An optional array of query values if "?" is used in the query string
* @param {string} [params.tableName] - Table Name
*
* @return {Promise<any>}
*/
declare function runQuery({ dbFullName, query, readOnly, dbSchema, queryValuesArray, tableName, local, }: {
dbFullName: string;
query: string | any;
readOnly?: boolean;
local?: boolean;
dbSchema?: import("../../../types").DSQL_DatabaseSchemaType;
queryValuesArray?: (string | number)[];
tableName?: string;
}): Promise<any>;
@@ -0,0 +1,15 @@
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/**
* ==============================================================================
* @param {Object} params
* @param {string | number} params.userId
* @returns {import("../../types").DSQL_DatabaseSchemaType[] | null}
*/
export default function grabUserSchemaData({ userId }: {
userId: string | number;
}): import("../../types").DSQL_DatabaseSchemaType[] | null;
@@ -0,0 +1,8 @@
declare function _exports({ to, subject, text, html, alias, }: {
to?: string;
subject?: string;
text?: string;
html?: string;
alias?: string | null;
}): Promise<any>;
export = _exports;
+11
View File
@@ -0,0 +1,11 @@
declare function _exports({ url, method, hostname, path, headers, body, port, scheme, }: {
scheme?: string;
url?: string;
method?: string;
hostname?: string;
path?: string;
port?: number | string;
headers?: object;
body?: object;
}): Promise<any>;
export = _exports;
+17
View File
@@ -0,0 +1,17 @@
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/**
* ==============================================================================
* @param {Object} params
* @param {string | number} params.userId
* @param {import("../../types").DSQL_DatabaseSchemaType[]} params.schemaData
* @returns {boolean}
*/
export default function setUserSchemaData({ userId, schemaData }: {
userId: string | number;
schemaData: import("../../types").DSQL_DatabaseSchemaType[];
}): boolean;