How to get collection type fields inside custom field settings modal?

For example i have some collection and my custom field in my plugin. I need to do something with chosen field, but first i need to get this field. I would like to get all fields and give the user possibility dynamically choose that field in custom field settings
On my screenshot its Relation field select. How i can get collection type fields (and current collection) there? Is there some events? Or i need to do something on back-end side?

This topic has been created from a Discord post (1219405593488658563) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

Presume you are looking for something like this

Nope, thats how works different part of strapi api, i need to create something like uid field where i can set name of the field and some relation

The only known way so far is to store data in customField using json, and in lifecycle map to actual relation, witch exactly a pipeline is the plug above

Sadly there is no other way to create relation from customField yet

There is a context involved witch seems not passed/available in custom fields