@opengovsg/refx-ts-sdk 0.0.0-develop-alpha-1763535866 → 0.0.0-develop-alpha-1772437212

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 (174) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +15 -10
  3. package/api/errors/BadRequestError.d.ts +1 -2
  4. package/api/resources/eligibility/client/Client.js +1 -1
  5. package/api/resources/health/client/Client.js +1 -1
  6. package/api/resources/index.d.ts +3 -2
  7. package/api/resources/index.js +4 -3
  8. package/api/resources/links/client/Client.d.ts +3 -1
  9. package/api/resources/links/client/Client.js +5 -1
  10. package/api/resources/links/client/requests/CreateLinkReqUpsert.d.ts +3 -0
  11. package/api/resources/links/types/CreateLinkReqUpsertClinicType.d.ts +2 -1
  12. package/api/resources/links/types/CreateLinkReqUpsertClinicType.js +1 -0
  13. package/api/resources/notes/client/Client.d.ts +3 -1
  14. package/api/resources/notes/client/Client.js +5 -3
  15. package/api/resources/notes/client/requests/CreateNoteReq.d.ts +5 -1
  16. package/api/resources/offerings/client/Client.js +3 -3
  17. package/api/resources/public/client/Client.d.ts +6 -2
  18. package/api/resources/public/client/Client.js +12 -5
  19. package/api/resources/public/client/requests/PublicGetReferralRequest.d.ts +17 -1
  20. package/api/resources/referrals/client/Client.d.ts +47 -12
  21. package/api/resources/referrals/client/Client.js +152 -36
  22. package/api/resources/referrals/client/requests/AcceptReferralBody.d.ts +6 -1
  23. package/api/resources/referrals/client/requests/AmendReferralReq.d.ts +5 -1
  24. package/api/resources/referrals/client/requests/BackToDraftReferralBody.d.ts +14 -0
  25. package/api/resources/referrals/client/requests/CancelReferralReq.d.ts +6 -1
  26. package/api/resources/referrals/client/requests/CreateReferralReq.d.ts +0 -6
  27. package/api/resources/referrals/client/requests/ReferralsDeleteRequest.d.ts +21 -0
  28. package/api/resources/referrals/client/requests/ReferralsGetRequest.d.ts +17 -1
  29. package/api/resources/referrals/client/requests/ReferralsListByInstitutionRequest.d.ts +35 -0
  30. package/{dist/api/resources/referrals/types/CreateReferralReqClinicType.js → api/resources/referrals/client/requests/ReferralsListByInstitutionRequest.js} +0 -5
  31. package/api/resources/referrals/client/requests/ReferralsListRequest.d.ts +8 -8
  32. package/api/resources/referrals/client/requests/RejectReferralBody.d.ts +5 -1
  33. package/api/resources/referrals/client/requests/index.d.ts +3 -0
  34. package/api/resources/referrals/index.d.ts +0 -1
  35. package/api/resources/referrals/index.js +0 -1
  36. package/api/resources/referrers/client/Client.d.ts +44 -0
  37. package/api/resources/referrers/client/Client.js +128 -0
  38. package/api/resources/referrers/client/index.d.ts +1 -0
  39. package/{dist/api/resources/referrals/types → api/resources/referrers/client}/index.js +1 -1
  40. package/api/resources/referrers/client/requests/ApiHoldingControllerGetReferrersRequest.d.ts +17 -0
  41. package/api/resources/{referrals/types/CreateReferralReqClinicType.js → referrers/client/requests/ApiHoldingControllerGetReferrersRequest.js} +0 -5
  42. package/api/resources/referrers/client/requests/index.d.ts +1 -0
  43. package/api/resources/referrers/client/requests/index.js +2 -0
  44. package/api/resources/referrers/index.d.ts +1 -0
  45. package/api/resources/{referrals/types → referrers}/index.js +1 -1
  46. package/api/resources/webhooks/client/Client.js +2 -2
  47. package/api/types/CreateReferrerReq.d.ts +13 -0
  48. package/api/types/CreateReferrerReq.js +5 -0
  49. package/api/types/Form.d.ts +3 -0
  50. package/api/types/FullReferralDto.d.ts +1 -1
  51. package/api/types/FullReferralDtoClinicType.d.ts +2 -1
  52. package/api/types/FullReferralDtoClinicType.js +1 -0
  53. package/api/types/GetReferralPatientDto.d.ts +1 -1
  54. package/api/types/GetReferrersRes.d.ts +7 -0
  55. package/api/types/GetReferrersRes.js +5 -0
  56. package/api/types/InstitutionIdType.d.ts +7 -0
  57. package/api/types/InstitutionIdType.js +5 -0
  58. package/api/types/OfferingDto.d.ts +2 -0
  59. package/api/types/OfferingWithAllowedDto.d.ts +4 -0
  60. package/api/types/PublicReferralDtoClinicType.d.ts +2 -1
  61. package/api/types/PublicReferralDtoClinicType.js +1 -0
  62. package/{dist/api/types/ReferralLinkDto.d.ts → api/types/ReferralActionLinkDto.d.ts} +2 -2
  63. package/api/types/ReferralActionLinkDto.js +5 -0
  64. package/{dist/api/types/ReferralLinkType.d.ts → api/types/ReferralActionLinkType.d.ts} +2 -3
  65. package/{dist/api/types/ReferralLinkType.js → api/types/ReferralActionLinkType.js} +2 -3
  66. package/api/types/ReferralDtoClinicType.d.ts +2 -1
  67. package/api/types/ReferralDtoClinicType.js +1 -0
  68. package/api/types/{ReferralLinkDto.d.ts → ReferralUpsertLinkDto.d.ts} +2 -2
  69. package/api/types/ReferralUpsertLinkDto.js +5 -0
  70. package/api/types/ReferralUpsertLinkType.d.ts +7 -0
  71. package/api/types/ReferralUpsertLinkType.js +5 -0
  72. package/api/types/ReferrerStatusDto.d.ts +15 -0
  73. package/api/types/ReferrerStatusDto.js +5 -0
  74. package/api/types/System.d.ts +15 -1
  75. package/api/types/System.js +14 -0
  76. package/api/types/TimelineEventDtoSystem.d.ts +15 -1
  77. package/api/types/TimelineEventDtoSystem.js +14 -0
  78. package/api/types/Timeslot.d.ts +2 -0
  79. package/api/types/index.d.ts +8 -2
  80. package/api/types/index.js +8 -2
  81. package/dist/Client.d.ts +3 -0
  82. package/dist/Client.js +15 -10
  83. package/dist/api/errors/BadRequestError.d.ts +1 -2
  84. package/dist/api/resources/eligibility/client/Client.js +1 -1
  85. package/dist/api/resources/health/client/Client.js +1 -1
  86. package/dist/api/resources/index.d.ts +3 -2
  87. package/dist/api/resources/index.js +4 -3
  88. package/dist/api/resources/links/client/Client.d.ts +3 -1
  89. package/dist/api/resources/links/client/Client.js +5 -1
  90. package/dist/api/resources/links/client/requests/CreateLinkReqUpsert.d.ts +3 -0
  91. package/dist/api/resources/links/types/CreateLinkReqUpsertClinicType.d.ts +2 -1
  92. package/dist/api/resources/links/types/CreateLinkReqUpsertClinicType.js +1 -0
  93. package/dist/api/resources/notes/client/Client.d.ts +3 -1
  94. package/dist/api/resources/notes/client/Client.js +5 -3
  95. package/dist/api/resources/notes/client/requests/CreateNoteReq.d.ts +5 -1
  96. package/dist/api/resources/offerings/client/Client.js +3 -3
  97. package/dist/api/resources/public/client/Client.d.ts +6 -2
  98. package/dist/api/resources/public/client/Client.js +12 -5
  99. package/dist/api/resources/public/client/requests/PublicGetReferralRequest.d.ts +17 -1
  100. package/dist/api/resources/referrals/client/Client.d.ts +47 -12
  101. package/dist/api/resources/referrals/client/Client.js +152 -36
  102. package/dist/api/resources/referrals/client/requests/AcceptReferralBody.d.ts +6 -1
  103. package/dist/api/resources/referrals/client/requests/AmendReferralReq.d.ts +5 -1
  104. package/dist/api/resources/referrals/client/requests/BackToDraftReferralBody.d.ts +14 -0
  105. package/dist/api/resources/referrals/client/requests/BackToDraftReferralBody.js +5 -0
  106. package/dist/api/resources/referrals/client/requests/CancelReferralReq.d.ts +6 -1
  107. package/dist/api/resources/referrals/client/requests/CreateReferralReq.d.ts +0 -6
  108. package/dist/api/resources/referrals/client/requests/ReferralsDeleteRequest.d.ts +21 -0
  109. package/dist/api/resources/referrals/client/requests/ReferralsDeleteRequest.js +5 -0
  110. package/dist/api/resources/referrals/client/requests/ReferralsGetRequest.d.ts +17 -1
  111. package/dist/api/resources/referrals/client/requests/ReferralsListByInstitutionRequest.d.ts +35 -0
  112. package/dist/api/resources/referrals/client/requests/ReferralsListByInstitutionRequest.js +5 -0
  113. package/dist/api/resources/referrals/client/requests/ReferralsListRequest.d.ts +8 -8
  114. package/dist/api/resources/referrals/client/requests/RejectReferralBody.d.ts +5 -1
  115. package/dist/api/resources/referrals/client/requests/index.d.ts +3 -0
  116. package/dist/api/resources/referrals/index.d.ts +0 -1
  117. package/dist/api/resources/referrals/index.js +0 -1
  118. package/dist/api/resources/referrers/client/Client.d.ts +44 -0
  119. package/dist/api/resources/referrers/client/Client.js +128 -0
  120. package/dist/api/resources/referrers/client/index.d.ts +1 -0
  121. package/dist/api/resources/referrers/client/index.js +17 -0
  122. package/dist/api/resources/referrers/client/requests/ApiHoldingControllerGetReferrersRequest.d.ts +17 -0
  123. package/dist/api/resources/referrers/client/requests/ApiHoldingControllerGetReferrersRequest.js +5 -0
  124. package/dist/api/resources/referrers/client/requests/index.d.ts +1 -0
  125. package/dist/api/resources/referrers/client/requests/index.js +2 -0
  126. package/dist/api/resources/referrers/index.d.ts +1 -0
  127. package/dist/api/resources/referrers/index.js +17 -0
  128. package/dist/api/resources/webhooks/client/Client.js +2 -2
  129. package/dist/api/types/CreateReferrerReq.d.ts +13 -0
  130. package/dist/api/types/CreateReferrerReq.js +5 -0
  131. package/dist/api/types/Form.d.ts +3 -0
  132. package/dist/api/types/FullReferralDto.d.ts +1 -1
  133. package/dist/api/types/FullReferralDtoClinicType.d.ts +2 -1
  134. package/dist/api/types/FullReferralDtoClinicType.js +1 -0
  135. package/dist/api/types/GetReferralPatientDto.d.ts +1 -1
  136. package/dist/api/types/GetReferrersRes.d.ts +7 -0
  137. package/dist/api/types/GetReferrersRes.js +5 -0
  138. package/dist/api/types/InstitutionIdType.d.ts +7 -0
  139. package/dist/api/types/InstitutionIdType.js +5 -0
  140. package/dist/api/types/OfferingDto.d.ts +2 -0
  141. package/dist/api/types/OfferingWithAllowedDto.d.ts +4 -0
  142. package/dist/api/types/PublicReferralDtoClinicType.d.ts +2 -1
  143. package/dist/api/types/PublicReferralDtoClinicType.js +1 -0
  144. package/dist/api/types/ReferralActionLinkDto.d.ts +11 -0
  145. package/dist/api/types/ReferralActionLinkDto.js +5 -0
  146. package/{api/types/ReferralLinkType.d.ts → dist/api/types/ReferralActionLinkType.d.ts} +2 -3
  147. package/{api/types/ReferralLinkType.js → dist/api/types/ReferralActionLinkType.js} +2 -3
  148. package/dist/api/types/ReferralDtoClinicType.d.ts +2 -1
  149. package/dist/api/types/ReferralDtoClinicType.js +1 -0
  150. package/dist/api/types/ReferralUpsertLinkDto.d.ts +11 -0
  151. package/dist/api/types/ReferralUpsertLinkDto.js +5 -0
  152. package/dist/api/types/ReferralUpsertLinkType.d.ts +7 -0
  153. package/dist/api/types/ReferralUpsertLinkType.js +5 -0
  154. package/dist/api/types/ReferrerStatusDto.d.ts +15 -0
  155. package/dist/api/types/ReferrerStatusDto.js +5 -0
  156. package/dist/api/types/System.d.ts +15 -1
  157. package/dist/api/types/System.js +14 -0
  158. package/dist/api/types/TimelineEventDtoSystem.d.ts +15 -1
  159. package/dist/api/types/TimelineEventDtoSystem.js +14 -0
  160. package/dist/api/types/Timeslot.d.ts +2 -0
  161. package/dist/api/types/index.d.ts +8 -2
  162. package/dist/api/types/index.js +8 -2
  163. package/dist/version.d.ts +1 -1
  164. package/dist/version.js +1 -1
  165. package/package.json +1 -1
  166. package/reference.md +168 -9
  167. package/version.d.ts +1 -1
  168. package/version.js +1 -1
  169. package/api/resources/referrals/types/CreateReferralReqClinicType.d.ts +0 -11
  170. package/api/resources/referrals/types/index.d.ts +0 -1
  171. package/dist/api/resources/referrals/types/CreateReferralReqClinicType.d.ts +0 -11
  172. package/dist/api/resources/referrals/types/index.d.ts +0 -1
  173. /package/api/{types/ReferralLinkDto.js → resources/referrals/client/requests/BackToDraftReferralBody.js} +0 -0
  174. /package/{dist/api/types/ReferralLinkDto.js → api/resources/referrals/client/requests/ReferralsDeleteRequest.js} +0 -0
