@xuda.io/account_module 1.2.2056 → 1.2.2057

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