@studyportals/domain-client 6.0.0 → 6.1.0-beta.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.
Files changed (78) hide show
  1. package/package.json +50 -52
  2. package/src/models/organisation-search-document/i-organisation-search-document.d.ts +30 -0
  3. package/src/models/bestfit-programme/i-english-requirements.d.ts +0 -51
  4. package/src/models/bestfit-programme/i-english-requirements.js +0 -1
  5. package/src/models/bestfit-programme/i-g-p-a-requirement.d.ts +0 -20
  6. package/src/models/bestfit-programme/i-g-p-a-requirement.js +0 -1
  7. package/src/models/bestfit-programme/i-tuition-fee.d.ts +0 -50
  8. package/src/models/bestfit-programme/i-tuition-fee.js +0 -1
  9. package/src/models/compare-programme/i-english-requirements.d.ts +0 -51
  10. package/src/models/compare-programme/i-english-requirements.js +0 -1
  11. package/src/models/compare-programme/i-g-p-a-requirement.d.ts +0 -20
  12. package/src/models/compare-programme/i-g-p-a-requirement.js +0 -1
  13. package/src/models/compare-programme/i-living-cost.d.ts +0 -20
  14. package/src/models/compare-programme/i-living-cost.js +0 -1
  15. package/src/models/copilot-programme/i-deadline.d.ts +0 -20
  16. package/src/models/copilot-programme/i-deadline.js +0 -1
  17. package/src/models/copilot-programme/i-english-requirements.d.ts +0 -51
  18. package/src/models/copilot-programme/i-english-requirements.js +0 -1
  19. package/src/models/copilot-programme/i-g-p-a-requirement.d.ts +0 -20
  20. package/src/models/copilot-programme/i-g-p-a-requirement.js +0 -1
  21. package/src/models/copilot-programme/i-geo-targeting-configuration.d.ts +0 -38
  22. package/src/models/copilot-programme/i-geo-targeting-configuration.js +0 -1
  23. package/src/models/copilot-programme/i-geo-targeting-values.d.ts +0 -30
  24. package/src/models/copilot-programme/i-geo-targeting-values.js +0 -1
  25. package/src/models/copilot-programme/i-internal-link.d.ts +0 -28
  26. package/src/models/copilot-programme/i-internal-link.js +0 -1
  27. package/src/models/copilot-programme/i-link.d.ts +0 -22
  28. package/src/models/copilot-programme/i-link.js +0 -1
  29. package/src/models/copilot-programme/i-living-cost.d.ts +0 -20
  30. package/src/models/copilot-programme/i-living-cost.js +0 -1
  31. package/src/models/copilot-programme/i-start-date.d.ts +0 -33
  32. package/src/models/copilot-programme/i-start-date.js +0 -1
  33. package/src/models/copilot-programme/i-timing.d.ts +0 -45
  34. package/src/models/copilot-programme/i-timing.js +0 -1
  35. package/src/models/copilot-programme/i-tuition-values.d.ts +0 -50
  36. package/src/models/copilot-programme/i-tuition-values.js +0 -1
  37. package/src/models/customerio-organisation/i-city.d.ts +0 -14
  38. package/src/models/customerio-organisation/i-city.js +0 -1
  39. package/src/models/customerio-organisation/i-country.d.ts +0 -20
  40. package/src/models/customerio-organisation/i-country.js +0 -1
  41. package/src/models/customerio-organisation/i-customer-i-o-organisation.d.ts +0 -35
  42. package/src/models/customerio-organisation/i-customer-i-o-organisation.js +0 -1
  43. package/src/models/customerio-programme/i-country.d.ts +0 -20
  44. package/src/models/customerio-programme/i-country.js +0 -1
  45. package/src/models/customerio-programme/i-customer-i-o-programme.d.ts +0 -107
  46. package/src/models/customerio-programme/i-customer-i-o-programme.js +0 -1
  47. package/src/models/customerio-programme/i-deadline.d.ts +0 -20
  48. package/src/models/customerio-programme/i-deadline.js +0 -1
  49. package/src/models/customerio-programme/i-english-requirements.d.ts +0 -51
  50. package/src/models/customerio-programme/i-english-requirements.js +0 -1
  51. package/src/models/customerio-programme/i-logo.d.ts +0 -14
  52. package/src/models/customerio-programme/i-logo.js +0 -1
  53. package/src/models/customerio-programme/i-start-date.d.ts +0 -33
  54. package/src/models/customerio-programme/i-start-date.js +0 -1
  55. package/src/models/customerio-programme/i-timing.d.ts +0 -45
  56. package/src/models/customerio-programme/i-timing.js +0 -1
  57. package/src/models/customerio-programme/i-tuition-fee.d.ts +0 -50
  58. package/src/models/customerio-programme/i-tuition-fee.js +0 -1
  59. package/src/models/organisation-card/i-review-rating-domain.d.ts +0 -6
  60. package/src/models/organisation-card/i-review-rating-domain.js +0 -1
  61. package/src/models/programme-card/i-english-requirements.d.ts +0 -51
  62. package/src/models/programme-card/i-english-requirements.js +0 -1
  63. package/src/models/programme-card/i-g-p-a-requirement.d.ts +0 -20
  64. package/src/models/programme-card/i-g-p-a-requirement.js +0 -1
  65. package/src/models/programme-card/i-living-cost.d.ts +0 -20
  66. package/src/models/programme-card/i-living-cost.js +0 -1
  67. package/src/models/programme-card/i-review-rating-domain.d.ts +0 -6
  68. package/src/models/programme-card/i-review-rating-domain.js +0 -1
  69. package/src/models/scholarship-card-v2/i-scholarship-card.d.ts +0 -15
  70. package/src/models/scholarship-card-v2/i-scholarship-card.js +0 -1
  71. package/src/models/scholarship-card-v2/scholarship-card-v2-client.d.ts +0 -7
  72. package/src/models/scholarship-card-v2/scholarship-card-v2-client.js +0 -12
  73. package/test.d.ts +0 -1
  74. package/test.js +0 -7
  75. package/vitest.config.d.ts +0 -2
  76. package/vitest.config.js +0 -9
  77. package/vitest.setup.d.ts +0 -1
  78. package/vitest.setup.js +0 -4
