@xuda.io/account_module 1.2.156 → 1.2.158

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 +11 -10
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -18,7 +18,7 @@ const jobs_module = await import(`${module_path}/jobs_module/index.mjs`);
18
18
  const logs_module = await import(`${module_path}/logs_module/index.mjs`);
19
19
 
20
20
  export const update_account_info = async function (req) {
21
- const marketplace_module = await import(`${module_path}/marketplace_module.index.mjs`);
21
+ const marketplace_module = await import(`${module_path}/marketplace_module/index.mjs`);
22
22
 
23
23
  const { uid } = req;
24
24
  const data = req;
@@ -101,7 +101,7 @@ export const update_account_info = async function (req) {
101
101
  delete account_obj.account_info.uid;
102
102
 
103
103
  if (!account_obj.account_project_id) {
104
- const app_module = await import(`${module_path}/app_module.index.mjs`);
104
+ const app_module = await import(`${module_path}/app_module/index.mjs`);
105
105
  const ret = await app_module.create_project({ token_ret: req.token_ret, uid, data: { app_name: `Account ${uid} main project`, is_account_project: true, app_plugins_purchased: [' @xuda.io/xuda-dbs-plugin-xuda', '@xuda.io/xuda-framework-plugin-tailwind'] } });
106
106
  if (ret.code > -1) {
107
107
  account_obj.account_project_id = ret.data;
@@ -164,7 +164,7 @@ export const increment_account_usage = async function (req) {
164
164
  }
165
165
  const accounts_ret = await db_module.get_couch_view_raw('xuda_accounts', 'all_accounts', opt);
166
166
 
167
- const drive_module = await import(`${module_path}/drive_module.index.mjs`);
167
+ const drive_module = await import(`${module_path}/drive_module/index.mjs`);
168
168
 
169
169
  function bytesToGB(bytes) {
170
170
  return bytes / 1073741824; // or bytes / (1024 ** 3)
@@ -455,7 +455,7 @@ export const get_account_data = async function (req) {
455
455
 
456
456
  // if (!acc_obj.account_project_id && req.token_ret) {
457
457
  // let = account_obj = acc_obj;
458
- // const app_module = await import(`${module_path}/app_module.index.mjs`);
458
+ // const app_module = await import(`${module_path}/app_module/index.mjs`);
459
459
  // const ret = await app_module.create_project({ token_ret: req.token_ret, uid, data: { app_name: `Account ${uid} main project`, is_account_project: true } });
460
460
  // if (ret.code > -1) {
461
461
  // account_obj.account_project_id = ret.data;
@@ -504,6 +504,7 @@ export const get_account_instances = async function (req) {
504
504
  };
505
505
 
506
506
  export const get_account_info = async function (req) {
507
+ debugger;
507
508
  return await this.get_account_data({
508
509
  uid: req.uid,
509
510
  enforce_usage: req.enforce_usage,
@@ -695,7 +696,7 @@ export const add_account_log_util = async function (body, status, service, sourc
695
696
  if (service.substr(0, 4) === 'get_' && !body.api_pk && !body.api_sk) return;
696
697
  }
697
698
  // }
698
- const logs_module = await import(`${module_path}/logs_module.index.mjs`);
699
+ const logs_module = await import(`${module_path}/logs_module/index.mjs`);
699
700
  logs_module.add_account_log(get_account_log_object(body, status, service, source, response_data, ip, headers, security));
700
701
  };
701
702
 
@@ -863,7 +864,7 @@ export const search_users = async function (req) {
863
864
  export const read_emails = async function (req) {
864
865
  const { uid, email_account_address, email_account_id, accessToken, vendor } = req;
865
866
 
866
- const email_module = await import(`${module_path}/email_module.index.mjs`);
867
+ const email_module = await import(`${module_path}/email_module/index.mjs`);
867
868
 
868
869
  const read_mailbox = async function (mailbox_path, mailbox_name, is_sent) {
869
870
  var emails_ret = await db_module.find_couch_query('xuda_emails', {
@@ -968,7 +969,7 @@ export const read_emails = async function (req) {
968
969
  export const get_email_accounts = async function (req) {
969
970
  const { uid, stat } = req;
970
971
 
971
- const db_module = await import(`${module_path}/db_module.index.mjs`);
972
+ const db_module = await import(`${module_path}/db_module/index.mjs`);
972
973
  var email_account_ret = await db_module.find_couch_query('xuda_emails', {
973
974
  selector: {
974
975
  docType: 'email_account',
@@ -1210,7 +1211,7 @@ export const update_contact = async function (req) {
1210
1211
  export const invite_user = async function (req) {
1211
1212
  const { email, name, uid } = req;
1212
1213
 
1213
- const team_module = await import(`${module_path}/team_module.index.mjs`);
1214
+ const team_module = await import(`${module_path}/team_module/index.mjs`);
1214
1215
  const ret = await team_module.create_team_request({
1215
1216
  email,
1216
1217
  access_type: 'contact',
@@ -1235,7 +1236,7 @@ export const get_account_rt_info = async function (uid) {
1235
1236
  };
1236
1237
 
1237
1238
  // export const validate_account_topup = async function (uid, items = []) {
1238
- // const stripe_module = await import(`${module_path}/stripe_module.index.mjs`);
1239
+ // const stripe_module = await import(`${module_path}/stripe_module/index.mjs`);
1239
1240
 
1240
1241
  // const { code, data } = await stripe_module.get_billing_metrics({ uid });
1241
1242
  // if (code < 0) {
@@ -1277,7 +1278,7 @@ export const get_account_rt_info = async function (uid) {
1277
1278
  // };
1278
1279
 
1279
1280
  export const validate_account_topup = async function (uid, items = []) {
1280
- const stripe_module = await import(`${module_path}/stripe_module.index.mjs`);
1281
+ const stripe_module = await import(`${module_path}/stripe_module/index.mjs`);
1281
1282
 
1282
1283
  const { code, data } = await stripe_module.get_billing_metrics({ uid });
1283
1284
  if (code < 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.156",
3
+ "version": "1.2.158",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {