Roberto,
As Ben mentioned, the types per se are relatively straightforward to set up using the info that he linked to (especially the "Typed Variable Blocks" section). Also note that that doc page also mentions using the @blockly/plugin-typed-variable-modal , which can help if you can potentially end up with a large number of types in your app. I'll also point out that you probably want to understand the ideas behind "connection checks" in Blockly (see here), since those essentially define how Blocky does type checking (by allowing only certain blocks to connect to certain other blocks).
Note, though, that the variable blocks are only one part of the problem that I think you are trying to solve. You may also be having a little trouble figuring out how to implement the blocks that construct and reference the structured data objects that you want the types to represent. You probably also want to define blocks for those things, i.e. the equivalent in, say JavaScript, to "new PersonType()", as well as references like "myPerson.Name", "myPerson.Address", "myPerson.Address.City" and the corresponding assignments. Blockly currently doesn't define any blocks for these kind of data structures in its predefined set of blocks, so you'll have to define them yourself by creating custom blocks (see here) to correspond to things like constructors and property/field getters and setters of your new types. If it helps, I created this gist a while back that defines a set of blocks corresponding to JavaScript Objects. I'll warn you that that gist is 7 years old, so it's likely that it no longers totaly works with the latest version of Blockly, but it might give you the basic idea.
Another issue that you might face here is if you want your users to be able to define their own new types, rather than just additional ones that you provide. That, of course, will require that you create custom blocks for defining new types and their structure. You'll probably want to detect (via Blockly events) when those blocks are used and modified and dynamically create custom blocks in the Blockly toolbox for the new type's constructor, getters, setters, etc. And you'll also want to modify your typed variable modal (i.e. the plugin mentioned above) to include the new type as the potential type for your variables.
It's a bit complicated, but I suspect that others have done something similar via Blockly and if you give some more details about what blocks you want, the behavior you want, and the language that you want to generate code for, that others in this group may be able to help you with some specifics.
Hope this helps!