package/package.json CHANGED
@@ -1,52 +1,50 @@
1
- {
2
- "name": "@studyportals/domain-client",
3
- "version": "6.0.0",
4
- "description": "Responsible for fetching data from the Domain API",
5
- "main": "index.js",
6
- "author": "StudyPortals B.V.",
7
- "sideEffects": false,
8
- "contributors": [
9
- "braaibander <danny@studyportals.com>"
10
- ],
11
- "license": "BSD-3-Clause",
12
- "scripts": {
13
- "test": "vitest run",
14
- "test:watch": "vitest",
15
- "coverage": "vitest run --coverage",
16
- "lint": "eslint . --ext .ts --max-warnings=0",
17
- "lint:fix": "eslint . --ext .ts --fix",
18
- "pre-push": "npm run test && npm run coverage && npm run lint",
19
- "prepare-dist": "npm run test && rm -fR bin && npx tsc && cp package.json bin/package.json && rm -fR bin/tests",
20
- "publish-beta": "npm version prerelease --preid=beta && npm run prepare-dist && npm publish ./bin --tag beta",
21
- "publish-major": "npm version major && npm run prepare-dist && npm publish ./bin",
22
- "publish-minor": "npm version minor && npm run prepare-dist && npm publish ./bin",
23
- "publish-patch": "npm version patch && npm run prepare-dist && npm publish ./bin",
24
- "publish-current": "npm run prepare-dist && npm publish ./bin"
25
- },
26
- "husky": {
27
- "hooks": {
28
- "pre-push": "npm run pre-push"
29
- }
30
- },
31
- "dependencies": {
32
-
33
- },
34
- "devDependencies": {
35
- "@studyportals/code-style": "^2.0.4",
36
- "@types/node": "^24.1.0",
37
- "@types/reflect-metadata": "^0.1.0",
38
- "@typescript-eslint/eslint-plugin": "^4.8.1",
39
- "@typescript-eslint/parser": "^4.8.1",
40
- "eslint": "^7.13.0",
41
- "eslint-plugin-import": "^2.22.1",
42
- "eslint-plugin-mocha": "^10.1.0",
43
- "husky": "^4.3.0",
44
- "nyc": "^15.1.0",
45
- "source-map-support": "^0.5.19",
46
- "tslint": "^6.1.3",
47
- "typemoq": "^2.1.0",
48
- "vitest": "^3.2.4",
49
- "@vitest/coverage-v8": "^3.2.4",
50
- "typescript": "^5.9.2"
51
- }
52
- }
1
+ {
2
+ "name": "@studyportals/domain-client",
3
+ "version": "6.1.0-beta.1",
4
+ "description": "Responsible for fetching data from the Domain API",
5
+ "main": "index.js",
6
+ "author": "StudyPortals B.V.",
7
+ "sideEffects": false,
8
+ "contributors": [
9
+ "braaibander <danny@studyportals.com>"
10
+ ],
11
+ "license": "BSD-3-Clause",
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "test": "vitest run",
15
+ "test:watch": "vitest",
16
+ "coverage": "vitest run --coverage",
17
+ "lint": "eslint . --ext .ts --max-warnings=0",
18
+ "lint:fix": "eslint . --ext .ts --fix",
19
+ "pre-push": "npm run test && npm run coverage && npm run lint",
20
+ "prepare-dist": "npm run test && rm -fR bin && npx tsc && cp package.json bin/package.json && rm -fR bin/tests",
21
+ "publish-beta": "npm version prerelease --preid=beta && npm run prepare-dist && npm publish ./bin --tag beta",
22
+ "publish-major": "npm version major && npm run prepare-dist && npm publish ./bin",
23
+ "publish-minor": "npm version minor && npm run prepare-dist && npm publish ./bin",
24
+ "publish-patch": "npm version patch && npm run prepare-dist && npm publish ./bin",
25
+ "publish-current": "npm run prepare-dist && npm publish ./bin"
26
+ },
27
+ "husky": {
28
+ "hooks": {
29
+ "pre-push": "npm run pre-push"
30
+ }
31
+ },
32
+ "devDependencies": {
33
+ "@studyportals/code-style": "^2.0.4",
34
+ "@types/node": "^24.2.1",
35
+ "@types/reflect-metadata": "^0.1.0",
36
+ "@typescript-eslint/eslint-plugin": "^4.8.1",
37
+ "@typescript-eslint/parser": "^4.8.1",
38
+ "@vitest/coverage-v8": "^3.2.4",
39
+ "eslint": "^7.13.0",
40
+ "eslint-plugin-import": "^2.22.1",
41
+ "eslint-plugin-mocha": "^10.1.0",
42
+ "husky": "^4.3.0",
43
+ "nyc": "^15.1.0",
44
+ "source-map-support": "^0.5.19",
45
+ "tslint": "^6.1.3",
46
+ "typemoq": "^2.1.0",
47
+ "typescript": "^5.9.2",
48
+ "vitest": "^3.2.4"
49
+ }
50
+ }
@@ -119,4 +119,34 @@ export interface IOrganisationSearchDocument {
119
119
  * @return boolean
120
120
  */
121
121
  isPublished(): boolean;
122
+ /**
123
+ * Gets the city IDs for Masters programmes offered by the organisation
124
+ *
125
+ * @return array<number>
126
+ */
127
+ getCityIdsForMasters(): number[];
128
+ /**
129
+ * Gets the city IDs for Bachelors programmes offered by the organisation
130
+ *
131
+ * @return array<number>
132
+ */
133
+ getCityIdsForBachelors(): number[];
134
+ /**
135
+ * Gets the city IDs for PhD programmes offered by the organisation
136
+ *
137
+ * @return array<number>
138
+ */
139
+ getCityIdsForPhds(): number[];
140
+ /**
141
+ * Gets the city IDs for Short Courses programmes offered by the organisation
142
+ *
143
+ * @return array<number>
144
+ */
145
+ getCityIdsForShortCourses(): number[];
146
+ /**
147
+ * Gets the city IDs for Distance Learning programmes offered by the organisation
148
+ *
149
+ * @return array<number>
150
+ */
151
+ getCityIdsForDistanceLearning(): number[];
122
152
  }
