@studyportals/domain-client 10.0.0 → 10.0.1-beta.3

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.0",
3
+ "version": "10.0.1-beta.3",
4
4
  "description": "Responsible for fetching data from the Domain API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -9,6 +9,7 @@ export interface PartnerApiOrganisation {
9
9
  about?: string | undefined;
10
10
  locations: Location[];
11
11
  links: SocialLink[];
12
+ isoCode: string;
12
13
  }
13
14
  export declare const PartnerApiOrganisation: MessageFns<PartnerApiOrganisation>;
14
15
  interface MessageFns<T> {
@@ -21,6 +21,7 @@ export const PartnerApiOrganisation = {
21
21
  links: globalThis.Array.isArray(object?.links)
22
22
  ? object.links.map((e) => SocialLink.fromJSON(e))
23
23
  : [],
24
+ isoCode: isSet(object.isoCode) ? globalThis.String(object.isoCode) : "",
24
25
  };
25
26
  },
26
27
  toJSON(message) {
@@ -46,6 +47,9 @@ export const PartnerApiOrganisation = {
46
47
  if (message.links?.length) {
47
48
  obj.links = message.links.map((e) => SocialLink.toJSON(e));
48
49
  }
50
+ if (message.isoCode !== "") {
51
+ obj.isoCode = message.isoCode;
52
+ }
49
53
  return obj;
50
54
  },
51
55
  };
@@ -1,7 +1,8 @@
1
+ import { Duration } from "../Duration.js";
1
2
  import { Location } from "../Location.js";
2
3
  import { Logo } from "../Logo.js";
3
- import { TuitionFee as TuitionFeeDetails } from "../TuitionFee.js";
4
4
  import { Timing } from "../Timing.js";
