@opengovsg/refx-ts-sdk 0.0.41 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/resources/eligibility/client/Client.js +1 -1
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/links/client/Client.js +1 -1
- package/api/resources/notes/client/Client.js +1 -1
- package/api/resources/offerings/client/Client.js +3 -3
- package/api/resources/public/client/Client.js +1 -1
- package/api/resources/referrals/client/Client.d.ts +2 -4
- package/api/resources/referrals/client/Client.js +15 -15
- package/api/resources/referrals/client/requests/ReferralsListRequest.d.ts +2 -4
- package/api/resources/webhooks/client/Client.js +2 -2
- package/dist/api/resources/eligibility/client/Client.js +1 -1
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/links/client/Client.js +1 -1
- package/dist/api/resources/notes/client/Client.js +1 -1
- package/dist/api/resources/offerings/client/Client.js +3 -3
- package/dist/api/resources/public/client/Client.js +1 -1
- package/dist/api/resources/referrals/client/Client.d.ts +2 -4
- package/dist/api/resources/referrals/client/Client.js +15 -15
- package/dist/api/resources/referrals/client/requests/ReferralsListRequest.d.ts +2 -4
- package/dist/api/resources/webhooks/client/Client.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +1 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -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.
|
|
92
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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.
|
|
72
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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,
|
|
@@ -79,7 +79,7 @@ class Links {
|
|
|
79
79
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
80
80
|
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
81
|
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.
|
|
82
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
83
|
contentType: "application/json",
|
|
84
84
|
requestType: "json",
|
|
85
85
|
body: request,
|
|
@@ -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.
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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.
|
|
87
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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.
|
|
147
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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.
|
|
210
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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.
|
|
87
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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",
|
|
@@ -33,11 +33,9 @@ export declare class Referrals {
|
|
|
33
33
|
* @throws {@link ReferralExchange.UnauthorizedError}
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
|
-
* await client.referrals.list(
|
|
37
|
-
* hciCode: "hciCode"
|
|
38
|
-
* })
|
|
36
|
+
* await client.referrals.list()
|
|
39
37
|
*/
|
|
40
|
-
list(request
|
|
38
|
+
list(request?: ReferralExchange.ReferralsListRequest, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.PaginatedReferralsDto>;
|
|
41
39
|
/**
|
|
42
40
|
* @param {ReferralExchange.CreateReferralReq} request
|
|
43
41
|
* @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -65,12 +65,10 @@ class Referrals {
|
|
|
65
65
|
* @throws {@link ReferralExchange.UnauthorizedError}
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
|
-
* await client.referrals.list(
|
|
69
|
-
* hciCode: "hciCode"
|
|
70
|
-
* })
|
|
68
|
+
* await client.referrals.list()
|
|
71
69
|
*/
|
|
72
|
-
list(
|
|
73
|
-
return __awaiter(this,
|
|
70
|
+
list() {
|
|
71
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
74
72
|
var _a, _b, _c;
|
|
75
73
|
const { offset, pageSize, hciCode, status, role, referrerId, referrerIdType, institutionId, patientUin } = request;
|
|
76
74
|
const _queryParams = {};
|
|
@@ -80,7 +78,9 @@ class Referrals {
|
|
|
80
78
|
if (pageSize != null) {
|
|
81
79
|
_queryParams["pageSize"] = pageSize.toString();
|
|
82
80
|
}
|
|
83
|
-
|
|
81
|
+
if (hciCode != null) {
|
|
82
|
+
_queryParams["hciCode"] = hciCode;
|
|
83
|
+
}
|
|
84
84
|
if (status != null) {
|
|
85
85
|
if (Array.isArray(status)) {
|
|
86
86
|
_queryParams["status"] = status.map((item) => item);
|
|
@@ -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.
|
|
110
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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",
|
|
@@ -183,7 +183,7 @@ class Referrals {
|
|
|
183
183
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
184
184
|
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
185
|
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.
|
|
186
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
187
|
contentType: "application/json",
|
|
188
188
|
requestType: "json",
|
|
189
189
|
body: request,
|
|
@@ -249,7 +249,7 @@ class Referrals {
|
|
|
249
249
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
250
250
|
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
251
|
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.
|
|
252
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
253
|
contentType: "application/json",
|
|
254
254
|
queryParameters: _queryParams,
|
|
255
255
|
requestType: "json",
|
|
@@ -303,7 +303,7 @@ class Referrals {
|
|
|
303
303
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
304
304
|
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
305
|
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.
|
|
306
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
307
|
contentType: "application/json",
|
|
308
308
|
requestType: "json",
|
|
309
309
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -355,7 +355,7 @@ class Referrals {
|
|
|
355
355
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
356
356
|
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
357
|
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.
|
|
358
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
359
|
contentType: "application/json",
|
|
360
360
|
requestType: "json",
|
|
361
361
|
body: request,
|
|
@@ -410,7 +410,7 @@ class Referrals {
|
|
|
410
410
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
411
411
|
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
412
|
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.
|
|
413
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
414
|
contentType: "application/json",
|
|
415
415
|
requestType: "json",
|
|
416
416
|
body: request,
|
|
@@ -463,7 +463,7 @@ class Referrals {
|
|
|
463
463
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
464
464
|
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
465
|
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.
|
|
466
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
467
|
contentType: "application/json",
|
|
468
468
|
requestType: "json",
|
|
469
469
|
body: request,
|
|
@@ -518,7 +518,7 @@ class Referrals {
|
|
|
518
518
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
519
519
|
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
520
|
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.
|
|
521
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
522
|
contentType: "application/json",
|
|
523
523
|
requestType: "json",
|
|
524
524
|
body: request,
|
|
@@ -570,7 +570,7 @@ class Referrals {
|
|
|
570
570
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
571
571
|
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
572
|
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.
|
|
573
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
574
|
contentType: "application/json",
|
|
575
575
|
requestType: "json",
|
|
576
576
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
import * as ReferralExchange from "../../../../index";
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
|
-
* {
|
|
8
|
-
* hciCode: "hciCode"
|
|
9
|
-
* }
|
|
7
|
+
* {}
|
|
10
8
|
*/
|
|
11
9
|
export interface ReferralsListRequest {
|
|
12
10
|
/**
|
|
@@ -20,7 +18,7 @@ export interface ReferralsListRequest {
|
|
|
20
18
|
/**
|
|
21
19
|
* To identify the requesting institution
|
|
22
20
|
*/
|
|
23
|
-
hciCode
|
|
21
|
+
hciCode?: string;
|
|
24
22
|
status?: ReferralExchange.ReferralStatusFilter | ReferralExchange.ReferralStatusFilter[];
|
|
25
23
|
/**
|
|
26
24
|
* To filter by the institution's role in the referral. e.g. For outbound referrals, use "sender'
|
|
@@ -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.
|
|
72
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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.
|
|
116
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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,
|
|
@@ -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.
|
|
92
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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.
|
|
72
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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,
|
|
@@ -79,7 +79,7 @@ class Links {
|
|
|
79
79
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
80
80
|
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
81
|
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.
|
|
82
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
83
|
contentType: "application/json",
|
|
84
84
|
requestType: "json",
|
|
85
85
|
body: request,
|
|
@@ -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.
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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.
|
|
87
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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.
|
|
147
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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.
|
|
210
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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.
|
|
87
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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",
|
|
@@ -33,11 +33,9 @@ export declare class Referrals {
|
|
|
33
33
|
* @throws {@link ReferralExchange.UnauthorizedError}
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
|
-
* await client.referrals.list(
|
|
37
|
-
* hciCode: "hciCode"
|
|
38
|
-
* })
|
|
36
|
+
* await client.referrals.list()
|
|
39
37
|
*/
|
|
40
|
-
list(request
|
|
38
|
+
list(request?: ReferralExchange.ReferralsListRequest, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.PaginatedReferralsDto>;
|
|
41
39
|
/**
|
|
42
40
|
* @param {ReferralExchange.CreateReferralReq} request
|
|
43
41
|
* @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -65,12 +65,10 @@ class Referrals {
|
|
|
65
65
|
* @throws {@link ReferralExchange.UnauthorizedError}
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
|
-
* await client.referrals.list(
|
|
69
|
-
* hciCode: "hciCode"
|
|
70
|
-
* })
|
|
68
|
+
* await client.referrals.list()
|
|
71
69
|
*/
|
|
72
|
-
list(
|
|
73
|
-
return __awaiter(this,
|
|
70
|
+
list() {
|
|
71
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
74
72
|
var _a, _b, _c;
|
|
75
73
|
const { offset, pageSize, hciCode, status, role, referrerId, referrerIdType, institutionId, patientUin } = request;
|
|
76
74
|
const _queryParams = {};
|
|
@@ -80,7 +78,9 @@ class Referrals {
|
|
|
80
78
|
if (pageSize != null) {
|
|
81
79
|
_queryParams["pageSize"] = pageSize.toString();
|
|
82
80
|
}
|
|
83
|
-
|
|
81
|
+
if (hciCode != null) {
|
|
82
|
+
_queryParams["hciCode"] = hciCode;
|
|
83
|
+
}
|
|
84
84
|
if (status != null) {
|
|
85
85
|
if (Array.isArray(status)) {
|
|
86
86
|
_queryParams["status"] = status.map((item) => item);
|
|
@@ -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.
|
|
110
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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",
|
|
@@ -183,7 +183,7 @@ class Referrals {
|
|
|
183
183
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
184
184
|
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
185
|
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.
|
|
186
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
187
|
contentType: "application/json",
|
|
188
188
|
requestType: "json",
|
|
189
189
|
body: request,
|
|
@@ -249,7 +249,7 @@ class Referrals {
|
|
|
249
249
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
250
250
|
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
251
|
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.
|
|
252
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
253
|
contentType: "application/json",
|
|
254
254
|
queryParameters: _queryParams,
|
|
255
255
|
requestType: "json",
|
|
@@ -303,7 +303,7 @@ class Referrals {
|
|
|
303
303
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
304
304
|
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
305
|
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.
|
|
306
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
307
|
contentType: "application/json",
|
|
308
308
|
requestType: "json",
|
|
309
309
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -355,7 +355,7 @@ class Referrals {
|
|
|
355
355
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
356
356
|
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
357
|
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.
|
|
358
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
359
|
contentType: "application/json",
|
|
360
360
|
requestType: "json",
|
|
361
361
|
body: request,
|
|
@@ -410,7 +410,7 @@ class Referrals {
|
|
|
410
410
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
411
411
|
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
412
|
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.
|
|
413
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
414
|
contentType: "application/json",
|
|
415
415
|
requestType: "json",
|
|
416
416
|
body: request,
|
|
@@ -463,7 +463,7 @@ class Referrals {
|
|
|
463
463
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
464
464
|
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
465
|
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.
|
|
466
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
467
|
contentType: "application/json",
|
|
468
468
|
requestType: "json",
|
|
469
469
|
body: request,
|
|
@@ -518,7 +518,7 @@ class Referrals {
|
|
|
518
518
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
519
519
|
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
520
|
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.
|
|
521
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
522
|
contentType: "application/json",
|
|
523
523
|
requestType: "json",
|
|
524
524
|
body: request,
|
|
@@ -570,7 +570,7 @@ class Referrals {
|
|
|
570
570
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
571
571
|
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
572
|
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.
|
|
573
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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
574
|
contentType: "application/json",
|
|
575
575
|
requestType: "json",
|
|
576
576
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
import * as ReferralExchange from "../../../../index";
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
|
-
* {
|
|
8
|
-
* hciCode: "hciCode"
|
|
9
|
-
* }
|
|
7
|
+
* {}
|
|
10
8
|
*/
|
|
11
9
|
export interface ReferralsListRequest {
|
|
12
10
|
/**
|
|
@@ -20,7 +18,7 @@ export interface ReferralsListRequest {
|
|
|
20
18
|
/**
|
|
21
19
|
* To identify the requesting institution
|
|
22
20
|
*/
|
|
23
|
-
hciCode
|
|
21
|
+
hciCode?: string;
|
|
24
22
|
status?: ReferralExchange.ReferralStatusFilter | ReferralExchange.ReferralStatusFilter[];
|
|
25
23
|
/**
|
|
26
24
|
* To filter by the institution's role in the referral. e.g. For outbound referrals, use "sender'
|
|
@@ -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.
|
|
72
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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.
|
|
116
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.42", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.42", "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,
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.42";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
package/reference.md
CHANGED
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.42";
|
package/version.js
CHANGED