Implementing linking logic for specific nodes

Hello,
I am trying to design a diagram which has 3 types of nodes: Cold, Hot, Neutral. Those types are defined in palette by a json property. In that diagram, I want to prevent linking between Cold nodes and Hot nodes yet any other combination of linking should be possible. I could not find any linking logic in documents, could you please help me for implementation?
Many thanks in advance

You want to implement linking validation: GoJS Validation -- Northwoods Software

Validation is a tough word for this job :) Thank you.