@studyportals/fawkes 8.0.1-3 → 8.0.1-5
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.
|
@@ -9,7 +9,7 @@ export declare class AtLeastSevenResultsRule implements IRule {
|
|
|
9
9
|
constructor(searchApiClient?: ISearchApiClient);
|
|
10
10
|
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
11
11
|
forSitemapGeneratorWithPageNumber(filterKeyValues: FilterKeyValuesMap, pageNumber: number): Promise<boolean>;
|
|
12
|
-
forSitemapGenerator(): Promise<boolean>;
|
|
12
|
+
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
13
13
|
getName(): string;
|
|
14
14
|
getDescription(): string;
|
|
15
15
|
}
|
|
@@ -18,8 +18,12 @@ export class AtLeastSevenResultsRule {
|
|
|
18
18
|
const count = await this.searchApiClient.getCount(filterKeyValues);
|
|
19
19
|
return count >= (pageNumber - 1) * this.maximumPageSize + this.minimumResultsCount;
|
|
20
20
|
}
|
|
21
|
-
forSitemapGenerator() {
|
|
22
|
-
|
|
21
|
+
async forSitemapGenerator(filterKeyValues) {
|
|
22
|
+
if (!this.searchApiClient) {
|
|
23
|
+
throw new DependencyMissingError('SearchApiClient');
|
|
24
|
+
}
|
|
25
|
+
const resultsCount = await this.searchApiClient?.getCount(filterKeyValues);
|
|
26
|
+
return resultsCount >= this.minimumResultsCount;
|
|
23
27
|
}
|
|
24
28
|
getName() {
|
|
25
29
|
return 'AtLeastSevenResultsRule';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studyportals/fawkes",
|
|
3
|
-
"version": "8.0.1-
|
|
3
|
+
"version": "8.0.1-5",
|
|
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": "^6.3.0",
|
|
94
94
|
"@studyportals/ranking-api-interface": "^1.3.12",
|
|
95
|
-
"@studyportals/search-filters": "
|
|
95
|
+
"@studyportals/search-filters": "^6.0.0",
|
|
96
96
|
"@studyportals/static-domain-data": "^6.1.0"
|
|
97
97
|
},
|
|
98
98
|
"optionalDependencies": {
|