@xuda.io/account_module 1.2.2039 → 1.2.2040
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 +2 -39
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1579,18 +1579,6 @@ export const update_contact = async function (req) {
|
|
|
1579
1579
|
}
|
|
1580
1580
|
return { code: -1, data: 'contact not found' };
|
|
1581
1581
|
};
|
|
1582
|
-
// export const invite_user = async function (req) {
|
|
1583
|
-
// const { email, name, uid } = req;
|
|
1584
|
-
|
|
1585
|
-
// const team_module = await import(`${module_path}/team_module/index.mjs`);
|
|
1586
|
-
// const ret = await team_module.create_team_request({
|
|
1587
|
-
// email,
|
|
1588
|
-
// access_type: 'contact',
|
|
1589
|
-
// uid,
|
|
1590
|
-
// });
|
|
1591
|
-
|
|
1592
|
-
// // return { code: -1, data: "contact already exist active or deleted" };
|
|
1593
|
-
// };
|
|
1594
1582
|
|
|
1595
1583
|
export const get_account_rt_info = async function (uid) {
|
|
1596
1584
|
const doc_ret = await db_module.get_couch_doc('xuda_accounts', uid);
|
|
@@ -1797,29 +1785,6 @@ export const get_user_card = async function (uid, uid_query) {
|
|
|
1797
1785
|
return user_contact_obj;
|
|
1798
1786
|
};
|
|
1799
1787
|
|
|
1800
|
-
// export const generate_user_avatar = async function (req, job_id, headers) {
|
|
1801
|
-
// const { uid, account_info } = req;
|
|
1802
|
-
// try {
|
|
1803
|
-
// const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
1804
|
-
|
|
1805
|
-
// ai_module.get_profile_avatar({ url: account_info?.profile_picture, uid, account_obj }, job_id, headers);
|
|
1806
|
-
|
|
1807
|
-
// // const account_info = await get_account_name({ uid });
|
|
1808
|
-
// // let username = 'unknown';
|
|
1809
|
-
// // if (account_info) {
|
|
1810
|
-
// // username = account_info.first_name + ' ' + account_info.last_name;
|
|
1811
|
-
|
|
1812
|
-
// // if (!username) {
|
|
1813
|
-
// // username = +account_info.email;
|
|
1814
|
-
// // }
|
|
1815
|
-
// // }
|
|
1816
|
-
|
|
1817
|
-
// // return username;
|
|
1818
|
-
// } catch (err) {
|
|
1819
|
-
// return 'unknown';
|
|
1820
|
-
// }
|
|
1821
|
-
// };
|
|
1822
|
-
|
|
1823
1788
|
export const onboarding_completed = async function (req, job_id, headers) {
|
|
1824
1789
|
const { uid } = req;
|
|
1825
1790
|
try {
|
|
@@ -1939,8 +1904,6 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
|
|
|
1939
1904
|
};
|
|
1940
1905
|
|
|
1941
1906
|
const set_account_profile_picture = async function (uid, account_uid, metadata, job_id, headers, account_profile_info) {
|
|
1942
|
-
const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
1943
|
-
// const account_profile_info = await get_active_account_profile_info(uid);
|
|
1944
1907
|
await update_account_profile_picture_status(account_uid, 1);
|
|
1945
1908
|
try {
|
|
1946
1909
|
let profile_picture;
|
|
@@ -1956,7 +1919,7 @@ const set_account_profile_picture = async function (uid, account_uid, metadata,
|
|
|
1956
1919
|
|
|
1957
1920
|
await update_account_profile_picture_status(account_uid, 2);
|
|
1958
1921
|
if (!account_info.profile_picture) {
|
|
1959
|
-
const file_ret = await
|
|
1922
|
+
const file_ret = await ai_ms.get_profile_picture(uid, account_info.account_type, name, { email: account_info.email, metadata, account_info }, account_profile_info, job_id, headers);
|
|
1960
1923
|
|
|
1961
1924
|
let { code: account_code, data: account_obj2 } = await db_module.get_couch_doc('xuda_accounts', account_uid);
|
|
1962
1925
|
account_obj = account_obj2;
|
|
@@ -2008,7 +1971,7 @@ const set_account_profile_picture = async function (uid, account_uid, metadata,
|
|
|
2008
1971
|
|
|
2009
1972
|
const { bio, country, mainCategory, subCategory } = account_info;
|
|
2010
1973
|
|
|
2011
|
-
const file_ret = await
|
|
1974
|
+
const file_ret = await ai_ms.get_profile_avatar(account_info.profile_picture, uid, '', account_profile_info, account_info.account_type, 'account', account_uid, { bio, country, mainCategory, subCategory, is_user: true }, business_size, name, account_info.email, job_id, headers);
|
|
2012
1975
|
if (file_ret.code < 0) {
|
|
2013
1976
|
throw new Error(file_ret.data);
|
|
2014
1977
|
}
|