@studyportals/fawkes 4.0.1-1 → 4.0.1-3
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/scholarships-seo/index.d.ts +2 -1
- package/dist/sitemap-generator-seo/index.d.ts +2 -1
- package/dist/src/common/IDocumentationManager.d.ts +5 -0
- package/dist/src/common/IRule.d.ts +1 -0
- package/dist/src/common/ISearchIndexabilityManager.d.ts +2 -1
- package/dist/src/common/policies/BaseSeoIndexabilityPolicy.d.ts +1 -0
- package/dist/src/common/policies/BaseSeoIndexabilityPolicy.js +3 -0
- package/dist/src/common/rules/BaseFilterKeyValueRule.d.ts +1 -0
- package/dist/src/common/rules/NoFiltersSelectedRule.d.ts +1 -0
- package/dist/src/common/rules/NoFiltersSelectedRule.js +3 -0
- package/dist/src/common/rules/OnlyFiltersSelectedRule.d.ts +1 -0
- package/dist/src/common/rules/OnlyFiltersSelectedRule.js +3 -0
- package/dist/src/common/rules/SingleValueSelectedForFilterRule.d.ts +1 -0
- package/dist/src/common/rules/SingleValueSelectedForFilterRule.js +3 -0
- package/dist/src/organisations/SearchIndexabilityManager.d.ts +1 -0
- package/dist/src/organisations/SearchIndexabilityManager.js +3 -0
- package/dist/src/organisations/rules/AtLeastTwoRankedResultsRule.d.ts +1 -0
- package/dist/src/organisations/rules/AtLeastTwoRankedResultsRule.js +3 -0
- package/dist/src/organisations/rules/BaseSearchVolumeOrganisationsRule.d.ts +1 -0
- package/dist/src/organisations/rules/BaseSearchVolumeOrganisationsRule.js +3 -0
- package/dist/src/organisations/rules/ContinentIsEuropeRule.d.ts +1 -0
- package/dist/src/organisations/rules/ContinentIsEuropeRule.js +3 -0
- package/dist/src/organisations/rules/OnlineAttendanceRule.d.ts +1 -0
- package/dist/src/organisations/rules/OnlineAttendanceRule.js +3 -0
- package/dist/src/organisations/rules/SearchVolumeAreasAttendanceRule.d.ts +1 -0
- package/dist/src/organisations/rules/SearchVolumeAreasAttendanceRule.js +3 -0
- package/dist/src/organisations/rules/SearchVolumeAreasDisciplineRule.d.ts +1 -0
- package/dist/src/organisations/rules/SearchVolumeAreasDisciplineRule.js +3 -0
- package/dist/src/organisations/rules/SearchVolumeCountriesAttendanceRule.d.ts +1 -0
- package/dist/src/organisations/rules/SearchVolumeCountriesAttendanceRule.js +3 -0
- package/dist/src/scholarships/SearchIndexabilityManager.d.ts +2 -0
- package/dist/src/scholarships/SearchIndexabilityManager.js +3 -0
- package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.d.ts +1 -0
- package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.js +3 -0
- package/dist/src/scholarships/rules/SearchVolumeAreasRule.d.ts +1 -0
- package/dist/src/scholarships/rules/SearchVolumeAreasRule.js +3 -0
- package/dist/src/scholarships/rules/SearchVolumeCountriesDisciplinesRule.d.ts +1 -0
- package/dist/src/scholarships/rules/SearchVolumeCountriesDisciplinesRule.js +3 -0
- package/dist/src/scholarships/rules/SearchVolumeCountriesRule.d.ts +1 -0
- package/dist/src/scholarships/rules/SearchVolumeCountriesRule.js +3 -0
- package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.d.ts +1 -0
- package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.js +3 -0
- package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.d.ts +1 -0
- package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.js +3 -0
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorManager.d.ts +2 -1
- package/package.json +1 -1
- package/dist/src/common/IRankingApiClient.d.ts +0 -3
- package/dist/src/sitemap-generator/SitemapUrlGeneratorManager.d.ts +0 -9
- package/dist/src/sitemap-generator/SitemapUrlGeneratorManager.js +0 -34
- /package/dist/src/common/{IRankingApiClient.js → IDocumentationManager.js} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ISeoFilterState } from '../src/common/ISeoFilterState';
|
|
2
2
|
import { ISeoInfoBase } from '../src/common/ISeoInfoBase';
|
|
3
3
|
import { ISearchIndexabilityManager } from '../src/common/ISearchIndexabilityManager';
|
|
4
|
+
import { ISeoIndexabilityPolicy } from '../src/common/ISeoIndexabilityPolicy';
|
|
4
5
|
import { SearchIndexabilityManager } from '../src/scholarships/SearchIndexabilityManager';
|
|
5
6
|
import { types } from '../src/scholarships/types';
|
|
6
|
-
export { ISeoFilterState, ISeoInfoBase, ISearchIndexabilityManager, SearchIndexabilityManager, types };
|
|
7
|
+
export { ISeoFilterState, ISeoInfoBase, ISearchIndexabilityManager, SearchIndexabilityManager, types, ISeoIndexabilityPolicy };
|
|
@@ -5,4 +5,5 @@ import { ISitemapUrlGeneratorManager } from '../src/sitemap-generator/ISitemapUr
|
|
|
5
5
|
import { OrganisationsSitemapUrlGeneratorManager } from '../src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager';
|
|
6
6
|
import { ScholarshipsSitemapUrlGeneratorManager } from '../src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager';
|
|
7
7
|
import { FilterCombinations } from '../src/enums/FilterCombinations';
|
|
8
|
-
|
|
8
|
+
import { ISitemapUrlGenerator } from '../src/common/ISitemapUrlGenerator';
|
|
9
|
+
export { IOrganisationsClient, IOrganisation, ISearchApiClient, ISitemapUrlGeneratorManager, OrganisationsSitemapUrlGeneratorManager, ScholarshipsSitemapUrlGeneratorManager, FilterCombinations, ISitemapUrlGenerator };
|
|
@@ -18,4 +18,5 @@ export declare abstract class BaseSeoIndexabilityPolicy<TDependencies extends ID
|
|
|
18
18
|
protected checkRulesForSitemap(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
19
19
|
protected isIndexabilityPolicyDependencies(): boolean;
|
|
20
20
|
protected isSitemapUrlGeneratorDependencies(): boolean;
|
|
21
|
+
get allRules(): IRule[];
|
|
21
22
|
}
|
|
@@ -5,6 +5,7 @@ export declare abstract class BaseFilterKeyValueRule implements IRule {
|
|
|
5
5
|
private readonly expectedFilterKeyValues;
|
|
6
6
|
constructor(expectedFilterKeyValues: FilterKeyValuesMap);
|
|
7
7
|
abstract getName(): string;
|
|
8
|
+
abstract getDescription(): string;
|
|
8
9
|
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
9
10
|
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
10
11
|
}
|
|
@@ -8,4 +8,5 @@ export declare class SingleValueSelectedForFilterRule implements IRule {
|
|
|
8
8
|
getName(): string;
|
|
9
9
|
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
10
10
|
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
11
|
+
getDescription(): string;
|
|
11
12
|
}
|
|
@@ -8,4 +8,5 @@ export declare class SearchIndexabilityManager implements ISearchIndexabilityMan
|
|
|
8
8
|
policies: ISeoIndexabilityPolicy[];
|
|
9
9
|
constructor(portalType: PortalType, seoInfoBase: ISeoInfoBase, filterState: ISeoFilterState, sortingState: ISeoSortingState, applicationState: IOrganisationSearchApplicationState);
|
|
10
10
|
shouldIndex(): Promise<boolean>;
|
|
11
|
+
getPolicies(): ISeoIndexabilityPolicy[];
|
|
11
12
|
}
|
|
@@ -9,4 +9,5 @@ export declare class AtLeastTwoRankedResultsRule implements IRule {
|
|
|
9
9
|
forSearch(dependencies: IOrganisationSearchDependencies): Promise<boolean>;
|
|
10
10
|
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
11
11
|
getName(): string;
|
|
12
|
+
getDescription(): string;
|
|
12
13
|
}
|
|
@@ -10,4 +10,5 @@ export declare abstract class BaseSearchVolumeOrganisationsRule implements IRule
|
|
|
10
10
|
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
11
11
|
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
12
12
|
private hasSearchVolume;
|
|
13
|
+
getDescription(): string;
|
|
13
14
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ISeoIndexabilityPolicy } from '../common/ISeoIndexabilityPolicy';
|
|
1
2
|
import { ISeoInfoBase } from '../common/ISeoInfoBase';
|
|
2
3
|
import { ISeoFilterState } from '../common/ISeoFilterState';
|
|
3
4
|
import { ISearchApplicationState } from '../common/ISearchApplicationState';
|
|
@@ -6,4 +7,5 @@ export declare class SearchIndexabilityManager implements ISearchIndexabilityMan
|
|
|
6
7
|
private policies;
|
|
7
8
|
constructor(seoInfoBase: ISeoInfoBase, filterState: ISeoFilterState, applicationState: ISearchApplicationState);
|
|
8
9
|
shouldIndex(): Promise<boolean>;
|
|
10
|
+
getPolicies(): ISeoIndexabilityPolicy[];
|
|
9
11
|
}
|
|
@@ -26,4 +26,7 @@ export class SearchVolumeAreasRule {
|
|
|
26
26
|
hasSearchVolume(areaId) {
|
|
27
27
|
return !this.areasWithNoSearchVolume.includes(Number(areaId));
|
|
28
28
|
}
|
|
29
|
+
getDescription() {
|
|
30
|
+
return `Search volume is not available for the areas with id ${this.areasWithNoSearchVolume.join(', ')}`;
|
|
31
|
+
}
|
|
29
32
|
}
|
|
@@ -10,4 +10,5 @@ export declare class SearchVolumeCountriesDisciplinesRule implements IRule {
|
|
|
10
10
|
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
11
11
|
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
12
12
|
private hasSearchVolume;
|
|
13
|
+
getDescription(): string;
|
|
13
14
|
}
|
|
@@ -37,4 +37,7 @@ export class SearchVolumeCountriesDisciplinesRule {
|
|
|
37
37
|
hasSearchVolume(countryId, disciplineId) {
|
|
38
38
|
return this.combinationsWithSearchVolume.has(`${countryId},${disciplineId}`);
|
|
39
39
|
}
|
|
40
|
+
getDescription() {
|
|
41
|
+
return 'Search volume is available for the selected country and discipline';
|
|
42
|
+
}
|
|
40
43
|
}
|
|
@@ -26,4 +26,7 @@ export class SearchVolumeCountriesRule {
|
|
|
26
26
|
hasSearchVolume(countryId) {
|
|
27
27
|
return !this.countriesWithNoSearchVolume.includes(Number(countryId));
|
|
28
28
|
}
|
|
29
|
+
getDescription() {
|
|
30
|
+
return `Search volume is not available for the countries with id ${this.countriesWithNoSearchVolume.join(', ')}`;
|
|
31
|
+
}
|
|
29
32
|
}
|
|
@@ -8,4 +8,5 @@ export declare class SearchVolumeDisciplinesRule implements IRule {
|
|
|
8
8
|
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
9
9
|
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
10
10
|
private hasSearchVolume;
|
|
11
|
+
getDescription(): string;
|
|
11
12
|
}
|
|
@@ -26,4 +26,7 @@ export class SearchVolumeDisciplinesRule {
|
|
|
26
26
|
hasSearchVolume(disciplineId) {
|
|
27
27
|
return !this.disciplinesWithNoSearchVolume.includes(Number(disciplineId));
|
|
28
28
|
}
|
|
29
|
+
getDescription() {
|
|
30
|
+
return `Search volume is not available for the disciplines with id ${this.disciplinesWithNoSearchVolume.join(', ')}`;
|
|
31
|
+
}
|
|
29
32
|
}
|
|
@@ -4,4 +4,5 @@ import { FilterCombinations } from '../enums/FilterCombinations';
|
|
|
4
4
|
export declare abstract class BaseSitemapUrlGeneratorManager implements ISitemapUrlGeneratorManager {
|
|
5
5
|
abstract readonly policies: ISitemapUrlGenerator[];
|
|
6
6
|
generateUrls(): Promise<Map<FilterCombinations, string[]>>;
|
|
7
|
+
getPolicies(): ISitemapUrlGenerator[];
|
|
7
8
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { IDocumentationManager } from '../common/IDocumentationManager';
|
|
1
2
|
import { FilterCombinations } from '../enums/FilterCombinations';
|
|
2
|
-
export interface ISitemapUrlGeneratorManager {
|
|
3
|
+
export interface ISitemapUrlGeneratorManager extends IDocumentationManager {
|
|
3
4
|
generateUrls(): Promise<Map<FilterCombinations, string[]>>;
|
|
4
5
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ISitemapUrlGeneratorManager } from './ISitemapUrlGeneratorManager';
|
|
2
|
-
import { FilterCombinations } from '../enums/FilterCombinations';
|
|
3
|
-
import { IOrganisationsClient } from '../sitemap-generator/IOrganisationsClient';
|
|
4
|
-
import { ISearchApiClient } from '../sitemap-generator/ISearchApiClient';
|
|
5
|
-
export declare class SitemapUrlGeneratorManager implements ISitemapUrlGeneratorManager {
|
|
6
|
-
private readonly policies;
|
|
7
|
-
constructor(searchApiClient: ISearchApiClient, organisationsClient: IOrganisationsClient);
|
|
8
|
-
generateUrls(): Promise<Map<FilterCombinations, string[]>>;
|
|
9
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
export class SitemapUrlGeneratorManager {
|
|
9
|
-
policies;
|
|
10
|
-
constructor(searchApiClient, organisationsClient) {
|
|
11
|
-
const dependencies = {
|
|
12
|
-
dependencyType: DependencyTypes.SITEMAP_GENERATOR,
|
|
13
|
-
searchApiClient,
|
|
14
|
-
organisationsClient
|
|
15
|
-
};
|
|
16
|
-
this.policies = [
|
|
17
|
-
new Area(dependencies),
|
|
18
|
-
new Country(dependencies),
|
|
19
|
-
new DisciplineCountry(dependencies),
|
|
20
|
-
new Discipline(dependencies),
|
|
21
|
-
new UniversityCountry(dependencies),
|
|
22
|
-
new Unfiltered(dependencies)
|
|
23
|
-
];
|
|
24
|
-
}
|
|
25
|
-
async generateUrls() {
|
|
26
|
-
const map = new Map();
|
|
27
|
-
await Promise.all(this.policies.map(async (policy) => {
|
|
28
|
-
const filterCombination = policy.filterCombination;
|
|
29
|
-
const urls = await policy.generateSitemapUrls();
|
|
30
|
-
map.set(filterCombination, urls);
|
|
31
|
-
}));
|
|
32
|
-
return map;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
File without changes
|