@opengovsg/refx-ts-sdk 0.0.0-develop-1749969694 → 0.0.0-develop-1750758882

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 (49) hide show
  1. package/README.md +7 -0
  2. package/api/resources/eligibility/client/Client.js +1 -1
  3. package/api/resources/health/client/Client.js +1 -1
  4. package/api/resources/links/client/Client.d.ts +8 -1
  5. package/api/resources/links/client/Client.js +9 -2
  6. package/api/resources/links/client/requests/CreateLinkReqUpsert.d.ts +9 -1
  7. package/api/resources/notes/client/Client.js +1 -1
  8. package/api/resources/offerings/client/Client.js +3 -3
  9. package/api/resources/public/client/Client.js +1 -1
  10. package/api/resources/referrals/client/Client.d.ts +8 -1
  11. package/api/resources/referrals/client/Client.js +17 -10
  12. package/api/resources/referrals/client/requests/CreateReferralReq.d.ts +8 -1
  13. package/api/resources/webhooks/client/Client.js +2 -2
  14. package/api/types/CreateAddressReq.d.ts +15 -0
  15. package/api/types/CreateAddressReq.js +5 -0
  16. package/api/types/CreatePatientReq.d.ts +1 -0
  17. package/api/types/FullReferralDto.d.ts +1 -1
  18. package/api/types/GetReferralPatientDto.d.ts +1 -0
  19. package/api/types/SubsidyEligibilityScheme.d.ts +2 -1
  20. package/api/types/SubsidyEligibilityScheme.js +1 -0
  21. package/api/types/index.d.ts +3 -2
  22. package/api/types/index.js +3 -2
  23. package/dist/api/resources/eligibility/client/Client.js +1 -1
  24. package/dist/api/resources/health/client/Client.js +1 -1
  25. package/dist/api/resources/links/client/Client.d.ts +8 -1
  26. package/dist/api/resources/links/client/Client.js +9 -2
  27. package/dist/api/resources/links/client/requests/CreateLinkReqUpsert.d.ts +9 -1
  28. package/dist/api/resources/notes/client/Client.js +1 -1
  29. package/dist/api/resources/offerings/client/Client.js +3 -3
  30. package/dist/api/resources/public/client/Client.js +1 -1
  31. package/dist/api/resources/referrals/client/Client.d.ts +8 -1
  32. package/dist/api/resources/referrals/client/Client.js +17 -10
  33. package/dist/api/resources/referrals/client/requests/CreateReferralReq.d.ts +8 -1
  34. package/dist/api/resources/webhooks/client/Client.js +2 -2
  35. package/dist/api/types/CreateAddressReq.d.ts +15 -0
  36. package/dist/api/types/CreateAddressReq.js +5 -0
  37. package/dist/api/types/CreatePatientReq.d.ts +1 -0
  38. package/dist/api/types/FullReferralDto.d.ts +1 -1
  39. package/dist/api/types/GetReferralPatientDto.d.ts +1 -0
  40. package/dist/api/types/SubsidyEligibilityScheme.d.ts +2 -1
  41. package/dist/api/types/SubsidyEligibilityScheme.js +1 -0
  42. package/dist/api/types/index.d.ts +3 -2
  43. package/dist/api/types/index.js +3 -2
  44. package/dist/version.d.ts +1 -1
  45. package/dist/version.js +1 -1
  46. package/package.json +1 -1
  47. package/reference.md +14 -0
  48. package/version.d.ts +1 -1
  49. package/version.js +1 -1
