libfoundation: Enhancements to record type API.