5
+ import { TuitionFee } from "../TuitionFee.js";
5
6
  export interface PartnerApiProgramme {
6
7
  id: number;
7
8
  title: string;
@@ -9,11 +10,28 @@ export interface PartnerApiProgramme {
9
10
  degreeFormatted: string;
10
11
  summary?: string | undefined;
11
12
  logo?: Logo | undefined;
12
- tuitionFeeDetails?: TuitionFeeDetails | undefined;
13
+ tuitionFees: TuitionFee[];
13
14
  locations: Location[];
14
15
  timings: Timing[];
16
+ isPublic: boolean;
17
+ isFullyOnline: boolean;
18
+ isOnline: boolean;
19
+ isOnCampus: boolean;
20
+ isBlended: boolean;
21
+ isFullTime: boolean;
22
+ isPartTime: boolean;
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[];
15
32
  }
16
33
  export declare const PartnerApiProgramme: MessageFns<PartnerApiProgramme>;
34
+ export declare const PartnerApiProgramOrganisationInformation: MessageFns<PartnerApiProgramOrganisationInformation>;
17
35
  interface MessageFns<T> {
18
36
  fromJSON(object: any): T;
19
37
  toJSON(message: T): unknown;
@@ -4,10 +4,11 @@
4
4
  // protoc v3.21.12
5
5
  // source: PartnerApi/PartnerApiProgramme.proto
6
6
  /* eslint-disable */
7
+ import { Duration } from "../Duration.js";
7
8
  import { Location } from "../Location.js";
8
9
  import { Logo } from "../Logo.js";
9
- import { TuitionFee as TuitionFeeDetails } from "../TuitionFee.js";
10
10
  import { Timing } from "../Timing.js";
11
+ import { TuitionFee } from "../TuitionFee.js";
11
12
  export const PartnerApiProgramme = {
12
13
  fromJSON(object) {
13
14
  return {
@@ -17,13 +18,28 @@ export const PartnerApiProgramme = {
17
18
  degreeFormatted: isSet(object.degreeFormatted) ? globalThis.String(object.degreeFormatted) : "",
18
19
  summary: isSet(object.summary) ? globalThis.String(object.summary) : undefined,
19
20
  logo: isSet(object.logo) ? Logo.fromJSON(object.logo) : undefined,
20
- tuitionFeeDetails: isSet(object.tuitionFeeDetails)
21
- ? TuitionFeeDetails.fromJSON(object.tuitionFeeDetails)
22
- : undefined,
21
+ tuitionFees: globalThis.Array.isArray(object?.tuitionFees)
22
+ ? object.tuitionFees.map((e) => TuitionFee.fromJSON(e))
23
+ : [],
23
24
  locations: globalThis.Array.isArray(object?.locations)
24
25
  ? object.locations.map((e) => Location.fromJSON(e))
25
26
  : [],
26
27
  timings: globalThis.Array.isArray(object?.timings) ? object.timings.map((e) => Timing.fromJSON(e)) : [],
28
+ isPublic: isSet(object.isPublic) ? globalThis.Boolean(object.isPublic) : false,
29
+ isFullyOnline: isSet(object.isFullyOnline) ? globalThis.Boolean(object.isFullyOnline) : false,
30
+ isOnline: isSet(object.isOnline) ? globalThis.Boolean(object.isOnline) : false,
31
+ isOnCampus: isSet(object.isOnCampus) ? globalThis.Boolean(object.isOnCampus) : false,
32
+ isBlended: isSet(object.isBlended) ? globalThis.Boolean(object.isBlended) : false,
33
+ isFullTime: isSet(object.isFullTime) ? globalThis.Boolean(object.isFullTime) : false,
34
+ isPartTime: isSet(object.isPartTime) ? globalThis.Boolean(object.isPartTime) : false,
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
+ : [],
27
43
  };
28
44
  },
29
45
  toJSON(message) {
@@ -46,8 +62,8 @@ export const PartnerApiProgramme = {
46
62
  if (message.logo !== undefined) {
47
63
  obj.logo = Logo.toJSON(message.logo);
48
64
  }
49
- if (message.tuitionFeeDetails !== undefined) {
50
- obj.tuitionFeeDetails = TuitionFeeDetails.toJSON(message.tuitionFeeDetails);
65
+ if (message.tuitionFees?.length) {
66
+ obj.tuitionFees = message.tuitionFees.map((e) => TuitionFee.toJSON(e));
51
67
  }
52
68
  if (message.locations?.length) {
53
69
  obj.locations = message.locations.map((e) => Location.toJSON(e));
@@ -55,6 +71,63 @@ export const PartnerApiProgramme = {
55
71
  if (message.timings?.length) {
56
72
  obj.timings = message.timings.map((e) => Timing.toJSON(e));
57
73
  }
74
+ if (message.isPublic !== false) {
75
+ obj.isPublic = message.isPublic;
76
+ }
77
+ if (message.isFullyOnline !== false) {
78
+ obj.isFullyOnline = message.isFullyOnline;
79
+ }
80
+ if (message.isOnline !== false) {
81
+ obj.isOnline = message.isOnline;
82
+ }
83
+ if (message.isOnCampus !== false) {
84
+ obj.isOnCampus = message.isOnCampus;
85
+ }
86
+ if (message.isBlended !== false) {
87
+ obj.isBlended = message.isBlended;
88
+ }
89
+ if (message.isFullTime !== false) {
90
+ obj.isFullTime = message.isFullTime;
91
+ }
92
+ if (message.isPartTime !== false) {
93
+ obj.isPartTime = message.isPartTime;
94
+ }
95
+ if (message.duration !== undefined) {
96
+ obj.duration = Duration.toJSON(message.duration);
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
+ }
58
131
  return obj;
59
132
  },
60
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,8 @@ 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;
15
16
  }
16
17
  export interface PartnerApiFunding {
17
18
  kind: string;
@@ -21,9 +22,9 @@ export interface PartnerApiFunding {
21
22
  description?: string | undefined;
22
23
  }
23
24
  export interface PartnerApiEligibility {
24
- nationality?: string | undefined;
25
- studyLevel?: string | undefined;
26
- scholarshipType?: string | undefined;
25
+ nationality?: QualifiedCountries | undefined;
26
+ studyLevel: Degree[];
27
+ scholarshipType: ApplicationBasis[];
27
28
  description?: string | undefined;
28
29
  }
29
30
  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,10 @@ 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) : "",
27
28
  };
28
29
  },
29
30
  toJSON(message) {
@@ -55,12 +56,12 @@ export const PartnerApiScholarship = {
55
56
  if (message.providerLogo !== undefined) {
56
57
  obj.providerLogo = message.providerLogo;
57
58
  }
58
- if (message.sourceUrl !== undefined) {
59
- obj.sourceUrl = message.sourceUrl;
60
- }
61
59
  if (message.organisation !== undefined) {
62
60
  obj.organisation = PartnerApiScholarshipOrganisation.toJSON(message.organisation);
63
61
  }
62
+ if (message.grantCurrencyIso !== "") {
63
+ obj.grantCurrencyIso = message.grantCurrencyIso;
64
+ }
64
65
  return obj;
65
66
  },
66
67
  };
@@ -97,22 +98,26 @@ export const PartnerApiFunding = {
97
98
  export const PartnerApiEligibility = {
98
99
  fromJSON(object) {
99
100
  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,
101
+ nationality: isSet(object.nationality) ? QualifiedCountries.fromJSON(object.nationality) : undefined,
102
+ studyLevel: globalThis.Array.isArray(object?.studyLevel)
103
+ ? object.studyLevel.map((e) => Degree.fromJSON(e))
104
+ : [],
105
+ scholarshipType: globalThis.Array.isArray(object?.scholarshipType)
106
+ ? object.scholarshipType.map((e) => ApplicationBasis.fromJSON(e))
107
+ : [],
103
108
  description: isSet(object.description) ? globalThis.String(object.description) : undefined,
104
109
  };
105
110
  },
106
111
  toJSON(message) {
107
112
  const obj = {};
108
113
  if (message.nationality !== undefined) {
109
- obj.nationality = message.nationality;
114
+ obj.nationality = QualifiedCountries.toJSON(message.nationality);
110
115
  }
111
- if (message.studyLevel !== undefined) {
112
- obj.studyLevel = message.studyLevel;
116
+ if (message.studyLevel?.length) {
117
+ obj.studyLevel = message.studyLevel.map((e) => Degree.toJSON(e));
113
118
  }
114
- if (message.scholarshipType !== undefined) {
115
- obj.scholarshipType = message.scholarshipType;
119
+ if (message.scholarshipType?.length) {
120
+ obj.scholarshipType = message.scholarshipType.map((e) => ApplicationBasis.toJSON(e));
116
121
  }
117
122
  if (message.description !== undefined) {
118
123
  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
+ }