Where is connections for "Purchase Invoice" are defined?

When I open purchase_invoice.json file inside erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json I saw the “links” is empty. But there are lots of connections avialable in Purchase Invoice Form. Where did they came from? Where are they defined???

Connections

purchase_invoice.json

{
...
"icon": "fa fa-file-text",
 "idx": 204,
 "is_submittable": 1,
 "links": [],
 "modified": "2021-06-09 12:30:25.632109",
 "modified_by": "Administrator",
 "module": "Accounts",
 "name": "Purchase Invoice",
 "name_case": "Title Case",
 "owner": "Administrator",
 "permissions": [
...
}