@studyportals/fawkes 8.0.1-0 → 8.0.1-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +1 -0
  3. package/dist/organisations-seo/index.d.ts +4 -0
  4. package/dist/organisations-seo/index.js +2 -0
  5. package/dist/programmes-seo/index.d.ts +6 -0
  6. package/dist/programmes-seo/index.js +2 -0
  7. package/dist/scholarships-seo/index.d.ts +5 -0
  8. package/dist/scholarships-seo/index.js +3 -0
  9. package/dist/sitemap-generator-seo/index.d.ts +13 -0
  10. package/dist/sitemap-generator-seo/index.js +4 -0
  11. package/dist/src/common/FilterKeyValuesMap.d.ts +2 -0
  12. package/dist/src/common/FilterKeyValuesMap.js +1 -0
  13. package/dist/src/common/IDependencies.d.ts +4 -0
  14. package/dist/src/common/IDependencies.js +1 -0
  15. package/dist/src/common/IDocumentationManager.d.ts +5 -0
  16. package/dist/src/common/IDocumentationManager.js +1 -0
  17. package/dist/src/common/IPresenter.d.ts +6 -0
  18. package/dist/src/common/IPresenter.js +1 -0
  19. package/dist/src/common/IRule.d.ts +8 -0
  20. package/dist/src/common/IRule.js +1 -0
  21. package/dist/src/common/ISearchApplicationState.d.ts +4 -0
  22. package/dist/src/common/ISearchApplicationState.js +1 -0
  23. package/dist/src/common/ISearchDependencies.d.ts +7 -0
  24. package/dist/src/common/ISearchDependencies.js +1 -0
  25. package/dist/src/common/ISearchIndexabilityManager.d.ts +4 -0
  26. package/dist/src/common/ISearchIndexabilityManager.js +1 -0
  27. package/dist/src/common/ISeoDependencies.d.ts +3 -0
  28. package/dist/src/common/ISeoDependencies.js +1 -0
  29. package/dist/src/common/ISeoFilterState.d.ts +5 -0
  30. package/dist/src/common/ISeoFilterState.js +1 -0
  31. package/dist/src/common/ISeoIndexabilityPolicy.d.ts +7 -0
  32. package/dist/src/common/ISeoIndexabilityPolicy.js +1 -0
  33. package/dist/src/common/ISeoInfoBase.d.ts +8 -0
  34. package/dist/src/common/ISeoInfoBase.js +1 -0
  35. package/dist/src/common/ISitemapDependencies.d.ts +5 -0
  36. package/dist/src/common/ISitemapDependencies.js +1 -0
  37. package/dist/src/common/ISitemapUrlGenerator.d.ts +7 -0
  38. package/dist/src/common/ISitemapUrlGenerator.js +1 -0
  39. package/dist/src/common/index.d.ts +5 -0
  40. package/dist/src/common/index.js +5 -0
  41. package/dist/src/common/policies/BaseSeoIndexabilityPolicy.d.ts +26 -0
  42. package/dist/src/common/policies/BaseSeoIndexabilityPolicy.js +56 -0
  43. package/dist/src/common/rules/BaseFilterKeyValueRule.d.ts +11 -0
  44. package/dist/src/common/rules/BaseFilterKeyValueRule.js +28 -0
  45. package/dist/src/common/rules/IndexablePageNumberRule.d.ts +9 -0
  46. package/dist/src/common/rules/IndexablePageNumberRule.js +17 -0
  47. package/dist/src/common/rules/NoFiltersSelectedRule.d.ts +9 -0
  48. package/dist/src/common/rules/NoFiltersSelectedRule.js +17 -0
  49. package/dist/src/common/rules/OnlineAttendanceRule.d.ts +6 -0
  50. package/dist/src/common/rules/OnlineAttendanceRule.js +14 -0
  51. package/dist/src/common/rules/OnlyFiltersSelectedRule.d.ts +12 -0
  52. package/dist/src/common/rules/OnlyFiltersSelectedRule.js +30 -0
  53. package/dist/src/common/rules/SingleValueSelectedForFilterRule.d.ts +12 -0
  54. package/dist/src/common/rules/SingleValueSelectedForFilterRule.js +24 -0
  55. package/dist/src/enums/DependencyTypes.d.ts +4 -0
  56. package/dist/src/enums/DependencyTypes.js +5 -0
  57. package/dist/src/enums/FilterCombinations.d.ts +52 -0
  58. package/dist/src/enums/FilterCombinations.js +53 -0
  59. package/dist/src/enums/SortingOptions.d.ts +4 -0
  60. package/dist/src/enums/SortingOptions.js +5 -0
  61. package/dist/src/errors/DependencyMissingError.d.ts +3 -0
  62. package/dist/src/errors/DependencyMissingError.js +5 -0
  63. package/dist/src/errors/InvalidDependencyTypeError.d.ts +3 -0
  64. package/dist/src/errors/InvalidDependencyTypeError.js +5 -0
  65. package/dist/src/errors/InvalidFilterValueError.d.ts +4 -0
  66. package/dist/src/errors/InvalidFilterValueError.js +5 -0
  67. package/dist/src/organisations/IOrganisationSearchApplicationState.d.ts +5 -0
  68. package/dist/src/organisations/IOrganisationSearchApplicationState.js +1 -0
  69. package/dist/src/organisations/ISeoSortingState.d.ts +4 -0
  70. package/dist/src/organisations/ISeoSortingState.js +1 -0
  71. package/dist/src/organisations/SearchIndexabilityManager.d.ts +12 -0
  72. package/dist/src/organisations/SearchIndexabilityManager.js +42 -0
  73. package/dist/src/organisations/index.d.ts +4 -0
  74. package/dist/src/organisations/index.js +4 -0
  75. package/dist/src/organisations/policies/OrganisationsSeoIndexabilityPolicy.d.ts +19 -0
  76. package/dist/src/organisations/policies/OrganisationsSeoIndexabilityPolicy.js +49 -0
  77. package/dist/src/organisations/policies/RankedOrganisationsSeoIndexabilityPolicy.d.ts +9 -0
  78. package/dist/src/organisations/policies/RankedOrganisationsSeoIndexabilityPolicy.js +22 -0
  79. package/dist/src/organisations/policies/index.d.ts +18 -0
  80. package/dist/src/organisations/policies/index.js +18 -0
  81. package/dist/src/organisations/policies/our-picks/Area.d.ts +13 -0
  82. package/dist/src/organisations/policies/our-picks/Area.js +35 -0
  83. package/dist/src/organisations/policies/our-picks/AreaAttendance.d.ts +15 -0
  84. package/dist/src/organisations/policies/our-picks/AreaAttendance.js +45 -0
  85. package/dist/src/organisations/policies/our-picks/Attendance.d.ts +14 -0
  86. package/dist/src/organisations/policies/our-picks/Attendance.js +33 -0
  87. package/dist/src/organisations/policies/our-picks/Continent.d.ts +13 -0
  88. package/dist/src/organisations/policies/our-picks/Continent.js +31 -0
  89. package/dist/src/organisations/policies/our-picks/Country.d.ts +13 -0
  90. package/dist/src/organisations/policies/our-picks/Country.js +28 -0
  91. package/dist/src/organisations/policies/our-picks/CountryAttendance.d.ts +15 -0
  92. package/dist/src/organisations/policies/our-picks/CountryAttendance.js +43 -0
  93. package/dist/src/organisations/policies/our-picks/Unfiltered.d.ts +12 -0
  94. package/dist/src/organisations/policies/our-picks/Unfiltered.js +16 -0
  95. package/dist/src/organisations/policies/ranked/RankedArea.d.ts +13 -0
  96. package/dist/src/organisations/policies/ranked/RankedArea.js +36 -0
  97. package/dist/src/organisations/policies/ranked/RankedAreaDiscipline.d.ts +14 -0
  98. package/dist/src/organisations/policies/ranked/RankedAreaDiscipline.js +44 -0
  99. package/dist/src/organisations/policies/ranked/RankedAttendance.d.ts +14 -0
  100. package/dist/src/organisations/policies/ranked/RankedAttendance.js +34 -0
  101. package/dist/src/organisations/policies/ranked/RankedAttendanceDiscipline.d.ts +14 -0
  102. package/dist/src/organisations/policies/ranked/RankedAttendanceDiscipline.js +42 -0
  103. package/dist/src/organisations/policies/ranked/RankedContinent.d.ts +13 -0
  104. package/dist/src/organisations/policies/ranked/RankedContinent.js +32 -0
  105. package/dist/src/organisations/policies/ranked/RankedContinentAttendance.d.ts +15 -0
  106. package/dist/src/organisations/policies/ranked/RankedContinentAttendance.js +44 -0
  107. package/dist/src/organisations/policies/ranked/RankedCountry.d.ts +13 -0
  108. package/dist/src/organisations/policies/ranked/RankedCountry.js +29 -0
  109. package/dist/src/organisations/policies/ranked/RankedCountryAttendance.d.ts +14 -0
  110. package/dist/src/organisations/policies/ranked/RankedCountryAttendance.js +42 -0
  111. package/dist/src/organisations/policies/ranked/RankedCountryDiscipline.d.ts +13 -0
  112. package/dist/src/organisations/policies/ranked/RankedCountryDiscipline.js +40 -0
  113. package/dist/src/organisations/policies/ranked/RankedDiscipline.d.ts +13 -0
  114. package/dist/src/organisations/policies/ranked/RankedDiscipline.js +32 -0
  115. package/dist/src/organisations/policies/ranked/RankedUnfiltered.d.ts +12 -0
  116. package/dist/src/organisations/policies/ranked/RankedUnfiltered.js +21 -0
  117. package/dist/src/organisations/rules/AtLeastSevenResultsRule.d.ts +15 -0
  118. package/dist/src/organisations/rules/AtLeastSevenResultsRule.js +30 -0
  119. package/dist/src/organisations/rules/AtLeastTwoRankedResultsRule.d.ts +13 -0
  120. package/dist/src/organisations/rules/AtLeastTwoRankedResultsRule.js +26 -0
  121. package/dist/src/organisations/rules/BaseSearchVolumeOrganisationsRule.d.ts +14 -0
  122. package/dist/src/organisations/rules/BaseSearchVolumeOrganisationsRule.js +33 -0
  123. package/dist/src/organisations/rules/ContinentIsEuropeRule.d.ts +6 -0
  124. package/dist/src/organisations/rules/ContinentIsEuropeRule.js +15 -0
  125. package/dist/src/organisations/rules/NoFiltersSelectedRule.d.ts +9 -0
  126. package/dist/src/organisations/rules/NoFiltersSelectedRule.js +17 -0
  127. package/dist/src/organisations/rules/SearchVolumeAreasAttendanceRule.d.ts +6 -0
  128. package/dist/src/organisations/rules/SearchVolumeAreasAttendanceRule.js +17 -0
  129. package/dist/src/organisations/rules/SearchVolumeAreasDisciplineRule.d.ts +6 -0
  130. package/dist/src/organisations/rules/SearchVolumeAreasDisciplineRule.js +18 -0
  131. package/dist/src/organisations/rules/SearchVolumeCountriesAttendanceRule.d.ts +6 -0
  132. package/dist/src/organisations/rules/SearchVolumeCountriesAttendanceRule.js +17 -0
  133. package/dist/src/organisations/types/IOrganisationSearchDependencies.d.ts +9 -0
  134. package/dist/src/organisations/types/IOrganisationSearchDependencies.js +1 -0
  135. package/dist/src/organisations/types/IOrganisationsSeoDependencies.d.ts +3 -0
  136. package/dist/src/organisations/types/IOrganisationsSeoDependencies.js +1 -0
  137. package/dist/src/organisations/types/IOrganisationsSitemapDependencies.d.ts +9 -0
  138. package/dist/src/organisations/types/IOrganisationsSitemapDependencies.js +1 -0
  139. package/dist/src/organisations/types.d.ts +6 -0
  140. package/dist/src/organisations/types.js +6 -0
  141. package/dist/src/presenters/AreaPresenter.d.ts +12 -0
  142. package/dist/src/presenters/AreaPresenter.js +35 -0
  143. package/dist/src/presenters/AttendancePresenter.d.ts +11 -0
  144. package/dist/src/presenters/AttendancePresenter.js +23 -0
  145. package/dist/src/presenters/ContinentPresenter.d.ts +12 -0
  146. package/dist/src/presenters/ContinentPresenter.js +33 -0
  147. package/dist/src/presenters/CountryPresenter.d.ts +12 -0
  148. package/dist/src/presenters/CountryPresenter.js +38 -0
  149. package/dist/src/presenters/DegreePresenter.d.ts +12 -0
  150. package/dist/src/presenters/DegreePresenter.js +50 -0
  151. package/dist/src/presenters/DisciplinePresenter.d.ts +12 -0
  152. package/dist/src/presenters/DisciplinePresenter.js +33 -0
  153. package/dist/src/presenters/DurationPresenter.d.ts +15 -0
  154. package/dist/src/presenters/DurationPresenter.js +47 -0
  155. package/dist/src/presenters/EducationalFormPresenter.d.ts +12 -0
  156. package/dist/src/presenters/EducationalFormPresenter.js +45 -0
  157. package/dist/src/presenters/FormatPresenter.d.ts +11 -0
  158. package/dist/src/presenters/FormatPresenter.js +24 -0
  159. package/dist/src/presenters/SpecialProgrammesPresenter.d.ts +11 -0
  160. package/dist/src/presenters/SpecialProgrammesPresenter.js +27 -0
  161. package/dist/src/presenters/TuitionFeePresenter.d.ts +11 -0
  162. package/dist/src/presenters/TuitionFeePresenter.js +23 -0
  163. package/dist/src/presenters/fragments/IAreaFragment.d.ts +4 -0
  164. package/dist/src/presenters/fragments/IAreaFragment.js +1 -0
  165. package/dist/src/presenters/fragments/ICountryFragment.d.ts +4 -0
  166. package/dist/src/presenters/fragments/ICountryFragment.js +1 -0
  167. package/dist/src/presenters/fragments/IFragment.d.ts +4 -0
  168. package/dist/src/presenters/fragments/IFragment.js +1 -0
  169. package/dist/src/programmes/BaseProgrammeFilterKeyValueRule.d.ts +6 -0
  170. package/dist/src/programmes/BaseProgrammeFilterKeyValueRule.js +6 -0
  171. package/dist/src/programmes/BaseProgrammeRule.d.ts +10 -0
  172. package/dist/src/programmes/BaseProgrammeRule.js +5 -0
  173. package/dist/src/programmes/IProgrammeRule.d.ts +5 -0
  174. package/dist/src/programmes/IProgrammeRule.js +1 -0
  175. package/dist/src/programmes/ProgrammesBaseIndexabilityPolicy.d.ts +15 -0
  176. package/dist/src/programmes/ProgrammesBaseIndexabilityPolicy.js +42 -0
  177. package/dist/src/programmes/SearchIndexabilityManager.d.ts +12 -0
  178. package/dist/src/programmes/SearchIndexabilityManager.js +58 -0
  179. package/dist/src/programmes/policies/Area.d.ts +15 -0
  180. package/dist/src/programmes/policies/Area.js +40 -0
  181. package/dist/src/programmes/policies/Attendance.d.ts +16 -0
  182. package/dist/src/programmes/policies/Attendance.js +38 -0
  183. package/dist/src/programmes/policies/AttendanceDegree.d.ts +17 -0
  184. package/dist/src/programmes/policies/AttendanceDegree.js +48 -0
  185. package/dist/src/programmes/policies/Continent.d.ts +15 -0
  186. package/dist/src/programmes/policies/Continent.js +36 -0
  187. package/dist/src/programmes/policies/ContinentTuitionFee.d.ts +16 -0
  188. package/dist/src/programmes/policies/ContinentTuitionFee.js +46 -0
  189. package/dist/src/programmes/policies/Country.d.ts +15 -0
  190. package/dist/src/programmes/policies/Country.js +33 -0
  191. package/dist/src/programmes/policies/CountryAttendance.d.ts +16 -0
  192. package/dist/src/programmes/policies/CountryAttendance.js +46 -0
  193. package/dist/src/programmes/policies/CountryAttendanceDegree.d.ts +17 -0
  194. package/dist/src/programmes/policies/CountryAttendanceDegree.js +55 -0
  195. package/dist/src/programmes/policies/CountryDegree.d.ts +16 -0
  196. package/dist/src/programmes/policies/CountryDegree.js +46 -0
  197. package/dist/src/programmes/policies/CountryDuration.d.ts +16 -0
  198. package/dist/src/programmes/policies/CountryDuration.js +46 -0
  199. package/dist/src/programmes/policies/CountryDurationDegree.d.ts +17 -0
  200. package/dist/src/programmes/policies/CountryDurationDegree.js +55 -0
  201. package/dist/src/programmes/policies/CountryEducationalForm.d.ts +16 -0
  202. package/dist/src/programmes/policies/CountryEducationalForm.js +47 -0
  203. package/dist/src/programmes/policies/CountryFormat.d.ts +16 -0
  204. package/dist/src/programmes/policies/CountryFormat.js +46 -0
  205. package/dist/src/programmes/policies/CountryTuitionFee.d.ts +16 -0
  206. package/dist/src/programmes/policies/CountryTuitionFee.js +46 -0
  207. package/dist/src/programmes/policies/Degree.d.ts +15 -0
  208. package/dist/src/programmes/policies/Degree.js +38 -0
  209. package/dist/src/programmes/policies/DegreeAttendanceDiscipline.d.ts +16 -0
  210. package/dist/src/programmes/policies/DegreeAttendanceDiscipline.js +63 -0
  211. package/dist/src/programmes/policies/DegreeCountryAttendance.d.ts +16 -0
  212. package/dist/src/programmes/policies/DegreeCountryAttendance.js +88 -0
  213. package/dist/src/programmes/policies/DegreeCountryDiscipline.d.ts +16 -0
  214. package/dist/src/programmes/policies/DegreeCountryDiscipline.js +71 -0
  215. package/dist/src/programmes/policies/DegreeCountryTuitionFee.d.ts +16 -0
  216. package/dist/src/programmes/policies/DegreeCountryTuitionFee.js +73 -0
  217. package/dist/src/programmes/policies/Discipline.d.ts +15 -0
  218. package/dist/src/programmes/policies/Discipline.js +36 -0
  219. package/dist/src/programmes/policies/DisciplineArea.d.ts +15 -0
  220. package/dist/src/programmes/policies/DisciplineArea.js +46 -0
  221. package/dist/src/programmes/policies/DisciplineAttendance.d.ts +16 -0
  222. package/dist/src/programmes/policies/DisciplineAttendance.js +46 -0
  223. package/dist/src/programmes/policies/DisciplineContinent.d.ts +15 -0
  224. package/dist/src/programmes/policies/DisciplineContinent.js +44 -0
  225. package/dist/src/programmes/policies/DisciplineCountry.d.ts +15 -0
  226. package/dist/src/programmes/policies/DisciplineCountry.js +44 -0
  227. package/dist/src/programmes/policies/DisciplineCountryEducationalForm.d.ts +16 -0
  228. package/dist/src/programmes/policies/DisciplineCountryEducationalForm.js +53 -0
  229. package/dist/src/programmes/policies/DisciplineDegree.d.ts +16 -0
  230. package/dist/src/programmes/policies/DisciplineDegree.js +46 -0
  231. package/dist/src/programmes/policies/DisciplineDuration.d.ts +16 -0
  232. package/dist/src/programmes/policies/DisciplineDuration.js +46 -0
  233. package/dist/src/programmes/policies/DisciplineEducationalForm.d.ts +16 -0
  234. package/dist/src/programmes/policies/DisciplineEducationalForm.js +47 -0
  235. package/dist/src/programmes/policies/DisciplineFormat.d.ts +16 -0
  236. package/dist/src/programmes/policies/DisciplineFormat.js +46 -0
  237. package/dist/src/programmes/policies/DisciplineTuitionFee.d.ts +16 -0
  238. package/dist/src/programmes/policies/DisciplineTuitionFee.js +46 -0
  239. package/dist/src/programmes/policies/DisciplineTuitionFeeAttendance.d.ts +17 -0
  240. package/dist/src/programmes/policies/DisciplineTuitionFeeAttendance.js +54 -0
  241. package/dist/src/programmes/policies/SpecialProgrammes.d.ts +16 -0
  242. package/dist/src/programmes/policies/SpecialProgrammes.js +38 -0
  243. package/dist/src/programmes/policies/TuitionFee.d.ts +15 -0
  244. package/dist/src/programmes/policies/TuitionFee.js +32 -0
  245. package/dist/src/programmes/policies/Unfiltered.d.ts +13 -0
  246. package/dist/src/programmes/policies/Unfiltered.js +19 -0
  247. package/dist/src/programmes/policies/index.d.ts +34 -0
  248. package/dist/src/programmes/policies/index.js +34 -0
  249. package/dist/src/programmes/rules/AffordableTuitionFeeRule.d.ts +6 -0
  250. package/dist/src/programmes/rules/AffordableTuitionFeeRule.js +17 -0
  251. package/dist/src/programmes/rules/AtLeastSevenResultsRule.d.ts +15 -0
  252. package/dist/src/programmes/rules/AtLeastSevenResultsRule.js +30 -0
  253. package/dist/src/programmes/rules/DegreeAttendanceDisciplineRule.d.ts +11 -0
  254. package/dist/src/programmes/rules/DegreeAttendanceDisciplineRule.js +44 -0
  255. package/dist/src/programmes/rules/DegreeAttendanceDisciplineSpecificRule.d.ts +11 -0
  256. package/dist/src/programmes/rules/DegreeAttendanceDisciplineSpecificRule.js +39 -0
  257. package/dist/src/programmes/rules/DegreeCountryAttendanceSpecificRule.d.ts +14 -0
  258. package/dist/src/programmes/rules/DegreeCountryAttendanceSpecificRule.js +76 -0
  259. package/dist/src/programmes/rules/DegreeCountryDisciplineSpecificRule.d.ts +11 -0
  260. package/dist/src/programmes/rules/DegreeCountryDisciplineSpecificRule.js +76 -0
  261. package/dist/src/programmes/rules/DegreeCountryTuitionFeeSpecificRule.d.ts +12 -0
  262. package/dist/src/programmes/rules/DegreeCountryTuitionFeeSpecificRule.js +62 -0
  263. package/dist/src/programmes/rules/DegreeDisciplineRule.d.ts +16 -0
  264. package/dist/src/programmes/rules/DegreeDisciplineRule.js +189 -0
  265. package/dist/src/programmes/rules/ErasmusOrJointSpecialProgrammesRule.d.ts +9 -0
  266. package/dist/src/programmes/rules/ErasmusOrJointSpecialProgrammesRule.js +28 -0
  267. package/dist/src/programmes/rules/IndexableDegreeRule.d.ts +10 -0
  268. package/dist/src/programmes/rules/IndexableDegreeRule.js +53 -0
  269. package/dist/src/programmes/rules/IndexableDurationRule.d.ts +12 -0
  270. package/dist/src/programmes/rules/IndexableDurationRule.js +37 -0
  271. package/dist/src/programmes/rules/IndexableEducationalFormRule.d.ts +10 -0
  272. package/dist/src/programmes/rules/IndexableEducationalFormRule.js +34 -0
  273. package/dist/src/programmes/rules/IndexablePageNumberRule.d.ts +9 -0
  274. package/dist/src/programmes/rules/IndexablePageNumberRule.js +17 -0
  275. package/dist/src/programmes/rules/MbaDegreeRule.d.ts +6 -0
  276. package/dist/src/programmes/rules/MbaDegreeRule.js +15 -0
  277. package/dist/src/programmes/rules/MbaOrMscDegreeRule.d.ts +9 -0
  278. package/dist/src/programmes/rules/MbaOrMscDegreeRule.js +26 -0
  279. package/dist/src/programmes/rules/NotDistanceLearningPortalRule.d.ts +11 -0
  280. package/dist/src/programmes/rules/NotDistanceLearningPortalRule.js +28 -0
  281. package/dist/src/programmes/rules/OneYearDurationRule.d.ts +6 -0
  282. package/dist/src/programmes/rules/OneYearDurationRule.js +15 -0
  283. package/dist/src/programmes/rules/PartTimeFormatRule.d.ts +6 -0
  284. package/dist/src/programmes/rules/PartTimeFormatRule.js +15 -0
  285. package/dist/src/programmes/types/IProgrammeSearchApplicationState.d.ts +4 -0
  286. package/dist/src/programmes/types/IProgrammeSearchApplicationState.js +1 -0
  287. package/dist/src/programmes/types/IProgrammeSearchDependencies.d.ts +7 -0
  288. package/dist/src/programmes/types/IProgrammeSearchDependencies.js +1 -0
  289. package/dist/src/programmes/types/IProgrammeSearchSitemapDependencies.d.ts +5 -0
  290. package/dist/src/programmes/types/IProgrammeSearchSitemapDependencies.js +1 -0
  291. package/dist/src/programmes/types/IProgrammeSeoDependencies.d.ts +3 -0
  292. package/dist/src/programmes/types/IProgrammeSeoDependencies.js +1 -0
  293. package/dist/src/programmes/types/IProgrammeSitemapDependencies.d.ts +7 -0
  294. package/dist/src/programmes/types/IProgrammeSitemapDependencies.js +1 -0
  295. package/dist/src/programmes/types/IProgrammeSitemapUrlGenerator.d.ts +5 -0
  296. package/dist/src/programmes/types/IProgrammeSitemapUrlGenerator.js +1 -0
  297. package/dist/src/scholarships/SearchIndexabilityManager.d.ts +11 -0
  298. package/dist/src/scholarships/SearchIndexabilityManager.js +33 -0
  299. package/dist/src/scholarships/index.d.ts +3 -0
  300. package/dist/src/scholarships/index.js +3 -0
  301. package/dist/src/scholarships/policies/Area.d.ts +13 -0
  302. package/dist/src/scholarships/policies/Area.js +37 -0
  303. package/dist/src/scholarships/policies/Country.d.ts +12 -0
  304. package/dist/src/scholarships/policies/Country.js +31 -0
  305. package/dist/src/scholarships/policies/Discipline.d.ts +12 -0
  306. package/dist/src/scholarships/policies/Discipline.js +31 -0
  307. package/dist/src/scholarships/policies/DisciplineCountry.d.ts +12 -0
  308. package/dist/src/scholarships/policies/DisciplineCountry.js +39 -0
  309. package/dist/src/scholarships/policies/ScholarshipSeoIndexabilityPolicy.d.ts +7 -0
  310. package/dist/src/scholarships/policies/ScholarshipSeoIndexabilityPolicy.js +7 -0
  311. package/dist/src/scholarships/policies/Unfiltered.d.ts +10 -0
  312. package/dist/src/scholarships/policies/Unfiltered.js +16 -0
  313. package/dist/src/scholarships/policies/UniversityCountry.d.ts +11 -0
  314. package/dist/src/scholarships/policies/UniversityCountry.js +41 -0
  315. package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.d.ts +14 -0
  316. package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.js +42 -0
  317. package/dist/src/scholarships/rules/SearchVolumeAreasRule.d.ts +12 -0
  318. package/dist/src/scholarships/rules/SearchVolumeAreasRule.js +32 -0
  319. package/dist/src/scholarships/rules/SearchVolumeCountriesDisciplinesRule.d.ts +14 -0
  320. package/dist/src/scholarships/rules/SearchVolumeCountriesDisciplinesRule.js +43 -0
  321. package/dist/src/scholarships/rules/SearchVolumeCountriesRule.d.ts +12 -0
  322. package/dist/src/scholarships/rules/SearchVolumeCountriesRule.js +32 -0
  323. package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.d.ts +12 -0
  324. package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.js +32 -0
  325. package/dist/src/scholarships/rules/files/search-volume.json +39334 -0
  326. package/dist/src/scholarships/types/IScholarshipSeoDependencies.d.ts +3 -0
  327. package/dist/src/scholarships/types/IScholarshipSeoDependencies.js +1 -0
  328. package/dist/src/scholarships/types/IScholarshipSitemapDependencies.d.ts +5 -0
  329. package/dist/src/scholarships/types/IScholarshipSitemapDependencies.js +1 -0
  330. package/dist/src/scholarships/types.d.ts +5 -0
  331. package/dist/src/scholarships/types.js +5 -0
  332. package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.d.ts +14 -0
  333. package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.js +26 -0
  334. package/dist/src/sitemap-generator/IOrganisation.d.ts +6 -0
  335. package/dist/src/sitemap-generator/IOrganisation.js +1 -0
  336. package/dist/src/sitemap-generator/IOrganisationsClient.d.ts +4 -0
  337. package/dist/src/sitemap-generator/IOrganisationsClient.js +1 -0
  338. package/dist/src/sitemap-generator/IRankingApiClient.d.ts +4 -0
  339. package/dist/src/sitemap-generator/IRankingApiClient.js +1 -0
  340. package/dist/src/sitemap-generator/ISearchApiClient.d.ts +5 -0
  341. package/dist/src/sitemap-generator/ISearchApiClient.js +1 -0
  342. package/dist/src/sitemap-generator/ISitemapUrlGeneratorManager.d.ts +9 -0
  343. package/dist/src/sitemap-generator/ISitemapUrlGeneratorManager.js +1 -0
  344. package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.d.ts +14 -0
  345. package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.js +51 -0
  346. package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.d.ts +12 -0
  347. package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.js +77 -0
  348. package/dist/src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.d.ts +9 -0
  349. package/dist/src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.js +28 -0
  350. package/dist/src/sitemap-generator/index.d.ts +0 -0
  351. package/dist/src/sitemap-generator/index.js +1 -0
  352. package/dist/src/structured-data/ProgrammeStructuredDataFactory.d.ts +18 -0
  353. package/dist/src/structured-data/ProgrammeStructuredDataFactory.js +91 -0
  354. package/dist/src/structured-data/SearchStructuredDataFactory.d.ts +34 -0
  355. package/dist/src/structured-data/SearchStructuredDataFactory.js +144 -0
  356. package/dist/src/structured-data/dto/BreadcrumbDTO.d.ts +5 -0
  357. package/dist/src/structured-data/dto/BreadcrumbDTO.js +1 -0
  358. package/dist/src/structured-data/dto/EntityDTO.d.ts +7 -0
  359. package/dist/src/structured-data/dto/EntityDTO.js +1 -0
  360. package/dist/src/structured-data/dto/FAQItemDto.d.ts +4 -0
  361. package/dist/src/structured-data/dto/FAQItemDto.js +1 -0
  362. package/dist/src/structured-data/dto/OfferDTO.d.ts +5 -0
  363. package/dist/src/structured-data/dto/OfferDTO.js +1 -0
  364. package/dist/src/structured-data/dto/ReviewRatingDTO.d.ts +4 -0
  365. package/dist/src/structured-data/dto/ReviewRatingDTO.js +1 -0
  366. package/dist/src/structured-data/dto/index.d.ts +5 -0
  367. package/dist/src/structured-data/dto/index.js +5 -0
  368. package/dist/src/structured-data/index.d.ts +2 -0
  369. package/dist/src/structured-data/index.js +2 -0
  370. package/dist/src/structured-data/interface/StructuredDataCurrencyConversionService.d.ts +3 -0
  371. package/dist/src/structured-data/interface/StructuredDataCurrencyConversionService.js +1 -0
  372. package/dist/structured-data-seo/index.d.ts +1 -0
  373. package/dist/structured-data-seo/index.js +1 -0
  374. package/package.json +3 -3
