While there is no clear definition, it seems in most documents of international law I read, intent is the key word.
The The International Convention for the Suppression of the Financing of Terrorism (1999) defines terrorism as “any . . . act intended to cause death or serious bodily injury to a civilian, or to any other person not taking an active part in the hostilities in a situation of armed conflict, when the purpose of such act, by its nature or context, is to intimidate a population, or to compel a government or an international organization to do or to abstain from doing any act.” (Article 2.1.b)
In 2004, the Panel on Threats, Challenges, and Change on the subject issued a similar definition:
“any action . . . that is intended to cause death or serious bodily harm to civilians or non-combatants, when the purpose of such an act, by its nature or context, is to intimidate a population, or to compel a Government or an international organization to do or to abstain from doing any act” ( 164(d), p. 49).
Now, having watched the uncensored videos issued by Hamas themselves, I am fully convinced there was full intent to cause harm to civilians.
More importantly, Germany's stance on the matter is clear, and now Hamas is declared a terrorist organization (link1, link2, link3)
There seems to be a consensus that states can commit terrorist acts too. One such example cited is the assassination of Leon Trotsky by a Soviet agent. So Russia's or Israel's statehood doesn't exempt them from being labelled as countries who commit terrorist acts.
The duty to warn civilians
There is a requirement to warn of impeding attacks.
As for the Israeli response to the recent attacks by Hamas, they claim that Hamas hides behind civilians and they stockpile weapons and launch rockets from civilian areas, which makes it very challenging for the Israeli Defense forces (IDF) to avoid harming civilians. Not being a specialist in urban warfare, I'll refrain from passing judgement here, but there's at least a reasonable doubt that they target civilians on purpose, and there were efforts to warn the local population of impeding attacks.
It seems that while Hamas is not a mere terrorist organization but the de facto ruler of the Gaza Strip, running hospitals, schools and an extensive propaganda outlet, had not made similar efforts to protect their own civilians, not to say those of Israel. When the Israelis warn of bombings, Hamas usually orders their citizens not to evacuate and not to listen to 'zionist propaganda'.