2024-11-08 15:44:31 +00:00
|
|
|
export = sendEmailCode;
|
|
|
|
/**
|
|
|
|
* Send Email Code to a User
|
|
|
|
* ==============================================================================
|
|
|
|
* @async
|
|
|
|
*
|
|
|
|
* @param {object} params - Single Param object containing params
|
2024-12-10 13:09:21 +00:00
|
|
|
* @param {String} [params.key] - FULL ACCESS API Key
|
|
|
|
* @param {String} [params.database] - Target Database
|
2024-11-08 15:44:31 +00:00
|
|
|
* @param {string} params.email Login Email/Username and Password
|
2024-12-10 13:09:21 +00:00
|
|
|
* @param {string} [params.temp_code_field_name] - Database table field name for temporary code
|
2024-12-10 14:10:32 +00:00
|
|
|
* @param {http.ServerResponse & Object<string,any>} [params.response]
|
2024-11-08 15:44:31 +00:00
|
|
|
* @param {string} [params.mail_domain]
|
|
|
|
* @param {string} [params.mail_username]
|
|
|
|
* @param {string} [params.mail_password]
|
|
|
|
* @param {number} [params.mail_port]
|
|
|
|
* @param {string} [params.sender]
|
2024-12-06 10:44:26 +00:00
|
|
|
* @param {boolean} [params.user_id] - User ID
|
2024-12-06 11:55:03 +00:00
|
|
|
* @param {boolean} [params.useLocal]
|
2024-12-11 03:45:29 +00:00
|
|
|
* @param {import("../package-shared/types").CookieObject[]} [params.extraCookies]
|
2024-11-08 15:44:31 +00:00
|
|
|
*
|
2024-12-10 14:10:32 +00:00
|
|
|
* @returns { Promise<import("../package-shared/types").SendOneTimeCodeEmailResponse>}
|
2024-11-08 15:44:31 +00:00
|
|
|
*/
|
2024-12-11 03:45:29 +00:00
|
|
|
declare function sendEmailCode({ key, email, database, temp_code_field_name, mail_domain, mail_password, mail_username, mail_port, sender, user_id, useLocal, response, extraCookies, }: {
|
2024-12-10 13:09:21 +00:00
|
|
|
key?: string;
|
|
|
|
database?: string;
|
2024-11-08 15:44:31 +00:00
|
|
|
email: string;
|
2024-12-10 13:09:21 +00:00
|
|
|
temp_code_field_name?: string;
|
2024-12-10 14:10:32 +00:00
|
|
|
response?: http.ServerResponse & {
|
|
|
|
[x: string]: any;
|
|
|
|
};
|
2024-11-08 15:44:31 +00:00
|
|
|
mail_domain?: string;
|
|
|
|
mail_username?: string;
|
|
|
|
mail_password?: string;
|
|
|
|
mail_port?: number;
|
|
|
|
sender?: string;
|
2024-12-06 10:44:26 +00:00
|
|
|
user_id?: boolean;
|
2024-12-06 11:55:03 +00:00
|
|
|
useLocal?: boolean;
|
2024-12-11 03:45:29 +00:00
|
|
|
extraCookies?: import("../package-shared/types").CookieObject[];
|
2024-12-10 14:10:32 +00:00
|
|
|
}): Promise<import("../package-shared/types").SendOneTimeCodeEmailResponse>;
|
2024-11-08 15:44:31 +00:00
|
|
|
import http = require("http");
|