@xuda.io/account_module 1.2.1950 → 1.2.1952
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 +23 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2884,7 +2884,7 @@ export const generate_contact_avatar = async function (req, job_id, headers) {
|
|
|
2884
2884
|
}
|
|
2885
2885
|
};
|
|
2886
2886
|
|
|
2887
|
-
export const
|
|
2887
|
+
export const set_deep_research_contact = async function (req, job_id, headers) {
|
|
2888
2888
|
// const email_module = await import(`${module_path}/email_module/index.mjs`);
|
|
2889
2889
|
const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
2890
2890
|
|
|
@@ -2892,7 +2892,7 @@ export const deep_research_contact = async function (req, job_id, headers) {
|
|
|
2892
2892
|
const account_profile_info = await get_active_account_profile_info(uid);
|
|
2893
2893
|
try {
|
|
2894
2894
|
var contact_doc = await get_contact(uid, contact_id);
|
|
2895
|
-
contact_doc.
|
|
2895
|
+
contact_doc.deep_research = true;
|
|
2896
2896
|
|
|
2897
2897
|
if (contact_doc.account_type === 'business') {
|
|
2898
2898
|
contact_doc.business_info = await ai_module.get_business_info(uid, '', contact_doc.email, account_profile_info);
|
|
@@ -2984,6 +2984,27 @@ export const deep_research_contact = async function (req, job_id, headers) {
|
|
|
2984
2984
|
};
|
|
2985
2985
|
}
|
|
2986
2986
|
};
|
|
2987
|
+
|
|
2988
|
+
export const unset_deep_research_contact = async function (req, job_id, headers) {
|
|
2989
|
+
const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
2990
|
+
|
|
2991
|
+
const { contact_id, uid } = req;
|
|
2992
|
+
const account_profile_info = await get_active_account_profile_info(uid);
|
|
2993
|
+
try {
|
|
2994
|
+
var contact_doc = await get_contact(uid, contact_id);
|
|
2995
|
+
contact_doc.deep_research = false;
|
|
2996
|
+
|
|
2997
|
+
const contact_save_ret = await save_contact(uid, contact_doc);
|
|
2998
|
+
await delete_xuda_cache(contact_doc);
|
|
2999
|
+
|
|
3000
|
+
return contact_save_ret;
|
|
3001
|
+
} catch (err) {
|
|
3002
|
+
return {
|
|
3003
|
+
code: -24,
|
|
3004
|
+
data: err.message,
|
|
3005
|
+
};
|
|
3006
|
+
}
|
|
3007
|
+
};
|
|
2987
3008
|
//////// PROFILES //////////////
|
|
2988
3009
|
|
|
2989
3010
|
export const get_pending_share_profile_in = async function (uid, _id) {
|