From 6f4a3fc5922828693f46c9b8faccb8dad5ce8d91 Mon Sep 17 00:00:00 2001 From: mik-tf Date: Mon, 8 Sep 2025 13:16:52 -0400 Subject: [PATCH] feat: update user data with wallet transaction, activity log, and preferences --- user_data/user123_at_example_com.json | 84 ++++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 8 deletions(-) diff --git a/user_data/user123_at_example_com.json b/user_data/user123_at_example_com.json index 1c92d38..0c1be20 100644 --- a/user_data/user123_at_example_com.json +++ b/user_data/user123_at_example_com.json @@ -1,7 +1,26 @@ { "user_email": "user123@example.com", - "wallet_balance_usd": 0.0, - "transactions": [], + "wallet_balance_usd": 12.0, + "transactions": [ + { + "id": "5590075e-2ec3-4ece-b64e-2ab2bd8a4a92", + "user_id": "user123@example.com", + "transaction_type": { + "Purchase": { + "product_id": "credits" + } + }, + "amount": 12.0, + "currency": "USD", + "exchange_rate_usd": 1.0, + "amount_usd": 12.0, + "description": "Credits purchase via credit_card", + "reference_id": "5590075e-2ec3-4ece-b64e-2ab2bd8a4a92", + "metadata": null, + "timestamp": "2025-09-08T17:16:29.777650952Z", + "status": "Completed" + } + ], "staked_amount_usd": 0.0, "pool_positions": {}, "name": "user123", @@ -14,20 +33,69 @@ "availability": null, "slas": [], "apps": [], - "app_deployments": [], + "application_deployments": [], "deleted": null, "deleted_at": null, "deletion_reason": null, "nodes": [], - "farmer_earnings": [], - "farmer_settings": null, + "resource_provider_earnings": [], + "resource_provider_settings": null, "slice_products": [], - "user_activities": [], - "user_preferences": null, + "user_activities": [ + { + "id": "1db56139-8a5f-4e32-a235-c0f1bb4ab357", + "user_email": "user123@example.com", + "activity_type": "WalletTransaction", + "description": "Purchased $12 credits via credit_card", + "metadata": null, + "timestamp": "2025-09-08T17:16:29.777958164Z", + "ip_address": null, + "user_agent": null, + "session_id": null, + "importance": "Medium", + "category": "Wallet" + } + ], + "user_preferences": { + "theme": "light", + "language": "en", + "currency_display": "symbol", + "email_notifications": true, + "push_notifications": true, + "marketing_emails": false, + "data_sharing": false, + "preferred_currency": "USD", + "preferred_language": "en", + "timezone": "UTC", + "notification_settings": { + "email_enabled": true, + "push_enabled": true, + "sms_enabled": false, + "slack_webhook": null, + "discord_webhook": null, + "enabled": true, + "push": true, + "node_offline_alerts": true, + "maintenance_reminders": true, + "earnings_reports": true + }, + "privacy_settings": { + "profile_public": false, + "email_public": false, + "activity_public": false, + "stats_public": false, + "profile_visibility": "private", + "marketing_emails": false, + "data_sharing": false, + "activity_tracking": true + }, + "dashboard_layout": "default", + "last_payment_method": "credit_card" + }, "usage_statistics": null, "orders": [], "active_product_rentals": [], - "farmer_rental_earnings": [], + "resource_provider_rental_earnings": [], "node_rentals": [], "node_groups": [], "slice_rentals": [],