@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.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/organisations-seo/index.d.ts +4 -0
- package/dist/organisations-seo/index.js +2 -0
- package/dist/programmes-seo/index.d.ts +6 -0
- package/dist/programmes-seo/index.js +2 -0
- package/dist/scholarships-seo/index.d.ts +5 -0
- package/dist/scholarships-seo/index.js +3 -0
- package/dist/sitemap-generator-seo/index.d.ts +13 -0
- package/dist/sitemap-generator-seo/index.js +4 -0
- package/dist/src/common/FilterKeyValuesMap.d.ts +2 -0
- package/dist/src/common/FilterKeyValuesMap.js +1 -0
- package/dist/src/common/IDependencies.d.ts +4 -0
- package/dist/src/common/IDependencies.js +1 -0
- package/dist/src/common/IDocumentationManager.d.ts +5 -0
- package/dist/src/common/IDocumentationManager.js +1 -0
- package/dist/src/common/IPresenter.d.ts +6 -0
- package/dist/src/common/IPresenter.js +1 -0
- package/dist/src/common/IRule.d.ts +8 -0
- package/dist/src/common/IRule.js +1 -0
- package/dist/src/common/ISearchApplicationState.d.ts +4 -0
- package/dist/src/common/ISearchApplicationState.js +1 -0
- package/dist/src/common/ISearchDependencies.d.ts +7 -0
- package/dist/src/common/ISearchDependencies.js +1 -0
- package/dist/src/common/ISearchIndexabilityManager.d.ts +4 -0
- package/dist/src/common/ISearchIndexabilityManager.js +1 -0
- package/dist/src/common/ISeoDependencies.d.ts +3 -0
- package/dist/src/common/ISeoDependencies.js +1 -0
- package/dist/src/common/ISeoFilterState.d.ts +5 -0
- package/dist/src/common/ISeoFilterState.js +1 -0
- package/dist/src/common/ISeoIndexabilityPolicy.d.ts +7 -0
- package/dist/src/common/ISeoIndexabilityPolicy.js +1 -0
- package/dist/src/common/ISeoInfoBase.d.ts +8 -0
- package/dist/src/common/ISeoInfoBase.js +1 -0
- package/dist/src/common/ISitemapDependencies.d.ts +5 -0
- package/dist/src/common/ISitemapDependencies.js +1 -0
- package/dist/src/common/ISitemapUrlGenerator.d.ts +7 -0
- package/dist/src/common/ISitemapUrlGenerator.js +1 -0
- package/dist/src/common/index.d.ts +5 -0
- package/dist/src/common/index.js +5 -0
- package/dist/src/common/policies/BaseSeoIndexabilityPolicy.d.ts +26 -0
- package/dist/src/common/policies/BaseSeoIndexabilityPolicy.js +56 -0
- package/dist/src/common/rules/BaseFilterKeyValueRule.d.ts +11 -0
- package/dist/src/common/rules/BaseFilterKeyValueRule.js +28 -0
- package/dist/src/common/rules/IndexablePageNumberRule.d.ts +9 -0
- package/dist/src/common/rules/IndexablePageNumberRule.js +17 -0
- package/dist/src/common/rules/NoFiltersSelectedRule.d.ts +9 -0
- package/dist/src/common/rules/NoFiltersSelectedRule.js +17 -0
- package/dist/src/common/rules/OnlineAttendanceRule.d.ts +6 -0
- package/dist/src/common/rules/OnlineAttendanceRule.js +14 -0
- package/dist/src/common/rules/OnlyFiltersSelectedRule.d.ts +12 -0
- package/dist/src/common/rules/OnlyFiltersSelectedRule.js +30 -0
- package/dist/src/common/rules/SingleValueSelectedForFilterRule.d.ts +12 -0
- package/dist/src/common/rules/SingleValueSelectedForFilterRule.js +24 -0
- package/dist/src/enums/DependencyTypes.d.ts +4 -0
- package/dist/src/enums/DependencyTypes.js +5 -0
- package/dist/src/enums/FilterCombinations.d.ts +52 -0
- package/dist/src/enums/FilterCombinations.js +53 -0
- package/dist/src/enums/SortingOptions.d.ts +4 -0
- package/dist/src/enums/SortingOptions.js +5 -0
- package/dist/src/errors/DependencyMissingError.d.ts +3 -0
- package/dist/src/errors/DependencyMissingError.js +5 -0
- package/dist/src/errors/InvalidDependencyTypeError.d.ts +3 -0
- package/dist/src/errors/InvalidDependencyTypeError.js +5 -0
- package/dist/src/errors/InvalidFilterValueError.d.ts +4 -0
- package/dist/src/errors/InvalidFilterValueError.js +5 -0
- package/dist/src/organisations/IOrganisationSearchApplicationState.d.ts +5 -0
- package/dist/src/organisations/IOrganisationSearchApplicationState.js +1 -0
- package/dist/src/organisations/ISeoSortingState.d.ts +4 -0
- package/dist/src/organisations/ISeoSortingState.js +1 -0
- package/dist/src/organisations/SearchIndexabilityManager.d.ts +12 -0
- package/dist/src/organisations/SearchIndexabilityManager.js +42 -0
- package/dist/src/organisations/index.d.ts +4 -0
- package/dist/src/organisations/index.js +4 -0
- package/dist/src/organisations/policies/OrganisationsSeoIndexabilityPolicy.d.ts +19 -0
- package/dist/src/organisations/policies/OrganisationsSeoIndexabilityPolicy.js +49 -0
- package/dist/src/organisations/policies/RankedOrganisationsSeoIndexabilityPolicy.d.ts +9 -0
- package/dist/src/organisations/policies/RankedOrganisationsSeoIndexabilityPolicy.js +22 -0
- package/dist/src/organisations/policies/index.d.ts +18 -0
- package/dist/src/organisations/policies/index.js +18 -0
- package/dist/src/organisations/policies/our-picks/Area.d.ts +13 -0
- package/dist/src/organisations/policies/our-picks/Area.js +35 -0
- package/dist/src/organisations/policies/our-picks/AreaAttendance.d.ts +15 -0
- package/dist/src/organisations/policies/our-picks/AreaAttendance.js +45 -0
- package/dist/src/organisations/policies/our-picks/Attendance.d.ts +14 -0
- package/dist/src/organisations/policies/our-picks/Attendance.js +33 -0
- package/dist/src/organisations/policies/our-picks/Continent.d.ts +13 -0
- package/dist/src/organisations/policies/our-picks/Continent.js +31 -0
- package/dist/src/organisations/policies/our-picks/Country.d.ts +13 -0
- package/dist/src/organisations/policies/our-picks/Country.js +28 -0
- package/dist/src/organisations/policies/our-picks/CountryAttendance.d.ts +15 -0
- package/dist/src/organisations/policies/our-picks/CountryAttendance.js +43 -0
- package/dist/src/organisations/policies/our-picks/Unfiltered.d.ts +12 -0
- package/dist/src/organisations/policies/our-picks/Unfiltered.js +16 -0
- package/dist/src/organisations/policies/ranked/RankedArea.d.ts +13 -0
- package/dist/src/organisations/policies/ranked/RankedArea.js +36 -0
- package/dist/src/organisations/policies/ranked/RankedAreaDiscipline.d.ts +14 -0
- package/dist/src/organisations/policies/ranked/RankedAreaDiscipline.js +44 -0
- package/dist/src/organisations/policies/ranked/RankedAttendance.d.ts +14 -0
- package/dist/src/organisations/policies/ranked/RankedAttendance.js +34 -0
- package/dist/src/organisations/policies/ranked/RankedAttendanceDiscipline.d.ts +14 -0
- package/dist/src/organisations/policies/ranked/RankedAttendanceDiscipline.js +42 -0
- package/dist/src/organisations/policies/ranked/RankedContinent.d.ts +13 -0
- package/dist/src/organisations/policies/ranked/RankedContinent.js +32 -0
- package/dist/src/organisations/policies/ranked/RankedContinentAttendance.d.ts +15 -0
- package/dist/src/organisations/policies/ranked/RankedContinentAttendance.js +44 -0
- package/dist/src/organisations/policies/ranked/RankedCountry.d.ts +13 -0
- package/dist/src/organisations/policies/ranked/RankedCountry.js +29 -0
- package/dist/src/organisations/policies/ranked/RankedCountryAttendance.d.ts +14 -0
- package/dist/src/organisations/policies/ranked/RankedCountryAttendance.js +42 -0
- package/dist/src/organisations/policies/ranked/RankedCountryDiscipline.d.ts +13 -0
- package/dist/src/organisations/policies/ranked/RankedCountryDiscipline.js +40 -0
- package/dist/src/organisations/policies/ranked/RankedDiscipline.d.ts +13 -0
- package/dist/src/organisations/policies/ranked/RankedDiscipline.js +32 -0
- package/dist/src/organisations/policies/ranked/RankedUnfiltered.d.ts +12 -0
- package/dist/src/organisations/policies/ranked/RankedUnfiltered.js +21 -0
- package/dist/src/organisations/rules/AtLeastSevenResultsRule.d.ts +15 -0
- package/dist/src/organisations/rules/AtLeastSevenResultsRule.js +30 -0
- package/dist/src/organisations/rules/AtLeastTwoRankedResultsRule.d.ts +13 -0
- package/dist/src/organisations/rules/AtLeastTwoRankedResultsRule.js +26 -0
- package/dist/src/organisations/rules/BaseSearchVolumeOrganisationsRule.d.ts +14 -0
- package/dist/src/organisations/rules/BaseSearchVolumeOrganisationsRule.js +33 -0
- package/dist/src/organisations/rules/ContinentIsEuropeRule.d.ts +6 -0
- package/dist/src/organisations/rules/ContinentIsEuropeRule.js +15 -0
- package/dist/src/organisations/rules/NoFiltersSelectedRule.d.ts +9 -0
- package/dist/src/organisations/rules/NoFiltersSelectedRule.js +17 -0
- package/dist/src/organisations/rules/SearchVolumeAreasAttendanceRule.d.ts +6 -0
- package/dist/src/organisations/rules/SearchVolumeAreasAttendanceRule.js +17 -0
- package/dist/src/organisations/rules/SearchVolumeAreasDisciplineRule.d.ts +6 -0
- package/dist/src/organisations/rules/SearchVolumeAreasDisciplineRule.js +18 -0
- package/dist/src/organisations/rules/SearchVolumeCountriesAttendanceRule.d.ts +6 -0
- package/dist/src/organisations/rules/SearchVolumeCountriesAttendanceRule.js +17 -0
- package/dist/src/organisations/types/IOrganisationSearchDependencies.d.ts +9 -0
- package/dist/src/organisations/types/IOrganisationSearchDependencies.js +1 -0
- package/dist/src/organisations/types/IOrganisationsSeoDependencies.d.ts +3 -0
- package/dist/src/organisations/types/IOrganisationsSeoDependencies.js +1 -0
- package/dist/src/organisations/types/IOrganisationsSitemapDependencies.d.ts +9 -0
- package/dist/src/organisations/types/IOrganisationsSitemapDependencies.js +1 -0
- package/dist/src/organisations/types.d.ts +6 -0
- package/dist/src/organisations/types.js +6 -0
- package/dist/src/presenters/AreaPresenter.d.ts +12 -0
- package/dist/src/presenters/AreaPresenter.js +35 -0
- package/dist/src/presenters/AttendancePresenter.d.ts +11 -0
- package/dist/src/presenters/AttendancePresenter.js +23 -0
- package/dist/src/presenters/ContinentPresenter.d.ts +12 -0
- package/dist/src/presenters/ContinentPresenter.js +33 -0
- package/dist/src/presenters/CountryPresenter.d.ts +12 -0
- package/dist/src/presenters/CountryPresenter.js +38 -0
- package/dist/src/presenters/DegreePresenter.d.ts +12 -0
- package/dist/src/presenters/DegreePresenter.js +50 -0
- package/dist/src/presenters/DisciplinePresenter.d.ts +12 -0
- package/dist/src/presenters/DisciplinePresenter.js +33 -0
- package/dist/src/presenters/DurationPresenter.d.ts +15 -0
- package/dist/src/presenters/DurationPresenter.js +47 -0
- package/dist/src/presenters/EducationalFormPresenter.d.ts +12 -0
- package/dist/src/presenters/EducationalFormPresenter.js +45 -0
- package/dist/src/presenters/FormatPresenter.d.ts +11 -0
- package/dist/src/presenters/FormatPresenter.js +24 -0
- package/dist/src/presenters/SpecialProgrammesPresenter.d.ts +11 -0
- package/dist/src/presenters/SpecialProgrammesPresenter.js +27 -0
- package/dist/src/presenters/TuitionFeePresenter.d.ts +11 -0
- package/dist/src/presenters/TuitionFeePresenter.js +23 -0
- package/dist/src/presenters/fragments/IAreaFragment.d.ts +4 -0
- package/dist/src/presenters/fragments/IAreaFragment.js +1 -0
- package/dist/src/presenters/fragments/ICountryFragment.d.ts +4 -0
- package/dist/src/presenters/fragments/ICountryFragment.js +1 -0
- package/dist/src/presenters/fragments/IFragment.d.ts +4 -0
- package/dist/src/presenters/fragments/IFragment.js +1 -0
- package/dist/src/programmes/BaseProgrammeFilterKeyValueRule.d.ts +6 -0
- package/dist/src/programmes/BaseProgrammeFilterKeyValueRule.js +6 -0
- package/dist/src/programmes/BaseProgrammeRule.d.ts +10 -0
- package/dist/src/programmes/BaseProgrammeRule.js +5 -0
- package/dist/src/programmes/IProgrammeRule.d.ts +5 -0
- package/dist/src/programmes/IProgrammeRule.js +1 -0
- package/dist/src/programmes/ProgrammesBaseIndexabilityPolicy.d.ts +15 -0
- package/dist/src/programmes/ProgrammesBaseIndexabilityPolicy.js +42 -0
- package/dist/src/programmes/SearchIndexabilityManager.d.ts +12 -0
- package/dist/src/programmes/SearchIndexabilityManager.js +58 -0
- package/dist/src/programmes/policies/Area.d.ts +15 -0
- package/dist/src/programmes/policies/Area.js +40 -0
- package/dist/src/programmes/policies/Attendance.d.ts +16 -0
- package/dist/src/programmes/policies/Attendance.js +38 -0
- package/dist/src/programmes/policies/AttendanceDegree.d.ts +17 -0
- package/dist/src/programmes/policies/AttendanceDegree.js +48 -0
- package/dist/src/programmes/policies/Continent.d.ts +15 -0
- package/dist/src/programmes/policies/Continent.js +36 -0
- package/dist/src/programmes/policies/ContinentTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/ContinentTuitionFee.js +46 -0
- package/dist/src/programmes/policies/Country.d.ts +15 -0
- package/dist/src/programmes/policies/Country.js +33 -0
- package/dist/src/programmes/policies/CountryAttendance.d.ts +16 -0
- package/dist/src/programmes/policies/CountryAttendance.js +46 -0
- package/dist/src/programmes/policies/CountryAttendanceDegree.d.ts +17 -0
- package/dist/src/programmes/policies/CountryAttendanceDegree.js +55 -0
- package/dist/src/programmes/policies/CountryDegree.d.ts +16 -0
- package/dist/src/programmes/policies/CountryDegree.js +46 -0
- package/dist/src/programmes/policies/CountryDuration.d.ts +16 -0
- package/dist/src/programmes/policies/CountryDuration.js +46 -0
- package/dist/src/programmes/policies/CountryDurationDegree.d.ts +17 -0
- package/dist/src/programmes/policies/CountryDurationDegree.js +55 -0
- package/dist/src/programmes/policies/CountryEducationalForm.d.ts +16 -0
- package/dist/src/programmes/policies/CountryEducationalForm.js +47 -0
- package/dist/src/programmes/policies/CountryFormat.d.ts +16 -0
- package/dist/src/programmes/policies/CountryFormat.js +46 -0
- package/dist/src/programmes/policies/CountryTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/CountryTuitionFee.js +46 -0
- package/dist/src/programmes/policies/Degree.d.ts +15 -0
- package/dist/src/programmes/policies/Degree.js +38 -0
- package/dist/src/programmes/policies/DegreeAttendanceDiscipline.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeAttendanceDiscipline.js +63 -0
- package/dist/src/programmes/policies/DegreeCountryAttendance.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeCountryAttendance.js +88 -0
- package/dist/src/programmes/policies/DegreeCountryDiscipline.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeCountryDiscipline.js +71 -0
- package/dist/src/programmes/policies/DegreeCountryTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeCountryTuitionFee.js +73 -0
- package/dist/src/programmes/policies/Discipline.d.ts +15 -0
- package/dist/src/programmes/policies/Discipline.js +36 -0
- package/dist/src/programmes/policies/DisciplineArea.d.ts +15 -0
- package/dist/src/programmes/policies/DisciplineArea.js +46 -0
- package/dist/src/programmes/policies/DisciplineAttendance.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineAttendance.js +46 -0
- package/dist/src/programmes/policies/DisciplineContinent.d.ts +15 -0
- package/dist/src/programmes/policies/DisciplineContinent.js +44 -0
- package/dist/src/programmes/policies/DisciplineCountry.d.ts +15 -0
- package/dist/src/programmes/policies/DisciplineCountry.js +44 -0
- package/dist/src/programmes/policies/DisciplineCountryEducationalForm.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineCountryEducationalForm.js +53 -0
- package/dist/src/programmes/policies/DisciplineDegree.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineDegree.js +46 -0
- package/dist/src/programmes/policies/DisciplineDuration.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineDuration.js +46 -0
- package/dist/src/programmes/policies/DisciplineEducationalForm.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineEducationalForm.js +47 -0
- package/dist/src/programmes/policies/DisciplineFormat.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineFormat.js +46 -0
- package/dist/src/programmes/policies/DisciplineTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineTuitionFee.js +46 -0
- package/dist/src/programmes/policies/DisciplineTuitionFeeAttendance.d.ts +17 -0
- package/dist/src/programmes/policies/DisciplineTuitionFeeAttendance.js +54 -0
- package/dist/src/programmes/policies/SpecialProgrammes.d.ts +16 -0
- package/dist/src/programmes/policies/SpecialProgrammes.js +38 -0
- package/dist/src/programmes/policies/TuitionFee.d.ts +15 -0
- package/dist/src/programmes/policies/TuitionFee.js +32 -0
- package/dist/src/programmes/policies/Unfiltered.d.ts +13 -0
- package/dist/src/programmes/policies/Unfiltered.js +19 -0
- package/dist/src/programmes/policies/index.d.ts +34 -0
- package/dist/src/programmes/policies/index.js +34 -0
- package/dist/src/programmes/rules/AffordableTuitionFeeRule.d.ts +6 -0
- package/dist/src/programmes/rules/AffordableTuitionFeeRule.js +17 -0
- package/dist/src/programmes/rules/AtLeastSevenResultsRule.d.ts +15 -0
- package/dist/src/programmes/rules/AtLeastSevenResultsRule.js +30 -0
- package/dist/src/programmes/rules/DegreeAttendanceDisciplineRule.d.ts +11 -0
- package/dist/src/programmes/rules/DegreeAttendanceDisciplineRule.js +44 -0
- package/dist/src/programmes/rules/DegreeAttendanceDisciplineSpecificRule.d.ts +11 -0
- package/dist/src/programmes/rules/DegreeAttendanceDisciplineSpecificRule.js +39 -0
- package/dist/src/programmes/rules/DegreeCountryAttendanceSpecificRule.d.ts +14 -0
- package/dist/src/programmes/rules/DegreeCountryAttendanceSpecificRule.js +76 -0
- package/dist/src/programmes/rules/DegreeCountryDisciplineSpecificRule.d.ts +11 -0
- package/dist/src/programmes/rules/DegreeCountryDisciplineSpecificRule.js +76 -0
- package/dist/src/programmes/rules/DegreeCountryTuitionFeeSpecificRule.d.ts +12 -0
- package/dist/src/programmes/rules/DegreeCountryTuitionFeeSpecificRule.js +62 -0
- package/dist/src/programmes/rules/DegreeDisciplineRule.d.ts +16 -0
- package/dist/src/programmes/rules/DegreeDisciplineRule.js +189 -0
- package/dist/src/programmes/rules/ErasmusOrJointSpecialProgrammesRule.d.ts +9 -0
- package/dist/src/programmes/rules/ErasmusOrJointSpecialProgrammesRule.js +28 -0
- package/dist/src/programmes/rules/IndexableDegreeRule.d.ts +10 -0
- package/dist/src/programmes/rules/IndexableDegreeRule.js +53 -0
- package/dist/src/programmes/rules/IndexableDurationRule.d.ts +12 -0
- package/dist/src/programmes/rules/IndexableDurationRule.js +37 -0
- package/dist/src/programmes/rules/IndexableEducationalFormRule.d.ts +10 -0
- package/dist/src/programmes/rules/IndexableEducationalFormRule.js +34 -0
- package/dist/src/programmes/rules/IndexablePageNumberRule.d.ts +9 -0
- package/dist/src/programmes/rules/IndexablePageNumberRule.js +17 -0
- package/dist/src/programmes/rules/MbaDegreeRule.d.ts +6 -0
- package/dist/src/programmes/rules/MbaDegreeRule.js +15 -0
- package/dist/src/programmes/rules/MbaOrMscDegreeRule.d.ts +9 -0
- package/dist/src/programmes/rules/MbaOrMscDegreeRule.js +26 -0
- package/dist/src/programmes/rules/NotDistanceLearningPortalRule.d.ts +11 -0
- package/dist/src/programmes/rules/NotDistanceLearningPortalRule.js +28 -0
- package/dist/src/programmes/rules/OneYearDurationRule.d.ts +6 -0
- package/dist/src/programmes/rules/OneYearDurationRule.js +15 -0
- package/dist/src/programmes/rules/PartTimeFormatRule.d.ts +6 -0
- package/dist/src/programmes/rules/PartTimeFormatRule.js +15 -0
- package/dist/src/programmes/types/IProgrammeSearchApplicationState.d.ts +4 -0
- package/dist/src/programmes/types/IProgrammeSearchApplicationState.js +1 -0
- package/dist/src/programmes/types/IProgrammeSearchDependencies.d.ts +7 -0
- package/dist/src/programmes/types/IProgrammeSearchDependencies.js +1 -0
- package/dist/src/programmes/types/IProgrammeSearchSitemapDependencies.d.ts +5 -0
- package/dist/src/programmes/types/IProgrammeSearchSitemapDependencies.js +1 -0
- package/dist/src/programmes/types/IProgrammeSeoDependencies.d.ts +3 -0
- package/dist/src/programmes/types/IProgrammeSeoDependencies.js +1 -0
- package/dist/src/programmes/types/IProgrammeSitemapDependencies.d.ts +7 -0
- package/dist/src/programmes/types/IProgrammeSitemapDependencies.js +1 -0
- package/dist/src/programmes/types/IProgrammeSitemapUrlGenerator.d.ts +5 -0
- package/dist/src/programmes/types/IProgrammeSitemapUrlGenerator.js +1 -0
- package/dist/src/scholarships/SearchIndexabilityManager.d.ts +11 -0
- package/dist/src/scholarships/SearchIndexabilityManager.js +33 -0
- package/dist/src/scholarships/index.d.ts +3 -0
- package/dist/src/scholarships/index.js +3 -0
- package/dist/src/scholarships/policies/Area.d.ts +13 -0
- package/dist/src/scholarships/policies/Area.js +37 -0
- package/dist/src/scholarships/policies/Country.d.ts +12 -0
- package/dist/src/scholarships/policies/Country.js +31 -0
- package/dist/src/scholarships/policies/Discipline.d.ts +12 -0
- package/dist/src/scholarships/policies/Discipline.js +31 -0
- package/dist/src/scholarships/policies/DisciplineCountry.d.ts +12 -0
- package/dist/src/scholarships/policies/DisciplineCountry.js +39 -0
- package/dist/src/scholarships/policies/ScholarshipSeoIndexabilityPolicy.d.ts +7 -0
- package/dist/src/scholarships/policies/ScholarshipSeoIndexabilityPolicy.js +7 -0
- package/dist/src/scholarships/policies/Unfiltered.d.ts +10 -0
- package/dist/src/scholarships/policies/Unfiltered.js +16 -0
- package/dist/src/scholarships/policies/UniversityCountry.d.ts +11 -0
- package/dist/src/scholarships/policies/UniversityCountry.js +41 -0
- package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.d.ts +14 -0
- package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.js +42 -0
- package/dist/src/scholarships/rules/SearchVolumeAreasRule.d.ts +12 -0
- package/dist/src/scholarships/rules/SearchVolumeAreasRule.js +32 -0
- package/dist/src/scholarships/rules/SearchVolumeCountriesDisciplinesRule.d.ts +14 -0
- package/dist/src/scholarships/rules/SearchVolumeCountriesDisciplinesRule.js +43 -0
- package/dist/src/scholarships/rules/SearchVolumeCountriesRule.d.ts +12 -0
- package/dist/src/scholarships/rules/SearchVolumeCountriesRule.js +32 -0
- package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.d.ts +12 -0
- package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.js +32 -0
- package/dist/src/scholarships/rules/files/search-volume.json +39334 -0
- package/dist/src/scholarships/types/IScholarshipSeoDependencies.d.ts +3 -0
- package/dist/src/scholarships/types/IScholarshipSeoDependencies.js +1 -0
- package/dist/src/scholarships/types/IScholarshipSitemapDependencies.d.ts +5 -0
- package/dist/src/scholarships/types/IScholarshipSitemapDependencies.js +1 -0
- package/dist/src/scholarships/types.d.ts +5 -0
- package/dist/src/scholarships/types.js +5 -0
- package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.d.ts +14 -0
- package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.js +26 -0
- package/dist/src/sitemap-generator/IOrganisation.d.ts +6 -0
- package/dist/src/sitemap-generator/IOrganisation.js +1 -0
- package/dist/src/sitemap-generator/IOrganisationsClient.d.ts +4 -0
- package/dist/src/sitemap-generator/IOrganisationsClient.js +1 -0
- package/dist/src/sitemap-generator/IRankingApiClient.d.ts +4 -0
- package/dist/src/sitemap-generator/IRankingApiClient.js +1 -0
- package/dist/src/sitemap-generator/ISearchApiClient.d.ts +5 -0
- package/dist/src/sitemap-generator/ISearchApiClient.js +1 -0
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorManager.d.ts +9 -0
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorManager.js +1 -0
- package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.d.ts +14 -0
- package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.js +51 -0
- package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.d.ts +12 -0
- package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.js +77 -0
- package/dist/src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.d.ts +9 -0
- package/dist/src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.js +28 -0
- package/dist/src/sitemap-generator/index.d.ts +0 -0
- package/dist/src/sitemap-generator/index.js +1 -0
- package/dist/src/structured-data/ProgrammeStructuredDataFactory.d.ts +18 -0
- package/dist/src/structured-data/ProgrammeStructuredDataFactory.js +91 -0
- package/dist/src/structured-data/SearchStructuredDataFactory.d.ts +34 -0
- package/dist/src/structured-data/SearchStructuredDataFactory.js +144 -0
- package/dist/src/structured-data/dto/BreadcrumbDTO.d.ts +5 -0
- package/dist/src/structured-data/dto/BreadcrumbDTO.js +1 -0
- package/dist/src/structured-data/dto/EntityDTO.d.ts +7 -0
- package/dist/src/structured-data/dto/EntityDTO.js +1 -0
- package/dist/src/structured-data/dto/FAQItemDto.d.ts +4 -0
- package/dist/src/structured-data/dto/FAQItemDto.js +1 -0
- package/dist/src/structured-data/dto/OfferDTO.d.ts +5 -0
- package/dist/src/structured-data/dto/OfferDTO.js +1 -0
- package/dist/src/structured-data/dto/ReviewRatingDTO.d.ts +4 -0
- package/dist/src/structured-data/dto/ReviewRatingDTO.js +1 -0
- package/dist/src/structured-data/dto/index.d.ts +5 -0
- package/dist/src/structured-data/dto/index.js +5 -0
- package/dist/src/structured-data/index.d.ts +2 -0
- package/dist/src/structured-data/index.js +2 -0
- package/dist/src/structured-data/interface/StructuredDataCurrencyConversionService.d.ts +3 -0
- package/dist/src/structured-data/interface/StructuredDataCurrencyConversionService.js +1 -0
- package/dist/structured-data-seo/index.d.ts +1 -0
- package/dist/structured-data-seo/index.js +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|