It is improvised weapon damage.
The rules state you can use anything as a weapon even an person/body:
An improvised weapon includes any object you can wield in one or two hands, such as broken glass, a table leg, a frying pan, a wagon wheel, or a dead Goblin.
The damage can be determined by the following rule:
An object that bears no resemblance to a weapon deals 1d4 damage (the GM assigns a damage type appropriate to the object). If a character uses a ranged weapon to make a melee Attack, or throws a melee weapon that does not have the thrown property, it also deals 1d4 damage. An improvised thrown weapon has a normal range of 20 feet and a long range of 60 feet.
As your Gnome/Dwarf does not have the thrown property and has no resemblance to a weapon it will deal 1d4 damage and has a range of 20/60 so if your target is 30 ft. away you will be rolling your attack with disadvantage.
So for your stated case you would be rolling an STR ranged attack with disadvantage and without proficiency (except if you have improvised weapon proficiency that applies) and would do 1d4 damage.
Damage type
The rules say the GM is allowed to pick the damage type of the improvised thrown weapon. Normally i would rate a body as an object that does bludgeoning damage. If they wear very pointy/spike armor I might change it to piercing and if your projectile is on fire i might make it Fire damage.
I would also make clear that there are limits on what if possible. Hitting an enemy with a paladin does not do Radiant damage.
Beyond RAW
The above section covers rules as written on the subject but they do not fully cover this interesting corner case as they are not normally intended to handle throwing party members/enemies/hapless civilians at enemies. They fail to cover damage the projectile takes from the collision nor do they handle what happens when you drop someone/thing from high on top of someone.
Damage to projectile
The standard rules for thrown weapons do not mention they take damage from hitting the target nor are they lost after use as opposed to the rule for ammunition weapons where you only get 50% back after a battle if you look.
At the end of the battle, you can recover half your expended Ammunition by taking a minute to Search the battlefield.
I would argue that when you thrown a person he/she will take the same damage as the target as you effectively take the same impact when hitting each other.
Throwing downwards
Falling damage does not come into play as long as your target is at about the same level.
But if you are aiming at a target lower then the attacker/thrower you can consider applying the rules for falling damage. As falling damage only covers vertical distance you should only check the height difference between attacker and target.
When throwing someone down a pit at a target we can safely assume the projectile is falling down the pit and should take falling damage as normal. As calculated by the following rule
At the end of a fall, a creature takes 1d6 bludgeoning damage for every 10 feet it fell, to a maximum of 20d6.
I would argue that the target takes the same falling damage as it is takes the same impact as the projectile. But I might offer them to do a DEX safe (probably DC 15) if they are aware of the attack to half the damage.
Falling prone
As DM I would also rule that the thrown party will fall prone where it lands and that the target would have to take either a Dex save or a agility/acrobatics check or fall prone as well. This could be the same save as to reduce taken falling damage.
Missing
The rules also do not tell what happens to the projectile if the attack role misses. Depending on by how much the attack misses I would determine a point near the target where the projectile lands. And then apply any rules for that location (like falling into an acid trap or spike pit) they do not hit other creatures even when landing in their square.
Possibility/Rule of Cool
Now as a martial artist I can say that throwing a person 30 ft is not really easy/possible. Not even a small person/child. Let alone a fully decked out dwarf.
Having said that I would allow this in my game under the Rule of Cool. In a magical world where dragon born can breath fire I have no problem with the barbarian tossing the gnome rogue at someone.