@xuda.io/account_module 1.2.1534 → 1.2.1536

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 +5 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2846,7 +2846,7 @@ export const unarchive_account_profile = async function (req) {
2846
2846
  };
2847
2847
 
2848
2848
  export const create_account_profile = async function (req, job_id, headers) {
2849
- const { uid, profile_name, profile_signature, email_account_id, profile_picture, profile_avatar, profile_picture_obj, profile_avatar_obj, main, profile_type } = req;
2849
+ const { uid, profile_name, profile_signature, email_account_id, profile_picture, profile_avatar, profile_picture_obj, profile_avatar_obj, main, account_type } = req;
2850
2850
  try {
2851
2851
  const app_id = await get_account_default_project_id(uid);
2852
2852
  // const { data: acc_obj } = await db_module.get_couch_doc('xuda_accounts', uid);
@@ -2858,7 +2858,7 @@ export const create_account_profile = async function (req, job_id, headers) {
2858
2858
  date_created_ts: d,
2859
2859
  ts: d,
2860
2860
  docType: 'account_profile',
2861
- profile_type,
2861
+ account_type,
2862
2862
  uid,
2863
2863
  profile_name, //: profile_name || acc_obj.account_info.business_name || acc_obj.account_info.name,
2864
2864
  profile_signature,
@@ -2882,7 +2882,7 @@ export const create_account_profile = async function (req, job_id, headers) {
2882
2882
  export const update_account_profile = async function (req, job_id, headers) {
2883
2883
  const { uid, _id } = req;
2884
2884
  const app_id = await get_account_default_project_id(uid);
2885
- 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'];
2885
+ 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', 'account_type'];
2886
2886
  try {
2887
2887
  let { data: account_profile_doc } = await db_module.get_app_couch_doc(app_id, _id);
2888
2888
 
@@ -3046,7 +3046,7 @@ export const record_ai_usage = async function (uid, input_tokens, output_tokens,
3046
3046
  }
3047
3047
  };
3048
3048
 
3049
- export const record_ai_credit = async function (uid, credits = 0, source, credited_uid) {
3049
+ export const record_ai_credit = async function (uid, credits = 0, source, details, credited_uid) {
3050
3050
  try {
3051
3051
  // if (!account_profile_info) throw new Error('missing account_profile_info');
3052
3052
 
@@ -3060,6 +3060,7 @@ export const record_ai_credit = async function (uid, credits = 0, source, credit
3060
3060
  source,
3061
3061
  stat: 3,
3062
3062
  credited_uid,
3063
+ details,
3063
3064
  };
3064
3065
  const save_ret = await db_module.save_couch_doc('xuda_billing', credit_doc);
3065
3066
  // console.log(save_ret);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1534",
3
+ "version": "1.2.1536",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {