Updates
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { APICreateUserFunctionParams } from "../../../types";
|
||||
/**
|
||||
* # API Create User
|
||||
*/
|
||||
export default function apiCreateUser({ encryptionKey, payload, database, userId, }: APICreateUserFunctionParams): Promise<{
|
||||
success: boolean;
|
||||
msg: string;
|
||||
payload?: undefined;
|
||||
sqlResult?: undefined;
|
||||
} | {
|
||||
success: boolean;
|
||||
msg: string | undefined;
|
||||
payload: null;
|
||||
sqlResult?: undefined;
|
||||
} | {
|
||||
success: boolean;
|
||||
payload: any;
|
||||
msg?: undefined;
|
||||
sqlResult?: undefined;
|
||||
} | {
|
||||
success: boolean;
|
||||
msg: string;
|
||||
sqlResult: any;
|
||||
payload: null;
|
||||
}>;
|
||||
@@ -0,0 +1,14 @@
|
||||
type Param = {
|
||||
dbFullName: string;
|
||||
deletedUserId: string | number;
|
||||
};
|
||||
type Return = {
|
||||
success: boolean;
|
||||
result?: any;
|
||||
msg?: string;
|
||||
};
|
||||
/**
|
||||
* # Update API User Function
|
||||
*/
|
||||
export default function apiDeleteUser({ dbFullName, deletedUserId, }: Param): Promise<Return>;
|
||||
export {};
|
||||
@@ -0,0 +1,5 @@
|
||||
import { APIGetUserFunctionParams, GetUserFunctionReturn } from "../../../types";
|
||||
/**
|
||||
* # API Get User
|
||||
*/
|
||||
export default function apiGetUser({ fields, dbFullName, userId, }: APIGetUserFunctionParams): Promise<GetUserFunctionReturn>;
|
||||
@@ -0,0 +1,5 @@
|
||||
import { APILoginFunctionParams, APILoginFunctionReturn } from "../../../types";
|
||||
/**
|
||||
* # API Login
|
||||
*/
|
||||
export default function apiLoginUser({ encryptionKey, email, username, password, database, additionalFields, email_login, email_login_code, email_login_field, skipPassword, social, dbUserId, debug, }: APILoginFunctionParams): Promise<APILoginFunctionReturn>;
|
||||
@@ -0,0 +1,13 @@
|
||||
import { APILoginFunctionReturn } from "../../../types";
|
||||
type Param = {
|
||||
existingUser: {
|
||||
[s: string]: any;
|
||||
};
|
||||
database?: string;
|
||||
additionalFields?: string[];
|
||||
};
|
||||
/**
|
||||
* # Re-authenticate API user
|
||||
*/
|
||||
export default function apiReauthUser({ existingUser, database, additionalFields, }: Param): Promise<APILoginFunctionReturn>;
|
||||
export {};
|
||||
@@ -0,0 +1,22 @@
|
||||
import http from "http";
|
||||
import { SendOneTimeCodeEmailResponse } from "../../../types";
|
||||
type Param = {
|
||||
email: string;
|
||||
database: string;
|
||||
email_login_field?: string;
|
||||
mail_domain?: string;
|
||||
mail_port?: number;
|
||||
sender?: string;
|
||||
mail_username?: string;
|
||||
mail_password?: string;
|
||||
html: string;
|
||||
response?: http.ServerResponse & {
|
||||
[s: string]: any;
|
||||
};
|
||||
extraCookies?: import("../../../../package-shared/types").CookieObject[];
|
||||
};
|
||||
/**
|
||||
* # Send Email Login Code
|
||||
*/
|
||||
export default function apiSendEmailCode({ email, database, email_login_field, mail_domain, mail_port, sender, mail_username, mail_password, html, response, extraCookies, }: Param): Promise<SendOneTimeCodeEmailResponse>;
|
||||
export {};
|
||||
@@ -0,0 +1,18 @@
|
||||
type Param = {
|
||||
payload: {
|
||||
[s: string]: any;
|
||||
};
|
||||
dbFullName: string;
|
||||
updatedUserId: string | number;
|
||||
dbSchema?: import("../../../types").DSQL_DatabaseSchemaType;
|
||||
};
|
||||
type Return = {
|
||||
success: boolean;
|
||||
payload?: any;
|
||||
msg?: string;
|
||||
};
|
||||
/**
|
||||
* # Update API User Function
|
||||
*/
|
||||
export default function apiUpdateUser({ payload, dbFullName, updatedUserId, dbSchema, }: Param): Promise<Return>;
|
||||
export {};
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
type Param = {
|
||||
email: string;
|
||||
encryptionKey?: string;
|
||||
encryptionSalt?: string;
|
||||
};
|
||||
export type EncryptResetPasswordObject = {
|
||||
email: string;
|
||||
createdAt: number;
|
||||
};
|
||||
export default function encryptReserPasswordUrl({ email, encryptionKey, encryptionSalt, }: Param): void;
|
||||
export {};
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
type Return = {
|
||||
success: boolean;
|
||||
msg?: string;
|
||||
error?: string;
|
||||
};
|
||||
type Param = {
|
||||
key?: string;
|
||||
database: string;
|
||||
email: string;
|
||||
encryptionKey?: string;
|
||||
encryptionSalt?: string;
|
||||
debug?: boolean;
|
||||
apiUserID?: string | number;
|
||||
dbUserId?: string | number;
|
||||
};
|
||||
/**
|
||||
* # API Login
|
||||
*/
|
||||
export default function apiSendResetPasswordLink({ database, email, dbUserId, debug, }: Param): Promise<Return>;
|
||||
export type SendResetPasswordParam = Param;
|
||||
export type SendResetPasswordReturn = Return;
|
||||
export {};
|
||||
@@ -0,0 +1,17 @@
|
||||
import { APILoginFunctionReturn } from "../../../../types";
|
||||
type Param = {
|
||||
code?: string;
|
||||
clientId?: string;
|
||||
clientSecret?: string;
|
||||
database?: string;
|
||||
additionalFields?: string[];
|
||||
additionalData?: {
|
||||
[s: string]: string | number;
|
||||
};
|
||||
email?: string;
|
||||
};
|
||||
/**
|
||||
* # API Login with Github
|
||||
*/
|
||||
export default function apiGithubLogin({ code, clientId, clientSecret, database, additionalFields, email, additionalData, }: Param): Promise<APILoginFunctionReturn>;
|
||||
export {};
|
||||
@@ -0,0 +1,5 @@
|
||||
import { APIGoogleLoginFunctionParams, APILoginFunctionReturn } from "../../../../types";
|
||||
/**
|
||||
* # API google login
|
||||
*/
|
||||
export default function apiGoogleLogin({ token, database, additionalFields, additionalData, debug, }: APIGoogleLoginFunctionParams): Promise<APILoginFunctionReturn>;
|
||||
Reference in New Issue
Block a user