@studyportals/fawkes 8.0.2-2 → 8.0.2-21
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/enums/FilterCombinations.d.ts +3 -0
- package/dist/src/enums/FilterCombinations.js +3 -0
- package/dist/src/programmes/SearchIndexabilityManager.js +4 -0
- package/dist/src/programmes/policies/AttendanceArea.js +1 -1
- package/dist/src/programmes/policies/AttendanceDegree.d.ts +2 -1
- package/dist/src/programmes/policies/AttendanceDegree.js +4 -5
- package/dist/src/programmes/policies/AttendanceDuration.d.ts +2 -1
- package/dist/src/programmes/policies/AttendanceDuration.js +3 -1
- package/dist/src/programmes/policies/AttendanceFormat.js +1 -1
- package/dist/src/programmes/policies/AttendanceTuitionFee.d.ts +2 -1
- package/dist/src/programmes/policies/AttendanceTuitionFee.js +4 -2
- package/dist/src/programmes/policies/ContinentDuration.d.ts +2 -1
- package/dist/src/programmes/policies/ContinentDuration.js +5 -3
- package/dist/src/programmes/policies/ContinentFormat.js +2 -2
- package/dist/src/programmes/policies/ContinentSpecialProgrammes.d.ts +2 -1
- package/dist/src/programmes/policies/ContinentSpecialProgrammes.js +4 -2
- package/dist/src/programmes/policies/CountrySpecialProgrammes.d.ts +2 -1
- package/dist/src/programmes/policies/CountrySpecialProgrammes.js +3 -1
- package/dist/src/programmes/policies/DegreeAreaTuitionFee.d.ts +2 -1
- package/dist/src/programmes/policies/DegreeAreaTuitionFee.js +5 -3
- package/dist/src/programmes/policies/DegreeAttendanceFormat.d.ts +3 -1
- package/dist/src/programmes/policies/DegreeAttendanceFormat.js +5 -1
- package/dist/src/programmes/policies/DegreeAttendanceSpecialProgrammes.d.ts +2 -1
- package/dist/src/programmes/policies/DegreeAttendanceSpecialProgrammes.js +6 -4
- package/dist/src/programmes/policies/DegreeAttendanceTuitionFee.d.ts +3 -1
- package/dist/src/programmes/policies/DegreeAttendanceTuitionFee.js +6 -2
- 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 +2 -1
- package/dist/src/programmes/policies/DegreeDuration.js +3 -1
- package/dist/src/programmes/policies/DegreeFormatTuitionFee.d.ts +3 -1
- package/dist/src/programmes/policies/DegreeFormatTuitionFee.js +6 -2
- package/dist/src/programmes/policies/DegreeSpecialProgrammes.d.ts +3 -1
- package/dist/src/programmes/policies/DegreeSpecialProgrammes.js +4 -0
- package/dist/src/programmes/policies/DegreeTuitionFee.d.ts +2 -1
- package/dist/src/programmes/policies/DegreeTuitionFee.js +2 -0
- package/dist/src/programmes/policies/DisciplineCountryFormat.d.ts +2 -1
- package/dist/src/programmes/policies/DisciplineCountryFormat.js +2 -0
- package/dist/src/programmes/policies/DisciplineSpecialProgrammes.d.ts +2 -1
- package/dist/src/programmes/policies/DisciplineSpecialProgrammes.js +4 -2
- package/dist/src/programmes/policies/DisciplineTuitionFee.js +1 -1
- package/dist/src/programmes/policies/Duration.d.ts +2 -1
- package/dist/src/programmes/policies/Duration.js +3 -1
- package/dist/src/programmes/policies/SpecialProgrammes.js +1 -1
- package/dist/src/programmes/policies/index.d.ts +1 -0
- package/dist/src/programmes/policies/index.js +1 -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/ErasmusOrExecutiveSpecialProgrammeRule.d.ts +6 -0
- package/dist/src/programmes/rules/ErasmusOrExecutiveSpecialProgrammeRule.js +19 -0
- 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/MinimumAmountOfResultsRule.js +0 -6
- package/dist/src/programmes/rules/OneOrTwoYearDurationRule.d.ts +6 -0
- package/dist/src/programmes/rules/OneOrTwoYearDurationRule.js +19 -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/ProgrammesSitemapUrlGeneratorManager.js +5 -2
- package/package.json +2 -2
|
@@ -6,6 +6,7 @@ import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
|
6
6
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
7
|
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
8
8
|
import { DurationPresenter } from '../../presenters/DurationPresenter';
|
|
9
|
+
import { OneOrTwoYearDurationRule } from '../rules/OneOrTwoYearDurationRule';
|
|
9
10
|
export class DegreeDuration extends ProgrammesBaseIndexabilityPolicy {
|
|
10
11
|
name = 'Degree Duration Policy';
|
|
11
12
|
description = 'Determines indexing rules for pages filtered by degree type and duration (2 years).';
|
|
@@ -14,7 +15,8 @@ export class DegreeDuration extends ProgrammesBaseIndexabilityPolicy {
|
|
|
14
15
|
new SingleValueSelectedForFilterRule(FilterKey.DURATION),
|
|
15
16
|
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
16
17
|
new OnlyFiltersSelectedRule([FilterKey.DURATION, FilterKey.DEGREE_TYPE]),
|
|
17
|
-
new IndexableDegreeRule()
|
|
18
|
+
new IndexableDegreeRule(),
|
|
19
|
+
new OneOrTwoYearDurationRule()
|
|
18
20
|
];
|
|
19
21
|
constructor(dependencies) {
|
|
20
22
|
super(dependencies);
|
|
@@ -5,11 +5,13 @@ import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
|
5
5
|
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
6
6
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
7
|
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
8
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
9
|
+
import { PartTimeFormatRule } from '../rules/PartTimeFormatRule';
|
|
8
10
|
export declare class DegreeFormatTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
9
11
|
readonly name: string;
|
|
10
12
|
readonly description: string;
|
|
11
13
|
readonly filterKeys: FilterKey[];
|
|
12
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | IndexableDegreeRule)[];
|
|
14
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | IndexableDegreeRule | AffordableTuitionFeeRule | PartTimeFormatRule)[];
|
|
13
15
|
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
16
|
protected generateUrls(): Promise<string[]>;
|
|
15
17
|
get filterCombination(): FilterCombinations;
|
|
@@ -7,6 +7,8 @@ import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityP
|
|
|
7
7
|
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
8
8
|
import { FormatPresenter } from '../../presenters/FormatPresenter';
|
|
9
9
|
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
10
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
11
|
+
import { PartTimeFormatRule } from '../rules/PartTimeFormatRule';
|
|
10
12
|
export class DegreeFormatTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
11
13
|
name = 'Degree Format Tuition Fee Policy';
|
|
12
14
|
description = 'Determines indexing rules for pages filtered by degree type, format and tuition fee.';
|
|
@@ -16,7 +18,9 @@ export class DegreeFormatTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
|
16
18
|
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
17
19
|
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
18
20
|
new OnlyFiltersSelectedRule([FilterKey.ATTENDANCE, FilterKey.DEGREE_TYPE, FilterKey.TUITION_FEE]),
|
|
19
|
-
new IndexableDegreeRule()
|
|
21
|
+
new IndexableDegreeRule(),
|
|
22
|
+
new AffordableTuitionFeeRule(),
|
|
23
|
+
new PartTimeFormatRule()
|
|
20
24
|
];
|
|
21
25
|
constructor(dependencies) {
|
|
22
26
|
super(dependencies);
|
|
@@ -38,7 +42,7 @@ export class DegreeFormatTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
|
38
42
|
]);
|
|
39
43
|
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
40
44
|
if (result) {
|
|
41
|
-
paths.push(this.getPathWithPageNumber(`${degree.path}/${
|
|
45
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${tuitionFee.path}/${format.path}`, pageNumber));
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
}
|
|
@@ -4,11 +4,13 @@ import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValue
|
|
|
4
4
|
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
6
|
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { MbaDegreeRule } from '../rules/MbaDegreeRule';
|
|
8
|
+
import { ExecutiveSpecialProgrammeRule } from '../rules/ExecutiveSpecialProgrammeRule';
|
|
7
9
|
export declare class DegreeSpecialProgrammes extends ProgrammesBaseIndexabilityPolicy {
|
|
8
10
|
readonly name: string;
|
|
9
11
|
readonly description: string;
|
|
10
12
|
readonly filterKeys: FilterKey[];
|
|
11
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule)[];
|
|
13
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | MbaDegreeRule | ExecutiveSpecialProgrammeRule)[];
|
|
12
14
|
constructor(dependencies: IProgrammeSeoDependencies);
|
|
13
15
|
protected generateUrls(): Promise<string[]>;
|
|
14
16
|
get filterCombination(): FilterCombinations;
|
|
@@ -5,6 +5,8 @@ import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
|
5
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
6
|
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
7
7
|
import { SpecialProgrammesPresenter } from '../../presenters/SpecialProgrammesPresenter';
|
|
8
|
+
import { MbaDegreeRule } from '../rules/MbaDegreeRule';
|
|
9
|
+
import { ExecutiveSpecialProgrammeRule } from '../rules/ExecutiveSpecialProgrammeRule';
|
|
8
10
|
export class DegreeSpecialProgrammes extends ProgrammesBaseIndexabilityPolicy {
|
|
9
11
|
name = 'Special Programmes Degree Policy';
|
|
10
12
|
description = 'Determines indexing rules for pages filtered by special programmes and degree type.';
|
|
@@ -13,6 +15,8 @@ export class DegreeSpecialProgrammes extends ProgrammesBaseIndexabilityPolicy {
|
|
|
13
15
|
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
14
16
|
new SingleValueSelectedForFilterRule(FilterKey.SPECIAL_PROGRAMMES),
|
|
15
17
|
new OnlyFiltersSelectedRule([FilterKey.DEGREE_TYPE, FilterKey.SPECIAL_PROGRAMMES]),
|
|
18
|
+
new ExecutiveSpecialProgrammeRule(),
|
|
19
|
+
new MbaDegreeRule(),
|
|
16
20
|
];
|
|
17
21
|
constructor(dependencies) {
|
|
18
22
|
super(dependencies);
|
|
@@ -4,11 +4,12 @@ import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValue
|
|
|
4
4
|
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
6
|
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
7
8
|
export declare class DegreeTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
8
9
|
readonly name: string;
|
|
9
10
|
readonly description: string;
|
|
10
11
|
readonly filterKeys: FilterKey[];
|
|
11
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule)[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | AffordableTuitionFeeRule)[];
|
|
12
13
|
constructor(dependencies: IProgrammeSeoDependencies);
|
|
13
14
|
protected generateUrls(): Promise<string[]>;
|
|
14
15
|
get filterCombination(): FilterCombinations;
|
|
@@ -6,6 +6,7 @@ import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
|
6
6
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
7
|
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
8
8
|
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
9
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
9
10
|
export class DegreeTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
10
11
|
name = 'Tuition Fee Degree Policy';
|
|
11
12
|
description = 'Determines indexing rules for pages filtered by tuition fee and degree type.';
|
|
@@ -14,6 +15,7 @@ export class DegreeTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
|
14
15
|
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
15
16
|
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
16
17
|
new OnlyFiltersSelectedRule([FilterKey.DEGREE_TYPE, FilterKey.TUITION_FEE]),
|
|
18
|
+
new AffordableTuitionFeeRule()
|
|
17
19
|
];
|
|
18
20
|
constructor(dependencies) {
|
|
19
21
|
super(dependencies);
|
|
@@ -4,11 +4,12 @@ import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValue
|
|
|
4
4
|
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
6
|
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { PartTimeFormatRule } from '../rules/PartTimeFormatRule';
|
|
7
8
|
export declare class DisciplineCountryFormat extends ProgrammesBaseIndexabilityPolicy {
|
|
8
9
|
readonly name: string;
|
|
9
10
|
readonly description: string;
|
|
10
11
|
readonly filterKeys: FilterKey[];
|
|
11
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule)[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | PartTimeFormatRule)[];
|
|
12
13
|
constructor(dependencies: IProgrammeSeoDependencies);
|
|
13
14
|
protected generateUrls(): Promise<string[]>;
|
|
14
15
|
get filterCombination(): FilterCombinations;
|
|
@@ -6,6 +6,7 @@ import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityP
|
|
|
6
6
|
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
7
7
|
import { CountryPresenter } from '../../presenters/CountryPresenter';
|
|
8
8
|
import { FormatPresenter } from '../../presenters/FormatPresenter';
|
|
9
|
+
import { PartTimeFormatRule } from '../rules/PartTimeFormatRule';
|
|
9
10
|
export class DisciplineCountryFormat extends ProgrammesBaseIndexabilityPolicy {
|
|
10
11
|
name = 'Discipline Country Format Policy';
|
|
11
12
|
description = 'Determines indexing rules for pages filtered by both discipline, country, and format.';
|
|
@@ -15,6 +16,7 @@ export class DisciplineCountryFormat extends ProgrammesBaseIndexabilityPolicy {
|
|
|
15
16
|
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
16
17
|
new SingleValueSelectedForFilterRule(FilterKey.ATTENDANCE),
|
|
17
18
|
new OnlyFiltersSelectedRule([FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.ATTENDANCE]),
|
|
19
|
+
new PartTimeFormatRule()
|
|
18
20
|
];
|
|
19
21
|
constructor(dependencies) {
|
|
20
22
|
super(dependencies);
|
|
@@ -4,11 +4,12 @@ import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValue
|
|
|
4
4
|
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
6
|
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { ErasmusSpecialProgrammeRule } from '../rules/ErasmusSpecialProgrammeRule';
|
|
7
8
|
export declare class DisciplineSpecialProgrammes extends ProgrammesBaseIndexabilityPolicy {
|
|
8
9
|
readonly name: string;
|
|
9
10
|
readonly description: string;
|
|
10
11
|
readonly filterKeys: FilterKey[];
|
|
11
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule)[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | ErasmusSpecialProgrammeRule)[];
|
|
12
13
|
constructor(dependencies: IProgrammeSeoDependencies);
|
|
13
14
|
protected generateUrls(): Promise<string[]>;
|
|
14
15
|
get filterCombination(): FilterCombinations;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
1
|
+
import { FilterKey, SpecialProgrammesFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
2
2
|
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
3
|
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
4
|
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
6
|
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
7
7
|
import { SpecialProgrammesPresenter } from '../../presenters/SpecialProgrammesPresenter';
|
|
8
|
+
import { ErasmusSpecialProgrammeRule } from '../rules/ErasmusSpecialProgrammeRule';
|
|
8
9
|
export class DisciplineSpecialProgrammes extends ProgrammesBaseIndexabilityPolicy {
|
|
9
10
|
name = 'Discipline Special Programmes Policy';
|
|
10
11
|
description = 'Determines indexing rules for pages filtered by discipline and special programmes (Erasmus Mundus).';
|
|
@@ -13,6 +14,7 @@ export class DisciplineSpecialProgrammes extends ProgrammesBaseIndexabilityPolic
|
|
|
13
14
|
new SingleValueSelectedForFilterRule(FilterKey.SPECIAL_PROGRAMMES),
|
|
14
15
|
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
15
16
|
new OnlyFiltersSelectedRule([FilterKey.SPECIAL_PROGRAMMES, FilterKey.DISCIPLINES]),
|
|
17
|
+
new ErasmusSpecialProgrammeRule()
|
|
16
18
|
];
|
|
17
19
|
constructor(dependencies) {
|
|
18
20
|
super(dependencies);
|
|
@@ -22,7 +24,7 @@ export class DisciplineSpecialProgrammes extends ProgrammesBaseIndexabilityPolic
|
|
|
22
24
|
const specialProgrammesFragments = SpecialProgrammesPresenter.getInstance().getFragments();
|
|
23
25
|
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
24
26
|
const paths = [];
|
|
25
|
-
const validSpecialProgrammesIds = [
|
|
27
|
+
const validSpecialProgrammesIds = [SpecialProgrammesFilterOptionValue.ERASMUS_MUNDUS];
|
|
26
28
|
const validSpecialProgrammes = specialProgrammesFragments.filter(specialProgramme => validSpecialProgrammesIds.includes(specialProgramme.id));
|
|
27
29
|
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
30
|
for (const specialProgramme of validSpecialProgrammes) {
|
|
@@ -33,7 +33,7 @@ export class DisciplineTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
|
33
33
|
]);
|
|
34
34
|
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
35
|
if (result) {
|
|
36
|
-
paths.push(this.getPathWithPageNumber(`${
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${discipline.path}/${tuitionFee.path}`, pageNumber));
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -4,11 +4,12 @@ import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValue
|
|
|
4
4
|
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
6
|
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { OneOrTwoYearDurationRule } from '../rules/OneOrTwoYearDurationRule';
|
|
7
8
|
export declare class Duration extends ProgrammesBaseIndexabilityPolicy {
|
|
8
9
|
readonly name: string;
|
|
9
10
|
readonly description: string;
|
|
10
11
|
readonly filterKeys: FilterKey[];
|
|
11
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule)[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | OneOrTwoYearDurationRule)[];
|
|
12
13
|
constructor(dependencies: IProgrammeSeoDependencies);
|
|
13
14
|
protected generateUrls(): Promise<string[]>;
|
|
14
15
|
get filterCombination(): FilterCombinations;
|
|
@@ -4,13 +4,15 @@ import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValue
|
|
|
4
4
|
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
6
|
import { DurationPresenter } from '../../presenters/DurationPresenter';
|
|
7
|
+
import { OneOrTwoYearDurationRule } from '../rules/OneOrTwoYearDurationRule';
|
|
7
8
|
export class Duration extends ProgrammesBaseIndexabilityPolicy {
|
|
8
9
|
name = 'Duration Policy';
|
|
9
10
|
description = 'Governs indexing of duration-level filtered pages. (1 year - 2 year)';
|
|
10
11
|
filterKeys = [FilterKey.DURATION];
|
|
11
12
|
rules = [
|
|
12
13
|
new SingleValueSelectedForFilterRule(FilterKey.DURATION),
|
|
13
|
-
new OnlyFiltersSelectedRule([FilterKey.DURATION])
|
|
14
|
+
new OnlyFiltersSelectedRule([FilterKey.DURATION]),
|
|
15
|
+
new OneOrTwoYearDurationRule()
|
|
14
16
|
];
|
|
15
17
|
constructor(dependencies) {
|
|
16
18
|
super(dependencies);
|
|
@@ -10,7 +10,7 @@ export class SpecialProgrammes extends ProgrammesBaseIndexabilityPolicy {
|
|
|
10
10
|
filterKeys = [FilterKey.SPECIAL_PROGRAMMES];
|
|
11
11
|
rules = [
|
|
12
12
|
new SingleValueSelectedForFilterRule(FilterKey.SPECIAL_PROGRAMMES),
|
|
13
|
-
new OnlyFiltersSelectedRule([FilterKey.SPECIAL_PROGRAMMES])
|
|
13
|
+
new OnlyFiltersSelectedRule([FilterKey.SPECIAL_PROGRAMMES]),
|
|
14
14
|
];
|
|
15
15
|
constructor(dependencies) {
|
|
16
16
|
super(dependencies);
|
|
@@ -0,0 +1,18 @@
|
|
|
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 BlendedOrOnlineAttendanceRule extends BaseProgrammeFilterKeyValueRule {
|
|
5
|
+
constructor() {
|
|
6
|
+
const filterKeyValues = new Map([[
|
|
7
|
+
FilterKey.DELIVERY_METHOD,
|
|
8
|
+
[AttendanceFilterOptionValue.BLENDED, AttendanceFilterOptionValue.ONLINE]
|
|
9
|
+
]]);
|
|
10
|
+
super(filterKeyValues);
|
|
11
|
+
}
|
|
12
|
+
getName() {
|
|
13
|
+
return 'BlendedOrOnlineAttendanceRule';
|
|
14
|
+
}
|
|
15
|
+
getDescription() {
|
|
16
|
+
return 'Is indexable if the selected delivery method is blended or online.';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { SpecialProgrammesFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
3
|
+
import { BaseProgrammeFilterKeyValueRule } from '../BaseProgrammeFilterKeyValueRule';
|
|
4
|
+
export class ErasmusOrExecutiveSpecialProgrammeRule extends BaseProgrammeFilterKeyValueRule {
|
|
5
|
+
constructor() {
|
|
6
|
+
const filterKeyValues = new Map([[
|
|
7
|
+
FilterKey.SPECIAL_PROGRAMMES,
|
|
8
|
+
[SpecialProgrammesFilterOptionValue.ERASMUS_MUNDUS, SpecialProgrammesFilterOptionValue.EXECUTIVE_PROGRAMMES]
|
|
9
|
+
]
|
|
10
|
+
]);
|
|
11
|
+
super(filterKeyValues);
|
|
12
|
+
}
|
|
13
|
+
getName() {
|
|
14
|
+
return 'ErasmusOrExecutiveSpecialProgrammeRule';
|
|
15
|
+
}
|
|
16
|
+
getDescription() {
|
|
17
|
+
return 'Is indexable if the selected special programme is Erasmus Mundus or Executive Programmes.';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { SpecialProgrammesFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
3
|
+
import { BaseProgrammeFilterKeyValueRule } from '../BaseProgrammeFilterKeyValueRule';
|
|
4
|
+
export class ErasmusSpecialProgrammeRule extends BaseProgrammeFilterKeyValueRule {
|
|
5
|
+
constructor() {
|
|
6
|
+
const filterKeyValues = new Map([[
|
|
7
|
+
FilterKey.SPECIAL_PROGRAMMES,
|
|
8
|
+
[SpecialProgrammesFilterOptionValue.ERASMUS_MUNDUS]
|
|
9
|
+
]
|
|
10
|
+
]);
|
|
11
|
+
super(filterKeyValues);
|
|
12
|
+
}
|
|
13
|
+
getName() {
|
|
14
|
+
return 'ErasmusSpecialProgrammeRule';
|
|
15
|
+
}
|
|
16
|
+
getDescription() {
|
|
17
|
+
return 'Is indexable if the selected special programme is Erasmus Mundus.';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { SpecialProgrammesFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
3
|
+
import { BaseProgrammeFilterKeyValueRule } from '../BaseProgrammeFilterKeyValueRule';
|
|
4
|
+
export class ExecutiveSpecialProgrammeRule extends BaseProgrammeFilterKeyValueRule {
|
|
5
|
+
constructor() {
|
|
6
|
+
const filterKeyValues = new Map([[
|
|
7
|
+
FilterKey.SPECIAL_PROGRAMMES,
|
|
8
|
+
[SpecialProgrammesFilterOptionValue.EXECUTIVE_PROGRAMMES]
|
|
9
|
+
]
|
|
10
|
+
]);
|
|
11
|
+
super(filterKeyValues);
|
|
12
|
+
}
|
|
13
|
+
getName() {
|
|
14
|
+
return 'ExecutiveSpecialProgrammeRule';
|
|
15
|
+
}
|
|
16
|
+
getDescription() {
|
|
17
|
+
return 'Is indexable if the selected special programme is Executive.';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DependencyMissingError } from '../../errors/DependencyMissingError';
|
|
2
|
-
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
3
2
|
export class MinimumAmountOfResultsRule {
|
|
4
3
|
minimumResultsCount = 7;
|
|
5
4
|
maximumPageSize = 20;
|
|
@@ -17,11 +16,6 @@ export class MinimumAmountOfResultsRule {
|
|
|
17
16
|
throw new DependencyMissingError('SearchApiClient');
|
|
18
17
|
}
|
|
19
18
|
const count = await this.searchApiClient.getCount(filterKeyValues);
|
|
20
|
-
if (Object.keys(filterKeyValues).includes(FilterKey.DURATION) && Object.keys(filterKeyValues).length === 1) {
|
|
21
|
-
const filterKey = FilterKey.DURATION;
|
|
22
|
-
const filterValue = filterKeyValues.get(filterKey);
|
|
23
|
-
console.log(`DEBUG: Duration filter applied alone, filter: ${filterValue} found results: ${count}`); // eslint-disable-line no-console
|
|
24
|
-
}
|
|
25
19
|
return count >= (pageNumber - 1) * this.maximumPageSize + this.minimumResultsCount;
|
|
26
20
|
}
|
|
27
21
|
forSitemapGenerator() {
|
|
@@ -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,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
|
|
@@ -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, 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 } from '../programmes/policies';
|
|
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 } 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,8 @@ 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 {
|
|
16
|
+
import { DisciplineSpecialProgrammes } from '../programmes/policies/DisciplineSpecialProgrammes';
|
|
17
|
+
import { DegreeAttendanceSpecialProgrammes } from '../programmes/policies/DegreeAttendanceSpecialProgrammes';
|
|
17
18
|
export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
|
|
18
19
|
portalType;
|
|
19
20
|
policies;
|
|
@@ -68,6 +69,7 @@ export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGenerato
|
|
|
68
69
|
new DegreeFormatTuitionFee(dependencies),
|
|
69
70
|
new DegreeAttendanceFormat(dependencies),
|
|
70
71
|
new DegreeSpecialProgrammes(dependencies),
|
|
72
|
+
new DegreeAttendanceSpecialProgrammes(dependencies),
|
|
71
73
|
new Format(dependencies),
|
|
72
74
|
new DisciplineAttendance(dependencies),
|
|
73
75
|
new DisciplineContinent(dependencies),
|
|
@@ -82,6 +84,7 @@ export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGenerato
|
|
|
82
84
|
new DisciplineContinentAttendance(dependencies),
|
|
83
85
|
new DisciplineCountryAttendance(dependencies),
|
|
84
86
|
new DisciplineCountryFormat(dependencies),
|
|
87
|
+
new DisciplineSpecialProgrammes(dependencies),
|
|
85
88
|
new AttendanceTuitionFee(dependencies),
|
|
86
89
|
new AttendanceFormat(dependencies),
|
|
87
90
|
new AttendanceArea(dependencies)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studyportals/fawkes",
|
|
3
|
-
"version": "8.0.2-
|
|
3
|
+
"version": "8.0.2-21",
|
|
4
4
|
"description": "A package to centralize SEO related logic for SBLP and Sitemap Generator.",
|
|
5
5
|
"files": [
|
|
6
6
|
"./dist"
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@studyportals/domain-client": "7.1.0",
|
|
94
94
|
"@studyportals/ranking-api-interface": "^1.3.12",
|
|
95
|
-
"@studyportals/search-filters": "^6.1
|
|
95
|
+
"@studyportals/search-filters": "^6.3.1",
|
|
96
96
|
"@studyportals/static-domain-data": "^6.1.0"
|
|
97
97
|
},
|
|
98
98
|
"optionalDependencies": {
|