and then the snap declaration will be issued by the store team which will automatically connect your serial-port plug to the snapd:cp2102cp2109uartbrid plug when installed. I would recommend trying this out first before building a purpose built gadget as that is more maintenance than using greedy hot plugs, which were designed for this exact problem.
So this is a bit nebulous, as it depends. We don’t currently expose any of the serial port slot attributes like the path or the vendor ID/product ID, etc. so there isn’t a way for your snap to know directly what path the newly provided serial port shows up as, i.e. /dev/ttyAMA0 or /dev/ttyUSB0, etc. What you could try to do is have a post-connect-serial-port hook which just tries to read every serial port path you expect and if it is able to read/connect to one, then save that by appending to a list saved with snapctl set serial-ports=[/dev/ttyAMA0,/dev/ttyUSB0] and then your main app could read that list of serial-ports.