@xuda.io/account_module 1.2.2080 → 1.2.2082

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 (3) hide show
  1. package/index.mjs +2 -1
  2. package/index_ms.mjs +84 -81
  3. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2806,6 +2806,7 @@ export const unset_deep_research_contact = async function (req, job_id, headers)
2806
2806
  export const get_pending_share_profile_in = async function (uid, _id) {
2807
2807
  let docs = [];
2808
2808
  const from_opt = { selector: { docType: 'team_request', access_type: 'account_profile', 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'] };
2809
+ const app_id = await get_account_default_project_id(uid);
2809
2810
 
2810
2811
  if (_id) {
2811
2812
  to_opt.selector._id = _id;
@@ -2814,7 +2815,7 @@ export const get_pending_share_profile_in = async function (uid, _id) {
2814
2815
  const requests_from_res = await db_module.find_couch_query('xuda_team', from_opt);
2815
2816
 
2816
2817
  for await (let e of requests_from_res.docs) {
2817
- let doc = await db_module.get_couch_doc_native('xuda_accounts', e.share_item_id);
2818
+ let doc = await db_module.get_app_couch_doc_native(app_id, e.share_item_id);
2818
2819
 
2819
2820
  doc.shared_from_uid = e.team_req_from_uid;
2820
2821
  doc.pending = true;
package/index_ms.mjs CHANGED
@@ -3,309 +3,312 @@
3
3
  // Queue target : account_module
4
4
  // =====================================================
5
5
 
6
- import path from 'node:path';
7
6
 
8
- const { MessageBroker } = await import(path.join(process.env.XUDA_HOME, 'common', 'ms_broker.mjs'));
7
+ import path from 'node:path';
9
8
 
10
- const broker = new MessageBroker();
9
+ const { MessageBroker } = await import(path.join(process.env.XUDA_HOME, 'common', 'ms_broker.mjs'));
11
10
 
12
- await broker.init({
13
- queueName: 'account_module',
14
- module_in: global.module_in,
15
- });
11
+ const broker = new MessageBroker();
12
+
13
+ await broker.init({
14
+ queueName: 'account_module',
15
+ module_in: global.module_in
16
+ });
17
+
18
+
16
19
 
17
20
  export const update_account_info = async function (...args) {
18
- return await broker.send_to_queue('update_account_info', ...args);
21
+ return await broker.send_to_queue("update_account_info", ...args);
19
22
  };
20
23
 
21
24
  export const update_account_preferences = async function (...args) {
22
- return await broker.send_to_queue('update_account_preferences', ...args);
25
+ return await broker.send_to_queue("update_account_preferences", ...args);
23
26
  };
24
27
 
25
28
  export const save_admin_presets = async function (...args) {
26
- return await broker.send_to_queue('save_admin_presets', ...args);
29
+ return await broker.send_to_queue("save_admin_presets", ...args);
27
30
  };
28
31
 
29
32
  export const increment_account_usage = async function (...args) {
30
- return await broker.send_to_queue('increment_account_usage', ...args);
33
+ return await broker.send_to_queue("increment_account_usage", ...args);
31
34
  };
32
35
 
33
36
  export const get_account_data = async function (...args) {
34
- return await broker.send_to_queue('get_account_data', ...args);
37
+ return await broker.send_to_queue("get_account_data", ...args);
35
38
  };
36
39
 
37
40
  export const get_account_projects = async function (...args) {
38
- return await broker.send_to_queue('get_account_projects', ...args);
41
+ return await broker.send_to_queue("get_account_projects", ...args);
39
42
  };
40
43
 
41
44
  export const get_account_datacenters = async function (...args) {
42
- return await broker.send_to_queue('get_account_datacenters', ...args);
45
+ return await broker.send_to_queue("get_account_datacenters", ...args);
43
46
  };
44
47
 
45
48
  export const get_account_deployments = async function (...args) {
46
- return await broker.send_to_queue('get_account_deployments', ...args);
49
+ return await broker.send_to_queue("get_account_deployments", ...args);
47
50
  };
48
51
 
49
52
  export const get_account_instances = async function (...args) {
50
- return await broker.send_to_queue('get_account_instances', ...args);
53
+ return await broker.send_to_queue("get_account_instances", ...args);
51
54
  };
52
55
 
53
56
  export const get_account_info = async function (...args) {
54
- return await broker.send_to_queue('get_account_info', ...args);
57
+ return await broker.send_to_queue("get_account_info", ...args);
55
58
  };
56
59
 
57
60
  export const get_active_account_profile_info = async function (...args) {
58
- return await broker.send_to_queue('get_active_account_profile_info', ...args);
61
+ return await broker.send_to_queue("get_active_account_profile_info", ...args);
59
62
  };
60
63
 
61
64
  export const get_account_name = async function (...args) {
62
- return await broker.send_to_queue('get_account_name', ...args);
65
+ return await broker.send_to_queue("get_account_name", ...args);
63
66
  };
64
67
 
65
68
  export const account_validate_username = async function (...args) {
66
- return await broker.send_to_queue('account_validate_username', ...args);
69
+ return await broker.send_to_queue("account_validate_username", ...args);
67
70
  };
68
71
 
69
72
  export const verify_account = async function (...args) {
70
- return await broker.send_to_queue('verify_account', ...args);
73
+ return await broker.send_to_queue("verify_account", ...args);
71
74
  };
72
75
 
73
76
  export const validate_user_plan = async function (...args) {
74
- return await broker.send_to_queue('validate_user_plan', ...args);
77
+ return await broker.send_to_queue("validate_user_plan", ...args);
75
78
  };
76
79
 
77
80
  export const get_hosting_plan = async function (...args) {
78
- return await broker.send_to_queue('get_hosting_plan', ...args);
81
+ return await broker.send_to_queue("get_hosting_plan", ...args);
79
82
  };
80
83
 
81
84
  export const get_cpu = async function (...args) {
82
- return await broker.send_to_queue('get_cpu', ...args);
85
+ return await broker.send_to_queue("get_cpu", ...args);
83
86
  };
84
87
 
85
88
  export const add_account_log_util = async function (...args) {
86
- return await broker.send_to_queue('add_account_log_util', ...args);
89
+ return await broker.send_to_queue("add_account_log_util", ...args);
87
90
  };
88
91
 
89
92
  export const save_ssh_key = async function (...args) {
90
- return await broker.send_to_queue('save_ssh_key', ...args);
93
+ return await broker.send_to_queue("save_ssh_key", ...args);
91
94
  };
92
95
 
93
96
  export const delete_ssh_key = async function (...args) {
94
- return await broker.send_to_queue('delete_ssh_key', ...args);
97
+ return await broker.send_to_queue("delete_ssh_key", ...args);
95
98
  };
96
99
 
97
100
  export const get_ssh_keys = async function (...args) {
98
- return await broker.send_to_queue('get_ssh_keys', ...args);
101
+ return await broker.send_to_queue("get_ssh_keys", ...args);
99
102
  };
100
103
 
101
104
  export const search_users = async function (...args) {
102
- return await broker.send_to_queue('search_users', ...args);
105
+ return await broker.send_to_queue("search_users", ...args);
103
106
  };
104
107
 
105
108
  export const find_contact_duplicates = async function (...args) {
106
- return await broker.send_to_queue('find_contact_duplicates', ...args);
109
+ return await broker.send_to_queue("find_contact_duplicates", ...args);
107
110
  };
108
111
 
109
112
  export const merge_contact = async function (...args) {
110
- return await broker.send_to_queue('merge_contact', ...args);
113
+ return await broker.send_to_queue("merge_contact", ...args);
111
114
  };
112
115
 
113
116
  export const get_contact_info = async function (...args) {
114
- return await broker.send_to_queue('get_contact_info', ...args);
117
+ return await broker.send_to_queue("get_contact_info", ...args);
115
118
  };
116
119
 
117
120
  export const get_pending_contact_out = async function (...args) {
118
- return await broker.send_to_queue('get_pending_contact_out', ...args);
121
+ return await broker.send_to_queue("get_pending_contact_out", ...args);
119
122
  };
120
123
 
121
124
  export const get_pending_contact_in = async function (...args) {
122
- return await broker.send_to_queue('get_pending_contact_in', ...args);
125
+ return await broker.send_to_queue("get_pending_contact_in", ...args);
123
126
  };
124
127
 
125
128
  export const get_pending_share_contact_in = async function (...args) {
126
- return await broker.send_to_queue('get_pending_share_contact_in', ...args);
129
+ return await broker.send_to_queue("get_pending_share_contact_in", ...args);
127
130
  };
128
131
 
129
132
  export const update_contact = async function (...args) {
130
- return await broker.send_to_queue('update_contact', ...args);
133
+ return await broker.send_to_queue("update_contact", ...args);
131
134
  };
132
135
 
133
136
  export const get_account_rt_info = async function (...args) {
134
- return await broker.send_to_queue('get_account_rt_info', ...args);
137
+ return await broker.send_to_queue("get_account_rt_info", ...args);
135
138
  };
136
139
 
137
140
  export const validate_account_topup = async function (...args) {
138
- return await broker.send_to_queue('validate_account_topup', ...args);
141
+ return await broker.send_to_queue("validate_account_topup", ...args);
139
142
  };
140
143
 
141
144
  export const create_account_oauth_link = async function (...args) {
142
- return await broker.send_to_queue('create_account_oauth_link', ...args);
145
+ return await broker.send_to_queue("create_account_oauth_link", ...args);
143
146
  };
144
147
 
145
148
  export const get_default_project_account_doc = async function (...args) {
146
- return await broker.send_to_queue('get_default_project_account_doc', ...args);
149
+ return await broker.send_to_queue("get_default_project_account_doc", ...args);
147
150
  };
148
151
 
149
152
  export const get_account_default_project_id = async function (...args) {
150
- return await broker.send_to_queue('get_account_default_project_id', ...args);
153
+ return await broker.send_to_queue("get_account_default_project_id", ...args);
151
154
  };
152
155
 
153
156
  export const get_user_name = async function (...args) {
154
- return await broker.send_to_queue('get_user_name', ...args);
157
+ return await broker.send_to_queue("get_user_name", ...args);
155
158
  };
156
159
 
157
160
  export const get_user_card = async function (...args) {
158
- return await broker.send_to_queue('get_user_card', ...args);
161
+ return await broker.send_to_queue("get_user_card", ...args);
159
162
  };
160
163
 
161
164
  export const onboarding_completed = async function (...args) {
162
- return await broker.send_to_queue('onboarding_completed', ...args);
165
+ return await broker.send_to_queue("onboarding_completed", ...args);
163
166
  };
164
167
 
165
168
  export const ts_contact = async function (...args) {
166
- return await broker.send_to_queue('ts_contact', ...args);
169
+ return await broker.send_to_queue("ts_contact", ...args);
167
170
  };
168
171
 
169
172
  export const get_account_ai_usage = async function (...args) {
170
- return await broker.send_to_queue('get_account_ai_usage', ...args);
173
+ return await broker.send_to_queue("get_account_ai_usage", ...args);
171
174
  };
172
175
 
173
176
  export const add_contact = async function (...args) {
174
- return await broker.send_to_queue('add_contact', ...args);
177
+ return await broker.send_to_queue("add_contact", ...args);
175
178
  };
176
179
 
177
180
  export const get_contacts = async function (...args) {
178
- return await broker.send_to_queue('get_contacts', ...args);
181
+ return await broker.send_to_queue("get_contacts", ...args);
179
182
  };
180
183
 
181
184
  export const archive_contact = async function (...args) {
182
- return await broker.send_to_queue('archive_contact', ...args);
185
+ return await broker.send_to_queue("archive_contact", ...args);
183
186
  };
184
187
 
185
188
  export const delete_contact = async function (...args) {
186
- return await broker.send_to_queue('delete_contact', ...args);
189
+ return await broker.send_to_queue("delete_contact", ...args);
187
190
  };
188
191
 
189
192
  export const unarchive_contact = async function (...args) {
190
- return await broker.send_to_queue('unarchive_contact', ...args);
193
+ return await broker.send_to_queue("unarchive_contact", ...args);
191
194
  };
192
195
 
193
196
  export const unfriend_contact = async function (...args) {
194
- return await broker.send_to_queue('unfriend_contact', ...args);
197
+ return await broker.send_to_queue("unfriend_contact", ...args);
195
198
  };
196
199
 
197
200
  export const pin_contact = async function (...args) {
198
- return await broker.send_to_queue('pin_contact', ...args);
201
+ return await broker.send_to_queue("pin_contact", ...args);
199
202
  };
200
203
 
201
204
  export const set_contact_deep_research = async function (...args) {
202
- return await broker.send_to_queue('set_contact_deep_research', ...args);
205
+ return await broker.send_to_queue("set_contact_deep_research", ...args);
203
206
  };
204
207
 
205
208
  export const unpin_contact = async function (...args) {
206
- return await broker.send_to_queue('unpin_contact', ...args);
209
+ return await broker.send_to_queue("unpin_contact", ...args);
207
210
  };
208
211
 
209
212
  export const not_spam_contact = async function (...args) {
210
- return await broker.send_to_queue('not_spam_contact', ...args);
213
+ return await broker.send_to_queue("not_spam_contact", ...args);
211
214
  };
212
215
 
213
216
  export const generate_contact_avatar = async function (...args) {
214
- return await broker.send_to_queue('generate_contact_avatar', ...args);
217
+ return await broker.send_to_queue("generate_contact_avatar", ...args);
215
218
  };
216
219
 
217
220
  export const set_deep_research_contact = async function (...args) {
218
- return await broker.send_to_queue('set_deep_research_contact', ...args);
221
+ return await broker.send_to_queue("set_deep_research_contact", ...args);
219
222
  };
220
223
 
221
224
  export const unset_deep_research_contact = async function (...args) {
222
- return await broker.send_to_queue('unset_deep_research_contact', ...args);
225
+ return await broker.send_to_queue("unset_deep_research_contact", ...args);
223
226
  };
224
227
 
225
228
  export const get_pending_share_profile_in = async function (...args) {
226
- return await broker.send_to_queue('get_pending_share_profile_in', ...args);
229
+ return await broker.send_to_queue("get_pending_share_profile_in", ...args);
227
230
  };
228
231
 
229
232
  export const get_account_profile_info = async function (...args) {
230
- return await broker.send_to_queue('get_account_profile_info', ...args);
233
+ return await broker.send_to_queue("get_account_profile_info", ...args);
231
234
  };
232
235
 
233
236
  export const get_account_profiles = async function (...args) {
234
- return await broker.send_to_queue('get_account_profiles', ...args);
237
+ return await broker.send_to_queue("get_account_profiles", ...args);
235
238
  };
236
239
 
237
240
  export const archive_account_profile = async function (...args) {
238
- return await broker.send_to_queue('archive_account_profile', ...args);
241
+ return await broker.send_to_queue("archive_account_profile", ...args);
239
242
  };
240
243
 
241
244
  export const delete_account_profile = async function (...args) {
242
- return await broker.send_to_queue('delete_account_profile', ...args);
245
+ return await broker.send_to_queue("delete_account_profile", ...args);
243
246
  };
244
247
 
245
248
  export const unarchive_account_profile = async function (...args) {
246
- return await broker.send_to_queue('unarchive_account_profile', ...args);
249
+ return await broker.send_to_queue("unarchive_account_profile", ...args);
247
250
  };
248
251
 
249
252
  export const create_account_profile = async function (...args) {
250
- return await broker.send_to_queue('create_account_profile', ...args);
253
+ return await broker.send_to_queue("create_account_profile", ...args);
251
254
  };
252
255
 
253
256
  export const update_account_profile = async function (...args) {
254
- return await broker.send_to_queue('update_account_profile', ...args);
257
+ return await broker.send_to_queue("update_account_profile", ...args);
255
258
  };
256
259
 
257
260
  export const update_entity_account_profiles = async function (...args) {
258
- return await broker.send_to_queue('update_entity_account_profiles', ...args);
261
+ return await broker.send_to_queue("update_entity_account_profiles", ...args);
259
262
  };
260
263
 
261
264
  export const get_contact = async function (...args) {
262
- return await broker.send_to_queue('get_contact', ...args);
265
+ return await broker.send_to_queue("get_contact", ...args);
263
266
  };
264
267
 
265
268
  export const save_contact = async function (...args) {
266
- return await broker.send_to_queue('save_contact', ...args);
269
+ return await broker.send_to_queue("save_contact", ...args);
267
270
  };
268
271
 
269
272
  export const find_contact_query = async function (...args) {
270
- return await broker.send_to_queue('find_contact_query', ...args);
273
+ return await broker.send_to_queue("find_contact_query", ...args);
271
274
  };
272
275
 
273
276
  export const delete_xuda_cache = async function (...args) {
274
- return await broker.send_to_queue('delete_xuda_cache', ...args);
277
+ return await broker.send_to_queue("delete_xuda_cache", ...args);
275
278
  };
276
279
 
277
280
  export const save_xuda_cache = async function (...args) {
278
- return await broker.send_to_queue('save_xuda_cache', ...args);
281
+ return await broker.send_to_queue("save_xuda_cache", ...args);
279
282
  };
280
283
 
281
284
  export const get_xuda_cache = async function (...args) {
282
- return await broker.send_to_queue('get_xuda_cache', ...args);
285
+ return await broker.send_to_queue("get_xuda_cache", ...args);
283
286
  };
284
287
 
285
288
  export const save_cache_hit = async function (...args) {
286
- return await broker.send_to_queue('save_cache_hit', ...args);
289
+ return await broker.send_to_queue("save_cache_hit", ...args);
287
290
  };
288
291
 
289
292
  export const record_ai_usage = async function (...args) {
290
- return await broker.send_to_queue('record_ai_usage', ...args);
293
+ return await broker.send_to_queue("record_ai_usage", ...args);
291
294
  };
292
295
 
293
296
  export const record_ai_credit = async function (...args) {
294
- return await broker.send_to_queue('record_ai_credit', ...args);
297
+ return await broker.send_to_queue("record_ai_credit", ...args);
295
298
  };
296
299
 
297
300
  export const add_ai_credits_to_active_accounts = async function (...args) {
298
- return await broker.send_to_queue('add_ai_credits_to_active_accounts', ...args);
301
+ return await broker.send_to_queue("add_ai_credits_to_active_accounts", ...args);
299
302
  };
300
303
 
301
304
  export const archive_expire_ai_credits = async function (...args) {
302
- return await broker.send_to_queue('archive_expire_ai_credits', ...args);
305
+ return await broker.send_to_queue("archive_expire_ai_credits", ...args);
303
306
  };
304
307
 
305
308
  export const read_accounts_emails = async function (...args) {
306
- return await broker.send_to_queue('read_accounts_emails', ...args);
309
+ return await broker.send_to_queue("read_accounts_emails", ...args);
307
310
  };
308
311
 
309
312
  export const process_accounts_emails = async function (...args) {
310
- return await broker.send_to_queue('process_accounts_emails', ...args);
313
+ return await broker.send_to_queue("process_accounts_emails", ...args);
311
314
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.2080",
3
+ "version": "1.2.2082",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {