@xuda.io/ai_module 1.1.4107 → 1.1.4109

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 +6 -15
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2807,12 +2807,13 @@ export const get_apps = async function (req, job_id, headers) {
2807
2807
  break;
2808
2808
  }
2809
2809
  case 'shared': {
2810
- // opt.selector['studio_meta.shared_from_uid'] = { $gt: null };
2810
+ opt.selector['studio_meta.shared_from_uid'] = { $gt: null };
2811
2811
  break;
2812
2812
  }
2813
2813
 
2814
2814
  case 'mine': {
2815
- opt.selector.uid = uid;
2815
+ // opt.selector.uid = uid;
2816
+ opt.selector['studio_meta.createdByUid'] = uid;
2816
2817
 
2817
2818
  break;
2818
2819
  }
@@ -2872,13 +2873,13 @@ export const get_apps = async function (req, job_id, headers) {
2872
2873
 
2873
2874
  let requests_from = { docs: [], total_docs: 0 };
2874
2875
  if (!mini_app_id) {
2875
- if (filter_type !== 'mine') {
2876
- let from_opt = { selector: { docType: 'team_request', access_type: 'miniapp', team_req_stat: filter_type === 'pending' ? 2 : 3, team_req_to_uid: uid }, fields: ['_id', 'team_req_date', 'sender_account_info.email', 'team_req_from_uid', 'share_item_id'] };
2876
+ if (filter_type === 'pending') {
2877
+ const from_opt = { selector: { docType: 'team_request', access_type: 'miniapp', team_req_stat: 2, team_req_to_uid: uid }, fields: ['_id', 'team_req_date', 'sender_account_info.email', 'team_req_from_uid', 'share_item_id'] };
2877
2878
  const requests_from_res = await db_module.find_couch_query('xuda_team', from_opt);
2878
2879
 
2879
2880
  for await (let e of requests_from_res.docs) {
2880
2881
  //account_info
2881
- let doc = { _id: e.share_item_id, ts: e.team_req_date, pending: filter_type === 'pending', properties: {}, studio_meta: { createdByUid: e.team_req_from_uid }, team_req_id: e._id };
2882
+ let doc = { ts: e.team_req_date, pending: true, properties: {}, studio_meta: { createdByUid: e.team_req_from_uid }, team_req_id: e._id };
2882
2883
 
2883
2884
  if (e.team_req_from_uid) {
2884
2885
  doc.user_contact = await account_module.get_user_card(uid, e.team_req_from_uid);
@@ -2892,16 +2893,6 @@ export const get_apps = async function (req, job_id, headers) {
2892
2893
 
2893
2894
  requests_from.docs.push(doc);
2894
2895
  }
2895
-
2896
- ///////// profile /////////
2897
- from_opt.access_type = 'account_profile';
2898
- from_opt.access_type = 3;
2899
- const profile_requests_from_res = await db_module.find_couch_query('xuda_team', from_opt);
2900
- for await (let account_profile of profile_requests_from_res.docs) {
2901
- if (!account_profile.access_view.includes('apps')) continue;
2902
- }
2903
- ///////////////////////////
2904
-
2905
2896
  requests_from.total_docs = requests_from.docs.length;
2906
2897
  }
2907
2898
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4107",
3
+ "version": "1.1.4109",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",