@studyportals/domain-client 10.5.1-0 → 10.5.1-1
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 +4 -2
- package/protobuf/Scholarship/ScholarshipCard.js +24 -8
- package/protobuf/Scholarship/ScholarshipDeadlineType.d.ts +8 -0
- package/protobuf/Scholarship/ScholarshipDeadlineType.js +43 -0
- package/protobuf/index.d.ts +1 -0
- package/protobuf/index.js +1 -0
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Location } from "../Location.js";
|
|
2
2
|
import { ReviewRating } from "../ReviewRating.js";
|
|
3
|
+
import { ScholarshipDeadlineType } from "./ScholarshipDeadlineType.js";
|
|
3
4
|
import { ScholarshipFormat } from "./ScholarshipFormat.js";
|
|
4
5
|
import { ScholarshipType } from "./ScholarshipType.js";
|
|
5
6
|
export interface ScholarshipCard {
|
|
@@ -16,8 +17,9 @@ export interface ScholarshipCard {
|
|
|
16
17
|
/** only set when isUniversityProvider */
|
|
17
18
|
providerOrganisation?: ScholarshipProviderOrganisation | undefined;
|
|
18
19
|
benefitText?: string | undefined;
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
deadlineType: ScholarshipDeadlineType;
|
|
21
|
+
/** only set when deadlineType is SPECIFIED */
|
|
22
|
+
deadline?: Date | undefined;
|
|
21
23
|
destinationCountryRestrictionText: string;
|
|
22
24
|
applicationBasisText?: string | undefined;
|
|
23
25
|
grantCurrencyIso?: string | undefined;
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
import { Location } from "../Location.js";
|
|
8
8
|
import { ReviewRating } from "../ReviewRating.js";
|
|
9
|
+
import { Timestamp } from "../google/protobuf/timestamp.js";
|
|
10
|
+
import { scholarshipDeadlineTypeFromJSON, scholarshipDeadlineTypeToJSON, } from "./ScholarshipDeadlineType.js";
|
|
9
11
|
import { scholarshipFormatFromJSON, scholarshipFormatToJSON } from "./ScholarshipFormat.js";
|
|
10
12
|
import { scholarshipTypeFromJSON, scholarshipTypeToJSON } from "./ScholarshipType.js";
|
|
11
13
|
export const ScholarshipCard = {
|
|
@@ -29,10 +31,8 @@ export const ScholarshipCard = {
|
|
|
29
31
|
? ScholarshipProviderOrganisation.fromJSON(object.providerOrganisation)
|
|
30
32
|
: undefined,
|
|
31
33
|
benefitText: isSet(object.benefitText) ? globalThis.String(object.benefitText) : undefined,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
? globalThis.Boolean(object.isDeadlineNotSpecified)
|
|
35
|
-
: false,
|
|
34
|
+
deadlineType: isSet(object.deadlineType) ? scholarshipDeadlineTypeFromJSON(object.deadlineType) : 0,
|
|
35
|
+
deadline: isSet(object.deadline) ? fromJsonTimestamp(object.deadline) : undefined,
|
|
36
36
|
destinationCountryRestrictionText: isSet(object.destinationCountryRestrictionText)
|
|
37
37
|
? globalThis.String(object.destinationCountryRestrictionText)
|
|
38
38
|
: "",
|
|
@@ -106,11 +106,11 @@ export const ScholarshipCard = {
|
|
|
106
106
|
if (message.benefitText !== undefined) {
|
|
107
107
|
obj.benefitText = message.benefitText;
|
|
108
108
|
}
|
|
109
|
-
if (message.
|
|
110
|
-
obj.
|
|
109
|
+
if (message.deadlineType !== 0) {
|
|
110
|
+
obj.deadlineType = scholarshipDeadlineTypeToJSON(message.deadlineType);
|
|
111
111
|
}
|
|
112
|
-
if (message.
|
|
113
|
-
obj.
|
|
112
|
+
if (message.deadline !== undefined) {
|
|
113
|
+
obj.deadline = message.deadline.toISOString();
|
|
114
114
|
}
|
|
115
115
|
if (message.destinationCountryRestrictionText !== "") {
|
|
116
116
|
obj.destinationCountryRestrictionText = message.destinationCountryRestrictionText;
|
|
@@ -202,6 +202,22 @@ export const ScholarshipProviderOrganisation = {
|
|
|
202
202
|
return obj;
|
|
203
203
|
},
|
|
204
204
|
};
|
|
205
|
+
function fromTimestamp(t) {
|
|
206
|
+
let millis = (t.seconds || 0) * 1_000;
|
|
207
|
+
millis += (t.nanos || 0) / 1_000_000;
|
|
208
|
+
return new globalThis.Date(millis);
|
|
209
|
+
}
|
|
210
|
+
function fromJsonTimestamp(o) {
|
|
211
|
+
if (o instanceof globalThis.Date) {
|
|
212
|
+
return o;
|
|
213
|
+
}
|
|
214
|
+
else if (typeof o === "string") {
|
|
215
|
+
return new globalThis.Date(o);
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
return fromTimestamp(Timestamp.fromJSON(o));
|
|
219
|
+
}
|
|
220
|
+
}
|
|
205
221
|
function isSet(value) {
|
|
206
222
|
return value !== null && value !== undefined;
|
|
207
223
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare enum ScholarshipDeadlineType {
|
|
2
|
+
NOT_SPECIFIED = 0,
|
|
3
|
+
ANY_TIME = 1,
|
|
4
|
+
SPECIFIED = 2,
|
|
5
|
+
UNRECOGNIZED = -1
|
|
6
|
+
}
|
|
7
|
+
export declare function scholarshipDeadlineTypeFromJSON(object: any): ScholarshipDeadlineType;
|
|
8
|
+
export declare function scholarshipDeadlineTypeToJSON(object: ScholarshipDeadlineType): string;
|
|
@@ -0,0 +1,43 @@
|
|
|
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/ScholarshipDeadlineType.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
export var ScholarshipDeadlineType;
|
|
8
|
+
(function (ScholarshipDeadlineType) {
|
|
9
|
+
ScholarshipDeadlineType[ScholarshipDeadlineType["NOT_SPECIFIED"] = 0] = "NOT_SPECIFIED";
|
|
10
|
+
ScholarshipDeadlineType[ScholarshipDeadlineType["ANY_TIME"] = 1] = "ANY_TIME";
|
|
11
|
+
ScholarshipDeadlineType[ScholarshipDeadlineType["SPECIFIED"] = 2] = "SPECIFIED";
|
|
12
|
+
ScholarshipDeadlineType[ScholarshipDeadlineType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
13
|
+
})(ScholarshipDeadlineType || (ScholarshipDeadlineType = {}));
|
|
14
|
+
export function scholarshipDeadlineTypeFromJSON(object) {
|
|
15
|
+
switch (object) {
|
|
16
|
+
case 0:
|
|
17
|
+
case "NOT_SPECIFIED":
|
|
18
|
+
return ScholarshipDeadlineType.NOT_SPECIFIED;
|
|
19
|
+
case 1:
|
|
20
|
+
case "ANY_TIME":
|
|
21
|
+
return ScholarshipDeadlineType.ANY_TIME;
|
|
22
|
+
case 2:
|
|
23
|
+
case "SPECIFIED":
|
|
24
|
+
return ScholarshipDeadlineType.SPECIFIED;
|
|
25
|
+
case -1:
|
|
26
|
+
case "UNRECOGNIZED":
|
|
27
|
+
default:
|
|
28
|
+
return ScholarshipDeadlineType.UNRECOGNIZED;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function scholarshipDeadlineTypeToJSON(object) {
|
|
32
|
+
switch (object) {
|
|
33
|
+
case ScholarshipDeadlineType.NOT_SPECIFIED:
|
|
34
|
+
return "NOT_SPECIFIED";
|
|
35
|
+
case ScholarshipDeadlineType.ANY_TIME:
|
|
36
|
+
return "ANY_TIME";
|
|
37
|
+
case ScholarshipDeadlineType.SPECIFIED:
|
|
38
|
+
return "SPECIFIED";
|
|
39
|
+
case ScholarshipDeadlineType.UNRECOGNIZED:
|
|
40
|
+
default:
|
|
41
|
+
return "UNRECOGNIZED";
|
|
42
|
+
}
|
|
43
|
+
}
|
package/protobuf/index.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export * from "./PartnerApi/PartnerApiProgramme.js";
|
|
|
50
50
|
export * from "./PartnerApi/PartnerApiScholarship.js";
|
|
51
51
|
export * from "./Scholarship/MiniScholarshipCard.js";
|
|
52
52
|
export * from "./Scholarship/ScholarshipCard.js";
|
|
53
|
+
export * from "./Scholarship/ScholarshipDeadlineType.js";
|
|
53
54
|
export * from "./Scholarship/ScholarshipFormat.js";
|
|
54
55
|
export * from "./Scholarship/ScholarshipType.js";
|
|
55
56
|
export * from "./google/protobuf/timestamp.js";
|
package/protobuf/index.js
CHANGED
|
@@ -50,6 +50,7 @@ export * from "./PartnerApi/PartnerApiProgramme.js";
|
|
|
50
50
|
export * from "./PartnerApi/PartnerApiScholarship.js";
|
|
51
51
|
export * from "./Scholarship/MiniScholarshipCard.js";
|
|
52
52
|
export * from "./Scholarship/ScholarshipCard.js";
|
|
53
|
+
export * from "./Scholarship/ScholarshipDeadlineType.js";
|
|
53
54
|
export * from "./Scholarship/ScholarshipFormat.js";
|
|
54
55
|
export * from "./Scholarship/ScholarshipType.js";
|
|
55
56
|
export * from "./google/protobuf/timestamp.js";
|