@studyportals/domain-client 10.0.1-beta.1 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studyportals/domain-client",
3
- "version": "10.0.1-beta.1",
3
+ "version": "10.1.0",
4
4
  "description": "Responsible for fetching data from the Domain API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,6 +1,10 @@
1
1
  import { File } from "../File.js";
2
2
  import { Location } from "../Location.js";
3
3
  import { SocialLink } from "../SocialLink.js";
4
+ export interface LeadRecipient {
5
+ email: string;
6
+ emailType: string;
7
+ }
4
8
  export interface PartnerApiOrganisation {
5
9
  id: number;
6
10
  name: string;
@@ -9,7 +13,10 @@ export interface PartnerApiOrganisation {
9
13
  about?: string | undefined;
10
14
  locations: Location[];
11
15
  links: SocialLink[];
16
+ isoCode: string;
17
+ leadRecipients: LeadRecipient[];
12
18
  }
19
+ export declare const LeadRecipient: MessageFns<LeadRecipient>;
13
20
  export declare const PartnerApiOrganisation: MessageFns<PartnerApiOrganisation>;
14
21
  interface MessageFns<T> {
15
22
  fromJSON(object: any): T;
@@ -1,12 +1,30 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.11.8
4
- // protoc v3.21.12
4
+ // protoc v6.30.2
5
5
  // source: PartnerApi/PartnerApiOrganisation.proto
6
6
  /* eslint-disable */
7
7
  import { File } from "../File.js";
8
8
  import { Location } from "../Location.js";
9
9
  import { SocialLink } from "../SocialLink.js";
10
+ export const LeadRecipient = {
11
+ fromJSON(object) {
12
+ return {
13
+ email: isSet(object.email) ? globalThis.String(object.email) : "",
14
+ emailType: isSet(object.emailType) ? globalThis.String(object.emailType) : "",
15
+ };
16
+ },
17
+ toJSON(message) {
18
+ const obj = {};
19
+ if (message.email !== "") {
20
+ obj.email = message.email;
21
+ }
22
+ if (message.emailType !== "") {
23
+ obj.emailType = message.emailType;
24
+ }
25
+ return obj;
26
+ },
27
+ };
10
28
  export const PartnerApiOrganisation = {
11
29
  fromJSON(object) {
12
30
  return {
@@ -21,6 +39,10 @@ export const PartnerApiOrganisation = {
21
39
  links: globalThis.Array.isArray(object?.links)
22
40
  ? object.links.map((e) => SocialLink.fromJSON(e))
23
41
  : [],
42
+ isoCode: isSet(object.isoCode) ? globalThis.String(object.isoCode) : "",
43
+ leadRecipients: globalThis.Array.isArray(object?.leadRecipients)
44
+ ? object.leadRecipients.map((e) => LeadRecipient.fromJSON(e))
45
+ : [],
24
46
  };
25
47
  },
26
48
  toJSON(message) {
@@ -46,6 +68,12 @@ export const PartnerApiOrganisation = {
46
68
  if (message.links?.length) {
47
69
  obj.links = message.links.map((e) => SocialLink.toJSON(e));
48
70
  }
71
+ if (message.isoCode !== "") {
72
+ obj.isoCode = message.isoCode;
73
+ }
74
+ if (message.leadRecipients?.length) {
75
+ obj.leadRecipients = message.leadRecipients.map((e) => LeadRecipient.toJSON(e));
76
+ }
49
77
  return obj;
50
78
  },
51
79
  };
@@ -21,8 +21,17 @@ export interface PartnerApiProgramme {
21
21
  isFullTime: boolean;
22
22
  isPartTime: boolean;
23
23
  duration?: Duration | undefined;
24
+ programLink?: string | undefined;
25
+ organisation?: PartnerApiProgramOrganisationInformation | undefined;
26
+ countryIsoCodes: string[];
27
+ }
28
+ export interface PartnerApiProgramOrganisationInformation {
29
+ id: number;
30
+ name: string;
31
+ locations: Location[];
24
32
  }
25
33
  export declare const PartnerApiProgramme: MessageFns<PartnerApiProgramme>;
34
+ export declare const PartnerApiProgramOrganisationInformation: MessageFns<PartnerApiProgramOrganisationInformation>;
26
35
  interface MessageFns<T> {
27
36
  fromJSON(object: any): T;
28
37
  toJSON(message: T): unknown;
@@ -33,6 +33,13 @@ export const PartnerApiProgramme = {
33
33
  isFullTime: isSet(object.isFullTime) ? globalThis.Boolean(object.isFullTime) : false,
34
34
  isPartTime: isSet(object.isPartTime) ? globalThis.Boolean(object.isPartTime) : false,
35
35
  duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined,
36
+ programLink: isSet(object.programLink) ? globalThis.String(object.programLink) : undefined,
37
+ organisation: isSet(object.organisation)
38
+ ? PartnerApiProgramOrganisationInformation.fromJSON(object.organisation)
39
+ : undefined,
40
+ countryIsoCodes: globalThis.Array.isArray(object?.countryIsoCodes)
41
+ ? object.countryIsoCodes.map((e) => globalThis.String(e))
42
+ : [],
36
43
  };
37
44
  },
38
45
  toJSON(message) {
@@ -88,6 +95,39 @@ export const PartnerApiProgramme = {
88
95
  if (message.duration !== undefined) {
89
96
  obj.duration = Duration.toJSON(message.duration);
90
97
  }
98
+ if (message.programLink !== undefined) {
99
+ obj.programLink = message.programLink;
100
+ }
101
+ if (message.organisation !== undefined) {
102
+ obj.organisation = PartnerApiProgramOrganisationInformation.toJSON(message.organisation);
103
+ }
104
+ if (message.countryIsoCodes?.length) {
105
+ obj.countryIsoCodes = message.countryIsoCodes;
106
+ }
107
+ return obj;
108
+ },
109
+ };
110
+ export const PartnerApiProgramOrganisationInformation = {
111
+ fromJSON(object) {
112
+ return {
113
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
114
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
115
+ locations: globalThis.Array.isArray(object?.locations)
116
+ ? object.locations.map((e) => Location.fromJSON(e))
117
+ : [],
118
+ };
119
+ },
120
+ toJSON(message) {
121
+ const obj = {};
122
+ if (message.id !== 0) {
123
+ obj.id = Math.round(message.id);
124
+ }
125
+ if (message.name !== "") {
126
+ obj.name = message.name;
127
+ }
128
+ if (message.locations?.length) {
129
+ obj.locations = message.locations.map((e) => Location.toJSON(e));
130
+ }
91
131
  return obj;
92
132
  },
93
133
  };
@@ -1,5 +1,6 @@
1
1
  import { Link } from "../Link.js";
2
2
  import { Location } from "../Location.js";
3
+ import { ApplicationBasis, Degree, QualifiedCountries } from "../Scholarship/ScholarshipDetail.js";
3
4
  export interface PartnerApiScholarship {
4
5
  id: string;
5
6
  title: string;
@@ -10,8 +11,9 @@ export interface PartnerApiScholarship {
10
11
  eligibility?: PartnerApiEligibility | undefined;
11
12
  about?: string | undefined;
12
13
  providerLogo?: string | undefined;
13
- sourceUrl?: string | undefined;
14
14
  organisation?: PartnerApiScholarshipOrganisation | undefined;
15
+ grantCurrencyIso: string;
16
+ degrees: Degree[];
15
17
  }
16
18
  export interface PartnerApiFunding {
17
19
  kind: string;
@@ -21,9 +23,9 @@ export interface PartnerApiFunding {
21
23
  description?: string | undefined;
22
24
  }
23
25
  export interface PartnerApiEligibility {
24
- nationality?: string | undefined;
25
- studyLevel?: string | undefined;
26
- scholarshipType?: string | undefined;
26
+ nationality?: QualifiedCountries | undefined;
27
+ studyLevel: Degree[];
28
+ scholarshipType: ApplicationBasis[];
27
29
  description?: string | undefined;
28
30
  }
29
31
  export interface PartnerApiScholarshipOrganisation {
@@ -6,6 +6,7 @@
6
6
  /* eslint-disable */
7
7
  import { Link } from "../Link.js";
8
8
  import { Location } from "../Location.js";
9
+ import { ApplicationBasis, Degree, QualifiedCountries } from "../Scholarship/ScholarshipDetail.js";
9
10
  export const PartnerApiScholarship = {
10
11
  fromJSON(object) {
11
12
  return {
@@ -20,10 +21,13 @@ export const PartnerApiScholarship = {
20
21
  eligibility: isSet(object.eligibility) ? PartnerApiEligibility.fromJSON(object.eligibility) : undefined,
21
22
  about: isSet(object.about) ? globalThis.String(object.about) : undefined,
22
23
  providerLogo: isSet(object.providerLogo) ? globalThis.String(object.providerLogo) : undefined,
23
- sourceUrl: isSet(object.sourceUrl) ? globalThis.String(object.sourceUrl) : undefined,
24
24
  organisation: isSet(object.organisation)
25
25
  ? PartnerApiScholarshipOrganisation.fromJSON(object.organisation)
26
26
  : undefined,
27
+ grantCurrencyIso: isSet(object.grantCurrencyIso) ? globalThis.String(object.grantCurrencyIso) : "",
28
+ degrees: globalThis.Array.isArray(object?.degrees)
29
+ ? object.degrees.map((e) => Degree.fromJSON(e))
30
+ : [],
27
31
  };
28
32
  },
29
33
  toJSON(message) {
@@ -55,12 +59,15 @@ export const PartnerApiScholarship = {
55
59
  if (message.providerLogo !== undefined) {
56
60
  obj.providerLogo = message.providerLogo;
57
61
  }
58
- if (message.sourceUrl !== undefined) {
59
- obj.sourceUrl = message.sourceUrl;
60
- }
61
62
  if (message.organisation !== undefined) {
62
63
  obj.organisation = PartnerApiScholarshipOrganisation.toJSON(message.organisation);
63
64
  }
65
+ if (message.grantCurrencyIso !== "") {
66
+ obj.grantCurrencyIso = message.grantCurrencyIso;
67
+ }
68
+ if (message.degrees?.length) {
69
+ obj.degrees = message.degrees.map((e) => Degree.toJSON(e));
70
+ }
64
71
  return obj;
65
72
  },
66
73
  };
@@ -97,22 +104,26 @@ export const PartnerApiFunding = {
97
104
  export const PartnerApiEligibility = {
98
105
  fromJSON(object) {
99
106
  return {
100
- nationality: isSet(object.nationality) ? globalThis.String(object.nationality) : undefined,
101
- studyLevel: isSet(object.studyLevel) ? globalThis.String(object.studyLevel) : undefined,
102
- scholarshipType: isSet(object.scholarshipType) ? globalThis.String(object.scholarshipType) : undefined,
107
+ nationality: isSet(object.nationality) ? QualifiedCountries.fromJSON(object.nationality) : undefined,
108
+ studyLevel: globalThis.Array.isArray(object?.studyLevel)
109
+ ? object.studyLevel.map((e) => Degree.fromJSON(e))
110
+ : [],
111
+ scholarshipType: globalThis.Array.isArray(object?.scholarshipType)
112
+ ? object.scholarshipType.map((e) => ApplicationBasis.fromJSON(e))
113
+ : [],
103
114
  description: isSet(object.description) ? globalThis.String(object.description) : undefined,
104
115
  };
105
116
  },
106
117
  toJSON(message) {
107
118
  const obj = {};
108
119
  if (message.nationality !== undefined) {
109
- obj.nationality = message.nationality;
120
+ obj.nationality = QualifiedCountries.toJSON(message.nationality);
110
121
  }
111
- if (message.studyLevel !== undefined) {
112
- obj.studyLevel = message.studyLevel;
122
+ if (message.studyLevel?.length) {
123
+ obj.studyLevel = message.studyLevel.map((e) => Degree.toJSON(e));
113
124
  }
114
- if (message.scholarshipType !== undefined) {
115
- obj.scholarshipType = message.scholarshipType;
125
+ if (message.scholarshipType?.length) {
126
+ obj.scholarshipType = message.scholarshipType.map((e) => ApplicationBasis.toJSON(e));
116
127
  }
117
128
  if (message.description !== undefined) {
118
129
  obj.description = message.description;
@@ -0,0 +1,24 @@
1
+ export interface MiniScholarshipCard {
2
+ id: number;
3
+ title: string;
4
+ description: string;
5
+ benefitText: string;
6
+ deadlineText: string;
7
+ providerId: string;
8
+ providerName: string;
9
+ scholarshipProviderLocation: string;
10
+ originCountryIds: number[];
11
+ isUniversityProvider: boolean;
12
+ descriptionOfApplicationBasis: string;
13
+ grantCurrencyIso: string;
14
+ grantAmount: number;
15
+ grantDescription: string;
16
+ virtualName: string;
17
+ premiumOrganisationLogo?: string | undefined;
18
+ }
19
+ export declare const MiniScholarshipCard: MessageFns<MiniScholarshipCard>;
20
+ interface MessageFns<T> {
21
+ fromJSON(object: any): T;
22
+ toJSON(message: T): unknown;
23
+ }
24
+ export {};
@@ -0,0 +1,92 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc v3.21.12
5
+ // source: Scholarship/MiniScholarshipCard.proto
6
+ export const MiniScholarshipCard = {
7
+ fromJSON(object) {
8
+ return {
9
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
10
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
11
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
12
+ benefitText: isSet(object.benefitText) ? globalThis.String(object.benefitText) : "",
13
+ deadlineText: isSet(object.deadlineText) ? globalThis.String(object.deadlineText) : "",
14
+ providerId: isSet(object.providerId) ? globalThis.String(object.providerId) : "",
15
+ providerName: isSet(object.providerName) ? globalThis.String(object.providerName) : "",
16
+ scholarshipProviderLocation: isSet(object.scholarshipProviderLocation)
17
+ ? globalThis.String(object.scholarshipProviderLocation)
18
+ : "",
19
+ originCountryIds: globalThis.Array.isArray(object?.originCountryIds)
20
+ ? object.originCountryIds.map((e) => globalThis.Number(e))
21
+ : [],
22
+ isUniversityProvider: isSet(object.isUniversityProvider)
23
+ ? globalThis.Boolean(object.isUniversityProvider)
24
+ : false,
25
+ descriptionOfApplicationBasis: isSet(object.descriptionOfApplicationBasis)
26
+ ? globalThis.String(object.descriptionOfApplicationBasis)
27
+ : "",
28
+ grantCurrencyIso: isSet(object.grantCurrencyIso) ? globalThis.String(object.grantCurrencyIso) : "",
29
+ grantAmount: isSet(object.grantAmount) ? globalThis.Number(object.grantAmount) : 0,
30
+ grantDescription: isSet(object.grantDescription) ? globalThis.String(object.grantDescription) : "",
31
+ virtualName: isSet(object.virtualName) ? globalThis.String(object.virtualName) : "",
32
+ premiumOrganisationLogo: isSet(object.premiumOrganisationLogo)
33
+ ? globalThis.String(object.premiumOrganisationLogo)
34
+ : undefined,
35
+ };
36
+ },
37
+ toJSON(message) {
38
+ const obj = {};
39
+ if (message.id !== 0) {
40
+ obj.id = Math.round(message.id);
41
+ }
42
+ if (message.title !== "") {
43
+ obj.title = message.title;
44
+ }
45
+ if (message.description !== "") {
46
+ obj.description = message.description;
47
+ }
48
+ if (message.benefitText !== "") {
49
+ obj.benefitText = message.benefitText;
50
+ }
51
+ if (message.deadlineText !== "") {
52
+ obj.deadlineText = message.deadlineText;
53
+ }
54
+ if (message.providerId !== "") {
55
+ obj.providerId = message.providerId;
56
+ }
57
+ if (message.providerName !== "") {
58
+ obj.providerName = message.providerName;
59
+ }
60
+ if (message.scholarshipProviderLocation !== "") {
61
+ obj.scholarshipProviderLocation = message.scholarshipProviderLocation;
62
+ }
63
+ if (message.originCountryIds?.length) {
64
+ obj.originCountryIds = message.originCountryIds.map((e) => Math.round(e));
65
+ }
66
+ if (message.isUniversityProvider !== false) {
67
+ obj.isUniversityProvider = message.isUniversityProvider;
68
+ }
69
+ if (message.descriptionOfApplicationBasis !== "") {
70
+ obj.descriptionOfApplicationBasis = message.descriptionOfApplicationBasis;
71
+ }
72
+ if (message.grantCurrencyIso !== "") {
73
+ obj.grantCurrencyIso = message.grantCurrencyIso;
74
+ }
75
+ if (message.grantAmount !== 0) {
76
+ obj.grantAmount = message.grantAmount;
77
+ }
78
+ if (message.grantDescription !== "") {
79
+ obj.grantDescription = message.grantDescription;
80
+ }
81
+ if (message.virtualName !== "") {
82
+ obj.virtualName = message.virtualName;
83
+ }
84
+ if (message.premiumOrganisationLogo !== undefined) {
85
+ obj.premiumOrganisationLogo = message.premiumOrganisationLogo;
86
+ }
87
+ return obj;
88
+ },
89
+ };
90
+ function isSet(value) {
91
+ return value !== null && value !== undefined;
92
+ }
@@ -0,0 +1,111 @@
1
+ import { Discipline } from "../Discipline.js";
2
+ import { Link } from "../Link.js";
3
+ import { Country } from "../Organisation.js";
4
+ import { OrganisationInformation } from "../OrganisationInformation.js";
5
+ import { ProgrammeCard } from "../ProgrammeCard.js";
6
+ import { RichText } from "../RichText.js";
7
+ export declare enum ScholarshipFormat {
8
+ /** SCHOLARSHIP_FORMAT_UNSPECIFIED - maps to null */
9
+ SCHOLARSHIP_FORMAT_UNSPECIFIED = 0,
10
+ TUITION_FEE_REDUCTION = 1,
11
+ LIVING_EXPENSES = 2,
12
+ ACCOMMODATION = 3,
13
+ TRAVEL_EXPENSES = 4,
14
+ SPOUSE_CHILD_CARE = 5,
15
+ HEALTH = 6,
16
+ APPLICATION = 7,
17
+ OTHER = 8,
18
+ UNRECOGNIZED = -1
19
+ }
20
+ export declare function scholarshipFormatFromJSON(object: any): ScholarshipFormat;
21
+ export declare function scholarshipFormatToJSON(object: ScholarshipFormat): string;
22
+ export interface ScholarshipDetail {
23
+ id: number;
24
+ title: string;
25
+ description: string;
26
+ benefitText: string;
27
+ deadlineText: string;
28
+ providerId: string;
29
+ providerName: string;
30
+ providerLocation: string;
31
+ originCountryIds: number[];
32
+ isUniversityProvider: boolean;
33
+ descriptionOfApplicationBasis?: string | undefined;
34
+ grantCurrencyIso: string;
35
+ grantAmount: number;
36
+ grantDescription?: string | undefined;
37
+ virtualName?: string | undefined;
38
+ premiumOrganisationLogo: string;
39
+ qualifiedDisciplines?: QualifiedDiscipline | undefined;
40
+ qualifiedDestinationCountries?: QualifiedCountries | undefined;
41
+ qualifiedOriginCountries?: QualifiedCountries | undefined;
42
+ organisationInformation?: OrganisationInformation | undefined;
43
+ requiredExperienceText?: string | undefined;
44
+ providerLink?: Link | undefined;
45
+ hasProviderId: boolean;
46
+ hasGrantAmount: boolean;
47
+ hasGrantCurrencyIso: boolean;
48
+ applicationBasis?: ApplicationBasis | undefined;
49
+ canShowMPower: boolean;
50
+ degrees: Degree[];
51
+ summary: string;
52
+ isAwardedMultipleTimes: boolean;
53
+ scholarshipFormats: ScholarshipFormat[];
54
+ eligibilityText: string;
55
+ hasAgeMinimum: boolean;
56
+ ageMinimum?: number | undefined;
57
+ hasAgeMaximum: boolean;
58
+ ageMaximum?: number | undefined;
59
+ hasApplicationInfo: boolean;
60
+ applicationInfo?: RichText | undefined;
61
+ sourceUrl?: string | undefined;
62
+ descriptionText?: string | undefined;
63
+ mastersEligibleProgrammes: EligibleProgramme[];
64
+ bachelorsEligibleProgrammes: EligibleProgramme[];
65
+ phdEligibleProgrammes: EligibleProgramme[];
66
+ benefits?: string | undefined;
67
+ }
68
+ export interface QualifiedDiscipline {
69
+ list: Discipline[];
70
+ count: number;
71
+ all: boolean;
72
+ included: boolean;
73
+ }
74
+ /** Represents countries a scholarship qualifies for. */
75
+ export interface QualifiedCountries {
76
+ list: Country[];
77
+ count: number;
78
+ all: boolean;
79
+ included: boolean;
80
+ }
81
+ export interface ApplicationBasis {
82
+ isMeritBased: boolean;
83
+ isNeedBased: boolean;
84
+ }
85
+ export interface Degree {
86
+ isMaster: boolean;
87
+ isBachelor: boolean;
88
+ isPhD: boolean;
89
+ }
90
+ export interface EligibleProgramme {
91
+ /** id & name */
92
+ discipline?: Discipline | undefined;
93
+ /** could be a dummy id, name is not used */
94
+ countryIsoCode?: string | undefined;
95
+ /** max 8 */
96
+ programmeIds: string[];
97
+ isDiscipline: boolean;
98
+ /** programme cards fetch in Portal */
99
+ programmeCards: ProgrammeCard[];
100
+ }
101
+ export declare const ScholarshipDetail: MessageFns<ScholarshipDetail>;
102
+ export declare const QualifiedDiscipline: MessageFns<QualifiedDiscipline>;
103
+ export declare const QualifiedCountries: MessageFns<QualifiedCountries>;
104
+ export declare const ApplicationBasis: MessageFns<ApplicationBasis>;
105
+ export declare const Degree: MessageFns<Degree>;
106
+ export declare const EligibleProgramme: MessageFns<EligibleProgramme>;
107
+ interface MessageFns<T> {
108
+ fromJSON(object: any): T;
109
+ toJSON(message: T): unknown;
110
+ }
111
+ export {};
@@ -0,0 +1,431 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc v3.21.12
5
+ // source: Scholarship/ScholarshipDetail.proto
6
+ /* eslint-disable */
7
+ import { Discipline } from "../Discipline.js";
8
+ import { Link } from "../Link.js";
9
+ import { Country } from "../Organisation.js";
10
+ import { OrganisationInformation } from "../OrganisationInformation.js";
11
+ import { ProgrammeCard } from "../ProgrammeCard.js";
12
+ import { RichText } from "../RichText.js";
13
+ export var ScholarshipFormat;
14
+ (function (ScholarshipFormat) {
15
+ /** SCHOLARSHIP_FORMAT_UNSPECIFIED - maps to null */
16
+ ScholarshipFormat[ScholarshipFormat["SCHOLARSHIP_FORMAT_UNSPECIFIED"] = 0] = "SCHOLARSHIP_FORMAT_UNSPECIFIED";
17
+ ScholarshipFormat[ScholarshipFormat["TUITION_FEE_REDUCTION"] = 1] = "TUITION_FEE_REDUCTION";
18
+ ScholarshipFormat[ScholarshipFormat["LIVING_EXPENSES"] = 2] = "LIVING_EXPENSES";
19
+ ScholarshipFormat[ScholarshipFormat["ACCOMMODATION"] = 3] = "ACCOMMODATION";
20
+ ScholarshipFormat[ScholarshipFormat["TRAVEL_EXPENSES"] = 4] = "TRAVEL_EXPENSES";
21
+ ScholarshipFormat[ScholarshipFormat["SPOUSE_CHILD_CARE"] = 5] = "SPOUSE_CHILD_CARE";
22
+ ScholarshipFormat[ScholarshipFormat["HEALTH"] = 6] = "HEALTH";
23
+ ScholarshipFormat[ScholarshipFormat["APPLICATION"] = 7] = "APPLICATION";
24
+ ScholarshipFormat[ScholarshipFormat["OTHER"] = 8] = "OTHER";
25
+ ScholarshipFormat[ScholarshipFormat["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
26
+ })(ScholarshipFormat || (ScholarshipFormat = {}));
27
+ export function scholarshipFormatFromJSON(object) {
28
+ switch (object) {
29
+ case 0:
30
+ case "SCHOLARSHIP_FORMAT_UNSPECIFIED":
31
+ return ScholarshipFormat.SCHOLARSHIP_FORMAT_UNSPECIFIED;
32
+ case 1:
33
+ case "TUITION_FEE_REDUCTION":
34
+ return ScholarshipFormat.TUITION_FEE_REDUCTION;
35
+ case 2:
36
+ case "LIVING_EXPENSES":
37
+ return ScholarshipFormat.LIVING_EXPENSES;
38
+ case 3:
39
+ case "ACCOMMODATION":
40
+ return ScholarshipFormat.ACCOMMODATION;
41
+ case 4:
42
+ case "TRAVEL_EXPENSES":
43
+ return ScholarshipFormat.TRAVEL_EXPENSES;
44
+ case 5:
45
+ case "SPOUSE_CHILD_CARE":
46
+ return ScholarshipFormat.SPOUSE_CHILD_CARE;
47
+ case 6:
48
+ case "HEALTH":
49
+ return ScholarshipFormat.HEALTH;
50
+ case 7:
51
+ case "APPLICATION":
52
+ return ScholarshipFormat.APPLICATION;
53
+ case 8:
54
+ case "OTHER":
55
+ return ScholarshipFormat.OTHER;
56
+ case -1:
57
+ case "UNRECOGNIZED":
58
+ default:
59
+ return ScholarshipFormat.UNRECOGNIZED;
60
+ }
61
+ }
62
+ export function scholarshipFormatToJSON(object) {
63
+ switch (object) {
64
+ case ScholarshipFormat.SCHOLARSHIP_FORMAT_UNSPECIFIED:
65
+ return "SCHOLARSHIP_FORMAT_UNSPECIFIED";
66
+ case ScholarshipFormat.TUITION_FEE_REDUCTION:
67
+ return "TUITION_FEE_REDUCTION";
68
+ case ScholarshipFormat.LIVING_EXPENSES:
69
+ return "LIVING_EXPENSES";
70
+ case ScholarshipFormat.ACCOMMODATION:
71
+ return "ACCOMMODATION";
72
+ case ScholarshipFormat.TRAVEL_EXPENSES:
73
+ return "TRAVEL_EXPENSES";
74
+ case ScholarshipFormat.SPOUSE_CHILD_CARE:
75
+ return "SPOUSE_CHILD_CARE";
76
+ case ScholarshipFormat.HEALTH:
77
+ return "HEALTH";
78
+ case ScholarshipFormat.APPLICATION:
79
+ return "APPLICATION";
80
+ case ScholarshipFormat.OTHER:
81
+ return "OTHER";
82
+ case ScholarshipFormat.UNRECOGNIZED:
83
+ default:
84
+ return "UNRECOGNIZED";
85
+ }
86
+ }
87
+ export const ScholarshipDetail = {
88
+ fromJSON(object) {
89
+ return {
90
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
91
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
92
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
93
+ benefitText: isSet(object.benefitText) ? globalThis.String(object.benefitText) : "",
94
+ deadlineText: isSet(object.deadlineText) ? globalThis.String(object.deadlineText) : "",
95
+ providerId: isSet(object.providerId) ? globalThis.String(object.providerId) : "",
96
+ providerName: isSet(object.providerName) ? globalThis.String(object.providerName) : "",
97
+ providerLocation: isSet(object.providerLocation) ? globalThis.String(object.providerLocation) : "",
98
+ originCountryIds: globalThis.Array.isArray(object?.originCountryIds)
99
+ ? object.originCountryIds.map((e) => globalThis.Number(e))
100
+ : [],
101
+ isUniversityProvider: isSet(object.isUniversityProvider)
102
+ ? globalThis.Boolean(object.isUniversityProvider)
103
+ : false,
104
+ descriptionOfApplicationBasis: isSet(object.descriptionOfApplicationBasis)
105
+ ? globalThis.String(object.descriptionOfApplicationBasis)
106
+ : undefined,
107
+ grantCurrencyIso: isSet(object.grantCurrencyIso) ? globalThis.String(object.grantCurrencyIso) : "",
108
+ grantAmount: isSet(object.grantAmount) ? globalThis.Number(object.grantAmount) : 0,
109
+ grantDescription: isSet(object.grantDescription) ? globalThis.String(object.grantDescription) : undefined,
110
+ virtualName: isSet(object.virtualName) ? globalThis.String(object.virtualName) : undefined,
111
+ premiumOrganisationLogo: isSet(object.premiumOrganisationLogo)
112
+ ? globalThis.String(object.premiumOrganisationLogo)
113
+ : "",
114
+ qualifiedDisciplines: isSet(object.qualifiedDisciplines)
115
+ ? QualifiedDiscipline.fromJSON(object.qualifiedDisciplines)
116
+ : undefined,
117
+ qualifiedDestinationCountries: isSet(object.qualifiedDestinationCountries)
118
+ ? QualifiedCountries.fromJSON(object.qualifiedDestinationCountries)
119
+ : undefined,
120
+ qualifiedOriginCountries: isSet(object.qualifiedOriginCountries)
121
+ ? QualifiedCountries.fromJSON(object.qualifiedOriginCountries)
122
+ : undefined,
123
+ organisationInformation: isSet(object.organisationInformation)
124
+ ? OrganisationInformation.fromJSON(object.organisationInformation)
125
+ : undefined,
126
+ requiredExperienceText: isSet(object.requiredExperienceText)
127
+ ? globalThis.String(object.requiredExperienceText)
128
+ : undefined,
129
+ providerLink: isSet(object.providerLink) ? Link.fromJSON(object.providerLink) : undefined,
130
+ hasProviderId: isSet(object.hasProviderId) ? globalThis.Boolean(object.hasProviderId) : false,
131
+ hasGrantAmount: isSet(object.hasGrantAmount) ? globalThis.Boolean(object.hasGrantAmount) : false,
132
+ hasGrantCurrencyIso: isSet(object.hasGrantCurrencyIso) ? globalThis.Boolean(object.hasGrantCurrencyIso) : false,
133
+ applicationBasis: isSet(object.applicationBasis) ? ApplicationBasis.fromJSON(object.applicationBasis) : undefined,
134
+ canShowMPower: isSet(object.canShowMPower) ? globalThis.Boolean(object.canShowMPower) : false,
135
+ degrees: globalThis.Array.isArray(object?.degrees)
136
+ ? object.degrees.map((e) => Degree.fromJSON(e))
137
+ : [],
138
+ summary: isSet(object.summary) ? globalThis.String(object.summary) : "",
139
+ isAwardedMultipleTimes: isSet(object.isAwardedMultipleTimes)
140
+ ? globalThis.Boolean(object.isAwardedMultipleTimes)
141
+ : false,
142
+ scholarshipFormats: globalThis.Array.isArray(object?.scholarshipFormats)
143
+ ? object.scholarshipFormats.map((e) => scholarshipFormatFromJSON(e))
144
+ : [],
145
+ eligibilityText: isSet(object.eligibilityText) ? globalThis.String(object.eligibilityText) : "",
146
+ hasAgeMinimum: isSet(object.hasAgeMinimum) ? globalThis.Boolean(object.hasAgeMinimum) : false,
147
+ ageMinimum: isSet(object.ageMinimum) ? globalThis.Number(object.ageMinimum) : undefined,
148
+ hasAgeMaximum: isSet(object.hasAgeMaximum) ? globalThis.Boolean(object.hasAgeMaximum) : false,
149
+ ageMaximum: isSet(object.ageMaximum) ? globalThis.Number(object.ageMaximum) : undefined,
150
+ hasApplicationInfo: isSet(object.hasApplicationInfo) ? globalThis.Boolean(object.hasApplicationInfo) : false,
151
+ applicationInfo: isSet(object.applicationInfo) ? RichText.fromJSON(object.applicationInfo) : undefined,
152
+ sourceUrl: isSet(object.sourceUrl) ? globalThis.String(object.sourceUrl) : undefined,
153
+ descriptionText: isSet(object.descriptionText) ? globalThis.String(object.descriptionText) : undefined,
154
+ mastersEligibleProgrammes: globalThis.Array.isArray(object?.mastersEligibleProgrammes)
155
+ ? object.mastersEligibleProgrammes.map((e) => EligibleProgramme.fromJSON(e))
156
+ : [],
157
+ bachelorsEligibleProgrammes: globalThis.Array.isArray(object?.bachelorsEligibleProgrammes)
158
+ ? object.bachelorsEligibleProgrammes.map((e) => EligibleProgramme.fromJSON(e))
159
+ : [],
160
+ phdEligibleProgrammes: globalThis.Array.isArray(object?.phdEligibleProgrammes)
161
+ ? object.phdEligibleProgrammes.map((e) => EligibleProgramme.fromJSON(e))
162
+ : [],
163
+ benefits: isSet(object.benefits) ? globalThis.String(object.benefits) : undefined,
164
+ };
165
+ },
166
+ toJSON(message) {
167
+ const obj = {};
168
+ if (message.id !== 0) {
169
+ obj.id = Math.round(message.id);
170
+ }
171
+ if (message.title !== "") {
172
+ obj.title = message.title;
173
+ }
174
+ if (message.description !== "") {
175
+ obj.description = message.description;
176
+ }
177
+ if (message.benefitText !== "") {
178
+ obj.benefitText = message.benefitText;
179
+ }
180
+ if (message.deadlineText !== "") {
181
+ obj.deadlineText = message.deadlineText;
182
+ }
183
+ if (message.providerId !== "") {
184
+ obj.providerId = message.providerId;
185
+ }
186
+ if (message.providerName !== "") {
187
+ obj.providerName = message.providerName;
188
+ }
189
+ if (message.providerLocation !== "") {
190
+ obj.providerLocation = message.providerLocation;
191
+ }
192
+ if (message.originCountryIds?.length) {
193
+ obj.originCountryIds = message.originCountryIds.map((e) => Math.round(e));
194
+ }
195
+ if (message.isUniversityProvider !== false) {
196
+ obj.isUniversityProvider = message.isUniversityProvider;
197
+ }
198
+ if (message.descriptionOfApplicationBasis !== undefined) {
199
+ obj.descriptionOfApplicationBasis = message.descriptionOfApplicationBasis;
200
+ }
201
+ if (message.grantCurrencyIso !== "") {
202
+ obj.grantCurrencyIso = message.grantCurrencyIso;
203
+ }
204
+ if (message.grantAmount !== 0) {
205
+ obj.grantAmount = message.grantAmount;
206
+ }
207
+ if (message.grantDescription !== undefined) {
208
+ obj.grantDescription = message.grantDescription;
209
+ }
210
+ if (message.virtualName !== undefined) {
211
+ obj.virtualName = message.virtualName;
212
+ }
213
+ if (message.premiumOrganisationLogo !== "") {
214
+ obj.premiumOrganisationLogo = message.premiumOrganisationLogo;
215
+ }
216
+ if (message.qualifiedDisciplines !== undefined) {
217
+ obj.qualifiedDisciplines = QualifiedDiscipline.toJSON(message.qualifiedDisciplines);
218
+ }
219
+ if (message.qualifiedDestinationCountries !== undefined) {
220
+ obj.qualifiedDestinationCountries = QualifiedCountries.toJSON(message.qualifiedDestinationCountries);
221
+ }
222
+ if (message.qualifiedOriginCountries !== undefined) {
223
+ obj.qualifiedOriginCountries = QualifiedCountries.toJSON(message.qualifiedOriginCountries);
224
+ }
225
+ if (message.organisationInformation !== undefined) {
226
+ obj.organisationInformation = OrganisationInformation.toJSON(message.organisationInformation);
227
+ }
228
+ if (message.requiredExperienceText !== undefined) {
229
+ obj.requiredExperienceText = message.requiredExperienceText;
230
+ }
231
+ if (message.providerLink !== undefined) {
232
+ obj.providerLink = Link.toJSON(message.providerLink);
233
+ }
234
+ if (message.hasProviderId !== false) {
235
+ obj.hasProviderId = message.hasProviderId;
236
+ }
237
+ if (message.hasGrantAmount !== false) {
238
+ obj.hasGrantAmount = message.hasGrantAmount;
239
+ }
240
+ if (message.hasGrantCurrencyIso !== false) {
241
+ obj.hasGrantCurrencyIso = message.hasGrantCurrencyIso;
242
+ }
243
+ if (message.applicationBasis !== undefined) {
244
+ obj.applicationBasis = ApplicationBasis.toJSON(message.applicationBasis);
245
+ }
246
+ if (message.canShowMPower !== false) {
247
+ obj.canShowMPower = message.canShowMPower;
248
+ }
249
+ if (message.degrees?.length) {
250
+ obj.degrees = message.degrees.map((e) => Degree.toJSON(e));
251
+ }
252
+ if (message.summary !== "") {
253
+ obj.summary = message.summary;
254
+ }
255
+ if (message.isAwardedMultipleTimes !== false) {
256
+ obj.isAwardedMultipleTimes = message.isAwardedMultipleTimes;
257
+ }
258
+ if (message.scholarshipFormats?.length) {
259
+ obj.scholarshipFormats = message.scholarshipFormats.map((e) => scholarshipFormatToJSON(e));
260
+ }
261
+ if (message.eligibilityText !== "") {
262
+ obj.eligibilityText = message.eligibilityText;
263
+ }
264
+ if (message.hasAgeMinimum !== false) {
265
+ obj.hasAgeMinimum = message.hasAgeMinimum;
266
+ }
267
+ if (message.ageMinimum !== undefined) {
268
+ obj.ageMinimum = Math.round(message.ageMinimum);
269
+ }
270
+ if (message.hasAgeMaximum !== false) {
271
+ obj.hasAgeMaximum = message.hasAgeMaximum;
272
+ }
273
+ if (message.ageMaximum !== undefined) {
274
+ obj.ageMaximum = Math.round(message.ageMaximum);
275
+ }
276
+ if (message.hasApplicationInfo !== false) {
277
+ obj.hasApplicationInfo = message.hasApplicationInfo;
278
+ }
279
+ if (message.applicationInfo !== undefined) {
280
+ obj.applicationInfo = RichText.toJSON(message.applicationInfo);
281
+ }
282
+ if (message.sourceUrl !== undefined) {
283
+ obj.sourceUrl = message.sourceUrl;
284
+ }
285
+ if (message.descriptionText !== undefined) {
286
+ obj.descriptionText = message.descriptionText;
287
+ }
288
+ if (message.mastersEligibleProgrammes?.length) {
289
+ obj.mastersEligibleProgrammes = message.mastersEligibleProgrammes.map((e) => EligibleProgramme.toJSON(e));
290
+ }
291
+ if (message.bachelorsEligibleProgrammes?.length) {
292
+ obj.bachelorsEligibleProgrammes = message.bachelorsEligibleProgrammes.map((e) => EligibleProgramme.toJSON(e));
293
+ }
294
+ if (message.phdEligibleProgrammes?.length) {
295
+ obj.phdEligibleProgrammes = message.phdEligibleProgrammes.map((e) => EligibleProgramme.toJSON(e));
296
+ }
297
+ if (message.benefits !== undefined) {
298
+ obj.benefits = message.benefits;
299
+ }
300
+ return obj;
301
+ },
302
+ };
303
+ export const QualifiedDiscipline = {
304
+ fromJSON(object) {
305
+ return {
306
+ list: globalThis.Array.isArray(object?.list) ? object.list.map((e) => Discipline.fromJSON(e)) : [],
307
+ count: isSet(object.count) ? globalThis.Number(object.count) : 0,
308
+ all: isSet(object.all) ? globalThis.Boolean(object.all) : false,
309
+ included: isSet(object.included) ? globalThis.Boolean(object.included) : false,
310
+ };
311
+ },
312
+ toJSON(message) {
313
+ const obj = {};
314
+ if (message.list?.length) {
315
+ obj.list = message.list.map((e) => Discipline.toJSON(e));
316
+ }
317
+ if (message.count !== 0) {
318
+ obj.count = Math.round(message.count);
319
+ }
320
+ if (message.all !== false) {
321
+ obj.all = message.all;
322
+ }
323
+ if (message.included !== false) {
324
+ obj.included = message.included;
325
+ }
326
+ return obj;
327
+ },
328
+ };
329
+ export const QualifiedCountries = {
330
+ fromJSON(object) {
331
+ return {
332
+ list: globalThis.Array.isArray(object?.list) ? object.list.map((e) => Country.fromJSON(e)) : [],
333
+ count: isSet(object.count) ? globalThis.Number(object.count) : 0,
334
+ all: isSet(object.all) ? globalThis.Boolean(object.all) : false,
335
+ included: isSet(object.included) ? globalThis.Boolean(object.included) : false,
336
+ };
337
+ },
338
+ toJSON(message) {
339
+ const obj = {};
340
+ if (message.list?.length) {
341
+ obj.list = message.list.map((e) => Country.toJSON(e));
342
+ }
343
+ if (message.count !== 0) {
344
+ obj.count = Math.round(message.count);
345
+ }
346
+ if (message.all !== false) {
347
+ obj.all = message.all;
348
+ }
349
+ if (message.included !== false) {
350
+ obj.included = message.included;
351
+ }
352
+ return obj;
353
+ },
354
+ };
355
+ export const ApplicationBasis = {
356
+ fromJSON(object) {
357
+ return {
358
+ isMeritBased: isSet(object.isMeritBased) ? globalThis.Boolean(object.isMeritBased) : false,
359
+ isNeedBased: isSet(object.isNeedBased) ? globalThis.Boolean(object.isNeedBased) : false,
360
+ };
361
+ },
362
+ toJSON(message) {
363
+ const obj = {};
364
+ if (message.isMeritBased !== false) {
365
+ obj.isMeritBased = message.isMeritBased;
366
+ }
367
+ if (message.isNeedBased !== false) {
368
+ obj.isNeedBased = message.isNeedBased;
369
+ }
370
+ return obj;
371
+ },
372
+ };
373
+ export const Degree = {
374
+ fromJSON(object) {
375
+ return {
376
+ isMaster: isSet(object.isMaster) ? globalThis.Boolean(object.isMaster) : false,
377
+ isBachelor: isSet(object.isBachelor) ? globalThis.Boolean(object.isBachelor) : false,
378
+ isPhD: isSet(object.isPhD) ? globalThis.Boolean(object.isPhD) : false,
379
+ };
380
+ },
381
+ toJSON(message) {
382
+ const obj = {};
383
+ if (message.isMaster !== false) {
384
+ obj.isMaster = message.isMaster;
385
+ }
386
+ if (message.isBachelor !== false) {
387
+ obj.isBachelor = message.isBachelor;
388
+ }
389
+ if (message.isPhD !== false) {
390
+ obj.isPhD = message.isPhD;
391
+ }
392
+ return obj;
393
+ },
394
+ };
395
+ export const EligibleProgramme = {
396
+ fromJSON(object) {
397
+ return {
398
+ discipline: isSet(object.discipline) ? Discipline.fromJSON(object.discipline) : undefined,
399
+ countryIsoCode: isSet(object.countryIsoCode) ? globalThis.String(object.countryIsoCode) : undefined,
400
+ programmeIds: globalThis.Array.isArray(object?.programmeIds)
401
+ ? object.programmeIds.map((e) => globalThis.String(e))
402
+ : [],
403
+ isDiscipline: isSet(object.isDiscipline) ? globalThis.Boolean(object.isDiscipline) : false,
404
+ programmeCards: globalThis.Array.isArray(object?.programmeCards)
405
+ ? object.programmeCards.map((e) => ProgrammeCard.fromJSON(e))
406
+ : [],
407
+ };
408
+ },
409
+ toJSON(message) {
410
+ const obj = {};
411
+ if (message.discipline !== undefined) {
412
+ obj.discipline = Discipline.toJSON(message.discipline);
413
+ }
414
+ if (message.countryIsoCode !== undefined) {
415
+ obj.countryIsoCode = message.countryIsoCode;
416
+ }
417
+ if (message.programmeIds?.length) {
418
+ obj.programmeIds = message.programmeIds;
419
+ }
420
+ if (message.isDiscipline !== false) {
421
+ obj.isDiscipline = message.isDiscipline;
422
+ }
423
+ if (message.programmeCards?.length) {
424
+ obj.programmeCards = message.programmeCards.map((e) => ProgrammeCard.toJSON(e));
425
+ }
426
+ return obj;
427
+ },
428
+ };
429
+ function isSet(value) {
430
+ return value !== null && value !== undefined;
431
+ }
@@ -144,11 +144,11 @@ export interface ISearchProjection {
144
144
  */
145
145
  getSpecialStudy(): string[];
146
146
  /**
147
- * List of the start months for the programme.
147
+ * List of the start dates for the programme.
148
148
  *
149
- * @return number[]
149
+ * @return string[]
150
150
  */
151
- getStartDates(): number[];
151
+ getStartDates(): string[];
152
152
  /**
153
153
  * Summary text of the programme (stripped of html tags).
154
154
  *