How can I get the invoicing and shipping profiles for a user? How can I get two separate profiles, one for shipping and one for invoicing? I can get the default profile for a user, but there does not appear to a type associated with it.

In Drupal 7 I could use commerce_addressbook_get_default_profile_id to get the default profile per type, but I don't see this function or an equivalent in Commerce 2.

I'm porting a custom module from a Drupal 7 online shop to a Drupal 8 online shop. This custom module synchronizes user and order data to Navision which has separate fields for shipping and invoicing.
Ideally I'd also be able to use hook_profile_update to sync the profile updates to Navision.
I ended up doing this in a roundabout way:


Get the most recent order for the user
Get the shipping and billing profile for this order


If there are no orders, the user's unlikely to have shipping and billing info