package/README.md CHANGED
@@ -30,6 +30,13 @@ await client.referrals.upsert({
30
30
  phoneNumber: "91234567",
31
31
  dob: "1990-01-01",
32
32
  gender: "Male",
33
+ address: {
34
+ postalCode: "postalCode",
35
+ block: "block",
36
+ streetName: "streetName",
37
+ floorNumber: "floorNumber",
38
+ unitNumber: "unitNumber",
39
+ },
33
40
  },
34
41
  offeringId: "offeringId",
35
42
  senderHciCode: "senderHciCode",
@@ -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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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,
@@ -38,7 +38,14 @@ export declare class Links {
38
38
  * referrerInstitutionName: "referrerInstitutionName",
39
39
  * referrerId: "referrerId",
40
40
  * referrerIdType: "mcr",
41
- * referrerName: "referrerName"
41
+ * referrerName: "referrerName",
42
+ * address: {
43
+ * postalCode: "postalCode",
44
+ * block: "block",
45
+ * streetName: "streetName",
46
+ * floorNumber: "floorNumber",
47
+ * unitNumber: "unitNumber"
48
+ * }
42
49
  * })
43
50
  */
44
51
  createUpsertLink(request: ReferralExchange.CreateLinkReqUpsert, requestOptions?: Links.RequestOptions): Promise<ReferralExchange.ReferralLinkDto>;
@@ -70,7 +70,14 @@ class Links {
70
70
  * referrerInstitutionName: "referrerInstitutionName",
71
71
  * referrerId: "referrerId",
72
72
  * referrerIdType: "mcr",
73
- * referrerName: "referrerName"
73
+ * referrerName: "referrerName",
74
+ * address: {
75
+ * postalCode: "postalCode",
76
+ * block: "block",
77
+ * streetName: "streetName",
78
+ * floorNumber: "floorNumber",
79
+ * unitNumber: "unitNumber"
80
+ * }
74
81
  * })
75
82
  */
