@xuda.io/account_module 1.2.1951 → 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.
Files changed (2) hide show
  1. package/index.mjs +22 -1
  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 deep_research_contact = async function (req, job_id, headers) {
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
 
@@ -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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1951",
3
+ "version": "1.2.1952",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {