In v5 existing attached companies were returned when updating a contact with client.contacts.update in updatedContact.companies.data. However this field is no longer present in the typescript type definitions. The API docs show that the field should be available though: 
This seems to be a bug in the Fern product (or configuration passed to it) that you're using to generate the type definitions.
This blocks us upgrading our intercom client to v6 as a paying customer :/