@xuda.io/account_module 1.2.153 → 1.2.154
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 +10 -10
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -13,12 +13,12 @@ const _utils = await import(path.join(process.env.XUDA_HOME, 'common', 'xuda-cpi
|
|
|
13
13
|
|
|
14
14
|
// Module Paths
|
|
15
15
|
const module_path = path.join(process.env.XUDA_HOME, 'cpi') + (!_conf.is_debug ? '/node_modules/@xuda.io' : '');
|
|
16
|
-
const db_module = await import(`${module_path}/db_module`);
|
|
17
|
-
const jobs_module = await import(`${module_path}/jobs_module`);
|
|
18
|
-
const logs_module = await import(`${module_path}/logs_module`);
|
|
16
|
+
const db_module = await import(`${module_path}/db_module/index.mjs`);
|
|
17
|
+
const jobs_module = await import(`${module_path}/jobs_module/index.mjs`);
|
|
18
|
+
const logs_module = await import(`${module_path}/logs_module/index.mjs`);
|
|
19
19
|
|
|
20
20
|
export const update_account_info = async (req) => {
|
|
21
|
-
const marketplace_module = await import(`${module_path}/marketplace_module`);
|
|
21
|
+
const marketplace_module = await import(`${module_path}/marketplace_module/index.mjs`);
|
|
22
22
|
|
|
23
23
|
const { uid } = req;
|
|
24
24
|
const data = req;
|
|
@@ -96,7 +96,7 @@ export const update_account_info = async (req) => {
|
|
|
96
96
|
delete account_obj.account_info.uid;
|
|
97
97
|
|
|
98
98
|
if (!account_obj.account_project_id) {
|
|
99
|
-
const app_module = await import(`${module_path}/app_module`);
|
|
99
|
+
const app_module = await import(`${module_path}/app_module/index.mjs`);
|
|
100
100
|
const ret = await app_module.create_project({
|
|
101
101
|
token_ret: req.token_ret,
|
|
102
102
|
uid,
|
|
@@ -168,7 +168,7 @@ export const increment_account_usage = async (req) => {
|
|
|
168
168
|
}
|
|
169
169
|
const accounts_ret = await db_module.get_couch_view_raw('xuda_accounts', 'all_accounts', opt);
|
|
170
170
|
|
|
171
|
-
const drive_module = await import(`${module_path}/drive_module`);
|
|
171
|
+
const drive_module = await import(`${module_path}/drive_module/index.mjs`);
|
|
172
172
|
|
|
173
173
|
const bytesToGB = (bytes) => {
|
|
174
174
|
return bytes / 1073741824; // or bytes / (1024 ** 3)
|
|
@@ -774,7 +774,7 @@ export const search_users = async (req) => {
|
|
|
774
774
|
export const read_emails = async (req) => {
|
|
775
775
|
const { uid, email_account_address, email_account_id, accessToken, vendor } = req;
|
|
776
776
|
|
|
777
|
-
const email_module = await import(`${module_path}/email_module`);
|
|
777
|
+
const email_module = await import(`${module_path}/email_module/index.mjs`);
|
|
778
778
|
|
|
779
779
|
const read_mailbox = async (mailbox_path, mailbox_name, is_sent) => {
|
|
780
780
|
let emails_ret = await db_module.find_couch_query('xuda_emails', {
|
|
@@ -861,7 +861,7 @@ export const read_emails = async (req) => {
|
|
|
861
861
|
export const get_email_accounts = async (req) => {
|
|
862
862
|
const { uid, stat } = req;
|
|
863
863
|
|
|
864
|
-
const db_module = await import(`${module_path}/db_module`);
|
|
864
|
+
const db_module = await import(`${module_path}/db_module/index.mjs`);
|
|
865
865
|
let email_account_ret = await db_module.find_couch_query('xuda_emails', {
|
|
866
866
|
selector: {
|
|
867
867
|
docType: 'email_account',
|
|
@@ -1088,7 +1088,7 @@ export const update_contact = async (req) => {
|
|
|
1088
1088
|
export const invite_user = async (req) => {
|
|
1089
1089
|
const { email, name, uid } = req;
|
|
1090
1090
|
|
|
1091
|
-
const team_module = await import(`${module_path}/team_module`);
|
|
1091
|
+
const team_module = await import(`${module_path}/team_module/index.mjs`);
|
|
1092
1092
|
const ret = await team_module.create_team_request({
|
|
1093
1093
|
email,
|
|
1094
1094
|
access_type: 'contact',
|
|
@@ -1173,7 +1173,7 @@ const get_prices = (uid, item) => {
|
|
|
1173
1173
|
};
|
|
1174
1174
|
|
|
1175
1175
|
export const validate_account_topup = async (uid, items = []) => {
|
|
1176
|
-
const stripe_module = await import(`${module_path}/stripe_module`);
|
|
1176
|
+
const stripe_module = await import(`${module_path}/stripe_module/index.mjs`);
|
|
1177
1177
|
|
|
1178
1178
|
const { code, data } = await stripe_module.get_billing_metrics({ uid });
|
|
1179
1179
|
if (code < 0) {
|