76
83
  createUpsertLink(request, requestOptions) {
@@ -79,7 +86,7 @@ class Links {
79
86
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
80
87
  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
88
  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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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
90
  contentType: "application/json",
84
91
  requestType: "json",
85
92
  body: request,
@@ -9,7 +9,14 @@ import * as ReferralExchange from "../../../../index";
9
9
  * referrerInstitutionName: "referrerInstitutionName",
10
10
  * referrerId: "referrerId",
11
11
  * referrerIdType: "mcr",
12
- * referrerName: "referrerName"
12
+ * referrerName: "referrerName",
13
+ * address: {
14
+ * postalCode: "postalCode",
15
+ * block: "block",
16
+ * streetName: "streetName",
17
+ * floorNumber: "floorNumber",
18
+ * unitNumber: "unitNumber"
19
+ * }
13
20
  * }
14
21
  */
15
22
  export interface CreateLinkReqUpsert {
@@ -36,4 +43,5 @@ export interface CreateLinkReqUpsert {
36
43
  patientDob?: string;
37
44
  /** Patient gender */
38
45
  patientGender?: ReferralExchange.CreateLinkReqUpsertPatientGender;
46
+ address: ReferralExchange.CreateAddressReq;
39
47
  }
@@ -76,7 +76,7 @@ class Notes {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  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
78
  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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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
80
  contentType: "application/json",
81
81
  requestType: "json",
82
82
  body: request,
@@ -84,7 +84,7 @@ class Offerings {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  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"),
86
86
  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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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
88
  contentType: "application/json",
89
89
  queryParameters: _queryParams,
90
90
  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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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",
@@ -84,7 +84,7 @@ class Public {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  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
86
  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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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
88
  contentType: "application/json",
89
89
  queryParameters: _queryParams,
90
90
  requestType: "json",
@@ -50,7 +50,14 @@ export declare class Referrals {
50
50
  * name: "name",
51
51
  * phoneNumber: "91234567",
52
52
  * dob: "1990-01-01",
53
- * gender: "Male"
53
+ * gender: "Male",
54
+ * address: {
55
+ * postalCode: "postalCode",
56
+ * block: "block",
57
+ * streetName: "streetName",
58
+ * floorNumber: "floorNumber",
59
+ * unitNumber: "unitNumber"
60
+ * }
54
61
  * },
55
62
  * offeringId: "offeringId",
56
63
  * senderHciCode: "senderHciCode",
@@ -107,7 +107,7 @@ class Referrals {
107
107
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
108
108
  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"),
109
109
  method: "GET",
110
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
110
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
111
111
  contentType: "application/json",
112
112
  queryParameters: _queryParams,
113
113
  requestType: "json",
@@ -158,7 +158,14 @@ class Referrals {
158
158
  * name: "name",
159
159
  * phoneNumber: "91234567",
160
160
  * dob: "1990-01-01",
161
- * gender: "Male"
161
+ * gender: "Male",
162
+ * address: {
163
+ * postalCode: "postalCode",
164
+ * block: "block",
165
+ * streetName: "streetName",
166
+ * floorNumber: "floorNumber",
167
+ * unitNumber: "unitNumber"
168
+ * }
162
169
  * },
163
170
  * offeringId: "offeringId",
164
171
  * senderHciCode: "senderHciCode",
@@ -183,7 +190,7 @@ class Referrals {
183
190
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
184
191
  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"),
185
192
  method: "POST",
186
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
193
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
187
194
  contentType: "application/json",
188
195
  requestType: "json",
189
196
  body: request,
@@ -249,7 +256,7 @@ class Referrals {
249
256
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
250
257
  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)}`),
251
258
  method: "GET",
252
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
259
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
253
260
  contentType: "application/json",
254
261
  queryParameters: _queryParams,
255
262
  requestType: "json",
@@ -303,7 +310,7 @@ class Referrals {
303
310
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
304
311
  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)}`),
305
312
  method: "DELETE",
306
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
313
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
307
314
  contentType: "application/json",
308
315
  requestType: "json",
309
316
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -355,7 +362,7 @@ class Referrals {
355
362
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
356
363
  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)}/cancel`),
357
364
  method: "POST",
358
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
365
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
359
366
  contentType: "application/json",
360
367
  requestType: "json",
361
368
  body: request,
@@ -410,7 +417,7 @@ class Referrals {
410
417
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
411
418
  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)}/amend`),
412
419
  method: "POST",
413
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
420
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
414
421
  contentType: "application/json",
415
422
  requestType: "json",
416
423
  body: request,
@@ -463,7 +470,7 @@ class Referrals {
463
470
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
464
471
  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)}/accept`),
465
472
  method: "POST",
466
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
473
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
467
474
  contentType: "application/json",
468
475
  requestType: "json",
469
476
  body: request,
@@ -518,7 +525,7 @@ class Referrals {
518
525
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
519
526
  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)}/reject`),
520
527
  method: "POST",
521
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
528
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
522
529
  contentType: "application/json",
523
530
  requestType: "json",
524
531
  body: request,
@@ -570,7 +577,7 @@ class Referrals {
570
577
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
571
578
  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)}/back-to-draft`),
572
579
  method: "POST",
573
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
580
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
574
581
  contentType: "application/json",
575
582
  requestType: "json",
576
583
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -10,7 +10,14 @@ import * as ReferralExchange from "../../../../index";
10
10
  * name: "name",
11
11
  * phoneNumber: "91234567",
12
12
  * dob: "1990-01-01",
13
- * gender: "Male"
13
+ * gender: "Male",
14
+ * address: {
15
+ * postalCode: "postalCode",
16
+ * block: "block",
17
+ * streetName: "streetName",
18
+ * floorNumber: "floorNumber",
19
+ * unitNumber: "unitNumber"
20
+ * }
14
21
  * },
15
22
  * offeringId: "offeringId",
16
23
  * senderHciCode: "senderHciCode",
@@ -69,7 +69,7 @@ class Webhooks {
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/webhooks/formsg/singhealth-profile"),
71
71
  method: "POST",
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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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,
@@ -113,7 +113,7 @@ class Webhooks {
113
113
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
114
114
  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/webhooks/formsg/form-submission/${encodeURIComponent(formId)}`),
115
115
  method: "POST",
116
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
116
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
117
117
  contentType: "application/json",
118
118
  requestType: "json",
