Most often when the transfer switch is before the original service disconnect, the ATS becomes the service disconnect and has to be service rated.
Depending on the distance from the building entry point to the ATS it may violate the "nearest to point of entry" rule. But the details of that rule (allowed feet, etc.) are set by each AHJ. The term is not defined in the NEC.
You might end up having to route the generator and service wiring outside the building directly to the generator ATS.