@xuda.io/account_module 1.2.2077 → 1.2.2079
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +10 -7
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -54,7 +54,10 @@ const stripe_ms = await import(`${module_path}/stripe_module/index_ms.mjs`);
|
|
|
54
54
|
const logs_ms = await import(`${module_path}/logs_module/index_ms.mjs`);
|
|
55
55
|
|
|
56
56
|
const ws_dashboard_msa = await import(`${module_path}/ws_dashboard_module/index_msa.mjs`);
|
|
57
|
-
|
|
57
|
+
const drive_msa = await import(`${module_path}/drive_module/index_msa.mjs`);
|
|
58
|
+
const email_msa = await import(`${module_path}/email_module/index_msa.mjs`);
|
|
59
|
+
const logs_msa = await import(`${module_path}/logs_module/index_msa.mjs`);
|
|
60
|
+
const ai_msa = await import(`${module_path}/ai_module/index_msa.mjs`);
|
|
58
61
|
// const {get_active_account_profile_info} = await import(`${module_path}/ws_dashboard_module/get_active_account_profile_info.mjs`);
|
|
59
62
|
|
|
60
63
|
export const update_account_info = async function (req, job_id, headers) {
|
|
@@ -110,7 +113,7 @@ export const update_account_info = async function (req, job_id, headers) {
|
|
|
110
113
|
|
|
111
114
|
const profile_avatar_obj = account_obj?.account_info?.profile_avatar_obj || '';
|
|
112
115
|
if (profile_avatar_obj) {
|
|
113
|
-
|
|
116
|
+
drive_msa.delete_drive_files({ uid, drive_type: 'user', files_arr: [{ type: 'file', file_path: path.join(profile_avatar_obj.file_path, profile_avatar_obj.filename) }] });
|
|
114
117
|
}
|
|
115
118
|
}
|
|
116
119
|
|
|
@@ -792,7 +795,7 @@ export const add_account_log_util = async function (body, status, service, sourc
|
|
|
792
795
|
if (service.substr(0, 4) === 'get_' && !body.api_pk && !body.api_sk) return;
|
|
793
796
|
}
|
|
794
797
|
|
|
795
|
-
|
|
798
|
+
logs_msa.add_account_log(get_account_log_object(body, status, service, source, response_data, ip, headers, security));
|
|
796
799
|
};
|
|
797
800
|
|
|
798
801
|
export const save_ssh_key = async function (req) {
|
|
@@ -2489,7 +2492,7 @@ export const delete_contact = async function (req, job_id, headers) {
|
|
|
2489
2492
|
|
|
2490
2493
|
const contact_save_ret = await save_contact(uid, contact_doc);
|
|
2491
2494
|
|
|
2492
|
-
|
|
2495
|
+
ai_msa.delete_depended_chats(uid, contact_id);
|
|
2493
2496
|
return contact_save_ret;
|
|
2494
2497
|
} catch (err) {
|
|
2495
2498
|
return {
|
|
@@ -3135,7 +3138,7 @@ export const delete_account_profile = async function (req, job_id, headers) {
|
|
|
3135
3138
|
|
|
3136
3139
|
const account_profile_save_ret = await db_module.save_app_couch_doc(app_id, account_profile_doc);
|
|
3137
3140
|
|
|
3138
|
-
|
|
3141
|
+
ai_msa.delete_depended_chats(uid, profile_id);
|
|
3139
3142
|
return account_profile_save_ret;
|
|
3140
3143
|
} catch (err) {
|
|
3141
3144
|
return {
|
|
@@ -3476,7 +3479,7 @@ export const read_accounts_emails = async function () {
|
|
|
3476
3479
|
const active_accounts = await db_module.find_couch_query('xuda_accounts', { selector: { stat: 3, docType: 'account' }, limit: 99999 });
|
|
3477
3480
|
for await (let account_doc of active_accounts.docs) {
|
|
3478
3481
|
if (!account_doc?.account_info?.active_account_profile_id) continue;
|
|
3479
|
-
|
|
3482
|
+
email_msa.refresh_mailboxes({ uid: account_doc._id });
|
|
3480
3483
|
}
|
|
3481
3484
|
};
|
|
3482
3485
|
|
|
@@ -3484,7 +3487,7 @@ export const process_accounts_emails = async function () {
|
|
|
3484
3487
|
const active_accounts = await db_module.find_couch_query('xuda_accounts', { selector: { stat: 3, docType: 'account' }, limit: 99999 });
|
|
3485
3488
|
for await (let account_doc of active_accounts.docs) {
|
|
3486
3489
|
if (!account_doc?.account_info?.active_account_profile_id) continue;
|
|
3487
|
-
|
|
3490
|
+
email_msa.process_emails({ uid: account_doc._id });
|
|
3488
3491
|
}
|
|
3489
3492
|
};
|
|
3490
3493
|
|