@studyportals/fawkes 8.1.2-2 → 8.1.2-4
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/src/common/IPolicyMetaData.d.ts +6 -0
- package/dist/src/common/rules/BaseFilterKeyValueRule.js +10 -3
- package/dist/src/enums/FilterCombinations.d.ts +26 -1
- package/dist/src/enums/FilterCombinations.js +26 -1
- package/dist/src/organisations/OrganisationsRuleBasedIndexabilityPolicy.d.ts +11 -0
- package/dist/src/organisations/OrganisationsRuleBasedIndexabilityPolicy.js +19 -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/OnlineAttendanceRule.d.ts +6 -0
- package/dist/src/organisations/rules/OnlineAttendanceRule.js +14 -0
- package/dist/src/presenters/AttendancePresenter.js +4 -0
- package/dist/src/presenters/FormatPresenter.js +4 -1
- package/dist/src/presenters/SpecialProgrammesPresenter.js +4 -0
- package/dist/src/programmes/IProgrammeSearchApplicationState.d.ts +4 -0
- package/dist/src/programmes/IProgrammeSearchApplicationState.js +1 -0
- package/dist/src/programmes/IProgrammeSearchDependencies.d.ts +7 -0
- package/dist/src/programmes/IProgrammeSearchDependencies.js +1 -0
- package/dist/src/programmes/IProgrammesSeoDependencies.d.ts +2 -0
- package/dist/src/programmes/IProgrammesSeoDependencies.js +1 -0
- package/dist/src/programmes/SearchIndexabilityManager.js +31 -3
- package/dist/src/programmes/policies/AttendanceArea.d.ts +16 -0
- package/dist/src/programmes/policies/AttendanceArea.js +48 -0
- package/dist/src/programmes/policies/AttendanceContinent.d.ts +16 -0
- package/dist/src/programmes/policies/AttendanceContinent.js +46 -0
- package/dist/src/programmes/policies/AttendanceDegree.d.ts +3 -3
- package/dist/src/programmes/policies/AttendanceDegree.js +4 -4
- package/dist/src/programmes/policies/AttendanceDuration.d.ts +17 -0
- package/dist/src/programmes/policies/AttendanceDuration.js +50 -0
- package/dist/src/programmes/policies/AttendanceFormat.d.ts +16 -0
- package/dist/src/programmes/policies/AttendanceFormat.js +48 -0
- package/dist/src/programmes/policies/AttendanceTuitionFee.d.ts +17 -0
- package/dist/src/programmes/policies/AttendanceTuitionFee.js +51 -0
- package/dist/src/programmes/policies/ContinentDuration.d.ts +16 -0
- package/dist/src/programmes/policies/ContinentDuration.js +48 -0
- package/dist/src/programmes/policies/ContinentFormat.d.ts +16 -0
- package/dist/src/programmes/policies/ContinentFormat.js +48 -0
- package/dist/src/programmes/policies/ContinentSpecialProgrammes.d.ts +16 -0
- package/dist/src/programmes/policies/ContinentSpecialProgrammes.js +48 -0
- package/dist/src/programmes/policies/CountryDuration.d.ts +2 -2
- package/dist/src/programmes/policies/CountryDuration.js +6 -4
- package/dist/src/programmes/policies/CountrySpecialProgrammes.d.ts +16 -0
- package/dist/src/programmes/policies/CountrySpecialProgrammes.js +48 -0
- package/dist/src/programmes/policies/DegreeArea.d.ts +15 -0
- package/dist/src/programmes/policies/DegreeArea.js +46 -0
- package/dist/src/programmes/policies/DegreeAreaTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeAreaTuitionFee.js +54 -0
- package/dist/src/programmes/policies/DegreeAttendanceDiscipline.d.ts +2 -1
- package/dist/src/programmes/policies/DegreeAttendanceDiscipline.js +12 -12
- package/dist/src/programmes/policies/DegreeAttendanceFormat.d.ts +17 -0
- package/dist/src/programmes/policies/DegreeAttendanceFormat.js +56 -0
- package/dist/src/programmes/policies/DegreeAttendanceSpecialProgrammes.d.ts +17 -0
- package/dist/src/programmes/policies/DegreeAttendanceSpecialProgrammes.js +58 -0
- package/dist/src/programmes/policies/DegreeAttendanceTuitionFee.d.ts +18 -0
- package/dist/src/programmes/policies/DegreeAttendanceTuitionFee.js +59 -0
- package/dist/src/programmes/policies/DegreeContinent.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeContinent.js +46 -0
- package/dist/src/programmes/policies/DegreeContinentTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeContinentTuitionFee.js +52 -0
- package/dist/src/programmes/policies/DegreeCountryAttendance.js +3 -3
- package/dist/src/programmes/policies/DegreeCountryTuitionFee.js +2 -2
- package/dist/src/programmes/policies/DegreeDuration.d.ts +17 -0
- package/dist/src/programmes/policies/DegreeDuration.js +50 -0
- package/dist/src/programmes/policies/DegreeFormat.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeFormat.js +48 -0
- package/dist/src/programmes/policies/DegreeFormatTuitionFee.d.ts +18 -0
- package/dist/src/programmes/policies/DegreeFormatTuitionFee.js +56 -0
- package/dist/src/programmes/policies/DegreeSpecialProgrammes.d.ts +17 -0
- package/dist/src/programmes/policies/DegreeSpecialProgrammes.js +52 -0
- package/dist/src/programmes/policies/DegreeTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeTuitionFee.js +49 -0
- package/dist/src/programmes/policies/DisciplineArea.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineArea.js +1 -1
- package/dist/src/programmes/policies/DisciplineContinentAttendance.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineContinentAttendance.js +54 -0
- package/dist/src/programmes/policies/DisciplineCountryAttendance.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineCountryAttendance.js +54 -0
- package/dist/src/programmes/policies/DisciplineCountryDegree.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineCountryDegree.js +53 -0
- package/dist/src/programmes/policies/DisciplineCountryFormat.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineCountryFormat.js +54 -0
- package/dist/src/programmes/policies/DisciplineDuration.d.ts +2 -2
- package/dist/src/programmes/policies/DisciplineDuration.js +2 -2
- package/dist/src/programmes/policies/DisciplineSpecialProgrammes.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineSpecialProgrammes.js +48 -0
- package/dist/src/programmes/policies/DisciplineTuitionFee.js +1 -1
- package/dist/src/programmes/policies/Duration.d.ts +16 -0
- package/dist/src/programmes/policies/Duration.js +40 -0
- package/dist/src/programmes/policies/Format.d.ts +15 -0
- package/dist/src/programmes/policies/Format.js +36 -0
- package/dist/src/programmes/policies/SpecialProgrammes.d.ts +1 -2
- package/dist/src/programmes/policies/SpecialProgrammes.js +0 -2
- package/dist/src/programmes/policies/index.d.ts +29 -1
- package/dist/src/programmes/policies/index.js +29 -1
- package/dist/src/programmes/rules/AtLeastSevenResultsRule.d.ts +15 -0
- package/dist/src/programmes/rules/AtLeastSevenResultsRule.js +30 -0
- package/dist/src/programmes/rules/BlendedOrOnlineAttendanceRule.d.ts +6 -0
- package/dist/src/programmes/rules/BlendedOrOnlineAttendanceRule.js +18 -0
- package/dist/src/programmes/rules/DegreeAttendanceSpecificRule.d.ts +10 -0
- package/dist/src/programmes/rules/DegreeAttendanceSpecificRule.js +42 -0
- package/dist/src/programmes/rules/DegreeCountrySpecificRule.d.ts +10 -0
- package/dist/src/programmes/rules/DegreeCountrySpecificRule.js +43 -0
- package/dist/src/programmes/rules/DegreeCountryTuitionFeeRule.d.ts +11 -0
- package/dist/src/programmes/rules/DegreeCountryTuitionFeeRule.js +40 -0
- package/dist/src/programmes/rules/ErasmusOrExecutiveSpecialProgrammeRule.d.ts +6 -0
- package/dist/src/programmes/rules/ErasmusOrExecutiveSpecialProgrammeRule.js +19 -0
- package/dist/src/programmes/rules/ErasmusOrJointSpecialProgrammesRule.js +2 -2
- package/dist/src/programmes/rules/ErasmusSpecialProgrammeRule.d.ts +6 -0
- package/dist/src/programmes/rules/ErasmusSpecialProgrammeRule.js +19 -0
- package/dist/src/programmes/rules/ExecutiveSpecialProgrammeRule.d.ts +6 -0
- package/dist/src/programmes/rules/ExecutiveSpecialProgrammeRule.js +19 -0
- package/dist/src/programmes/rules/MBACountryAttendanceRule.d.ts +11 -0
- package/dist/src/programmes/rules/MBACountryAttendanceRule.js +40 -0
- package/dist/src/programmes/rules/MasterOfArtsDisciplineRule.d.ts +10 -0
- package/dist/src/programmes/rules/MasterOfArtsDisciplineRule.js +41 -0
- package/dist/src/programmes/rules/MasterOfEducationCountryDisciplineRule.d.ts +11 -0
- package/dist/src/programmes/rules/MasterOfEducationCountryDisciplineRule.js +69 -0
- package/dist/src/programmes/rules/MasterOfLawsCountryAttendanceRule.d.ts +12 -0
- package/dist/src/programmes/rules/MasterOfLawsCountryAttendanceRule.js +43 -0
- package/dist/src/programmes/rules/MasterOfLawsCountryTuitionFeeRule.d.ts +12 -0
- package/dist/src/programmes/rules/MasterOfLawsCountryTuitionFeeRule.js +46 -0
- package/dist/src/programmes/rules/MasterOfPhilosophyCountryAttendanceRule.d.ts +12 -0
- package/dist/src/programmes/rules/MasterOfPhilosophyCountryAttendanceRule.js +43 -0
- package/dist/src/programmes/rules/MasterOfScienceDisciplineRule.d.ts +10 -0
- package/dist/src/programmes/rules/MasterOfScienceDisciplineRule.js +41 -0
- package/dist/src/programmes/rules/OneOrTwoYearDurationRule.d.ts +6 -0
- package/dist/src/programmes/rules/OneOrTwoYearDurationRule.js +19 -0
- package/dist/src/programmes/rules/OneYearOnlyRule.d.ts +11 -0
- package/dist/src/programmes/rules/OneYearOnlyRule.js +34 -0
- package/dist/src/programmes/rules/OnlineAttendanceRule.d.ts +6 -0
- package/dist/src/programmes/rules/OnlineAttendanceRule.js +15 -0
- package/dist/src/programmes/rules/TwoYearDurationRule.d.ts +6 -0
- package/dist/src/programmes/rules/TwoYearDurationRule.js +19 -0
- package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.js +0 -1
- package/dist/src/sitemap-generator/IPageNumberProvider.d.ts +3 -0
- package/dist/src/sitemap-generator/IPageNumberProvider.js +1 -0
- package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.js +29 -4
- package/dist/src/structured-data/SearchStructuredDataFactory.d.ts +2 -22
- package/dist/src/structured-data/SearchStructuredDataFactory.js +7 -64
- package/dist/src/structured-data/dto/EntityDTO.d.ts +0 -2
- package/dist/src/structured-data/dto/index.d.ts +0 -1
- package/dist/src/structured-data/dto/index.js +0 -1
- package/package.json +6 -6
- package/dist/src/structured-data/ScholarshipStructuredDataFactory.d.ts +0 -14
- package/dist/src/structured-data/ScholarshipStructuredDataFactory.js +0 -69
- package/dist/src/structured-data/dto/PaywallDTO.d.ts +0 -14
- /package/dist/src/{structured-data/dto/PaywallDTO.js → common/IPolicyMetaData.js} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ISearchDependencies } from '../../common/ISearchDependencies';
|
|
2
|
+
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
3
|
+
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
+
export declare class MasterOfLawsCountryAttendanceRule extends BaseProgrammeRule {
|
|
5
|
+
private readonly degreeValue;
|
|
6
|
+
private readonly attendanceValue;
|
|
7
|
+
private readonly allowedCountryIds;
|
|
8
|
+
getName(): string;
|
|
9
|
+
getDescription(): string;
|
|
10
|
+
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
11
|
+
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
+
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
3
|
+
export class MasterOfLawsCountryAttendanceRule extends BaseProgrammeRule {
|
|
4
|
+
degreeValue = 'master-of-laws';
|
|
5
|
+
attendanceValue = 'online';
|
|
6
|
+
allowedCountryIds = ['82', '30', '32', '108'];
|
|
7
|
+
getName() {
|
|
8
|
+
return 'MasterOfLawsCountryAttendanceRule';
|
|
9
|
+
}
|
|
10
|
+
getDescription() {
|
|
11
|
+
return 'Indexes: master-of-laws (USA, UK, Canada, India) + 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(this.allowedCountryIds.includes(countryValue) &&
|
|
25
|
+
attendanceValue === this.attendanceValue);
|
|
26
|
+
}
|
|
27
|
+
forSitemapGenerator(filterKeyValues) {
|
|
28
|
+
const degreeTypeValues = filterKeyValues.get(FilterKey.DEGREE_TYPE);
|
|
29
|
+
const countryValues = filterKeyValues.get(FilterKey.COUNTRY);
|
|
30
|
+
const attendanceValues = filterKeyValues.get(FilterKey.DELIVERY_METHOD);
|
|
31
|
+
if (!degreeTypeValues?.length || !countryValues?.length || !attendanceValues?.length) {
|
|
32
|
+
return Promise.resolve(false);
|
|
33
|
+
}
|
|
34
|
+
const degreeTypeValue = degreeTypeValues[0];
|
|
35
|
+
const countryValue = countryValues[0];
|
|
36
|
+
const attendanceValue = attendanceValues[0];
|
|
37
|
+
if (degreeTypeValue !== this.degreeValue) {
|
|
38
|
+
return Promise.resolve(true);
|
|
39
|
+
}
|
|
40
|
+
return Promise.resolve(this.allowedCountryIds.includes(countryValue) &&
|
|
41
|
+
attendanceValue === this.attendanceValue);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ISearchDependencies } from '../../common/ISearchDependencies';
|
|
2
|
+
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
3
|
+
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
+
export declare class MasterOfLawsCountryTuitionFeeRule extends BaseProgrammeRule {
|
|
5
|
+
private readonly degreeValue;
|
|
6
|
+
private readonly allowedCountryIds;
|
|
7
|
+
private readonly tuitionFeeValue;
|
|
8
|
+
getName(): string;
|
|
9
|
+
getDescription(): string;
|
|
10
|
+
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
11
|
+
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
+
import { TuitionFeeFilterOptionValue } from '@studyportals/search-filters';
|
|
3
|
+
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
+
export class MasterOfLawsCountryTuitionFeeRule extends BaseProgrammeRule {
|
|
5
|
+
degreeValue = 'master-of-laws';
|
|
6
|
+
allowedCountryIds = ['82', '30', '32', '108']; // USA, UK, Canada, India
|
|
7
|
+
tuitionFeeValue = TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED;
|
|
8
|
+
getName() {
|
|
9
|
+
return 'MasterOfLawsCountryTuitionFeeRule';
|
|
10
|
+
}
|
|
11
|
+
getDescription() {
|
|
12
|
+
return 'Indexes: master-of-laws (USA, UK, Canada, India) + affordable tuition (0-2500)';
|
|
13
|
+
}
|
|
14
|
+
forSearch(dependencies) {
|
|
15
|
+
const { seoInfoBase, filterState } = dependencies;
|
|
16
|
+
const degreeTypeValue = seoInfoBase.getFilterOptionValueBy(FilterKey.DEGREE_TYPE, filterState);
|
|
17
|
+
const countryValue = seoInfoBase.getFilterOptionValueBy(FilterKey.COUNTRY, filterState);
|
|
18
|
+
const tuitionFeeValue = seoInfoBase.getFilterOptionValueBy(FilterKey.TUITION_FEE, filterState);
|
|
19
|
+
if (degreeTypeValue !== this.degreeValue) {
|
|
20
|
+
return Promise.resolve(true);
|
|
21
|
+
}
|
|
22
|
+
if (!countryValue || !tuitionFeeValue) {
|
|
23
|
+
return Promise.resolve(false);
|
|
24
|
+
}
|
|
25
|
+
return Promise.resolve(this.allowedCountryIds.includes(countryValue) &&
|
|
26
|
+
tuitionFeeValue === this.tuitionFeeValue);
|
|
27
|
+
}
|
|
28
|
+
forSitemapGenerator(filterKeyValues) {
|
|
29
|
+
const degreeTypeValues = filterKeyValues.get(FilterKey.DEGREE_TYPE);
|
|
30
|
+
const countryValues = filterKeyValues.get(FilterKey.COUNTRY);
|
|
31
|
+
const tuitionFeeValues = filterKeyValues.get(FilterKey.TUITION_FEE);
|
|
32
|
+
if (!degreeTypeValues?.length || !countryValues?.length || !tuitionFeeValues?.length) {
|
|
33
|
+
return Promise.resolve(false);
|
|
34
|
+
}
|
|
35
|
+
const degreeTypeValue = degreeTypeValues[0];
|
|
36
|
+
const countryValue = countryValues[0];
|
|
37
|
+
const tuitionFeeValue = tuitionFeeValues[0];
|
|
38
|
+
// This rule only applies to Master of Laws
|
|
39
|
+
if (degreeTypeValue !== this.degreeValue) {
|
|
40
|
+
return Promise.resolve(true); // Rule doesn't apply to other degrees
|
|
41
|
+
}
|
|
42
|
+
// Must be in allowed countries and have affordable tuition
|
|
43
|
+
return Promise.resolve(this.allowedCountryIds.includes(countryValue) &&
|
|
44
|
+
tuitionFeeValue === this.tuitionFeeValue);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ISearchDependencies } from '../../common/ISearchDependencies';
|
|
2
|
+
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
3
|
+
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
+
export declare class MasterOfPhilosophyCountryAttendanceRule extends BaseProgrammeRule {
|
|
5
|
+
private readonly degreeValue;
|
|
6
|
+
private readonly attendanceValue;
|
|
7
|
+
private readonly allowedCountryIds;
|
|
8
|
+
getName(): string;
|
|
9
|
+
getDescription(): string;
|
|
10
|
+
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
11
|
+
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
+
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
3
|
+
export class MasterOfPhilosophyCountryAttendanceRule extends BaseProgrammeRule {
|
|
4
|
+
degreeValue = 'master-of-philosophy';
|
|
5
|
+
attendanceValue = 'online';
|
|
6
|
+
allowedCountryIds = ['82', '30', '108']; // USA, UK, India
|
|
7
|
+
getName() {
|
|
8
|
+
return 'MasterOfPhilosophyCountryAttendanceRule';
|
|
9
|
+
}
|
|
10
|
+
getDescription() {
|
|
11
|
+
return 'Indexes: master-of-philosophy (USA, UK, India) + 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(this.allowedCountryIds.includes(countryValue) &&
|
|
25
|
+
attendanceValue === this.attendanceValue);
|
|
26
|
+
}
|
|
27
|
+
forSitemapGenerator(filterKeyValues) {
|
|
28
|
+
const degreeTypeValues = filterKeyValues.get(FilterKey.DEGREE_TYPE);
|
|
29
|
+
const countryValues = filterKeyValues.get(FilterKey.COUNTRY);
|
|
30
|
+
const attendanceValues = filterKeyValues.get(FilterKey.DELIVERY_METHOD);
|
|
31
|
+
if (!degreeTypeValues?.length || !countryValues?.length || !attendanceValues?.length) {
|
|
32
|
+
return Promise.resolve(false);
|
|
33
|
+
}
|
|
34
|
+
const degreeTypeValue = degreeTypeValues[0];
|
|
35
|
+
const countryValue = countryValues[0];
|
|
36
|
+
const attendanceValue = attendanceValues[0];
|
|
37
|
+
if (degreeTypeValue !== this.degreeValue) {
|
|
38
|
+
return Promise.resolve(true);
|
|
39
|
+
}
|
|
40
|
+
return Promise.resolve(this.allowedCountryIds.includes(countryValue) &&
|
|
41
|
+
attendanceValue === this.attendanceValue);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ISearchDependencies } from '../../common/ISearchDependencies';
|
|
2
|
+
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
3
|
+
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
+
export declare class MasterOfScienceDisciplineRule 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
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
+
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
3
|
+
export class MasterOfScienceDisciplineRule extends BaseProgrammeRule {
|
|
4
|
+
// Master of Science accepts all disciplines
|
|
5
|
+
degreeValue = 'master-of-science';
|
|
6
|
+
getName() {
|
|
7
|
+
return 'MasterOfScienceDisciplineRule';
|
|
8
|
+
}
|
|
9
|
+
getDescription() {
|
|
10
|
+
return 'Indexes: master-of-science + 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 Science
|
|
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 Science 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 Science
|
|
35
|
+
if (degreeTypeValue !== this.degreeValue) {
|
|
36
|
+
return Promise.resolve(true); // Rule doesn't apply to other degrees
|
|
37
|
+
}
|
|
38
|
+
// Master of Science accepts all disciplines
|
|
39
|
+
return Promise.resolve(true);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { DurationFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
3
|
+
import { BaseProgrammeFilterKeyValueRule } from '../BaseProgrammeFilterKeyValueRule';
|
|
4
|
+
export class OneOrTwoYearDurationRule extends BaseProgrammeFilterKeyValueRule {
|
|
5
|
+
constructor() {
|
|
6
|
+
const filterKeyValues = new Map([[
|
|
7
|
+
FilterKey.DURATION,
|
|
8
|
+
[DurationFilterOptionValue.ONE_YEAR, DurationFilterOptionValue.TWO_YEARS]
|
|
9
|
+
]
|
|
10
|
+
]);
|
|
11
|
+
super(filterKeyValues);
|
|
12
|
+
}
|
|
13
|
+
getName() {
|
|
14
|
+
return 'OneOrTwoYearDurationRule';
|
|
15
|
+
}
|
|
16
|
+
getDescription() {
|
|
17
|
+
return 'Is indexable if the selected duration is one or two years.';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ISearchDependencies } from '../../common/ISearchDependencies';
|
|
2
|
+
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
3
|
+
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
+
export declare class OneYearOnlyRule extends BaseProgrammeRule {
|
|
5
|
+
constructor();
|
|
6
|
+
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
7
|
+
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
8
|
+
getName(): string;
|
|
9
|
+
getDescription(): string;
|
|
10
|
+
private isOneYear;
|
|
11
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { DurationFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
3
|
+
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
+
export class OneYearOnlyRule extends BaseProgrammeRule {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
}
|
|
8
|
+
forSearch(dependencies) {
|
|
9
|
+
const { seoInfoBase, filterState } = dependencies;
|
|
10
|
+
const selectedDuration = seoInfoBase.getFilterOptionValueBy(FilterKey.DURATION, filterState);
|
|
11
|
+
if (!selectedDuration) {
|
|
12
|
+
return Promise.resolve(false);
|
|
13
|
+
}
|
|
14
|
+
const isOneYear = this.isOneYear(selectedDuration);
|
|
15
|
+
return Promise.resolve(isOneYear);
|
|
16
|
+
}
|
|
17
|
+
forSitemapGenerator(filterKeyValues) {
|
|
18
|
+
const [selectedDuration] = filterKeyValues.get(FilterKey.DURATION);
|
|
19
|
+
if (!selectedDuration) {
|
|
20
|
+
return Promise.resolve(false);
|
|
21
|
+
}
|
|
22
|
+
const isOneYear = this.isOneYear(selectedDuration);
|
|
23
|
+
return Promise.resolve(isOneYear);
|
|
24
|
+
}
|
|
25
|
+
getName() {
|
|
26
|
+
return 'OneYearOnlyRule';
|
|
27
|
+
}
|
|
28
|
+
getDescription() {
|
|
29
|
+
return 'Indexable only if duration is exactly 1 year ([360,360]).';
|
|
30
|
+
}
|
|
31
|
+
isOneYear(value) {
|
|
32
|
+
return value === DurationFilterOptionValue.ONE_YEAR;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { AttendanceFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
3
|
+
import { BaseProgrammeFilterKeyValueRule } from '../BaseProgrammeFilterKeyValueRule';
|
|
4
|
+
export class OnlineAttendanceRule extends BaseProgrammeFilterKeyValueRule {
|
|
5
|
+
constructor() {
|
|
6
|
+
const filterKeyValues = new Map([[FilterKey.DELIVERY_METHOD, [AttendanceFilterOptionValue.ONLINE]]]);
|
|
7
|
+
super(filterKeyValues);
|
|
8
|
+
}
|
|
9
|
+
getName() {
|
|
10
|
+
return 'OnlineAttendanceRule';
|
|
11
|
+
}
|
|
12
|
+
getDescription() {
|
|
13
|
+
return 'Is indexable if the selected attendance is online.';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { DurationFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
3
|
+
import { BaseProgrammeFilterKeyValueRule } from '../BaseProgrammeFilterKeyValueRule';
|
|
4
|
+
export class TwoYearDurationRule extends BaseProgrammeFilterKeyValueRule {
|
|
5
|
+
constructor() {
|
|
6
|
+
const filterKeyValues = new Map([[
|
|
7
|
+
FilterKey.DURATION,
|
|
8
|
+
[DurationFilterOptionValue.TWO_YEARS]
|
|
9
|
+
]
|
|
10
|
+
]);
|
|
11
|
+
super(filterKeyValues);
|
|
12
|
+
}
|
|
13
|
+
getName() {
|
|
14
|
+
return 'TwoYearDurationRule';
|
|
15
|
+
}
|
|
16
|
+
getDescription() {
|
|
17
|
+
return 'Is indexable if the selected duration is two years.';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -3,7 +3,6 @@ export class BaseSitemapUrlGeneratorManager {
|
|
|
3
3
|
async generateUrls() {
|
|
4
4
|
const map = new Map();
|
|
5
5
|
for (const policy of this.policies) {
|
|
6
|
-
console.debug(`Generating sitemap urls for policy: ${policy.filterCombination}`); // eslint-disable-line no-console
|
|
7
6
|
const filterCombination = policy.filterCombination;
|
|
8
7
|
const urls = await policy.generateSitemapUrls();
|
|
9
8
|
console.debug(`Generated ${urls.length} urls for policy: ${filterCombination}`); // eslint-disable-line no-console
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DependencyTypes } from '../enums/DependencyTypes';
|
|
2
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,
|
|
3
|
+
import { Area, Attendance, AttendanceDegree, Continent, ContinentTuitionFee, Country, CountryAttendance, Discipline, SpecialProgrammes, TuitionFee, Unfiltered, CountryAttendanceDegree, CountryDuration, CountryDurationDegree, CountryEducationalForm, CountryFormat, CountryTuitionFee, DegreeAttendanceDiscipline, DegreeCountryAttendance, DegreeCountryDiscipline, DegreeCountryTuitionFee, Format, DisciplineAttendance, DisciplineContinent, DisciplineCountry, DisciplineCountryEducationalForm, DisciplineDegree, DisciplineDuration, DisciplineEducationalForm, DisciplineFormat, DisciplineTuitionFee, DisciplineTuitionFeeAttendance, CountryDegree, DegreeFormat, DegreeContinent, DegreeAttendanceTuitionFee, DegreeArea, DegreeTuitionFee, AttendanceTuitionFee, Duration, AttendanceDuration, DegreeAreaTuitionFee, DisciplineContinentAttendance, DegreeContinentTuitionFee, AttendanceFormat, ContinentFormat, AttendanceContinent, DegreeDuration, ContinentSpecialProgrammes, CountrySpecialProgrammes, AttendanceArea, DegreeFormatTuitionFee, ContinentDuration, DegreeAttendanceFormat, DisciplineCountryAttendance, DisciplineCountryFormat, DegreeSpecialProgrammes, Degree, DisciplineSpecialProgrammes, DegreeAttendanceSpecialProgrammes } from '../programmes/policies';
|
|
4
4
|
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
5
5
|
import { AreaPresenter } from '../presenters/AreaPresenter';
|
|
6
6
|
import { AttendancePresenter } from '../presenters/AttendancePresenter';
|
|
@@ -13,7 +13,6 @@ import { SpecialProgrammesPresenter } from '../presenters/SpecialProgrammesPrese
|
|
|
13
13
|
import { DurationPresenter } from '../presenters/DurationPresenter';
|
|
14
14
|
import { EducationalFormPresenter } from '../presenters/EducationalFormPresenter';
|
|
15
15
|
import { FormatPresenter } from '../presenters/FormatPresenter';
|
|
16
|
-
import { Degree } from '../programmes/policies/Degree';
|
|
17
16
|
export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
|
|
18
17
|
portalType;
|
|
19
18
|
policies;
|
|
@@ -30,6 +29,8 @@ export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGenerato
|
|
|
30
29
|
new Area(dependencies),
|
|
31
30
|
new Attendance(dependencies),
|
|
32
31
|
new AttendanceDegree(dependencies),
|
|
32
|
+
new AttendanceDuration(dependencies),
|
|
33
|
+
new AttendanceContinent(dependencies),
|
|
33
34
|
new Continent(dependencies),
|
|
34
35
|
new ContinentTuitionFee(dependencies),
|
|
35
36
|
new Country(dependencies),
|
|
@@ -39,6 +40,7 @@ export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGenerato
|
|
|
39
40
|
new SpecialProgrammes(dependencies),
|
|
40
41
|
new TuitionFee(dependencies),
|
|
41
42
|
new Unfiltered(dependencies),
|
|
43
|
+
new Duration(dependencies),
|
|
42
44
|
new CountryAttendanceDegree(dependencies),
|
|
43
45
|
new CountryDegree(dependencies),
|
|
44
46
|
new CountryDuration(dependencies),
|
|
@@ -46,11 +48,27 @@ export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGenerato
|
|
|
46
48
|
new CountryEducationalForm(dependencies),
|
|
47
49
|
new CountryFormat(dependencies),
|
|
48
50
|
new CountryTuitionFee(dependencies),
|
|
51
|
+
new CountrySpecialProgrammes(dependencies),
|
|
52
|
+
new ContinentFormat(dependencies),
|
|
53
|
+
new ContinentSpecialProgrammes(dependencies),
|
|
54
|
+
new ContinentDuration(dependencies),
|
|
49
55
|
new DegreeAttendanceDiscipline(dependencies),
|
|
50
56
|
new DegreeCountryAttendance(dependencies),
|
|
51
57
|
new DegreeCountryDiscipline(dependencies),
|
|
52
58
|
new DegreeCountryTuitionFee(dependencies),
|
|
53
|
-
new
|
|
59
|
+
new DegreeFormat(dependencies),
|
|
60
|
+
new DegreeContinent(dependencies),
|
|
61
|
+
new DegreeAttendanceTuitionFee(dependencies),
|
|
62
|
+
new DegreeArea(dependencies),
|
|
63
|
+
new DegreeTuitionFee(dependencies),
|
|
64
|
+
new DegreeAreaTuitionFee(dependencies),
|
|
65
|
+
new DegreeContinentTuitionFee(dependencies),
|
|
66
|
+
new DegreeDuration(dependencies),
|
|
67
|
+
new DegreeFormatTuitionFee(dependencies),
|
|
68
|
+
new DegreeAttendanceFormat(dependencies),
|
|
69
|
+
new DegreeSpecialProgrammes(dependencies),
|
|
70
|
+
new DegreeAttendanceSpecialProgrammes(dependencies),
|
|
71
|
+
new Format(dependencies),
|
|
54
72
|
new DisciplineAttendance(dependencies),
|
|
55
73
|
new DisciplineContinent(dependencies),
|
|
56
74
|
new DisciplineCountry(dependencies),
|
|
@@ -60,7 +78,14 @@ export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGenerato
|
|
|
60
78
|
new DisciplineEducationalForm(dependencies),
|
|
61
79
|
new DisciplineFormat(dependencies),
|
|
62
80
|
new DisciplineTuitionFee(dependencies),
|
|
63
|
-
new DisciplineTuitionFeeAttendance(dependencies)
|
|
81
|
+
new DisciplineTuitionFeeAttendance(dependencies),
|
|
82
|
+
new DisciplineContinentAttendance(dependencies),
|
|
83
|
+
new DisciplineCountryAttendance(dependencies),
|
|
84
|
+
new DisciplineCountryFormat(dependencies),
|
|
85
|
+
new DisciplineSpecialProgrammes(dependencies),
|
|
86
|
+
new AttendanceTuitionFee(dependencies),
|
|
87
|
+
new AttendanceFormat(dependencies),
|
|
88
|
+
new AttendanceArea(dependencies)
|
|
64
89
|
];
|
|
65
90
|
this.presenters.set(FilterKey.AREA, AreaPresenter.getInstance());
|
|
66
91
|
this.presenters.set(FilterKey.DELIVERY_METHOD, AttendancePresenter.getInstance());
|
|
@@ -4,10 +4,9 @@ import { OfferDTO } from './dto/OfferDTO';
|
|
|
4
4
|
import { EntityDTO } from './dto/EntityDTO';
|
|
5
5
|
import { FAQItemDto } from './dto/FAQItemDto';
|
|
6
6
|
import { BreadcrumbDTO } from './dto/BreadcrumbDTO';
|
|
7
|
-
import { PaywallDTO } from './dto/PaywallDTO';
|
|
8
7
|
export declare abstract class SearchStructuredDataFactory<TCard> {
|
|
9
|
-
buildStructuredData(title: string, description: string, cards: TCard[], faqItems?: FAQItemDto[], breadcrumbs?: BreadcrumbDTO[]
|
|
10
|
-
protected abstract buildStructuredDataForCard(entity: EntityDTO<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;
|
|
11
10
|
/**
|
|
12
11
|
* Get the rating for a card.
|
|
13
12
|
* This method should be overridden by subclasses to provide the specific rating logic.
|
|
@@ -26,29 +25,10 @@ export declare abstract class SearchStructuredDataFactory<TCard> {
|
|
|
26
25
|
* @protected
|
|
27
26
|
*/
|
|
28
27
|
protected getOfferData(card: TCard): Promise<OfferDTO | undefined>;
|
|
29
|
-
/**
|
|
30
|
-
* Get the paywall data for a card.
|
|
31
|
-
* This method should be overridden by subclasses to provide the specific paywall logic.
|
|
32
|
-
* If no paywall data is available, return undefined and no paywall information will be added to the card.
|
|
33
|
-
*
|
|
34
|
-
* @param card
|
|
35
|
-
* @protected
|
|
36
|
-
*/
|
|
37
|
-
protected getPaywallData(card: TCard): PaywallDTO | undefined;
|
|
38
28
|
private constructOptionalPageOffers;
|
|
39
29
|
protected constructOptionalFaqPage(faqItems: FAQItemDto[]): FAQPage | undefined;
|
|
40
|
-
private constructOptionalPageParts;
|
|
41
30
|
private constructOptionalBreadcrumbs;
|
|
42
|
-
private constructPaywallElement;
|
|
43
31
|
protected constructAggregateRating(reviewRating?: ReviewRatingDTO): AggregateRating | undefined;
|
|
44
32
|
protected constructOffer(offerData?: OfferDTO): Offer | undefined;
|
|
45
|
-
/**
|
|
46
|
-
* Add paywall information to any structured data object
|
|
47
|
-
*
|
|
48
|
-
* @param structuredData The structured data object to enhance
|
|
49
|
-
* @param paywallData The paywall data to add
|
|
50
|
-
* @protected
|
|
51
|
-
*/
|
|
52
|
-
protected addPaywallToStructuredData(structuredData: Record<string, any>, paywallData?: PaywallDTO): void;
|
|
53
33
|
private stripHtmlWithListRetain;
|
|
54
34
|
}
|