only add isPublic if it exists in the response
fix type hints for chaining