If the seller of the unit that you purchased failed to disclose to you that certain portions of the unit were not legal before close of escrow, you have a legal basis to file an action for costs of repair or diminution in value. I suggest that you consult further with a real estate attorney to assist you in the matter that you have written about.