@xuda.io/account_module 1.2.2253 → 1.2.2255

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 CHANGED
@@ -731,6 +731,12 @@ export const get_active_account_profile_info = async function (uid, profile_id)
731
731
  }
732
732
  };
733
733
 
734
+ export const get_account_profile_group_member_uids = async function (owner_uid, share_item_id) {
735
+ const selector = { docType: 'team_request', team_req_stat: 3, share_item_id, access_type: 'account_profile', team_req_from_uid: owner_uid };
736
+ const ret = await db_module.find_couch_query('xuda_team', { selector });
737
+ return (ret?.docs || []).map((d) => d.team_req_to_uid).filter(Boolean);
738
+ };
739
+
734
740
  export const get_account_name = async function (req) {
735
741
  const data = await db_module.get_couch_doc('xuda_accounts', req.uid_query || req.uid);
736
742
  if (data.code < 0) {
@@ -3232,11 +3238,11 @@ export const get_account_profiles = async function (req) {
3232
3238
  let profile_docs = { docs: [], total_docs: profiles.total_docs };
3233
3239
  for await (let doc of profiles.docs) {
3234
3240
  doc = await get_account_profile_info(uid, doc);
3235
- if (doc.main) {
3236
- profile_docs.docs.unshift(doc);
3237
- } else {
3238
- profile_docs.docs.push(doc);
3239
- }
3241
+ // if (doc.main) {
3242
+ // profile_docs.docs.unshift(doc);
3243
+ // } else {
3244
+ profile_docs.docs.push(doc);
3245
+ // }
3240
3246
  }
3241
3247
 
3242
3248
  if (!profile_id) {
@@ -3247,7 +3253,8 @@ export const get_account_profiles = async function (req) {
3247
3253
  }
3248
3254
  }
3249
3255
 
3250
- if (filter_type === 'all' && !profile_id && !search && active_tab && profile_docs.docs.length === 1 && profile_docs.docs[0].main) {
3256
+ if (filter_type === 'all' && !profile_id && !search && active_tab && profile_docs.docs[0].main) {
3257
+ //profile_docs.docs.length === 1 &&
3251
3258
  // return empty state if no custom profile defined by user
3252
3259
  return {
3253
3260
  code: 1,
package/index_ms.mjs CHANGED
@@ -65,6 +65,10 @@ export const get_active_account_profile_info = async function (...args) {
65
65
  return await broker.send_to_queue("get_active_account_profile_info", ...args);
66
66
  };
67
67
 
68
+ export const get_account_profile_group_member_uids = async function (...args) {
69
+ return await broker.send_to_queue("get_account_profile_group_member_uids", ...args);
70
+ };
71
+
68
72
  export const get_account_name = async function (...args) {
69
73
  return await broker.send_to_queue("get_account_name", ...args);
70
74
  };
package/index_msa.mjs CHANGED
@@ -65,6 +65,10 @@ export const get_active_account_profile_info = function (...args) {
65
65
  broker.send_to_queue_async("get_active_account_profile_info", ...args);
66
66
  };
67
67
 
68
+ export const get_account_profile_group_member_uids = function (...args) {
69
+ broker.send_to_queue_async("get_account_profile_group_member_uids", ...args);
70
+ };
71
+
68
72
  export const get_account_name = function (...args) {
69
73
  broker.send_to_queue_async("get_account_name", ...args);
70
74
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.2253",
3
+ "version": "1.2.2255",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {