Created
January 22, 2021 15:20
-
-
Save tav/915842be1439855473dccb88433db446 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const fetchMachine = Machine({ "id": "root", "states": { "Aspiration App Logic": { "id": "Aspiration App Logic", "states": {}, "on": { "open app from home screen": "#Has User Previously Logged In?" } }, "Logged Out Flow": { "id": "Logged Out Flow", "states": { "Login Error": { "id": "Login Error", "states": {}, "on": { "dismiss": "#Login Form" } }, "App Welcome Screen": { "id": "App Welcome Screen", "states": {}, "on": { "tap login": "#Is Device Authentication Set Up?", "tap sign up": "#Signup Flow" } }, "Check Authentication?": { "id": "Check Authentication?", "states": {}, "on": { "fail": "#Login Form", "pass": "#Load Account Info" } }, "Load Account Info": { "id": "Load Account Info", "states": {}, "on": { "fail": "#Login Error", "success": "#Summary View" } }, "Is Device Authentication Set Up?": { "id": "Is Device Authentication Set Up?", "states": {}, "on": { "no": "#Login Form", "yes - Face ID": "#Check Authentication?", "yes - Touch ID": "#Check Authentication?" } }, "MFA Options": { "id": "MFA Options", "states": {}, "on": { "request code via email": "#Enter MFA Code", "request code via sms": "#Enter MFA Code" } }, "Correct MFA?": { "id": "Correct MFA?", "states": {}, "on": { "false": "#Enter MFA Code", "true": "#Summary View" } }, "Has User Previously Logged In?": { "id": "Has User Previously Logged In?", "states": {}, "on": { "no": "#App Welcome Screen", "yes": "#Is Device Authentication Set Up?" } }, "Enter MFA Code": { "id": "Enter MFA Code", "states": {}, "on": { "submit": "#Correct MFA?" } }, "login successful?": { "id": "login successful?", "states": {}, "on": { "false": "#Login Error", "true": "#MFA Options" } }, "Login Form": { "id": "Login Form", "states": { "email field active": { "id": "email field active", "states": {}, "on": { "next": "#password field active" } }, "password field active": { "id": "password field active", "states": {}, "on": { "done": "#login successful?" } } }, "initial": "email field active", "on": { "dismiss": "#App Welcome Screen", "login": "#login successful?" } } }, "initial": "Has User Previously Logged In?", "on": {} }, "Tab Bar": { "id": "Tab Bar", "states": { "Summary": { "id": "Summary", "states": { "Summary View": { "id": "Summary View", "states": {}, "on": { "tap an account": "#Account Details", "tap profile image in header": "#Profile Menu Overlay" } }, "Profile Menu Overlay": { "id": "Profile Menu Overlay", "states": {}, "on": { "contact customer support": "#Customer Support", "dismiss": "#Summary", "log out": "#Login Form", "send app feedback": "#Feedback Overlay", "tap invite friends": "#Invite A Friend" } }, "Feedback Overlay": { "id": "Feedback Overlay", "states": {}, "on": { "close": "#Profile Menu Overlay", "submit": "#Feedback Sent" } }, "Feedback Sent": { "id": "Feedback Sent", "states": {}, "on": { "done": "#Profile Menu Overlay" } }, "Account Details": { "id": "Account Details", "states": {}, "on": { "pull-to-refresh": "#Account Details", "tap a transaction": "#Transaction Detail" } }, "Transaction Detail": { "id": "Transaction Detail", "states": {}, "on": { "dismiss": "#Account Details", "get help with this transaction": "#Get Help Modal" } }, "Get Help Modal": { "id": "Get Help Modal", "states": {}, "on": { "dismiss": "#Transaction Detail", "submit": "#Help Request Sent" } }, "Help Request Sent": { "id": "Help Request Sent", "states": {}, "on": { "done": "#Transaction Detail" } } }, "initial": "Summary View", "on": {} }, "Manage": { "id": "Manage", "states": { "Payments": { "id": "Payments", "states": { "Scheduled Payment List": { "id": "Scheduled Payment List", "states": {}, "on": { "Sent": "#Sent List" } }, "Sent List": { "id": "Sent List", "states": {}, "on": { "Scheduled": "#Scheduled Payment List" } } }, "initial": "Scheduled Payment List", "on": { "send a payment": "#Payment Flow" } }, "Recurring Investment Flow": { "id": "Recurring Investment Flow", "states": {} }, "Manage View": { "id": "Manage View", "states": {}, "on": { "buy sell": "#Buy Sell", "deposits": "#Deposits", "payments": "#Payments", "recurring investments": "#Recurring Investments", "transfers": "#Transfers" } }, "Payment Flow": { "id": "Payment Flow", "states": {} }, "Receipt Card": { "id": "Receipt Card", "states": {} }, "Recurring Investments": { "id": "Recurring Investments", "states": {} }, "Deposits": { "id": "Deposits", "states": { "Deposit List": { "id": "Deposit List", "states": {}, "on": { "back": "#Manage View", "deposit a check": "#Deposit Flow", "deposit record": "#Receipt Card" } }, "Deposit Flow": { "id": "Deposit Flow", "states": {}, "on": { "cancel": "#Deposit List" } } }, "initial": "Deposit List", "on": {} }, "Transfers": { "id": "Transfers", "states": { "Scheduled Transfer List": { "id": "Scheduled Transfer List", "states": {}, "on": { "History": "#History List", "back": "#Manage View", "schedule a transfer": "#Transfer Flow" } }, "History List": { "id": "History List", "states": {}, "on": { "Scheduled": "#Scheduled Transfer List", "back": "#Manage View", "schedule a transfer": "#Transfer Flow" } }, "Transfer Flow": { "id": "Transfer Flow", "states": {}, "on": { "cancel": "#Scheduled Transfer List" } } }, "initial": "Scheduled Transfer List", "on": {} }, "Buy Sell Flow": { "id": "Buy Sell Flow", "states": {} }, "Buy Sell": { "id": "Buy Sell", "states": {} } }, "initial": "Manage View", "on": {} }, "Impact": { "id": "Impact", "states": { "Current Month": { "id": "Current Month", "states": {}, "on": { "tap History tab": "#History" } }, "History": { "id": "History", "states": {}, "on": { "tap Current Month tab": "#Current Month" } }, "What is AIM?": { "id": "What is AIM?", "states": {}, "on": { "Got it": "#Impact", "Learn more on web": "#AIM Webview" } }, "AIM Webview": { "id": "AIM Webview", "states": {}, "on": { "Done": "#What is AIM?" } } }, "initial": "Current Month", "on": { "info button": "#What is AIM?" } }, "Settings": { "id": "Settings", "states": { "Settings View": { "id": "Settings View", "states": {}, "on": { "customer support": "#Customer Support", "invite a friend": "#Invite A Friend", "logout": "#Login Form" } }, "Customer Support": { "id": "Customer Support", "states": {}, "on": { "back": "#Settings View" } }, "Invite A Friend": { "id": "Invite A Friend", "states": {}, "on": { "back": "#Settings View" } } }, "initial": "Settings View", "on": {} } }, "initial": "Summary", "on": { "impact": "#Impact", "manage": "#Manage", "settings": "#Settings", "summary": "#Summary" } }, "Signup Flow": { "id": "Signup Flow", "states": {}, "on": { "dismiss": "#App Welcome Screen" } } }, "initial": "Aspiration App Logic", "on": {}}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment