Inferring types for nested objects

I need help on how to setup the types for the data returned so I can get correct autocomplete:
Was this page helpful?