Updates
This commit is contained in:
Vendored
+111
-6
@@ -189,7 +189,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;
|
||||
@@ -940,7 +939,7 @@ export type APICreateUserFunctionParams = {
|
||||
encryptionKey?: string;
|
||||
payload: any;
|
||||
database: string;
|
||||
userId?: string | number;
|
||||
dsqlUserID?: string | number;
|
||||
verify?: boolean;
|
||||
};
|
||||
export type APICreateUserFunction = (params: APICreateUserFunctionParams) => Promise<AddUserFunctionReturn>;
|
||||
@@ -949,8 +948,10 @@ export type APICreateUserFunction = (params: APICreateUserFunctionParams) => Pro
|
||||
*/
|
||||
export type APIGetUserFunctionParams = {
|
||||
fields: string[];
|
||||
dbFullName: string;
|
||||
database: string;
|
||||
userId: string | number;
|
||||
dbUserId?: string | number;
|
||||
selectAll?: boolean;
|
||||
};
|
||||
/**
|
||||
* API Google Login Function
|
||||
@@ -1393,6 +1394,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 declare const UserTypes: readonly ["su", "admin"];
|
||||
export declare const SignUpParadigms: readonly [{
|
||||
@@ -1553,7 +1562,7 @@ export type DefaultEntryType = {
|
||||
};
|
||||
export declare const IndexTypes: readonly ["regular", "full_text"];
|
||||
export type LoginUserParam = {
|
||||
key?: string;
|
||||
apiKey?: string;
|
||||
database: string;
|
||||
payload: {
|
||||
email?: string;
|
||||
@@ -1573,7 +1582,6 @@ export type LoginUserParam = {
|
||||
email_login_code?: string;
|
||||
temp_code_field?: string;
|
||||
token?: boolean;
|
||||
user_id?: string | number;
|
||||
skipPassword?: boolean;
|
||||
debug?: boolean;
|
||||
skipWriteAuthFile?: boolean;
|
||||
@@ -1582,6 +1590,7 @@ export type LoginUserParam = {
|
||||
cleanupTokens?: boolean;
|
||||
secureCookie?: boolean;
|
||||
useLocal?: boolean;
|
||||
apiVersion?: string;
|
||||
};
|
||||
export declare const UserSelectFields: readonly [{
|
||||
readonly field: "first_name";
|
||||
@@ -1732,7 +1741,7 @@ export type SiteConfigMaxscale = {
|
||||
read_only_port: number;
|
||||
admin_port: number;
|
||||
};
|
||||
export declare const APIParadigms: readonly ["crud", "media", "sql", "schema"];
|
||||
export declare const APIParadigms: readonly ["crud", "media", "sql", "schema", "users"];
|
||||
export declare const AppVersions: readonly [{
|
||||
readonly title: "Community";
|
||||
readonly value: "community";
|
||||
@@ -1798,4 +1807,100 @@ export type GrabUserResourceParams<T extends {
|
||||
isSuperUser?: boolean;
|
||||
targetID?: string | number;
|
||||
};
|
||||
export declare const UserAPIParadigms: readonly ["auth", "crud"];
|
||||
export declare const UserAPIAuthActions: readonly ["login", "get", "signup", "update", "logout", "refresh", "verify", "send-verification", "delete", "send-email-code", "reset-password"];
|
||||
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;
|
||||
};
|
||||
export {};
|
||||
|
||||
Vendored
+22
-2
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.TargetMediaParadigms = exports.EnvKeys = exports.AppVersions = exports.APIParadigms = exports.UserSQLPermissions = exports.SQLPermissions = exports.InvitedUserSelectFields = exports.DelegatedUserSelectFields = exports.UserSelectFields = exports.IndexTypes = exports.DefaultSQLValuesLiteral = exports.CurrentlyEditedFieldActions = exports.VideoMimeTypes = exports.FileMimeTypes = exports.ImageMimeTypes = exports.MediaTypes = exports.DockerComposeServices = exports.DatasquirelWindowEvents = exports.WebSocketEvents = exports.QueueJobTypes = exports.SignUpParadigms = exports.UserTypes = exports.QueryFields = exports.DsqlCrudActions = exports.DataCrudRequestMethodsLowerCase = exports.DataCrudRequestMethods = exports.ServerQueryEqualities = exports.ServerQueryOperators = exports.TextFieldTypesArray = exports.UsersOmitedFields = void 0;
|
||||
exports.UserAPIAuthActions = exports.UserAPIParadigms = exports.TargetMediaParadigms = exports.EnvKeys = exports.AppVersions = exports.APIParadigms = exports.UserSQLPermissions = exports.SQLPermissions = exports.InvitedUserSelectFields = exports.DelegatedUserSelectFields = exports.UserSelectFields = exports.IndexTypes = exports.DefaultSQLValuesLiteral = exports.CurrentlyEditedFieldActions = exports.VideoMimeTypes = exports.FileMimeTypes = exports.ImageMimeTypes = exports.MediaTypes = exports.DockerComposeServices = exports.DatasquirelWindowEvents = exports.WebSocketEvents = exports.QueueJobTypes = exports.SignUpParadigms = exports.UserTypes = exports.QueryFields = exports.DsqlCrudActions = exports.DataCrudRequestMethodsLowerCase = exports.DataCrudRequestMethods = exports.ServerQueryEqualities = exports.ServerQueryOperators = exports.TextFieldTypesArray = exports.UsersOmitedFields = void 0;
|
||||
exports.UsersOmitedFields = [
|
||||
"password",
|
||||
"social_id",
|
||||
@@ -287,7 +287,13 @@ exports.UserSQLPermissions = [
|
||||
"UPDATE",
|
||||
"USAGE",
|
||||
];
|
||||
exports.APIParadigms = ["crud", "media", "sql", "schema"];
|
||||
exports.APIParadigms = [
|
||||
"crud",
|
||||
"media",
|
||||
"sql",
|
||||
"schema",
|
||||
"users",
|
||||
];
|
||||
exports.AppVersions = [
|
||||
{
|
||||
title: "Community",
|
||||
@@ -386,3 +392,17 @@ exports.EnvKeys = [
|
||||
"DSQL_ARCJET_KEY",
|
||||
];
|
||||
exports.TargetMediaParadigms = ["info", "preview"];
|
||||
exports.UserAPIParadigms = ["auth", "crud"];
|
||||
exports.UserAPIAuthActions = [
|
||||
"login",
|
||||
"get",
|
||||
"signup",
|
||||
"update",
|
||||
"logout",
|
||||
"refresh",
|
||||
"verify",
|
||||
"send-verification",
|
||||
"delete",
|
||||
"send-email-code",
|
||||
"reset-password",
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user