The term intertextuality was introduced in the 1960s by members of the Tel Quel group, who collectively published the volume Théorie d'ensemble in 1968 . In this volume, Philippe Sollers criticises the conception of the (literary) text as something fixed and closed, and proposed the concept of intertextualité (intertextuality) :
Tout texte se situe à la jonction de plusieurs textes dont il est à la fois la relecture, l'accentuation, la condensation, le déplacement et la profondeur.
Each text is located at the confluence of several texts which it simulaneously rereads, accentuates, condenses, shifts and deepens.
Julia Kristeva applied this concept to her analysis of the medieval novel Jehan de Saintré and stated that intertextuality refers to a textual interaction inside the same text and that it allows one to grasp
les différentes séquences (ou codes) d'une structure textuelle précise comme autant de transforms de séquences (de codes) prises à d'autres textes. Ainsi la structure du roman français du xve siècle peut être considérée comme le résultat d'une transformation de plusieurs autres codes (...)
(Quoted in Encyclopædia Universalis; italics from the encylopedia)
[intertextuality allows one to graps] the different sequences (or codes) in a specific textual structure as transforms of sequences (of codes) taken from other texts. Thus, the structure of the 15th-century French novel can be seen as the outcome of a transformation of multiple other codes (...)
Cuddon (who mentions neither Bakhtin nor Sollers in the entry on "intertextuality") points out that Kristeva's concept refers to
the interdependence of any literary text with all those that have gone before it. Her contention was that a literary text is not an isolated phenomenon but is made up of a mosaic of quotations, and that any text is the "absorption and transformation of another".
Cuddon also points out that "transposition" is a Freudian concept and that for Kristeva "intertextuality" "is part of a wider psychoanalytical theory which questions the stability of the subject". This view on intertextuality is very different from that of other theorists such as Roland Barthes.
The term hypotext was introduced by Gérard Genette in his book Palimpsestes — La littérature au second degré (1982) and is one of five types of transtextualité (transtextuality). These five types of relationships between texts are the following [Gröne and Reiser, pages 212–213]:
- Intertextuality (intertextualité) refers to the "actual presence of one text in another one". This can take different shapes, for example explicit as quotations from another text, or implicit as plagiarism or allusions.
- Metatextuality (metatextuality) refers to the critical examination of another text, one might say from a metalevel.
- Hypertextuality (hypertextualité) refers to the (not explicitly stated) transformation of a hypotext, for example by reworking the same subject, reusing an existing motif or theme, or other types of transformation such as those in parodies and adaptations.
- Architextuality (architextualité) refers to literary characteristics that several texts have in common, such as genre characteristics or stylistic characteristics, which document only a very general categorisation of specific works under basic literary forms of expression.
In addition, Genette also defines paratextuality (paratextualité), which refers to the relationship between the main text and the (para)texts that "frame" it, for example, the title, the genre identification, the preface, notes, comments and the afterword. (Genette distinguishes several types of paratext; see also What is the difference between spatial and temporal paratext?)
The above shows that the hypotext does not need to be a "foundational text" in the sense of having an elevated status in a specific culture; it can be any text that chronologically precedes the "hypertext".
To answer the OP's specific questions:
"[A]re the hypotext and hypertext both forms of intertext?"
Based on Genette's concepts, the answer is "no"; hypotextuality, hypertextuality and intertextuality are distinct types of transtextuality.
"[O]r is only the hypertext a form of intertext?"
Based on Genette's concepts, the answer is again "no", for the reason given above.
(Kristeva's concept of intertextuality is broader than Genette's and might be interpreted as encompassing Genette's concept of hypertextuality. However, I would advise against mixing Kristeva's and Genette's definitions of intertextuality in this way.)
- Cuddon, J. A.: The Penguin Dictionary of Literary Terms and Literary Theory. Third edition. Penguin 1992.
- Gröne, Maximilian; Reiser, Frank: Französische Literaturwissenschaft. Eine Einführung. Fourth, revised and expanded edition. Tübingen: Narr Francke Attempto, 2017.
- Théorie de l'intertextualité, Genèse du concept in Encyclopædia Universalis.
 See the table contents of Théorie d'ensemble on Pileface, a site about Philippe Sollers. The book was published by Seuil but appears to be out of print.
 I am sceptical about Wikipedia's claim that
Julia Kristeva was the first to coin the term "intertextuality" (intertextualité) in an attempt to synthesize Ferdinand de Saussure's semiotics—his study of how signs derive their meaning within the structure of a text—with Bakhtin's dialogism—his theory which suggests a continual dialogue with other works of literature and other authors—and his examination of the multiple meanings, or "heteroglossia", in each text (especially novels) and in each word.