package/Client.d.ts CHANGED
@@ -6,6 +6,7 @@ import * as core from "./core";
6
6
  import { Eligibility } from "./api/resources/eligibility/client/Client";
7
7
  import { Referrals } from "./api/resources/referrals/client/Client";
8
8
  import { Notes } from "./api/resources/notes/client/Client";
9
+ import { Referrers } from "./api/resources/referrers/client/Client";
9
10
  import { Offerings } from "./api/resources/offerings/client/Client";
10
11
  import { Links } from "./api/resources/links/client/Client";
11
12
  import { Public } from "./api/resources/public/client/Client";
@@ -35,6 +36,7 @@ export declare class ReferralExchangeClient {
35
36
  protected _eligibility: Eligibility | undefined;
36
37
  protected _referrals: Referrals | undefined;
37
38
  protected _notes: Notes | undefined;
39
+ protected _referrers: Referrers | undefined;
38
40
  protected _offerings: Offerings | undefined;
39
41
  protected _links: Links | undefined;
40
42
  protected _public: Public | undefined;
@@ -44,6 +46,7 @@ export declare class ReferralExchangeClient {
44
46
  get eligibility(): Eligibility;
45
47
  get referrals(): Referrals;
46
48
  get notes(): Notes;
49
+ get referrers(): Referrers;
47
50
  get offerings(): Offerings;
48
51
  get links(): Links;
49
52
  get public(): Public;
package/Client.js CHANGED
@@ -7,11 +7,12 @@ exports.ReferralExchangeClient = void 0;
7
7
  const Client_1 = require("./api/resources/eligibility/client/Client");
8
8
  const Client_2 = require("./api/resources/referrals/client/Client");
9
9
  const Client_3 = require("./api/resources/notes/client/Client");
10
- const Client_4 = require("./api/resources/offerings/client/Client");
11
- const Client_5 = require("./api/resources/links/client/Client");
12
- const Client_6 = require("./api/resources/public/client/Client");
13
- const Client_7 = require("./api/resources/webhooks/client/Client");
14
- const Client_8 = require("./api/resources/health/client/Client");
10
+ const Client_4 = require("./api/resources/referrers/client/Client");
11
+ const Client_5 = require("./api/resources/offerings/client/Client");
12
+ const Client_6 = require("./api/resources/links/client/Client");
13
+ const Client_7 = require("./api/resources/public/client/Client");
14
+ const Client_8 = require("./api/resources/webhooks/client/Client");
15
+ const Client_9 = require("./api/resources/health/client/Client");
15
16
  class ReferralExchangeClient {
16
17
  constructor(_options = {}) {
17
18
  this._options = _options;
@@ -28,25 +29,29 @@ class ReferralExchangeClient {
28
29
  var _a;
29
30
  return ((_a = this._notes) !== null && _a !== void 0 ? _a : (this._notes = new Client_3.Notes(this._options)));
30
31
  }
32
+ get referrers() {
33
+ var _a;
34
+ return ((_a = this._referrers) !== null && _a !== void 0 ? _a : (this._referrers = new Client_4.Referrers(this._options)));
35
+ }
31
36
  get offerings() {
32
37
  var _a;
33
- return ((_a = this._offerings) !== null && _a !== void 0 ? _a : (this._offerings = new Client_4.Offerings(this._options)));
38
+ return ((_a = this._offerings) !== null && _a !== void 0 ? _a : (this._offerings = new Client_5.Offerings(this._options)));
34
39
  }
35
40
  get links() {
36
41
  var _a;
37
- return ((_a = this._links) !== null && _a !== void 0 ? _a : (this._links = new Client_5.Links(this._options)));
42
+ return ((_a = this._links) !== null && _a !== void 0 ? _a : (this._links = new Client_6.Links(this._options)));
38
43
  }
39
44
  get public() {
40
45
  var _a;
41
- return ((_a = this._public) !== null && _a !== void 0 ? _a : (this._public = new Client_6.Public(this._options)));
46
+ return ((_a = this._public) !== null && _a !== void 0 ? _a : (this._public = new Client_7.Public(this._options)));
42
47
  }
43
48
  get webhooks() {
44
49
  var _a;
45
- return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_7.Webhooks(this._options)));
50
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_8.Webhooks(this._options)));
46
51
  }
