Types of events

For analytics or errors, the widgets are set up to emit events as shown below.

These events will include various metadata, such as navigation routes and params, button IDs, error messages, etc.

These events can be listened to within the consumer device with no extra overhead, most standard events will be passed and these can be tailored if needed.

Events we can fire across the boundary include but are not limited to:

NAVIGATION
{
    "name": "navigate:indexRoute",
    "metadata": {
        "params": {},
        "route": "indexRoute"
    }
}
{
    "name": "navigate:spendingGoalsOverview",
    "metadata": {
        "route": "spendingGoalsOverview"
    }
}
{
    "name": "navigate:accountDetails",
    "metadata": {
        "params": {
            "uid": "3d108e32-898a-48c7-ac0c-40942304eed7"
        },
        "route": "accountDetails"
    }
}
{
    "name": "dismiss"
}
USER INTERACTION
{
    "name": "save-transaction",
    "metadata": {}
}

Button CTAs we only capture the navigation event atm but could be caught like so
{
		"name": "button-click",
		"metadata": {
			"data-aid": "",
		}
		
}
{
		"name": "oauth-consent",
		"metadata": {
			"provider": "obmockaspsp"
		}
}
Add,update,delete of features i.e. spending-goals
{
		"name": "spending-goal:delete",
		"metadata": {
			"id": "3d108e32-898a-48c7-ac0c-40942304eed7",?
		}
}