I do not think, maybe I am mistaken, there is such a thing as a residence permit in TH. There are different type of visas that allows you to stay for XYZ time in Thailand, and then there is also a work permit. The permanent residency, after been working in the country and paying taxes for 3+...