Updates
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
import { DSQL_DatabaseSchemaType } from "../../types";
|
||||
type Params = {
|
||||
dbSchema?: DSQL_DatabaseSchemaType;
|
||||
};
|
||||
export default function dbSchemaToType(params?: Params): string[] | undefined;
|
||||
export {};
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
type Param = {
|
||||
encryptedString: string;
|
||||
encryptionKey?: string;
|
||||
encryptionSalt?: string;
|
||||
};
|
||||
/**
|
||||
* # Decrypt Function
|
||||
*/
|
||||
export default function decrypt({ encryptedString, encryptionKey, encryptionSalt, }: Param): string;
|
||||
export {};
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Check for user in local storage
|
||||
*
|
||||
* @description Preventdefault, declare variables
|
||||
*/
|
||||
declare const defaultFieldsRegexp: RegExp;
|
||||
export default defaultFieldsRegexp;
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
type Param = {
|
||||
data: string;
|
||||
encryptionKey?: string;
|
||||
encryptionSalt?: string;
|
||||
};
|
||||
/**
|
||||
* # Encrypt String
|
||||
*/
|
||||
export default function encrypt({ data, encryptionKey, encryptionSalt, }: Param): string | null;
|
||||
export {};
|
||||
@@ -0,0 +1,11 @@
|
||||
import { DSQL_TableSchemaType } from "../../types";
|
||||
type Param = {
|
||||
paradigm: "JavaScript" | "TypeScript" | undefined;
|
||||
table: DSQL_TableSchemaType;
|
||||
query?: any;
|
||||
typeDefName?: string;
|
||||
allValuesOptional?: boolean;
|
||||
addExport?: boolean;
|
||||
};
|
||||
export default function generateTypeDefinition({ paradigm, table, query, typeDefName, allValuesOptional, addExport, }: Param): string | null;
|
||||
export {};
|
||||
@@ -0,0 +1,9 @@
|
||||
type Param = {
|
||||
password: string;
|
||||
encryptionKey?: string;
|
||||
};
|
||||
/**
|
||||
* # Hash password Function
|
||||
*/
|
||||
export default function hashPassword({ password, encryptionKey, }: Param): string;
|
||||
export {};
|
||||
@@ -0,0 +1,13 @@
|
||||
interface SQLDeleteGenReturn {
|
||||
query: string;
|
||||
values: string[];
|
||||
}
|
||||
/**
|
||||
* # SQL Delete Generator
|
||||
*/
|
||||
export default function sqlDeleteGenerator({ tableName, data, dbFullName, }: {
|
||||
data: any;
|
||||
tableName: string;
|
||||
dbFullName?: string;
|
||||
}): SQLDeleteGenReturn | undefined;
|
||||
export {};
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ServerQueryParam } from "../../../types";
|
||||
type Param<T extends {
|
||||
[key: string]: any;
|
||||
} = {
|
||||
[key: string]: any;
|
||||
}> = {
|
||||
genObject?: ServerQueryParam<T>;
|
||||
tableName: string;
|
||||
dbFullName?: string;
|
||||
};
|
||||
type Return = {
|
||||
string: string;
|
||||
values: string[];
|
||||
};
|
||||
/**
|
||||
* # SQL Query Generator
|
||||
* @description Generates an SQL Query for node module `mysql` or `serverless-mysql`
|
||||
*/
|
||||
export default function sqlGenerator<T extends {
|
||||
[key: string]: any;
|
||||
} = {
|
||||
[key: string]: any;
|
||||
}>({ tableName, genObject, dbFullName }: Param<T>): Return;
|
||||
export {};
|
||||
@@ -0,0 +1,13 @@
|
||||
interface SQLInsertGenReturn {
|
||||
query: string;
|
||||
values: string[];
|
||||
}
|
||||
/**
|
||||
* # SQL Insert Generator
|
||||
*/
|
||||
export default function sqlInsertGenerator({ tableName, data, dbFullName, }: {
|
||||
data: any[];
|
||||
tableName: string;
|
||||
dbFullName?: string;
|
||||
}): SQLInsertGenReturn | undefined;
|
||||
export {};
|
||||
Reference in New Issue
Block a user