@studyportals/search-api-interface 1.2.1 → 1.2.2-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 +6 -1
- package/index.js +7 -1
- package/index.js.map +1 -1
- package/package.json +29 -29
- package/src/SearchApiClientBase.js.map +1 -0
- package/src/organisations/SearchApiOrganisationClient.d.ts +1 -1
- package/src/organisations/SearchApiOrganisationClient.js +1 -1
- package/src/organisations/SearchApiOrganisationClient.js.map +1 -1
- package/src/programmes/IProgrammeSearchFilters.d.ts +18 -0
- package/src/programmes/IProgrammeSearchFilters.js +7 -0
- package/src/programmes/IProgrammeSearchFilters.js.map +1 -0
- package/src/programmes/IProgrammeSearchResponse.d.ts +5 -0
- package/src/programmes/IProgrammeSearchResponse.js +3 -0
- package/src/programmes/IProgrammeSearchResponse.js.map +1 -0
- package/src/programmes/ProgrammeSearchFilters.d.ts +22 -0
- package/src/programmes/ProgrammeSearchFilters.js +63 -0
- package/src/programmes/ProgrammeSearchFilters.js.map +1 -0
- package/src/programmes/ProgrammeSearchInput.d.ts +20 -0
- package/src/programmes/ProgrammeSearchInput.js +3 -0
- package/src/programmes/ProgrammeSearchInput.js.map +1 -0
- package/src/programmes/SearchApiProgrammeClient.d.ts +12 -0
- package/src/programmes/SearchApiProgrammeClient.js +40 -0
- package/src/programmes/SearchApiProgrammeClient.js.map +1 -0
- package/src/organisations/SearchApiClientBase.js.map +0 -1
- /package/src/{organisations/SearchApiClientBase.d.ts → SearchApiClientBase.d.ts} +0 -0
- /package/src/{organisations/SearchApiClientBase.js → SearchApiClientBase.js} +0 -0
package/index.d.ts
CHANGED
|
@@ -5,4 +5,9 @@ import { IOrganisationSearchResponse } from "./src/organisations/IOrganisationSe
|
|
|
5
5
|
import { OrganisationSearchFilters } from "./src/organisations/OrganisationSearchFilters";
|
|
6
6
|
import { OrganisationSearchInput } from "./src/organisations/OrganisationSearchInput";
|
|
7
7
|
import { SearchApiOrganisationClient } from "./src/organisations/SearchApiOrganisationClient";
|
|
8
|
-
|
|
8
|
+
import { IProgrammeSearchFilters } from "./src/programmes/IProgrammeSearchFilters";
|
|
9
|
+
import { IProgrammeSearchResponse } from "./src/programmes/IProgrammeSearchResponse";
|
|
10
|
+
import { ProgrammeSearchFilters } from "./src/programmes/ProgrammeSearchFilters";
|
|
11
|
+
import { ProgrammeSearchInput } from "./src/programmes/ProgrammeSearchInput";
|
|
12
|
+
import { SearchApiProgrammeClient } from "./src/programmes/SearchApiProgrammeClient";
|
|
13
|
+
export { SearchApiOrganisationClient, IOrganisationSearchResponse, IOrganisationSearchFilters, OrganisationSearchFilters, SearchApiProgrammeClient, IProgrammeSearchResponse, IProgrammeSearchFilters, ProgrammeSearchFilters, OrganisationSearchInput, ProgrammeSearchInput, DegreeTypeEnum, DeliveryMethodEnum };
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeliveryMethodEnum = exports.DegreeTypeEnum = exports.OrganisationSearchFilters = exports.IOrganisationSearchFilters = exports.SearchApiOrganisationClient = void 0;
|
|
3
|
+
exports.DeliveryMethodEnum = exports.DegreeTypeEnum = exports.ProgrammeSearchFilters = exports.IProgrammeSearchFilters = exports.SearchApiProgrammeClient = exports.OrganisationSearchFilters = exports.IOrganisationSearchFilters = exports.SearchApiOrganisationClient = void 0;
|
|
4
4
|
const DegreeTypeEnum_1 = require("./src/organisations/DegreeTypeEnum");
|
|
5
5
|
Object.defineProperty(exports, "DegreeTypeEnum", { enumerable: true, get: function () { return DegreeTypeEnum_1.DegreeTypeEnum; } });
|
|
6
6
|
const DeliveryMethodEnum_1 = require("./src/organisations/DeliveryMethodEnum");
|
|
@@ -11,4 +11,10 @@ const OrganisationSearchFilters_1 = require("./src/organisations/OrganisationSea
|
|
|
11
11
|
Object.defineProperty(exports, "OrganisationSearchFilters", { enumerable: true, get: function () { return OrganisationSearchFilters_1.OrganisationSearchFilters; } });
|
|
12
12
|
const SearchApiOrganisationClient_1 = require("./src/organisations/SearchApiOrganisationClient");
|
|
13
13
|
Object.defineProperty(exports, "SearchApiOrganisationClient", { enumerable: true, get: function () { return SearchApiOrganisationClient_1.SearchApiOrganisationClient; } });
|
|
14
|
+
const IProgrammeSearchFilters_1 = require("./src/programmes/IProgrammeSearchFilters");
|
|
15
|
+
Object.defineProperty(exports, "IProgrammeSearchFilters", { enumerable: true, get: function () { return IProgrammeSearchFilters_1.IProgrammeSearchFilters; } });
|
|
16
|
+
const ProgrammeSearchFilters_1 = require("./src/programmes/ProgrammeSearchFilters");
|
|
17
|
+
Object.defineProperty(exports, "ProgrammeSearchFilters", { enumerable: true, get: function () { return ProgrammeSearchFilters_1.ProgrammeSearchFilters; } });
|
|
18
|
+
const SearchApiProgrammeClient_1 = require("./src/programmes/SearchApiProgrammeClient");
|
|
19
|
+
Object.defineProperty(exports, "SearchApiProgrammeClient", { enumerable: true, get: function () { return SearchApiProgrammeClient_1.SearchApiProgrammeClient; } });
|
|
14
20
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,uEAAoE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,uEAAoE;AA2BnE,+FA3BQ,+BAAc,OA2BR;AA1Bf,+EAA4E;AA2B3E,mGA3BQ,uCAAkB,OA2BR;AA1BnB,+FAA4F;AAc3F,2GAdQ,uDAA0B,OAcR;AAZ3B,6FAA0F;AAazF,0GAbQ,qDAAyB,OAaR;AAX1B,iGAA8F;AAQ7F,4GARQ,yDAA2B,OAQR;AAP5B,sFAAmF;AAclF,wGAdQ,iDAAuB,OAcR;AAZxB,oFAAiF;AAahF,uGAbQ,+CAAsB,OAaR;AAXvB,wFAAqF;AAQpF,yGARQ,mDAAwB,OAQR"}
|
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@studyportals/search-api-interface",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "Typescript library containing resources that facilitate integration with SearchApi",
|
|
5
|
-
"main": "bin/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"compile": "rm -fR bin && npx tsc",
|
|
8
|
-
"deploy-patch": "npm version patch && npm run deploy",
|
|
9
|
-
"deploy-minor": "npm version minor && npm run deploy",
|
|
10
|
-
"deploy-major": "npm version major && npm run deploy",
|
|
11
|
-
"deploy-beta": "npm version prerelease && npm run prepare-deployment && npm publish ./bin --tag beta",
|
|
12
|
-
"deploy": "npm run prepare-deployment && npm publish ./bin",
|
|
13
|
-
"prepare-deployment": "npm run compile && cp package.json bin/package.json",
|
|
14
|
-
"lint": "eslint . --ext .ts",
|
|
15
|
-
"lint:fix": "eslint . --ext .ts --fix"
|
|
16
|
-
},
|
|
17
|
-
"author": "Seal Team Six",
|
|
18
|
-
"license": "BSD-3-Clause",
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@studyportals/code-style": "^1.7.0",
|
|
21
|
-
"@types/superagent": "^4.1.15",
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
23
|
-
"@typescript-eslint/parser": "^5.27.0",
|
|
24
|
-
"eslint": "^8.17.0",
|
|
25
|
-
"typescript": "^4.7.3",
|
|
26
|
-
"typescript-transform-paths": "^3.4.6"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {}
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@studyportals/search-api-interface",
|
|
3
|
+
"version": "1.2.2-0",
|
|
4
|
+
"description": "Typescript library containing resources that facilitate integration with SearchApi",
|
|
5
|
+
"main": "bin/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"compile": "rm -fR bin && npx tsc",
|
|
8
|
+
"deploy-patch": "npm version patch && npm run deploy",
|
|
9
|
+
"deploy-minor": "npm version minor && npm run deploy",
|
|
10
|
+
"deploy-major": "npm version major && npm run deploy",
|
|
11
|
+
"deploy-beta": "npm version prerelease && npm run prepare-deployment && npm publish ./bin --tag beta",
|
|
12
|
+
"deploy": "npm run prepare-deployment && npm publish ./bin",
|
|
13
|
+
"prepare-deployment": "npm run compile && cp package.json bin/package.json",
|
|
14
|
+
"lint": "eslint . --ext .ts",
|
|
15
|
+
"lint:fix": "eslint . --ext .ts --fix"
|
|
16
|
+
},
|
|
17
|
+
"author": "Seal Team Six",
|
|
18
|
+
"license": "BSD-3-Clause",
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@studyportals/code-style": "^1.7.0",
|
|
21
|
+
"@types/superagent": "^4.1.15",
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
23
|
+
"@typescript-eslint/parser": "^5.27.0",
|
|
24
|
+
"eslint": "^8.17.0",
|
|
25
|
+
"typescript": "^4.7.3",
|
|
26
|
+
"typescript-transform-paths": "^3.4.6"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {}
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchApiClientBase.js","sourceRoot":"","sources":["../../src/SearchApiClientBase.ts"],"names":[],"mappings":";;;AAAA,MAAa,mBAAmB;IAC/B,YAAoC,MAAc,EAChC,UAAkB;QADA,WAAM,GAAN,MAAM,CAAQ;QAChC,eAAU,GAAV,UAAU,CAAQ;IAEpC,CAAC;IAES,YAAY,CAAC,WAAmB;QACzC,OAAO,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,IAAI,WAAW,EAAE,CAAC;IAC3D,CAAC;CACD;AATD,kDASC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SearchApiClientBase } from "
|
|
1
|
+
import { SearchApiClientBase } from "../SearchApiClientBase";
|
|
2
2
|
import { IRequestSender, ISuperAgentRequestFactory } from "@studyportals/mb-platform-http-requests";
|
|
3
3
|
import { IOrganisationCard } from "@studyportals/domain-client";
|
|
4
4
|
import { IOrganisationSearchResponse } from "./IOrganisationSearchResponse";
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SearchApiOrganisationClient = void 0;
|
|
13
|
-
const SearchApiClientBase_1 = require("
|
|
13
|
+
const SearchApiClientBase_1 = require("../SearchApiClientBase");
|
|
14
14
|
const domain_client_1 = require("@studyportals/domain-client");
|
|
15
15
|
class SearchApiOrganisationClient extends SearchApiClientBase_1.SearchApiClientBase {
|
|
16
16
|
constructor(apiUriBase, requestFactory, requestSender) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchApiOrganisationClient.js","sourceRoot":"","sources":["../../../src/organisations/SearchApiOrganisationClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"SearchApiOrganisationClient.js","sourceRoot":"","sources":["../../../src/organisations/SearchApiOrganisationClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAA6D;AAE7D,+DAAwF;AAIxF,MAAa,2BAA4B,SAAQ,yCAAmB;IAMnE,YAAmB,UAAkB,EACpC,cAAyC,EACzC,aAA6B;QAE7B,KAAK,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;QANnB,4BAAuB,GAAG,IAAI,sCAAsB,EAAE,CAAC;QAQvE,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,uBAAuB,GAAG,IAAI,sCAAsB,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC5E,CAAC;IAEY,WAAW,CAAC,OAAY,EAAE,UAAkB,EAAE,YAAoB;;YAC9E,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;iBAClE,KAAK,iCAAM,OAAO,KAAE,UAAU,EAAE,YAAY,IAAG,CAAC;YAElD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAiD,OAAO,CAAC,CAAC;YAEpH,uCACI,MAAM,KACT,aAAa,EAAE,IAAI,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAC,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,IACvF;QACF,CAAC;KAAA;IAEY,SAAS,CAAC,OAAY,EAAE,UAAkB,EAAE,YAAoB;;YAC5E,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;iBACtE,KAAK,iCAAM,OAAO,KAAE,UAAU,EAAE,YAAY,IAAG,CAAC;YAElD,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAsC,OAAO,CAAC,CAAC;QAClG,CAAC;KAAA;CACD;AAnCD,kEAmCC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class IProgrammeSearchFilters {
|
|
2
|
+
readonly attendances?: string[];
|
|
3
|
+
readonly degreeTypes?: string[];
|
|
4
|
+
readonly disciplines?: string[];
|
|
5
|
+
readonly durations?: string[];
|
|
6
|
+
readonly educationalLevels?: string[];
|
|
7
|
+
readonly educationalForms?: string[];
|
|
8
|
+
readonly keyword?: string;
|
|
9
|
+
readonly areaIds?: string[];
|
|
10
|
+
readonly regionIds?: string[];
|
|
11
|
+
readonly countryIsoCodes?: string[];
|
|
12
|
+
readonly organisationId?: string;
|
|
13
|
+
readonly specialProgrammes?: string[];
|
|
14
|
+
readonly tuitionFee?: {
|
|
15
|
+
min: number;
|
|
16
|
+
max: number;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IProgrammeSearchFilters = void 0;
|
|
4
|
+
class IProgrammeSearchFilters {
|
|
5
|
+
}
|
|
6
|
+
exports.IProgrammeSearchFilters = IProgrammeSearchFilters;
|
|
7
|
+
//# sourceMappingURL=IProgrammeSearchFilters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IProgrammeSearchFilters.js","sourceRoot":"","sources":["../../../src/programmes/IProgrammeSearchFilters.ts"],"names":[],"mappings":";;;AAAA,MAAa,uBAAuB;CAmBnC;AAnBD,0DAmBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IProgrammeSearchResponse.js","sourceRoot":"","sources":["../../../src/programmes/IProgrammeSearchResponse.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IProgrammeSearchFilters } from "./IProgrammeSearchFilters";
|
|
2
|
+
import { ProgrammeSearchInput } from "./ProgrammeSearchInput";
|
|
3
|
+
export declare class ProgrammeSearchFilters implements IProgrammeSearchFilters {
|
|
4
|
+
attendances?: string[];
|
|
5
|
+
degreeTypes?: string[];
|
|
6
|
+
disciplines?: string[];
|
|
7
|
+
durations?: string[];
|
|
8
|
+
educationalLevels?: string[];
|
|
9
|
+
educationalForms?: string[];
|
|
10
|
+
keyword?: string;
|
|
11
|
+
areaIds?: string[];
|
|
12
|
+
regionIds?: string[];
|
|
13
|
+
countryIsoCodes?: string[];
|
|
14
|
+
organisationId?: string;
|
|
15
|
+
specialProgrammes?: string[];
|
|
16
|
+
tuitionFee?: {
|
|
17
|
+
min: number;
|
|
18
|
+
max: number;
|
|
19
|
+
};
|
|
20
|
+
from(input: ProgrammeSearchInput): IProgrammeSearchFilters;
|
|
21
|
+
private numbersToStringsOrUndefined;
|
|
22
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProgrammeSearchFilters = void 0;
|
|
4
|
+
class ProgrammeSearchFilters {
|
|
5
|
+
from(input) {
|
|
6
|
+
this.attendances = input.attendances;
|
|
7
|
+
this.degreeTypes = input.degreeTypes;
|
|
8
|
+
this.disciplines = this.numbersToStringsOrUndefined(input.disciplines);
|
|
9
|
+
this.durations = input.durations;
|
|
10
|
+
this.educationalLevels = input.educationalLevels;
|
|
11
|
+
this.educationalForms = input.educationalForms;
|
|
12
|
+
this.keyword = input.keyword;
|
|
13
|
+
this.areaIds = this.numbersToStringsOrUndefined(input.areaIds);
|
|
14
|
+
this.regionIds = this.numbersToStringsOrUndefined(input.regionIds);
|
|
15
|
+
this.countryIsoCodes = input.countryIsoCodes;
|
|
16
|
+
this.organisationId = input.organisationId ? input.organisationId.toString() : undefined;
|
|
17
|
+
this.specialProgrammes = input.specialProgrammes;
|
|
18
|
+
this.tuitionFee = input.tuitionFee;
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
/*
|
|
22
|
+
public consideringId(id: string): OrganisationSearchFilters {
|
|
23
|
+
this.organisationId = id;
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public consideringDegree(degree: DegreeTypeEnum): OrganisationSearchFilters {
|
|
28
|
+
this.degree = degree;
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public consideringDisciplines(disciplines: string[]): OrganisationSearchFilters {
|
|
33
|
+
this.disciplines = disciplines;
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public consideringDeliveryMethods(deliveryMethods: DeliveryMethodEnum[]): OrganisationSearchFilters {
|
|
38
|
+
this.deliveryMethods = deliveryMethods;
|
|
39
|
+
return this;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public consideringCountryIsoCodes(countryIsoCodes: string[]): OrganisationSearchFilters {
|
|
43
|
+
this.countryIsoCodes = countryIsoCodes;
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public consideringRegionIds(regionIds: string[]): OrganisationSearchFilters {
|
|
48
|
+
this.regionIds = regionIds;
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public consideringAreaIds(areaIds: string[]): OrganisationSearchFilters {
|
|
53
|
+
this.areaIds = areaIds;
|
|
54
|
+
return this;
|
|
55
|
+
}*/
|
|
56
|
+
numbersToStringsOrUndefined(values) {
|
|
57
|
+
if (values === undefined)
|
|
58
|
+
return;
|
|
59
|
+
return values.map(value => value.toString());
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.ProgrammeSearchFilters = ProgrammeSearchFilters;
|
|
63
|
+
//# sourceMappingURL=ProgrammeSearchFilters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgrammeSearchFilters.js","sourceRoot":"","sources":["../../../src/programmes/ProgrammeSearchFilters.ts"],"names":[],"mappings":";;;AAGA,MAAa,sBAAsB;IAoB3B,IAAI,CAAC,KAA2B;QACtC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACvE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC;QACjD,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAE7B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC/D,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACnE,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAE7C,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QACzF,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAA;QAEhD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;QAEnC,OAAO,IAAI,CAAC;IACb,CAAC;IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAkCI;IAEK,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;AAhFD,wDAgFC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type ProgrammeSearchInput = {
|
|
2
|
+
resultSize: number;
|
|
3
|
+
resultOffset: number;
|
|
4
|
+
attendances: string[];
|
|
5
|
+
degreeTypes: string[];
|
|
6
|
+
disciplines?: number[];
|
|
7
|
+
durations: string[];
|
|
8
|
+
educationalLevels: string[];
|
|
9
|
+
educationalForms: string[];
|
|
10
|
+
keyword: string;
|
|
11
|
+
areaIds?: number[];
|
|
12
|
+
regionIds?: number[];
|
|
13
|
+
countryIsoCodes?: string[];
|
|
14
|
+
organisationId?: number;
|
|
15
|
+
specialProgrammes: string[];
|
|
16
|
+
tuitionFee: {
|
|
17
|
+
min: number;
|
|
18
|
+
max: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgrammeSearchInput.js","sourceRoot":"","sources":["../../../src/programmes/ProgrammeSearchInput.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SearchApiClientBase } from "../SearchApiClientBase";
|
|
2
|
+
import { IRequestSender, ISuperAgentRequestFactory } from "@studyportals/mb-platform-http-requests";
|
|
3
|
+
import { IProgrammeCard } from "@studyportals/domain-client";
|
|
4
|
+
import { IProgrammeSearchResponse } from "./IProgrammeSearchResponse";
|
|
5
|
+
export declare class SearchApiProgrammeClient extends SearchApiClientBase {
|
|
6
|
+
private readonly requestFactory;
|
|
7
|
+
private readonly requestSender;
|
|
8
|
+
private readonly organisationCardFactory;
|
|
9
|
+
constructor(apiUriBase: string, requestFactory: ISuperAgentRequestFactory, requestSender: IRequestSender);
|
|
10
|
+
searchCards(filters: any, resultSize: number, resultOffset: number): Promise<IProgrammeSearchResponse<IProgrammeCard>>;
|
|
11
|
+
searchIds(filters: any, resultSize: number, resultOffset: number): Promise<IProgrammeSearchResponse<string>>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SearchApiProgrammeClient = void 0;
|
|
13
|
+
const SearchApiClientBase_1 = require("../SearchApiClientBase");
|
|
14
|
+
const domain_client_1 = require("@studyportals/domain-client");
|
|
15
|
+
class SearchApiProgrammeClient extends SearchApiClientBase_1.SearchApiClientBase {
|
|
16
|
+
constructor(apiUriBase, requestFactory, requestSender) {
|
|
17
|
+
super("organisations", apiUriBase);
|
|
18
|
+
this.organisationCardFactory = new domain_client_1.ProgrammeCardClient();
|
|
19
|
+
this.requestFactory = requestFactory;
|
|
20
|
+
this.requestSender = requestSender;
|
|
21
|
+
this.organisationCardFactory = new domain_client_1.ProgrammeCardClient("N/A", "N/A", 1);
|
|
22
|
+
}
|
|
23
|
+
searchCards(filters, resultSize, resultOffset) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const request = this.requestFactory.get(this.constructUri("search"))
|
|
26
|
+
.query(Object.assign(Object.assign({}, filters), { resultSize, resultOffset }));
|
|
27
|
+
const result = yield this.requestSender.sendAndExtractBody(request);
|
|
28
|
+
return Object.assign(Object.assign({}, result), { programmes: this.organisationCardFactory.fromDescriptions([...result.programmes]) });
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
searchIds(filters, resultSize, resultOffset) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const request = this.requestFactory.get(this.constructUri("search/ids"))
|
|
34
|
+
.query(Object.assign(Object.assign({}, filters), { resultSize, resultOffset }));
|
|
35
|
+
return yield this.requestSender.sendAndExtractBody(request);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.SearchApiProgrammeClient = SearchApiProgrammeClient;
|
|
40
|
+
//# sourceMappingURL=SearchApiProgrammeClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchApiProgrammeClient.js","sourceRoot":"","sources":["../../../src/programmes/SearchApiProgrammeClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAA6D;AAG7D,+DAAkF;AAGlF,MAAa,wBAAyB,SAAQ,yCAAmB;IAMhE,YAAmB,UAAkB,EACpC,cAAyC,EACzC,aAA6B;QAE7B,KAAK,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;QANnB,4BAAuB,GAAG,IAAI,mCAAmB,EAAE,CAAC;QAQpE,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,uBAAuB,GAAG,IAAI,mCAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC;IAEY,WAAW,CAAC,OAAY,EAAE,UAAkB,EAAE,YAAoB;;YAC9E,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;iBAClE,KAAK,iCAAM,OAAO,KAAE,UAAU,EAAE,YAAY,IAAG,CAAC;YAElD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAA8C,OAAO,CAAC,CAAC;YAEjH,uCACI,MAAM,KACT,UAAU,EAAE,IAAI,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,IACjF;QACF,CAAC;KAAA;IAEY,SAAS,CAAC,OAAY,EAAE,UAAkB,EAAE,YAAoB;;YAC5E,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;iBACtE,KAAK,iCAAM,OAAO,KAAE,UAAU,EAAE,YAAY,IAAG,CAAC;YAElD,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAmC,OAAO,CAAC,CAAC;QAC/F,CAAC;KAAA;CACD;AAnCD,4DAmCC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchApiClientBase.js","sourceRoot":"","sources":["../../../src/organisations/SearchApiClientBase.ts"],"names":[],"mappings":";;;AAAA,MAAa,mBAAmB;IAC/B,YAAoC,MAAc,EAChC,UAAkB;QADA,WAAM,GAAN,MAAM,CAAQ;QAChC,eAAU,GAAV,UAAU,CAAQ;IAEpC,CAAC;IAES,YAAY,CAAC,WAAmB;QACzC,OAAO,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,IAAI,WAAW,EAAE,CAAC;IAC3D,CAAC;CACD;AATD,kDASC"}
|
|
File without changes
|
|
File without changes
|