47
52
  get health() {
48
53
  var _a;
49
- return ((_a = this._health) !== null && _a !== void 0 ? _a : (this._health = new Client_8.Health(this._options)));
54
+ return ((_a = this._health) !== null && _a !== void 0 ? _a : (this._health = new Client_9.Health(this._options)));
50
55
  }
51
56
  }
52
57
  exports.ReferralExchangeClient = ReferralExchangeClient;
@@ -2,7 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as errors from "../../errors/index";
5
- import * as ReferralExchange from "../index";
6
5
  export declare class BadRequestError extends errors.ReferralExchangeError {
7
- constructor(body: ReferralExchange.BadRequestErrorBody);
6
+ constructor(body?: unknown);
8
7
  }
@@ -89,7 +89,7 @@ class Eligibility {
89
89
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
90
90
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, "api/v1/eligibility"),
91
91
  method: "GET",
92
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1763450943", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1763450943", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
92
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1772437212", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1772437212", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
93
93
  contentType: "application/json",
94
94
  queryParameters: _queryParams,
95
95
  requestType: "json",
@@ -69,7 +69,7 @@ class Health {
69
69
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
70
70
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, "api/v1/health"),
71
71
  method: "GET",
72
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1763450943", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1763450943", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
72
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1772437212", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1772437212", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
73
73
  contentType: "application/json",