119
119
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface CreateAddressReq {
5
+ /** Patient postal code */
6
+ postalCode: string;
7
+ /** Patient address block number */
8
+ block: string;
9
+ /** Patient address street name */
10
+ streetName: string;
11
+ /** Patient address floor number */
12
+ floorNumber: string;
13
+ /** Patient address unit number */
14
+ unitNumber: string;
15
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -13,4 +13,5 @@ export interface CreatePatientReq {
13
13
  dob: string;
14
14
  /** Patient gender */
15
15
  gender: ReferralExchange.CreatePatientReqGender;
16
+ address: ReferralExchange.CreateAddressReq;
16
17
  }
@@ -24,5 +24,5 @@ export interface FullReferralDto {
24
24
  timeslotStartAt?: string;
25
25
  notes: ReferralExchange.NoteDto[];
26
26
  timelineEvents: ReferralExchange.TimelineEventDto[];
27
- links: ReferralExchange.ReferralLinkDto[];
27
+ links: unknown[][];
28
28
  }
@@ -13,6 +13,7 @@ export interface GetReferralPatientDto {
13
13
  dob: string;
14
14
  /** Patient gender */
15
15
  gender: ReferralExchange.GetReferralPatientDtoGender;
16
+ address: ReferralExchange.CreateAddressReq;
16
17
  /** Current CHAS status */
17
18
  chasStatus: string;
18
19
  }
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type SubsidyEligibilityScheme = "chas" | "saf" | "none";
4
+ export type SubsidyEligibilityScheme = "chas" | "saf" | "hpb" | "none";
5
5
  export declare const SubsidyEligibilityScheme: {
6
6
  readonly Chas: "chas";
7
7
  readonly Saf: "saf";
8
+ readonly Hpb: "hpb";
8
9
  readonly None: "none";
9
10
  };
@@ -7,5 +7,6 @@ exports.SubsidyEligibilityScheme = void 0;
7
7
  exports.SubsidyEligibilityScheme = {
8
8
  Chas: "chas",
9
9
  Saf: "saf",
10
+ Hpb: "hpb",
10
11
  None: "none",
11
12
  };
@@ -13,6 +13,7 @@ export * from "./System";
13
13
  export * from "./TimeslotPolicy";
14
14
  export * from "./OfferingDtoCategory";
15
15
  export * from "./OfferingDto";
16
+ export * from "./CreateAddressReq";
16
17
  export * from "./GetReferralPatientDtoGender";
17
18
  export * from "./GetReferralPatientDto";
18
19
  export * from "./ReferringDoctorDto";
@@ -30,8 +31,6 @@ export * from "./AdditionalReferralField";
30
31
  export * from "./TimelineEventType";
31
32
  export * from "./TimelineEventDtoSystem";
32
33
  export * from "./TimelineEventDto";
33
- export * from "./ReferralLinkType";
34
- export * from "./ReferralLinkDto";
35
34
  export * from "./FullReferralDtoStatus";
36
35
  export * from "./FullReferralDto";
37
36
  export * from "./CreatePatientReqGender";
@@ -42,5 +41,7 @@ export * from "./Timeslot";
42
41
  export * from "./TriggerEmailReminderBody";
43
42
  export * from "./FormMetadata";
44
43
  export * from "./CreateReferralFormReq";
44
+ export * from "./ReferralLinkType";
45
+ export * from "./ReferralLinkDto";
45
46
  export * from "./PublicReferralDto";
46
47
  export * from "./OkResponse";
@@ -29,6 +29,7 @@ __exportStar(require("./System"), exports);
29
29
  __exportStar(require("./TimeslotPolicy"), exports);
30
30
  __exportStar(require("./OfferingDtoCategory"), exports);
31
31
  __exportStar(require("./OfferingDto"), exports);
32
+ __exportStar(require("./CreateAddressReq"), exports);
32
33
  __exportStar(require("./GetReferralPatientDtoGender"), exports);
33
34
  __exportStar(require("./GetReferralPatientDto"), exports);
34
35
  __exportStar(require("./ReferringDoctorDto"), exports);
@@ -46,8 +47,6 @@ __exportStar(require("./AdditionalReferralField"), exports);
46
47
  __exportStar(require("./TimelineEventType"), exports);
47
48
  __exportStar(require("./TimelineEventDtoSystem"), exports);
48
49
  __exportStar(require("./TimelineEventDto"), exports);
49
- __exportStar(require("./ReferralLinkType"), exports);
50
- __exportStar(require("./ReferralLinkDto"), exports);
51
50
  __exportStar(require("./FullReferralDtoStatus"), exports);
52
51
  __exportStar(require("./FullReferralDto"), exports);
53
52
  __exportStar(require("./CreatePatientReqGender"), exports);
@@ -58,5 +57,7 @@ __exportStar(require("./Timeslot"), exports);
58
57
  __exportStar(require("./TriggerEmailReminderBody"), exports);
59
58
  __exportStar(require("./FormMetadata"), exports);
60
59
  __exportStar(require("./CreateReferralFormReq"), exports);
60
+ __exportStar(require("./ReferralLinkType"), exports);
61
+ __exportStar(require("./ReferralLinkDto"), exports);
61
62
  __exportStar(require("./PublicReferralDto"), exports);
62
63
  __exportStar(require("./OkResponse"), exports);
@@ -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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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,
@@ -38,7 +38,14 @@ export declare class Links {
38
38
  * referrerInstitutionName: "referrerInstitutionName",
39
39
  * referrerId: "referrerId",
40
40
  * referrerIdType: "mcr",
41
- * referrerName: "referrerName"
41
+ * referrerName: "referrerName",
42
+ * address: {
43
+ * postalCode: "postalCode",
44
+ * block: "block",
45
+ * streetName: "streetName",
46
+ * floorNumber: "floorNumber",
47
+ * unitNumber: "unitNumber"
48
+ * }
42
49
  * })
