@studyportals/domain-client 3.6.0-0 → 3.6.0-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/index.d.ts +45 -45
- package/index.js +27 -27
- package/package.json +1 -1
- package/src/domain-client.d.ts +14 -14
- package/src/domain-client.js +60 -60
- package/src/exceptions/bad-request-exception.d.ts +2 -2
- package/src/exceptions/bad-request-exception.js +6 -6
- package/src/exceptions/client-exception.d.ts +2 -2
- package/src/exceptions/client-exception.js +6 -6
- package/src/exceptions/internal-server-exception.d.ts +2 -2
- package/src/exceptions/internal-server-exception.js +6 -6
- package/src/exceptions/not-found-exception.d.ts +2 -2
- package/src/exceptions/not-found-exception.js +6 -6
- package/src/exceptions/property-not-available-exception.d.ts +2 -2
- package/src/exceptions/property-not-available-exception.js +6 -6
- package/src/factories/DateFactory.d.ts +5 -5
- package/src/factories/DateFactory.js +9 -9
- package/src/factories/InternalLinkFactory.d.ts +9 -9
- package/src/factories/InternalLinkFactory.js +19 -19
- package/src/i-api-response.d.ts +6 -6
- package/src/i-api-response.js +2 -2
- package/src/i-class-factory.d.ts +4 -4
- package/src/i-class-factory.js +2 -2
- package/src/i-model-description.d.ts +7 -7
- package/src/i-model-description.js +9 -9
- package/src/model-client.d.ts +16 -16
- package/src/model-client.js +45 -45
- package/src/model-factory.d.ts +11 -11
- package/src/model-factory.js +71 -71
- package/src/models/bestfit-programme/bestfit-programme-client.d.ts +7 -7
- package/src/models/bestfit-programme/bestfit-programme-client.js +16 -16
- package/src/models/bestfit-programme/i-best-fit-programme.d.ts +82 -82
- package/src/models/bestfit-programme/i-best-fit-programme.js +2 -2
- package/src/models/bestfit-programme/i-g-p-a-requirement.d.ts +20 -20
- package/src/models/bestfit-programme/i-g-p-a-requirement.js +2 -2
- package/src/models/bestfit-programme/i-living-cost.d.ts +20 -20
- package/src/models/bestfit-programme/i-living-cost.js +2 -2
- package/src/models/common/i-city.d.ts +14 -14
- package/src/models/common/i-city.js +2 -2
- package/src/models/common/i-country.d.ts +14 -14
- package/src/models/common/i-country.js +2 -2
- package/src/models/common/i-english-requirements.d.ts +30 -30
- package/src/models/common/i-english-requirements.js +2 -2
- package/src/models/common/i-internal-link.d.ts +28 -28
- package/src/models/common/i-internal-link.js +2 -2
- package/src/models/common/i-logo.d.ts +14 -14
- package/src/models/common/i-logo.js +2 -2
- package/src/models/common/i-tuition-fee.d.ts +50 -50
- package/src/models/common/i-tuition-fee.js +2 -2
- package/src/models/dotdigital-organisation/dotdigital-organisation-client.d.ts +7 -7
- package/src/models/dotdigital-organisation/dotdigital-organisation-client.js +16 -16
- package/src/models/dotdigital-organisation/i-dot-digital-organisation.d.ts +31 -30
- package/src/models/dotdigital-organisation/i-dot-digital-organisation.js +2 -2
- package/src/models/dotdigital-organisation/i-review.d.ts +7 -7
- package/src/models/dotdigital-organisation/i-review.js +2 -2
- package/src/models/dotdigital-programme/dotdigital-programme-client.d.ts +7 -7
- package/src/models/dotdigital-programme/dotdigital-programme-client.js +16 -16
- package/src/models/dotdigital-programme/i-dot-digital-programme.d.ts +89 -89
- package/src/models/dotdigital-programme/i-dot-digital-programme.js +2 -2
- package/src/models/programme-card/i-click-tracking-data.d.ts +5 -5
- package/src/models/programme-card/i-click-tracking-data.js +2 -2
- package/src/models/programme-card/i-cover.d.ts +14 -14
- package/src/models/programme-card/i-cover.js +2 -2
- package/src/models/programme-card/i-deadline.d.ts +20 -20
- package/src/models/programme-card/i-deadline.js +2 -2
- package/src/models/programme-card/i-duration.d.ts +40 -40
- package/src/models/programme-card/i-duration.js +2 -2
- package/src/models/programme-card/i-link.d.ts +22 -22
- package/src/models/programme-card/i-link.js +2 -2
- package/src/models/programme-card/i-location.d.ts +7 -7
- package/src/models/programme-card/i-location.js +2 -2
- package/src/models/programme-card/i-optional-link.d.ts +23 -23
- package/src/models/programme-card/i-optional-link.js +2 -2
- package/src/models/programme-card/i-programme-card.d.ts +126 -126
- package/src/models/programme-card/i-programme-card.js +2 -2
- package/src/models/programme-card/i-start-date.d.ts +33 -33
- package/src/models/programme-card/i-start-date.js +2 -2
- package/src/models/programme-card/i-timing.d.ts +45 -45
- package/src/models/programme-card/i-timing.js +2 -2
- package/src/models/programme-card/i-tracked-link.d.ts +29 -29
- package/src/models/programme-card/i-tracked-link.js +2 -2
- package/src/models/programme-card/i-tracking.d.ts +46 -46
- package/src/models/programme-card/i-tracking.js +2 -2
- package/src/models/programme-card/programme-card-client.d.ts +7 -7
- package/src/models/programme-card/programme-card-client.js +16 -16
- package/src/models/search-country-faq/i-search-country-faq.d.ts +18 -18
- package/src/models/search-country-faq/i-search-country-faq.js +2 -2
- package/src/models/search-country-faq/public-search-country-faq-client.d.ts +7 -7
- package/src/models/search-country-faq/public-search-country-faq-client.js +16 -16
- package/src/models/search-projection/i-geo-targeting-configuration.d.ts +38 -38
- package/src/models/search-projection/i-geo-targeting-configuration.js +2 -2
- package/src/models/search-projection/i-geo-targeting-values.d.ts +30 -30
- package/src/models/search-projection/i-geo-targeting-values.js +2 -2
- package/src/models/search-projection/i-organisation-values.d.ts +40 -40
- package/src/models/search-projection/i-organisation-values.js +2 -2
- package/src/models/search-projection/i-premium-values.d.ts +35 -35
- package/src/models/search-projection/i-premium-values.js +2 -2
- package/src/models/search-projection/i-search-projection.d.ts +180 -180
- package/src/models/search-projection/i-search-projection.js +2 -2
- package/src/models/search-projection/i-tuition-values.d.ts +50 -50
- package/src/models/search-projection/i-tuition-values.js +2 -2
- package/src/models/search-projection/search-projection-client.d.ts +7 -7
- package/src/models/search-projection/search-projection-client.js +16 -16
- package/src/types/portal-map.d.ts +2 -2
- package/src/types/portal-map.js +2 -2
- package/src/types/portal-type.d.ts +7 -7
- package/src/types/portal-type.js +11 -11
- package/src/types.d.ts +4 -4
- package/src/types.js +2 -2
package/src/model-client.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { IModelDescription } from "./i-model-description";
|
|
2
|
-
import { PortalMap } from "./types/portal-map";
|
|
3
|
-
export declare abstract class ModelClient<T> {
|
|
4
|
-
private readonly domainClient;
|
|
5
|
-
private readonly modelFactory;
|
|
6
|
-
constructor(baseUrl?: string, apiKey?: string, seed?: number, portalMap?: PortalMap);
|
|
7
|
-
fetch(id: number): Promise<T>;
|
|
8
|
-
fetchDescription(id: number): Promise<IModelDescription>;
|
|
9
|
-
fetchMultiple(ids: number[]): Promise<T[]>;
|
|
10
|
-
fetchMultipleDescriptions(ids: number[]): Promise<IModelDescription[]>;
|
|
11
|
-
fromDescription(description: IModelDescription): T;
|
|
12
|
-
fromDescriptions(descriptions: IModelDescription[]): T[];
|
|
13
|
-
protected abstract getModelName(): string;
|
|
14
|
-
protected abstract getVersion(): string;
|
|
15
|
-
abstract isPublic(): boolean;
|
|
16
|
-
}
|
|
1
|
+
import { IModelDescription } from "./i-model-description";
|
|
2
|
+
import { PortalMap } from "./types/portal-map";
|
|
3
|
+
export declare abstract class ModelClient<T> {
|
|
4
|
+
private readonly domainClient;
|
|
5
|
+
private readonly modelFactory;
|
|
6
|
+
constructor(baseUrl?: string, apiKey?: string, seed?: number, portalMap?: PortalMap);
|
|
7
|
+
fetch(id: number): Promise<T>;
|
|
8
|
+
fetchDescription(id: number): Promise<IModelDescription>;
|
|
9
|
+
fetchMultiple(ids: number[]): Promise<T[]>;
|
|
10
|
+
fetchMultipleDescriptions(ids: number[]): Promise<IModelDescription[]>;
|
|
11
|
+
fromDescription(description: IModelDescription): T;
|
|
12
|
+
fromDescriptions(descriptions: IModelDescription[]): T[];
|
|
13
|
+
protected abstract getModelName(): string;
|
|
14
|
+
protected abstract getVersion(): string;
|
|
15
|
+
abstract isPublic(): boolean;
|
|
16
|
+
}
|
package/src/model-client.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModelClient = void 0;
|
|
4
|
-
const domain_client_1 = require("./domain-client");
|
|
5
|
-
const client_exception_1 = require("./exceptions/client-exception");
|
|
6
|
-
const model_factory_1 = require("./model-factory");
|
|
7
|
-
class ModelClient {
|
|
8
|
-
constructor(baseUrl, apiKey, seed, portalMap) {
|
|
9
|
-
if (!baseUrl || !seed) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
this.modelFactory = new model_factory_1.ModelFactory(portalMap);
|
|
13
|
-
this.domainClient = new domain_client_1.DomainClient(baseUrl, apiKey, this.getModelName(), this.getVersion(), this.isPublic(), seed);
|
|
14
|
-
}
|
|
15
|
-
async fetch(id) {
|
|
16
|
-
const modelDescriptions = await this.fetchDescription(id);
|
|
17
|
-
return this.modelFactory.fromDescription(modelDescriptions);
|
|
18
|
-
}
|
|
19
|
-
async fetchDescription(id) {
|
|
20
|
-
if (!this.domainClient) {
|
|
21
|
-
throw new client_exception_1.ClientException("Offline mode active: did you provide all parameters " +
|
|
22
|
-
"in the constructor?");
|
|
23
|
-
}
|
|
24
|
-
const result = await this.domainClient.doRequest([id]);
|
|
25
|
-
return result[0];
|
|
26
|
-
}
|
|
27
|
-
async fetchMultiple(ids) {
|
|
28
|
-
const descriptions = await this.fetchMultipleDescriptions(ids);
|
|
29
|
-
return this.modelFactory.fromDescriptions(descriptions);
|
|
30
|
-
}
|
|
31
|
-
async fetchMultipleDescriptions(ids) {
|
|
32
|
-
if (!this.domainClient) {
|
|
33
|
-
throw new client_exception_1.ClientException('Offline mode active: did you provide all parameters ' +
|
|
34
|
-
'in the constructor?');
|
|
35
|
-
}
|
|
36
|
-
return await this.domainClient.doRequest(ids);
|
|
37
|
-
}
|
|
38
|
-
fromDescription(description) {
|
|
39
|
-
return this.modelFactory.fromDescription(description);
|
|
40
|
-
}
|
|
41
|
-
fromDescriptions(descriptions) {
|
|
42
|
-
return this.modelFactory.fromDescriptions(descriptions);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.ModelClient = ModelClient;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModelClient = void 0;
|
|
4
|
+
const domain_client_1 = require("./domain-client");
|
|
5
|
+
const client_exception_1 = require("./exceptions/client-exception");
|
|
6
|
+
const model_factory_1 = require("./model-factory");
|
|
7
|
+
class ModelClient {
|
|
8
|
+
constructor(baseUrl, apiKey, seed, portalMap) {
|
|
9
|
+
if (!baseUrl || !seed) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
this.modelFactory = new model_factory_1.ModelFactory(portalMap);
|
|
13
|
+
this.domainClient = new domain_client_1.DomainClient(baseUrl, apiKey, this.getModelName(), this.getVersion(), this.isPublic(), seed);
|
|
14
|
+
}
|
|
15
|
+
async fetch(id) {
|
|
16
|
+
const modelDescriptions = await this.fetchDescription(id);
|
|
17
|
+
return this.modelFactory.fromDescription(modelDescriptions);
|
|
18
|
+
}
|
|
19
|
+
async fetchDescription(id) {
|
|
20
|
+
if (!this.domainClient) {
|
|
21
|
+
throw new client_exception_1.ClientException("Offline mode active: did you provide all parameters " +
|
|
22
|
+
"in the constructor?");
|
|
23
|
+
}
|
|
24
|
+
const result = await this.domainClient.doRequest([id]);
|
|
25
|
+
return result[0];
|
|
26
|
+
}
|
|
27
|
+
async fetchMultiple(ids) {
|
|
28
|
+
const descriptions = await this.fetchMultipleDescriptions(ids);
|
|
29
|
+
return this.modelFactory.fromDescriptions(descriptions);
|
|
30
|
+
}
|
|
31
|
+
async fetchMultipleDescriptions(ids) {
|
|
32
|
+
if (!this.domainClient) {
|
|
33
|
+
throw new client_exception_1.ClientException('Offline mode active: did you provide all parameters ' +
|
|
34
|
+
'in the constructor?');
|
|
35
|
+
}
|
|
36
|
+
return await this.domainClient.doRequest(ids);
|
|
37
|
+
}
|
|
38
|
+
fromDescription(description) {
|
|
39
|
+
return this.modelFactory.fromDescription(description);
|
|
40
|
+
}
|
|
41
|
+
fromDescriptions(descriptions) {
|
|
42
|
+
return this.modelFactory.fromDescriptions(descriptions);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.ModelClient = ModelClient;
|
|
46
46
|
//# sourceMappingURL=model-client.js.map
|
package/src/model-factory.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IModelDescription } from "./i-model-description";
|
|
2
|
-
import { PortalMap } from "./types/portal-map";
|
|
3
|
-
export declare class ModelFactory<T> {
|
|
4
|
-
private customClassFactories;
|
|
5
|
-
constructor(portalMap?: PortalMap);
|
|
6
|
-
fromDescription(data: IModelDescription): T;
|
|
7
|
-
fromDescriptions(data: IModelDescription[]): T[];
|
|
8
|
-
private unpackClass;
|
|
9
|
-
private getCallable;
|
|
10
|
-
private unpackArray;
|
|
11
|
-
}
|
|
1
|
+
import { IModelDescription } from "./i-model-description";
|
|
2
|
+
import { PortalMap } from "./types/portal-map";
|
|
3
|
+
export declare class ModelFactory<T> {
|
|
4
|
+
private customClassFactories;
|
|
5
|
+
constructor(portalMap?: PortalMap);
|
|
6
|
+
fromDescription(data: IModelDescription): T;
|
|
7
|
+
fromDescriptions(data: IModelDescription[]): T[];
|
|
8
|
+
private unpackClass;
|
|
9
|
+
private getCallable;
|
|
10
|
+
private unpackArray;
|
|
11
|
+
}
|
package/src/model-factory.js
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModelFactory = void 0;
|
|
4
|
-
const InternalLinkFactory_1 = require("./factories/InternalLinkFactory");
|
|
5
|
-
const DateFactory_1 = require("./factories/DateFactory");
|
|
6
|
-
const i_model_description_1 = require("./i-model-description");
|
|
7
|
-
const property_not_available_exception_1 = require("./exceptions/property-not-available-exception");
|
|
8
|
-
class ModelFactory {
|
|
9
|
-
constructor(portalMap = new Map()) {
|
|
10
|
-
const factories = new Map();
|
|
11
|
-
factories.set('IInternalLink', new InternalLinkFactory_1.InternalLinkFactory(portalMap));
|
|
12
|
-
factories.set('SerializableDateTime', new DateFactory_1.DateFactory());
|
|
13
|
-
this.customClassFactories = factories;
|
|
14
|
-
}
|
|
15
|
-
fromDescription(data) {
|
|
16
|
-
return this.unpackClass(data);
|
|
17
|
-
}
|
|
18
|
-
fromDescriptions(data) {
|
|
19
|
-
const models = [];
|
|
20
|
-
for (const modelDescription of data) {
|
|
21
|
-
models.push(this.unpackClass(modelDescription));
|
|
22
|
-
}
|
|
23
|
-
return models;
|
|
24
|
-
}
|
|
25
|
-
unpackClass(data) {
|
|
26
|
-
const unpacked = {};
|
|
27
|
-
for (const functionName in data.func) {
|
|
28
|
-
unpacked[functionName] = this.getCallable(functionName, data);
|
|
29
|
-
}
|
|
30
|
-
const factory = this.customClassFactories.get(data.class);
|
|
31
|
-
if (factory !== undefined) {
|
|
32
|
-
return factory.create(unpacked, data.parameters);
|
|
33
|
-
}
|
|
34
|
-
return unpacked;
|
|
35
|
-
}
|
|
36
|
-
getCallable(functionName, data) {
|
|
37
|
-
const propertyName = functionName.substr(3);
|
|
38
|
-
const canShowFunction = 'canShow' + propertyName;
|
|
39
|
-
const value = data.func[functionName];
|
|
40
|
-
let returnValue;
|
|
41
|
-
if (i_model_description_1.isModelDescription(value)) {
|
|
42
|
-
returnValue = this.unpackClass(value);
|
|
43
|
-
}
|
|
44
|
-
else if (Array.isArray(value)) {
|
|
45
|
-
returnValue = this.unpackArray(value);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
returnValue = value;
|
|
49
|
-
}
|
|
50
|
-
if (canShowFunction in data.func) {
|
|
51
|
-
return () => {
|
|
52
|
-
if (data.func[canShowFunction] === false) {
|
|
53
|
-
throw new property_not_available_exception_1.PropertyNotAvailableException(`Property '${propertyName}' not available`);
|
|
54
|
-
}
|
|
55
|
-
return returnValue;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
return () => {
|
|
59
|
-
return returnValue;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
unpackArray(list) {
|
|
63
|
-
return list.map(item => {
|
|
64
|
-
if (i_model_description_1.isModelDescription(item)) {
|
|
65
|
-
return this.unpackClass(item);
|
|
66
|
-
}
|
|
67
|
-
return item;
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
exports.ModelFactory = ModelFactory;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModelFactory = void 0;
|
|
4
|
+
const InternalLinkFactory_1 = require("./factories/InternalLinkFactory");
|
|
5
|
+
const DateFactory_1 = require("./factories/DateFactory");
|
|
6
|
+
const i_model_description_1 = require("./i-model-description");
|
|
7
|
+
const property_not_available_exception_1 = require("./exceptions/property-not-available-exception");
|
|
8
|
+
class ModelFactory {
|
|
9
|
+
constructor(portalMap = new Map()) {
|
|
10
|
+
const factories = new Map();
|
|
11
|
+
factories.set('IInternalLink', new InternalLinkFactory_1.InternalLinkFactory(portalMap));
|
|
12
|
+
factories.set('SerializableDateTime', new DateFactory_1.DateFactory());
|
|
13
|
+
this.customClassFactories = factories;
|
|
14
|
+
}
|
|
15
|
+
fromDescription(data) {
|
|
16
|
+
return this.unpackClass(data);
|
|
17
|
+
}
|
|
18
|
+
fromDescriptions(data) {
|
|
19
|
+
const models = [];
|
|
20
|
+
for (const modelDescription of data) {
|
|
21
|
+
models.push(this.unpackClass(modelDescription));
|
|
22
|
+
}
|
|
23
|
+
return models;
|
|
24
|
+
}
|
|
25
|
+
unpackClass(data) {
|
|
26
|
+
const unpacked = {};
|
|
27
|
+
for (const functionName in data.func) {
|
|
28
|
+
unpacked[functionName] = this.getCallable(functionName, data);
|
|
29
|
+
}
|
|
30
|
+
const factory = this.customClassFactories.get(data.class);
|
|
31
|
+
if (factory !== undefined) {
|
|
32
|
+
return factory.create(unpacked, data.parameters);
|
|
33
|
+
}
|
|
34
|
+
return unpacked;
|
|
35
|
+
}
|
|
36
|
+
getCallable(functionName, data) {
|
|
37
|
+
const propertyName = functionName.substr(3);
|
|
38
|
+
const canShowFunction = 'canShow' + propertyName;
|
|
39
|
+
const value = data.func[functionName];
|
|
40
|
+
let returnValue;
|
|
41
|
+
if (i_model_description_1.isModelDescription(value)) {
|
|
42
|
+
returnValue = this.unpackClass(value);
|
|
43
|
+
}
|
|
44
|
+
else if (Array.isArray(value)) {
|
|
45
|
+
returnValue = this.unpackArray(value);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
returnValue = value;
|
|
49
|
+
}
|
|
50
|
+
if (canShowFunction in data.func) {
|
|
51
|
+
return () => {
|
|
52
|
+
if (data.func[canShowFunction] === false) {
|
|
53
|
+
throw new property_not_available_exception_1.PropertyNotAvailableException(`Property '${propertyName}' not available`);
|
|
54
|
+
}
|
|
55
|
+
return returnValue;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
return () => {
|
|
59
|
+
return returnValue;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
unpackArray(list) {
|
|
63
|
+
return list.map(item => {
|
|
64
|
+
if (i_model_description_1.isModelDescription(item)) {
|
|
65
|
+
return this.unpackClass(item);
|
|
66
|
+
}
|
|
67
|
+
return item;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.ModelFactory = ModelFactory;
|
|
72
72
|
//# sourceMappingURL=model-factory.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IBestFitProgramme } from "../../..";
|
|
2
|
-
import { ModelClient } from "../../model-client";
|
|
3
|
-
export declare class BestfitProgrammeClient extends ModelClient<IBestFitProgramme> {
|
|
4
|
-
protected getModelName(): string;
|
|
5
|
-
protected getVersion(): string;
|
|
6
|
-
isPublic(): boolean;
|
|
7
|
-
}
|
|
1
|
+
import { IBestFitProgramme } from "../../..";
|
|
2
|
+
import { ModelClient } from "../../model-client";
|
|
3
|
+
export declare class BestfitProgrammeClient extends ModelClient<IBestFitProgramme> {
|
|
4
|
+
protected getModelName(): string;
|
|
5
|
+
protected getVersion(): string;
|
|
6
|
+
isPublic(): boolean;
|
|
7
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BestfitProgrammeClient = void 0;
|
|
4
|
-
const model_client_1 = require("../../model-client");
|
|
5
|
-
class BestfitProgrammeClient extends model_client_1.ModelClient {
|
|
6
|
-
getModelName() {
|
|
7
|
-
return 'bestfit-programme';
|
|
8
|
-
}
|
|
9
|
-
getVersion() {
|
|
10
|
-
return 'v1';
|
|
11
|
-
}
|
|
12
|
-
isPublic() {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.BestfitProgrammeClient = BestfitProgrammeClient;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BestfitProgrammeClient = void 0;
|
|
4
|
+
const model_client_1 = require("../../model-client");
|
|
5
|
+
class BestfitProgrammeClient extends model_client_1.ModelClient {
|
|
6
|
+
getModelName() {
|
|
7
|
+
return 'bestfit-programme';
|
|
8
|
+
}
|
|
9
|
+
getVersion() {
|
|
10
|
+
return 'v1';
|
|
11
|
+
}
|
|
12
|
+
isPublic() {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.BestfitProgrammeClient = BestfitProgrammeClient;
|
|
17
17
|
//# sourceMappingURL=bestfit-programme-client.js.map
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import { ICity, IEnglishRequirements, IGPARequirement, ILivingCost, ITuitionFee } from "../../..";
|
|
2
|
-
export interface IBestFitProgramme {
|
|
3
|
-
/**
|
|
4
|
-
* Average university ranking across multiple ranking institutes.
|
|
5
|
-
*
|
|
6
|
-
* @return number
|
|
7
|
-
*/
|
|
8
|
-
getAverageRankingPosition(): number;
|
|
9
|
-
canShowAverageRankingPosition(): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* City which programme is given in
|
|
12
|
-
*
|
|
13
|
-
* @return ICity
|
|
14
|
-
*/
|
|
15
|
-
getCity(): ICity;
|
|
16
|
-
/**
|
|
17
|
-
* Get country id the programme is teached in
|
|
18
|
-
*
|
|
19
|
-
* @return number
|
|
20
|
-
*/
|
|
21
|
-
getCountryId(): number;
|
|
22
|
-
/**
|
|
23
|
-
* Discipline ids which the program is linked to.
|
|
24
|
-
*
|
|
25
|
-
* @return number[]
|
|
26
|
-
*/
|
|
27
|
-
getDisciplineIds(): number[];
|
|
28
|
-
canShowDisciplineIds(): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* English level requirements.
|
|
31
|
-
*
|
|
32
|
-
* @return IEnglishRequirements
|
|
33
|
-
*/
|
|
34
|
-
getEnglishRequirements(): IEnglishRequirements;
|
|
35
|
-
/**
|
|
36
|
-
* GPA requirements
|
|
37
|
-
*
|
|
38
|
-
* @return IGPARequirement
|
|
39
|
-
*/
|
|
40
|
-
getGPA(): IGPARequirement;
|
|
41
|
-
canShowGPA(): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Id of the programme.
|
|
44
|
-
*
|
|
45
|
-
* @return number
|
|
46
|
-
*/
|
|
47
|
-
getId(): number;
|
|
48
|
-
/**
|
|
49
|
-
* Estimated living cost based on universities location.
|
|
50
|
-
*
|
|
51
|
-
* @return ILivingCost
|
|
52
|
-
*/
|
|
53
|
-
getLivingCost(): ILivingCost;
|
|
54
|
-
canShowLivingCost(): boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Minimum required education level
|
|
57
|
-
*
|
|
58
|
-
* @return string
|
|
59
|
-
*/
|
|
60
|
-
getRequiredEducationalLevel(): string;
|
|
61
|
-
canShowRequiredEducationalLevel(): boolean;
|
|
62
|
-
/**
|
|
63
|
-
* The programmes tuition fees
|
|
64
|
-
*
|
|
65
|
-
* @return ITuitionFee[]
|
|
66
|
-
*/
|
|
67
|
-
getTuitionFees(): ITuitionFee[];
|
|
68
|
-
canShowTuitionFees(): boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Amount of years required as work experience
|
|
71
|
-
*
|
|
72
|
-
* @return number
|
|
73
|
-
*/
|
|
74
|
-
getWorkExperienceYears(): number;
|
|
75
|
-
canShowWorkExperienceYears(): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Indicates whenever a programme is fully online or not
|
|
78
|
-
*
|
|
79
|
-
* @return boolean
|
|
80
|
-
*/
|
|
81
|
-
isFullyOnline(): boolean;
|
|
82
|
-
}
|
|
1
|
+
import { ICity, IEnglishRequirements, IGPARequirement, ILivingCost, ITuitionFee } from "../../..";
|
|
2
|
+
export interface IBestFitProgramme {
|
|
3
|
+
/**
|
|
4
|
+
* Average university ranking across multiple ranking institutes.
|
|
5
|
+
*
|
|
6
|
+
* @return number
|
|
7
|
+
*/
|
|
8
|
+
getAverageRankingPosition(): number;
|
|
9
|
+
canShowAverageRankingPosition(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* City which programme is given in
|
|
12
|
+
*
|
|
13
|
+
* @return ICity
|
|
14
|
+
*/
|
|
15
|
+
getCity(): ICity;
|
|
16
|
+
/**
|
|
17
|
+
* Get country id the programme is teached in
|
|
18
|
+
*
|
|
19
|
+
* @return number
|
|
20
|
+
*/
|
|
21
|
+
getCountryId(): number;
|
|
22
|
+
/**
|
|
23
|
+
* Discipline ids which the program is linked to.
|
|
24
|
+
*
|
|
25
|
+
* @return number[]
|
|
26
|
+
*/
|
|
27
|
+
getDisciplineIds(): number[];
|
|
28
|
+
canShowDisciplineIds(): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* English level requirements.
|
|
31
|
+
*
|
|
32
|
+
* @return IEnglishRequirements
|
|
33
|
+
*/
|
|
34
|
+
getEnglishRequirements(): IEnglishRequirements;
|
|
35
|
+
/**
|
|
36
|
+
* GPA requirements
|
|
37
|
+
*
|
|
38
|
+
* @return IGPARequirement
|
|
39
|
+
*/
|
|
40
|
+
getGPA(): IGPARequirement;
|
|
41
|
+
canShowGPA(): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Id of the programme.
|
|
44
|
+
*
|
|
45
|
+
* @return number
|
|
46
|
+
*/
|
|
47
|
+
getId(): number;
|
|
48
|
+
/**
|
|
49
|
+
* Estimated living cost based on universities location.
|
|
50
|
+
*
|
|
51
|
+
* @return ILivingCost
|
|
52
|
+
*/
|
|
53
|
+
getLivingCost(): ILivingCost;
|
|
54
|
+
canShowLivingCost(): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Minimum required education level
|
|
57
|
+
*
|
|
58
|
+
* @return string
|
|
59
|
+
*/
|
|
60
|
+
getRequiredEducationalLevel(): string;
|
|
61
|
+
canShowRequiredEducationalLevel(): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* The programmes tuition fees
|
|
64
|
+
*
|
|
65
|
+
* @return ITuitionFee[]
|
|
66
|
+
*/
|
|
67
|
+
getTuitionFees(): ITuitionFee[];
|
|
68
|
+
canShowTuitionFees(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Amount of years required as work experience
|
|
71
|
+
*
|
|
72
|
+
* @return number
|
|
73
|
+
*/
|
|
74
|
+
getWorkExperienceYears(): number;
|
|
75
|
+
canShowWorkExperienceYears(): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Indicates whenever a programme is fully online or not
|
|
78
|
+
*
|
|
79
|
+
* @return boolean
|
|
80
|
+
*/
|
|
81
|
+
isFullyOnline(): boolean;
|
|
82
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=i-best-fit-programme.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export interface IGPARequirement {
|
|
2
|
-
/**
|
|
3
|
-
* The used GPA scale for this requirement
|
|
4
|
-
*
|
|
5
|
-
* @return string
|
|
6
|
-
*/
|
|
7
|
-
getScale(): string;
|
|
8
|
-
/**
|
|
9
|
-
* Required minimum score.
|
|
10
|
-
*
|
|
11
|
-
* @return string
|
|
12
|
-
*/
|
|
13
|
-
getScore(): string;
|
|
14
|
-
/**
|
|
15
|
-
* Is GPA recommended or required.
|
|
16
|
-
*
|
|
17
|
-
* @return boolean
|
|
18
|
-
*/
|
|
19
|
-
isRequired(): boolean;
|
|
20
|
-
}
|
|
1
|
+
export interface IGPARequirement {
|
|
2
|
+
/**
|
|
3
|
+
* The used GPA scale for this requirement
|
|
4
|
+
*
|
|
5
|
+
* @return string
|
|
6
|
+
*/
|
|
7
|
+
getScale(): string;
|
|
8
|
+
/**
|
|
9
|
+
* Required minimum score.
|
|
10
|
+
*
|
|
11
|
+
* @return string
|
|
12
|
+
*/
|
|
13
|
+
getScore(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Is GPA recommended or required.
|
|
16
|
+
*
|
|
17
|
+
* @return boolean
|
|
18
|
+
*/
|
|
19
|
+
isRequired(): boolean;
|
|
20
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=i-g-p-a-requirement.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export interface ILivingCost {
|
|
2
|
-
/**
|
|
3
|
-
* Get the applicable currency.
|
|
4
|
-
*
|
|
5
|
-
* @return string
|
|
6
|
-
*/
|
|
7
|
-
getCurrency(): string;
|
|
8
|
-
/**
|
|
9
|
-
* Get the maximum living cost in the provided currency.
|
|
10
|
-
*
|
|
11
|
-
* @return number
|
|
12
|
-
*/
|
|
13
|
-
getMax(): number;
|
|
14
|
-
/**
|
|
15
|
-
* Get the minimum living cost in the provided currency.
|
|
16
|
-
*
|
|
17
|
-
* @return number
|
|
18
|
-
*/
|
|
19
|
-
getMin(): number;
|
|
20
|
-
}
|
|
1
|
+
export interface ILivingCost {
|
|
2
|
+
/**
|
|
3
|
+
* Get the applicable currency.
|
|
4
|
+
*
|
|
5
|
+
* @return string
|
|
6
|
+
*/
|
|
7
|
+
getCurrency(): string;
|
|
8
|
+
/**
|
|
9
|
+
* Get the maximum living cost in the provided currency.
|
|
10
|
+
*
|
|
11
|
+
* @return number
|
|
12
|
+
*/
|
|
13
|
+
getMax(): number;
|
|
14
|
+
/**
|
|
15
|
+
* Get the minimum living cost in the provided currency.
|
|
16
|
+
*
|
|
17
|
+
* @return number
|
|
18
|
+
*/
|
|
19
|
+
getMin(): number;
|
|
20
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=i-living-cost.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export interface ICity {
|
|
2
|
-
/**
|
|
3
|
-
* Get city id
|
|
4
|
-
*
|
|
5
|
-
* @return number
|
|
6
|
-
*/
|
|
7
|
-
getId(): number;
|
|
8
|
-
/**
|
|
9
|
-
* Get city name
|
|
10
|
-
*
|
|
11
|
-
* @return string
|
|
12
|
-
*/
|
|
13
|
-
getName(): string;
|
|
14
|
-
}
|
|
1
|
+
export interface ICity {
|
|
2
|
+
/**
|
|
3
|
+
* Get city id
|
|
4
|
+
*
|
|
5
|
+
* @return number
|
|
6
|
+
*/
|
|
7
|
+
getId(): number;
|
|
8
|
+
/**
|
|
9
|
+
* Get city name
|
|
10
|
+
*
|
|
11
|
+
* @return string
|
|
12
|
+
*/
|
|
13
|
+
getName(): string;
|
|
14
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=i-city.js.map
|