@studyportals/domain-client 7.5.0 → 7.6.1-beta.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.
Files changed (63) hide show
  1. package/package.json +68 -68
  2. package/protobuf/Area.js +1 -1
  3. package/protobuf/Article.js +1 -1
  4. package/protobuf/Body.js +1 -1
  5. package/protobuf/CampaignInformation.js +1 -1
  6. package/protobuf/ClickTracking.js +1 -1
  7. package/protobuf/CommercialEntity.js +1 -1
  8. package/protobuf/Cover.js +1 -1
  9. package/protobuf/Deadline.d.ts +1 -1
  10. package/protobuf/Deadline.js +22 -4
  11. package/protobuf/Degree.js +1 -1
  12. package/protobuf/Description.js +1 -1
  13. package/protobuf/Discipline.js +1 -1
  14. package/protobuf/Duration.d.ts +3 -1
  15. package/protobuf/Duration.js +12 -4
  16. package/protobuf/EnglishRequirements.d.ts +15 -0
  17. package/protobuf/EnglishRequirements.js +46 -0
  18. package/protobuf/EssentialInformation.js +1 -1
  19. package/protobuf/File.js +1 -1
  20. package/protobuf/GPARequirement.js +1 -1
  21. package/protobuf/GSSAResults.d.ts +17 -0
  22. package/protobuf/GSSAResults.js +62 -0
  23. package/protobuf/Link.js +1 -1
  24. package/protobuf/LivingCost.js +1 -1
  25. package/protobuf/Location.d.ts +1 -2
  26. package/protobuf/Location.js +5 -9
  27. package/protobuf/Logo.js +1 -1
  28. package/protobuf/MiniProgrammeCard.js +1 -1
  29. package/protobuf/OptionalLink.d.ts +0 -2
  30. package/protobuf/OptionalLink.js +1 -9
  31. package/protobuf/Organisation.d.ts +4 -0
  32. package/protobuf/Organisation.js +13 -1
  33. package/protobuf/OrganisationInformation.js +1 -1
  34. package/protobuf/OrganisationRanking.js +1 -1
  35. package/protobuf/Person.js +1 -1
  36. package/protobuf/ProgrammeCard.d.ts +10 -11
  37. package/protobuf/ProgrammeCard.js +49 -38
  38. package/protobuf/Ranking.js +1 -1
  39. package/protobuf/RankingInstitute.js +1 -1
  40. package/protobuf/Review.d.ts +1 -0
  41. package/protobuf/Review.js +5 -1
  42. package/protobuf/ReviewCountPerStar.d.ts +13 -0
  43. package/protobuf/ReviewCountPerStar.js +38 -0
  44. package/protobuf/ReviewRating.js +1 -1
  45. package/protobuf/RichText.js +1 -1
  46. package/protobuf/SocialLink.js +1 -1
  47. package/protobuf/StartDate.d.ts +1 -1
  48. package/protobuf/StartDate.js +21 -4
  49. package/protobuf/Timing.d.ts +0 -2
  50. package/protobuf/Timing.js +1 -9
  51. package/protobuf/Topic.js +1 -1
  52. package/protobuf/TrackedLink.js +1 -1
  53. package/protobuf/Tracking.js +1 -1
  54. package/protobuf/TuitionFee.d.ts +2 -0
  55. package/protobuf/TuitionFee.js +9 -1
  56. package/protobuf/Unibuddy.js +1 -1
  57. package/protobuf/google/protobuf/timestamp.d.ts +112 -0
  58. package/protobuf/google/protobuf/timestamp.js +26 -0
  59. package/protobuf/index.d.ts +4 -0
  60. package/protobuf/index.js +4 -0
  61. package/src/clients/organisation-page-client.js +1 -1
  62. package/src/clients/programme-card-v2-client.d.ts +8 -0
  63. package/src/clients/programme-card-v2-client.js +16 -0
@@ -1,11 +1,13 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.7.5
4
- // protoc v3.12.4
4
+ // protoc v6.30.2
5
5
  // source: TuitionFee.proto
