@studyportals/fawkes 7.4.2-0 → 7.4.2-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/README.md +176 -176
- package/dist/src/common/FilterKeyValuesMap.d.ts +1 -1
- package/dist/src/common/IPresenter.d.ts +1 -1
- package/dist/src/common/ISeoFilterState.d.ts +1 -1
- package/dist/src/common/ISeoInfoBase.d.ts +1 -1
- package/dist/src/common/rules/OnlineAttendanceRule.js +1 -1
- package/dist/src/common/rules/OnlyFiltersSelectedRule.d.ts +1 -1
- package/dist/src/common/rules/SingleValueSelectedForFilterRule.d.ts +1 -1
- package/dist/src/enums/AttendanceFilterOptionValue.d.ts +5 -0
- package/dist/src/enums/AttendanceFilterOptionValue.js +6 -0
- package/dist/src/enums/DegreeTypeFilterOptionValue.d.ts +29 -0
- package/dist/src/enums/DegreeTypeFilterOptionValue.js +30 -0
- package/dist/src/enums/DurationFilterOptionValue.d.ts +16 -0
- package/dist/src/enums/DurationFilterOptionValue.js +17 -0
- package/dist/src/enums/EducationalFormFilterOptionValue.d.ts +8 -0
- package/dist/src/enums/EducationalFormFilterOptionValue.js +9 -0
- package/dist/src/enums/FilterCombinations.d.ts +1 -22
- package/dist/src/enums/FilterCombinations.js +1 -22
- package/dist/src/enums/FilterKey.d.ts +21 -0
- package/dist/src/enums/FilterKey.js +22 -0
- package/dist/src/enums/FormatFilterOptionValue.d.ts +4 -0
- package/dist/src/enums/FormatFilterOptionValue.js +5 -0
- package/dist/src/enums/SpecialProgrammesFilterOptionValue.d.ts +5 -0
- package/dist/src/enums/SpecialProgrammesFilterOptionValue.js +6 -0
- package/dist/src/enums/TuitionFeeFilterOptionValue.d.ts +3 -0
- package/dist/src/enums/TuitionFeeFilterOptionValue.js +4 -0
- package/dist/src/errors/InvalidFilterValueError.d.ts +1 -1
- package/dist/src/organisations/policies/our-picks/Area.js +1 -1
- package/dist/src/organisations/policies/our-picks/AreaAttendance.js +1 -1
- package/dist/src/organisations/policies/our-picks/Attendance.js +1 -1
- package/dist/src/organisations/policies/our-picks/Continent.js +1 -1
- package/dist/src/organisations/policies/our-picks/Country.js +1 -1
- package/dist/src/organisations/policies/our-picks/CountryAttendance.js +1 -1
- package/dist/src/organisations/policies/ranked/RankedArea.js +1 -1
- package/dist/src/organisations/policies/ranked/RankedAreaDiscipline.js +1 -1
- package/dist/src/organisations/policies/ranked/RankedAttendance.js +1 -1
- package/dist/src/organisations/policies/ranked/RankedAttendanceDiscipline.js +1 -1
- package/dist/src/organisations/policies/ranked/RankedContinent.js +1 -1
- package/dist/src/organisations/policies/ranked/RankedContinentAttendance.js +1 -1
- package/dist/src/organisations/policies/ranked/RankedCountry.js +1 -1
- package/dist/src/organisations/policies/ranked/RankedCountryAttendance.js +1 -1
- package/dist/src/organisations/policies/ranked/RankedCountryDiscipline.js +1 -1
- package/dist/src/organisations/policies/ranked/RankedDiscipline.js +1 -1
- package/dist/src/organisations/rules/BaseSearchVolumeOrganisationsRule.d.ts +1 -1
- package/dist/src/organisations/rules/ContinentIsEuropeRule.js +1 -1
- package/dist/src/organisations/rules/SearchVolumeAreasAttendanceRule.js +1 -1
- package/dist/src/organisations/rules/SearchVolumeAreasDisciplineRule.js +1 -1
- package/dist/src/organisations/rules/SearchVolumeCountriesAttendanceRule.js +1 -1
- package/dist/src/presenters/AreaPresenter.d.ts +1 -1
- package/dist/src/presenters/AreaPresenter.js +1 -1
- package/dist/src/presenters/AttendancePresenter.d.ts +1 -1
- package/dist/src/presenters/AttendancePresenter.js +1 -5
- package/dist/src/presenters/ContinentPresenter.d.ts +1 -1
- package/dist/src/presenters/ContinentPresenter.js +1 -1
- package/dist/src/presenters/CountryPresenter.d.ts +1 -1
- package/dist/src/presenters/CountryPresenter.js +1 -1
- package/dist/src/presenters/DegreePresenter.d.ts +1 -1
- package/dist/src/presenters/DegreePresenter.js +2 -1
- package/dist/src/presenters/DisciplinePresenter.d.ts +1 -1
- package/dist/src/presenters/DisciplinePresenter.js +1 -1
- package/dist/src/presenters/DurationPresenter.d.ts +2 -1
- package/dist/src/presenters/DurationPresenter.js +2 -1
- package/dist/src/presenters/EducationalFormPresenter.d.ts +1 -1
- package/dist/src/presenters/EducationalFormPresenter.js +2 -1
- package/dist/src/presenters/FormatPresenter.d.ts +1 -1
- package/dist/src/presenters/FormatPresenter.js +3 -5
- package/dist/src/presenters/SpecialProgrammesPresenter.d.ts +1 -1
- package/dist/src/presenters/SpecialProgrammesPresenter.js +2 -5
- package/dist/src/presenters/TuitionFeePresenter.d.ts +1 -1
- package/dist/src/presenters/TuitionFeePresenter.js +2 -1
- package/dist/src/programmes/ProgrammesBaseIndexabilityPolicy.d.ts +1 -1
- package/dist/src/programmes/SearchIndexabilityManager.js +3 -27
- package/dist/src/programmes/policies/Area.d.ts +1 -1
- package/dist/src/programmes/policies/Area.js +1 -1
- package/dist/src/programmes/policies/Attendance.d.ts +1 -1
- package/dist/src/programmes/policies/Attendance.js +1 -1
- package/dist/src/programmes/policies/AttendanceDegree.d.ts +4 -3
- package/dist/src/programmes/policies/AttendanceDegree.js +7 -8
- package/dist/src/programmes/policies/Continent.d.ts +1 -1
- package/dist/src/programmes/policies/Continent.js +1 -1
- package/dist/src/programmes/policies/ContinentTuitionFee.d.ts +1 -1
- package/dist/src/programmes/policies/ContinentTuitionFee.js +1 -1
- package/dist/src/programmes/policies/Country.d.ts +1 -1
- package/dist/src/programmes/policies/Country.js +1 -1
- package/dist/src/programmes/policies/CountryAttendance.d.ts +1 -1
- package/dist/src/programmes/policies/CountryAttendance.js +1 -1
- package/dist/src/programmes/policies/CountryAttendanceDegree.d.ts +1 -1
- package/dist/src/programmes/policies/CountryAttendanceDegree.js +2 -2
- package/dist/src/programmes/policies/CountryDegree.d.ts +1 -1
- package/dist/src/programmes/policies/CountryDegree.js +1 -1
- package/dist/src/programmes/policies/CountryDuration.d.ts +3 -3
- package/dist/src/programmes/policies/CountryDuration.js +5 -7
- package/dist/src/programmes/policies/CountryDurationDegree.d.ts +1 -1
- package/dist/src/programmes/policies/CountryDurationDegree.js +2 -2
- package/dist/src/programmes/policies/CountryEducationalForm.d.ts +1 -1
- package/dist/src/programmes/policies/CountryEducationalForm.js +2 -2
- package/dist/src/programmes/policies/CountryFormat.d.ts +1 -1
- package/dist/src/programmes/policies/CountryFormat.js +1 -1
- package/dist/src/programmes/policies/CountryTuitionFee.d.ts +1 -1
- package/dist/src/programmes/policies/CountryTuitionFee.js +1 -1
- package/dist/src/programmes/policies/Degree.d.ts +1 -1
- package/dist/src/programmes/policies/Degree.js +1 -1
- package/dist/src/programmes/policies/DegreeAttendanceDiscipline.d.ts +2 -3
- package/dist/src/programmes/policies/DegreeAttendanceDiscipline.js +14 -14
- package/dist/src/programmes/policies/DegreeCountryAttendance.d.ts +1 -1
- package/dist/src/programmes/policies/DegreeCountryAttendance.js +2 -2
- package/dist/src/programmes/policies/DegreeCountryDiscipline.d.ts +1 -1
- package/dist/src/programmes/policies/DegreeCountryDiscipline.js +2 -2
- package/dist/src/programmes/policies/DegreeCountryTuitionFee.d.ts +1 -1
- package/dist/src/programmes/policies/DegreeCountryTuitionFee.js +3 -3
- package/dist/src/programmes/policies/Discipline.d.ts +1 -1
- package/dist/src/programmes/policies/Discipline.js +1 -1
- package/dist/src/programmes/policies/DisciplineArea.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineArea.js +1 -1
- package/dist/src/programmes/policies/DisciplineAttendance.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineAttendance.js +1 -1
- package/dist/src/programmes/policies/DisciplineContinent.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineContinent.js +1 -1
- package/dist/src/programmes/policies/DisciplineCountry.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineCountry.js +1 -1
- package/dist/src/programmes/policies/DisciplineCountryEducationalForm.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineCountryEducationalForm.js +2 -2
- package/dist/src/programmes/policies/DisciplineDegree.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineDegree.js +1 -1
- package/dist/src/programmes/policies/DisciplineDuration.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineDuration.js +1 -1
- package/dist/src/programmes/policies/DisciplineEducationalForm.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineEducationalForm.js +2 -2
- package/dist/src/programmes/policies/DisciplineFormat.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineFormat.js +1 -1
- package/dist/src/programmes/policies/DisciplineTuitionFee.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineTuitionFee.js +1 -1
- package/dist/src/programmes/policies/DisciplineTuitionFeeAttendance.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineTuitionFeeAttendance.js +1 -1
- package/dist/src/programmes/policies/SpecialProgrammes.d.ts +3 -2
- package/dist/src/programmes/policies/SpecialProgrammes.js +4 -2
- package/dist/src/programmes/policies/TuitionFee.d.ts +1 -1
- package/dist/src/programmes/policies/TuitionFee.js +1 -1
- package/dist/src/programmes/policies/index.d.ts +1 -26
- package/dist/src/programmes/policies/index.js +1 -26
- package/dist/src/programmes/rules/AffordableTuitionFeeRule.js +2 -2
- package/dist/src/programmes/rules/DegreeAttendanceDisciplineRule.js +2 -2
- package/dist/src/programmes/rules/DegreeAttendanceDisciplineSpecificRule.js +2 -2
- package/dist/src/programmes/rules/DegreeCountryAttendanceSpecificRule.js +3 -2
- package/dist/src/programmes/rules/DegreeCountryDisciplineSpecificRule.js +2 -2
- package/dist/src/programmes/rules/DegreeCountryTuitionFeeSpecificRule.js +3 -3
- package/dist/src/programmes/rules/DegreeDisciplineRule.js +2 -2
- package/dist/src/programmes/rules/ErasmusOrJointSpecialProgrammesRule.js +2 -2
- package/dist/src/programmes/rules/IndexableDegreeRule.js +2 -2
- package/dist/src/programmes/rules/IndexableDurationRule.js +1 -1
- package/dist/src/programmes/rules/IndexableEducationalFormRule.js +2 -2
- package/dist/src/programmes/rules/MbaDegreeRule.js +2 -2
- package/dist/src/programmes/rules/MbaOrMscDegreeRule.js +2 -2
- package/dist/src/programmes/rules/OneYearDurationRule.js +2 -2
- package/dist/src/programmes/rules/PartTimeFormatRule.js +2 -2
- package/dist/src/programmes/types/IProgrammeSitemapUrlGenerator.d.ts +1 -1
- package/dist/src/scholarships/policies/Area.js +1 -1
- package/dist/src/scholarships/policies/Country.js +1 -1
- package/dist/src/scholarships/policies/Discipline.js +1 -1
- package/dist/src/scholarships/policies/DisciplineCountry.js +1 -1
- package/dist/src/scholarships/policies/UniversityCountry.js +2 -2
- package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.js +1 -1
- package/dist/src/scholarships/rules/SearchVolumeAreasRule.js +1 -1
- package/dist/src/scholarships/rules/SearchVolumeCountriesDisciplinesRule.js +1 -1
- package/dist/src/scholarships/rules/SearchVolumeCountriesRule.js +1 -1
- package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.js +1 -1
- package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.d.ts +1 -1
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorManager.d.ts +1 -1
- package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.d.ts +1 -1
- package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.js +1 -1
- package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.d.ts +1 -1
- package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.js +4 -28
- package/package.json +104 -105
- package/dist/src/common/IPolicyMetaData.d.ts +0 -6
- package/dist/src/common/IPolicyMetaData.js +0 -1
- package/dist/src/organisations/OrganisationsRuleBasedIndexabilityPolicy.d.ts +0 -11
- package/dist/src/organisations/OrganisationsRuleBasedIndexabilityPolicy.js +0 -19
- package/dist/src/organisations/rules/OnlineAttendanceRule.d.ts +0 -6
- package/dist/src/organisations/rules/OnlineAttendanceRule.js +0 -14
- package/dist/src/programmes/IProgrammeSearchApplicationState.d.ts +0 -4
- package/dist/src/programmes/IProgrammeSearchApplicationState.js +0 -1
- package/dist/src/programmes/IProgrammeSearchDependencies.d.ts +0 -7
- package/dist/src/programmes/IProgrammeSearchDependencies.js +0 -1
- package/dist/src/programmes/IProgrammesSeoDependencies.d.ts +0 -2
- package/dist/src/programmes/IProgrammesSeoDependencies.js +0 -1
- package/dist/src/programmes/policies/AttendanceArea.d.ts +0 -16
- package/dist/src/programmes/policies/AttendanceArea.js +0 -48
- package/dist/src/programmes/policies/AttendanceContinent.d.ts +0 -16
- package/dist/src/programmes/policies/AttendanceContinent.js +0 -46
- package/dist/src/programmes/policies/AttendanceDuration.d.ts +0 -16
- package/dist/src/programmes/policies/AttendanceDuration.js +0 -48
- package/dist/src/programmes/policies/AttendanceFormat.d.ts +0 -16
- package/dist/src/programmes/policies/AttendanceFormat.js +0 -48
- package/dist/src/programmes/policies/AttendanceTuitionFee.d.ts +0 -16
- package/dist/src/programmes/policies/AttendanceTuitionFee.js +0 -49
- package/dist/src/programmes/policies/ContinentDuration.d.ts +0 -15
- package/dist/src/programmes/policies/ContinentDuration.js +0 -46
- package/dist/src/programmes/policies/ContinentFormat.d.ts +0 -15
- package/dist/src/programmes/policies/ContinentFormat.js +0 -46
- package/dist/src/programmes/policies/ContinentSpecialProgrammes.d.ts +0 -15
- package/dist/src/programmes/policies/ContinentSpecialProgrammes.js +0 -46
- package/dist/src/programmes/policies/CountrySpecialProgrammes.d.ts +0 -15
- package/dist/src/programmes/policies/CountrySpecialProgrammes.js +0 -46
- package/dist/src/programmes/policies/DegreeArea.d.ts +0 -15
- package/dist/src/programmes/policies/DegreeArea.js +0 -46
- package/dist/src/programmes/policies/DegreeAreaTuitionFee.d.ts +0 -15
- package/dist/src/programmes/policies/DegreeAreaTuitionFee.js +0 -52
- package/dist/src/programmes/policies/DegreeAttendanceFormat.d.ts +0 -15
- package/dist/src/programmes/policies/DegreeAttendanceFormat.js +0 -52
- package/dist/src/programmes/policies/DegreeAttendanceSpecialProgrammes.d.ts +0 -16
- package/dist/src/programmes/policies/DegreeAttendanceSpecialProgrammes.js +0 -56
- package/dist/src/programmes/policies/DegreeAttendanceTuitionFee.d.ts +0 -16
- package/dist/src/programmes/policies/DegreeAttendanceTuitionFee.js +0 -55
- package/dist/src/programmes/policies/DegreeContinent.d.ts +0 -16
- package/dist/src/programmes/policies/DegreeContinent.js +0 -46
- package/dist/src/programmes/policies/DegreeContinentTuitionFee.d.ts +0 -16
- package/dist/src/programmes/policies/DegreeContinentTuitionFee.js +0 -52
- package/dist/src/programmes/policies/DegreeDuration.d.ts +0 -16
- package/dist/src/programmes/policies/DegreeDuration.js +0 -48
- package/dist/src/programmes/policies/DegreeFormat.d.ts +0 -16
- package/dist/src/programmes/policies/DegreeFormat.js +0 -49
- package/dist/src/programmes/policies/DegreeFormatTuitionFee.d.ts +0 -16
- package/dist/src/programmes/policies/DegreeFormatTuitionFee.js +0 -52
- package/dist/src/programmes/policies/DegreeSpecialProgrammes.d.ts +0 -15
- package/dist/src/programmes/policies/DegreeSpecialProgrammes.js +0 -48
- package/dist/src/programmes/policies/DegreeTuitionFee.d.ts +0 -15
- package/dist/src/programmes/policies/DegreeTuitionFee.js +0 -47
- package/dist/src/programmes/policies/DisciplineContinentAttendance.d.ts +0 -16
- package/dist/src/programmes/policies/DisciplineContinentAttendance.js +0 -54
- package/dist/src/programmes/policies/DisciplineCountryAttendance.d.ts +0 -16
- package/dist/src/programmes/policies/DisciplineCountryAttendance.js +0 -54
- package/dist/src/programmes/policies/DisciplineCountryDegree.d.ts +0 -16
- package/dist/src/programmes/policies/DisciplineCountryDegree.js +0 -53
- package/dist/src/programmes/policies/DisciplineCountryFormat.d.ts +0 -15
- package/dist/src/programmes/policies/DisciplineCountryFormat.js +0 -52
- package/dist/src/programmes/policies/DisciplineSpecialProgrammes.d.ts +0 -15
- package/dist/src/programmes/policies/DisciplineSpecialProgrammes.js +0 -46
- package/dist/src/programmes/policies/Duration.d.ts +0 -15
- package/dist/src/programmes/policies/Duration.js +0 -35
- package/dist/src/programmes/policies/Format.d.ts +0 -15
- package/dist/src/programmes/policies/Format.js +0 -35
- package/dist/src/programmes/rules/DegreeAttendanceSpecificRule.d.ts +0 -10
- package/dist/src/programmes/rules/DegreeAttendanceSpecificRule.js +0 -42
- package/dist/src/programmes/rules/DegreeCountrySpecificRule.d.ts +0 -10
- package/dist/src/programmes/rules/DegreeCountrySpecificRule.js +0 -43
- package/dist/src/programmes/rules/DegreeCountryTuitionFeeRule.d.ts +0 -11
- package/dist/src/programmes/rules/DegreeCountryTuitionFeeRule.js +0 -40
- package/dist/src/programmes/rules/MBACountryAttendanceRule.d.ts +0 -11
- package/dist/src/programmes/rules/MBACountryAttendanceRule.js +0 -40
- package/dist/src/programmes/rules/MasterOfArtsDisciplineRule.d.ts +0 -10
- package/dist/src/programmes/rules/MasterOfArtsDisciplineRule.js +0 -41
- package/dist/src/programmes/rules/MasterOfEducationCountryDisciplineRule.d.ts +0 -11
- package/dist/src/programmes/rules/MasterOfEducationCountryDisciplineRule.js +0 -69
- package/dist/src/programmes/rules/MasterOfLawsCountryAttendanceRule.d.ts +0 -12
- package/dist/src/programmes/rules/MasterOfLawsCountryAttendanceRule.js +0 -43
- package/dist/src/programmes/rules/MasterOfLawsCountryTuitionFeeRule.d.ts +0 -12
- package/dist/src/programmes/rules/MasterOfLawsCountryTuitionFeeRule.js +0 -46
- package/dist/src/programmes/rules/MasterOfPhilosophyCountryAttendanceRule.d.ts +0 -12
- package/dist/src/programmes/rules/MasterOfPhilosophyCountryAttendanceRule.js +0 -43
- package/dist/src/programmes/rules/MasterOfScienceDisciplineRule.d.ts +0 -10
- package/dist/src/programmes/rules/MasterOfScienceDisciplineRule.js +0 -41
- package/dist/src/programmes/rules/OneYearOnlyRule.d.ts +0 -11
- package/dist/src/programmes/rules/OneYearOnlyRule.js +0 -34
- package/dist/src/programmes/rules/OnlineAttendanceRule.d.ts +0 -6
- package/dist/src/programmes/rules/OnlineAttendanceRule.js +0 -15
- package/dist/src/sitemap-generator/IPageNumberProvider.d.ts +0 -3
- package/dist/src/sitemap-generator/IPageNumberProvider.js +0 -1
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
-
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
-
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
6
|
-
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
-
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
8
|
-
import { CountryPresenter } from '../../presenters/CountryPresenter';
|
|
9
|
-
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
10
|
-
export class DisciplineCountryDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
11
|
-
name = 'Discipline Country Degree Policy';
|
|
12
|
-
description = `Determines indexing rules for pages filtered by discipline,
|
|
13
|
-
country, and degree type.`;
|
|
14
|
-
filterKeys = [FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.DEGREE_TYPE];
|
|
15
|
-
rules = [
|
|
16
|
-
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
17
|
-
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
18
|
-
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
19
|
-
new OnlyFiltersSelectedRule([FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.DEGREE_TYPE]),
|
|
20
|
-
new IndexableDegreeRule()
|
|
21
|
-
];
|
|
22
|
-
constructor(dependencies) {
|
|
23
|
-
super(dependencies);
|
|
24
|
-
this.initateBaseRules();
|
|
25
|
-
}
|
|
26
|
-
async generateUrls() {
|
|
27
|
-
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
28
|
-
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
29
|
-
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
30
|
-
const paths = [];
|
|
31
|
-
for (const pageNumber of this.indexablePageNumbers) {
|
|
32
|
-
for (const discipline of disciplineFragments) {
|
|
33
|
-
for (const country of countryFragments) {
|
|
34
|
-
for (const degree of degreeFragments) {
|
|
35
|
-
const filterKeyValues = new Map([
|
|
36
|
-
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
37
|
-
[FilterKey.COUNTRY, [country.id]],
|
|
38
|
-
[FilterKey.DEGREE_TYPE, [degree.id]]
|
|
39
|
-
]);
|
|
40
|
-
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
41
|
-
if (result) {
|
|
42
|
-
paths.push(this.getPathWithPageNumber(`${degree.path}/${discipline.path}/${country.path}`, pageNumber));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return paths;
|
|
49
|
-
}
|
|
50
|
-
get filterCombination() {
|
|
51
|
-
return FilterCombinations.DISCIPLINE_COUNTRY_DEGREE;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
-
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
-
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
-
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
-
export declare class DisciplineCountryFormat extends ProgrammesBaseIndexabilityPolicy {
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly description: string;
|
|
10
|
-
readonly filterKeys: FilterKey[];
|
|
11
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule)[];
|
|
12
|
-
constructor(dependencies: IProgrammeSeoDependencies);
|
|
13
|
-
protected generateUrls(): Promise<string[]>;
|
|
14
|
-
get filterCombination(): FilterCombinations;
|
|
15
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
-
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
-
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
-
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
7
|
-
import { CountryPresenter } from '../../presenters/CountryPresenter';
|
|
8
|
-
import { FormatPresenter } from '../../presenters/FormatPresenter';
|
|
9
|
-
export class DisciplineCountryFormat extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
-
name = 'Discipline Country Format Policy';
|
|
11
|
-
description = 'Determines indexing rules for pages filtered by both discipline, country, and format.';
|
|
12
|
-
filterKeys = [FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.ATTENDANCE];
|
|
13
|
-
rules = [
|
|
14
|
-
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
15
|
-
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
16
|
-
new SingleValueSelectedForFilterRule(FilterKey.ATTENDANCE),
|
|
17
|
-
new OnlyFiltersSelectedRule([FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.ATTENDANCE]),
|
|
18
|
-
];
|
|
19
|
-
constructor(dependencies) {
|
|
20
|
-
super(dependencies);
|
|
21
|
-
this.initateBaseRules();
|
|
22
|
-
}
|
|
23
|
-
async generateUrls() {
|
|
24
|
-
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
25
|
-
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
26
|
-
const formatFragments = FormatPresenter.getInstance().getFragments();
|
|
27
|
-
const paths = [];
|
|
28
|
-
const allowedFormatIds = ['parttime'];
|
|
29
|
-
const allowedFormats = formatFragments.filter(a => allowedFormatIds.includes(a.id));
|
|
30
|
-
for (const pageNumber of this.indexablePageNumbers) {
|
|
31
|
-
for (const discipline of disciplineFragments) {
|
|
32
|
-
for (const country of countryFragments) {
|
|
33
|
-
for (const format of allowedFormats) {
|
|
34
|
-
const filterKeyValues = new Map([
|
|
35
|
-
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
36
|
-
[FilterKey.COUNTRY, [country.id]],
|
|
37
|
-
[FilterKey.ATTENDANCE, [format.id]]
|
|
38
|
-
]);
|
|
39
|
-
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
40
|
-
if (result) {
|
|
41
|
-
paths.push(this.getPathWithPageNumber(`${format.path}/${discipline.path}/${country.path}`, pageNumber));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return paths;
|
|
48
|
-
}
|
|
49
|
-
get filterCombination() {
|
|
50
|
-
return FilterCombinations.DISCIPLINE_COUNTRY_ATTENDANCE;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
-
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
-
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
-
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
-
export declare class DisciplineSpecialProgrammes extends ProgrammesBaseIndexabilityPolicy {
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly description: string;
|
|
10
|
-
readonly filterKeys: FilterKey[];
|
|
11
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule)[];
|
|
12
|
-
constructor(dependencies: IProgrammeSeoDependencies);
|
|
13
|
-
protected generateUrls(): Promise<string[]>;
|
|
14
|
-
get filterCombination(): FilterCombinations;
|
|
15
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
-
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
-
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
-
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
7
|
-
import { SpecialProgrammesPresenter } from '../../presenters/SpecialProgrammesPresenter';
|
|
8
|
-
export class DisciplineSpecialProgrammes extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
-
name = 'Discipline Special Programmes Policy';
|
|
10
|
-
description = 'Determines indexing rules for pages filtered by discipline and special programmes (Erasmus Mundus).';
|
|
11
|
-
filterKeys = [FilterKey.DISCIPLINES, FilterKey.SPECIAL_PROGRAMMES];
|
|
12
|
-
rules = [
|
|
13
|
-
new SingleValueSelectedForFilterRule(FilterKey.SPECIAL_PROGRAMMES),
|
|
14
|
-
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
15
|
-
new OnlyFiltersSelectedRule([FilterKey.SPECIAL_PROGRAMMES, FilterKey.DISCIPLINES]),
|
|
16
|
-
];
|
|
17
|
-
constructor(dependencies) {
|
|
18
|
-
super(dependencies);
|
|
19
|
-
this.initateBaseRules();
|
|
20
|
-
}
|
|
21
|
-
async generateUrls() {
|
|
22
|
-
const specialProgrammesFragments = SpecialProgrammesPresenter.getInstance().getFragments();
|
|
23
|
-
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
24
|
-
const paths = [];
|
|
25
|
-
const validSpecialProgrammesIds = ['erasmus'];
|
|
26
|
-
const validSpecialProgrammes = specialProgrammesFragments.filter(specialProgramme => validSpecialProgrammesIds.includes(specialProgramme.id));
|
|
27
|
-
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
-
for (const specialProgramme of validSpecialProgrammes) {
|
|
29
|
-
for (const discipline of disciplineFragments) {
|
|
30
|
-
const filterKeyValues = new Map([
|
|
31
|
-
[FilterKey.SPECIAL_PROGRAMMES, [specialProgramme.id]],
|
|
32
|
-
[FilterKey.DISCIPLINES, [discipline.id]]
|
|
33
|
-
]);
|
|
34
|
-
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
-
if (result) {
|
|
36
|
-
paths.push(this.getPathWithPageNumber(`${discipline.path}/${specialProgramme.path}`, pageNumber));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return paths;
|
|
42
|
-
}
|
|
43
|
-
get filterCombination() {
|
|
44
|
-
return FilterCombinations.DISCIPLINE_SPECIAL_PROGRAMMES;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
-
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
-
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
-
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
-
export declare class Duration extends ProgrammesBaseIndexabilityPolicy {
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly description: string;
|
|
10
|
-
readonly filterKeys: FilterKey[];
|
|
11
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule)[];
|
|
12
|
-
constructor(dependencies: IProgrammeSeoDependencies);
|
|
13
|
-
protected generateUrls(): Promise<string[]>;
|
|
14
|
-
get filterCombination(): FilterCombinations;
|
|
15
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
-
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
-
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
-
import { DurationPresenter } from '../../presenters/DurationPresenter';
|
|
7
|
-
export class Duration extends ProgrammesBaseIndexabilityPolicy {
|
|
8
|
-
name = 'Duration Policy';
|
|
9
|
-
description = 'Governs indexing of duration-level filtered pages. (1 year - 2 year)';
|
|
10
|
-
filterKeys = [FilterKey.DURATION];
|
|
11
|
-
rules = [new SingleValueSelectedForFilterRule(FilterKey.DURATION), new OnlyFiltersSelectedRule([FilterKey.DURATION])];
|
|
12
|
-
constructor(dependencies) {
|
|
13
|
-
super(dependencies);
|
|
14
|
-
this.initateBaseRules();
|
|
15
|
-
}
|
|
16
|
-
async generateUrls() {
|
|
17
|
-
const durationFragments = DurationPresenter.getInstance().getFragments();
|
|
18
|
-
const allowedDurationIds = ["[360,360]", "[720,720]"];
|
|
19
|
-
const allowedDurations = durationFragments.filter(duration => allowedDurationIds.includes(duration.id));
|
|
20
|
-
const paths = [];
|
|
21
|
-
for (const pageNumber of this.indexablePageNumbers) {
|
|
22
|
-
for (const duration of allowedDurations) {
|
|
23
|
-
const filterKeyValues = new Map([[FilterKey.DURATION, [duration.id]]]);
|
|
24
|
-
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
25
|
-
if (result) {
|
|
26
|
-
paths.push(this.getPathWithPageNumber(duration.path, pageNumber));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return paths;
|
|
31
|
-
}
|
|
32
|
-
get filterCombination() {
|
|
33
|
-
return FilterCombinations.DURATION;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
-
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
-
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
-
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
-
export declare class Format extends ProgrammesBaseIndexabilityPolicy {
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly description: string;
|
|
10
|
-
readonly filterKeys: FilterKey[];
|
|
11
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule)[];
|
|
12
|
-
constructor(dependencies: IProgrammeSeoDependencies);
|
|
13
|
-
protected generateUrls(): Promise<string[]>;
|
|
14
|
-
get filterCombination(): FilterCombinations;
|
|
15
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
-
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
-
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
-
import { FormatPresenter } from '../../presenters/FormatPresenter';
|
|
7
|
-
export class Format extends ProgrammesBaseIndexabilityPolicy {
|
|
8
|
-
name = 'Format Policy';
|
|
9
|
-
description = 'Governs indexing of format-level filtered pages.';
|
|
10
|
-
filterKeys = [FilterKey.ATTENDANCE];
|
|
11
|
-
rules = [new SingleValueSelectedForFilterRule(FilterKey.ATTENDANCE), new OnlyFiltersSelectedRule([FilterKey.ATTENDANCE])];
|
|
12
|
-
constructor(dependencies) {
|
|
13
|
-
super(dependencies);
|
|
14
|
-
this.initateBaseRules();
|
|
15
|
-
}
|
|
16
|
-
async generateUrls() {
|
|
17
|
-
const formatFragments = FormatPresenter.getInstance().getFragments();
|
|
18
|
-
const allowedFormatIds = ["fulltime", "parttime"];
|
|
19
|
-
const allowedFormats = formatFragments.filter(format => allowedFormatIds.includes(format.id));
|
|
20
|
-
const paths = [];
|
|
21
|
-
for (const pageNumber of this.indexablePageNumbers) {
|
|
22
|
-
for (const format of allowedFormats) {
|
|
23
|
-
const filterKeyValues = new Map([[FilterKey.ATTENDANCE, [format.id]]]);
|
|
24
|
-
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
25
|
-
if (result) {
|
|
26
|
-
paths.push(this.getPathWithPageNumber(format.path, pageNumber));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return paths;
|
|
31
|
-
}
|
|
32
|
-
get filterCombination() {
|
|
33
|
-
return FilterCombinations.ATTENDANCE;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ISearchDependencies } from '../../common/ISearchDependencies';
|
|
2
|
-
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
3
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
-
export declare class DegreeAttendanceSpecificRule extends BaseProgrammeRule {
|
|
5
|
-
private readonly validCombinations;
|
|
6
|
-
getName(): string;
|
|
7
|
-
getDescription(): string;
|
|
8
|
-
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
9
|
-
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
10
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
3
|
-
export class DegreeAttendanceSpecificRule extends BaseProgrammeRule {
|
|
4
|
-
validCombinations = {
|
|
5
|
-
'master-of-science': ['online'], // MSc with online attendance
|
|
6
|
-
'master-of-arts': ['online'], // MA with online attendance
|
|
7
|
-
'master-of-business-administration': ['online'] // MBA with online attendance
|
|
8
|
-
};
|
|
9
|
-
getName() {
|
|
10
|
-
return 'DegreeAttendanceSpecificRule';
|
|
11
|
-
}
|
|
12
|
-
getDescription() {
|
|
13
|
-
return 'Indexes: master-of-science (online); master-of-arts (online); master-of-business-administration (online)';
|
|
14
|
-
}
|
|
15
|
-
forSearch(dependencies) {
|
|
16
|
-
const { seoInfoBase, filterState } = dependencies;
|
|
17
|
-
const degreeTypeValue = seoInfoBase.getFilterOptionValueBy(FilterKey.DEGREE_TYPE, filterState);
|
|
18
|
-
const attendanceValue = seoInfoBase.getFilterOptionValueBy(FilterKey.DELIVERY_METHOD, filterState);
|
|
19
|
-
if (!degreeTypeValue || !attendanceValue) {
|
|
20
|
-
return Promise.resolve(false);
|
|
21
|
-
}
|
|
22
|
-
const allowedAttendance = this.validCombinations[degreeTypeValue];
|
|
23
|
-
if (!allowedAttendance) {
|
|
24
|
-
return Promise.resolve(false);
|
|
25
|
-
}
|
|
26
|
-
return Promise.resolve(allowedAttendance.includes(attendanceValue));
|
|
27
|
-
}
|
|
28
|
-
forSitemapGenerator(filterKeyValues) {
|
|
29
|
-
const degreeTypeValues = filterKeyValues.get(FilterKey.DEGREE_TYPE);
|
|
30
|
-
const attendanceValues = filterKeyValues.get(FilterKey.DELIVERY_METHOD);
|
|
31
|
-
if (!degreeTypeValues?.length || !attendanceValues?.length) {
|
|
32
|
-
return Promise.resolve(false);
|
|
33
|
-
}
|
|
34
|
-
const degreeTypeValue = degreeTypeValues[0];
|
|
35
|
-
const attendanceValue = attendanceValues[0];
|
|
36
|
-
const allowedAttendance = this.validCombinations[degreeTypeValue];
|
|
37
|
-
if (!allowedAttendance) {
|
|
38
|
-
return Promise.resolve(false);
|
|
39
|
-
}
|
|
40
|
-
return Promise.resolve(allowedAttendance.includes(attendanceValue));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ISearchDependencies } from '../../common/ISearchDependencies';
|
|
2
|
-
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
3
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
-
export declare class DegreeCountrySpecificRule extends BaseProgrammeRule {
|
|
5
|
-
private readonly validCombinations;
|
|
6
|
-
getName(): string;
|
|
7
|
-
getDescription(): string;
|
|
8
|
-
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
9
|
-
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
10
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { DegreeTypeFilterOptionValue } from '@studyportals/search-filters';
|
|
3
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
-
export class DegreeCountrySpecificRule extends BaseProgrammeRule {
|
|
5
|
-
validCombinations = {
|
|
6
|
-
[DegreeTypeFilterOptionValue.MSC]: ['82', '56', '11', '30'],
|
|
7
|
-
[DegreeTypeFilterOptionValue.MBA]: ['82', '30'],
|
|
8
|
-
[DegreeTypeFilterOptionValue.MED]: ['202', '56']
|
|
9
|
-
};
|
|
10
|
-
getName() {
|
|
11
|
-
return 'DegreeCountrySpecificRule';
|
|
12
|
-
}
|
|
13
|
-
getDescription() {
|
|
14
|
-
return 'Indexes: master-of-science (USA, Canada, Germany, UK); master-of-business-administration (USA, UK); master-of-education (Australia, Canada)';
|
|
15
|
-
}
|
|
16
|
-
forSearch(dependencies) {
|
|
17
|
-
const { seoInfoBase, filterState } = dependencies;
|
|
18
|
-
const degreeTypeValue = seoInfoBase.getFilterOptionValueBy(FilterKey.DEGREE_TYPE, filterState);
|
|
19
|
-
const countryValue = seoInfoBase.getFilterOptionValueBy(FilterKey.COUNTRY, filterState);
|
|
20
|
-
if (!degreeTypeValue || !countryValue) {
|
|
21
|
-
return Promise.resolve(false);
|
|
22
|
-
}
|
|
23
|
-
const allowedCountries = this.validCombinations[degreeTypeValue];
|
|
24
|
-
if (!allowedCountries) {
|
|
25
|
-
return Promise.resolve(false);
|
|
26
|
-
}
|
|
27
|
-
return Promise.resolve(allowedCountries.includes(countryValue));
|
|
28
|
-
}
|
|
29
|
-
forSitemapGenerator(filterKeyValues) {
|
|
30
|
-
const degreeTypeValues = filterKeyValues.get(FilterKey.DEGREE_TYPE);
|
|
31
|
-
const countryValues = filterKeyValues.get(FilterKey.COUNTRY);
|
|
32
|
-
if (!degreeTypeValues?.length || !countryValues?.length) {
|
|
33
|
-
return Promise.resolve(false);
|
|
34
|
-
}
|
|
35
|
-
const degreeTypeValue = degreeTypeValues[0];
|
|
36
|
-
const countryValue = countryValues[0];
|
|
37
|
-
const allowedCountries = this.validCombinations[degreeTypeValue];
|
|
38
|
-
if (!allowedCountries) {
|
|
39
|
-
return Promise.resolve(false);
|
|
40
|
-
}
|
|
41
|
-
return Promise.resolve(allowedCountries.includes(countryValue));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ISearchDependencies } from '../../common/ISearchDependencies';
|
|
2
|
-
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
3
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
-
export declare class DegreeCountryTuitionFeeRule extends BaseProgrammeRule {
|
|
5
|
-
private readonly degreeValue;
|
|
6
|
-
private readonly tuitionFeeValue;
|
|
7
|
-
getName(): string;
|
|
8
|
-
getDescription(): string;
|
|
9
|
-
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
10
|
-
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
11
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { TuitionFeeFilterOptionValue } from '@studyportals/search-filters';
|
|
3
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
-
export class DegreeCountryTuitionFeeRule extends BaseProgrammeRule {
|
|
5
|
-
degreeValue = 'master-of-business-administration';
|
|
6
|
-
tuitionFeeValue = TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED;
|
|
7
|
-
getName() {
|
|
8
|
-
return 'DegreeCountryTuitionFeeRule';
|
|
9
|
-
}
|
|
10
|
-
getDescription() {
|
|
11
|
-
return 'Indexes: master-of-business-administration + all countries + affordable tuition (0-2500)';
|
|
12
|
-
}
|
|
13
|
-
forSearch(dependencies) {
|
|
14
|
-
const { seoInfoBase, filterState } = dependencies;
|
|
15
|
-
const degreeTypeValue = seoInfoBase.getFilterOptionValueBy(FilterKey.DEGREE_TYPE, filterState);
|
|
16
|
-
const countryValue = seoInfoBase.getFilterOptionValueBy(FilterKey.COUNTRY, filterState);
|
|
17
|
-
const tuitionFeeValue = seoInfoBase.getFilterOptionValueBy(FilterKey.TUITION_FEE, filterState);
|
|
18
|
-
if (degreeTypeValue !== this.degreeValue) {
|
|
19
|
-
return Promise.resolve(true);
|
|
20
|
-
}
|
|
21
|
-
if (!countryValue || !tuitionFeeValue) {
|
|
22
|
-
return Promise.resolve(false);
|
|
23
|
-
}
|
|
24
|
-
return Promise.resolve(tuitionFeeValue === this.tuitionFeeValue);
|
|
25
|
-
}
|
|
26
|
-
forSitemapGenerator(filterKeyValues) {
|
|
27
|
-
const degreeTypeValues = filterKeyValues.get(FilterKey.DEGREE_TYPE);
|
|
28
|
-
const countryValues = filterKeyValues.get(FilterKey.COUNTRY);
|
|
29
|
-
const tuitionFeeValues = filterKeyValues.get(FilterKey.TUITION_FEE);
|
|
30
|
-
if (!degreeTypeValues?.length || !countryValues?.length || !tuitionFeeValues?.length) {
|
|
31
|
-
return Promise.resolve(false);
|
|
32
|
-
}
|
|
33
|
-
const degreeTypeValue = degreeTypeValues[0];
|
|
34
|
-
const tuitionFeeValue = tuitionFeeValues[0];
|
|
35
|
-
if (degreeTypeValue !== this.degreeValue) {
|
|
36
|
-
return Promise.resolve(true);
|
|
37
|
-
}
|
|
38
|
-
return Promise.resolve(tuitionFeeValue === this.tuitionFeeValue);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ISearchDependencies } from '../../common/ISearchDependencies';
|
|
2
|
-
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
3
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
-
export declare class MbaCountryAttendanceRule extends BaseProgrammeRule {
|
|
5
|
-
private readonly degreeValue;
|
|
6
|
-
private readonly attendanceValue;
|
|
7
|
-
getName(): string;
|
|
8
|
-
getDescription(): string;
|
|
9
|
-
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
10
|
-
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
11
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { DegreeTypeFilterOptionValue } from '@studyportals/search-filters';
|
|
3
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
-
export class MbaCountryAttendanceRule extends BaseProgrammeRule {
|
|
5
|
-
degreeValue = DegreeTypeFilterOptionValue.MBA;
|
|
6
|
-
attendanceValue = 'online';
|
|
7
|
-
getName() {
|
|
8
|
-
return 'MbaCountryAttendanceRule';
|
|
9
|
-
}
|
|
10
|
-
getDescription() {
|
|
11
|
-
return 'Indexes: master-of-business-administration + all countries + online attendance';
|
|
12
|
-
}
|
|
13
|
-
forSearch(dependencies) {
|
|
14
|
-
const { seoInfoBase, filterState } = dependencies;
|
|
15
|
-
const degreeTypeValue = seoInfoBase.getFilterOptionValueBy(FilterKey.DEGREE_TYPE, filterState);
|
|
16
|
-
const countryValue = seoInfoBase.getFilterOptionValueBy(FilterKey.COUNTRY, filterState);
|
|
17
|
-
const attendanceValue = seoInfoBase.getFilterOptionValueBy(FilterKey.DELIVERY_METHOD, filterState);
|
|
18
|
-
if (degreeTypeValue !== this.degreeValue) {
|
|
19
|
-
return Promise.resolve(true);
|
|
20
|
-
}
|
|
21
|
-
if (!countryValue || !attendanceValue) {
|
|
22
|
-
return Promise.resolve(false);
|
|
23
|
-
}
|
|
24
|
-
return Promise.resolve(attendanceValue === this.attendanceValue);
|
|
25
|
-
}
|
|
26
|
-
forSitemapGenerator(filterKeyValues) {
|
|
27
|
-
const degreeTypeValues = filterKeyValues.get(FilterKey.DEGREE_TYPE);
|
|
28
|
-
const countryValues = filterKeyValues.get(FilterKey.COUNTRY);
|
|
29
|
-
const attendanceValues = filterKeyValues.get(FilterKey.DELIVERY_METHOD);
|
|
30
|
-
if (!degreeTypeValues?.length || !countryValues?.length || !attendanceValues?.length) {
|
|
31
|
-
return Promise.resolve(false);
|
|
32
|
-
}
|
|
33
|
-
const degreeTypeValue = degreeTypeValues[0];
|
|
34
|
-
const attendanceValue = attendanceValues[0];
|
|
35
|
-
if (degreeTypeValue !== this.degreeValue) {
|
|
36
|
-
return Promise.resolve(true);
|
|
37
|
-
}
|
|
38
|
-
return Promise.resolve(attendanceValue === this.attendanceValue);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ISearchDependencies } from '../../common/ISearchDependencies';
|
|
2
|
-
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
3
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
-
export declare class MasterOfArtsDisciplineRule extends BaseProgrammeRule {
|
|
5
|
-
private readonly degreeValue;
|
|
6
|
-
getName(): string;
|
|
7
|
-
getDescription(): string;
|
|
8
|
-
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
9
|
-
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
10
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
3
|
-
export class MasterOfArtsDisciplineRule extends BaseProgrammeRule {
|
|
4
|
-
// Master of Arts accepts all disciplines
|
|
5
|
-
degreeValue = 'master-of-arts';
|
|
6
|
-
getName() {
|
|
7
|
-
return 'MasterOfArtsDisciplineRule';
|
|
8
|
-
}
|
|
9
|
-
getDescription() {
|
|
10
|
-
return 'Indexes: master-of-arts + all disciplines';
|
|
11
|
-
}
|
|
12
|
-
forSearch(dependencies) {
|
|
13
|
-
const { seoInfoBase, filterState } = dependencies;
|
|
14
|
-
const degreeTypeValue = seoInfoBase.getFilterOptionValueBy(FilterKey.DEGREE_TYPE, filterState);
|
|
15
|
-
const disciplineValue = seoInfoBase.getFilterOptionValueBy(FilterKey.DISCIPLINES, filterState);
|
|
16
|
-
// This rule only applies to Master of Arts
|
|
17
|
-
if (degreeTypeValue !== this.degreeValue) {
|
|
18
|
-
return Promise.resolve(true); // Rule doesn't apply to other degrees
|
|
19
|
-
}
|
|
20
|
-
// Must have a discipline selected
|
|
21
|
-
if (!disciplineValue) {
|
|
22
|
-
return Promise.resolve(false);
|
|
23
|
-
}
|
|
24
|
-
// Master of Arts accepts all disciplines
|
|
25
|
-
return Promise.resolve(true);
|
|
26
|
-
}
|
|
27
|
-
forSitemapGenerator(filterKeyValues) {
|
|
28
|
-
const degreeTypeValues = filterKeyValues.get(FilterKey.DEGREE_TYPE);
|
|
29
|
-
const disciplineValues = filterKeyValues.get(FilterKey.DISCIPLINES);
|
|
30
|
-
if (!degreeTypeValues?.length || !disciplineValues?.length) {
|
|
31
|
-
return Promise.resolve(false);
|
|
32
|
-
}
|
|
33
|
-
const degreeTypeValue = degreeTypeValues[0];
|
|
34
|
-
// This rule only applies to Master of Arts
|
|
35
|
-
if (degreeTypeValue !== this.degreeValue) {
|
|
36
|
-
return Promise.resolve(true); // Rule doesn't apply to other degrees
|
|
37
|
-
}
|
|
38
|
-
// Master of Arts accepts all disciplines
|
|
39
|
-
return Promise.resolve(true);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ISearchDependencies } from '../../common/ISearchDependencies';
|
|
2
|
-
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
3
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
-
export declare class MasterOfEducationCountryDisciplineRule extends BaseProgrammeRule {
|
|
5
|
-
private readonly educationDisciplineIds;
|
|
6
|
-
private readonly allowedCountryIds;
|
|
7
|
-
getName(): string;
|
|
8
|
-
getDescription(): string;
|
|
9
|
-
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
10
|
-
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
11
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { DegreeTypeFilterOptionValue } from '@studyportals/search-filters';
|
|
3
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
-
export class MasterOfEducationCountryDisciplineRule extends BaseProgrammeRule {
|
|
5
|
-
educationDisciplineIds = [
|
|
6
|
-
'289', // Education & Training (main discipline)
|
|
7
|
-
'290', // Adult Education
|
|
8
|
-
'360', // Art Education
|
|
9
|
-
'291', // Coaching
|
|
10
|
-
'292', // School Counselling
|
|
11
|
-
'333', // Early Childhood Education
|
|
12
|
-
'8', // Education
|
|
13
|
-
'349', // Educational Leadership
|
|
14
|
-
'293', // Educational Psychology
|
|
15
|
-
'98', // Educational Research
|
|
16
|
-
'371', // Health Education
|
|
17
|
-
'363', // Higher Education
|
|
18
|
-
'355', // Instructional Design
|
|
19
|
-
'370', // Literacy Education
|
|
20
|
-
'348', // Primary Education
|
|
21
|
-
'97', // Special Education
|
|
22
|
-
'359', // Secondary Education
|
|
23
|
-
'345', // STEM Education
|
|
24
|
-
'295', // Teaching
|
|
25
|
-
'358' // Teaching English as a Foreign Language
|
|
26
|
-
];
|
|
27
|
-
// Australia (202), Canada (32)
|
|
28
|
-
allowedCountryIds = ['202', '32'];
|
|
29
|
-
getName() {
|
|
30
|
-
return 'MasterOfEducationCountryDisciplineRule';
|
|
31
|
-
}
|
|
32
|
-
getDescription() {
|
|
33
|
-
return 'Indexes: master-of-education (Australia, Canada) + education disciplines only';
|
|
34
|
-
}
|
|
35
|
-
forSearch(dependencies) {
|
|
36
|
-
const { seoInfoBase, filterState } = dependencies;
|
|
37
|
-
const degreeTypeValue = seoInfoBase.getFilterOptionValueBy(FilterKey.DEGREE_TYPE, filterState);
|
|
38
|
-
const countryValue = seoInfoBase.getFilterOptionValueBy(FilterKey.COUNTRY, filterState);
|
|
39
|
-
const disciplineValue = seoInfoBase.getFilterOptionValueBy(FilterKey.DISCIPLINES, filterState);
|
|
40
|
-
if (degreeTypeValue !== DegreeTypeFilterOptionValue.MED) {
|
|
41
|
-
return Promise.resolve(true);
|
|
42
|
-
}
|
|
43
|
-
if (!countryValue || !disciplineValue) {
|
|
44
|
-
return Promise.resolve(false);
|
|
45
|
-
}
|
|
46
|
-
if (!this.allowedCountryIds.includes(countryValue)) {
|
|
47
|
-
return Promise.resolve(false);
|
|
48
|
-
}
|
|
49
|
-
return Promise.resolve(this.educationDisciplineIds.includes(disciplineValue));
|
|
50
|
-
}
|
|
51
|
-
forSitemapGenerator(filterKeyValues) {
|
|
52
|
-
const degreeTypeValues = filterKeyValues.get(FilterKey.DEGREE_TYPE);
|
|
53
|
-
const countryValues = filterKeyValues.get(FilterKey.COUNTRY);
|
|
54
|
-
const disciplineValues = filterKeyValues.get(FilterKey.DISCIPLINES);
|
|
55
|
-
if (!degreeTypeValues?.length || !countryValues?.length || !disciplineValues?.length) {
|
|
56
|
-
return Promise.resolve(false);
|
|
57
|
-
}
|
|
58
|
-
const degreeTypeValue = degreeTypeValues[0];
|
|
59
|
-
const countryValue = countryValues[0];
|
|
60
|
-
const disciplineValue = disciplineValues[0];
|
|
61
|
-
if (degreeTypeValue !== DegreeTypeFilterOptionValue.MED.valueOf()) {
|
|
62
|
-
return Promise.resolve(true);
|
|
63
|
-
}
|
|
64
|
-
if (!this.allowedCountryIds.includes(countryValue)) {
|
|
65
|
-
return Promise.resolve(false);
|
|
66
|
-
}
|
|
67
|
-
return Promise.resolve(this.educationDisciplineIds.includes(disciplineValue));
|
|
68
|
-
}
|
|
69
|
-
}
|