@studyportals/domain-client 8.5.0 → 8.5.1-beta.11
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 +1 -1
- package/protobuf/PartnerApi/Organisation.d.ts +31 -0
- package/protobuf/PartnerApi/Organisation.js +105 -0
- package/protobuf/PartnerApi/Programme.d.ts +21 -0
- package/protobuf/PartnerApi/Programme.js +59 -0
- package/protobuf/PartnerApi/Scholarship.d.ts +34 -0
- package/protobuf/PartnerApi/Scholarship.js +118 -0
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { File } from "../File.js";
|
|
2
|
+
import { Link } from "../Link.js";
|
|
3
|
+
export interface Organisation {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
logo?: File | undefined;
|
|
7
|
+
location?: string | undefined;
|
|
8
|
+
organisationLink?: Link | undefined;
|
|
9
|
+
about?: string | undefined;
|
|
10
|
+
courses?: CourseCount | undefined;
|
|
11
|
+
locations: OrganisationLocation[];
|
|
12
|
+
institutionWebsiteLink?: Link | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface CourseCount {
|
|
15
|
+
undergraduate: number;
|
|
16
|
+
postgraduate: number;
|
|
17
|
+
phd: number;
|
|
18
|
+
}
|
|
19
|
+
export interface OrganisationLocation {
|
|
20
|
+
name: string;
|
|
21
|
+
address?: string | undefined;
|
|
22
|
+
mapLink?: Link | undefined;
|
|
23
|
+
}
|
|
24
|
+
export declare const Organisation: MessageFns<Organisation>;
|
|
25
|
+
export declare const CourseCount: MessageFns<CourseCount>;
|
|
26
|
+
export declare const OrganisationLocation: MessageFns<OrganisationLocation>;
|
|
27
|
+
interface MessageFns<T> {
|
|
28
|
+
fromJSON(object: any): T;
|
|
29
|
+
toJSON(message: T): unknown;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
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/Organisation.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { File } from "../File.js";
|
|
8
|
+
import { Link } from "../Link.js";
|
|
9
|
+
export const Organisation = {
|
|
10
|
+
fromJSON(object) {
|
|
11
|
+
return {
|
|
12
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
13
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
14
|
+
logo: isSet(object.logo) ? File.fromJSON(object.logo) : undefined,
|
|
15
|
+
location: isSet(object.location) ? globalThis.String(object.location) : undefined,
|
|
16
|
+
organisationLink: isSet(object.organisationLink) ? Link.fromJSON(object.organisationLink) : undefined,
|
|
17
|
+
about: isSet(object.about) ? globalThis.String(object.about) : undefined,
|
|
18
|
+
courses: isSet(object.courses) ? CourseCount.fromJSON(object.courses) : undefined,
|
|
19
|
+
locations: globalThis.Array.isArray(object?.locations)
|
|
20
|
+
? object.locations.map((e) => OrganisationLocation.fromJSON(e))
|
|
21
|
+
: [],
|
|
22
|
+
institutionWebsiteLink: isSet(object.institutionWebsiteLink)
|
|
23
|
+
? Link.fromJSON(object.institutionWebsiteLink)
|
|
24
|
+
: undefined,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
toJSON(message) {
|
|
28
|
+
const obj = {};
|
|
29
|
+
if (message.id !== 0) {
|
|
30
|
+
obj.id = Math.round(message.id);
|
|
31
|
+
}
|
|
32
|
+
if (message.name !== "") {
|
|
33
|
+
obj.name = message.name;
|
|
34
|
+
}
|
|
35
|
+
if (message.logo !== undefined) {
|
|
36
|
+
obj.logo = File.toJSON(message.logo);
|
|
37
|
+
}
|
|
38
|
+
if (message.location !== undefined) {
|
|
39
|
+
obj.location = message.location;
|
|
40
|
+
}
|
|
41
|
+
if (message.organisationLink !== undefined) {
|
|
42
|
+
obj.organisationLink = Link.toJSON(message.organisationLink);
|
|
43
|
+
}
|
|
44
|
+
if (message.about !== undefined) {
|
|
45
|
+
obj.about = message.about;
|
|
46
|
+
}
|
|
47
|
+
if (message.courses !== undefined) {
|
|
48
|
+
obj.courses = CourseCount.toJSON(message.courses);
|
|
49
|
+
}
|
|
50
|
+
if (message.locations?.length) {
|
|
51
|
+
obj.locations = message.locations.map((e) => OrganisationLocation.toJSON(e));
|
|
52
|
+
}
|
|
53
|
+
if (message.institutionWebsiteLink !== undefined) {
|
|
54
|
+
obj.institutionWebsiteLink = Link.toJSON(message.institutionWebsiteLink);
|
|
55
|
+
}
|
|
56
|
+
return obj;
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
export const CourseCount = {
|
|
60
|
+
fromJSON(object) {
|
|
61
|
+
return {
|
|
62
|
+
undergraduate: isSet(object.undergraduate) ? globalThis.Number(object.undergraduate) : 0,
|
|
63
|
+
postgraduate: isSet(object.postgraduate) ? globalThis.Number(object.postgraduate) : 0,
|
|
64
|
+
phd: isSet(object.phd) ? globalThis.Number(object.phd) : 0,
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
toJSON(message) {
|
|
68
|
+
const obj = {};
|
|
69
|
+
if (message.undergraduate !== 0) {
|
|
70
|
+
obj.undergraduate = Math.round(message.undergraduate);
|
|
71
|
+
}
|
|
72
|
+
if (message.postgraduate !== 0) {
|
|
73
|
+
obj.postgraduate = Math.round(message.postgraduate);
|
|
74
|
+
}
|
|
75
|
+
if (message.phd !== 0) {
|
|
76
|
+
obj.phd = Math.round(message.phd);
|
|
77
|
+
}
|
|
78
|
+
return obj;
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
export const OrganisationLocation = {
|
|
82
|
+
fromJSON(object) {
|
|
83
|
+
return {
|
|
84
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
85
|
+
address: isSet(object.address) ? globalThis.String(object.address) : undefined,
|
|
86
|
+
mapLink: isSet(object.mapLink) ? Link.fromJSON(object.mapLink) : undefined,
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
toJSON(message) {
|
|
90
|
+
const obj = {};
|
|
91
|
+
if (message.name !== "") {
|
|
92
|
+
obj.name = message.name;
|
|
93
|
+
}
|
|
94
|
+
if (message.address !== undefined) {
|
|
95
|
+
obj.address = message.address;
|
|
96
|
+
}
|
|
97
|
+
if (message.mapLink !== undefined) {
|
|
98
|
+
obj.mapLink = Link.toJSON(message.mapLink);
|
|
99
|
+
}
|
|
100
|
+
return obj;
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
function isSet(value) {
|
|
104
|
+
return value !== null && value !== undefined;
|
|
105
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Logo } from "../Logo.js";
|
|
2
|
+
import { Description } from "../Description.js";
|
|
3
|
+
import { StartDate } from "../StartDate.js";
|
|
4
|
+
import { TuitionFee } from "../TuitionFee.js";
|
|
5
|
+
export interface Programme {
|
|
6
|
+
id: number;
|
|
7
|
+
title: string;
|
|
8
|
+
pagePortalType: string;
|
|
9
|
+
degreeFormatted: string;
|
|
10
|
+
description?: Description | undefined;
|
|
11
|
+
summary?: string | undefined;
|
|
12
|
+
logo?: Logo | undefined;
|
|
13
|
+
tuitionFee?: TuitionFee | undefined;
|
|
14
|
+
startDates?: StartDate | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare const Programme: MessageFns<Programme>;
|
|
17
|
+
interface MessageFns<T> {
|
|
18
|
+
fromJSON(object: any): T;
|
|
19
|
+
toJSON(message: T): unknown;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
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/Programme.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { Logo } from "../Logo.js";
|
|
8
|
+
import { Description } from "../Description.js";
|
|
9
|
+
import { StartDate } from "../StartDate.js";
|
|
10
|
+
import { TuitionFee } from "../TuitionFee.js";
|
|
11
|
+
export const Programme = {
|
|
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
|
+
description: isSet(object.description) ? Description.fromJSON(object.description) : undefined,
|
|
19
|
+
summary: isSet(object.summary) ? globalThis.String(object.summary) : undefined,
|
|
20
|
+
logo: isSet(object.logo) ? Logo.fromJSON(object.logo) : undefined,
|
|
21
|
+
tuitionFee: isSet(object.tuitionFee) ? TuitionFee.fromJSON(object.tuitionFee) : undefined,
|
|
22
|
+
startDates: isSet(object.startDates) ? StartDate.fromJSON(object.startDates) : undefined,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
toJSON(message) {
|
|
26
|
+
const obj = {};
|
|
27
|
+
if (message.id !== 0) {
|
|
28
|
+
obj.id = Math.round(message.id);
|
|
29
|
+
}
|
|
30
|
+
if (message.title !== "") {
|
|
31
|
+
obj.title = message.title;
|
|
32
|
+
}
|
|
33
|
+
if (message.pagePortalType !== "") {
|
|
34
|
+
obj.pagePortalType = message.pagePortalType;
|
|
35
|
+
}
|
|
36
|
+
if (message.degreeFormatted !== "") {
|
|
37
|
+
obj.degreeFormatted = message.degreeFormatted;
|
|
38
|
+
}
|
|
39
|
+
if (message.description !== undefined) {
|
|
40
|
+
obj.description = Description.toJSON(message.description);
|
|
41
|
+
}
|
|
42
|
+
if (message.summary !== undefined) {
|
|
43
|
+
obj.summary = message.summary;
|
|
44
|
+
}
|
|
45
|
+
if (message.logo !== undefined) {
|
|
46
|
+
obj.logo = Logo.toJSON(message.logo);
|
|
47
|
+
}
|
|
48
|
+
if (message.tuitionFee !== undefined) {
|
|
49
|
+
obj.tuitionFee = TuitionFee.toJSON(message.tuitionFee);
|
|
50
|
+
}
|
|
51
|
+
if (message.startDates !== undefined) {
|
|
52
|
+
obj.startDates = StartDate.toJSON(message.startDates);
|
|
53
|
+
}
|
|
54
|
+
return obj;
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
function isSet(value) {
|
|
58
|
+
return value !== null && value !== undefined;
|
|
59
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Link } from "../Link.js";
|
|
2
|
+
export interface Scholarship {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
providerName?: string | undefined;
|
|
6
|
+
providerLocation?: string | undefined;
|
|
7
|
+
providerMapLink?: Link | undefined;
|
|
8
|
+
scholarshipDetailsLink?: Link | undefined;
|
|
9
|
+
funding?: Funding | undefined;
|
|
10
|
+
eligibility?: Eligibility | undefined;
|
|
11
|
+
about?: string | undefined;
|
|
12
|
+
providerLogo?: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface Funding {
|
|
15
|
+
kind: string;
|
|
16
|
+
hasGrantAmount: boolean;
|
|
17
|
+
grantAmount?: number | undefined;
|
|
18
|
+
grantCurrencyIso?: string | undefined;
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
}
|
|
21
|
+
export interface Eligibility {
|
|
22
|
+
nationality?: string | undefined;
|
|
23
|
+
studyLevel?: string | undefined;
|
|
24
|
+
scholarshipType?: string | undefined;
|
|
25
|
+
description?: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare const Scholarship: MessageFns<Scholarship>;
|
|
28
|
+
export declare const Funding: MessageFns<Funding>;
|
|
29
|
+
export declare const Eligibility: MessageFns<Eligibility>;
|
|
30
|
+
interface MessageFns<T> {
|
|
31
|
+
fromJSON(object: any): T;
|
|
32
|
+
toJSON(message: T): unknown;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,118 @@
|
|
|
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/Scholarship.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { Link } from "../Link.js";
|
|
8
|
+
export const Scholarship = {
|
|
9
|
+
fromJSON(object) {
|
|
10
|
+
return {
|
|
11
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
12
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
13
|
+
providerName: isSet(object.providerName) ? globalThis.String(object.providerName) : undefined,
|
|
14
|
+
providerLocation: isSet(object.providerLocation) ? globalThis.String(object.providerLocation) : undefined,
|
|
15
|
+
providerMapLink: isSet(object.providerMapLink) ? Link.fromJSON(object.providerMapLink) : undefined,
|
|
16
|
+
scholarshipDetailsLink: isSet(object.scholarshipDetailsLink)
|
|
17
|
+
? Link.fromJSON(object.scholarshipDetailsLink)
|
|
18
|
+
: undefined,
|
|
19
|
+
funding: isSet(object.funding) ? Funding.fromJSON(object.funding) : undefined,
|
|
20
|
+
eligibility: isSet(object.eligibility) ? Eligibility.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
|
+
};
|
|
24
|
+
},
|
|
25
|
+
toJSON(message) {
|
|
26
|
+
const obj = {};
|
|
27
|
+
if (message.id !== "") {
|
|
28
|
+
obj.id = message.id;
|
|
29
|
+
}
|
|
30
|
+
if (message.title !== "") {
|
|
31
|
+
obj.title = message.title;
|
|
32
|
+
}
|
|
33
|
+
if (message.providerName !== undefined) {
|
|
34
|
+
obj.providerName = message.providerName;
|
|
35
|
+
}
|
|
36
|
+
if (message.providerLocation !== undefined) {
|
|
37
|
+
obj.providerLocation = message.providerLocation;
|
|
38
|
+
}
|
|
39
|
+
if (message.providerMapLink !== undefined) {
|
|
40
|
+
obj.providerMapLink = Link.toJSON(message.providerMapLink);
|
|
41
|
+
}
|
|
42
|
+
if (message.scholarshipDetailsLink !== undefined) {
|
|
43
|
+
obj.scholarshipDetailsLink = Link.toJSON(message.scholarshipDetailsLink);
|
|
44
|
+
}
|
|
45
|
+
if (message.funding !== undefined) {
|
|
46
|
+
obj.funding = Funding.toJSON(message.funding);
|
|
47
|
+
}
|
|
48
|
+
if (message.eligibility !== undefined) {
|
|
49
|
+
obj.eligibility = Eligibility.toJSON(message.eligibility);
|
|
50
|
+
}
|
|
51
|
+
if (message.about !== undefined) {
|
|
52
|
+
obj.about = message.about;
|
|
53
|
+
}
|
|
54
|
+
if (message.providerLogo !== undefined) {
|
|
55
|
+
obj.providerLogo = message.providerLogo;
|
|
56
|
+
}
|
|
57
|
+
return obj;
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
export const Funding = {
|
|
61
|
+
fromJSON(object) {
|
|
62
|
+
return {
|
|
63
|
+
kind: isSet(object.kind) ? globalThis.String(object.kind) : "",
|
|
64
|
+
hasGrantAmount: isSet(object.hasGrantAmount) ? globalThis.Boolean(object.hasGrantAmount) : false,
|
|
65
|
+
grantAmount: isSet(object.grantAmount) ? globalThis.Number(object.grantAmount) : undefined,
|
|
66
|
+
grantCurrencyIso: isSet(object.grantCurrencyIso) ? globalThis.String(object.grantCurrencyIso) : undefined,
|
|
67
|
+
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
toJSON(message) {
|
|
71
|
+
const obj = {};
|
|
72
|
+
if (message.kind !== "") {
|
|
73
|
+
obj.kind = message.kind;
|
|
74
|
+
}
|
|
75
|
+
if (message.hasGrantAmount !== false) {
|
|
76
|
+
obj.hasGrantAmount = message.hasGrantAmount;
|
|
77
|
+
}
|
|
78
|
+
if (message.grantAmount !== undefined) {
|
|
79
|
+
obj.grantAmount = message.grantAmount;
|
|
80
|
+
}
|
|
81
|
+
if (message.grantCurrencyIso !== undefined) {
|
|
82
|
+
obj.grantCurrencyIso = message.grantCurrencyIso;
|
|
83
|
+
}
|
|
84
|
+
if (message.description !== undefined) {
|
|
85
|
+
obj.description = message.description;
|
|
86
|
+
}
|
|
87
|
+
return obj;
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
export const Eligibility = {
|
|
91
|
+
fromJSON(object) {
|
|
92
|
+
return {
|
|
93
|
+
nationality: isSet(object.nationality) ? globalThis.String(object.nationality) : undefined,
|
|
94
|
+
studyLevel: isSet(object.studyLevel) ? globalThis.String(object.studyLevel) : undefined,
|
|
95
|
+
scholarshipType: isSet(object.scholarshipType) ? globalThis.String(object.scholarshipType) : undefined,
|
|
96
|
+
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
toJSON(message) {
|
|
100
|
+
const obj = {};
|
|
101
|
+
if (message.nationality !== undefined) {
|
|
102
|
+
obj.nationality = message.nationality;
|
|
103
|
+
}
|
|
104
|
+
if (message.studyLevel !== undefined) {
|
|
105
|
+
obj.studyLevel = message.studyLevel;
|
|
106
|
+
}
|
|
107
|
+
if (message.scholarshipType !== undefined) {
|
|
108
|
+
obj.scholarshipType = message.scholarshipType;
|
|
109
|
+
}
|
|
110
|
+
if (message.description !== undefined) {
|
|
111
|
+
obj.description = message.description;
|
|
112
|
+
}
|
|
113
|
+
return obj;
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
function isSet(value) {
|
|
117
|
+
return value !== null && value !== undefined;
|
|
118
|
+
}
|