@studyportals/search-api-interface 1.2.3-6 → 1.2.3-7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studyportals/search-api-interface",
3
- "version": "1.2.3-6",
3
+ "version": "1.2.3-7",
4
4
  "description": "Typescript library containing resources that facilitate integration with SearchApi",
5
5
  "main": "bin/index.js",
6
6
  "scripts": {
@@ -1,6 +1,7 @@
1
+ import { FacetResponseType } from "../facets/FacetResponseType";
1
2
  export interface IProgrammeSearchResponse<T> {
2
3
  readonly programmes: readonly T[];
3
4
  readonly hitsTotal: number;
4
5
  readonly hitsTotalRelation: "more than" | "exactly";
5
- readonly aggregations?: readonly T[];
6
+ readonly aggregations?: readonly FacetResponseType[];
6
7
  }
@@ -30,11 +30,7 @@ class SearchApiProgrammeClient extends SearchApiClientBase_1.SearchApiClientBase
30
30
  card: this.programmeCardFactory.fromDescription(result.card),
31
31
  is_premium: result.is_premium
32
32
  }));
33
- const aggregationResults = (_a = result.aggregations) === null || _a === void 0 ? void 0 : _a.map(aggregation => ({
34
- card: this.programmeCardFactory.fromDescription(aggregation.card),
35
- is_premium: aggregation.is_premium
36
- }));
37
- return Object.assign(Object.assign({}, result), { programmes: programmeResults, aggregations: aggregationResults });
33
+ return Object.assign(Object.assign({}, result), { programmes: programmeResults, aggregations: (_a = result.aggregations) !== null && _a !== void 0 ? _a : [] });
38
34
  });
39
35
  }
40
36
  searchIds(filters, resultSize, resultOffset) {
@@ -1 +1 @@
1
- {"version":3,"file":"SearchApiProgrammeClient.js","sourceRoot":"","sources":["../../../src/programmes/SearchApiProgrammeClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAA6D;AAE7D,+DAAkF;AAKlF,MAAa,wBAAyB,SAAQ,yCAAmB;IAMhE,YAAmB,UAAkB,EACpC,cAAyC,EACzC,aAA6B;QAE7B,KAAK,CAAC,YAAY,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