@studyportals/fawkes 8.5.2-0 → 8.5.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.
- package/dist/src/enums/FilterCombinations.d.ts +2 -0
- package/dist/src/enums/FilterCombinations.js +2 -0
- package/dist/src/organisations/SearchIndexabilityManager.js +3 -1
- package/dist/src/organisations/policies/index.d.ts +2 -0
- package/dist/src/organisations/policies/index.js +2 -0
- package/dist/src/organisations/policies/ranked/RankedCountryAreaCity.d.ts +13 -0
- package/dist/src/organisations/policies/ranked/RankedCountryAreaCity.js +43 -0
- package/dist/src/organisations/policies/ranked/RankedCountryCity.d.ts +14 -0
- package/dist/src/organisations/policies/ranked/RankedCountryCity.js +41 -0
- package/dist/src/structured-data/SearchStructuredDataFactory.js +1 -1
- package/package.json +1 -1
|
@@ -73,6 +73,8 @@ export declare enum FilterCombinations {
|
|
|
73
73
|
RANKED_CONTINENT = "rankedContinent",
|
|
74
74
|
RANKED_CONTINENT_ATTENDANCE = "rankedContinentAttendance",
|
|
75
75
|
RANKED_COUNTRY = "rankedCountry",
|
|
76
|
+
RANKED_COUNTRY_CITY = "rankedCountryCity",
|
|
77
|
+
RANKED_COUNTRY_AREA_CITY = "rankedCountryAreaCity",
|
|
76
78
|
RANKED_COUNTRY_ATTENDANCE = "rankedCountryAttendance",
|
|
77
79
|
RANKED_DISCIPLINE_COUNTRY = "rankedDisciplineCountry",
|
|
78
80
|
RANKED_DISCIPLINE = "rankedDiscipline",
|
|
@@ -74,6 +74,8 @@ export var FilterCombinations;
|
|
|
74
74
|
FilterCombinations["RANKED_CONTINENT"] = "rankedContinent";
|
|
75
75
|
FilterCombinations["RANKED_CONTINENT_ATTENDANCE"] = "rankedContinentAttendance";
|
|
76
76
|
FilterCombinations["RANKED_COUNTRY"] = "rankedCountry";
|
|
77
|
+
FilterCombinations["RANKED_COUNTRY_CITY"] = "rankedCountryCity";
|
|
78
|
+
FilterCombinations["RANKED_COUNTRY_AREA_CITY"] = "rankedCountryAreaCity";
|
|
77
79
|
FilterCombinations["RANKED_COUNTRY_ATTENDANCE"] = "rankedCountryAttendance";
|
|
78
80
|
FilterCombinations["RANKED_DISCIPLINE_COUNTRY"] = "rankedDisciplineCountry";
|
|
79
81
|
FilterCombinations["RANKED_DISCIPLINE"] = "rankedDiscipline";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DependencyTypes } from '../enums/DependencyTypes';
|
|
2
|
-
import { Area, AreaAttendance, Attendance, Continent, Country, CountryAttendance, Unfiltered, RankedArea, RankedAreaDiscipline, RankedAttendance, RankedAttendanceDiscipline, RankedContinent, RankedContinentAttendance, RankedCountry, RankedCountryAttendance, RankedCountryDiscipline, RankedDiscipline, RankedUnfiltered, CountryCity, CountryAreaCity } from '../organisations/policies';
|
|
2
|
+
import { Area, AreaAttendance, Attendance, Continent, Country, CountryAttendance, Unfiltered, RankedArea, RankedAreaDiscipline, RankedAttendance, RankedAttendanceDiscipline, RankedContinent, RankedContinentAttendance, RankedCountry, RankedCountryAttendance, RankedCountryDiscipline, RankedDiscipline, RankedUnfiltered, CountryCity, CountryAreaCity, RankedCountryCity, RankedCountryAreaCity } from '../organisations/policies';
|
|
3
3
|
export class SearchIndexabilityManager {
|
|
4
4
|
policies;
|
|
5
5
|
constructor(portalType, seoInfoBase, filterState, sortingState, applicationState) {
|
|
@@ -31,6 +31,8 @@ export class SearchIndexabilityManager {
|
|
|
31
31
|
new RankedCountryAttendance(dependencies),
|
|
32
32
|
new RankedCountryDiscipline(dependencies),
|
|
33
33
|
new RankedDiscipline(dependencies),
|
|
34
|
+
new RankedCountryCity(dependencies),
|
|
35
|
+
new RankedCountryAreaCity(dependencies),
|
|
34
36
|
new RankedUnfiltered(dependencies)
|
|
35
37
|
];
|
|
36
38
|
}
|
|
@@ -18,3 +18,5 @@ export * from './ranked/RankedCountryAttendance';
|
|
|
18
18
|
export * from './ranked/RankedCountryDiscipline';
|
|
19
19
|
export * from './ranked/RankedDiscipline';
|
|
20
20
|
export * from './ranked/RankedUnfiltered';
|
|
21
|
+
export * from './ranked/RankedCountryCity';
|
|
22
|
+
export * from './ranked/RankedCountryAreaCity';
|
|
@@ -18,3 +18,5 @@ export * from './ranked/RankedCountryAttendance';
|
|
|
18
18
|
export * from './ranked/RankedCountryDiscipline';
|
|
19
19
|
export * from './ranked/RankedDiscipline';
|
|
20
20
|
export * from './ranked/RankedUnfiltered';
|
|
21
|
+
export * from './ranked/RankedCountryCity';
|
|
22
|
+
export * from './ranked/RankedCountryAreaCity';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RankedOrganisationsSeoIndexabilityPolicy } from "../RankedOrganisationsSeoIndexabilityPolicy";
|
|
2
|
+
import { IOrganisationsSeoDependencies } from "../../../organisations/types/IOrganisationsSeoDependencies";
|
|
3
|
+
import { OnlyFiltersSelectedRule } from "../../../common/rules/OnlyFiltersSelectedRule";
|
|
4
|
+
import { SingleValueSelectedForFilterRule } from "../../../common/rules/SingleValueSelectedForFilterRule";
|
|
5
|
+
import { FilterCombinations } from "../../../enums/FilterCombinations";
|
|
6
|
+
export declare class RankedCountryAreaCity extends RankedOrganisationsSeoIndexabilityPolicy {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly description: string;
|
|
9
|
+
protected readonly baseRules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule)[];
|
|
10
|
+
constructor(dependencies: IOrganisationsSeoDependencies);
|
|
11
|
+
protected generateUrls(): Promise<string[]>;
|
|
12
|
+
get filterCombination(): FilterCombinations;
|
|
13
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { RankedOrganisationsSeoIndexabilityPolicy } from "../RankedOrganisationsSeoIndexabilityPolicy";
|
|
2
|
+
import { OnlyFiltersSelectedRule } from "../../../common/rules/OnlyFiltersSelectedRule";
|
|
3
|
+
import { FilterKey } from "@studyportals/search-filters/server-side";
|
|
4
|
+
import { SingleValueSelectedForFilterRule } from "../../../common/rules/SingleValueSelectedForFilterRule";
|
|
5
|
+
import { CityPresenter } from "../../../presenters/CityPresenter";
|
|
6
|
+
import { FilterCombinations } from "../../../enums/FilterCombinations";
|
|
7
|
+
export class RankedCountryAreaCity extends RankedOrganisationsSeoIndexabilityPolicy {
|
|
8
|
+
name = 'Ranked Country/Area/City Policy';
|
|
9
|
+
description = 'Regulates indexability of ranking-sorted country, area, and city-level filtered pages, prioritizing high-value geographic views with quality-based sorting.';
|
|
10
|
+
baseRules = [
|
|
11
|
+
new SingleValueSelectedForFilterRule(FilterKey.CONTINENT),
|
|
12
|
+
new OnlyFiltersSelectedRule([FilterKey.CONTINENT])
|
|
13
|
+
];
|
|
14
|
+
constructor(dependencies) {
|
|
15
|
+
super(dependencies);
|
|
16
|
+
}
|
|
17
|
+
async generateUrls() {
|
|
18
|
+
const cityFragments = await CityPresenter
|
|
19
|
+
.getInstance(this.dependencies.searchApiClient)
|
|
20
|
+
.getFragments();
|
|
21
|
+
const paths = [];
|
|
22
|
+
const filteredFragmentsForCountryAreaCity = cityFragments.filter(city => city.areaId !== null && city.areaId !== undefined);
|
|
23
|
+
for (const city of filteredFragmentsForCountryAreaCity) {
|
|
24
|
+
const areaId = city.areaId?.toString() || '';
|
|
25
|
+
if (areaId === '') {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
const filterKeyValues = new Map([
|
|
29
|
+
[FilterKey.CITY, [city.id]],
|
|
30
|
+
[FilterKey.AREA, [areaId]],
|
|
31
|
+
[FilterKey.COUNTRY, [city.countryId]]
|
|
32
|
+
]);
|
|
33
|
+
const result = await this.checkRulesForSitemap(filterKeyValues);
|
|
34
|
+
if (result) {
|
|
35
|
+
paths.push(this.getPathWithSortingOption(city.path));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return paths;
|
|
39
|
+
}
|
|
40
|
+
get filterCombination() {
|
|
41
|
+
return FilterCombinations.RANKED_COUNTRY_AREA_CITY;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RankedOrganisationsSeoIndexabilityPolicy } from "../RankedOrganisationsSeoIndexabilityPolicy";
|
|
2
|
+
import { IOrganisationsSeoDependencies } from "../../../organisations/types/IOrganisationsSeoDependencies";
|
|
3
|
+
import { OnlyFiltersSelectedRule } from "../../../common/rules/OnlyFiltersSelectedRule";
|
|
4
|
+
import { SingleValueSelectedForFilterRule } from "../../../common/rules/SingleValueSelectedForFilterRule";
|
|
5
|
+
import { ExcludeByIdForCitiesRule } from "../../../organisations/rules/ExcludeByIdForCitiesRule";
|
|
6
|
+
import { FilterCombinations } from "../../../enums/FilterCombinations";
|
|
7
|
+
export declare class RankedCountryCity extends RankedOrganisationsSeoIndexabilityPolicy {
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly description: string;
|
|
10
|
+
protected readonly baseRules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | ExcludeByIdForCitiesRule)[];
|
|
11
|
+
constructor(dependencies: IOrganisationsSeoDependencies);
|
|
12
|
+
protected generateUrls(): Promise<string[]>;
|
|
13
|
+
get filterCombination(): FilterCombinations;
|
|
14
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { RankedOrganisationsSeoIndexabilityPolicy } from "../RankedOrganisationsSeoIndexabilityPolicy";
|
|
2
|
+
import { OnlyFiltersSelectedRule } from "../../../common/rules/OnlyFiltersSelectedRule";
|
|
3
|
+
import { FilterKey } from "@studyportals/search-filters/server-side";
|
|
4
|
+
import { SingleValueSelectedForFilterRule } from "../../../common/rules/SingleValueSelectedForFilterRule";
|
|
5
|
+
import { ExcludeByIdForCitiesRule } from "../../../organisations/rules/ExcludeByIdForCitiesRule";
|
|
6
|
+
import { CityPresenter } from "../../../presenters/CityPresenter";
|
|
7
|
+
import { FilterCombinations } from "../../../enums/FilterCombinations";
|
|
8
|
+
export class RankedCountryCity extends RankedOrganisationsSeoIndexabilityPolicy {
|
|
9
|
+
name = 'Ranked Country/City Policy';
|
|
10
|
+
description = 'Regulates indexability of ranking-sorted country, and city-level filtered pages, prioritizing high-value geographic views with quality-based sorting.';
|
|
11
|
+
baseRules = [
|
|
12
|
+
new SingleValueSelectedForFilterRule(FilterKey.CITY),
|
|
13
|
+
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
14
|
+
new OnlyFiltersSelectedRule([FilterKey.CITY, FilterKey.COUNTRY]),
|
|
15
|
+
new ExcludeByIdForCitiesRule(FilterKey.CITY)
|
|
16
|
+
];
|
|
17
|
+
constructor(dependencies) {
|
|
18
|
+
super(dependencies);
|
|
19
|
+
}
|
|
20
|
+
async generateUrls() {
|
|
21
|
+
const cityFragments = await CityPresenter
|
|
22
|
+
.getInstance(this.dependencies.searchApiClient)
|
|
23
|
+
.getFragments();
|
|
24
|
+
const paths = [];
|
|
25
|
+
const filteredFragmentsForCountryCity = cityFragments.filter(city => city.areaId === null || city.areaId === undefined);
|
|
26
|
+
for (const city of filteredFragmentsForCountryCity) {
|
|
27
|
+
const filterKeyValues = new Map([
|
|
28
|
+
[FilterKey.CITY, [city.id]],
|
|
29
|
+
[FilterKey.COUNTRY, [city.countryId]]
|
|
30
|
+
]);
|
|
31
|
+
const result = await this.checkRulesForSitemap(filterKeyValues);
|
|
32
|
+
if (result) {
|
|
33
|
+
paths.push(this.getPathWithSortingOption(city.path));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return paths;
|
|
37
|
+
}
|
|
38
|
+
get filterCombination() {
|
|
39
|
+
return FilterCombinations.RANKED_COUNTRY_CITY;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -172,7 +172,7 @@ export class SearchStructuredDataFactory {
|
|
|
172
172
|
return {
|
|
173
173
|
'@type': 'AggregateRating',
|
|
174
174
|
'ratingValue': reviewRating.rating,
|
|
175
|
-
'
|
|
175
|
+
'reviewCount': reviewRating.quantity,
|
|
176
176
|
'bestRating': 5,
|
|
177
177
|
'worstRating': 1
|
|
178
178
|
};
|