74
74
  requestType: "json",
75
75
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1,9 +1,9 @@
1
- export * as referrals from "./referrals";
2
- export * from "./referrals/types";
3
1
  export * as links from "./links";
4
2
  export * from "./links/types";
5
3
  export * as eligibility from "./eligibility";
4
+ export * as referrals from "./referrals";
6
5
  export * as notes from "./notes";
6
+ export * as referrers from "./referrers";
7
7
  export * as offerings from "./offerings";
8
8
  export * as public_ from "./public";
9
9
  export * as webhooks from "./webhooks";
@@ -11,6 +11,7 @@ export * as health from "./health";
11
11
  export * from "./eligibility/client/requests";
12
12
  export * from "./referrals/client/requests";
13
13
  export * from "./notes/client/requests";
14
+ export * from "./referrers/client/requests";
14
15
  export * from "./offerings/client/requests";
15
16
  export * from "./links/client/requests";
16
17
  export * from "./public/client/requests";
@@ -36,13 +36,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.health = exports.webhooks = exports.public_ = exports.offerings = exports.notes = exports.eligibility = exports.links = exports.referrals = void 0;
40
- exports.referrals = __importStar(require("./referrals"));
41
- __exportStar(require("./referrals/types"), exports);
39
+ exports.health = exports.webhooks = exports.public_ = exports.offerings = exports.referrers = exports.notes = exports.referrals = exports.eligibility = exports.links = void 0;
42
40
  exports.links = __importStar(require("./links"));
