@xuda.io/account_module 1.2.1488 → 1.2.1490
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 +9 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2914,7 +2914,7 @@ export const unarchive_account_profile = async function (req) {
|
|
|
2914
2914
|
};
|
|
2915
2915
|
|
|
2916
2916
|
export const create_account_profile = async function (req, job_id, headers) {
|
|
2917
|
-
const { uid, profile_name, profile_signature, email_account_id, profile_picture, profile_avatar, profile_picture_obj, profile_avatar_obj, main } = req;
|
|
2917
|
+
const { uid, profile_name, profile_signature, email_account_id, profile_picture, profile_avatar, profile_picture_obj, profile_avatar_obj, main, profile_type } = req;
|
|
2918
2918
|
try {
|
|
2919
2919
|
const app_id = await get_account_default_project_id(uid);
|
|
2920
2920
|
// const { data: acc_obj } = await db_module.get_couch_doc('xuda_accounts', uid);
|
|
@@ -2926,7 +2926,7 @@ export const create_account_profile = async function (req, job_id, headers) {
|
|
|
2926
2926
|
date_created_ts: d,
|
|
2927
2927
|
ts: d,
|
|
2928
2928
|
docType: 'account_profile',
|
|
2929
|
-
|
|
2929
|
+
profile_type,
|
|
2930
2930
|
uid,
|
|
2931
2931
|
profile_name, //: profile_name || acc_obj.account_info.business_name || acc_obj.account_info.name,
|
|
2932
2932
|
profile_signature,
|
|
@@ -2950,7 +2950,7 @@ export const create_account_profile = async function (req, job_id, headers) {
|
|
|
2950
2950
|
export const update_account_profile = async function (req, job_id, headers) {
|
|
2951
2951
|
const { uid, _id } = req;
|
|
2952
2952
|
const app_id = await get_account_default_project_id(uid);
|
|
2953
|
-
const account_profile_properties = ['profile_name', 'profile_signature', 'email_account_id', 'profile_picture', 'profile_avatar', 'profile_picture_obj', 'profile_avatar_obj', 'auto_respond', 'auto_respond_mode', 'auto_respond_agents'];
|
|
2953
|
+
const account_profile_properties = ['profile_name', 'profile_signature', 'email_account_id', 'profile_picture', 'profile_avatar', 'profile_picture_obj', 'profile_avatar_obj', 'auto_respond', 'auto_respond_mode', 'auto_respond_agents', 'profile_type'];
|
|
2954
2954
|
try {
|
|
2955
2955
|
let { data: account_profile_doc } = await db_module.get_app_couch_doc(app_id, _id);
|
|
2956
2956
|
|
|
@@ -3051,3 +3051,9 @@ export const save_picture_cache = async function (uid, docType, name, file, meta
|
|
|
3051
3051
|
const save_ret = await db_module.save_couch_doc('xuda_cache', doc);
|
|
3052
3052
|
return save_ret;
|
|
3053
3053
|
};
|
|
3054
|
+
|
|
3055
|
+
export const get_picture_cache = async function (uid, docType, name) {
|
|
3056
|
+
let opt = { selector: {}, limit: 1 };
|
|
3057
|
+
|
|
3058
|
+
const ret = await db_module.find_couch_query('xuda_cache', from_opt);
|
|
3059
|
+
};
|