@studyportals/search-api-interface 1.2.2-1 → 1.2.2-10
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/{bin/index.d.ts → index.d.ts} +2 -1
- package/index.js.map +1 -0
- package/package.json +3 -3
- package/{bin/src → src}/organisations/DegreeTypeEnum.js +1 -1
- package/{bin/src → src}/organisations/DegreeTypeEnum.js.map +1 -1
- package/{bin/src → src}/organisations/DeliveryMethodEnum.js +1 -1
- package/{bin/src → src}/organisations/DeliveryMethodEnum.js.map +1 -1
- package/{bin/src → src}/programmes/IProgrammeSearchFilters.d.ts +5 -5
- package/{bin/src → src}/programmes/IProgrammeSearchFilters.js.map +1 -1
- package/{bin/src → src}/programmes/ProgrammeSearchFilters.d.ts +7 -7
- package/{bin/src → src}/programmes/ProgrammeSearchFilters.js +20 -3
- package/src/programmes/ProgrammeSearchFilters.js.map +1 -0
- package/{bin/src → src}/programmes/ProgrammeSearchInput.d.ts +4 -4
- package/src/programmes/RangeDTO.d.ts +4 -0
- package/{bin/src/programmes/TuitionFeeFilterValueDTO.js → src/programmes/RangeDTO.js} +1 -1
- package/src/programmes/RangeDTO.js.map +1 -0
- package/.eslintignore +0 -1
- package/.eslintrc.yml +0 -4
- package/bin/index.js.map +0 -1
- package/bin/package.json +0 -31
- package/bin/src/programmes/ProgrammeSearchFilters.js.map +0 -1
- package/bin/src/programmes/TuitionFeeFilterValueDTO.d.ts +0 -4
- package/bin/src/programmes/TuitionFeeFilterValueDTO.js.map +0 -1
- package/index.ts +0 -30
- package/src/SearchApiClientBase.ts +0 -10
- package/src/organisations/DegreeTypeEnum.ts +0 -7
- package/src/organisations/DeliveryMethodEnum.ts +0 -5
- package/src/organisations/IOrganisationSearchFilters.ts +0 -12
- package/src/organisations/IOrganisationSearchResponse.ts +0 -5
- package/src/organisations/OrganisationSearchFilters.ts +0 -65
- package/src/organisations/OrganisationSearchInput.ts +0 -14
- package/src/organisations/SearchApiOrganisationClient.ts +0 -42
- package/src/programmes/IProgrammeSearchFilters.ts +0 -28
- package/src/programmes/IProgrammeSearchResponse.ts +0 -5
- package/src/programmes/ProgrammeSearchFilters.ts +0 -60
- package/src/programmes/ProgrammeSearchInput.ts +0 -33
- package/src/programmes/SearchApiProgrammeClient.ts +0 -42
- package/src/programmes/TuitionFeeFilterValueDTO.ts +0 -4
- package/tsconfig.json +0 -47
- /package/{bin/index.js → index.js} +0 -0
- /package/{bin/src → src}/SearchApiClientBase.d.ts +0 -0
- /package/{bin/src → src}/SearchApiClientBase.js +0 -0
- /package/{bin/src → src}/SearchApiClientBase.js.map +0 -0
- /package/{bin/src → src}/organisations/DegreeTypeEnum.d.ts +0 -0
- /package/{bin/src → src}/organisations/DeliveryMethodEnum.d.ts +0 -0
- /package/{bin/src → src}/organisations/IOrganisationSearchFilters.d.ts +0 -0
- /package/{bin/src → src}/organisations/IOrganisationSearchFilters.js +0 -0
- /package/{bin/src → src}/organisations/IOrganisationSearchFilters.js.map +0 -0
- /package/{bin/src → src}/organisations/IOrganisationSearchResponse.d.ts +0 -0
- /package/{bin/src → src}/organisations/IOrganisationSearchResponse.js +0 -0
- /package/{bin/src → src}/organisations/IOrganisationSearchResponse.js.map +0 -0
- /package/{bin/src → src}/organisations/OrganisationSearchFilters.d.ts +0 -0
- /package/{bin/src → src}/organisations/OrganisationSearchFilters.js +0 -0
- /package/{bin/src → src}/organisations/OrganisationSearchFilters.js.map +0 -0
- /package/{bin/src → src}/organisations/OrganisationSearchInput.d.ts +0 -0
- /package/{bin/src → src}/organisations/OrganisationSearchInput.js +0 -0
- /package/{bin/src → src}/organisations/OrganisationSearchInput.js.map +0 -0
- /package/{bin/src → src}/organisations/SearchApiOrganisationClient.d.ts +0 -0
- /package/{bin/src → src}/organisations/SearchApiOrganisationClient.js +0 -0
- /package/{bin/src → src}/organisations/SearchApiOrganisationClient.js.map +0 -0
- /package/{bin/src → src}/programmes/IProgrammeSearchFilters.js +0 -0
- /package/{bin/src → src}/programmes/IProgrammeSearchResponse.d.ts +0 -0
- /package/{bin/src → src}/programmes/IProgrammeSearchResponse.js +0 -0
- /package/{bin/src → src}/programmes/IProgrammeSearchResponse.js.map +0 -0
- /package/{bin/src → src}/programmes/ProgrammeSearchInput.js +0 -0
- /package/{bin/src → src}/programmes/ProgrammeSearchInput.js.map +0 -0
- /package/{bin/src → src}/programmes/SearchApiProgrammeClient.d.ts +0 -0
- /package/{bin/src → src}/programmes/SearchApiProgrammeClient.js +0 -0
- /package/{bin/src → src}/programmes/SearchApiProgrammeClient.js.map +0 -0
|
@@ -9,5 +9,6 @@ import { IProgrammeSearchFilters } from "./src/programmes/IProgrammeSearchFilter
|
|
|
9
9
|
import { IProgrammeSearchResponse } from "./src/programmes/IProgrammeSearchResponse";
|
|
10
10
|
import { ProgrammeSearchFilters } from "./src/programmes/ProgrammeSearchFilters";
|
|
11
11
|
import { ProgrammeSearchInput } from "./src/programmes/ProgrammeSearchInput";
|
|
12
|
+
import { RangeDTO } from "./src/programmes/RangeDTO";
|
|
12
13
|
import { SearchApiProgrammeClient } from "./src/programmes/SearchApiProgrammeClient";
|
|
13
|
-
export { SearchApiOrganisationClient, IOrganisationSearchResponse, IOrganisationSearchFilters, OrganisationSearchFilters, SearchApiProgrammeClient, IProgrammeSearchResponse, IProgrammeSearchFilters, ProgrammeSearchFilters, OrganisationSearchInput, ProgrammeSearchInput, DegreeTypeEnum, DeliveryMethodEnum };
|
|
14
|
+
export { SearchApiOrganisationClient, IOrganisationSearchResponse, IOrganisationSearchFilters, OrganisationSearchFilters, SearchApiProgrammeClient, IProgrammeSearchResponse, IProgrammeSearchFilters, ProgrammeSearchFilters, OrganisationSearchInput, ProgrammeSearchInput, DegreeTypeEnum, DeliveryMethodEnum, RangeDTO };
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,uEAAoE;AA4BnE,+FA5BQ,+BAAc,OA4BR;AA3Bf,+EAA4E;AA4B3E,mGA5BQ,uCAAkB,OA4BR;AA3BnB,+FAA4F;AAe3F,2GAfQ,uDAA0B,OAeR;AAb3B,6FAA0F;AAczF,0GAdQ,qDAAyB,OAcR;AAZ1B,iGAA8F;AAS7F,4GATQ,yDAA2B,OASR;AAR5B,sFAAmF;AAelF,wGAfQ,iDAAuB,OAeR;AAbxB,oFAAiF;AAchF,uGAdQ,+CAAsB,OAcR;AAXvB,wFAAqF;AAQpF,yGARQ,mDAAwB,OAQR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studyportals/search-api-interface",
|
|
3
|
-
"version": "1.2.2-
|
|
3
|
+
"version": "1.2.2-10",
|
|
4
4
|
"description": "Typescript library containing resources that facilitate integration with SearchApi",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
23
23
|
"@typescript-eslint/parser": "^5.27.0",
|
|
24
24
|
"eslint": "^8.17.0",
|
|
25
|
-
"typescript": "^
|
|
25
|
+
"typescript": "^5.5.4",
|
|
26
26
|
"typescript-transform-paths": "^3.4.6"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@studyportals/search-filters": "
|
|
29
|
+
"@studyportals/search-filters": "4.3.1-5"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -8,5 +8,5 @@ var DegreeTypeEnum;
|
|
|
8
8
|
DegreeTypeEnum[DegreeTypeEnum["PHD"] = 2] = "PHD";
|
|
9
9
|
DegreeTypeEnum[DegreeTypeEnum["DISTANCE_LEARNING"] = 3] = "DISTANCE_LEARNING";
|
|
10
10
|
DegreeTypeEnum[DegreeTypeEnum["SHORT_COURSES"] = 4] = "SHORT_COURSES";
|
|
11
|
-
})(DegreeTypeEnum
|
|
11
|
+
})(DegreeTypeEnum || (exports.DegreeTypeEnum = DegreeTypeEnum = {}));
|
|
12
12
|
//# sourceMappingURL=DegreeTypeEnum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DegreeTypeEnum.js","sourceRoot":"","sources":["../../../src/organisations/DegreeTypeEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAMX;AAND,WAAY,cAAc;IACzB,uDAAU,CAAA;IACV,2DAAY,CAAA;IACZ,iDAAO,CAAA;IACP,6EAAqB,CAAA;IACrB,qEAAiB,CAAA;AAClB,CAAC,EANW,cAAc,
|
|
1
|
+
{"version":3,"file":"DegreeTypeEnum.js","sourceRoot":"","sources":["../../../src/organisations/DegreeTypeEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAMX;AAND,WAAY,cAAc;IACzB,uDAAU,CAAA;IACV,2DAAY,CAAA;IACZ,iDAAO,CAAA;IACP,6EAAqB,CAAA;IACrB,qEAAiB,CAAA;AAClB,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB"}
|
|
@@ -6,5 +6,5 @@ var DeliveryMethodEnum;
|
|
|
6
6
|
DeliveryMethodEnum["ONLINE"] = "online";
|
|
7
7
|
DeliveryMethodEnum["ON_CAMPUS"] = "oncampus";
|
|
8
8
|
DeliveryMethodEnum["BLENDED"] = "blended";
|
|
9
|
-
})(DeliveryMethodEnum
|
|
9
|
+
})(DeliveryMethodEnum || (exports.DeliveryMethodEnum = DeliveryMethodEnum = {}));
|
|
10
10
|
//# sourceMappingURL=DeliveryMethodEnum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeliveryMethodEnum.js","sourceRoot":"","sources":["../../../src/organisations/DeliveryMethodEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC7B,uCAAiB,CAAA;IACjB,4CAAsB,CAAA;IACtB,yCAAmB,CAAA;AACpB,CAAC,EAJW,kBAAkB,
|
|
1
|
+
{"version":3,"file":"DeliveryMethodEnum.js","sourceRoot":"","sources":["../../../src/organisations/DeliveryMethodEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC7B,uCAAiB,CAAA;IACjB,4CAAsB,CAAA;IACtB,yCAAmB,CAAA;AACpB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { AttendanceFilterOptionValue, DegreeTypeFilterOptionValue,
|
|
2
|
-
import {
|
|
1
|
+
import { AttendanceFilterOptionValue, DegreeTypeFilterOptionValue, EducationLevelFilterOptionValue, EducationalFormFilterOptionValue, SpecialProgrammesFilterOptionValue } from "@studyportals/search-filters/server";
|
|
2
|
+
import { RangeDTO } from "./RangeDTO";
|
|
3
3
|
export declare class IProgrammeSearchFilters {
|
|
4
4
|
readonly attendances?: AttendanceFilterOptionValue[];
|
|
5
5
|
readonly degreeTypes?: DegreeTypeFilterOptionValue[];
|
|
6
6
|
readonly disciplines?: string[];
|
|
7
|
-
readonly durations?:
|
|
7
|
+
readonly durations?: RangeDTO[];
|
|
8
8
|
readonly educationalLevels?: EducationLevelFilterOptionValue[];
|
|
9
9
|
readonly educationalForms?: EducationalFormFilterOptionValue[];
|
|
10
10
|
readonly keyword?: string;
|
|
11
11
|
readonly areaIds?: string[];
|
|
12
12
|
readonly regionIds?: string[];
|
|
13
13
|
readonly countryIsoCodes?: string[];
|
|
14
|
-
readonly
|
|
14
|
+
readonly organisationIds?: string[];
|
|
15
15
|
readonly specialProgrammes?: SpecialProgrammesFilterOptionValue[];
|
|
16
|
-
readonly tuitionFee?:
|
|
16
|
+
readonly tuitionFee?: RangeDTO;
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IProgrammeSearchFilters.js","sourceRoot":"","sources":["../../../src/programmes/IProgrammeSearchFilters.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"IProgrammeSearchFilters.js","sourceRoot":"","sources":["../../../src/programmes/IProgrammeSearchFilters.ts"],"names":[],"mappings":";;;AAUA,MAAa,uBAAuB;CAgBnC;AAhBD,0DAgBC"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { IProgrammeSearchFilters } from "./IProgrammeSearchFilters";
|
|
2
2
|
import { ProgrammeSearchInput } from "./ProgrammeSearchInput";
|
|
3
|
-
import { AttendanceFilterOptionValue, DegreeTypeFilterOptionValue,
|
|
3
|
+
import { AttendanceFilterOptionValue, DegreeTypeFilterOptionValue, EducationLevelFilterOptionValue, EducationalFormFilterOptionValue, SpecialProgrammesFilterOptionValue } from "@studyportals/search-filters/server";
|
|
4
|
+
import { RangeDTO } from "./RangeDTO";
|
|
4
5
|
export declare class ProgrammeSearchFilters implements IProgrammeSearchFilters {
|
|
5
6
|
attendances?: AttendanceFilterOptionValue[];
|
|
6
7
|
degreeTypes?: DegreeTypeFilterOptionValue[];
|
|
7
8
|
disciplines?: string[];
|
|
8
|
-
durations?:
|
|
9
|
+
durations?: RangeDTO[];
|
|
9
10
|
educationalLevels?: EducationLevelFilterOptionValue[];
|
|
10
11
|
educationalForms?: EducationalFormFilterOptionValue[];
|
|
11
12
|
keyword?: string;
|
|
12
13
|
areaIds?: string[];
|
|
13
14
|
regionIds?: string[];
|
|
14
15
|
countryIsoCodes?: string[];
|
|
15
|
-
|
|
16
|
+
organisationIds?: string[];
|
|
16
17
|
specialProgrammes?: SpecialProgrammesFilterOptionValue[];
|
|
17
|
-
tuitionFee?:
|
|
18
|
-
min: number;
|
|
19
|
-
max: number;
|
|
20
|
-
};
|
|
18
|
+
tuitionFee?: RangeDTO;
|
|
21
19
|
from(input: ProgrammeSearchInput): IProgrammeSearchFilters;
|
|
20
|
+
private parseDurations;
|
|
21
|
+
private parseTuitionFee;
|
|
22
22
|
private numbersToStringsOrUndefined;
|
|
23
23
|
}
|
|
@@ -6,18 +6,35 @@ class ProgrammeSearchFilters {
|
|
|
6
6
|
this.attendances = input.attendances;
|
|
7
7
|
this.degreeTypes = input.degreeTypes;
|
|
8
8
|
this.disciplines = this.numbersToStringsOrUndefined(input.disciplines);
|
|
9
|
-
this.durations = input.durations;
|
|
10
9
|
this.educationalLevels = input.educationalLevels;
|
|
11
10
|
this.educationalForms = input.educationalForms;
|
|
12
11
|
this.keyword = input.keyword;
|
|
13
12
|
this.areaIds = this.numbersToStringsOrUndefined(input.areaIds);
|
|
14
13
|
this.regionIds = this.numbersToStringsOrUndefined(input.regionIds);
|
|
15
14
|
this.countryIsoCodes = input.countryIsoCodes;
|
|
16
|
-
this.
|
|
15
|
+
this.organisationIds = input.organisationIds ? input.organisationIds.map(id => id.toString()) : undefined;
|
|
17
16
|
this.specialProgrammes = input.specialProgrammes;
|
|
18
|
-
this.
|
|
17
|
+
this.parseDurations(input);
|
|
18
|
+
this.parseTuitionFee(input);
|
|
19
19
|
return this;
|
|
20
20
|
}
|
|
21
|
+
parseDurations(input) {
|
|
22
|
+
if (!input.durations)
|
|
23
|
+
return;
|
|
24
|
+
this.durations = [];
|
|
25
|
+
for (const duration of input.durations) {
|
|
26
|
+
const [min, max] = JSON.parse(duration);
|
|
27
|
+
this.durations.push({ min, max });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
parseTuitionFee(input) {
|
|
31
|
+
if (input.tuitionFeeMin || input.tuitionFeeMax) {
|
|
32
|
+
this.tuitionFee = {
|
|
33
|
+
min: input.tuitionFeeMin,
|
|
34
|
+
max: input.tuitionFeeMax,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
21
38
|
numbersToStringsOrUndefined(values) {
|
|
22
39
|
if (values === undefined)
|
|
23
40
|
return;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgrammeSearchFilters.js","sourceRoot":"","sources":["../../../src/programmes/ProgrammeSearchFilters.ts"],"names":[],"mappings":";;;AAaA,MAAa,sBAAsB;IAiB3B,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,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,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC1G,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAA;QAEhD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAA;QAC1B,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAE5B,OAAO,IAAI,CAAC;IACb,CAAC;IAEO,cAAc,CAAC,KAA2B;QACjD,IAAI,CAAC,KAAK,CAAC,SAAS;YAAE,OAAO;QAE7B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QAEpB,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;YACxC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACxC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAC,GAAG,EAAE,GAAG,EAAC,CAAC,CAAA;QAChC,CAAC;IACF,CAAC;IAEO,eAAe,CAAC,KAA2B;QAClD,IAAI,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;YAChD,IAAI,CAAC,UAAU,GAAG;gBACjB,GAAG,EAAE,KAAK,CAAC,aAAa;gBACxB,GAAG,EAAE,KAAK,CAAC,aAAa;aACxB,CAAC;QACH,CAAC;IACF,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;AA9DD,wDA8DC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AttendanceFilterOptionValue, DegreeTypeFilterOptionValue, DurationFilterOptionValue, EducationLevelFilterOptionValue, EducationalFormFilterOptionValue, SpecialProgrammesFilterOptionValue } from "@studyportals/search-filters";
|
|
2
|
-
import { TuitionFeeFilterValueDTO } from "./TuitionFeeFilterValueDTO";
|
|
1
|
+
import { AttendanceFilterOptionValue, DegreeTypeFilterOptionValue, DurationFilterOptionValue, EducationLevelFilterOptionValue, EducationalFormFilterOptionValue, SpecialProgrammesFilterOptionValue } from "@studyportals/search-filters/server";
|
|
3
2
|
export type ProgrammeSearchInput = {
|
|
4
3
|
resultSize: number;
|
|
5
4
|
resultOffset: number;
|
|
@@ -13,7 +12,8 @@ export type ProgrammeSearchInput = {
|
|
|
13
12
|
areaIds?: number[];
|
|
14
13
|
regionIds?: number[];
|
|
15
14
|
countryIsoCodes?: string[];
|
|
16
|
-
|
|
15
|
+
organisationIds?: number[];
|
|
17
16
|
specialProgrammes?: SpecialProgrammesFilterOptionValue[];
|
|
18
|
-
|
|
17
|
+
tuitionFeeMin?: number;
|
|
18
|
+
tuitionFeeMax?: number;
|
|
19
19
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RangeDTO.js","sourceRoot":"","sources":["../../../src/programmes/RangeDTO.ts"],"names":[],"mappings":""}
|
package/.eslintignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
**/bin/**
|
package/.eslintrc.yml
DELETED
package/bin/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/bin/package.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@studyportals/search-api-interface",
|
|
3
|
-
"version": "1.2.2-1",
|
|
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
|
-
"@studyportals/search-filters": "^4.3.0"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProgrammeSearchFilters.js","sourceRoot":"","sources":["../../../src/programmes/ProgrammeSearchFilters.ts"],"names":[],"mappings":";;;AAcA,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;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;AA7CD,wDA6CC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TuitionFeeFilterValueDTO.js","sourceRoot":"","sources":["../../../src/programmes/TuitionFeeFilterValueDTO.ts"],"names":[],"mappings":""}
|
package/index.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { DegreeTypeEnum } from "./src/organisations/DegreeTypeEnum";
|
|
2
|
-
import { DeliveryMethodEnum } from "./src/organisations/DeliveryMethodEnum";
|
|
3
|
-
import { IOrganisationSearchFilters } from "./src/organisations/IOrganisationSearchFilters";
|
|
4
|
-
import { IOrganisationSearchResponse } from "./src/organisations/IOrganisationSearchResponse";
|
|
5
|
-
import { OrganisationSearchFilters } from "./src/organisations/OrganisationSearchFilters";
|
|
6
|
-
import { OrganisationSearchInput } from "./src/organisations/OrganisationSearchInput";
|
|
7
|
-
import { SearchApiOrganisationClient } from "./src/organisations/SearchApiOrganisationClient";
|
|
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
|
-
|
|
14
|
-
export {
|
|
15
|
-
SearchApiOrganisationClient,
|
|
16
|
-
IOrganisationSearchResponse,
|
|
17
|
-
IOrganisationSearchFilters,
|
|
18
|
-
OrganisationSearchFilters,
|
|
19
|
-
|
|
20
|
-
SearchApiProgrammeClient,
|
|
21
|
-
IProgrammeSearchResponse,
|
|
22
|
-
IProgrammeSearchFilters,
|
|
23
|
-
ProgrammeSearchFilters,
|
|
24
|
-
|
|
25
|
-
OrganisationSearchInput,
|
|
26
|
-
ProgrammeSearchInput,
|
|
27
|
-
|
|
28
|
-
DegreeTypeEnum,
|
|
29
|
-
DeliveryMethodEnum
|
|
30
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export class SearchApiClientBase {
|
|
2
|
-
public constructor(private readonly domain: string,
|
|
3
|
-
private readonly apiUriBase: string
|
|
4
|
-
) {
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
protected constructUri(relativeUri: string): string {
|
|
8
|
-
return `${this.apiUriBase}/${this.domain}/${relativeUri}`;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DegreeTypeEnum } from "./DegreeTypeEnum";
|
|
2
|
-
import { DeliveryMethodEnum } from "./DeliveryMethodEnum";
|
|
3
|
-
|
|
4
|
-
export class IOrganisationSearchFilters {
|
|
5
|
-
readonly organisationId: string | undefined;
|
|
6
|
-
readonly degree: DegreeTypeEnum | undefined;
|
|
7
|
-
readonly disciplines: string[] | undefined;
|
|
8
|
-
readonly deliveryMethods: DeliveryMethodEnum[] | undefined;
|
|
9
|
-
readonly countryIsoCodes: string[] | undefined;
|
|
10
|
-
readonly regionIds: string[] | undefined;
|
|
11
|
-
readonly areaIds: string[] | undefined;
|
|
12
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { DegreeTypeEnum } from "./DegreeTypeEnum";
|
|
2
|
-
import { DeliveryMethodEnum } from "./DeliveryMethodEnum";
|
|
3
|
-
import { OrganisationSearchInput } from "./OrganisationSearchInput";
|
|
4
|
-
import { IOrganisationSearchFilters } from "./IOrganisationSearchFilters";
|
|
5
|
-
|
|
6
|
-
export class OrganisationSearchFilters implements IOrganisationSearchFilters {
|
|
7
|
-
public organisationId: string | undefined;
|
|
8
|
-
public degree: DegreeTypeEnum | undefined;
|
|
9
|
-
public disciplines: string[] | undefined;
|
|
10
|
-
public deliveryMethods: DeliveryMethodEnum[] | undefined;
|
|
11
|
-
public countryIsoCodes: string[] | undefined;
|
|
12
|
-
public regionIds: string[] | undefined;
|
|
13
|
-
public areaIds: string[] | undefined;
|
|
14
|
-
|
|
15
|
-
public from(input: OrganisationSearchInput): OrganisationSearchFilters {
|
|
16
|
-
this.organisationId = input.organisationId ? input.organisationId.toString() : undefined;
|
|
17
|
-
this.degree = input.degree;
|
|
18
|
-
this.deliveryMethods = input.deliveryMethods;
|
|
19
|
-
this.disciplines = this.numbersToStringsOrUndefined(input.disciplines);
|
|
20
|
-
this.countryIsoCodes = input.countryIsoCodes;
|
|
21
|
-
this.regionIds = this.numbersToStringsOrUndefined(input.regionIds);
|
|
22
|
-
this.areaIds = this.numbersToStringsOrUndefined(input.areaIds);
|
|
23
|
-
return this;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public consideringId(id: string): OrganisationSearchFilters {
|
|
27
|
-
this.organisationId = id;
|
|
28
|
-
return this;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
public consideringDegree(degree: DegreeTypeEnum): OrganisationSearchFilters {
|
|
32
|
-
this.degree = degree;
|
|
33
|
-
return this;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
public consideringDisciplines(disciplines: string[]): OrganisationSearchFilters {
|
|
37
|
-
this.disciplines = disciplines;
|
|
38
|
-
return this;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
public consideringDeliveryMethods(deliveryMethods: DeliveryMethodEnum[]): OrganisationSearchFilters {
|
|
42
|
-
this.deliveryMethods = deliveryMethods;
|
|
43
|
-
return this;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
public consideringCountryIsoCodes(countryIsoCodes: string[]): OrganisationSearchFilters {
|
|
47
|
-
this.countryIsoCodes = countryIsoCodes;
|
|
48
|
-
return this;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
public consideringRegionIds(regionIds: string[]): OrganisationSearchFilters {
|
|
52
|
-
this.regionIds = regionIds;
|
|
53
|
-
return this;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
public consideringAreaIds(areaIds: string[]): OrganisationSearchFilters {
|
|
57
|
-
this.areaIds = areaIds;
|
|
58
|
-
return this;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
private numbersToStringsOrUndefined(values: number[] | undefined): string[] | undefined {
|
|
62
|
-
if (values === undefined) return;
|
|
63
|
-
return values.map(value => value.toString());
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DegreeTypeEnum } from "./DegreeTypeEnum";
|
|
2
|
-
import { DeliveryMethodEnum } from "./DeliveryMethodEnum";
|
|
3
|
-
|
|
4
|
-
export type OrganisationSearchInput = {
|
|
5
|
-
resultSize: number,
|
|
6
|
-
resultOffset: number,
|
|
7
|
-
organisationId?: number,
|
|
8
|
-
disciplines?: number[],
|
|
9
|
-
countryIsoCodes?: string[],
|
|
10
|
-
regionIds?: number[],
|
|
11
|
-
areaIds?: number[],
|
|
12
|
-
degree?: DegreeTypeEnum,
|
|
13
|
-
deliveryMethods?: DeliveryMethodEnum[]
|
|
14
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { SearchApiClientBase } from "../SearchApiClientBase";
|
|
2
|
-
import { IRequestSender, ISuperAgentRequestFactory } from "@studyportals/mb-platform-http-requests";
|
|
3
|
-
import { IOrganisationCard, OrganisationCardClient } from "@studyportals/domain-client";
|
|
4
|
-
import { IOrganisationSearchResponse } from "./IOrganisationSearchResponse";
|
|
5
|
-
import { IModelDescription } from "@studyportals/domain-client/src/i-model-description";
|
|
6
|
-
|
|
7
|
-
export class SearchApiOrganisationClient extends SearchApiClientBase {
|
|
8
|
-
|
|
9
|
-
private readonly requestFactory: ISuperAgentRequestFactory;
|
|
10
|
-
private readonly requestSender: IRequestSender;
|
|
11
|
-
private readonly organisationCardFactory = new OrganisationCardClient();
|
|
12
|
-
|
|
13
|
-
public constructor(apiUriBase: string,
|
|
14
|
-
requestFactory: ISuperAgentRequestFactory,
|
|
15
|
-
requestSender: IRequestSender
|
|
16
|
-
) {
|
|
17
|
-
super("organisations", apiUriBase);
|
|
18
|
-
|
|
19
|
-
this.requestFactory = requestFactory;
|
|
20
|
-
this.requestSender = requestSender;
|
|
21
|
-
this.organisationCardFactory = new OrganisationCardClient("N/A", "N/A", 1);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public async searchCards(filters: any, resultSize: number, resultOffset: number): Promise<IOrganisationSearchResponse<IOrganisationCard>> {
|
|
25
|
-
const request = this.requestFactory.get(this.constructUri("search"))
|
|
26
|
-
.query({ ...filters, resultSize, resultOffset });
|
|
27
|
-
|
|
28
|
-
const result = await this.requestSender.sendAndExtractBody<IOrganisationSearchResponse<IModelDescription>>(request);
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
...result,
|
|
32
|
-
organisations: this.organisationCardFactory.fromDescriptions([...result.organisations])
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
public async searchIds(filters: any, resultSize: number, resultOffset: number): Promise<IOrganisationSearchResponse<string>> {
|
|
37
|
-
const request = this.requestFactory.get(this.constructUri("search/ids"))
|
|
38
|
-
.query({ ...filters, resultSize, resultOffset });
|
|
39
|
-
|
|
40
|
-
return await this.requestSender.sendAndExtractBody<IOrganisationSearchResponse<string>>(request);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AttendanceFilterOptionValue,
|
|
3
|
-
DegreeTypeFilterOptionValue,
|
|
4
|
-
DurationFilterOptionValue,
|
|
5
|
-
EducationLevelFilterOptionValue,
|
|
6
|
-
EducationalFormFilterOptionValue,
|
|
7
|
-
SpecialProgrammesFilterOptionValue
|
|
8
|
-
} from "@studyportals/search-filters";
|
|
9
|
-
|
|
10
|
-
import { TuitionFeeFilterValueDTO } from "./TuitionFeeFilterValueDTO";
|
|
11
|
-
|
|
12
|
-
export class IProgrammeSearchFilters {
|
|
13
|
-
readonly attendances?: AttendanceFilterOptionValue[];
|
|
14
|
-
readonly degreeTypes?: DegreeTypeFilterOptionValue[];
|
|
15
|
-
readonly disciplines?: string[];
|
|
16
|
-
readonly durations?: DurationFilterOptionValue[];
|
|
17
|
-
readonly educationalLevels?: EducationLevelFilterOptionValue[];
|
|
18
|
-
readonly educationalForms?: EducationalFormFilterOptionValue[];
|
|
19
|
-
readonly keyword?: string;
|
|
20
|
-
|
|
21
|
-
readonly areaIds?: string[];
|
|
22
|
-
readonly regionIds?: string[];
|
|
23
|
-
readonly countryIsoCodes?: string[];
|
|
24
|
-
readonly organisationId?: string;
|
|
25
|
-
|
|
26
|
-
readonly specialProgrammes?: SpecialProgrammesFilterOptionValue[];
|
|
27
|
-
readonly tuitionFee?: TuitionFeeFilterValueDTO
|
|
28
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { IProgrammeSearchFilters } from "./IProgrammeSearchFilters";
|
|
2
|
-
import { ProgrammeSearchInput } from "./ProgrammeSearchInput";
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
AttendanceFilterOptionValue,
|
|
6
|
-
DegreeTypeFilterOptionValue,
|
|
7
|
-
DurationFilterOptionValue,
|
|
8
|
-
EducationLevelFilterOptionValue,
|
|
9
|
-
EducationalFormFilterOptionValue,
|
|
10
|
-
SpecialProgrammesFilterOptionValue
|
|
11
|
-
} from "@studyportals/search-filters";
|
|
12
|
-
|
|
13
|
-
import { TuitionFeeFilterValueDTO } from "./TuitionFeeFilterValueDTO";
|
|
14
|
-
|
|
15
|
-
export class ProgrammeSearchFilters implements IProgrammeSearchFilters {
|
|
16
|
-
public attendances?: AttendanceFilterOptionValue[];
|
|
17
|
-
public degreeTypes?: DegreeTypeFilterOptionValue[];
|
|
18
|
-
public disciplines?: string[];
|
|
19
|
-
public durations?: DurationFilterOptionValue[];
|
|
20
|
-
public educationalLevels?: EducationLevelFilterOptionValue[];
|
|
21
|
-
public educationalForms?: EducationalFormFilterOptionValue[];
|
|
22
|
-
public keyword?: string;
|
|
23
|
-
|
|
24
|
-
public areaIds?: string[];
|
|
25
|
-
public regionIds?: string[];
|
|
26
|
-
public countryIsoCodes?: string[];
|
|
27
|
-
public organisationId?: string;
|
|
28
|
-
|
|
29
|
-
public specialProgrammes?: SpecialProgrammesFilterOptionValue[];
|
|
30
|
-
public tuitionFee?: {
|
|
31
|
-
min: number
|
|
32
|
-
max: number
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
public from(input: ProgrammeSearchInput): IProgrammeSearchFilters {
|
|
36
|
-
this.attendances = input.attendances;
|
|
37
|
-
this.degreeTypes = input.degreeTypes;
|
|
38
|
-
this.disciplines = this.numbersToStringsOrUndefined(input.disciplines);
|
|
39
|
-
this.durations = input.durations;
|
|
40
|
-
this.educationalLevels = input.educationalLevels;
|
|
41
|
-
this.educationalForms = input.educationalForms;
|
|
42
|
-
this.keyword = input.keyword;
|
|
43
|
-
|
|
44
|
-
this.areaIds = this.numbersToStringsOrUndefined(input.areaIds);
|
|
45
|
-
this.regionIds = this.numbersToStringsOrUndefined(input.regionIds);
|
|
46
|
-
this.countryIsoCodes = input.countryIsoCodes;
|
|
47
|
-
|
|
48
|
-
this.organisationId = input.organisationId ? input.organisationId.toString() : undefined;
|
|
49
|
-
this.specialProgrammes = input.specialProgrammes
|
|
50
|
-
|
|
51
|
-
this.tuitionFee = input.tuitionFee;
|
|
52
|
-
|
|
53
|
-
return this;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
private numbersToStringsOrUndefined(values: number[] | undefined): string[] | undefined {
|
|
57
|
-
if (values === undefined) return;
|
|
58
|
-
return values.map(value => value.toString());
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AttendanceFilterOptionValue,
|
|
3
|
-
DegreeTypeFilterOptionValue,
|
|
4
|
-
DurationFilterOptionValue,
|
|
5
|
-
EducationLevelFilterOptionValue,
|
|
6
|
-
EducationalFormFilterOptionValue,
|
|
7
|
-
SpecialProgrammesFilterOptionValue
|
|
8
|
-
} from "@studyportals/search-filters";
|
|
9
|
-
|
|
10
|
-
import { TuitionFeeFilterValueDTO } from "./TuitionFeeFilterValueDTO";
|
|
11
|
-
|
|
12
|
-
export type ProgrammeSearchInput = {
|
|
13
|
-
resultSize: number,
|
|
14
|
-
resultOffset: number,
|
|
15
|
-
|
|
16
|
-
attendances?: AttendanceFilterOptionValue[],
|
|
17
|
-
degreeTypes?: DegreeTypeFilterOptionValue[],
|
|
18
|
-
disciplines?: number[],
|
|
19
|
-
durations?: DurationFilterOptionValue[],
|
|
20
|
-
educationalLevels?: EducationLevelFilterOptionValue[],
|
|
21
|
-
educationalForms?: EducationalFormFilterOptionValue[]
|
|
22
|
-
|
|
23
|
-
keyword: string
|
|
24
|
-
|
|
25
|
-
areaIds?: number[],
|
|
26
|
-
regionIds?: number[],
|
|
27
|
-
countryIsoCodes?: string[],
|
|
28
|
-
organisationId?: number,
|
|
29
|
-
|
|
30
|
-
specialProgrammes?: SpecialProgrammesFilterOptionValue[]
|
|
31
|
-
tuitionFee?: TuitionFeeFilterValueDTO
|
|
32
|
-
|
|
33
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { SearchApiClientBase } from "../SearchApiClientBase";
|
|
2
|
-
import { IRequestSender, ISuperAgentRequestFactory } from "@studyportals/mb-platform-http-requests";
|
|
3
|
-
import { IModelDescription } from "@studyportals/domain-client/src/i-model-description";
|
|
4
|
-
import { IProgrammeCard, ProgrammeCardClient } from "@studyportals/domain-client";
|
|
5
|
-
import { IProgrammeSearchResponse } from "./IProgrammeSearchResponse";
|
|
6
|
-
|
|
7
|
-
export class SearchApiProgrammeClient extends SearchApiClientBase {
|
|
8
|
-
|
|
9
|
-
private readonly requestFactory: ISuperAgentRequestFactory;
|
|
10
|
-
private readonly requestSender: IRequestSender;
|
|
11
|
-
private readonly organisationCardFactory = new ProgrammeCardClient();
|
|
12
|
-
|
|
13
|
-
public constructor(apiUriBase: string,
|
|
14
|
-
requestFactory: ISuperAgentRequestFactory,
|
|
15
|
-
requestSender: IRequestSender
|
|
16
|
-
) {
|
|
17
|
-
super("organisations", apiUriBase);
|
|
18
|
-
|
|
19
|
-
this.requestFactory = requestFactory;
|
|
20
|
-
this.requestSender = requestSender;
|
|
21
|
-
this.organisationCardFactory = new ProgrammeCardClient("N/A", "N/A", 1);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public async searchCards(filters: any, resultSize: number, resultOffset: number): Promise<IProgrammeSearchResponse<IProgrammeCard>> {
|
|
25
|
-
const request = this.requestFactory.get(this.constructUri("search"))
|
|
26
|
-
.query({ ...filters, resultSize, resultOffset });
|
|
27
|
-
|
|
28
|
-
const result = await this.requestSender.sendAndExtractBody<IProgrammeSearchResponse<IModelDescription>>(request);
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
...result,
|
|
32
|
-
programmes: this.organisationCardFactory.fromDescriptions([...result.programmes])
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
public async searchIds(filters: any, resultSize: number, resultOffset: number): Promise<IProgrammeSearchResponse<string>> {
|
|
37
|
-
const request = this.requestFactory.get(this.constructUri("search/ids"))
|
|
38
|
-
.query({ ...filters, resultSize, resultOffset });
|
|
39
|
-
|
|
40
|
-
return await this.requestSender.sendAndExtractBody<IProgrammeSearchResponse<string>>(request);
|
|
41
|
-
}
|
|
42
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"outDir": "bin",
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"rootDirs": [
|
|
6
|
-
"./"
|
|
7
|
-
],
|
|
8
|
-
"moduleResolution": "node",
|
|
9
|
-
"alwaysStrict": true,
|
|
10
|
-
"strictNullChecks": true,
|
|
11
|
-
"allowJs": false,
|
|
12
|
-
"allowUnreachableCode": false,
|
|
13
|
-
"allowUnusedLabels": false,
|
|
14
|
-
"noUnusedLocals": false,
|
|
15
|
-
"noUnusedParameters": false,
|
|
16
|
-
"noFallthroughCasesInSwitch": true,
|
|
17
|
-
"noImplicitAny": true,
|
|
18
|
-
"noImplicitReturns": true,
|
|
19
|
-
"noImplicitThis": true,
|
|
20
|
-
"sourceMap": true,
|
|
21
|
-
"target": "ES6",
|
|
22
|
-
"module": "commonjs",
|
|
23
|
-
"experimentalDecorators": true,
|
|
24
|
-
"paths": {
|
|
25
|
-
"@/*": [
|
|
26
|
-
"./*"
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
"plugins": [
|
|
30
|
-
{
|
|
31
|
-
"transform": "typescript-transform-paths"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"transform": "typescript-transform-paths",
|
|
35
|
-
"afterDeclarations": true
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
"typeRoots": [
|
|
40
|
-
"node_modules/@types/"
|
|
41
|
-
],
|
|
42
|
-
"exclude": [
|
|
43
|
-
"node_modules",
|
|
44
|
-
"bin",
|
|
45
|
-
".vscode"
|
|
46
|
-
]
|
|
47
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|