@studyportals/search-api-interface 2.6.3-6 → 3.1.0
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/index.d.ts +7 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/cities/CitySearchFilters.d.ts +16 -0
- package/src/cities/CitySearchFilters.js +41 -0
- package/src/cities/CitySearchFilters.js.map +1 -0
- package/src/cities/CitySearchInput.d.ts +7 -0
- package/src/cities/CitySearchInput.js +2 -0
- package/src/cities/CitySearchInput.js.map +1 -0
- package/src/cities/ICity.d.ts +7 -0
- package/src/cities/ICity.js +2 -0
- package/src/cities/ICity.js.map +1 -0
- package/src/cities/ICitySearchFilters.d.ts +7 -0
- package/src/cities/ICitySearchFilters.js +2 -0
- package/src/cities/ICitySearchFilters.js.map +1 -0
- package/src/cities/ICitySearchResponse.d.ts +6 -0
- package/src/cities/ICitySearchResponse.js +2 -0
- package/src/cities/ICitySearchResponse.js.map +1 -0
- package/src/cities/SearchApiCityClient.d.ts +11 -0
- package/src/cities/SearchApiCityClient.js +17 -0
- package/src/cities/SearchApiCityClient.js.map +1 -0
package/index.d.ts
CHANGED
|
@@ -25,4 +25,10 @@ import { IScholarshipSearchCountResponse } from "./src/scholarships/IScholarship
|
|
|
25
25
|
import { ScholarshipFormat } from "./src/scholarships/ScholarshipFormatEnum";
|
|
26
26
|
import { ScholarshipType } from "./src/scholarships/ScholarshipTypeEnum";
|
|
27
27
|
import { SearchApiScholarshipClient } from "./src/scholarships/SearchApiScholarshipsClient";
|
|
28
|
-
|
|
28
|
+
import { SearchApiCityClient } from "./src/cities/SearchApiCityClient";
|
|
29
|
+
import { CitySearchInput } from "./src/cities/CitySearchInput";
|
|
30
|
+
import { CitySearchFilters } from "./src/cities/CitySearchFilters";
|
|
31
|
+
import { ICitySearchFilters } from "./src/cities/ICitySearchFilters";
|
|
32
|
+
import { ICitySearchResponse } from "./src/cities/ICitySearchResponse";
|
|
33
|
+
import { ICity } from "./src/cities/ICity";
|
|
34
|
+
export { SearchApiOrganisationClient, IOrganisationSearchResponse, IOrganisationSearchFilters, OrganisationSearchFilters, SearchApiProgrammeClient, IProgrammeSearchResponse, IProgrammeSearchFilters, ProgrammeSearchFilters, OrganisationSearchInput, ProgrammeSearchInput, IProgrammeResult, DegreeTypeEnum, DeliveryMethodEnum, HitsTotalRelation, ProgrammeSortType, FacetResponseType, FacetValues, TextSearchAlgorithmType, ProgrammeFilterType, ISuggestionResult, SearchApiScholarshipClient, IScholarshipSearchResponse, IScholarshipSearchFilters, ScholarshipSearchFilters, ScholarshipSearchInput, IScholarshipSearchCountResponse, ScholarshipFormat, ScholarshipType, SearchApiCityClient, ICitySearchResponse, ICitySearchFilters, CitySearchFilters, CitySearchInput, ICity };
|
package/index.js
CHANGED
|
@@ -15,5 +15,7 @@ import { ScholarshipSearchFilters } from "./src/scholarships/ScholarshipSearchFi
|
|
|
15
15
|
import { ScholarshipFormat } from "./src/scholarships/ScholarshipFormatEnum";
|
|
16
16
|
import { ScholarshipType } from "./src/scholarships/ScholarshipTypeEnum";
|
|
17
17
|
import { SearchApiScholarshipClient } from "./src/scholarships/SearchApiScholarshipsClient";
|
|
18
|
-
|
|
18
|
+
import { SearchApiCityClient } from "./src/cities/SearchApiCityClient";
|
|
19
|
+
import { CitySearchFilters } from "./src/cities/CitySearchFilters";
|
|
20
|
+
export { SearchApiOrganisationClient, IOrganisationSearchFilters, OrganisationSearchFilters, SearchApiProgrammeClient, IProgrammeSearchFilters, ProgrammeSearchFilters, IProgrammeResult, DegreeTypeEnum, DeliveryMethodEnum, HitsTotalRelation, ProgrammeSortType, TextSearchAlgorithmType, ProgrammeFilterType, SearchApiScholarshipClient, ScholarshipSearchFilters, ScholarshipFormat, ScholarshipType, SearchApiCityClient, CitySearchFilters };
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js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
|
+
export declare class CitySearchFilters implements ICitySearchFilters {
|
|
4
|
+
id?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
virtualPath?: string;
|
|
7
|
+
areaIds?: string[];
|
|
8
|
+
countryIsoCodes?: string[];
|
|
9
|
+
from(input: CitySearchInput): CitySearchFilters;
|
|
10
|
+
consideringId(id: string): CitySearchFilters;
|
|
11
|
+
consideringName(name: string): CitySearchFilters;
|
|
12
|
+
consideringVirtualPath(virtualPath: string): CitySearchFilters;
|
|
13
|
+
consideringAreaIds(areaIds: string[]): CitySearchFilters;
|
|
14
|
+
consideringCountryIsoCodes(countryIsoCodes: string[]): CitySearchFilters;
|
|
15
|
+
private numbersToStringsOrUndefined;
|
|
16
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export class CitySearchFilters {
|
|
2
|
+
id;
|
|
3
|
+
name;
|
|
4
|
+
virtualPath;
|
|
5
|
+
areaIds;
|
|
6
|
+
countryIsoCodes;
|
|
7
|
+
from(input) {
|
|
8
|
+
this.id = input.id?.toString();
|
|
9
|
+
this.name = input.name;
|
|
10
|
+
this.virtualPath = input.virtualPath;
|
|
11
|
+
this.areaIds = this.numbersToStringsOrUndefined(input.areaIds);
|
|
12
|
+
this.countryIsoCodes = input.countryIsoCodes;
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
consideringId(id) {
|
|
16
|
+
this.id = id;
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
consideringName(name) {
|
|
20
|
+
this.name = name;
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
consideringVirtualPath(virtualPath) {
|
|
24
|
+
this.virtualPath = virtualPath;
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
27
|
+
consideringAreaIds(areaIds) {
|
|
28
|
+
this.areaIds = areaIds;
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
consideringCountryIsoCodes(countryIsoCodes) {
|
|
32
|
+
this.countryIsoCodes = countryIsoCodes;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
numbersToStringsOrUndefined(values) {
|
|
36
|
+
if (values === undefined)
|
|
37
|
+
return;
|
|
38
|
+
return values.map(value => value.toString());
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=CitySearchFilters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitySearchFilters.js","sourceRoot":"","sources":["../../../src/cities/CitySearchFilters.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,iBAAiB;IACtB,EAAE,CAAU;IACZ,IAAI,CAAU;IACd,WAAW,CAAU;IACrB,OAAO,CAAY;IACnB,eAAe,CAAY;IAE3B,IAAI,CAAC,KAAsB;QACjC,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC/D,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAC7C,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,aAAa,CAAC,EAAU;QAC9B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,eAAe,CAAC,IAAY;QAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,sBAAsB,CAAC,WAAmB;QAChD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,kBAAkB,CAAC,OAAiB;QAC1C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,0BAA0B,CAAC,eAAyB;QAC1D,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,OAAO,IAAI,CAAC;IACb,CAAC;IAEO,2BAA2B,CAAC,MAA4B;QAC/D,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO;QACjC,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9C,CAAC;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitySearchInput.js","sourceRoot":"","sources":["../../../src/cities/CitySearchInput.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICity.js","sourceRoot":"","sources":["../../../src/cities/ICity.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICitySearchFilters.js","sourceRoot":"","sources":["../../../src/cities/ICitySearchFilters.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICitySearchResponse.js","sourceRoot":"","sources":["../../../src/cities/ICitySearchResponse.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ICity } from "@studyportals/domain-client";
|
|
2
|
+
import { SearchApiClientBase } from "../SearchApiClientBase";
|
|
3
|
+
import { ICitySearchFilters } from "./ICitySearchFilters";
|
|
4
|
+
import { ICitySearchResponse } from "./ICitySearchResponse";
|
|
5
|
+
import { IRequestSender, ISuperAgentRequestFactory } from "@studyportals/mb-platform-http-requests";
|
|
6
|
+
export declare class SearchApiCityClient extends SearchApiClientBase {
|
|
7
|
+
private readonly requestFactory;
|
|
8
|
+
private readonly requestSender;
|
|
9
|
+
constructor(apiUriBase: string, requestFactory: ISuperAgentRequestFactory, requestSender: IRequestSender);
|
|
10
|
+
search(filters: ICitySearchFilters, resultSize: number, resultOffset: number): Promise<ICitySearchResponse<ICity>>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SearchApiClientBase } from "../SearchApiClientBase";
|
|
2
|
+
export class SearchApiCityClient extends SearchApiClientBase {
|
|
3
|
+
requestFactory;
|
|
4
|
+
requestSender;
|
|
5
|
+
constructor(apiUriBase, requestFactory, requestSender) {
|
|
6
|
+
super("scholarships", apiUriBase);
|
|
7
|
+
this.requestFactory = requestFactory;
|
|
8
|
+
this.requestSender = requestSender;
|
|
9
|
+
}
|
|
10
|
+
async search(filters, resultSize, resultOffset) {
|
|
11
|
+
const request = this.requestFactory.get(this.constructUri("search"))
|
|
12
|
+
.query({ ...filters, resultSize, resultOffset });
|
|
13
|
+
const result = await this.requestSender.sendAndExtractBody(request);
|
|
14
|
+
return result;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=SearchApiCityClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchApiCityClient.js","sourceRoot":"","sources":["../../../src/cities/SearchApiCityClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7D,MAAM,OAAO,mBAAoB,SAAQ,mBAAmB;IAC1C,cAAc,CAA4B;IAC1C,aAAa,CAAiB;IAE/C,YAAmB,UAAkB,EAC9B,cAAyC,EACzC,aAA6B;QAEnC,KAAK,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;QAElC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACpC,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,OAA2B,EAAE,UAAkB,EAAE,YAAoB;QACxF,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;aAClE,KAAK,CAAC,EAAC,GAAG,OAAO,EAAE,UAAU,EAAE,YAAY,EAAC,CAAC,CAAC;QAEhD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAA6B,OAAO,CAAC,CAAC;QAEhG,OAAO,MAAM,CAAC;IACf,CAAC;CACD"}
|