43
50
  */
44
51
  createUpsertLink(request: ReferralExchange.CreateLinkReqUpsert, requestOptions?: Links.RequestOptions): Promise<ReferralExchange.ReferralLinkDto>;
@@ -70,7 +70,14 @@ class Links {
70
70
  * referrerInstitutionName: "referrerInstitutionName",
71
71
  * referrerId: "referrerId",
72
72
  * referrerIdType: "mcr",
73
- * referrerName: "referrerName"
73
+ * referrerName: "referrerName",
74
+ * address: {
75
+ * postalCode: "postalCode",
76
+ * block: "block",
77
+ * streetName: "streetName",
78
+ * floorNumber: "floorNumber",
79
+ * unitNumber: "unitNumber"
80
+ * }
74
81
  * })
75
82
  */
76
83
  createUpsertLink(request, requestOptions) {
@@ -79,7 +86,7 @@ class Links {
79
86
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
80
87
  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
88
  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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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
90
  contentType: "application/json",
84
91
  requestType: "json",
85
92
  body: request,
@@ -9,7 +9,14 @@ import * as ReferralExchange from "../../../../index";
9
9
  * referrerInstitutionName: "referrerInstitutionName",
10
10
  * referrerId: "referrerId",
11
11
  * referrerIdType: "mcr",
12
- * referrerName: "referrerName"
12
+ * referrerName: "referrerName",
13
+ * address: {
14
+ * postalCode: "postalCode",
15
+ * block: "block",
16
+ * streetName: "streetName",
17
+ * floorNumber: "floorNumber",
18
+ * unitNumber: "unitNumber"
19
+ * }
13
20
  * }
14
21
  */
15
22
  export interface CreateLinkReqUpsert {
@@ -36,4 +43,5 @@ export interface CreateLinkReqUpsert {
36
43
  patientDob?: string;
37
44
  /** Patient gender */
38
45
  patientGender?: ReferralExchange.CreateLinkReqUpsertPatientGender;
46
+ address: ReferralExchange.CreateAddressReq;
39
47
  }
@@ -76,7 +76,7 @@ class Notes {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  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
78
  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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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
80
  contentType: "application/json",
81
81
  requestType: "json",
82
82
  body: request,
@@ -84,7 +84,7 @@ class Offerings {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  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"),
86
86
  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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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
88
  contentType: "application/json",
89
89
  queryParameters: _queryParams,
90
90
  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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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",
@@ -84,7 +84,7 @@ class Public {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  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
86
  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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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
88
  contentType: "application/json",
89
89
  queryParameters: _queryParams,
90
90
  requestType: "json",
@@ -50,7 +50,14 @@ export declare class Referrals {
50
50
  * name: "name",
51
51
  * phoneNumber: "91234567",
52
52
  * dob: "1990-01-01",
53
- * gender: "Male"
53
+ * gender: "Male",
54
+ * address: {
55
+ * postalCode: "postalCode",
56
+ * block: "block",
57
+ * streetName: "streetName",
58
+ * floorNumber: "floorNumber",
59
+ * unitNumber: "unitNumber"
60
+ * }
54
61
  * },
55
62
  * offeringId: "offeringId",
56
63
  * senderHciCode: "senderHciCode",
@@ -107,7 +107,7 @@ class Referrals {
107
107
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
108
108
  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"),
109
109
  method: "GET",
110
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
110
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
111
111
  contentType: "application/json",
112
112
  queryParameters: _queryParams,
113
113
  requestType: "json",
@@ -158,7 +158,14 @@ class Referrals {
158
158
  * name: "name",
159
159
  * phoneNumber: "91234567",
160
160
  * dob: "1990-01-01",
161
- * gender: "Male"
161
+ * gender: "Male",
162
+ * address: {
163
+ * postalCode: "postalCode",
164
+ * block: "block",
165
+ * streetName: "streetName",
166
+ * floorNumber: "floorNumber",
167
+ * unitNumber: "unitNumber"
168
+ * }
162
169
  * },
163
170
  * offeringId: "offeringId",
164
171
  * senderHciCode: "senderHciCode",
@@ -183,7 +190,7 @@ class Referrals {
183
190
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
184
191
  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"),
185
192
  method: "POST",
186
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
193
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
187
194
  contentType: "application/json",
188
195
  requestType: "json",
189
196
  body: request,
@@ -249,7 +256,7 @@ class Referrals {
249
256
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
250
257
  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)}`),
251
258
  method: "GET",
252
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
259
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
253
260
  contentType: "application/json",
254
261
  queryParameters: _queryParams,
255
262
  requestType: "json",
@@ -303,7 +310,7 @@ class Referrals {
303
310
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
304
311
  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)}`),
305
312
  method: "DELETE",
306
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
313
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
307
314
  contentType: "application/json",
308
315
  requestType: "json",
309
316
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -355,7 +362,7 @@ class Referrals {
355
362
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
356
363
  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)}/cancel`),
357
364
  method: "POST",
358
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
365
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
359
366
  contentType: "application/json",
360
367
  requestType: "json",
361
368
  body: request,
@@ -410,7 +417,7 @@ class Referrals {
410
417
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
411
418
  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)}/amend`),
412
419
  method: "POST",
413
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
420
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
414
421
  contentType: "application/json",
415
422
  requestType: "json",
416
423
  body: request,
@@ -463,7 +470,7 @@ class Referrals {
463
470
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
464
471
  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)}/accept`),
465
472
  method: "POST",
466
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
473
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
467
474
  contentType: "application/json",
468
475
  requestType: "json",
469
476
  body: request,
@@ -518,7 +525,7 @@ class Referrals {
518
525
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
519
526
  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)}/reject`),
520
527
  method: "POST",
521
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
528
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
522
529
  contentType: "application/json",
523
530
  requestType: "json",
524
531
  body: request,
@@ -570,7 +577,7 @@ class Referrals {
570
577
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
571
578
  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)}/back-to-draft`),
572
579
  method: "POST",
573
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
580
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
574
581
  contentType: "application/json",
575
582
  requestType: "json",
576
583
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -10,7 +10,14 @@ import * as ReferralExchange from "../../../../index";
10
10
  * name: "name",
11
11
  * phoneNumber: "91234567",
12
12
  * dob: "1990-01-01",
13
- * gender: "Male"
13
+ * gender: "Male",
14
+ * address: {
15
+ * postalCode: "postalCode",
16
+ * block: "block",
17
+ * streetName: "streetName",
18
+ * floorNumber: "floorNumber",
19
+ * unitNumber: "unitNumber"
20
+ * }
14
21
  * },
15
22
  * offeringId: "offeringId",
16
23
  * senderHciCode: "senderHciCode",
@@ -69,7 +69,7 @@ class Webhooks {
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/webhooks/formsg/singhealth-profile"),
71
71
  method: "POST",
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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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,
@@ -113,7 +113,7 @@ class Webhooks {
113
113
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
114
114
  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/webhooks/formsg/form-submission/${encodeURIComponent(formId)}`),
