@studyportals/fawkes 8.0.2-0 → 8.0.2-1
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.
|
@@ -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 ContinentFormat 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;
|
|
@@ -5,6 +5,7 @@ import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
|
5
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
6
|
import { ContinentPresenter } from '../../presenters/ContinentPresenter';
|
|
7
7
|
import { FormatPresenter } from '../../presenters/FormatPresenter';
|
|
8
|
+
import { PartTimeFormatRule } from '../rules/PartTimeFormatRule';
|
|
8
9
|
export class ContinentFormat extends ProgrammesBaseIndexabilityPolicy {
|
|
9
10
|
name = 'Continent Format Policy';
|
|
10
11
|
description = 'Determines indexing rules for pages filtered by continent and format.';
|
|
@@ -13,6 +14,7 @@ export class ContinentFormat extends ProgrammesBaseIndexabilityPolicy {
|
|
|
13
14
|
new SingleValueSelectedForFilterRule(FilterKey.ATTENDANCE),
|
|
14
15
|
new SingleValueSelectedForFilterRule(FilterKey.CONTINENT),
|
|
15
16
|
new OnlyFiltersSelectedRule([FilterKey.ATTENDANCE, FilterKey.CONTINENT]),
|
|
17
|
+
new PartTimeFormatRule()
|
|
16
18
|
];
|
|
17
19
|
constructor(dependencies) {
|
|
18
20
|
super(dependencies);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
1
|
+
import { FilterKey, FormatFilterOptionValue } 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';
|
|
@@ -23,8 +23,7 @@ export class DegreeFormat extends ProgrammesBaseIndexabilityPolicy {
|
|
|
23
23
|
async generateUrls() {
|
|
24
24
|
const formatFragments = FormatPresenter.getInstance().getFragments();
|
|
25
25
|
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
26
|
-
|
|
27
|
-
const allowedFormatIds = ["fulltime", "parttime"];
|
|
26
|
+
const allowedFormatIds = [FormatFilterOptionValue.PART_TIME, FormatFilterOptionValue.FULL_TIME];
|
|
28
27
|
const allowedFormats = formatFragments.filter(format => allowedFormatIds.includes(format.id));
|
|
29
28
|
const paths = [];
|
|
30
29
|
for (const pageNumber of this.indexablePageNumbers) {
|