@@ -0,0 +1,3 @@
1
+ import { ISearchDependencies } from '../../common/ISearchDependencies';
2
+ import { IScholarshipSitemapDependencies } from './IScholarshipSitemapDependencies';
3
+ export type IScholarshipSeoDependencies = ISearchDependencies | IScholarshipSitemapDependencies;
@@ -0,0 +1,5 @@
1
+ import { ISitemapDependencies } from '../../common/ISitemapDependencies';
2
+ import { IOrganisationsClient } from '../../sitemap-generator/IOrganisationsClient';
3
+ export interface IScholarshipSitemapDependencies extends ISitemapDependencies {
4
+ organisationsClient: IOrganisationsClient;
5
+ }
@@ -0,0 +1,5 @@
1
+ export declare const types: {
2
+ SeoInfoBase: symbol;
3
+ SeoFilterState: symbol;
4
+ SeoApplicationState: symbol;
5
+ };
@@ -0,0 +1,5 @@
1
+ export const types = {
2
+ SeoInfoBase: Symbol.for('ISeoInfoBase'),
3
+ SeoFilterState: Symbol.for('ISeoFilterState'),
4
+ SeoApplicationState: Symbol.for('ISearchApplicationState')
5
+ };
@@ -0,0 +1,14 @@
1
+ import { ISitemapUrlGenerator } from '../common/ISitemapUrlGenerator';
2
+ import { ISitemapUrlGeneratorManager } from './ISitemapUrlGeneratorManager';
3
+ import { FilterCombinations } from '../enums/FilterCombinations';
4
+ import { IPresenter } from '../common';
5
+ import { FilterKey } from '@studyportals/search-filters';
6
+ export declare abstract class BaseSitemapUrlGeneratorManager implements ISitemapUrlGeneratorManager {
7
+ abstract readonly policies: ISitemapUrlGenerator[];
8
+ abstract readonly presenters: Map<FilterKey, IPresenter>;
9
+ protected readonly filterKeyValueCounts: Map<FilterKey, number>;
10
+ generateUrls(): Promise<Map<FilterCombinations, string[]>>;
11
+ getFilterKeyValueCounts(): Map<FilterKey, number>;
12
+ protected setFilterKeyValueCounts(): void;
13
+ getPolicies(): ISitemapUrlGenerator[];
14
+ }
@@ -0,0 +1,26 @@
1
+ export class BaseSitemapUrlGeneratorManager {
2
+ filterKeyValueCounts = new Map();
3
+ async generateUrls() {
4
+ const map = new Map();
5
+ for (const policy of this.policies) {
6
+ console.debug(`Generating sitemap urls for policy: ${policy.filterCombination}`); // eslint-disable-line no-console
7
+ const filterCombination = policy.filterCombination;
8
+ const urls = await policy.generateSitemapUrls();
9
+ console.debug(`Generated ${urls.length} urls for policy: ${filterCombination}`); // eslint-disable-line no-console
10
+ map.set(filterCombination, urls);
11
+ }
12
+ return map;
13
+ }
14
+ getFilterKeyValueCounts() {
15
+ return this.filterKeyValueCounts;
16
+ }
17
+ setFilterKeyValueCounts() {
18
+ for (const presenter of this.presenters.values()) {
19
+ const count = presenter.getFragments().length;
20
+ this.filterKeyValueCounts.set(presenter.filterKey, count);
21
+ }
22
+ }
23
+ getPolicies() {
24
+ return this.policies;
25
+ }
26
+ }
@@ -0,0 +1,6 @@
1
+ export interface IOrganisation {
2
+ readonly id: number;
3
+ readonly name: string;
4
+ readonly virtualPath: string;
5
+ readonly countryIsoCodes: string[];
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { IOrganisation } from './IOrganisation';
2
+ export interface IOrganisationsClient {
3
+ getOrganisations(ids: number[]): Promise<IOrganisation[]>;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { FilterKeyValuesMap } from '../common/FilterKeyValuesMap';
2
+ export interface IRankingApiClient {
3
+ getRankedOrganisationCount(filterKeyValues: FilterKeyValuesMap): Promise<number>;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { FilterKeyValuesMap } from '../common/FilterKeyValuesMap';
2
+ export interface ISearchApiClient {
3
+ getOrganisationIds(): Promise<number[]>;
4
+ getCount(filterKeyValues: FilterKeyValuesMap): Promise<number>;
5
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import { IDocumentationManager } from '../common/IDocumentationManager';
2
+ import { FilterCombinations } from '../enums/FilterCombinations';
3
+ import { IPresenter } from '../common';
4
+ import { FilterKey } from '@studyportals/search-filters';
5
+ export interface ISitemapUrlGeneratorManager extends IDocumentationManager {
6
+ readonly presenters: Map<FilterKey, IPresenter>;
7
+ generateUrls(): Promise<Map<FilterCombinations, string[]>>;
8
+ getFilterKeyValueCounts(): Map<FilterKey, number>;
9
+ }
@@ -0,0 +1,14 @@
1
+ import { ISitemapUrlGenerator } from '../common/ISitemapUrlGenerator';
2
+ import { IOrganisationsClient } from '../sitemap-generator/IOrganisationsClient';
3
+ import { ISearchApiClient } from '../sitemap-generator/ISearchApiClient';
4
+ import { BaseSitemapUrlGeneratorManager } from './BaseSitemapUrlGeneratorManager';
5
+ import { PortalType } from '@studyportals/domain-client';
6
+ import { IRankingApiClient } from './IRankingApiClient';
7
+ import { FilterKey } from '@studyportals/search-filters';
8
+ import { IPresenter } from '../common';
9
+ export declare class OrganisationsSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
10
+ readonly portalType: PortalType;
11
+ readonly policies: ISitemapUrlGenerator[];
12
+ readonly presenters: Map<FilterKey, IPresenter>;
13
+ constructor(portalType: PortalType, searchApiClient: ISearchApiClient, organisationsClient: IOrganisationsClient, rankingApiClient: IRankingApiClient);
14
+ }
@@ -0,0 +1,51 @@
1
+ import { DependencyTypes } from '../enums/DependencyTypes';
2
+ import { BaseSitemapUrlGeneratorManager } from './BaseSitemapUrlGeneratorManager';
3
+ import { Area, AreaAttendance, Attendance, Continent, Country, CountryAttendance, RankedArea, RankedAreaDiscipline, RankedAttendance, RankedAttendanceDiscipline, RankedContinent, RankedContinentAttendance, RankedCountry, RankedCountryAttendance, RankedCountryDiscipline, RankedDiscipline, RankedUnfiltered, Unfiltered } from '../organisations/policies';
4
+ import { AreaPresenter } from '../presenters/AreaPresenter';
5
+ import { AttendancePresenter } from '../presenters/AttendancePresenter';
6
+ import { ContinentPresenter } from '../presenters/ContinentPresenter';
7
+ import { CountryPresenter } from '../presenters/CountryPresenter';
8
+ import { DisciplinePresenter } from '../presenters/DisciplinePresenter';
9
+ import { FilterKey } from '@studyportals/search-filters';
10
+ export class OrganisationsSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
11
+ portalType;
12
+ policies;
13
+ presenters = new Map();
14
+ constructor(portalType, searchApiClient, organisationsClient, rankingApiClient) {
15
+ super();
16
+ this.portalType = portalType;
17
+ const dependencies = {
18
+ dependencyType: DependencyTypes.SITEMAP_GENERATOR,
19
+ portalType,
20
+ searchApiClient,
21
+ organisationsClient,
22
+ rankingApiClient
23
+ };
24
+ this.policies = [
25
+ new Area(dependencies),
26
+ new AreaAttendance(dependencies),
27
+ new Attendance(dependencies),
28
+ new Continent(dependencies),
29
+ new Country(dependencies),
30
+ new CountryAttendance(dependencies),
31
+ new Unfiltered(dependencies),
32
+ new RankedArea(dependencies),
33
+ new RankedAreaDiscipline(dependencies),
34
+ new RankedAttendance(dependencies),
35
+ new RankedAttendanceDiscipline(dependencies),
36
+ new RankedContinent(dependencies),
37
+ new RankedContinentAttendance(dependencies),
38
+ new RankedCountry(dependencies),
39
+ new RankedCountryAttendance(dependencies),
40
+ new RankedCountryDiscipline(dependencies),
41
+ new RankedDiscipline(dependencies),
42
+ new RankedUnfiltered(dependencies)
43
+ ];
44
+ this.presenters.set(FilterKey.AREA, AreaPresenter.getInstance());
45
+ this.presenters.set(FilterKey.DELIVERY_METHOD, AttendancePresenter.getInstance());
46
+ this.presenters.set(FilterKey.CONTINENT, ContinentPresenter.getInstance());
47
+ this.presenters.set(FilterKey.COUNTRY, CountryPresenter.getInstance());
48
+ this.presenters.set(FilterKey.DISCIPLINES, DisciplinePresenter.getInstance());
49
+ this.setFilterKeyValueCounts();
50
+ }
51
+ }
@@ -0,0 +1,12 @@
1
+ import { ISearchApiClient } from '../sitemap-generator/ISearchApiClient';
2
+ import { BaseSitemapUrlGeneratorManager } from './BaseSitemapUrlGeneratorManager';
3
+ import { PortalType } from '@studyportals/domain-client';
4
+ import { FilterKey } from '@studyportals/search-filters';
5
+ import { IPresenter } from '../common';
6
+ import { IProgrammeSitemapUrlGenerator } from '../programmes/types/IProgrammeSitemapUrlGenerator';
7
+ export declare class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
8
+ readonly portalType: PortalType;
9
+ readonly policies: IProgrammeSitemapUrlGenerator[];
10
+ readonly presenters: Map<FilterKey, IPresenter>;
11
+ constructor(portalType: PortalType, searchApiClient: ISearchApiClient);
12
+ }
@@ -0,0 +1,77 @@
1
+ import { DependencyTypes } from '../enums/DependencyTypes';
2
+ import { BaseSitemapUrlGeneratorManager } from './BaseSitemapUrlGeneratorManager';
3
+ import { Area, Attendance, AttendanceDegree, Continent, ContinentTuitionFee, Country, CountryAttendance, Discipline, SpecialProgrammes, TuitionFee, Unfiltered, CountryAttendanceDegree, CountryDuration, CountryDurationDegree, CountryEducationalForm, CountryFormat, CountryTuitionFee, DegreeAttendanceDiscipline, DegreeCountryAttendance, DegreeCountryDiscipline, DegreeCountryTuitionFee, DisciplineArea, DisciplineAttendance, DisciplineContinent, DisciplineCountry, DisciplineCountryEducationalForm, DisciplineDegree, DisciplineDuration, DisciplineEducationalForm, DisciplineFormat, DisciplineTuitionFee, DisciplineTuitionFeeAttendance, CountryDegree } from '../programmes/policies';
4
+ import { FilterKey } from '@studyportals/search-filters';
5
+ import { AreaPresenter } from '../presenters/AreaPresenter';
6
+ import { AttendancePresenter } from '../presenters/AttendancePresenter';
7
+ import { DegreePresenter } from '../presenters/DegreePresenter';
8
+ import { ContinentPresenter } from '../presenters/ContinentPresenter';
9
+ import { TuitionFeePresenter } from '../presenters/TuitionFeePresenter';
10
+ import { CountryPresenter } from '../presenters/CountryPresenter';
11
+ import { DisciplinePresenter } from '../presenters/DisciplinePresenter';
12
+ import { SpecialProgrammesPresenter } from '../presenters/SpecialProgrammesPresenter';
13
+ import { DurationPresenter } from '../presenters/DurationPresenter';
14
+ import { EducationalFormPresenter } from '../presenters/EducationalFormPresenter';
15
+ import { FormatPresenter } from '../presenters/FormatPresenter';
16
+ import { Degree } from '../programmes/policies/Degree';
17
+ export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
18
+ portalType;
19
+ policies;
20
+ presenters = new Map();
21
+ constructor(portalType, searchApiClient) {
22
+ super();
23
+ this.portalType = portalType;
24
+ const dependencies = {
25
+ dependencyType: DependencyTypes.SITEMAP_GENERATOR,
26
+ searchApiClient,
27
+ portalType
28
+ };
29
+ this.policies = [
30
+ new Area(dependencies),
31
+ new Attendance(dependencies),
32
+ new AttendanceDegree(dependencies),
33
+ new Continent(dependencies),
34
+ new ContinentTuitionFee(dependencies),
35
+ new Country(dependencies),
36
+ new CountryAttendance(dependencies),
37
+ new Discipline(dependencies),
38
+ new Degree(dependencies),
39
+ new SpecialProgrammes(dependencies),
40
+ new TuitionFee(dependencies),
41
+ new Unfiltered(dependencies),
42
+ new CountryAttendanceDegree(dependencies),
43
+ new CountryDegree(dependencies),
44
+ new CountryDuration(dependencies),
45
+ new CountryDurationDegree(dependencies),
46
+ new CountryEducationalForm(dependencies),
47
+ new CountryFormat(dependencies),
48
+ new CountryTuitionFee(dependencies),
49
+ new DegreeAttendanceDiscipline(dependencies),
50
+ new DegreeCountryAttendance(dependencies),
51
+ new DegreeCountryDiscipline(dependencies),
52
+ new DegreeCountryTuitionFee(dependencies),
53
+ new DisciplineArea(dependencies),
54
+ new DisciplineAttendance(dependencies),
55
+ new DisciplineContinent(dependencies),
56
+ new DisciplineCountry(dependencies),
57
+ new DisciplineCountryEducationalForm(dependencies),
58
+ new DisciplineDegree(dependencies),
59
+ new DisciplineDuration(dependencies),
60
+ new DisciplineEducationalForm(dependencies),
61
+ new DisciplineFormat(dependencies),
62
+ new DisciplineTuitionFee(dependencies),
63
+ new DisciplineTuitionFeeAttendance(dependencies)
64
+ ];
65
+ this.presenters.set(FilterKey.AREA, AreaPresenter.getInstance());
66
+ this.presenters.set(FilterKey.DELIVERY_METHOD, AttendancePresenter.getInstance());
67
+ this.presenters.set(FilterKey.DEGREE_TYPE, DegreePresenter.getInstance());
68
+ this.presenters.set(FilterKey.CONTINENT, ContinentPresenter.getInstance());
69
+ this.presenters.set(FilterKey.TUITION_FEE, TuitionFeePresenter.getInstance());
70
+ this.presenters.set(FilterKey.COUNTRY, CountryPresenter.getInstance());
71
+ this.presenters.set(FilterKey.DISCIPLINES, DisciplinePresenter.getInstance());
72
+ this.presenters.set(FilterKey.SPECIAL_PROGRAMMES, SpecialProgrammesPresenter.getInstance());
73
+ this.presenters.set(FilterKey.DURATION, DurationPresenter.getInstance());
74
+ this.presenters.set(FilterKey.EDUCATIONAL_FORM, EducationalFormPresenter.getInstance());
75
+ this.presenters.set(FilterKey.ATTENDANCE, FormatPresenter.getInstance());
76
+ }
77
+ }
@@ -0,0 +1,9 @@
1
+ import { ISitemapUrlGenerator } from '../common/ISitemapUrlGenerator';
2
+ import { IOrganisationsClient } from '../sitemap-generator/IOrganisationsClient';
3
+ import { ISearchApiClient } from '../sitemap-generator/ISearchApiClient';
4
+ import { BaseSitemapUrlGeneratorManager } from './BaseSitemapUrlGeneratorManager';
5
+ export declare class ScholarshipsSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
6
+ readonly policies: ISitemapUrlGenerator[];
7
+ readonly presenters: Map<any, any>;
8
+ constructor(searchApiClient: ISearchApiClient, organisationsClient: IOrganisationsClient);
9
+ }
@@ -0,0 +1,28 @@
1
+ import { DependencyTypes } from '../enums/DependencyTypes';
2
+ import { Area } from '../scholarships/policies/Area';
3
+ import { Country } from '../scholarships/policies/Country';
4
+ import { Discipline } from '../scholarships/policies/Discipline';
5
+ import { DisciplineCountry } from '../scholarships/policies/DisciplineCountry';
6
+ import { UniversityCountry } from '../scholarships/policies/UniversityCountry';
7
+ import { Unfiltered } from '../scholarships/policies/Unfiltered';
8
+ import { BaseSitemapUrlGeneratorManager } from './BaseSitemapUrlGeneratorManager';
9
+ export class ScholarshipsSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
10
+ policies;
11
+ presenters = new Map();
12
+ constructor(searchApiClient, organisationsClient) {
13
+ super();
14
+ const dependencies = {
15
+ dependencyType: DependencyTypes.SITEMAP_GENERATOR,
16
+ searchApiClient,
17
+ organisationsClient
18
+ };
19
+ this.policies = [
20
+ new Area(dependencies),
21
+ new Country(dependencies),
22
+ new DisciplineCountry(dependencies),
23
+ new Discipline(dependencies),
24
+ new UniversityCountry(dependencies),
25
+ new Unfiltered(dependencies)
26
+ ];
27
+ }
28
+ }
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,18 @@
1
+ import { SearchStructuredDataFactory } from "./SearchStructuredDataFactory";
2
+ import { IProgrammeCard } from "@studyportals/domain-client";
3
+ import { ReviewRatingDTO } from "./dto/ReviewRatingDTO";
4
+ import { OfferDTO } from "./dto/OfferDTO";
5
+ import { Course } from "schema-dts";
6
+ import { EntityDTO } from "./dto/EntityDTO";
7
+ import { StructuredDataCurrencyConversionService } from "../structured-data/interface/StructuredDataCurrencyConversionService";
8
+ export declare class ProgrammeStructuredDataFactory extends SearchStructuredDataFactory<IProgrammeCard> {
9
+ private currencyConversionService;
10
+ constructor(currencyConversionService: StructuredDataCurrencyConversionService);
11
+ private regionalDataPriority;
12
+ protected getRating(card: IProgrammeCard): ReviewRatingDTO | undefined;
13
+ protected getOfferData(card: IProgrammeCard): Promise<OfferDTO | undefined>;
14
+ protected buildStructuredDataForCard(entity: EntityDTO<IProgrammeCard>): Course | undefined;
15
+ private getCourseMode;
16
+ private getCourseWorkload;
17
+ private getCourseStartDate;
18
+ }
@@ -0,0 +1,91 @@
1
+ import { SearchStructuredDataFactory } from "./SearchStructuredDataFactory";
2
+ export class ProgrammeStructuredDataFactory extends SearchStructuredDataFactory {
3
+ currencyConversionService;
4
+ constructor(currencyConversionService) {
5
+ super();
6
+ this.currencyConversionService = currencyConversionService;
7
+ }
8
+ regionalDataPriority = ['international', 'general', 'eea', 'national'];
9
+ getRating(card) {
10
+ if (typeof card.getReviewRating === 'undefined')
11
+ return;
12
+ const rating = card.getReviewRating();
13
+ if (!rating || !rating.hasEnoughQuantity())
14
+ return;
15
+ return {
16
+ rating: rating?.getAverageStarRating(),
17
+ quantity: rating?.getQuantity(),
18
+ };
19
+ }
20
+ async getOfferData(card) {
21
+ if (!card.canShowTuitionFees())
22
+ return;
23
+ const tuitionFees = card.getTuitionFees();
24
+ let tuition;
25
+ let timing;
26
+ for (const target of this.regionalDataPriority) {
27
+ if (!tuition) {
28
+ tuition = tuitionFees.find(t => t.getTarget() === target);
29
+ }
30
+ if (!timing) {
31
+ timing = card.canShowTimings() ? card.getTimings().find(t => t.getType() === target && t.canShowStartDate()) : undefined;
32
+ }
33
+ }
34
+ if (!tuition) {
35
+ return;
36
+ }
37
+ return {
38
+ price: Math.round(await this.currencyConversionService.convert(tuition.getAmount(), tuition.getCurrency(), 'USD')),
39
+ category: 'tuition',
40
+ validFrom: timing ? timing.getStartDate().getDate() : undefined
41
+ };
42
+ }
43
+ buildStructuredDataForCard(entity) {
44
+ const offer = this.constructOffer(entity.offer);
45
+ if (!offer)
46
+ return undefined;
47
+ const card = entity.card;
48
+ return {
49
+ "@type": "Course",
50
+ "name": card.getTitle(),
51
+ "description": card.getSummary(),
52
+ "url": card.getProgrammeLink().getUrl(),
53
+ "provider": {
54
+ "@type": "EducationalOrganization",
55
+ "name": card.getUniversityLink().getDescription(),
56
+ "url": `https://${window.location.host}${card.getUniversityLink().getUrl()}`
57
+ },
58
+ "offers": offer,
59
+ "aggregateRating": this.constructAggregateRating(entity.reviewRating),
60
+ "hasCourseInstance": {
61
+ "@type": "CourseInstance",
62
+ "startDate": this.getCourseStartDate(card),
63
+ "courseWorkload": this.getCourseWorkload(card),
64
+ "courseMode": this.getCourseMode(card),
65
+ }
66
+ };
67
+ }
68
+ getCourseMode(card) {
69
+ if (card.isBlended())
70
+ return 'blended';
71
+ if (card.isOnline())
72
+ return 'online';
73
+ if (card.isOnCampus())
74
+ return 'onsite';
75
+ }
76
+ getCourseWorkload(card) {
77
+ if (card.isFullTime())
78
+ return 'PT40H';
79
+ if (card.isPartTime())
80
+ return 'PT20H';
81
+ return undefined;
82
+ }
83
+ getCourseStartDate(card) {
84
+ for (const target of this.regionalDataPriority) {
85
+ const timing = card.canShowTimings() ? card.getTimings().find(t => t.getType() === target && t.canShowStartDate()) : undefined;
86
+ if (timing) {
87
+ return timing.getStartDate().getDate().toISOString().split('T')[0];
88
+ }
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,34 @@
1
+ import { SearchResultsPage, WithContext, Offer, AggregateRating, Thing, FAQPage } from 'schema-dts';
2
+ import { ReviewRatingDTO } from './dto/ReviewRatingDTO';
3
+ import { OfferDTO } from './dto/OfferDTO';
4
+ import { EntityDTO } from './dto/EntityDTO';
5
+ import { FAQItemDto } from './dto/FAQItemDto';
6
+ import { BreadcrumbDTO } from './dto/BreadcrumbDTO';
7
+ export declare abstract class SearchStructuredDataFactory<TCard> {
8
+ buildStructuredData(title: string, description: string, cards: TCard[], faqItems?: FAQItemDto[], breadcrumbs?: BreadcrumbDTO[]): Promise<WithContext<SearchResultsPage>>;
9
+ protected abstract buildStructuredDataForCard(entity: EntityDTO<TCard>): Thing | undefined;
10
+ /**
11
+ * Get the rating for a card.
12
+ * This method should be overridden by subclasses to provide the specific rating logic.
13
+ * If no rating is available, return undefined and no aggregate rating will be constructed for the card & page.
14
+ *
15
+ * @param card
16
+ * @protected
17
+ */
18
+ protected getRating(card: TCard): ReviewRatingDTO | undefined;
19
+ /**
20
+ * Get the offer data for a card.
21
+ * This method should be overridden by subclasses to provide the specific offer logic.
22
+ * If no offer is available, return undefined and no aggregate offer will be constructed for the card & page.
23
+ *
24
+ * @param card
25
+ * @protected
26
+ */
27
+ protected getOfferData(card: TCard): Promise<OfferDTO | undefined>;
28
+ private constructOptionalPageOffers;
29
+ protected constructOptionalFaqPage(faqItems: FAQItemDto[]): FAQPage | undefined;
30
+ private constructOptionalBreadcrumbs;
31
+ protected constructAggregateRating(reviewRating?: ReviewRatingDTO): AggregateRating | undefined;
32
+ protected constructOffer(offerData?: OfferDTO): Offer | undefined;
33
+ private stripHtmlWithListRetain;
34
+ }
@@ -0,0 +1,144 @@
1
+ export class SearchStructuredDataFactory {
2
+ async buildStructuredData(title, description, cards, faqItems = [], breadcrumbs = []) {
3
+ const entities = [];
4
+ const ratings = [];
5
+ const offersData = [];
6
+ for (const card of cards) {
7
+ const reviewRating = this.getRating(card);
8
+ const offer = await this.getOfferData(card);
9
+ if (reviewRating)
10
+ ratings.push(reviewRating);
11
+ if (offer)
12
+ offersData.push(offer);
13
+ entities.push({ card, offer, reviewRating });
14
+ }
15
+ const mainEntities = entities
16
+ .map(entity => this.buildStructuredDataForCard(entity))
17
+ .filter(entity => entity !== undefined);
18
+ const data = {
19
+ '@context': 'https://schema.org',
20
+ '@type': 'SearchResultsPage',
21
+ 'name': title,
22
+ description,
23
+ 'mainEntity': mainEntities
24
+ };
25
+ data.offers = this.constructOptionalPageOffers(offersData);
26
+ data.hasPart = this.constructOptionalFaqPage(faqItems);
27
+ data.breadcrumb = this.constructOptionalBreadcrumbs(breadcrumbs);
28
+ return data;
29
+ }
30
+ /**
31
+ * Get the rating for a card.
32
+ * This method should be overridden by subclasses to provide the specific rating logic.
33
+ * If no rating is available, return undefined and no aggregate rating will be constructed for the card & page.
34
+ *
35
+ * @param card
36
+ * @protected
37
+ */
38
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
39
+ getRating(card) {
40
+ return undefined;
41
+ }
42
+ /**
43
+ * Get the offer data for a card.
44
+ * This method should be overridden by subclasses to provide the specific offer logic.
45
+ * If no offer is available, return undefined and no aggregate offer will be constructed for the card & page.
46
+ *
47
+ * @param card
48
+ * @protected
49
+ */
50
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
51
+ async getOfferData(card) {
52
+ return undefined;
53
+ }
54
+ constructOptionalPageOffers(offersData) {
55
+ if (offersData.length <= 0)
56
+ return;
57
+ let minPrice = -1;
58
+ let maxPrice = 0;
59
+ let totalPrice = 0;
60
+ for (const offer of offersData) {
61
+ if (offer.price < minPrice || minPrice === -1) {
62
+ minPrice = offer.price;
63
+ }
64
+ if (offer.price > maxPrice) {
65
+ maxPrice = offer.price;
66
+ }
67
+ totalPrice += offer.price;
68
+ }
69
+ return {
70
+ '@type': 'AggregateOffer',
71
+ 'lowPrice': Math.max(minPrice, 0),
72
+ 'highPrice': maxPrice,
73
+ 'priceCurrency': 'USD',
74
+ 'offerCount': offersData.length,
75
+ 'priceSpecification': {
76
+ '@type': 'PriceSpecification',
77
+ 'price': Math.round(totalPrice / offersData.length),
78
+ 'priceCurrency': 'USD'
79
+ }
80
+ };
81
+ }
82
+ constructOptionalFaqPage(faqItems) {
83
+ if (faqItems.length <= 0)
84
+ return;
85
+ return {
86
+ '@type': 'FAQPage',
87
+ 'mainEntity': faqItems.map(item => ({
88
+ '@type': 'Question',
89
+ 'name': item.question,
90
+ 'acceptedAnswer': {
91
+ '@type': 'Answer',
92
+ 'text': this.stripHtmlWithListRetain(item.answer)
93
+ }
94
+ }))
95
+ };
96
+ }
97
+ constructOptionalBreadcrumbs(breadcrumbs) {
98
+ if (breadcrumbs.length <= 0)
99
+ return;
100
+ return {
101
+ '@type': 'BreadcrumbList',
102
+ 'itemListElement': breadcrumbs.map((breadcrumb) => ({
103
+ '@type': 'ListItem',
104
+ '@id': `${breadcrumb.url}#listitem#thing`,
105
+ 'name': breadcrumb.name,
106
+ 'position': breadcrumb.position,
107
+ 'item': breadcrumb.url
108
+ }))
109
+ };
110
+ }
111
+ constructAggregateRating(reviewRating) {
112
+ if (!reviewRating)
113
+ return;
114
+ return {
115
+ '@type': 'AggregateRating',
116
+ 'ratingValue': reviewRating.rating,
117
+ 'reviewCount': reviewRating.quantity,
118
+ 'bestRating': 5,
119
+ 'worstRating': 1
120
+ };
121
+ }
122
+ constructOffer(offerData) {
123
+ if (!offerData)
124
+ return;
125
+ return {
126
+ '@type': 'Offer',
127
+ 'price': offerData.price,
128
+ 'priceCurrency': 'USD',
129
+ 'availability': 'https://schema.org/InStock',
130
+ 'validFrom': offerData.validFrom ? offerData.validFrom.toISOString().split('T')[0] : undefined,
131
+ 'category': 'tuition'
132
+ };
133
+ }
134
+ stripHtmlWithListRetain(html) {
135
+ const tempDiv = document.createElement('div');
136
+ tempDiv.innerHTML = html;
137
+ // Replace all <li> elements with bullet points manually
138
+ tempDiv.querySelectorAll('li').forEach(li => {
139
+ li.textContent = '• ' + li.textContent;
140
+ });
141
+ // Get the text content, which includes newlines for block elements
142
+ return tempDiv.textContent?.trim() ?? '';
143
+ }
144
+ }
@@ -0,0 +1,5 @@
1
+ export interface BreadcrumbDTO {
2
+ name: string;
3
+ position: number;
4
+ url: string;
5
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import { OfferDTO } from "./OfferDTO";
2
+ import { ReviewRatingDTO } from "./ReviewRatingDTO";
3
+ export interface EntityDTO<TCard> {
4
+ card: TCard;
5
+ offer?: OfferDTO;
6
+ reviewRating?: ReviewRatingDTO;
7
+ }
@@ -0,0 +1 @@
1
+ export {};