@xuda.io/ai_module 1.1.4854 → 1.1.4856

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 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2797,7 +2797,7 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
2797
2797
  "${db_doc.agentConfig.agent_user_guide}"
2798
2798
 
2799
2799
 
2800
- use the field keys from the above ## fields object
2800
+ use ONLY the field keys from the above ## fields object
2801
2801
  and create validations for each step
2802
2802
 
2803
2803
  result example:
@@ -2807,28 +2807,28 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
2807
2807
  step: 1,
2808
2808
  title: "Core Loan Details",
2809
2809
  description: "Enter the fundamental numbers for your loan.",
2810
- fields: ["loan_amount", "down_payment", "loan_type"],
2810
+ fields: (obj) => ["loan_amount", "down_payment", "loan_type"],
2811
2811
  isValid: (obj) => { return obj.loanAmount?.length ? true : false; }
2812
2812
  },
2813
2813
  {
2814
2814
  step: 2,
2815
2815
  title: "Rates & Terms",
2816
2816
  description: "Define the interest and duration of the loan.",
2817
- fields: ["interest_rate", "interest_type", "loan_term"],
2817
+ fields: (obj) => obj.loan_type === 'personal' ? ["interest_rate"] : ["interest_rate", "interest_type", "loan_term"] ,
2818
2818
  if: (obj) => obj.loan_type === 'personal' ? true : false,
2819
2819
  },
2820
2820
  {
2821
2821
  step: 3,
2822
2822
  title: "Payment Schedule",
2823
2823
  description: "How and when would you like to make payments?",
2824
- fields: ["payment_frequency", "start_date"],
2824
+ fields: (obj) =>["payment_frequency", "start_date"],
2825
2825
  if: (obj) => obj.loan_type === 'personal' ? true : false,
2826
2826
  },
2827
2827
  {
2828
2828
  step: 4,
2829
2829
  title: "Additional Options",
2830
2830
  description: "Finalize your calculation with extra payments or schedules.",
2831
- fields: ["extra_payments", "amortization_schedule"],
2831
+ fields: (obj) =>["extra_payments", "amortization_schedule"],
2832
2832
  if: (obj) => obj.loan_type === 'personal' ? true : false,
2833
2833
  }
2834
2834
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4854",
3
+ "version": "1.1.4856",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",