@studyportals/search-api-interface 1.2.2-0 → 1.2.2-1
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/.eslintignore +1 -0
- package/.eslintrc.yml +4 -0
- package/bin/package.json +31 -0
- package/{src → bin/src}/organisations/DegreeTypeEnum.js +1 -1
- package/{src → bin/src}/organisations/DegreeTypeEnum.js.map +1 -1
- package/{src → bin/src}/organisations/DeliveryMethodEnum.js +1 -1
- package/{src → bin/src}/organisations/DeliveryMethodEnum.js.map +1 -1
- package/bin/src/programmes/IProgrammeSearchFilters.d.ts +17 -0
- package/{src → bin/src}/programmes/IProgrammeSearchFilters.js.map +1 -1
- package/bin/src/programmes/ProgrammeSearchFilters.d.ts +23 -0
- package/bin/src/programmes/ProgrammeSearchFilters.js +28 -0
- package/{src → bin/src}/programmes/ProgrammeSearchFilters.js.map +1 -1
- package/bin/src/programmes/ProgrammeSearchInput.d.ts +19 -0
- package/bin/src/programmes/TuitionFeeFilterValueDTO.d.ts +4 -0
- package/bin/src/programmes/TuitionFeeFilterValueDTO.js +3 -0
- package/bin/src/programmes/TuitionFeeFilterValueDTO.js.map +1 -0
- package/index.ts +30 -0
- package/package.json +4 -2
- package/src/SearchApiClientBase.ts +10 -0
- package/src/organisations/DegreeTypeEnum.ts +7 -0
- package/src/organisations/DeliveryMethodEnum.ts +5 -0
- package/src/organisations/IOrganisationSearchFilters.ts +12 -0
- package/src/organisations/IOrganisationSearchResponse.ts +5 -0
- package/src/organisations/OrganisationSearchFilters.ts +65 -0
- package/src/organisations/OrganisationSearchInput.ts +14 -0
- package/src/organisations/SearchApiOrganisationClient.ts +42 -0
- package/src/programmes/IProgrammeSearchFilters.ts +28 -0
- package/src/programmes/IProgrammeSearchResponse.ts +5 -0
- package/src/programmes/ProgrammeSearchFilters.ts +60 -0
- package/src/programmes/ProgrammeSearchInput.ts +33 -0
- package/src/programmes/SearchApiProgrammeClient.ts +42 -0
- package/src/programmes/TuitionFeeFilterValueDTO.ts +4 -0
- package/tsconfig.json +47 -0
- package/src/programmes/IProgrammeSearchFilters.d.ts +0 -18
- package/src/programmes/ProgrammeSearchFilters.d.ts +0 -22
- package/src/programmes/ProgrammeSearchFilters.js +0 -63
- package/src/programmes/ProgrammeSearchInput.d.ts +0 -20
- /package/{index.d.ts → bin/index.d.ts} +0 -0
- /package/{index.js → bin/index.js} +0 -0
- /package/{index.js.map → bin/index.js.map} +0 -0
- /package/{src → bin/src}/SearchApiClientBase.d.ts +0 -0
- /package/{src → bin/src}/SearchApiClientBase.js +0 -0
- /package/{src → bin/src}/SearchApiClientBase.js.map +0 -0
- /package/{src → bin/src}/organisations/DegreeTypeEnum.d.ts +0 -0
- /package/{src → bin/src}/organisations/DeliveryMethodEnum.d.ts +0 -0
- /package/{src → bin/src}/organisations/IOrganisationSearchFilters.d.ts +0 -0
- /package/{src → bin/src}/organisations/IOrganisationSearchFilters.js +0 -0
- /package/{src → bin/src}/organisations/IOrganisationSearchFilters.js.map +0 -0
- /package/{src → bin/src}/organisations/IOrganisationSearchResponse.d.ts +0 -0
- /package/{src → bin/src}/organisations/IOrganisationSearchResponse.js +0 -0
- /package/{src → bin/src}/organisations/IOrganisationSearchResponse.js.map +0 -0
- /package/{src → bin/src}/organisations/OrganisationSearchFilters.d.ts +0 -0
- /package/{src → bin/src}/organisations/OrganisationSearchFilters.js +0 -0
- /package/{src → bin/src}/organisations/OrganisationSearchFilters.js.map +0 -0
- /package/{src → bin/src}/organisations/OrganisationSearchInput.d.ts +0 -0
- /package/{src → bin/src}/organisations/OrganisationSearchInput.js +0 -0
- /package/{src → bin/src}/organisations/OrganisationSearchInput.js.map +0 -0
- /package/{src → bin/src}/organisations/SearchApiOrganisationClient.d.ts +0 -0
- /package/{src → bin/src}/organisations/SearchApiOrganisationClient.js +0 -0
- /package/{src → bin/src}/organisations/SearchApiOrganisationClient.js.map +0 -0
- /package/{src → bin/src}/programmes/IProgrammeSearchFilters.js +0 -0
- /package/{src → bin/src}/programmes/IProgrammeSearchResponse.d.ts +0 -0
- /package/{src → bin/src}/programmes/IProgrammeSearchResponse.js +0 -0
- /package/{src → bin/src}/programmes/IProgrammeSearchResponse.js.map +0 -0
- /package/{src → bin/src}/programmes/ProgrammeSearchInput.js +0 -0
- /package/{src → bin/src}/programmes/ProgrammeSearchInput.js.map +0 -0
- /package/{src → bin/src}/programmes/SearchApiProgrammeClient.d.ts +0 -0
- /package/{src → bin/src}/programmes/SearchApiProgrammeClient.js +0 -0
- /package/{src → bin/src}/programmes/SearchApiProgrammeClient.js.map +0 -0
package/.eslintignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
**/bin/**
|
package/.eslintrc.yml
ADDED
package/bin/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
}
|
|
@@ -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 || (exports.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,GAAd,sBAAc,KAAd,sBAAc,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 || (exports.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,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AttendanceFilterOptionValue, DegreeTypeFilterOptionValue, DurationFilterOptionValue, EducationLevelFilterOptionValue, EducationalFormFilterOptionValue, SpecialProgrammesFilterOptionValue } from "@studyportals/search-filters";
|
|
2
|
+
import { TuitionFeeFilterValueDTO } from "./TuitionFeeFilterValueDTO";
|
|
3
|
+
export declare class IProgrammeSearchFilters {
|
|
4
|
+
readonly attendances?: AttendanceFilterOptionValue[];
|
|
5
|
+
readonly degreeTypes?: DegreeTypeFilterOptionValue[];
|
|
6
|
+
readonly disciplines?: string[];
|
|
7
|
+
readonly durations?: DurationFilterOptionValue[];
|
|
8
|
+
readonly educationalLevels?: EducationLevelFilterOptionValue[];
|
|
9
|
+
readonly educationalForms?: EducationalFormFilterOptionValue[];
|
|
10
|
+
readonly keyword?: string;
|
|
11
|
+
readonly areaIds?: string[];
|
|
12
|
+
readonly regionIds?: string[];
|
|
13
|
+
readonly countryIsoCodes?: string[];
|
|
14
|
+
readonly organisationId?: string;
|
|
15
|
+
readonly specialProgrammes?: SpecialProgrammesFilterOptionValue[];
|
|
16
|
+
readonly tuitionFee?: TuitionFeeFilterValueDTO;
|
|
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":";;;AAWA,MAAa,uBAAuB;CAgBnC;AAhBD,0DAgBC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IProgrammeSearchFilters } from "./IProgrammeSearchFilters";
|
|
2
|
+
import { ProgrammeSearchInput } from "./ProgrammeSearchInput";
|
|
3
|
+
import { AttendanceFilterOptionValue, DegreeTypeFilterOptionValue, DurationFilterOptionValue, EducationLevelFilterOptionValue, EducationalFormFilterOptionValue, SpecialProgrammesFilterOptionValue } from "@studyportals/search-filters";
|
|
4
|
+
export declare class ProgrammeSearchFilters implements IProgrammeSearchFilters {
|
|
5
|
+
attendances?: AttendanceFilterOptionValue[];
|
|
6
|
+
degreeTypes?: DegreeTypeFilterOptionValue[];
|
|
7
|
+
disciplines?: string[];
|
|
8
|
+
durations?: DurationFilterOptionValue[];
|
|
9
|
+
educationalLevels?: EducationLevelFilterOptionValue[];
|
|
10
|
+
educationalForms?: EducationalFormFilterOptionValue[];
|
|
11
|
+
keyword?: string;
|
|
12
|
+
areaIds?: string[];
|
|
13
|
+
regionIds?: string[];
|
|
14
|
+
countryIsoCodes?: string[];
|
|
15
|
+
organisationId?: string;
|
|
16
|
+
specialProgrammes?: SpecialProgrammesFilterOptionValue[];
|
|
17
|
+
tuitionFee?: {
|
|
18
|
+
min: number;
|
|
19
|
+
max: number;
|
|
20
|
+
};
|
|
21
|
+
from(input: ProgrammeSearchInput): IProgrammeSearchFilters;
|
|
22
|
+
private numbersToStringsOrUndefined;
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
numbersToStringsOrUndefined(values) {
|
|
22
|
+
if (values === undefined)
|
|
23
|
+
return;
|
|
24
|
+
return values.map(value => value.toString());
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.ProgrammeSearchFilters = ProgrammeSearchFilters;
|
|
28
|
+
//# sourceMappingURL=ProgrammeSearchFilters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgrammeSearchFilters.js","sourceRoot":"","sources":["../../../src/programmes/ProgrammeSearchFilters.ts"],"names":[],"mappings":";;;
|
|
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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AttendanceFilterOptionValue, DegreeTypeFilterOptionValue, DurationFilterOptionValue, EducationLevelFilterOptionValue, EducationalFormFilterOptionValue, SpecialProgrammesFilterOptionValue } from "@studyportals/search-filters";
|
|
2
|
+
import { TuitionFeeFilterValueDTO } from "./TuitionFeeFilterValueDTO";
|
|
3
|
+
export type ProgrammeSearchInput = {
|
|
4
|
+
resultSize: number;
|
|
5
|
+
resultOffset: number;
|
|
6
|
+
attendances?: AttendanceFilterOptionValue[];
|
|
7
|
+
degreeTypes?: DegreeTypeFilterOptionValue[];
|
|
8
|
+
disciplines?: number[];
|
|
9
|
+
durations?: DurationFilterOptionValue[];
|
|
10
|
+
educationalLevels?: EducationLevelFilterOptionValue[];
|
|
11
|
+
educationalForms?: EducationalFormFilterOptionValue[];
|
|
12
|
+
keyword: string;
|
|
13
|
+
areaIds?: number[];
|
|
14
|
+
regionIds?: number[];
|
|
15
|
+
countryIsoCodes?: string[];
|
|
16
|
+
organisationId?: number;
|
|
17
|
+
specialProgrammes?: SpecialProgrammesFilterOptionValue[];
|
|
18
|
+
tuitionFee?: TuitionFeeFilterValueDTO;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TuitionFeeFilterValueDTO.js","sourceRoot":"","sources":["../../../src/programmes/TuitionFeeFilterValueDTO.ts"],"names":[],"mappings":""}
|
package/index.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
}
|
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-1",
|
|
4
4
|
"description": "Typescript library containing resources that facilitate integration with SearchApi",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,5 +25,7 @@
|
|
|
25
25
|
"typescript": "^4.7.3",
|
|
26
26
|
"typescript-transform-paths": "^3.4.6"
|
|
27
27
|
},
|
|
28
|
-
"dependencies": {
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@studyportals/search-filters": "^4.3.0"
|
|
30
|
+
}
|
|
29
31
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
}
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
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
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
};
|
|
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
|
|
File without changes
|
|
File without changes
|