@studyportals/fawkes 4.0.1-0 → 4.0.1-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/sitemap-generator-seo/index.d.ts +3 -2
- package/dist/sitemap-generator-seo/index.js +3 -2
- package/dist/src/scholarships/policies/Country.d.ts +1 -1
- package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.d.ts +7 -0
- package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.js +11 -0
- package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.d.ts +10 -0
- package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.js +36 -0
- package/dist/src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.d.ts +8 -0
- package/dist/src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.js +27 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { IOrganisationsClient } from '../src/sitemap-generator/IOrganisationsCli
|
|
|
2
2
|
import { IOrganisation } from '../src/sitemap-generator/IOrganisation';
|
|
3
3
|
import { ISearchApiClient } from '../src/sitemap-generator/ISearchApiClient';
|
|
4
4
|
import { ISitemapUrlGeneratorManager } from '../src/sitemap-generator/ISitemapUrlGeneratorManager';
|
|
5
|
-
import {
|
|
5
|
+
import { OrganisationsSitemapUrlGeneratorManager } from '../src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager';
|
|
6
|
+
import { ScholarshipsSitemapUrlGeneratorManager } from '../src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager';
|
|
6
7
|
import { FilterCombinations } from '../src/enums/FilterCombinations';
|
|
7
|
-
export { IOrganisationsClient, IOrganisation, ISearchApiClient, ISitemapUrlGeneratorManager,
|
|
8
|
+
export { IOrganisationsClient, IOrganisation, ISearchApiClient, ISitemapUrlGeneratorManager, OrganisationsSitemapUrlGeneratorManager, ScholarshipsSitemapUrlGeneratorManager, FilterCombinations };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OrganisationsSitemapUrlGeneratorManager } from '../src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager';
|
|
2
|
+
import { ScholarshipsSitemapUrlGeneratorManager } from '../src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager';
|
|
2
3
|
import { FilterCombinations } from '../src/enums/FilterCombinations';
|
|
3
|
-
export {
|
|
4
|
+
export { OrganisationsSitemapUrlGeneratorManager, ScholarshipsSitemapUrlGeneratorManager, FilterCombinations };
|
|
@@ -5,7 +5,7 @@ import { ISeoDependencies } from '../../common/ISeoDependencies';
|
|
|
5
5
|
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
6
6
|
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
7
7
|
export declare class Country extends BaseSeoIndexabilityPolicy<ISeoDependencies> {
|
|
8
|
-
protected readonly rules: (
|
|
8
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | SearchVolumeCountriesRule)[];
|
|
9
9
|
get filterCombination(): FilterCombinations;
|
|
10
10
|
protected generateUrls(): Promise<string[]>;
|
|
11
11
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ISitemapUrlGenerator } from '../common/ISitemapUrlGenerator';
|
|
2
|
+
import { ISitemapUrlGeneratorManager } from './ISitemapUrlGeneratorManager';
|
|
3
|
+
import { FilterCombinations } from '../enums/FilterCombinations';
|
|
4
|
+
export declare abstract class BaseSitemapUrlGeneratorManager implements ISitemapUrlGeneratorManager {
|
|
5
|
+
abstract readonly policies: ISitemapUrlGenerator[];
|
|
6
|
+
generateUrls(): Promise<Map<FilterCombinations, string[]>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class BaseSitemapUrlGeneratorManager {
|
|
2
|
+
async generateUrls() {
|
|
3
|
+
const map = new Map();
|
|
4
|
+
await Promise.all(this.policies.map(async (policy) => {
|
|
5
|
+
const filterCombination = policy.filterCombination;
|
|
6
|
+
const urls = await policy.generateSitemapUrls();
|
|
7
|
+
map.set(filterCombination, urls);
|
|
8
|
+
}));
|
|
9
|
+
return map;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ISitemapUrlGenerator } from '../common/ISitemapUrlGenerator';
|
|
2
|
+
import { IOrganisationsClient } from '../sitemap-generator/IOrganisationsClient';
|
|
3
|
+
import { ISearchApiClient } from '../sitemap-generator/ISearchApiClient';
|
|
4
|
+
import { BaseSitemapUrlGeneratorManager } from './BaseSitemapUrlGeneratorManager';
|
|
5
|
+
import { PortalType } from '@studyportals/domain-client';
|
|
6
|
+
import { IRankingApiClient } from './IRankingApiClient';
|
|
7
|
+
export declare class OrganisationsSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
|
|
8
|
+
readonly policies: ISitemapUrlGenerator[];
|
|
9
|
+
constructor(portalType: PortalType, searchApiClient: ISearchApiClient, organisationsClient: IOrganisationsClient, rankingApiClient: IRankingApiClient);
|
|
10
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DependencyTypes } from '../enums/DependencyTypes';
|
|
2
|
+
import { BaseSitemapUrlGeneratorManager } from './BaseSitemapUrlGeneratorManager';
|
|
3
|
+
import { Area, AreaAttendance, Attendance, Continent, Country, CountryAttendance, RankedArea, RankedAreaDiscipline, RankedAttendance, RankedAttendanceDiscipline, RankedContinent, RankedContinentAttendance, RankedCountry, RankedCountryAttendance, RankedCountryDiscipline, RankedDiscipline, RankedUnfiltered, Unfiltered } from '../organisations/policies';
|
|
4
|
+
export class OrganisationsSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
|
|
5
|
+
policies;
|
|
6
|
+
constructor(portalType, searchApiClient, organisationsClient, rankingApiClient) {
|
|
7
|
+
super();
|
|
8
|
+
const dependencies = {
|
|
9
|
+
dependencyType: DependencyTypes.SITEMAP_GENERATOR,
|
|
10
|
+
portalType,
|
|
11
|
+
searchApiClient,
|
|
12
|
+
organisationsClient,
|
|
13
|
+
rankingApiClient
|
|
14
|
+
};
|
|
15
|
+
this.policies = [
|
|
16
|
+
new Area(dependencies),
|
|
17
|
+
new AreaAttendance(dependencies),
|
|
18
|
+
new Attendance(dependencies),
|
|
19
|
+
new Continent(dependencies),
|
|
20
|
+
new Country(dependencies),
|
|
21
|
+
new CountryAttendance(dependencies),
|
|
22
|
+
new Unfiltered(dependencies),
|
|
23
|
+
new RankedArea(dependencies),
|
|
24
|
+
new RankedAreaDiscipline(dependencies),
|
|
25
|
+
new RankedAttendance(dependencies),
|
|
26
|
+
new RankedAttendanceDiscipline(dependencies),
|
|
27
|
+
new RankedContinent(dependencies),
|
|
28
|
+
new RankedContinentAttendance(dependencies),
|
|
29
|
+
new RankedCountry(dependencies),
|
|
30
|
+
new RankedCountryAttendance(dependencies),
|
|
31
|
+
new RankedCountryDiscipline(dependencies),
|
|
32
|
+
new RankedDiscipline(dependencies),
|
|
33
|
+
new RankedUnfiltered(dependencies)
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ISitemapUrlGenerator } from '../common/ISitemapUrlGenerator';
|
|
2
|
+
import { IOrganisationsClient } from '../sitemap-generator/IOrganisationsClient';
|
|
3
|
+
import { ISearchApiClient } from '../sitemap-generator/ISearchApiClient';
|
|
4
|
+
import { BaseSitemapUrlGeneratorManager } from './BaseSitemapUrlGeneratorManager';
|
|
5
|
+
export declare class ScholarshipsSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
|
|
6
|
+
readonly policies: ISitemapUrlGenerator[];
|
|
7
|
+
constructor(searchApiClient: ISearchApiClient, organisationsClient: IOrganisationsClient);
|
|
8
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DependencyTypes } from '../enums/DependencyTypes';
|
|
2
|
+
import { Area } from '../scholarships/policies/Area';
|
|
3
|
+
import { Country } from '../scholarships/policies/Country';
|
|
4
|
+
import { Discipline } from '../scholarships/policies/Discipline';
|
|
5
|
+
import { DisciplineCountry } from '../scholarships/policies/DisciplineCountry';
|
|
6
|
+
import { UniversityCountry } from '../scholarships/policies/UniversityCountry';
|
|
7
|
+
import { Unfiltered } from '../scholarships/policies/Unfiltered';
|
|
8
|
+
import { BaseSitemapUrlGeneratorManager } from './BaseSitemapUrlGeneratorManager';
|
|
9
|
+
export class ScholarshipsSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
|
|
10
|
+
policies;
|
|
11
|
+
constructor(searchApiClient, organisationsClient) {
|
|
12
|
+
super();
|
|
13
|
+
const dependencies = {
|
|
14
|
+
dependencyType: DependencyTypes.SITEMAP_GENERATOR,
|
|
15
|
+
searchApiClient,
|
|
16
|
+
organisationsClient
|
|
17
|
+
};
|
|
18
|
+
this.policies = [
|
|
19
|
+
new Area(dependencies),
|
|
20
|
+
new Country(dependencies),
|
|
21
|
+
new DisciplineCountry(dependencies),
|
|
22
|
+
new Discipline(dependencies),
|
|
23
|
+
new UniversityCountry(dependencies),
|
|
24
|
+
new Unfiltered(dependencies)
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
}
|