115
115
  method: "POST",
116
- 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-1749969694", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1749969694", "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),
116
+ 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-1750758882", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1750758882", "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),
117
117
  contentType: "application/json",
118
118
  requestType: "json",
119
119
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface CreateAddressReq {
5
+ /** Patient postal code */
6
+ postalCode: string;
7
+ /** Patient address block number */
8
+ block: string;
9
+ /** Patient address street name */
10
+ streetName: string;
11
+ /** Patient address floor number */
12
+ floorNumber: string;
13
+ /** Patient address unit number */
14
+ unitNumber: string;
15
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -13,4 +13,5 @@ export interface CreatePatientReq {
13
13
  dob: string;
14
14
  /** Patient gender */
15
15
  gender: ReferralExchange.CreatePatientReqGender;
16
+ address: ReferralExchange.CreateAddressReq;
16
17
  }
@@ -24,5 +24,5 @@ export interface FullReferralDto {
24
24
  timeslotStartAt?: string;
25
25
  notes: ReferralExchange.NoteDto[];
26
26
  timelineEvents: ReferralExchange.TimelineEventDto[];
27
- links: ReferralExchange.ReferralLinkDto[];
27
+ links: unknown[][];
28
28
  }
@@ -13,6 +13,7 @@ export interface GetReferralPatientDto {
13
13
  dob: string;
14
14
  /** Patient gender */
15
15
  gender: ReferralExchange.GetReferralPatientDtoGender;
16
+ address: ReferralExchange.CreateAddressReq;
16
17
  /** Current CHAS status */
17
18
  chasStatus: string;
18
19
  }
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type SubsidyEligibilityScheme = "chas" | "saf" | "none";
4
+ export type SubsidyEligibilityScheme = "chas" | "saf" | "hpb" | "none";
5
5
  export declare const SubsidyEligibilityScheme: {
6
6
  readonly Chas: "chas";
7
7
  readonly Saf: "saf";
8
+ readonly Hpb: "hpb";
8
9
  readonly None: "none";
9
10
  };
@@ -7,5 +7,6 @@ exports.SubsidyEligibilityScheme = void 0;
7
7
  exports.SubsidyEligibilityScheme = {
8
8
  Chas: "chas",
9
9
  Saf: "saf",
10
+ Hpb: "hpb",
10
11
  None: "none",
11
12
  };
@@ -13,6 +13,7 @@ export * from "./System";
13
13
  export * from "./TimeslotPolicy";
14
14
  export * from "./OfferingDtoCategory";
15
15
  export * from "./OfferingDto";
16
+ export * from "./CreateAddressReq";
16
17
  export * from "./GetReferralPatientDtoGender";
17
18
  export * from "./GetReferralPatientDto";
18
19
  export * from "./ReferringDoctorDto";
@@ -30,8 +31,6 @@ export * from "./AdditionalReferralField";
30
31
  export * from "./TimelineEventType";
31
32
  export * from "./TimelineEventDtoSystem";
32
33
  export * from "./TimelineEventDto";
33
- export * from "./ReferralLinkType";
34
- export * from "./ReferralLinkDto";
35
34
  export * from "./FullReferralDtoStatus";
36
35
  export * from "./FullReferralDto";
37
36
  export * from "./CreatePatientReqGender";
@@ -42,5 +41,7 @@ export * from "./Timeslot";
42
41
  export * from "./TriggerEmailReminderBody";
43
42
  export * from "./FormMetadata";
44
43
  export * from "./CreateReferralFormReq";
44
+ export * from "./ReferralLinkType";
45
+ export * from "./ReferralLinkDto";
45
46
  export * from "./PublicReferralDto";
46
47
  export * from "./OkResponse";
@@ -29,6 +29,7 @@ __exportStar(require("./System"), exports);
29
29
  __exportStar(require("./TimeslotPolicy"), exports);
30
30
  __exportStar(require("./OfferingDtoCategory"), exports);
31
31
  __exportStar(require("./OfferingDto"), exports);
32
+ __exportStar(require("./CreateAddressReq"), exports);
32
33
  __exportStar(require("./GetReferralPatientDtoGender"), exports);
33
34
  __exportStar(require("./GetReferralPatientDto"), exports);
34
35
  __exportStar(require("./ReferringDoctorDto"), exports);
@@ -46,8 +47,6 @@ __exportStar(require("./AdditionalReferralField"), exports);
46
47
  __exportStar(require("./TimelineEventType"), exports);
47
48
  __exportStar(require("./TimelineEventDtoSystem"), exports);
48
49
  __exportStar(require("./TimelineEventDto"), exports);
49
- __exportStar(require("./ReferralLinkType"), exports);
50
- __exportStar(require("./ReferralLinkDto"), exports);
51
50
  __exportStar(require("./FullReferralDtoStatus"), exports);
52
51
  __exportStar(require("./FullReferralDto"), exports);
53
52
  __exportStar(require("./CreatePatientReqGender"), exports);
@@ -58,5 +57,7 @@ __exportStar(require("./Timeslot"), exports);
58
57
  __exportStar(require("./TriggerEmailReminderBody"), exports);
59
58
  __exportStar(require("./FormMetadata"), exports);
60
59
  __exportStar(require("./CreateReferralFormReq"), exports);
60
+ __exportStar(require("./ReferralLinkType"), exports);
61
+ __exportStar(require("./ReferralLinkDto"), exports);
61
62
  __exportStar(require("./PublicReferralDto"), exports);
62
63
  __exportStar(require("./OkResponse"), exports);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.0-develop-1749969694";
1
+ export declare const SDK_VERSION = "0.0.0-develop-1750758882";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.0-develop-1749969694";
4
+ exports.SDK_VERSION = "0.0.0-develop-1750758882";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengovsg/refx-ts-sdk",
3
- "version": "0.0.0-develop-1749969694",
3
+ "version": "0.0.0-develop-1750758882",
4
4
  "private": false,
5
5
  "repository": "https://github.com/opengovsg/refer-ts-sdk",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -123,6 +123,13 @@ await client.referrals.upsert({
123
123
  phoneNumber: "91234567",
124
124
  dob: "1990-01-01",
125
125
  gender: "Male",
126
+ address: {
127
+ postalCode: "postalCode",
128
+ block: "block",
129
+ streetName: "streetName",
130
+ floorNumber: "floorNumber",
131
+ unitNumber: "unitNumber",
132
+ },
126
133
  },
127
134
  offeringId: "offeringId",
128
135
  senderHciCode: "senderHciCode",
@@ -796,6 +803,13 @@ await client.links.createUpsertLink({
796
803
  referrerId: "referrerId",
797
804
  referrerIdType: "mcr",
798
805
  referrerName: "referrerName",
806
+ address: {
807
+ postalCode: "postalCode",
808
+ block: "block",
809
+ streetName: "streetName",
810
+ floorNumber: "floorNumber",
811
+ unitNumber: "unitNumber",
812
+ },
799
813
  });
800
814
  ```
801
815
 
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.0-develop-1749969694";
1
+ export declare const SDK_VERSION = "0.0.0-develop-1750758882";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.0-develop-1749969694";
4
+ exports.SDK_VERSION = "0.0.0-develop-1750758882";