43
41
  __exportStar(require("./links/types"), exports);
44
42
  exports.eligibility = __importStar(require("./eligibility"));
43
+ exports.referrals = __importStar(require("./referrals"));
45
44
  exports.notes = __importStar(require("./notes"));
45
+ exports.referrers = __importStar(require("./referrers"));
46
46
  exports.offerings = __importStar(require("./offerings"));
47
47
  exports.public_ = __importStar(require("./public"));
48
48
  exports.webhooks = __importStar(require("./webhooks"));
@@ -50,6 +50,7 @@ exports.health = __importStar(require("./health"));
50
50
  __exportStar(require("./eligibility/client/requests"), exports);
51
51
  __exportStar(require("./referrals/client/requests"), exports);
52
52
  __exportStar(require("./notes/client/requests"), exports);
53
+ __exportStar(require("./referrers/client/requests"), exports);
53
54
  __exportStar(require("./offerings/client/requests"), exports);
54
55
  __exportStar(require("./links/client/requests"), exports);
55
56
  __exportStar(require("./public/client/requests"), exports);
@@ -30,6 +30,7 @@ export declare class Links {
30
30
  * @param {ReferralExchange.CreateLinkReqUpsert} request
31
31
  * @param {Links.RequestOptions} requestOptions - Request-specific configuration.
32
32
  *
33
+ * @throws {@link ReferralExchange.BadRequestError}
33
34
  * @throws {@link ReferralExchange.UnauthorizedError}
34
35
  *
35
36
  * @example
@@ -37,11 +38,12 @@ export declare class Links {
37
38
  * referrerInstitutionId: "referrerInstitutionId",
38
39
  * referrerInstitutionName: "referrerInstitutionName",
39
40
  * referrerId: "referrerId",
41
+ * requesterIdentifier: "requester@example.com",
40
42
  * referrerIdType: "mcr",
41
43
  * referrerName: "referrerName"
42
44
  * })
43
45
  */
44
- createUpsertLink(request: ReferralExchange.CreateLinkReqUpsert, requestOptions?: Links.RequestOptions): Promise<ReferralExchange.ReferralLinkDto>;
46
+ createUpsertLink(request: ReferralExchange.CreateLinkReqUpsert, requestOptions?: Links.RequestOptions): Promise<ReferralExchange.ReferralUpsertLinkDto>;
45
47
  protected _getCustomAuthorizationHeaders(): Promise<{
46
48
  Authorization: string | undefined;
47
49
  }>;
@@ -62,6 +62,7 @@ class Links {
62
62
  * @param {ReferralExchange.CreateLinkReqUpsert} request
63
63
  * @param {Links.RequestOptions} requestOptions - Request-specific configuration.
64
64
  *
65
+ * @throws {@link ReferralExchange.BadRequestError}
65
66
  * @throws {@link ReferralExchange.UnauthorizedError}
66
67
  *
67
68
  * @example
@@ -69,6 +70,7 @@ class Links {
69
70
  * referrerInstitutionId: "referrerInstitutionId",
70
71
  * referrerInstitutionName: "referrerInstitutionName",
71
72
  * referrerId: "referrerId",
73
+ * requesterIdentifier: "requester@example.com",
72
74
  * referrerIdType: "mcr",
73
75
  * referrerName: "referrerName"
74
76
  * })
@@ -79,7 +81,7 @@ class Links {
79
81
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
80
82
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, "api/v1/links/upsert"),
81
83
  method: "POST",
82
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1763450943", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1763450943", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1772437212", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1772437212", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
85
  contentType: "application/json",
84
86
  requestType: "json",
85
87
  body: request,
@@ -92,6 +94,8 @@ class Links {
92
94
  }
