@studyportals/domain-client 10.4.0 → 10.5.0-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 +1 -1
- package/protobuf/Scholarship/ScholarshipCard.d.ts +46 -0
- package/protobuf/Scholarship/ScholarshipCard.js +189 -0
- package/protobuf/index.d.ts +5 -0
- package/protobuf/index.js +5 -0
- package/src/clients/index.d.ts +4 -3
- package/src/clients/index.js +4 -3
- package/src/clients/scholarship-card-v3-client.d.ts +8 -0
- package/src/clients/scholarship-card-v3-client.js +16 -0
package/package.json
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Location } from "../Location.js";
|
|
2
|
+
import { ReviewRating } from "../ReviewRating.js";
|
|
3
|
+
export interface ScholarshipCard {
|
|
4
|
+
id: number;
|
|
5
|
+
title: string;
|
|
6
|
+
virtualName: string;
|
|
7
|
+
relativeUrlPath: string;
|
|
8
|
+
description: string;
|
|
9
|
+
providerId?: string | undefined;
|
|
10
|
+
providerName: string;
|
|
11
|
+
isUniversityProvider: boolean;
|
|
12
|
+
providerLogoUrl?: string | undefined;
|
|
13
|
+
providerLocationText?: string | undefined;
|
|
14
|
+
/** only set when isUniversityProvider */
|
|
15
|
+
providerOrganisation?: ScholarshipProviderOrganisation | undefined;
|
|
16
|
+
benefitText?: string | undefined;
|
|
17
|
+
deadlineText: string;
|
|
18
|
+
isDeadlineNotSpecified: boolean;
|
|
19
|
+
destinationCountryRestrictionText: string;
|
|
20
|
+
applicationBasisText?: string | undefined;
|
|
21
|
+
grantCurrencyIso?: string | undefined;
|
|
22
|
+
grantAmount?: number | undefined;
|
|
23
|
+
grantDescription?: string | undefined;
|
|
24
|
+
isApplicableToAllDisciplines: boolean;
|
|
25
|
+
disciplineIds: number[];
|
|
26
|
+
isApplicableToAllOriginCountries: boolean;
|
|
27
|
+
originCountryIsoCodes: string[];
|
|
28
|
+
isApplicableToAllDestinationCountries: boolean;
|
|
29
|
+
destinationCountryIsoCodes: string[];
|
|
30
|
+
}
|
|
31
|
+
export interface ScholarshipProviderOrganisation {
|
|
32
|
+
id: number;
|
|
33
|
+
name: string;
|
|
34
|
+
relativeUrlPath: string;
|
|
35
|
+
locations: Location[];
|
|
36
|
+
reviewRating?: ReviewRating | undefined;
|
|
37
|
+
globalRankingPosition?: number | undefined;
|
|
38
|
+
globalRankingPositionPercentage?: string | undefined;
|
|
39
|
+
}
|
|
40
|
+
export declare const ScholarshipCard: MessageFns<ScholarshipCard>;
|
|
41
|
+
export declare const ScholarshipProviderOrganisation: MessageFns<ScholarshipProviderOrganisation>;
|
|
42
|
+
interface MessageFns<T> {
|
|
43
|
+
fromJSON(object: any): T;
|
|
44
|
+
toJSON(message: T): unknown;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.7
|
|
4
|
+
// protoc v6.33.2
|
|
5
|
+
// source: Scholarship/ScholarshipCard.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { Location } from "../Location.js";
|
|
8
|
+
import { ReviewRating } from "../ReviewRating.js";
|
|
9
|
+
export const ScholarshipCard = {
|
|
10
|
+
fromJSON(object) {
|
|
11
|
+
return {
|
|
12
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
13
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
14
|
+
virtualName: isSet(object.virtualName) ? globalThis.String(object.virtualName) : "",
|
|
15
|
+
relativeUrlPath: isSet(object.relativeUrlPath) ? globalThis.String(object.relativeUrlPath) : "",
|
|
16
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
17
|
+
providerId: isSet(object.providerId) ? globalThis.String(object.providerId) : undefined,
|
|
18
|
+
providerName: isSet(object.providerName) ? globalThis.String(object.providerName) : "",
|
|
19
|
+
isUniversityProvider: isSet(object.isUniversityProvider)
|
|
20
|
+
? globalThis.Boolean(object.isUniversityProvider)
|
|
21
|
+
: false,
|
|
22
|
+
providerLogoUrl: isSet(object.providerLogoUrl) ? globalThis.String(object.providerLogoUrl) : undefined,
|
|
23
|
+
providerLocationText: isSet(object.providerLocationText)
|
|
24
|
+
? globalThis.String(object.providerLocationText)
|
|
25
|
+
: undefined,
|
|
26
|
+
providerOrganisation: isSet(object.providerOrganisation)
|
|
27
|
+
? ScholarshipProviderOrganisation.fromJSON(object.providerOrganisation)
|
|
28
|
+
: undefined,
|
|
29
|
+
benefitText: isSet(object.benefitText) ? globalThis.String(object.benefitText) : undefined,
|
|
30
|
+
deadlineText: isSet(object.deadlineText) ? globalThis.String(object.deadlineText) : "",
|
|
31
|
+
isDeadlineNotSpecified: isSet(object.isDeadlineNotSpecified)
|
|
32
|
+
? globalThis.Boolean(object.isDeadlineNotSpecified)
|
|
33
|
+
: false,
|
|
34
|
+
destinationCountryRestrictionText: isSet(object.destinationCountryRestrictionText)
|
|
35
|
+
? globalThis.String(object.destinationCountryRestrictionText)
|
|
36
|
+
: "",
|
|
37
|
+
applicationBasisText: isSet(object.applicationBasisText)
|
|
38
|
+
? globalThis.String(object.applicationBasisText)
|
|
39
|
+
: undefined,
|
|
40
|
+
grantCurrencyIso: isSet(object.grantCurrencyIso) ? globalThis.String(object.grantCurrencyIso) : undefined,
|
|
41
|
+
grantAmount: isSet(object.grantAmount) ? globalThis.Number(object.grantAmount) : undefined,
|
|
42
|
+
grantDescription: isSet(object.grantDescription) ? globalThis.String(object.grantDescription) : undefined,
|
|
43
|
+
isApplicableToAllDisciplines: isSet(object.isApplicableToAllDisciplines)
|
|
44
|
+
? globalThis.Boolean(object.isApplicableToAllDisciplines)
|
|
45
|
+
: false,
|
|
46
|
+
disciplineIds: globalThis.Array.isArray(object?.disciplineIds)
|
|
47
|
+
? object.disciplineIds.map((e) => globalThis.Number(e))
|
|
48
|
+
: [],
|
|
49
|
+
isApplicableToAllOriginCountries: isSet(object.isApplicableToAllOriginCountries)
|
|
50
|
+
? globalThis.Boolean(object.isApplicableToAllOriginCountries)
|
|
51
|
+
: false,
|
|
52
|
+
originCountryIsoCodes: globalThis.Array.isArray(object?.originCountryIsoCodes)
|
|
53
|
+
? object.originCountryIsoCodes.map((e) => globalThis.String(e))
|
|
54
|
+
: [],
|
|
55
|
+
isApplicableToAllDestinationCountries: isSet(object.isApplicableToAllDestinationCountries)
|
|
56
|
+
? globalThis.Boolean(object.isApplicableToAllDestinationCountries)
|
|
57
|
+
: false,
|
|
58
|
+
destinationCountryIsoCodes: globalThis.Array.isArray(object?.destinationCountryIsoCodes)
|
|
59
|
+
? object.destinationCountryIsoCodes.map((e) => globalThis.String(e))
|
|
60
|
+
: [],
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
toJSON(message) {
|
|
64
|
+
const obj = {};
|
|
65
|
+
if (message.id !== 0) {
|
|
66
|
+
obj.id = Math.round(message.id);
|
|
67
|
+
}
|
|
68
|
+
if (message.title !== "") {
|
|
69
|
+
obj.title = message.title;
|
|
70
|
+
}
|
|
71
|
+
if (message.virtualName !== "") {
|
|
72
|
+
obj.virtualName = message.virtualName;
|
|
73
|
+
}
|
|
74
|
+
if (message.relativeUrlPath !== "") {
|
|
75
|
+
obj.relativeUrlPath = message.relativeUrlPath;
|
|
76
|
+
}
|
|
77
|
+
if (message.description !== "") {
|
|
78
|
+
obj.description = message.description;
|
|
79
|
+
}
|
|
80
|
+
if (message.providerId !== undefined) {
|
|
81
|
+
obj.providerId = message.providerId;
|
|
82
|
+
}
|
|
83
|
+
if (message.providerName !== "") {
|
|
84
|
+
obj.providerName = message.providerName;
|
|
85
|
+
}
|
|
86
|
+
if (message.isUniversityProvider !== false) {
|
|
87
|
+
obj.isUniversityProvider = message.isUniversityProvider;
|
|
88
|
+
}
|
|
89
|
+
if (message.providerLogoUrl !== undefined) {
|
|
90
|
+
obj.providerLogoUrl = message.providerLogoUrl;
|
|
91
|
+
}
|
|
92
|
+
if (message.providerLocationText !== undefined) {
|
|
93
|
+
obj.providerLocationText = message.providerLocationText;
|
|
94
|
+
}
|
|
95
|
+
if (message.providerOrganisation !== undefined) {
|
|
96
|
+
obj.providerOrganisation = ScholarshipProviderOrganisation.toJSON(message.providerOrganisation);
|
|
97
|
+
}
|
|
98
|
+
if (message.benefitText !== undefined) {
|
|
99
|
+
obj.benefitText = message.benefitText;
|
|
100
|
+
}
|
|
101
|
+
if (message.deadlineText !== "") {
|
|
102
|
+
obj.deadlineText = message.deadlineText;
|
|
103
|
+
}
|
|
104
|
+
if (message.isDeadlineNotSpecified !== false) {
|
|
105
|
+
obj.isDeadlineNotSpecified = message.isDeadlineNotSpecified;
|
|
106
|
+
}
|
|
107
|
+
if (message.destinationCountryRestrictionText !== "") {
|
|
108
|
+
obj.destinationCountryRestrictionText = message.destinationCountryRestrictionText;
|
|
109
|
+
}
|
|
110
|
+
if (message.applicationBasisText !== undefined) {
|
|
111
|
+
obj.applicationBasisText = message.applicationBasisText;
|
|
112
|
+
}
|
|
113
|
+
if (message.grantCurrencyIso !== undefined) {
|
|
114
|
+
obj.grantCurrencyIso = message.grantCurrencyIso;
|
|
115
|
+
}
|
|
116
|
+
if (message.grantAmount !== undefined) {
|
|
117
|
+
obj.grantAmount = message.grantAmount;
|
|
118
|
+
}
|
|
119
|
+
if (message.grantDescription !== undefined) {
|
|
120
|
+
obj.grantDescription = message.grantDescription;
|
|
121
|
+
}
|
|
122
|
+
if (message.isApplicableToAllDisciplines !== false) {
|
|
123
|
+
obj.isApplicableToAllDisciplines = message.isApplicableToAllDisciplines;
|
|
124
|
+
}
|
|
125
|
+
if (message.disciplineIds?.length) {
|
|
126
|
+
obj.disciplineIds = message.disciplineIds.map((e) => Math.round(e));
|
|
127
|
+
}
|
|
128
|
+
if (message.isApplicableToAllOriginCountries !== false) {
|
|
129
|
+
obj.isApplicableToAllOriginCountries = message.isApplicableToAllOriginCountries;
|
|
130
|
+
}
|
|
131
|
+
if (message.originCountryIsoCodes?.length) {
|
|
132
|
+
obj.originCountryIsoCodes = message.originCountryIsoCodes;
|
|
133
|
+
}
|
|
134
|
+
if (message.isApplicableToAllDestinationCountries !== false) {
|
|
135
|
+
obj.isApplicableToAllDestinationCountries = message.isApplicableToAllDestinationCountries;
|
|
136
|
+
}
|
|
137
|
+
if (message.destinationCountryIsoCodes?.length) {
|
|
138
|
+
obj.destinationCountryIsoCodes = message.destinationCountryIsoCodes;
|
|
139
|
+
}
|
|
140
|
+
return obj;
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
export const ScholarshipProviderOrganisation = {
|
|
144
|
+
fromJSON(object) {
|
|
145
|
+
return {
|
|
146
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
147
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
148
|
+
relativeUrlPath: isSet(object.relativeUrlPath) ? globalThis.String(object.relativeUrlPath) : "",
|
|
149
|
+
locations: globalThis.Array.isArray(object?.locations)
|
|
150
|
+
? object.locations.map((e) => Location.fromJSON(e))
|
|
151
|
+
: [],
|
|
152
|
+
reviewRating: isSet(object.reviewRating) ? ReviewRating.fromJSON(object.reviewRating) : undefined,
|
|
153
|
+
globalRankingPosition: isSet(object.globalRankingPosition)
|
|
154
|
+
? globalThis.Number(object.globalRankingPosition)
|
|
155
|
+
: undefined,
|
|
156
|
+
globalRankingPositionPercentage: isSet(object.globalRankingPositionPercentage)
|
|
157
|
+
? globalThis.String(object.globalRankingPositionPercentage)
|
|
158
|
+
: undefined,
|
|
159
|
+
};
|
|
160
|
+
},
|
|
161
|
+
toJSON(message) {
|
|
162
|
+
const obj = {};
|
|
163
|
+
if (message.id !== 0) {
|
|
164
|
+
obj.id = Math.round(message.id);
|
|
165
|
+
}
|
|
166
|
+
if (message.name !== "") {
|
|
167
|
+
obj.name = message.name;
|
|
168
|
+
}
|
|
169
|
+
if (message.relativeUrlPath !== "") {
|
|
170
|
+
obj.relativeUrlPath = message.relativeUrlPath;
|
|
171
|
+
}
|
|
172
|
+
if (message.locations?.length) {
|
|
173
|
+
obj.locations = message.locations.map((e) => Location.toJSON(e));
|
|
174
|
+
}
|
|
175
|
+
if (message.reviewRating !== undefined) {
|
|
176
|
+
obj.reviewRating = ReviewRating.toJSON(message.reviewRating);
|
|
177
|
+
}
|
|
178
|
+
if (message.globalRankingPosition !== undefined) {
|
|
179
|
+
obj.globalRankingPosition = Math.round(message.globalRankingPosition);
|
|
180
|
+
}
|
|
181
|
+
if (message.globalRankingPositionPercentage !== undefined) {
|
|
182
|
+
obj.globalRankingPositionPercentage = message.globalRankingPositionPercentage;
|
|
183
|
+
}
|
|
184
|
+
return obj;
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
function isSet(value) {
|
|
188
|
+
return value !== null && value !== undefined;
|
|
189
|
+
}
|
package/protobuf/index.d.ts
CHANGED
|
@@ -45,4 +45,9 @@ export * from "./Tracking.js";
|
|
|
45
45
|
export * from "./TuitionFee.js";
|
|
46
46
|
export * from "./Unibuddy.js";
|
|
47
47
|
export * from "./Organisation/OrganisationCard.js";
|
|
48
|
+
export * from "./PartnerApi/PartnerApiOrganisation.js";
|
|
49
|
+
export * from "./PartnerApi/PartnerApiProgramme.js";
|
|
50
|
+
export * from "./PartnerApi/PartnerApiScholarship.js";
|
|
51
|
+
export * from "./Scholarship/MiniScholarshipCard.js";
|
|
52
|
+
export * from "./Scholarship/ScholarshipCard.js";
|
|
48
53
|
export * from "./google/protobuf/timestamp.js";
|
package/protobuf/index.js
CHANGED
|
@@ -45,4 +45,9 @@ export * from "./Tracking.js";
|
|
|
45
45
|
export * from "./TuitionFee.js";
|
|
46
46
|
export * from "./Unibuddy.js";
|
|
47
47
|
export * from "./Organisation/OrganisationCard.js";
|
|
48
|
+
export * from "./PartnerApi/PartnerApiOrganisation.js";
|
|
49
|
+
export * from "./PartnerApi/PartnerApiProgramme.js";
|
|
50
|
+
export * from "./PartnerApi/PartnerApiScholarship.js";
|
|
51
|
+
export * from "./Scholarship/MiniScholarshipCard.js";
|
|
52
|
+
export * from "./Scholarship/ScholarshipCard.js";
|
|
48
53
|
export * from "./google/protobuf/timestamp.js";
|
package/src/clients/index.d.ts
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
export * from "./article-detail-page-client.js";
|
|
5
5
|
export * from "./organisation-card-v2-client.js";
|
|
6
6
|
export * from "./organisation-page-client.js";
|
|
7
|
-
export * from "./programme-card-v2-client.js";
|
|
8
|
-
export * from "./protobuf-client.js";
|
|
9
|
-
export * from "./public-mini-programme-card-client.js";
|
|
10
7
|
export * from "./partner-api-organisation-client.js";
|
|
11
8
|
export * from "./partner-api-programme-client.js";
|
|
12
9
|
export * from "./partner-api-scholarship-client.js";
|
|
10
|
+
export * from "./programme-card-v2-client.js";
|
|
11
|
+
export * from "./protobuf-client.js";
|
|
12
|
+
export * from "./public-mini-programme-card-client.js";
|
|
13
|
+
export * from "./scholarship-card-v3-client.js";
|
package/src/clients/index.js
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
export * from "./article-detail-page-client.js";
|
|
5
5
|
export * from "./organisation-card-v2-client.js";
|
|
6
6
|
export * from "./organisation-page-client.js";
|
|
7
|
-
export * from "./programme-card-v2-client.js";
|
|
8
|
-
export * from "./protobuf-client.js";
|
|
9
|
-
export * from "./public-mini-programme-card-client.js";
|
|
10
7
|
export * from "./partner-api-organisation-client.js";
|
|
11
8
|
export * from "./partner-api-programme-client.js";
|
|
12
9
|
export * from "./partner-api-scholarship-client.js";
|
|
10
|
+
export * from "./programme-card-v2-client.js";
|
|
11
|
+
export * from "./protobuf-client.js";
|
|
12
|
+
export * from "./public-mini-programme-card-client.js";
|
|
13
|
+
export * from "./scholarship-card-v3-client.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ScholarshipCard } from "../../protobuf/Scholarship/ScholarshipCard.js";
|
|
2
|
+
import { ProtobufClient } from "./protobuf-client.js";
|
|
3
|
+
export declare class ScholarshipCardV3Client extends ProtobufClient<ScholarshipCard> {
|
|
4
|
+
protected constructModel(data: Record<string, any>): ScholarshipCard;
|
|
5
|
+
protected getModelName(): string;
|
|
6
|
+
protected getVersion(): string;
|
|
7
|
+
isPublic(): boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ScholarshipCard } from "../../protobuf/Scholarship/ScholarshipCard.js";
|
|
2
|
+
import { ProtobufClient } from "./protobuf-client.js";
|
|
3
|
+
export class ScholarshipCardV3Client extends ProtobufClient {
|
|
4
|
+
constructModel(data) {
|
|
5
|
+
return ScholarshipCard.fromJSON(data);
|
|
6
|
+
}
|
|
7
|
+
getModelName() {
|
|
8
|
+
return 'scholarship-card-v3';
|
|
9
|
+
}
|
|
10
|
+
getVersion() {
|
|
11
|
+
return 'v1';
|
|
12
|
+
}
|
|
13
|
+
isPublic() {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
}
|