6
6
  export const TuitionFee = {
7
7
  fromJSON(object) {
8
8
  return {
9
+ isFree: isSet(object.isFree) ? globalThis.Boolean(object.isFree) : false,
10
+ target: isSet(object.target) ? globalThis.String(object.target) : "",
9
11
  amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
10
12
  currency: isSet(object.currency) ? globalThis.String(object.currency) : "",
11
13
  unit: isSet(object.unit) ? globalThis.String(object.unit) : "",
@@ -15,6 +17,12 @@ export const TuitionFee = {
15
17
  },
16
18
  toJSON(message) {
17
19
  const obj = {};
20
+ if (message.isFree !== false) {
21
+ obj.isFree = message.isFree;
22
+ }
23
+ if (message.target !== "") {
24
+ obj.target = message.target;
25
+ }
18
26
  if (message.amount !== 0) {
19
27
  obj.amount = Math.round(message.amount);
20
28
  }
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.7.5
4
- // protoc v3.12.4
4
+ // protoc v6.30.2
5
5
  // source: Unibuddy.proto
6
6
  export const Unibuddy = {
7
7
  fromJSON(object) {
@@ -0,0 +1,112 @@
1
+ /**
2
+ * A Timestamp represents a point in time independent of any time zone or local
3
+ * calendar, encoded as a count of seconds and fractions of seconds at
4
+ * nanosecond resolution. The count is relative to an epoch at UTC midnight on
5
+ * January 1, 1970, in the proleptic Gregorian calendar which extends the
6
+ * Gregorian calendar backwards to year one.
7
+ *
8
+ * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
9
+ * second table is needed for interpretation, using a [24-hour linear
10
+ * smear](https://developers.google.com/time/smear).
11
+ *
12
+ * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
13
+ * restricting to that range, we ensure that we can convert to and from [RFC
14
+ * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
15
+ *
16
+ * # Examples
17
+ *
18
+ * Example 1: Compute Timestamp from POSIX `time()`.
19
+ *
20
+ * Timestamp timestamp;
21
+ * timestamp.set_seconds(time(NULL));
22
+ * timestamp.set_nanos(0);
23
+ *
24
+ * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
25
+ *
26
+ * struct timeval tv;
27
+ * gettimeofday(&tv, NULL);
28
+ *
29
+ * Timestamp timestamp;
30
+ * timestamp.set_seconds(tv.tv_sec);
31
+ * timestamp.set_nanos(tv.tv_usec * 1000);
32
+ *
33
+ * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
34
+ *
35
+ * FILETIME ft;
36
+ * GetSystemTimeAsFileTime(&ft);
37
+ * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
38
+ *
39
+ * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
40
+ * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
41
+ * Timestamp timestamp;
42
+ * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
43
+ * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
44
+ *
45
+ * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
46
+ *
47
+ * long millis = System.currentTimeMillis();
48
+ *
49
+ * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
50
+ * .setNanos((int) ((millis % 1000) * 1000000)).build();
51
+ *
52
+ * Example 5: Compute Timestamp from Java `Instant.now()`.
53
+ *
54
+ * Instant now = Instant.now();
55
+ *
56
+ * Timestamp timestamp =
57
+ * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
58
+ * .setNanos(now.getNano()).build();
59
+ *
60
+ * Example 6: Compute Timestamp from current time in Python.
61
+ *
62
+ * timestamp = Timestamp()
63
+ * timestamp.GetCurrentTime()
64
+ *
65
+ * # JSON Mapping
66
+ *
67
+ * In JSON format, the Timestamp type is encoded as a string in the
68
+ * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
69
+ * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
70
+ * where {year} is always expressed using four digits while {month}, {day},
71
+ * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
72
+ * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
73
+ * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
74
+ * is required. A proto3 JSON serializer should always use UTC (as indicated by
75
+ * "Z") when printing the Timestamp type and a proto3 JSON parser should be
76
+ * able to accept both UTC and other timezones (as indicated by an offset).
77
+ *
78
+ * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
79
+ * 01:30 UTC on January 15, 2017.
80
+ *
81
+ * In JavaScript, one can convert a Date object to this format using the
82
+ * standard
83
+ * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
84
+ * method. In Python, a standard `datetime.datetime` object can be converted
85
+ * to this format using
86
+ * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
87
+ * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
88
+ * the Joda Time's [`ISODateTimeFormat.dateTime()`](
89
+ * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
90
+ * ) to obtain a formatter capable of generating timestamps in this format.
91
+ */
92
+ export interface Timestamp {
93
+ /**
94
+ * Represents seconds of UTC time since Unix epoch
95
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
96
+ * 9999-12-31T23:59:59Z inclusive.
97
+ */
98
+ seconds: number;
99
+ /**
100
+ * Non-negative fractions of a second at nanosecond resolution. Negative
101
+ * second values with fractions must still have non-negative nanos values
102
+ * that count forward in time. Must be from 0 to 999,999,999
103
+ * inclusive.
104
+ */
105
+ nanos: number;
106
+ }
107
+ export declare const Timestamp: MessageFns<Timestamp>;
108
+ interface MessageFns<T> {
109
+ fromJSON(object: any): T;
110
+ toJSON(message: T): unknown;
111
+ }
112
+ export {};
@@ -0,0 +1,26 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.7.5
4
+ // protoc v6.30.2
5
+ // source: google/protobuf/timestamp.proto
6
+ export const Timestamp = {
7
+ fromJSON(object) {
8
+ return {
9
+ seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
10
+ nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
11
+ };
12
+ },
13
+ toJSON(message) {
14
+ const obj = {};
15
+ if (message.seconds !== 0) {
16
+ obj.seconds = Math.round(message.seconds);
17
+ }
18
+ if (message.nanos !== 0) {
19
+ obj.nanos = Math.round(message.nanos);
20
+ }
21
+ return obj;
22
+ },
23
+ };
24
+ function isSet(value) {
25
+ return value !== null && value !== undefined;
26
+ }
@@ -14,9 +14,11 @@ export * from "./Description.js";
14
14
  export * from "./Discipline.js";
15
15
  export * from "./Duration.js";
16
16
  export * from "./EnglishRequirement.js";
17
+ export * from "./EnglishRequirements.js";
17
18
  export * from "./EssentialInformation.js";
18
19
  export * from "./File.js";
19
20
  export * from "./GPARequirement.js";
21
+ export * from "./GSSAResults.js";
20
22
  export * from "./InternalLink.js";
21
23
  export * from "./Link.js";
22
24
  export * from "./LivingCost.js";
@@ -33,6 +35,7 @@ export * from "./ProgrammeGrid.js";
33
35
  export * from "./Ranking.js";
34
36
  export * from "./RankingInstitute.js";
35
37
  export * from "./Review.js";
38
+ export * from "./ReviewCountPerStar.js";
36
39
  export * from "./ReviewRating.js";
37
40
  export * from "./RichText.js";
38
41
  export * from "./SocialLink.js";
@@ -43,3 +46,4 @@ export * from "./TrackedLink.js";
43
46
  export * from "./Tracking.js";
44
47
  export * from "./TuitionFee.js";
45
48
  export * from "./Unibuddy.js";
49
+ export * from "./google/protobuf/timestamp.js";
package/protobuf/index.js CHANGED
@@ -14,9 +14,11 @@ export * from "./Description.js";
14
14
  export * from "./Discipline.js";
15
15
  export * from "./Duration.js";
16
16
  export * from "./EnglishRequirement.js";
17
+ export * from "./EnglishRequirements.js";
17
18
  export * from "./EssentialInformation.js";
18
19
  export * from "./File.js";
19
20
  export * from "./GPARequirement.js";
21
+ export * from "./GSSAResults.js";
20
22
  export * from "./InternalLink.js";
21
23
  export * from "./Link.js";
22
24
  export * from "./LivingCost.js";
@@ -33,6 +35,7 @@ export * from "./ProgrammeGrid.js";
33
35
  export * from "./Ranking.js";
34
36
  export * from "./RankingInstitute.js";
35
37
  export * from "./Review.js";
38
+ export * from "./ReviewCountPerStar.js";
36
39
  export * from "./ReviewRating.js";
37
40
  export * from "./RichText.js";
38
41
  export * from "./SocialLink.js";
@@ -43,3 +46,4 @@ export * from "./TrackedLink.js";
43
46
  export * from "./Tracking.js";
44
47
  export * from "./TuitionFee.js";
45
48
  export * from "./Unibuddy.js";
49
+ export * from "./google/protobuf/timestamp.js";
@@ -8,7 +8,7 @@ export class OrganisationPageClient extends ProtobufClient {
8
8
  return 'organisation-page';
9
9
  }
10
10
  getVersion() {
11
- return 'v1';
11
+ return 'v2';
12
12
  }
13
13
  isPublic() {
14
14
  return false;
@@ -0,0 +1,8 @@
1
+ import { ProgrammeCard } from "../../protobuf/index.js";
2
+ import { ProtobufClient } from "./protobuf-client.js";
3
+ export declare class ProgrammeCardV2Client extends ProtobufClient<ProgrammeCard> {
4
+ protected constructModel(data: Record<string, any>): ProgrammeCard;
5
+ protected getModelName(): string;
6
+ protected getVersion(): string;
7
+ isPublic(): boolean;
8
+ }
@@ -0,0 +1,16 @@
1
+ import { ProgrammeCard } from "../../protobuf/index.js";
2
+ import { ProtobufClient } from "./protobuf-client.js";
3
+ export class ProgrammeCardV2Client extends ProtobufClient {
4
+ constructModel(data) {
5
+ return ProgrammeCard.fromJSON(data);
6
+ }
7
+ getModelName() {
8
+ return 'programme-card-v2';
9
+ }
10
+ getVersion() {
11
+ return 'v1';
12
+ }
13
+ isPublic() {
14
+ return false;
15
+ }
16
+ }