@studyportals/domain-client 8.5.0 → 8.5.1-beta.16

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": "8.5.0",
3
+ "version": "8.5.1-beta.16",
4
4
  "description": "Responsible for fetching data from the Domain API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -0,0 +1,18 @@
1
+ import { File } from "../File.js";
2
+ import { Location } from "../Location.js";
3
+ import { SocialLink } from "../SocialLink.js";
4
+ export interface PartnerApiOrganisation {
5
+ id: number;
6
+ name: string;
7
+ logo?: File | undefined;
8
+ location?: string | undefined;
9
+ about?: string | undefined;
10
+ locations: Location[];
11
+ links: SocialLink[];
12
+ }
13
+ export declare const PartnerApiOrganisation: MessageFns<PartnerApiOrganisation>;
14
+ interface MessageFns<T> {
15
+ fromJSON(object: any): T;
16
+ toJSON(message: T): unknown;
17
+ }
18
+ export {};
@@ -0,0 +1,54 @@
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: PartnerApi/PartnerApiOrganisation.proto
6
+ /* eslint-disable */
7
+ import { File } from "../File.js";
8
+ import { Location } from "../Location.js";
9
+ import { SocialLink } from "../SocialLink.js";
10
+ export const PartnerApiOrganisation = {
11
+ fromJSON(object) {
12
+ return {
13
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
14
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
15
+ logo: isSet(object.logo) ? File.fromJSON(object.logo) : undefined,
16
+ location: isSet(object.location) ? globalThis.String(object.location) : undefined,
17
+ about: isSet(object.about) ? globalThis.String(object.about) : undefined,
18
+ locations: globalThis.Array.isArray(object?.locations)
19
+ ? object.locations.map((e) => Location.fromJSON(e))
20
+ : [],
21
+ links: globalThis.Array.isArray(object?.links)
22
+ ? object.links.map((e) => SocialLink.fromJSON(e))
23
+ : [],
24
+ };
25
+ },
26
+ toJSON(message) {
27
+ const obj = {};
28
+ if (message.id !== 0) {
29
+ obj.id = Math.round(message.id);
30
+ }
31
+ if (message.name !== "") {
32
+ obj.name = message.name;
33
+ }
34
+ if (message.logo !== undefined) {
35
+ obj.logo = File.toJSON(message.logo);
36
+ }
37
+ if (message.location !== undefined) {
38
+ obj.location = message.location;
39
+ }
40
+ if (message.about !== undefined) {
41
+ obj.about = message.about;
42
+ }
43
+ if (message.locations?.length) {
44
+ obj.locations = message.locations.map((e) => Location.toJSON(e));
45
+ }
46
+ if (message.links?.length) {
47
+ obj.links = message.links.map((e) => SocialLink.toJSON(e));
48
+ }
49
+ return obj;
50
+ },
51
+ };
52
+ function isSet(value) {
53
+ return value !== null && value !== undefined;
54
+ }
@@ -0,0 +1,21 @@
1
+ import { Location } from "../Location.js";
2
+ import { Logo } from "../Logo.js";
3
+ import { TuitionFee as TuitionFeeDetails } from "../TuitionFee.js";
4
+ import { Timing } from "../Timing.js";
5
+ export interface PartnerApiProgramme {
6
+ id: number;
7
+ title: string;
8
+ pagePortalType: string;
9
+ degreeFormatted: string;
10
+ summary?: string | undefined;
11
+ logo?: Logo | undefined;
12
+ tuitionFeeDetails?: TuitionFeeDetails | undefined;
13
+ locations: Location[];
14
+ timings: Timing[];
15
+ }
16
+ export declare const PartnerApiProgramme: MessageFns<PartnerApiProgramme>;
17
+ interface MessageFns<T> {
18
+ fromJSON(object: any): T;
19
+ toJSON(message: T): unknown;
20
+ }
21
+ export {};
@@ -0,0 +1,63 @@
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: PartnerApi/PartnerApiProgramme.proto
6
+ /* eslint-disable */
7
+ import { Location } from "../Location.js";
8
+ import { Logo } from "../Logo.js";
9
+ import { TuitionFee as TuitionFeeDetails } from "../TuitionFee.js";
10
+ import { Timing } from "../Timing.js";
11
+ export const PartnerApiProgramme = {
12
+ fromJSON(object) {
13
+ return {
14
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
15
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
16
+ pagePortalType: isSet(object.pagePortalType) ? globalThis.String(object.pagePortalType) : "",
17
+ degreeFormatted: isSet(object.degreeFormatted) ? globalThis.String(object.degreeFormatted) : "",
18
+ summary: isSet(object.summary) ? globalThis.String(object.summary) : undefined,
19
+ logo: isSet(object.logo) ? Logo.fromJSON(object.logo) : undefined,
20
+ tuitionFeeDetails: isSet(object.tuitionFeeDetails)
21
+ ? TuitionFeeDetails.fromJSON(object.tuitionFeeDetails)
22
+ : undefined,
23
+ locations: globalThis.Array.isArray(object?.locations)
24
+ ? object.locations.map((e) => Location.fromJSON(e))
25
+ : [],
26
+ timings: globalThis.Array.isArray(object?.timings) ? object.timings.map((e) => Timing.fromJSON(e)) : [],
27
+ };
28
+ },
29
+ toJSON(message) {
30
+ const obj = {};
31
+ if (message.id !== 0) {
32
+ obj.id = Math.round(message.id);
33
+ }
34
+ if (message.title !== "") {
35
+ obj.title = message.title;
36
+ }
37
+ if (message.pagePortalType !== "") {
38
+ obj.pagePortalType = message.pagePortalType;
39
+ }
40
+ if (message.degreeFormatted !== "") {
41
+ obj.degreeFormatted = message.degreeFormatted;
42
+ }
43
+ if (message.summary !== undefined) {
44
+ obj.summary = message.summary;
45
+ }
46
+ if (message.logo !== undefined) {
47
+ obj.logo = Logo.toJSON(message.logo);
48
+ }
49
+ if (message.tuitionFeeDetails !== undefined) {
50
+ obj.tuitionFeeDetails = TuitionFeeDetails.toJSON(message.tuitionFeeDetails);
51
+ }
52
+ if (message.locations?.length) {
53
+ obj.locations = message.locations.map((e) => Location.toJSON(e));
54
+ }
55
+ if (message.timings?.length) {
56
+ obj.timings = message.timings.map((e) => Timing.toJSON(e));
57
+ }
58
+ return obj;
59
+ },
60
+ };
61
+ function isSet(value) {
62
+ return value !== null && value !== undefined;
63
+ }
@@ -0,0 +1,42 @@
1
+ import { Link } from "../Link.js";
2
+ import { Location } from "../Location.js";
3
+ export interface PartnerApiScholarship {
4
+ id: string;
5
+ title: string;
6
+ providerName?: string | undefined;
7
+ providerLocation?: string | undefined;
8
+ scholarshipDetailsLink?: Link | undefined;
9
+ funding?: PartnerApiFunding | undefined;
10
+ eligibility?: PartnerApiEligibility | undefined;
11
+ about?: string | undefined;
12
+ providerLogo?: string | undefined;
13
+ sourceUrl?: string | undefined;
14
+ organisation?: PartnerApiScholarshipOrganisation | undefined;
15
+ }
16
+ export interface PartnerApiFunding {
17
+ kind: string;
18
+ hasGrantAmount: boolean;
19
+ grantAmount?: number | undefined;
20
+ grantCurrencyIso?: string | undefined;
21
+ description?: string | undefined;
22
+ }
23
+ export interface PartnerApiEligibility {
24
+ nationality?: string | undefined;
25
+ studyLevel?: string | undefined;
26
+ scholarshipType?: string | undefined;
27
+ description?: string | undefined;
28
+ }
29
+ export interface PartnerApiScholarshipOrganisation {
30
+ id: number;
31
+ name: string;
32
+ locations: Location[];
33
+ }
34
+ export declare const PartnerApiScholarship: MessageFns<PartnerApiScholarship>;
35
+ export declare const PartnerApiFunding: MessageFns<PartnerApiFunding>;
36
+ export declare const PartnerApiEligibility: MessageFns<PartnerApiEligibility>;
37
+ export declare const PartnerApiScholarshipOrganisation: MessageFns<PartnerApiScholarshipOrganisation>;
38
+ interface MessageFns<T> {
39
+ fromJSON(object: any): T;
40
+ toJSON(message: T): unknown;
41
+ }
42
+ export {};
@@ -0,0 +1,149 @@
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: PartnerApi/PartnerApiScholarship.proto
6
+ /* eslint-disable */
7
+ import { Link } from "../Link.js";
8
+ import { Location } from "../Location.js";
9
+ export const PartnerApiScholarship = {
10
+ fromJSON(object) {
11
+ return {
12
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
13
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
14
+ providerName: isSet(object.providerName) ? globalThis.String(object.providerName) : undefined,
15
+ providerLocation: isSet(object.providerLocation) ? globalThis.String(object.providerLocation) : undefined,
16
+ scholarshipDetailsLink: isSet(object.scholarshipDetailsLink)
17
+ ? Link.fromJSON(object.scholarshipDetailsLink)
18
+ : undefined,
19
+ funding: isSet(object.funding) ? PartnerApiFunding.fromJSON(object.funding) : undefined,
20
+ eligibility: isSet(object.eligibility) ? PartnerApiEligibility.fromJSON(object.eligibility) : undefined,
21
+ about: isSet(object.about) ? globalThis.String(object.about) : undefined,
22
+ providerLogo: isSet(object.providerLogo) ? globalThis.String(object.providerLogo) : undefined,
23
+ sourceUrl: isSet(object.sourceUrl) ? globalThis.String(object.sourceUrl) : undefined,
24
+ organisation: isSet(object.organisation)
25
+ ? PartnerApiScholarshipOrganisation.fromJSON(object.organisation)
26
+ : undefined,
27
+ };
28
+ },
29
+ toJSON(message) {
30
+ const obj = {};
31
+ if (message.id !== "") {
32
+ obj.id = message.id;
33
+ }
34
+ if (message.title !== "") {
35
+ obj.title = message.title;
36
+ }
37
+ if (message.providerName !== undefined) {
38
+ obj.providerName = message.providerName;
39
+ }
40
+ if (message.providerLocation !== undefined) {
41
+ obj.providerLocation = message.providerLocation;
42
+ }
43
+ if (message.scholarshipDetailsLink !== undefined) {
44
+ obj.scholarshipDetailsLink = Link.toJSON(message.scholarshipDetailsLink);
45
+ }
46
+ if (message.funding !== undefined) {
47
+ obj.funding = PartnerApiFunding.toJSON(message.funding);
48
+ }
49
+ if (message.eligibility !== undefined) {
50
+ obj.eligibility = PartnerApiEligibility.toJSON(message.eligibility);
51
+ }
52
+ if (message.about !== undefined) {
53
+ obj.about = message.about;
54
+ }
55
+ if (message.providerLogo !== undefined) {
56
+ obj.providerLogo = message.providerLogo;
57
+ }
58
+ if (message.sourceUrl !== undefined) {
59
+ obj.sourceUrl = message.sourceUrl;
60
+ }
61
+ if (message.organisation !== undefined) {
62
+ obj.organisation = PartnerApiScholarshipOrganisation.toJSON(message.organisation);
63
+ }
64
+ return obj;
65
+ },
66
+ };
67
+ export const PartnerApiFunding = {
68
+ fromJSON(object) {
69
+ return {
70
+ kind: isSet(object.kind) ? globalThis.String(object.kind) : "",
71
+ hasGrantAmount: isSet(object.hasGrantAmount) ? globalThis.Boolean(object.hasGrantAmount) : false,
72
+ grantAmount: isSet(object.grantAmount) ? globalThis.Number(object.grantAmount) : undefined,
73
+ grantCurrencyIso: isSet(object.grantCurrencyIso) ? globalThis.String(object.grantCurrencyIso) : undefined,
74
+ description: isSet(object.description) ? globalThis.String(object.description) : undefined,
75
+ };
76
+ },
77
+ toJSON(message) {
78
+ const obj = {};
79
+ if (message.kind !== "") {
80
+ obj.kind = message.kind;
81
+ }
82
+ if (message.hasGrantAmount !== false) {
83
+ obj.hasGrantAmount = message.hasGrantAmount;
84
+ }
85
+ if (message.grantAmount !== undefined) {
86
+ obj.grantAmount = message.grantAmount;
87
+ }
88
+ if (message.grantCurrencyIso !== undefined) {
89
+ obj.grantCurrencyIso = message.grantCurrencyIso;
90
+ }
91
+ if (message.description !== undefined) {
92
+ obj.description = message.description;
93
+ }
94
+ return obj;
95
+ },
96
+ };
97
+ export const PartnerApiEligibility = {
98
+ fromJSON(object) {
99
+ 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,
103
+ description: isSet(object.description) ? globalThis.String(object.description) : undefined,
104
+ };
105
+ },
106
+ toJSON(message) {
107
+ const obj = {};
108
+ if (message.nationality !== undefined) {
109
+ obj.nationality = message.nationality;
110
+ }
111
+ if (message.studyLevel !== undefined) {
112
+ obj.studyLevel = message.studyLevel;
113
+ }
114
+ if (message.scholarshipType !== undefined) {
115
+ obj.scholarshipType = message.scholarshipType;
116
+ }
117
+ if (message.description !== undefined) {
118
+ obj.description = message.description;
119
+ }
120
+ return obj;
121
+ },
122
+ };
123
+ export const PartnerApiScholarshipOrganisation = {
124
+ fromJSON(object) {
125
+ return {
126
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
127
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
128
+ locations: globalThis.Array.isArray(object?.locations)
129
+ ? object.locations.map((e) => Location.fromJSON(e))
130
+ : [],
131
+ };
132
+ },
133
+ toJSON(message) {
134
+ const obj = {};
135
+ if (message.id !== 0) {
136
+ obj.id = Math.round(message.id);
137
+ }
138
+ if (message.name !== "") {
139
+ obj.name = message.name;
140
+ }
141
+ if (message.locations?.length) {
142
+ obj.locations = message.locations.map((e) => Location.toJSON(e));
143
+ }
144
+ return obj;
145
+ },
146
+ };
147
+ function isSet(value) {
148
+ return value !== null && value !== undefined;
149
+ }