generative data

This commit is contained in:
CHIEFSOFT\ameye
2025-09-02 10:01:02 -04:00
parent d81af8d5ce
commit d113bd37b4
4 changed files with 145 additions and 30 deletions
+71 -19
View File
@@ -56,6 +56,7 @@ def merms_reset():
response = LoginService.process_reset(data)
return response
@api.route("/panel/auth/resetverify", methods=["POST"])
# @jwt_required()
def merms_resetverify():
@@ -63,6 +64,7 @@ def merms_resetverify():
response = LoginService.verify_reset(data)
return response
@api.route("/panel/auth/resetcomplete", methods=["POST"])
# @jwt_required()
def merms_resetcomplete():
@@ -70,6 +72,7 @@ def merms_resetcomplete():
response = LoginService.complete_reset(data)
return response
@api.route("/panel/Login", methods=["POST"])
@jwt_required()
def merms_login():
@@ -77,6 +80,7 @@ def merms_login():
response = LoginService.process_request(data)
return response
@api.route("/panel/Register", methods=["POST"])
@jwt_required()
def merms_register():
@@ -84,7 +88,8 @@ def merms_register():
response = RegisterService.process_request(data)
return response
#/panel/Register/verify
# /panel/Register/verify
@api.route("/panel/Register/verify", methods=["POST"])
@jwt_required()
def merms_register_verify():
@@ -92,6 +97,7 @@ def merms_register_verify():
response = RegisterService.process_verify(data)
return response
@api.route("/panel/Register/complete", methods=["POST"])
@jwt_required()
def merms_register_complete():
@@ -99,6 +105,7 @@ def merms_register_complete():
response = RegisterService.process_complete(data)
return response
@api.route("/panel/account", methods=["POST"])
@jwt_required()
def merms_account():
@@ -106,6 +113,7 @@ def merms_account():
response = AccountService.process_request(data)
return response
@api.route("/panel/account-bar", methods=["POST"])
@jwt_required()
def merms_account_bar():
@@ -113,6 +121,7 @@ def merms_account_bar():
response = AccountService.process_bar_data(data)
return response
@api.route("/panel/account/bar", methods=["POST"])
@jwt_required()
def merms_account_bar2():
@@ -120,6 +129,7 @@ def merms_account_bar2():
response = AccountService.process_bar_data(data)
return response
@api.route("/panel/account/actions", methods=["POST"])
@jwt_required()
def merms_account_actions():
@@ -127,6 +137,7 @@ def merms_account_actions():
response = AccountService.process_action_request(data)
return response
@api.route("/panel/account/productsurl", methods=["POST"])
@jwt_required()
def merms_account_product_url():
@@ -134,6 +145,7 @@ def merms_account_product_url():
response = ProductsService.product_url_request(data)
return response
@api.route("/panel/account/payments", methods=["POST"])
@jwt_required()
def merms_account_payments():
@@ -141,6 +153,7 @@ def merms_account_payments():
response = AccountService.process_payments_data(data)
return response
@api.route("/panel/account/products/url", methods=["POST"])
def myproduct_url():
data = request.get_json()
@@ -148,6 +161,7 @@ def myproduct_url():
response = ProductsService.product_url_request(data)
return response
@api.route("/panel/account/products/refresh", methods=["POST"])
def myproduct_refresh():
data = request.get_json()
@@ -155,6 +169,7 @@ def myproduct_refresh():
response = ProductsService.myproduct_refresh_request(data)
return response
@api.route("/panel/account/products/templates", methods=["POST"])
# @token_required
def get_myproduct_templates():
@@ -164,6 +179,7 @@ def get_myproduct_templates():
response = MyProductsService.mpproduct_template_data(data)
return response
@api.route("/panel/account/template/activate", methods=["POST"])
# @token_required
def get_myproduct_templates_activate():
@@ -172,6 +188,7 @@ def get_myproduct_templates_activate():
response = MyProductsService.process_set_template(data)
return response
@api.route("/panel/contacts", methods=["POST"])
def merms_contacts():
data = request.get_json()
@@ -179,6 +196,7 @@ def merms_contacts():
response = ContactService.process_request(data)
return response
@api.route("/panel/account/products", methods=["POST"])
@jwt_required()
def merms_products():
@@ -194,6 +212,7 @@ def myproduct_dash():
response = MyProductsService.process_request(data)
return response
@api.route("/panel/myproduct/settings", methods=["POST"])
def myproduct_settings():
data = request.get_json()
@@ -201,6 +220,7 @@ def myproduct_settings():
response = MyProductsService.process_settings(data)
return response
@api.route("/panel/myproduct/configuration", methods=["POST"])
def myproduct_configuration():
data = request.get_json()
@@ -216,6 +236,7 @@ def myproduct_settings_values():
response = MyProductsService.process_settings_values(data)
return response
@api.route("/panel/subscription/products", methods=["POST"])
def subscription_products():
data = request.get_json()
@@ -223,6 +244,7 @@ def subscription_products():
response = SubscriptionsService.subscription_available_products(data)
return response
#
@api.route("/panel/subscription/start", methods=["POST"])
def subscription_sessuib_start():
@@ -240,7 +262,8 @@ def myproduct_subscription():
response = MyProductsService.process_subscription(data)
return response
#/panel/myproduct/provision
# /panel/myproduct/provision
@api.route("/panel/myproduct/provision", methods=["POST"])
def myproduct_provision():
data = request.get_json()
@@ -248,6 +271,7 @@ def myproduct_provision():
response = MyProductsService.process_provision(data)
return response
@api.route("/panel/myproduct/provision-actions", methods=["POST"])
def myproduct_provision_actions():
data = request.get_json()
@@ -255,6 +279,7 @@ def myproduct_provision_actions():
response = MyProductsService.process_provision_actions(data)
return response
@api.route("/stripe/payments", methods=["POST"])
def stripe_payments_webhook_post():
try:
@@ -274,7 +299,6 @@ def stripe_payments_webhook_post():
logger.info("This block always runs.")
# /panel/account/calendar
@api.route("/panel/account/calendar", methods=["POST"])
def mycalendar_dash():
@@ -283,6 +307,7 @@ def mycalendar_dash():
response = AccountService.process_calendar(data)
return response
# /panel/account/calendar
@api.route("/panel/account/startprofile", methods=["POST"])
def account_startprofile():
@@ -291,17 +316,18 @@ def account_startprofile():
response = AccountService.process_startprofile(data)
return response
# Health Check Endpoint
@api.route("/test", methods=["GET"])
def test_check():
data = {"uid": "ok", "token":"jjjfjfjfjfjjf"}
data = {"uid": "ok", "token": "jjjfjfjfjfjjf"}
logger.info(f"Member Actions Error: {data}")
response = AccountService.process_action_request(data)
#response = ProductsService.process_request(data)
# response = ProductsService.process_request(data)
return {"status": "ok"}, 200
#======================================================
# ======================================================
@api.route('/office/login', methods=['POST'])
def login():
data = request.get_json()
@@ -325,6 +351,7 @@ def login():
return jsonify(result)
@api.route('/office/dashboard', methods=['GET'])
# @token_required
def get_dashboard():
@@ -332,6 +359,7 @@ def get_dashboard():
result = OfficeDashboardService.get_dashboard_data()
return jsonify(result)
@api.route('/office/customers', methods=['GET'])
# @token_required
def get_customer_office():
@@ -346,6 +374,7 @@ def get_customer_office():
response = OfficeCustomerService.get_customer_data(filters)
return response
@api.route('/office/subcriptions', methods=['GET'])
# @token_required
def get_subcriptions_list_office():
@@ -360,35 +389,58 @@ def get_subcriptions_list_office():
response = SubscriptionsService.get_subscription_data(filters)
return response
@api.route('/office/transaction', methods=['GET'])
@api.route('/office/billings', methods=['GET'])
# @token_required
def get_subscription_office():
def get_subscription_billings_office():
# Call the dashboard service
result = OfficeDashboardService.get_subscriptions_data()
filters = {
'product_id': request.args.get('product_id'),
'member_id': request.args.get('member_id'),
'page': request.args.get('page', 1),
'limit': request.args.get('limit', 20)
}
result = OfficeDashboardService.get_payments_data(filters)
return jsonify(result)
#=====================================================
@api.route('/office/transaction', methods=['GET'])
# @token_required
def get_subscription_transaction_office():
# Call the dashboard service
filters = {
'product_id': request.args.get('product_id'),
'member_id': request.args.get('member_id'),
'page': request.args.get('page', 1),
'limit': request.args.get('limit', 20)
}
result = OfficeDashboardService.get_payments_data(filters)
return jsonify(result)
# =====================================================
@api.route('/web/contents', methods=['GET'])
# @token_required
def get_web_contents():
# Call the dashboard service
provision_uid = request.args.get('provision_uid')
provision_uid = request.args.get('provision_uid')
result = WebContentsService.get_web_contents_data(provision_uid)
return jsonify(result)
#=====================================================
# =====================================================
@api.route('/web/generatives', methods=['GET'])
def get_refresh_generatives():
logger.info("START TO ENTER GENERATIVE")
# Call the dashboard service
data = []
data = []
result = GenerativesService.process_generatives_list(data)
return jsonify(result)
#===================================================
# ===================================================
# Common Data
#=====================================================
# =====================================================
@api.route('/panel/common/practice', methods=['POST'])
# @token_required
def common_practice():
@@ -397,10 +449,11 @@ def common_practice():
logger.info(f"Route common Practice Data ==>>>> {data}")
response = CommonDataService.available_practices(data)
return response
# return jsonify(result)
#===================================================
# return jsonify(result)
# ===================================================
# Health Check Endpoint
@api.route("/health", methods=["GET"])
@@ -408,7 +461,6 @@ def health_check():
return {"status": "ok"}, 200
# Authorize endpoint
@api.route("/Authorize", methods=["POST"])
def authorize():