Pain medication at first trimester

So I just got over my first trimester, I am now 12 weeks and 5 days. But I recently had kidney stones and was on pain medication from week 10-12 (Percocet, and Tylenol with codine) for the intolerable pain! I'm so worried about the harm it did to the baby since the first trimester is the most important! Does anyone have any insight or maybe have gone thru this as well?