As stated in the title, is there an official, or unified, definition of these terms?
First thing, 字 is 文字，用来记录语言的符号 (the script that records the language), while 词、片语、成语 belong to the language per se. This is true cross-linguistically. So there's a tendency to avoid using 单字词 and use 单音节词 instead. A lot of Chinese people confuse 字 with 单音节词 since in earlier times, most Chinese words were monosyllabic.
I don't know about the academic consensus, but《现代汉语词典》（I'm using the newest 7th edition）should be "official", if any, on Chinese Mainland, since the exams for Modern Chinese take it as the standard (together with 《新华字典》) for grade-school and college students.
片语 is not used widely and not included in the dictionary. Wikipedia says it's an alias for 词语. For simplicity I'm equating them and use 词语 in the following passages.
词 is defined as 语言里最小的、可以自由运用的单位. Let me call this 狭义词. However, throughout this dictionary, 词 is used as 狭义词+词组 （词组 is defined as 语义和语法上都能搭配的两个或更多的词的组合，口语中没有句调，书面上没有句末标点）。Let me call this 广义词. What is mostly frequently used is the meaning of 广义词. "Word" in English doesn't correspond perfectly to 词. (I think this is what caused our earlier disagreement. I'm thinking of "词" but you have "word" in mind.) For example, 词汇, literally 词的总汇, is defined as 一种语言里所使用的词和固定词组的总称. In 第3版说明， “修订后的《现代汉语词典》共收字、词6万余条”. Apparently, here 词 is used as 广义词. In 第5版说明, "调整收词". Again, here 词 is 广义词. 词 also has an even wider meaning, defined as 说话或诗歌、文章、戏剧中的语句, as in 词不达意、义正严词.
My take is that traditionally 词 has a wide scope (广义词), but recently the Chinese language has incorporated the concept of the linguistic term "word" and denotes it by 词. When talking in general contexts, the meaning of 广义词 is most likely used. When talking about linguistics, the meaning of 狭义词 should be used. However, We are so used to the meaning of 广义词 that even authority dictionary compilers sometimes use it incorrectly.
Another point also needs to be made. The linguistic definition of a word of a spoken language can be defined as the smallest sequence of phonemes that can be uttered in isolation with objective or practical meaning. This is very troublesome in Chinese. For example, 学习. 我学了游泳。我在习字。Both 学 and 习 can be used independently with the same meaning as 学习. For another, 逃跑. 我逃了。我跑了8公里。Again, both 逃 and 跑 can be used independently. However, 学习 and 逃跑 are so fixed and short that it's hard to imagine exclusion of them as 狭义词. Both of them are considered by 《现代汉语词典》as 狭义词 since it assigns them a part of speech (according to their 说明, only 狭义词 receives a part of speech).
词语 is defined as 词和词组, so it's the same as 广义词.
成语 is defined as 人们长期以来习用的、简洁精辟的定型词组或短句 (sorry for my misleading arguments in our earlier discussion). 成语 belongs to 固定词组, which belongs to 词组, which belongs to 词语, which is the same as 广义词.
四字词 is not officially defined, but 成语 belongs to 四字词, which is accepted by most, if not all. 词 is used here again as 广义词.
The definition of 成语 is also troublesome. For example, a small portion of 成语, like 稀里糊涂, only has one morpheme (糊涂 is one free morpheme, while 稀里 is meaningless), so it's a 狭义词, not a 成语 by definition. It's considered a 狭义词 by 《现代汉语词典》. Take another type of examples, the onomatopoeia 成语, like 淅淅沥沥、咕咕噜噜、窸窸窣窣、叽叽喳喳 and many more. Some of them are not included in 《现代汉语词典》 (when included, a part of speech is assigned) but all included in 《成语大词典》.
In my opinion, the linguistic concept of word has a bad application in Chinese. Even in English, there are problems too. For example, is popcorn a word? It has two free morphemes. It's just that this problem is much more severe in Chinese. It's also not that important. A contrast between 语素 and 词语 seems more relevant.
UPDATE on 兼词
兼词就是一字代表两个词的结合。（杨伯峻《古汉语语法及其发展》）. It's a combination of two words into one. The type of 兼词 that could cause problems for 狭义词 is the type that combines sounds and meanings. For example, 诸=之于，叵=不可, the meaning is a simple addition, and new sound usually takes the initial of the first and the rest from the second. And also, 甭=不用, in this case even the glyph is a simple addition.
This might not be a problem since phonemes in 兼词 are not free morphemes per se, but it does add another layer of complexity to 词.