Mistakely file 1040 instead of 1040NR/1040NR-EZ

I am currently in California state from October 2019 on H1B visa. This is my first visit to USA.
I have filed 1040 and 540 (by default) using turbo tax (i am not sure whether i have to file 1040NR/1040NR-EZ and 540 or 540NR). And it is accepted by IRS and CA status.
Please can you let me know whether the form which i have filed are the correct one.
And if not Please can you help me to correct the same.