@studyportals/search-api-interface 2.3.0 → 2.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 +8 -1
- package/index.js +7 -1
- package/index.js.map +1 -1
- package/package.json +31 -31
- package/src/scholarships/IScholarshipSearchCountResponse.d.ts +3 -0
- package/src/scholarships/IScholarshipSearchCountResponse.js +3 -0
- package/src/scholarships/IScholarshipSearchCountResponse.js.map +1 -0
- package/src/scholarships/IScholarshipSearchFilters.d.ts +14 -0
- package/src/scholarships/IScholarshipSearchFilters.js +3 -0
- package/src/scholarships/IScholarshipSearchFilters.js.map +1 -0
- package/src/scholarships/IScholarshipSearchResponse.d.ts +6 -0
- package/src/scholarships/IScholarshipSearchResponse.js +3 -0
- package/src/scholarships/IScholarshipSearchResponse.js.map +1 -0
- package/src/scholarships/ScholarshipFormatEnum.d.ts +10 -0
- package/src/scholarships/ScholarshipFormatEnum.js +15 -0
- package/src/scholarships/ScholarshipFormatEnum.js.map +1 -0
- package/src/scholarships/ScholarshipSearchFilters.d.ts +27 -0
- package/src/scholarships/ScholarshipSearchFilters.js +60 -0
- package/src/scholarships/ScholarshipSearchFilters.js.map +1 -0
- package/src/scholarships/ScholarshipSearchInput.d.ts +15 -0
- package/src/scholarships/ScholarshipSearchInput.js +3 -0
- package/src/scholarships/ScholarshipSearchInput.js.map +1 -0
- package/src/scholarships/ScholarshipTypeEnum.d.ts +17 -0
- package/src/scholarships/ScholarshipTypeEnum.js +22 -0
- package/src/scholarships/ScholarshipTypeEnum.js.map +1 -0
- package/src/scholarships/SearchApiScholarshipsClient.d.ts +13 -0
- package/src/scholarships/SearchApiScholarshipsClient.js +39 -0
- package/src/scholarships/SearchApiScholarshipsClient.js.map +1 -0
package/index.d.ts
CHANGED
|
@@ -17,4 +17,11 @@ import { ProgrammeSortType } from "./src/programmes/ProgrammeSortType";
|
|
|
17
17
|
import { TextSearchAlgorithmType } from "./src/TextSearchAlgorithmType";
|
|
18
18
|
import { ProgrammeFilterType } from "./src/programmes/ProgrammeFilterType";
|
|
19
19
|
import { ISuggestionResult } from "./src/suggestions/ISuggestionResult";
|
|
20
|
-
|
|
20
|
+
import { IScholarshipSearchResponse } from "./src/scholarships/IScholarshipSearchResponse";
|
|
21
|
+
import { IScholarshipSearchFilters } from "./src/scholarships/IScholarshipSearchFilters";
|
|
22
|
+
import { ScholarshipSearchFilters } from "./src/scholarships/ScholarshipSearchFilters";
|
|
23
|
+
import { ScholarshipSearchInput } from "./src/scholarships/ScholarshipSearchInput";
|
|
24
|
+
import { IScholarshipSearchCountResponse } from "./src/scholarships/IScholarshipSearchCountResponse";
|
|
25
|
+
import { ScholarshipFormat } from "./src/scholarships/ScholarshipFormatEnum";
|
|
26
|
+
import { ScholarshipType } from "./src/scholarships/ScholarshipTypeEnum";
|
|
27
|
+
export { SearchApiOrganisationClient, IOrganisationSearchResponse, IOrganisationSearchFilters, OrganisationSearchFilters, SearchApiProgrammeClient, IProgrammeSearchResponse, IProgrammeSearchFilters, ProgrammeSearchFilters, OrganisationSearchInput, ProgrammeSearchInput, IProgrammeResult, DegreeTypeEnum, DeliveryMethodEnum, HitsTotalRelation, ProgrammeSortType, FacetResponseType, FacetValues, TextSearchAlgorithmType, ProgrammeFilterType, ISuggestionResult, IScholarshipSearchResponse, IScholarshipSearchFilters, ScholarshipSearchFilters, ScholarshipSearchInput, IScholarshipSearchCountResponse, ScholarshipFormat, ScholarshipType };
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProgrammeFilterType = exports.TextSearchAlgorithmType = exports.ProgrammeSortType = exports.HitsTotalRelation = exports.DeliveryMethodEnum = exports.DegreeTypeEnum = exports.IProgrammeResult = exports.ProgrammeSearchFilters = exports.IProgrammeSearchFilters = exports.SearchApiProgrammeClient = exports.OrganisationSearchFilters = exports.IOrganisationSearchFilters = exports.SearchApiOrganisationClient = void 0;
|
|
3
|
+
exports.ScholarshipType = exports.ScholarshipFormat = exports.ScholarshipSearchFilters = exports.ProgrammeFilterType = exports.TextSearchAlgorithmType = exports.ProgrammeSortType = exports.HitsTotalRelation = exports.DeliveryMethodEnum = exports.DegreeTypeEnum = exports.IProgrammeResult = exports.ProgrammeSearchFilters = exports.IProgrammeSearchFilters = exports.SearchApiProgrammeClient = exports.OrganisationSearchFilters = exports.IOrganisationSearchFilters = exports.SearchApiOrganisationClient = void 0;
|
|
4
4
|
const HitsTotalRelation_1 = require("./src/HitsTotalRelation");
|
|
5
5
|
Object.defineProperty(exports, "HitsTotalRelation", { enumerable: true, get: function () { return HitsTotalRelation_1.HitsTotalRelation; } });
|
|
6
6
|
const DegreeTypeEnum_1 = require("./src/organisations/DegreeTypeEnum");
|
|
@@ -27,4 +27,10 @@ const TextSearchAlgorithmType_1 = require("./src/TextSearchAlgorithmType");
|
|
|
27
27
|
Object.defineProperty(exports, "TextSearchAlgorithmType", { enumerable: true, get: function () { return TextSearchAlgorithmType_1.TextSearchAlgorithmType; } });
|
|
28
28
|
const ProgrammeFilterType_1 = require("./src/programmes/ProgrammeFilterType");
|
|
29
29
|
Object.defineProperty(exports, "ProgrammeFilterType", { enumerable: true, get: function () { return ProgrammeFilterType_1.ProgrammeFilterType; } });
|
|
30
|
+
const ScholarshipSearchFilters_1 = require("./src/scholarships/ScholarshipSearchFilters");
|
|
31
|
+
Object.defineProperty(exports, "ScholarshipSearchFilters", { enumerable: true, get: function () { return ScholarshipSearchFilters_1.ScholarshipSearchFilters; } });
|
|
32
|
+
const ScholarshipFormatEnum_1 = require("./src/scholarships/ScholarshipFormatEnum");
|
|
33
|
+
Object.defineProperty(exports, "ScholarshipFormat", { enumerable: true, get: function () { return ScholarshipFormatEnum_1.ScholarshipFormat; } });
|
|
34
|
+
const ScholarshipTypeEnum_1 = require("./src/scholarships/ScholarshipTypeEnum");
|
|
35
|
+
Object.defineProperty(exports, "ScholarshipType", { enumerable: true, get: function () { return ScholarshipTypeEnum_1.ScholarshipType; } });
|
|
30
36
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AA4C3D,kGA5CQ,qCAAiB,OA4CR;AA3ClB,uEAAoE;AAyCnE,+FAzCQ,+BAAc,OAyCR;AAxCf,+EAA4E;AAyC3E,mGAzCQ,uCAAkB,OAyCR;AAxCnB,+FAA4F;AA2B3F,2GA3BQ,uDAA0B,OA2BR;AAzB3B,6FAA0F;AA0BzF,0GA1BQ,qDAAyB,OA0BR;AAxB1B,iGAA8F;AAqB7F,4GArBQ,yDAA2B,OAqBR;AApB5B,wEAAqE;AAgCpE,iGAhCQ,mCAAgB,OAgCR;AA/BjB,sFAAmF;AA0BlF,wGA1BQ,iDAAuB,OA0BR;AAxBxB,oFAAiF;AAyBhF,uGAzBQ,+CAAsB,OAyBR;AAvBvB,wFAAqF;AAoBpF,yGApBQ,mDAAwB,OAoBR;AAlBzB,0EAAuE;AA+BtE,kGA/BQ,qCAAiB,OA+BR;AA9BlB,2EAAwE;AAmCvE,wGAnCQ,iDAAuB,OAmCR;AAlCxB,8EAA2E;AAmC1E,oGAnCQ,yCAAmB,OAmCR;AA/BpB,0FAAuF;AAqCtF,yGArCQ,mDAAwB,OAqCR;AAlCzB,oFAA6E;AAqC5E,kGArCQ,yCAAiB,OAqCR;AApClB,gFAAyE;AAqCxE,gGArCQ,qCAAe,OAqCR"}
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@studyportals/search-api-interface",
|
|
3
|
-
"version": "2.3.0",
|
|
4
|
-
"description": "Typescript library containing resources that facilitate integration with SearchApi",
|
|
5
|
-
"main": "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": "^5.5.4",
|
|
26
|
-
"typescript-transform-paths": "^3.4.6"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@studyportals/search-filters": "^4.11.2"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@studyportals/search-api-interface",
|
|
3
|
+
"version": "2.3.1-0",
|
|
4
|
+
"description": "Typescript library containing resources that facilitate integration with SearchApi",
|
|
5
|
+
"main": "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": "^5.5.4",
|
|
26
|
+
"typescript-transform-paths": "^3.4.6"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@studyportals/search-filters": "^4.11.2"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IScholarshipSearchCountResponse.js","sourceRoot":"","sources":["../../../src/scholarships/IScholarshipSearchCountResponse.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DegreeTypeEnum } from "../organisations/DegreeTypeEnum";
|
|
2
|
+
import { ScholarshipFormat } from "./ScholarshipFormatEnum";
|
|
3
|
+
import { ScholarshipType } from "./ScholarshipTypeEnum";
|
|
4
|
+
export interface IScholarshipSearchFilters {
|
|
5
|
+
readonly title?: string | undefined;
|
|
6
|
+
readonly disciplineIds?: string[] | undefined;
|
|
7
|
+
readonly destinationCountryIsoCodes?: string[] | undefined;
|
|
8
|
+
readonly destinationRegionIds?: string[] | undefined;
|
|
9
|
+
readonly universityProviderIds?: string[] | undefined;
|
|
10
|
+
readonly degree?: DegreeTypeEnum | undefined;
|
|
11
|
+
readonly originCountryIsoCodes?: string[] | undefined;
|
|
12
|
+
readonly formats?: ScholarshipFormat[] | undefined;
|
|
13
|
+
readonly types?: ScholarshipType[] | undefined;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IScholarshipSearchFilters.js","sourceRoot":"","sources":["../../../src/scholarships/IScholarshipSearchFilters.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IScholarshipSearchResponse.js","sourceRoot":"","sources":["../../../src/scholarships/IScholarshipSearchResponse.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScholarshipFormat = void 0;
|
|
4
|
+
var ScholarshipFormat;
|
|
5
|
+
(function (ScholarshipFormat) {
|
|
6
|
+
ScholarshipFormat[ScholarshipFormat["TUITION_FEE_REDUCTION"] = 0] = "TUITION_FEE_REDUCTION";
|
|
7
|
+
ScholarshipFormat[ScholarshipFormat["LIVING_EXPENSES"] = 1] = "LIVING_EXPENSES";
|
|
8
|
+
ScholarshipFormat[ScholarshipFormat["ACCOMODATION"] = 2] = "ACCOMODATION";
|
|
9
|
+
ScholarshipFormat[ScholarshipFormat["TRAVEL_EXPENSES"] = 3] = "TRAVEL_EXPENSES";
|
|
10
|
+
ScholarshipFormat[ScholarshipFormat["SPOUSE_CHILD_CARE"] = 4] = "SPOUSE_CHILD_CARE";
|
|
11
|
+
ScholarshipFormat[ScholarshipFormat["HEALTH"] = 5] = "HEALTH";
|
|
12
|
+
ScholarshipFormat[ScholarshipFormat["APPLICATION"] = 6] = "APPLICATION";
|
|
13
|
+
ScholarshipFormat[ScholarshipFormat["OTHER"] = 7] = "OTHER";
|
|
14
|
+
})(ScholarshipFormat || (exports.ScholarshipFormat = ScholarshipFormat = {}));
|
|
15
|
+
//# sourceMappingURL=ScholarshipFormatEnum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScholarshipFormatEnum.js","sourceRoot":"","sources":["../../../src/scholarships/ScholarshipFormatEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC5B,2FAAyB,CAAA;IACzB,+EAAmB,CAAA;IACnB,yEAAgB,CAAA;IAChB,+EAAmB,CAAA;IACnB,mFAAqB,CAAA;IACrB,6DAAU,CAAA;IACV,uEAAe,CAAA;IACf,2DAAS,CAAA;AACV,CAAC,EATW,iBAAiB,iCAAjB,iBAAiB,QAS5B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ScholarshipFormat } from "./ScholarshipFormatEnum";
|
|
2
|
+
import { ScholarshipType } from "./ScholarshipTypeEnum";
|
|
3
|
+
import { IScholarshipSearchFilters } from "./IScholarshipSearchFilters";
|
|
4
|
+
import { ScholarshipSearchInput } from "./ScholarshipSearchInput";
|
|
5
|
+
import { DegreeTypeEnum } from "../organisations/DegreeTypeEnum";
|
|
6
|
+
export declare class ScholarshipSearchFilters implements IScholarshipSearchFilters {
|
|
7
|
+
title: string | undefined;
|
|
8
|
+
disciplineIds: string[] | undefined;
|
|
9
|
+
destinationCountryIsoCodes: string[] | undefined;
|
|
10
|
+
destinationRegionIds: string[] | undefined;
|
|
11
|
+
originCountryIsoCodes: string[] | undefined;
|
|
12
|
+
universityProviderIds: string[] | undefined;
|
|
13
|
+
degree: DegreeTypeEnum | undefined;
|
|
14
|
+
formats: ScholarshipFormat[] | undefined;
|
|
15
|
+
types: ScholarshipType[] | undefined;
|
|
16
|
+
from(input: ScholarshipSearchInput): ScholarshipSearchFilters;
|
|
17
|
+
consideringTitle(title: string): ScholarshipSearchFilters;
|
|
18
|
+
consideringDisciplineIds(disciplines: string[]): ScholarshipSearchFilters;
|
|
19
|
+
consideringDestinationCountryIsoCodes(destinationCountries: string[]): ScholarshipSearchFilters;
|
|
20
|
+
consideringDestinationRegionIds(destinationStates: string[]): ScholarshipSearchFilters;
|
|
21
|
+
consideringOriginCountryIsoCodes(originCountries: string[]): ScholarshipSearchFilters;
|
|
22
|
+
consideringUniversityProviderIds(providerOrganisationIds: string[]): ScholarshipSearchFilters;
|
|
23
|
+
consideringDegree(degree: DegreeTypeEnum): ScholarshipSearchFilters;
|
|
24
|
+
consideringFormats(formats: ScholarshipFormat[]): ScholarshipSearchFilters;
|
|
25
|
+
consideringTypes(types: ScholarshipType[]): ScholarshipSearchFilters;
|
|
26
|
+
private numbersToStringsOrUndefined;
|
|
27
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScholarshipSearchFilters = void 0;
|
|
4
|
+
class ScholarshipSearchFilters {
|
|
5
|
+
from(input) {
|
|
6
|
+
this.title = input.title;
|
|
7
|
+
this.disciplineIds = this.numbersToStringsOrUndefined(input.disciplineIds);
|
|
8
|
+
this.destinationCountryIsoCodes = input.destinationCountryIsoCodes;
|
|
9
|
+
this.destinationRegionIds = this.numbersToStringsOrUndefined(input.destinationRegionIds);
|
|
10
|
+
this.originCountryIsoCodes = input.originCountryIsoCodes;
|
|
11
|
+
this.universityProviderIds = this.numbersToStringsOrUndefined(input.universityProviderIds);
|
|
12
|
+
this.degree = input.degree;
|
|
13
|
+
this.formats = input.formats;
|
|
14
|
+
this.types = input.types;
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
consideringTitle(title) {
|
|
18
|
+
this.title = title;
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
consideringDisciplineIds(disciplines) {
|
|
22
|
+
this.disciplineIds = disciplines;
|
|
23
|
+
return this;
|
|
24
|
+
}
|
|
25
|
+
consideringDestinationCountryIsoCodes(destinationCountries) {
|
|
26
|
+
this.destinationCountryIsoCodes = destinationCountries;
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
consideringDestinationRegionIds(destinationStates) {
|
|
30
|
+
this.destinationRegionIds = destinationStates;
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
consideringOriginCountryIsoCodes(originCountries) {
|
|
34
|
+
this.originCountryIsoCodes = originCountries;
|
|
35
|
+
return this;
|
|
36
|
+
}
|
|
37
|
+
consideringUniversityProviderIds(providerOrganisationIds) {
|
|
38
|
+
this.universityProviderIds = providerOrganisationIds;
|
|
39
|
+
return this;
|
|
40
|
+
}
|
|
41
|
+
consideringDegree(degree) {
|
|
42
|
+
this.degree = degree;
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
consideringFormats(formats) {
|
|
46
|
+
this.formats = formats;
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
consideringTypes(types) {
|
|
50
|
+
this.types = types;
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
numbersToStringsOrUndefined(values) {
|
|
54
|
+
if (values === undefined)
|
|
55
|
+
return;
|
|
56
|
+
return values.map(value => value.toString());
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.ScholarshipSearchFilters = ScholarshipSearchFilters;
|
|
60
|
+
//# sourceMappingURL=ScholarshipSearchFilters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScholarshipSearchFilters.js","sourceRoot":"","sources":["../../../src/scholarships/ScholarshipSearchFilters.ts"],"names":[],"mappings":";;;AAMA,MAAa,wBAAwB;IAW7B,IAAI,CAAC,KAA6B;QACxC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC3E,IAAI,CAAC,0BAA0B,GAAG,KAAK,CAAC,0BAA0B,CAAC;QACnE,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACzF,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC,qBAAqB,CAAC;QACzD,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC3F,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,gBAAgB,CAAC,KAAa;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,wBAAwB,CAAC,WAAqB;QACpD,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC;QACjC,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,qCAAqC,CAAC,oBAA8B;QAC1E,IAAI,CAAC,0BAA0B,GAAG,oBAAoB,CAAC;QACvD,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,+BAA+B,CAAC,iBAA2B;QACjE,IAAI,CAAC,oBAAoB,GAAG,iBAAiB,CAAC;QAC9C,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,gCAAgC,CAAC,eAAyB;QAChE,IAAI,CAAC,qBAAqB,GAAG,eAAe,CAAC;QAC7C,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,gCAAgC,CAAC,uBAAiC;QACxE,IAAI,CAAC,qBAAqB,GAAG,uBAAuB,CAAC;QACrD,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,iBAAiB,CAAC,MAAsB;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,kBAAkB,CAAC,OAA4B;QACrD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,gBAAgB,CAAC,KAAwB;QAC/C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,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;AAzED,4DAyEC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DegreeTypeEnum } from "../organisations/DegreeTypeEnum";
|
|
2
|
+
import { ScholarshipFormat } from "./ScholarshipFormatEnum";
|
|
3
|
+
import { ScholarshipType } from "./ScholarshipTypeEnum";
|
|
4
|
+
export type ScholarshipSearchInput = {
|
|
5
|
+
scholarshipId?: number;
|
|
6
|
+
title?: string;
|
|
7
|
+
disciplineIds?: number[];
|
|
8
|
+
originCountryIsoCodes?: string[] | undefined;
|
|
9
|
+
destinationCountryIsoCodes?: string[] | undefined;
|
|
10
|
+
destinationRegionIds?: number[] | undefined;
|
|
11
|
+
universityProviderIds?: number[] | undefined;
|
|
12
|
+
degree?: DegreeTypeEnum;
|
|
13
|
+
formats?: ScholarshipFormat[];
|
|
14
|
+
types?: ScholarshipType[];
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScholarshipSearchInput.js","sourceRoot":"","sources":["../../../src/scholarships/ScholarshipSearchInput.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum ScholarshipType {
|
|
2
|
+
FULL_TUITION_FEE_WAIVER = 0,
|
|
3
|
+
PARTIAL_FEE_WAIVER = 1,
|
|
4
|
+
FULL_RIDE = 2,
|
|
5
|
+
MILITARY = 3,
|
|
6
|
+
SPORTS = 4,
|
|
7
|
+
STEM = 5,
|
|
8
|
+
RELIGIOUS = 6,
|
|
9
|
+
HERITAGE = 7,
|
|
10
|
+
LEARNING_DISABILITIES = 8,
|
|
11
|
+
AUTOMATIC = 9,
|
|
12
|
+
MERIT_BASED = 10,
|
|
13
|
+
NEED_BASED = 11,
|
|
14
|
+
NO_ESSAY_REQUIRED = 12,
|
|
15
|
+
NO_GPA_REQUIREMENTS = 13,
|
|
16
|
+
NO_RECOMMENDATIONS_REQUIRED = 14
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScholarshipType = void 0;
|
|
4
|
+
var ScholarshipType;
|
|
5
|
+
(function (ScholarshipType) {
|
|
6
|
+
ScholarshipType[ScholarshipType["FULL_TUITION_FEE_WAIVER"] = 0] = "FULL_TUITION_FEE_WAIVER";
|
|
7
|
+
ScholarshipType[ScholarshipType["PARTIAL_FEE_WAIVER"] = 1] = "PARTIAL_FEE_WAIVER";
|
|
8
|
+
ScholarshipType[ScholarshipType["FULL_RIDE"] = 2] = "FULL_RIDE";
|
|
9
|
+
ScholarshipType[ScholarshipType["MILITARY"] = 3] = "MILITARY";
|
|
10
|
+
ScholarshipType[ScholarshipType["SPORTS"] = 4] = "SPORTS";
|
|
11
|
+
ScholarshipType[ScholarshipType["STEM"] = 5] = "STEM";
|
|
12
|
+
ScholarshipType[ScholarshipType["RELIGIOUS"] = 6] = "RELIGIOUS";
|
|
13
|
+
ScholarshipType[ScholarshipType["HERITAGE"] = 7] = "HERITAGE";
|
|
14
|
+
ScholarshipType[ScholarshipType["LEARNING_DISABILITIES"] = 8] = "LEARNING_DISABILITIES";
|
|
15
|
+
ScholarshipType[ScholarshipType["AUTOMATIC"] = 9] = "AUTOMATIC";
|
|
16
|
+
ScholarshipType[ScholarshipType["MERIT_BASED"] = 10] = "MERIT_BASED";
|
|
17
|
+
ScholarshipType[ScholarshipType["NEED_BASED"] = 11] = "NEED_BASED";
|
|
18
|
+
ScholarshipType[ScholarshipType["NO_ESSAY_REQUIRED"] = 12] = "NO_ESSAY_REQUIRED";
|
|
19
|
+
ScholarshipType[ScholarshipType["NO_GPA_REQUIREMENTS"] = 13] = "NO_GPA_REQUIREMENTS";
|
|
20
|
+
ScholarshipType[ScholarshipType["NO_RECOMMENDATIONS_REQUIRED"] = 14] = "NO_RECOMMENDATIONS_REQUIRED";
|
|
21
|
+
})(ScholarshipType || (exports.ScholarshipType = ScholarshipType = {}));
|
|
22
|
+
//# sourceMappingURL=ScholarshipTypeEnum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScholarshipTypeEnum.js","sourceRoot":"","sources":["../../../src/scholarships/ScholarshipTypeEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAgBX;AAhBD,WAAY,eAAe;IAC1B,2FAA2B,CAAA;IAC3B,iFAAsB,CAAA;IACtB,+DAAa,CAAA;IACb,6DAAY,CAAA;IACZ,yDAAU,CAAA;IACV,qDAAQ,CAAA;IACR,+DAAa,CAAA;IACb,6DAAY,CAAA;IACZ,uFAAyB,CAAA;IACzB,+DAAa,CAAA;IACb,oEAAgB,CAAA;IAChB,kEAAe,CAAA;IACf,gFAAsB,CAAA;IACtB,oFAAwB,CAAA;IACxB,oGAAgC,CAAA;AACjC,CAAC,EAhBW,eAAe,+BAAf,eAAe,QAgB1B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ISuperAgentRequestFactory, IRequestSender } from "@studyportals/mb-platform-http-requests";
|
|
2
|
+
import { SearchApiClientBase } from "../SearchApiClientBase";
|
|
3
|
+
import { IScholarshipSearchFilters } from "./IScholarshipSearchFilters";
|
|
4
|
+
import { IScholarshipSearchResponse } from "./IScholarshipSearchResponse";
|
|
5
|
+
import { IScholarshipCard, PortalMap } from "@studyportals/domain-client";
|
|
6
|
+
export declare class SearchApiScholarshipClient extends SearchApiClientBase {
|
|
7
|
+
private readonly requestFactory;
|
|
8
|
+
private readonly requestSender;
|
|
9
|
+
private readonly scholarshipCardFactory;
|
|
10
|
+
constructor(apiUriBase: string, requestFactory: ISuperAgentRequestFactory, requestSender: IRequestSender, portalMap?: PortalMap);
|
|
11
|
+
searchCards(filters: IScholarshipSearchFilters, resultSize: number, resultOffset: number): Promise<IScholarshipSearchResponse<IScholarshipCard>>;
|
|
12
|
+
count(filters: any, resultSize: number, resultOffset: number): Promise<IScholarshipSearchResponse<string>>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.SearchApiScholarshipClient = void 0;
|
|
13
|
+
const SearchApiClientBase_1 = require("../SearchApiClientBase");
|
|
14
|
+
const domain_client_1 = require("@studyportals/domain-client");
|
|
15
|
+
class SearchApiScholarshipClient extends SearchApiClientBase_1.SearchApiClientBase {
|
|
16
|
+
constructor(apiUriBase, requestFactory, requestSender, portalMap) {
|
|
17
|
+
super("scholarships", apiUriBase);
|
|
18
|
+
this.requestFactory = requestFactory;
|
|
19
|
+
this.requestSender = requestSender;
|
|
20
|
+
this.scholarshipCardFactory = new domain_client_1.ScholarshipCardV2Client("N/A", "N/A", 1, portalMap);
|
|
21
|
+
}
|
|
22
|
+
searchCards(filters, resultSize, resultOffset) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const request = this.requestFactory.get(this.constructUri("search"))
|
|
25
|
+
.query(Object.assign(Object.assign({}, filters), { resultSize, resultOffset }));
|
|
26
|
+
const result = yield this.requestSender.sendAndExtractBody(request);
|
|
27
|
+
return Object.assign(Object.assign({}, result), { scholarships: this.scholarshipCardFactory.fromDescriptions([...result.scholarships]) });
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
count(filters, resultSize, resultOffset) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const request = this.requestFactory.get(this.constructUri("count"))
|
|
33
|
+
.query(Object.assign(Object.assign({}, filters), { resultSize, resultOffset }));
|
|
34
|
+
return yield this.requestSender.sendAndExtractBody(request);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.SearchApiScholarshipClient = SearchApiScholarshipClient;
|
|
39
|
+
//# sourceMappingURL=SearchApiScholarshipsClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchApiScholarshipsClient.js","sourceRoot":"","sources":["../../../src/scholarships/SearchApiScholarshipsClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gEAA6D;AAG7D,+DAAgH;AAGhH,MAAa,0BAA2B,SAAQ,yCAAmB;IAMlE,YAAmB,UAAkB,EAC9B,cAAyC,EACzC,aAA6B,EAC7B,SAAqB;QAE3B,KAAK,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;QAElC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,sBAAsB,GAAG,IAAI,uCAAuB,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;IACvF,CAAC;IAEY,WAAW,CAAC,OAAkC,EAAE,UAAkB,EAAE,YAAoB;;YACpG,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;iBAClE,KAAK,iCAAK,OAAO,KAAE,UAAU,EAAE,YAAY,IAAE,CAAC;YAEhD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAgD,OAAO,CAAC,CAAC;YAEnH,uCACI,MAAM,KACT,YAAY,EAAE,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,IACnF;QACH,CAAC;KAAA;IAEY,KAAK,CAAC,OAAY,EAAE,UAAkB,EAAE,YAAoB;;YACxE,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;iBACjE,KAAK,iCAAM,OAAO,KAAE,UAAU,EAAE,YAAY,IAAG,CAAC;YAElD,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAqC,OAAO,CAAC,CAAC;QACjG,CAAC;KAAA;CACD;AApCD,gEAoCC"}
|