Updates
This commit is contained in:
@@ -226,7 +226,6 @@ export interface DSQL_MYSQL_user_databases_Type {
|
||||
export interface PackageUserLoginRequestBody {
|
||||
encryptionKey: string;
|
||||
payload: any;
|
||||
database: string;
|
||||
additionalFields?: string[];
|
||||
email_login?: boolean;
|
||||
email_login_code?: string;
|
||||
@@ -1139,7 +1138,7 @@ export type APICreateUserFunctionParams = {
|
||||
encryptionKey?: string;
|
||||
payload: any;
|
||||
database: string;
|
||||
userId?: string | number;
|
||||
dsqlUserID?: string | number;
|
||||
verify?: boolean;
|
||||
};
|
||||
|
||||
@@ -1152,8 +1151,10 @@ export type APICreateUserFunction = (
|
||||
*/
|
||||
export type APIGetUserFunctionParams = {
|
||||
fields: string[];
|
||||
dbFullName: string;
|
||||
database: string;
|
||||
userId: string | number;
|
||||
dbUserId?: string | number;
|
||||
selectAll?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1613,6 +1614,14 @@ export type APIResponseObject<T extends any = any> = {
|
||||
debug?: any;
|
||||
batchPayload?: any[][] | null;
|
||||
errorData?: any;
|
||||
token?: string;
|
||||
csrf?: string;
|
||||
cookieNames?: any;
|
||||
key?: string;
|
||||
userId?: string | number;
|
||||
code?: string;
|
||||
createdAt?: number;
|
||||
email?: string;
|
||||
};
|
||||
|
||||
export const UserTypes = ["su", "admin"] as const;
|
||||
@@ -1903,7 +1912,7 @@ export type DefaultEntryType = {
|
||||
export const IndexTypes = ["regular", "full_text"] as const;
|
||||
|
||||
export type LoginUserParam = {
|
||||
key?: string;
|
||||
apiKey?: string;
|
||||
database: string;
|
||||
payload: {
|
||||
email?: string;
|
||||
@@ -1919,7 +1928,6 @@ export type LoginUserParam = {
|
||||
email_login_code?: string;
|
||||
temp_code_field?: string;
|
||||
token?: boolean;
|
||||
user_id?: string | number;
|
||||
skipPassword?: boolean;
|
||||
debug?: boolean;
|
||||
skipWriteAuthFile?: boolean;
|
||||
@@ -1928,6 +1936,7 @@ export type LoginUserParam = {
|
||||
cleanupTokens?: boolean;
|
||||
secureCookie?: boolean;
|
||||
useLocal?: boolean;
|
||||
apiVersion?: string;
|
||||
};
|
||||
|
||||
export const UserSelectFields = [
|
||||
@@ -2163,7 +2172,13 @@ export type SiteConfigMaxscale = {
|
||||
admin_port: number;
|
||||
};
|
||||
|
||||
export const APIParadigms = ["crud", "media", "sql", "schema"] as const;
|
||||
export const APIParadigms = [
|
||||
"crud",
|
||||
"media",
|
||||
"sql",
|
||||
"schema",
|
||||
"users",
|
||||
] as const;
|
||||
|
||||
export const AppVersions = [
|
||||
{
|
||||
@@ -2319,3 +2334,120 @@ export type GrabUserResourceParams<T extends { [k: string]: any } = any> = {
|
||||
isSuperUser?: boolean;
|
||||
targetID?: string | number;
|
||||
};
|
||||
|
||||
export const UserAPIParadigms = ["auth", "crud"] as const;
|
||||
export const UserAPIAuthActions = [
|
||||
"login",
|
||||
"get",
|
||||
"signup",
|
||||
"update",
|
||||
"logout",
|
||||
"refresh",
|
||||
"verify",
|
||||
"send-verification",
|
||||
"delete",
|
||||
"send-email-code",
|
||||
"reset-password",
|
||||
] as const;
|
||||
|
||||
export type GrabUserAPIPathParams = {
|
||||
apiVersion?: string;
|
||||
paradigm?: (typeof UserAPIParadigms)[number];
|
||||
action?: (typeof UserAPIAuthActions)[number];
|
||||
database?: string;
|
||||
userID?: string | number;
|
||||
};
|
||||
|
||||
export type GetUserParams = {
|
||||
apiKey?: string;
|
||||
database: string;
|
||||
userId: number | string;
|
||||
fields?: string[];
|
||||
useLocal?: boolean;
|
||||
apiVersion?: string;
|
||||
dbUserId?: string | number;
|
||||
selectAll?: boolean;
|
||||
};
|
||||
|
||||
export type AddUserParams = {
|
||||
apiKey?: string;
|
||||
database: string;
|
||||
payload: UserDataPayload;
|
||||
encryptionKey?: string;
|
||||
useLocal?: boolean;
|
||||
verify?: boolean;
|
||||
apiVersion?: string;
|
||||
dsqlUserID?: string | number;
|
||||
};
|
||||
|
||||
export type APISendEmailCodeFunctionParams = {
|
||||
email: string;
|
||||
database: string;
|
||||
email_login_field?: string;
|
||||
mail_domain?: string;
|
||||
mail_port?: number;
|
||||
sender?: string;
|
||||
mail_username?: string;
|
||||
mail_password?: string;
|
||||
/**
|
||||
* HTML string with {{code}} placeholder for the code
|
||||
*/
|
||||
html: string;
|
||||
response?: ServerResponse & { [s: string]: any };
|
||||
extraCookies?: CookieObject[];
|
||||
dbUserId?: string | number;
|
||||
};
|
||||
|
||||
export type SendEmailCodeParams = {
|
||||
apiKey?: string;
|
||||
database: string;
|
||||
email: string;
|
||||
temp_code_field_name?: string;
|
||||
response?: ServerResponse & { [s: string]: any };
|
||||
mail_domain?: string;
|
||||
mail_username?: string;
|
||||
mail_password?: string;
|
||||
mail_port?: number;
|
||||
sender?: string;
|
||||
extraCookies?: CookieObject[];
|
||||
useLocal?: boolean;
|
||||
apiVersion?: string;
|
||||
dbUserId?: string | number;
|
||||
};
|
||||
|
||||
export type UpdateUserParams<
|
||||
T extends DSQL_DATASQUIREL_USERS = DSQL_DATASQUIREL_USERS & {
|
||||
[k: string]: any;
|
||||
}
|
||||
> = {
|
||||
apiKey?: string;
|
||||
database: string;
|
||||
updatedUserId: string | number;
|
||||
payload: T;
|
||||
useLocal?: boolean;
|
||||
apiVersion?: string;
|
||||
dbUserId?: string | number;
|
||||
};
|
||||
|
||||
export type ResetPasswordParams = {
|
||||
apiKey?: string;
|
||||
newPassword: string;
|
||||
database: string;
|
||||
updatedUserId: string | number;
|
||||
useLocal?: boolean;
|
||||
apiVersion?: string;
|
||||
dbUserId?: string | number;
|
||||
encryptionKey?: string;
|
||||
};
|
||||
|
||||
export type ApiUpdateUserParams<
|
||||
T extends DSQL_DATASQUIREL_USERS = DSQL_DATASQUIREL_USERS & {
|
||||
[k: string]: any;
|
||||
}
|
||||
> = {
|
||||
payload: T;
|
||||
database: string;
|
||||
updatedUserId: string | number;
|
||||
dbSchema?: DSQL_DatabaseSchemaType;
|
||||
dbUserId?: string | number;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user