93
95
  if (_response.error.reason === "status-code") {
94
96
  switch (_response.error.statusCode) {
97
+ case 400:
98
+ throw new ReferralExchange.BadRequestError(_response.error.body);
95
99
  case 401:
96
100
  throw new ReferralExchange.UnauthorizedError(_response.error.body);
97
101
  default:
@@ -8,6 +8,7 @@ import * as ReferralExchange from "../../../../index";
8
8
  * referrerInstitutionId: "referrerInstitutionId",
9
9
  * referrerInstitutionName: "referrerInstitutionName",
10
10
  * referrerId: "referrerId",
11
+ * requesterIdentifier: "requester@example.com",
11
12
  * referrerIdType: "mcr",
12
13
  * referrerName: "referrerName"
13
14
  * }
@@ -19,6 +20,8 @@ export interface CreateLinkReqUpsert {
19
20
  referrerInstitutionName: string;
20
21
  /** Id of the doctor authoring this referral. */
21
22
  referrerId: string;
23
+ /** Identifier for the individual requesting the link. The individual may or may not be the referrer. Preferred to be an email. */
24
+ requesterIdentifier: string;
22
25
  referrerIdType: ReferralExchange.ReferrerIdType;
23
26
  /** Name of the doctor authoring this referral. */
24
27
  referrerName: string;
@@ -4,8 +4,9 @@
4
4
  /**
5
5
  * Clinic type
6
6
  */
7
- export type CreateLinkReqUpsertClinicType = "CHAS-only" | "CHAS and HSG";
7
+ export type CreateLinkReqUpsertClinicType = "CHAS-only" | "CHAS and HSG" | "CHAS and Healthier SG";
8
8
  export declare const CreateLinkReqUpsertClinicType: {
9
9
  readonly ChasOnly: "CHAS-only";
10
10
  readonly ChasAndHsg: "CHAS and HSG";
11
+ readonly ChasAndHealthierSg: "CHAS and Healthier SG";
11
12
  };
@@ -7,4 +7,5 @@ exports.CreateLinkReqUpsertClinicType = void 0;
7
7
  exports.CreateLinkReqUpsertClinicType = {
8
8
  ChasOnly: "CHAS-only",
9
9
  ChasAndHsg: "CHAS and HSG",
10
+ ChasAndHealthierSg: "CHAS and Healthier SG",
10
11
  };
@@ -35,7 +35,9 @@ export declare class Notes {
35
35
  *
36
36
  * @example
37
37
  * await client.notes.create("referralId", {
38
- * authorHciCode: "authorHciCode"
38
+ * authorHciCode: "authorHciCode",
39
+ * institutionIdType: "hci",
40
+ * institutionId: "institutionId"
39
41
  * })
40
42
  */
41
43
  create(referralId: string, request: ReferralExchange.CreateNoteReq, requestOptions?: Notes.RequestOptions): Promise<ReferralExchange.NoteDto>;
@@ -67,7 +67,9 @@ class Notes {
67
67
  *
68
68
  * @example
69
69
  * await client.notes.create("referralId", {
70
- * authorHciCode: "authorHciCode"
70
+ * authorHciCode: "authorHciCode",
71
+ * institutionIdType: "hci",
72
+ * institutionId: "institutionId"
71
73
  * })
72
74
  */
73
75
  create(referralId, request, requestOptions) {
@@ -76,10 +78,10 @@ class Notes {
76
78
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
79
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, `api/v1/referrals/${encodeURIComponent(referralId)}/notes`),
78
80
  method: "POST",
79
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1763450943", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1763450943", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1772437212", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1772437212", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
82
  contentType: "application/json",
81
83
  requestType: "json",
82
- body: request,
84
+ body: Object.assign(Object.assign({}, request), { institutionIdType: "hci" }),
83
85
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
84
86
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
85
87
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -4,7 +4,9 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * authorHciCode: "authorHciCode"
7
+ * authorHciCode: "authorHciCode",
8
+ * institutionIdType: "hci",
9
+ * institutionId: "institutionId"
8
10
  * }
9
11
  */
10
12
  export interface CreateNoteReq {
@@ -12,4 +14,6 @@ export interface CreateNoteReq {
12
14
  content?: string;
13
15
  /** Author HCI code. Must be already tied to your system. */
14
16
  authorHciCode: string;
17
+ /** The institution ID */
18
+ institutionId: string;
15
19
  }
@@ -85,7 +85,7 @@ class Offerings {
85
85
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
86
86
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, "api/v1/offerings"),
87
87
  method: "GET",
88
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1763450943", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1763450943", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
88
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1772437212", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1772437212", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
89
89
  contentType: "application/json",
90
90
  queryParameters: _queryParams,
91
91
  requestType: "json",
@@ -144,7 +144,7 @@ class Offerings {
144
144
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
145
145
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, "api/v1/offerings/recommended"),
146
146
  method: "GET",
147
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1763450943", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1763450943", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
147
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1772437212", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1772437212", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
148
148
  contentType: "application/json",
149
149
  queryParameters: _queryParams,
150
150
  requestType: "json",
@@ -207,7 +207,7 @@ class Offerings {
207
207
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
208
208
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, `api/v1/offerings/${encodeURIComponent(offeringId)}/timeslots`),
209
209
  method: "GET",
210
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1763450943", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1763450943", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
210
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1772437212", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1772437212", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
211
211
  contentType: "application/json",
212
212
  queryParameters: _queryParams,
213
213
  requestType: "json",
@@ -34,9 +34,13 @@ export declare class Public {
34
34
  * @throws {@link ReferralExchange.NotFoundError}
35
35
  *
36
36
  * @example
37
- * await client.public.getReferral("referralId")
37
+ * await client.public.getReferral("referralId", {
38
+ * requesterIdentifier: "requester@example.com",
39
+ * institutionIdType: "hci",
40
+ * institutionId: "institutionId"
41
+ * })
38
42
  */
39
- getReferral(referralId: string, request?: ReferralExchange.PublicGetReferralRequest, requestOptions?: Public.RequestOptions): Promise<ReferralExchange.PublicReferralDto>;
43
+ getReferral(referralId: string, request: ReferralExchange.PublicGetReferralRequest, requestOptions?: Public.RequestOptions): Promise<ReferralExchange.PublicReferralDto>;
40
44
  protected _getCustomAuthorizationHeaders(): Promise<{
41
45
  Authorization: string | undefined;
42
46
  }>;
@@ -66,12 +66,16 @@ class Public {
66
66
  * @throws {@link ReferralExchange.NotFoundError}
67
67
  *
68
68
  * @example
69
- * await client.public.getReferral("referralId")
69
+ * await client.public.getReferral("referralId", {
70
+ * requesterIdentifier: "requester@example.com",
71
+ * institutionIdType: "hci",
72
+ * institutionId: "institutionId"
73
+ * })
70
74
  */
71
- getReferral(referralId_1) {
72
- return __awaiter(this, arguments, void 0, function* (referralId, request = {}, requestOptions) {
75
+ getReferral(referralId, request, requestOptions) {
76
+ return __awaiter(this, void 0, void 0, function* () {
73
77
  var _a, _b, _c;
74
- const { additionalField } = request;
78
+ const { additionalField, requesterIdentifier, institutionIdType, institutionId } = request;
75
79
  const _queryParams = {};
76
80
  if (additionalField != null) {
77
81
  if (Array.isArray(additionalField)) {
@@ -81,10 +85,13 @@ class Public {
81
85
  _queryParams["additionalField"] = additionalField;
82
86
  }
83
87
  }
88
+ _queryParams["requesterIdentifier"] = requesterIdentifier;
89
+ _queryParams["institutionIdType"] = institutionIdType;
90
+ _queryParams["institutionId"] = institutionId;
84
91
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
92
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, `api/v1/public/referrals/${encodeURIComponent(referralId)}`),
86
93
  method: "GET",
87
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1763450943", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1763450943", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
94
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-alpha-1772437212", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-alpha-1772437212", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
88
95
  contentType: "application/json",
89
96
  queryParameters: _queryParams,
90
97
  requestType: "json",
@@ -4,8 +4,24 @@
4
4
  import * as ReferralExchange from "../../../../index";
5
5
  /**
6
6
  * @example
7
- * {}
7
+ * {
8
+ * requesterIdentifier: "requester@example.com",
9
+ * institutionIdType: "hci",
10
+ * institutionId: "institutionId"
11
+ * }
8
12
  */
9
13
  export interface PublicGetReferralRequest {
10
14
  additionalField?: ReferralExchange.AdditionalReferralField | ReferralExchange.AdditionalReferralField[];
15
+ /**
16
+ * Identifier for the individual requesting the referral. Preferred to be an email.
17
+ */
18
+ requesterIdentifier: string;
19
+ /**
20
+ * The type of institution ID
21
+ */
22
+ institutionIdType: ReferralExchange.InstitutionIdType;
23
+ /**
24
+ * The institution ID
25
+ */
26
+ institutionId: string;
11
27
  }
@@ -70,6 +70,18 @@ export declare class Referrals {
70
70
  * })
71
71
  */
72
72
  upsert(request: ReferralExchange.CreateReferralReq, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.ReferralDto>;
73
+ /**
74
+ * @param {ReferralExchange.InstitutionIdType} institutionIdType - The type of institution ID
75
+ * @param {string} institutionId - The institution ID
76
+ * @param {ReferralExchange.ReferralsListByInstitutionRequest} request
77
+ * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
78
+ *
79
+ * @throws {@link ReferralExchange.UnauthorizedError}
80
+ *
81
+ * @example
82
+ * await client.referrals.listByInstitution("hci", "institutionId")
83
+ */
84
+ listByInstitution(institutionIdType: ReferralExchange.InstitutionIdType, institutionId: string, request?: ReferralExchange.ReferralsListByInstitutionRequest, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.PaginatedReferralsDto>;
73
85
  /**
74
86
  * @param {string} referralId - Referral ID
75
87
  * @param {ReferralExchange.ReferralsGetRequest} request
@@ -79,19 +91,27 @@ export declare class Referrals {
79
91
  * @throws {@link ReferralExchange.NotFoundError}
80
92
  *
81
93
  * @example
82
- * await client.referrals.get("referralId")
94
+ * await client.referrals.get("referralId", {
95
+ * requesterIdentifier: "requester@example.com",
96
+ * institutionIdType: "hci",
97
+ * institutionId: "institutionId"
98
+ * })
83
99
  */
84
- get(referralId: string, request?: ReferralExchange.ReferralsGetRequest, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.FullReferralDto>;
100
+ get(referralId: string, request: ReferralExchange.ReferralsGetRequest, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.FullReferralDto>;
85
101
  /**
86
102
  * @param {string} referralId - Referral ID
103
+ * @param {ReferralExchange.ReferralsDeleteRequest} request
87
104
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
88
105
  *
89
106
  * @throws {@link ReferralExchange.UnauthorizedError}
90
107
  *
91
108
  * @example
92
- * await client.referrals.delete("referralId")
109
+ * await client.referrals.delete("referralId", {
110
+ * institutionIdType: "hci",
111
+ * institutionId: "institutionId"
112
+ * })
93
113
  */
94
- delete(referralId: string, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.ReferralDto>;
114
+ delete(referralId: string, request: ReferralExchange.ReferralsDeleteRequest, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.ReferralDto>;
95
115
  /**
96
116
  * @param {string} referralId - Referral ID
97
117
  * @param {ReferralExchange.CancelReferralReq} request
@@ -100,9 +120,12 @@ export declare class Referrals {
100
120
  * @throws {@link ReferralExchange.UnauthorizedError}
101
121
  *
102
122
  * @example
103
- * await client.referrals.cancel("referralId")
123
+ * await client.referrals.cancel("referralId", {
124
+ * institutionIdType: "hci",
125
+ * institutionId: "institutionId"
126
+ * })
104
127
  */
105
- cancel(referralId: string, request?: ReferralExchange.CancelReferralReq, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.ReferralDto>;
128
+ cancel(referralId: string, request: ReferralExchange.CancelReferralReq, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.ReferralDto>;
106
129
  /**
107
130
  * @param {string} referralId - Referral ID
108
131
  * @param {ReferralExchange.AmendReferralReq} request
@@ -112,7 +135,9 @@ export declare class Referrals {
112
135
  *
113
136
  * @example
114
137
  * await client.referrals.amend("referralId", {
115
- * timeslotStartAt: 1714857600000
138
+ * timeslotStartAt: 1714857600000,
139
+ * institutionIdType: "hci",
140
+ * institutionId: "institutionId"
116
141
  * })
117
142
  */
118
143
  amend(referralId: string, request: ReferralExchange.AmendReferralReq, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.ReferralDto>;
@@ -121,12 +146,16 @@ export declare class Referrals {
121
146
  * @param {ReferralExchange.AcceptReferralBody} request
122
147
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
123
148
  *
149
+ * @throws {@link ReferralExchange.BadRequestError}
124
150
  * @throws {@link ReferralExchange.UnauthorizedError}
125
151
  *
126
152
  * @example
127
- * await client.referrals.accept("referralId")
153
+ * await client.referrals.accept("referralId", {
154
+ * institutionIdType: "hci",
155
+ * institutionId: "institutionId"
156
+ * })
128
157
  */
129
- accept(referralId: string, request?: ReferralExchange.AcceptReferralBody, requestOptions?: Referrals.RequestOptions): Promise<void>;
158
+ accept(referralId: string, request: ReferralExchange.AcceptReferralBody, requestOptions?: Referrals.RequestOptions): Promise<void>;
130
159
  /**
131
160
  * @param {string} referralId - Referral ID
132
161
  * @param {ReferralExchange.RejectReferralBody} request
@@ -136,20 +165,26 @@ export declare class Referrals {
136
165
  *
137
166
  * @example
138
167
  * await client.referrals.reject("referralId", {
139
- * rejectionMessage: "rejectionMessage"
168
+ * rejectionMessage: "rejectionMessage",
169
+ * institutionIdType: "hci",
170
+ * institutionId: "institutionId"
140
171
  * })
141
172
  */
142
173
  reject(referralId: string, request: ReferralExchange.RejectReferralBody, requestOptions?: Referrals.RequestOptions): Promise<void>;
143
174
  /**
144
175
  * @param {string} referralId - Referral ID
176
+ * @param {ReferralExchange.BackToDraftReferralBody} request
145
177
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
146
178
  *
147
179
  * @throws {@link ReferralExchange.UnauthorizedError}
148
180
  *
149
181
  * @example
150
- * await client.referrals.backToDraft("referralId")
182
+ * await client.referrals.backToDraft("referralId", {
183
+ * institutionIdType: "hci",
184
+ * institutionId: "institutionId"
185
+ * })
151
186
  */
152
- backToDraft(referralId: string, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.ReferralDto>;
187
+ backToDraft(referralId: string, request: ReferralExchange.BackToDraftReferralBody, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.ReferralDto>;
153
188
  protected _getCustomAuthorizationHeaders(): Promise<{
154
189
  Authorization: string | undefined;
155
190
  }>;