@studyportals/domain-client 10.0.1-beta.3 → 10.2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studyportals/domain-client",
3
- "version": "10.0.1-beta.3",
3
+ "version": "10.2.0",
4
4
  "description": "Responsible for fetching data from the Domain API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,6 +1,10 @@
1
1
  import { File } from "../File.js";
2
2
  import { Location } from "../Location.js";
3
3
  import { SocialLink } from "../SocialLink.js";
4
+ export interface LeadRecipient {
5
+ email: string;
6
+ emailType: string;
7
+ }
4
8
  export interface PartnerApiOrganisation {
5
9
  id: number;
6
10
  name: string;
@@ -10,7 +14,9 @@ export interface PartnerApiOrganisation {
10
14
  locations: Location[];
11
15
  links: SocialLink[];
12
16
  isoCode: string;
17
+ leadRecipients: LeadRecipient[];
13
18
  }
19
+ export declare const LeadRecipient: MessageFns<LeadRecipient>;
14
20
  export declare const PartnerApiOrganisation: MessageFns<PartnerApiOrganisation>;
15
21
  interface MessageFns<T> {
16
22
  fromJSON(object: any): T;
@@ -1,12 +1,30 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.11.8
4
- // protoc v3.21.12
4
+ // protoc v6.30.2
5
5
  // source: PartnerApi/PartnerApiOrganisation.proto
6
6
  /* eslint-disable */
7
7
  import { File } from "../File.js";
8
8
  import { Location } from "../Location.js";
9
9
  import { SocialLink } from "../SocialLink.js";
10
+ export const LeadRecipient = {
11
+ fromJSON(object) {
12
+ return {
13
+ email: isSet(object.email) ? globalThis.String(object.email) : "",
14
+ emailType: isSet(object.emailType) ? globalThis.String(object.emailType) : "",
15
+ };
16
+ },
17
+ toJSON(message) {
18
+ const obj = {};
19
+ if (message.email !== "") {
20
+ obj.email = message.email;
21
+ }
22
+ if (message.emailType !== "") {
23
+ obj.emailType = message.emailType;
24
+ }
25
+ return obj;
26
+ },
27
+ };
10
28
  export const PartnerApiOrganisation = {
11
29
  fromJSON(object) {
12
30
  return {
@@ -22,6 +40,9 @@ export const PartnerApiOrganisation = {
22
40
  ? object.links.map((e) => SocialLink.fromJSON(e))
23
41
  : [],
24
42
  isoCode: isSet(object.isoCode) ? globalThis.String(object.isoCode) : "",
43
+ leadRecipients: globalThis.Array.isArray(object?.leadRecipients)
44
+ ? object.leadRecipients.map((e) => LeadRecipient.fromJSON(e))
45
+ : [],
25
46
  };
26
47
  },
27
48
  toJSON(message) {
@@ -50,6 +71,9 @@ export const PartnerApiOrganisation = {
50
71
  if (message.isoCode !== "") {
51
72
  obj.isoCode = message.isoCode;
52
73
  }
74
+ if (message.leadRecipients?.length) {
75
+ obj.leadRecipients = message.leadRecipients.map((e) => LeadRecipient.toJSON(e));
76
+ }
53
77
  return obj;
54
78
  },
55
79
  };
@@ -13,6 +13,7 @@ export interface PartnerApiScholarship {
13
13
  providerLogo?: string | undefined;
14
14
  organisation?: PartnerApiScholarshipOrganisation | undefined;
15
15
  grantCurrencyIso: string;
16
+ degrees: Degree[];
16
17
  }
17
18
  export interface PartnerApiFunding {
18
19
  kind: string;
@@ -25,6 +25,9 @@ export const PartnerApiScholarship = {
25
25
  ? PartnerApiScholarshipOrganisation.fromJSON(object.organisation)
26
26
  : undefined,
27
27
  grantCurrencyIso: isSet(object.grantCurrencyIso) ? globalThis.String(object.grantCurrencyIso) : "",
28
+ degrees: globalThis.Array.isArray(object?.degrees)
29
+ ? object.degrees.map((e) => Degree.fromJSON(e))
30
+ : [],
28
31
  };
29
32
  },
30
33
  toJSON(message) {
@@ -62,6 +65,9 @@ export const PartnerApiScholarship = {
62
65
  if (message.grantCurrencyIso !== "") {
63
66
  obj.grantCurrencyIso = message.grantCurrencyIso;
64
67
  }
68
+ if (message.degrees?.length) {
69
+ obj.degrees = message.degrees.map((e) => Degree.toJSON(e));
70
+ }
65
71
  return obj;
66
72
  },
67
73
  };
@@ -30,6 +30,12 @@ export interface ISearchProjection {
30
30
  * @return string[]
31
31
  */
32
32
  getCountryIsoCodes(): string[];
33
+ /**
34
+ * Gets the ISO code of the main location of the organisation
35
+ *
36
+ * @return string|null
37
+ */
38
+ getCountryIsoCodeOfMainLocation(): string | null;
33
39
  /**
34
40
  * Unformatted degree of the programme.
35
41
  *
@@ -144,11 +150,11 @@ export interface ISearchProjection {
144
150
  */
145
151
  getSpecialStudy(): string[];
146
152
  /**
147
- * List of the start months for the programme.
153
+ * List of the start dates for the programme.
148
154
  *
149
- * @return number[]
155
+ * @return string[]
150
156
  */
151
- getStartDates(): number[];
157
+ getStartDates(): string[];
152
158
  /**
153
159
  * Summary text of the programme (stripped of html tags).
154
160
  *