@@ -1,51 +0,0 @@
1
- export interface IEnglishRequirements {
2
- /**
3
- * Required score for Cambridge english
4
- *
5
- * @return number
6
- */
7
- getCambridgeEnglish(): number;
8
- canShowCambridgeEnglish(): boolean;
9
- /**
10
- * Required score for Duolingo
11
- *
12
- * @return number
13
- */
14
- getDuolingo(): number;
15
- canShowDuolingo(): boolean;
16
- /**
17
- * Required score for IELTS tests
18
- *
19
- * @return number
20
- */
21
- getIELTS(): number;
22
- canShowIELTS(): boolean;
23
- /**
24
- * Required score for OTE
25
- *
26
- * @return number
27
- */
28
- getOte(): number;
29
- canShowOte(): boolean;
30
- /**
31
- * Required score for PTE
32
- *
33
- * @return number
34
- */
35
- getPTE(): number;
36
- canShowPTE(): boolean;
37
- /**
38
- * Required score for TOEFL internet
39
- *
40
- * @return number
41
- */
42
- getTOEFLInternet(): number;
43
- canShowTOEFLInternet(): boolean;
44
- /**
45
- * Required score for TOEFL paper
46
- *
47
- * @return number
48
- */
49
- getTOEFLPaper(): number;
50
- canShowTOEFLPaper(): boolean;
51
- }
@@ -1,20 +0,0 @@
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 +0,0 @@
1
- export {};
@@ -1,50 +0,0 @@
1
- export interface ITuitionFee {
2
- /**
3
- * Get the tuition amount per unit in the provided currency.
4
- *
5
- * Note: all transformable units will be converted to yearly amounts. This
6
- * includes per semester and full programme tuition fees.
7
- *
8
- * @return number
9
- */
10
- getAmount(): number;
11
- /**
12
- * Get the applicable currency.
13
- *
14
- * @return string
15
- */
16
- getCurrency(): string;
17
- /**
18
- * Get the original tuition amount before any transformation step.
19
- *
20
- * @return number
21
- */
22
- getOriginalAmount(): number;
23
- /**
24
- * Get the original tuition unit before any transformation step.
25
- *
26
- * @return string
27
- */
28
- getOriginalUnit(): string;
29
- /**
30
- * Get targeted audience (national, international, eea, etc).
31
- *
32
- * @return string
33
- */
34
- getTarget(): string;
35
- /**
36
- * Get the unit the tuition fee applies for.
37
- *
38
- * Note: all transformable units will be converted to 'year'. This means
39
- * this value will be either 'year', 'module' or 'credit'.
40
- *
41
- * @return string
42
- */
43
- getUnit(): string;
44
- /**
45
- * True if the study is free for this target audience.
46
- *
47
- * @return boolean
48
- */
49
- isFree(): boolean;
50
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,51 +0,0 @@
1
- export interface IEnglishRequirements {
2
- /**
3
- * Required score for Cambridge english
4
- *
5
- * @return number
6
- */
7
- getCambridgeEnglish(): number;
8
- canShowCambridgeEnglish(): boolean;
9
- /**
10
- * Required score for Duolingo
11
- *
12
- * @return number
13
- */
14
- getDuolingo(): number;
15
- canShowDuolingo(): boolean;
16
- /**
17
- * Required score for IELTS tests
18
- *
19
- * @return number
20
- */
21
- getIELTS(): number;
22
- canShowIELTS(): boolean;
23
- /**
24
- * Required score for OTE
25
- *
26
- * @return number
27
- */
28
- getOte(): number;
29
- canShowOte(): boolean;
30
- /**
31
- * Required score for PTE
32
- *
33
- * @return number
34
- */
35
- getPTE(): number;
36
- canShowPTE(): boolean;
37
- /**
38
- * Required score for TOEFL internet
39
- *
40
- * @return number
41
- */
42
- getTOEFLInternet(): number;
43
- canShowTOEFLInternet(): boolean;
44
- /**
45
- * Required score for TOEFL paper
46
- *
47
- * @return number
48
- */
49
- getTOEFLPaper(): number;
50
- canShowTOEFLPaper(): boolean;
51
- }
@@ -1,20 +0,0 @@
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 +0,0 @@
1
- export {};
@@ -1,20 +0,0 @@
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 +0,0 @@
1
- export {};
@@ -1,20 +0,0 @@
1
- export interface IDeadline {
2
- /**
3
- * Get the date this deadline expires on.
4
- *
5
- * @return Date
6
- */
7
- getDate(): Date;
8
- /**
9
- * Get the deadline type (e.g. general, national, eea, etc).
10
- *
11
- * @return string
12
- */
13
- getType(): string;
14
- /**
15
- * True if the deadline has passed (e.g. you can't apply anymore).
16
- *
17
- * @return boolean
18
- */
19
- isPassed(): boolean;
20
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,51 +0,0 @@
1
- export interface IEnglishRequirements {
2
- /**
3
- * Required score for Cambridge english
4
- *
5
- * @return number
6
- */
7
- getCambridgeEnglish(): number;
8
- canShowCambridgeEnglish(): boolean;
9
- /**
10
- * Required score for Duolingo
11
- *
12
- * @return number
13
- */
14
- getDuolingo(): number;
15
- canShowDuolingo(): boolean;
16
- /**
17
- * Required score for IELTS tests
18
- *
19
- * @return number
20
- */
21
- getIELTS(): number;
22
- canShowIELTS(): boolean;
23
- /**
24
- * Required score for OTE
25
- *
26
- * @return number
27
- */
28
- getOte(): number;
29
- canShowOte(): boolean;
30
- /**
31
- * Required score for PTE
32
- *
33
- * @return number
34
- */
35
- getPTE(): number;
36
- canShowPTE(): boolean;
37
- /**
38
- * Required score for TOEFL internet
39
- *
40
- * @return number
41
- */
42
- getTOEFLInternet(): number;
43
- canShowTOEFLInternet(): boolean;
44
- /**
45
- * Required score for TOEFL paper
46
- *
47
- * @return number
48
- */
49
- getTOEFLPaper(): number;
50
- canShowTOEFLPaper(): boolean;
51
- }
@@ -1,20 +0,0 @@
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 +0,0 @@
1
- export {};
@@ -1,38 +0,0 @@
1
- export interface IGeoTargetingConfiguration {
2
- /**
3
- * Bit set 1 of targeted country ID information.
4
- *
5
- * @return number
6
- */
7
- getBit1(): number;
8
- /**
9
- * Bit set 2 of targeted country ID information.
10
- *
11
- * @return number
12
- */
13
- getBit2(): number;
14
- /**
15
- * Bit set 3 of targeted country ID information.
16
- *
17
- * @return number
18
- */
19
- getBit3(): number;
20
- /**
21
- * Bit set 4 of targeted country ID information.
22
- *
23
- * @return number
24
- */
25
- getBit4(): number;
26
- /**
27
- * Bit set 5 of targeted country ID information.
28
- *
29
- * @return number
30
- */
31
- getBit5(): number;
32
- /**
33
- * List of all configured country IDs.
34
- *
35
- * @return number[]
36
- */
37
- getTargetedCountries(): number[];
38
- }
@@ -1,30 +0,0 @@
1
- import { IGeoTargetingConfiguration } from "../../..";
2
- export interface IGeoTargetingValues {
3
- /**
4
- * Geo-targeting configuration for "light premium" listing.
5
- *
6
- * @return IGeoTargetingConfiguration
7
- */
8
- getLightPremium(): IGeoTargetingConfiguration;
9
- canShowLightPremium(): boolean;
10
- /**
11
- * Geo-targeting configuration for "premium" listing.
12
- *
13
- * @return IGeoTargetingConfiguration
14
- */
15
- getPremium(): IGeoTargetingConfiguration;
16
- canShowPremium(): boolean;
17
- /**
18
- * Geo-targeting configuration for "super premium" listing.
19
- *
20
- * @return IGeoTargetingConfiguration
21
- */
22
- getSuperPremium(): IGeoTargetingConfiguration;
23
- canShowSuperPremium(): boolean;
24
- /**
25
- * Programme has active geo-targeting settings.
26
- *
27
- * @return boolean
28
- */
29
- isGeoTargeted(): boolean;
30
- }
@@ -1,28 +0,0 @@
1
- export interface IInternalLink {
2
- /**
3
- * Get an optional text describing the link (typically <a>-tags contents).
4
- *
5
- * @return string
6
- * @throws PropertyNotAvailableException
7
- */
8
- getDescription(): string;
9
- canShowDescription(): boolean;
10
- /**
11
- * Returns on which portal a this link should link towards.
12
- *
13
- * @return string
14
- */
15
- getPortalType(): string;
16
- /**
17
- * Get the url to refer to.
18
- *
19
- * Note that the url provided is always a relative URL. A base URL is needed
20
- * to make it a full valid path.
21
- * The only exception is when an external link is provided (meaning, outside
22
- * of StudyPortals-maintained domains). In this case a full url will be
23
- * provided.
24
- *
25
- * @return string
26
- */
27
- getUrl(): string;
28
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- export interface ILink {
2
- /**
3
- * Get an optional text describing the link (typically <a>-tags contents).
4
- *
5
- * @return string
6
- * @throws PropertyNotAvailableException
7
- */
8
- getDescription(): string;
9
- canShowDescription(): boolean;
10
- /**
11
- * Get the url to refer to.
12
- *
13
- * Note that the url provided is always a relative URL. A base URL is needed
14
- * to make it a full valid path.
15
- * The only exception is when an external link is provided (meaning, outside
16
- * of StudyPortals-maintained domains). In this case a full url will be
17
- * provided.
18
- *
19
- * @return string
20
- */
21
- getUrl(): string;
22
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,20 +0,0 @@
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 +0,0 @@
1
- export {};