Introduced a type for connector identifications

The connector identification was previously an integer. As we noticed the code duplication caused by the same checks being done everywhere, we introduced a new type ConnectorId. This new type encapsulates this previously duplicated logic.

Besides the ConnectorId type replacing all occurrences of the integer connector identifications a type adapter was added to the JSON Operator API to automatically convert these.