@xuda.io/account_module 1.2.1951 → 1.2.1953

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 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2859,9 +2859,6 @@ export const not_spam_contact = async function (req, job_id, headers) {
2859
2859
  };
2860
2860
 
2861
2861
  export const generate_contact_avatar = async function (req, job_id, headers) {
2862
- // const email_module = await import(`${module_path}/email_module/index.mjs`);
2863
- // const ai_module = await import(`${module_path}/ai_module/index.mjs`);
2864
-
2865
2862
  const { contact_id, uid } = req;
2866
2863
  const account_profile_info = await get_active_account_profile_info(uid);
2867
2864
  try {
@@ -2884,7 +2881,7 @@ export const generate_contact_avatar = async function (req, job_id, headers) {
2884
2881
  }
2885
2882
  };
2886
2883
 
2887
- export const deep_research_contact = async function (req, job_id, headers) {
2884
+ export const set_deep_research_contact = async function (req, job_id, headers) {
2888
2885
  // const email_module = await import(`${module_path}/email_module/index.mjs`);
2889
2886
  const ai_module = await import(`${module_path}/ai_module/index.mjs`);
2890
2887
 
@@ -2984,6 +2981,27 @@ export const deep_research_contact = async function (req, job_id, headers) {
2984
2981
  };
2985
2982
  }
2986
2983
  };
2984
+
2985
+ export const unset_deep_research_contact = async function (req, job_id, headers) {
2986
+ const ai_module = await import(`${module_path}/ai_module/index.mjs`);
2987
+
2988
+ const { contact_id, uid } = req;
2989
+ const account_profile_info = await get_active_account_profile_info(uid);
2990
+ try {
2991
+ var contact_doc = await get_contact(uid, contact_id);
2992
+ contact_doc.deep_research = false;
2993
+
2994
+ const contact_save_ret = await save_contact(uid, contact_doc);
2995
+ await delete_xuda_cache(contact_doc);
2996
+
2997
+ return contact_save_ret;
2998
+ } catch (err) {
2999
+ return {
3000
+ code: -24,
3001
+ data: err.message,
3002
+ };
3003
+ }
3004
+ };
2987
3005
  //////// PROFILES //////////////
2988
3006
 
2989
3007
  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.1953",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {