@opengovsg/refx-ts-sdk 0.0.52 → 0.0.53
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.d.ts +3 -0
- package/api/resources/eligibility/client/Client.js +7 -10
- package/api/resources/eligibility/client/requests/EligibilityGetRequest.d.ts +8 -5
- 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.d.ts +6 -2
- package/api/resources/offerings/client/Client.js +13 -15
- package/api/resources/offerings/client/requests/OfferingsListRequest.d.ts +10 -6
- package/api/resources/public/client/Client.js +1 -1
- package/api/resources/referrals/client/Client.js +9 -9
- package/api/resources/webhooks/client/Client.js +2 -2
- package/api/types/ReferrerIdType.d.ts +2 -1
- package/api/types/ReferrerIdType.js +1 -0
- package/dist/api/resources/eligibility/client/Client.d.ts +3 -0
- package/dist/api/resources/eligibility/client/Client.js +7 -10
- package/dist/api/resources/eligibility/client/requests/EligibilityGetRequest.d.ts +8 -5
- 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.d.ts +6 -2
- package/dist/api/resources/offerings/client/Client.js +13 -15
- package/dist/api/resources/offerings/client/requests/OfferingsListRequest.d.ts +10 -6
- package/dist/api/resources/public/client/Client.js +1 -1
- package/dist/api/resources/referrals/client/Client.js +9 -9
- package/dist/api/resources/webhooks/client/Client.js +2 -2
- package/dist/api/types/ReferrerIdType.d.ts +2 -1
- package/dist/api/types/ReferrerIdType.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +8 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -66,6 +66,9 @@ class Eligibility {
|
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
68
|
* await client.eligibility.get({
|
|
69
|
+
* referrerId: "referrerId",
|
|
70
|
+
* referrerIdType: "mcr",
|
|
71
|
+
* referrerInstitutionId: "referrerInstitutionId",
|
|
69
72
|
* uin: "uin",
|
|
70
73
|
* offeringId: "offeringId"
|
|
71
74
|
* })
|
|
@@ -75,15 +78,9 @@ class Eligibility {
|
|
|
75
78
|
var _a, _b, _c;
|
|
76
79
|
const { referrerId, referrerIdType, referrerInstitutionId, patientPostalCode, uin, offeringId } = request;
|
|
77
80
|
const _queryParams = {};
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (referrerIdType != null) {
|
|
82
|
-
_queryParams["referrerIdType"] = referrerIdType;
|
|
83
|
-
}
|
|
84
|
-
if (referrerInstitutionId != null) {
|
|
85
|
-
_queryParams["referrerInstitutionId"] = referrerInstitutionId;
|
|
86
|
-
}
|
|
81
|
+
_queryParams["referrerId"] = referrerId;
|
|
82
|
+
_queryParams["referrerIdType"] = referrerIdType;
|
|
83
|
+
_queryParams["referrerInstitutionId"] = referrerInstitutionId;
|
|
87
84
|
if (patientPostalCode != null) {
|
|
88
85
|
_queryParams["patientPostalCode"] = patientPostalCode;
|
|
89
86
|
}
|
|
@@ -92,7 +89,7 @@ class Eligibility {
|
|
|
92
89
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
93
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"),
|
|
94
91
|
method: "GET",
|
|
95
|
-
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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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),
|
|
96
93
|
contentType: "application/json",
|
|
97
94
|
queryParameters: _queryParams,
|
|
98
95
|
requestType: "json",
|
|
@@ -5,20 +5,23 @@ import * as ReferralExchange from "../../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
+
* referrerId: "referrerId",
|
|
9
|
+
* referrerIdType: "mcr",
|
|
10
|
+
* referrerInstitutionId: "referrerInstitutionId",
|
|
8
11
|
* uin: "uin",
|
|
9
12
|
* offeringId: "offeringId"
|
|
10
13
|
* }
|
|
11
14
|
*/
|
|
12
15
|
export interface EligibilityGetRequest {
|
|
13
16
|
/**
|
|
14
|
-
* ID of the referring individual.
|
|
17
|
+
* ID of the referring individual.
|
|
15
18
|
*/
|
|
16
|
-
referrerId
|
|
17
|
-
referrerIdType
|
|
19
|
+
referrerId: string;
|
|
20
|
+
referrerIdType: ReferralExchange.ReferrerIdType;
|
|
18
21
|
/**
|
|
19
|
-
* ID of the referring institution.
|
|
22
|
+
* ID of the referring institution.
|
|
20
23
|
*/
|
|
21
|
-
referrerInstitutionId
|
|
24
|
+
referrerInstitutionId: string;
|
|
22
25
|
/**
|
|
23
26
|
* Postal code of the patient
|
|
24
27
|
*/
|
|
@@ -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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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,
|
|
@@ -33,9 +33,13 @@ export declare class Offerings {
|
|
|
33
33
|
* @throws {@link ReferralExchange.UnauthorizedError}
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
|
-
* await client.offerings.list(
|
|
36
|
+
* await client.offerings.list({
|
|
37
|
+
* referrerId: "referrerId",
|
|
38
|
+
* referrerIdType: "mcr",
|
|
39
|
+
* referrerInstitutionId: "referrerInstitutionId"
|
|
40
|
+
* })
|
|
37
41
|
*/
|
|
38
|
-
list(request
|
|
42
|
+
list(request: ReferralExchange.OfferingsListRequest, requestOptions?: Offerings.RequestOptions): Promise<ReferralExchange.OfferingWithAllowedDto[]>;
|
|
39
43
|
/**
|
|
40
44
|
* @param {ReferralExchange.ApiHoldingControllerGetRecommendedOfferingRequest} request
|
|
41
45
|
* @param {Offerings.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -65,29 +65,27 @@ class Offerings {
|
|
|
65
65
|
* @throws {@link ReferralExchange.UnauthorizedError}
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
|
-
* await client.offerings.list(
|
|
68
|
+
* await client.offerings.list({
|
|
69
|
+
* referrerId: "referrerId",
|
|
70
|
+
* referrerIdType: "mcr",
|
|
71
|
+
* referrerInstitutionId: "referrerInstitutionId"
|
|
72
|
+
* })
|
|
69
73
|
*/
|
|
70
|
-
list() {
|
|
71
|
-
return __awaiter(this,
|
|
74
|
+
list(request, requestOptions) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
76
|
var _a, _b, _c;
|
|
73
77
|
const { referrerId, referrerIdType, referrerInstitutionId, patientPostalCode } = request;
|
|
74
78
|
const _queryParams = {};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (referrerIdType != null) {
|
|
79
|
-
_queryParams["referrerIdType"] = referrerIdType;
|
|
80
|
-
}
|
|
81
|
-
if (referrerInstitutionId != null) {
|
|
82
|
-
_queryParams["referrerInstitutionId"] = referrerInstitutionId;
|
|
83
|
-
}
|
|
79
|
+
_queryParams["referrerId"] = referrerId;
|
|
80
|
+
_queryParams["referrerIdType"] = referrerIdType;
|
|
81
|
+
_queryParams["referrerInstitutionId"] = referrerInstitutionId;
|
|
84
82
|
if (patientPostalCode != null) {
|
|
85
83
|
_queryParams["patientPostalCode"] = patientPostalCode;
|
|
86
84
|
}
|
|
87
85
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
86
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, "api/v1/offerings"),
|
|
89
87
|
method: "GET",
|
|
90
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.
|
|
88
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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),
|
|
91
89
|
contentType: "application/json",
|
|
92
90
|
queryParameters: _queryParams,
|
|
93
91
|
requestType: "json",
|
|
@@ -146,7 +144,7 @@ class Offerings {
|
|
|
146
144
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
147
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"),
|
|
148
146
|
method: "GET",
|
|
149
|
-
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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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),
|
|
150
148
|
contentType: "application/json",
|
|
151
149
|
queryParameters: _queryParams,
|
|
152
150
|
requestType: "json",
|
|
@@ -209,7 +207,7 @@ class Offerings {
|
|
|
209
207
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
210
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`),
|
|
211
209
|
method: "GET",
|
|
212
|
-
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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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),
|
|
213
211
|
contentType: "application/json",
|
|
214
212
|
queryParameters: _queryParams,
|
|
215
213
|
requestType: "json",
|
|
@@ -4,18 +4,22 @@
|
|
|
4
4
|
import * as ReferralExchange from "../../../../index";
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
|
-
* {
|
|
7
|
+
* {
|
|
8
|
+
* referrerId: "referrerId",
|
|
9
|
+
* referrerIdType: "mcr",
|
|
10
|
+
* referrerInstitutionId: "referrerInstitutionId"
|
|
11
|
+
* }
|
|
8
12
|
*/
|
|
9
13
|
export interface OfferingsListRequest {
|
|
10
14
|
/**
|
|
11
|
-
* ID of the referring individual.
|
|
15
|
+
* ID of the referring individual.
|
|
12
16
|
*/
|
|
13
|
-
referrerId
|
|
14
|
-
referrerIdType
|
|
17
|
+
referrerId: string;
|
|
18
|
+
referrerIdType: ReferralExchange.ReferrerIdType;
|
|
15
19
|
/**
|
|
16
|
-
* ID of the referring institution.
|
|
20
|
+
* ID of the referring institution.
|
|
17
21
|
*/
|
|
18
|
-
referrerInstitutionId
|
|
22
|
+
referrerInstitutionId: string;
|
|
19
23
|
/**
|
|
20
24
|
* Postal code of the patient
|
|
21
25
|
*/
|
|
@@ -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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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",
|
|
@@ -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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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,
|
|
@@ -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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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,
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Type of ID specified in referrerId.
|
|
6
6
|
*/
|
|
7
|
-
export type ReferrerIdType = "mcr" | "nric" | "email" | "brightUserId";
|
|
7
|
+
export type ReferrerIdType = "mcr" | "nric" | "email" | "brightUserId" | "dcr";
|
|
8
8
|
export declare const ReferrerIdType: {
|
|
9
9
|
readonly Mcr: "mcr";
|
|
10
10
|
readonly Nric: "nric";
|
|
11
11
|
readonly Email: "email";
|
|
12
12
|
readonly BrightUserId: "brightUserId";
|
|
13
|
+
readonly Dcr: "dcr";
|
|
13
14
|
};
|
|
@@ -66,6 +66,9 @@ class Eligibility {
|
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
68
|
* await client.eligibility.get({
|
|
69
|
+
* referrerId: "referrerId",
|
|
70
|
+
* referrerIdType: "mcr",
|
|
71
|
+
* referrerInstitutionId: "referrerInstitutionId",
|
|
69
72
|
* uin: "uin",
|
|
70
73
|
* offeringId: "offeringId"
|
|
71
74
|
* })
|
|
@@ -75,15 +78,9 @@ class Eligibility {
|
|
|
75
78
|
var _a, _b, _c;
|
|
76
79
|
const { referrerId, referrerIdType, referrerInstitutionId, patientPostalCode, uin, offeringId } = request;
|
|
77
80
|
const _queryParams = {};
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (referrerIdType != null) {
|
|
82
|
-
_queryParams["referrerIdType"] = referrerIdType;
|
|
83
|
-
}
|
|
84
|
-
if (referrerInstitutionId != null) {
|
|
85
|
-
_queryParams["referrerInstitutionId"] = referrerInstitutionId;
|
|
86
|
-
}
|
|
81
|
+
_queryParams["referrerId"] = referrerId;
|
|
82
|
+
_queryParams["referrerIdType"] = referrerIdType;
|
|
83
|
+
_queryParams["referrerInstitutionId"] = referrerInstitutionId;
|
|
87
84
|
if (patientPostalCode != null) {
|
|
88
85
|
_queryParams["patientPostalCode"] = patientPostalCode;
|
|
89
86
|
}
|
|
@@ -92,7 +89,7 @@ class Eligibility {
|
|
|
92
89
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
93
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"),
|
|
94
91
|
method: "GET",
|
|
95
|
-
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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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),
|
|
96
93
|
contentType: "application/json",
|
|
97
94
|
queryParameters: _queryParams,
|
|
98
95
|
requestType: "json",
|
|
@@ -5,20 +5,23 @@ import * as ReferralExchange from "../../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
+
* referrerId: "referrerId",
|
|
9
|
+
* referrerIdType: "mcr",
|
|
10
|
+
* referrerInstitutionId: "referrerInstitutionId",
|
|
8
11
|
* uin: "uin",
|
|
9
12
|
* offeringId: "offeringId"
|
|
10
13
|
* }
|
|
11
14
|
*/
|
|
12
15
|
export interface EligibilityGetRequest {
|
|
13
16
|
/**
|
|
14
|
-
* ID of the referring individual.
|
|
17
|
+
* ID of the referring individual.
|
|
15
18
|
*/
|
|
16
|
-
referrerId
|
|
17
|
-
referrerIdType
|
|
19
|
+
referrerId: string;
|
|
20
|
+
referrerIdType: ReferralExchange.ReferrerIdType;
|
|
18
21
|
/**
|
|
19
|
-
* ID of the referring institution.
|
|
22
|
+
* ID of the referring institution.
|
|
20
23
|
*/
|
|
21
|
-
referrerInstitutionId
|
|
24
|
+
referrerInstitutionId: string;
|
|
22
25
|
/**
|
|
23
26
|
* Postal code of the patient
|
|
24
27
|
*/
|
|
@@ -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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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,
|
|
@@ -33,9 +33,13 @@ export declare class Offerings {
|
|
|
33
33
|
* @throws {@link ReferralExchange.UnauthorizedError}
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
|
-
* await client.offerings.list(
|
|
36
|
+
* await client.offerings.list({
|
|
37
|
+
* referrerId: "referrerId",
|
|
38
|
+
* referrerIdType: "mcr",
|
|
39
|
+
* referrerInstitutionId: "referrerInstitutionId"
|
|
40
|
+
* })
|
|
37
41
|
*/
|
|
38
|
-
list(request
|
|
42
|
+
list(request: ReferralExchange.OfferingsListRequest, requestOptions?: Offerings.RequestOptions): Promise<ReferralExchange.OfferingWithAllowedDto[]>;
|
|
39
43
|
/**
|
|
40
44
|
* @param {ReferralExchange.ApiHoldingControllerGetRecommendedOfferingRequest} request
|
|
41
45
|
* @param {Offerings.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -65,29 +65,27 @@ class Offerings {
|
|
|
65
65
|
* @throws {@link ReferralExchange.UnauthorizedError}
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
|
-
* await client.offerings.list(
|
|
68
|
+
* await client.offerings.list({
|
|
69
|
+
* referrerId: "referrerId",
|
|
70
|
+
* referrerIdType: "mcr",
|
|
71
|
+
* referrerInstitutionId: "referrerInstitutionId"
|
|
72
|
+
* })
|
|
69
73
|
*/
|
|
70
|
-
list() {
|
|
71
|
-
return __awaiter(this,
|
|
74
|
+
list(request, requestOptions) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
76
|
var _a, _b, _c;
|
|
73
77
|
const { referrerId, referrerIdType, referrerInstitutionId, patientPostalCode } = request;
|
|
74
78
|
const _queryParams = {};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (referrerIdType != null) {
|
|
79
|
-
_queryParams["referrerIdType"] = referrerIdType;
|
|
80
|
-
}
|
|
81
|
-
if (referrerInstitutionId != null) {
|
|
82
|
-
_queryParams["referrerInstitutionId"] = referrerInstitutionId;
|
|
83
|
-
}
|
|
79
|
+
_queryParams["referrerId"] = referrerId;
|
|
80
|
+
_queryParams["referrerIdType"] = referrerIdType;
|
|
81
|
+
_queryParams["referrerInstitutionId"] = referrerInstitutionId;
|
|
84
82
|
if (patientPostalCode != null) {
|
|
85
83
|
_queryParams["patientPostalCode"] = patientPostalCode;
|
|
86
84
|
}
|
|
87
85
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
86
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, "api/v1/offerings"),
|
|
89
87
|
method: "GET",
|
|
90
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.
|
|
88
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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),
|
|
91
89
|
contentType: "application/json",
|
|
92
90
|
queryParameters: _queryParams,
|
|
93
91
|
requestType: "json",
|
|
@@ -146,7 +144,7 @@ class Offerings {
|
|
|
146
144
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
147
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"),
|
|
148
146
|
method: "GET",
|
|
149
|
-
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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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),
|
|
150
148
|
contentType: "application/json",
|
|
151
149
|
queryParameters: _queryParams,
|
|
152
150
|
requestType: "json",
|
|
@@ -209,7 +207,7 @@ class Offerings {
|
|
|
209
207
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
210
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`),
|
|
211
209
|
method: "GET",
|
|
212
|
-
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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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),
|
|
213
211
|
contentType: "application/json",
|
|
214
212
|
queryParameters: _queryParams,
|
|
215
213
|
requestType: "json",
|
|
@@ -4,18 +4,22 @@
|
|
|
4
4
|
import * as ReferralExchange from "../../../../index";
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
|
-
* {
|
|
7
|
+
* {
|
|
8
|
+
* referrerId: "referrerId",
|
|
9
|
+
* referrerIdType: "mcr",
|
|
10
|
+
* referrerInstitutionId: "referrerInstitutionId"
|
|
11
|
+
* }
|
|
8
12
|
*/
|
|
9
13
|
export interface OfferingsListRequest {
|
|
10
14
|
/**
|
|
11
|
-
* ID of the referring individual.
|
|
15
|
+
* ID of the referring individual.
|
|
12
16
|
*/
|
|
13
|
-
referrerId
|
|
14
|
-
referrerIdType
|
|
17
|
+
referrerId: string;
|
|
18
|
+
referrerIdType: ReferralExchange.ReferrerIdType;
|
|
15
19
|
/**
|
|
16
|
-
* ID of the referring institution.
|
|
20
|
+
* ID of the referring institution.
|
|
17
21
|
*/
|
|
18
|
-
referrerInstitutionId
|
|
22
|
+
referrerInstitutionId: string;
|
|
19
23
|
/**
|
|
20
24
|
* Postal code of the patient
|
|
21
25
|
*/
|
|
@@ -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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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",
|
|
@@ -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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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,
|
|
@@ -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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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.53", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.53", "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,
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Type of ID specified in referrerId.
|
|
6
6
|
*/
|
|
7
|
-
export type ReferrerIdType = "mcr" | "nric" | "email" | "brightUserId";
|
|
7
|
+
export type ReferrerIdType = "mcr" | "nric" | "email" | "brightUserId" | "dcr";
|
|
8
8
|
export declare const ReferrerIdType: {
|
|
9
9
|
readonly Mcr: "mcr";
|
|
10
10
|
readonly Nric: "nric";
|
|
11
11
|
readonly Email: "email";
|
|
12
12
|
readonly BrightUserId: "brightUserId";
|
|
13
|
+
readonly Dcr: "dcr";
|
|
13
14
|
};
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.53";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
```typescript
|
|
18
18
|
await client.eligibility.get({
|
|
19
|
+
referrerId: "referrerId",
|
|
20
|
+
referrerIdType: "mcr",
|
|
21
|
+
referrerInstitutionId: "referrerInstitutionId",
|
|
19
22
|
uin: "uin",
|
|
20
23
|
offeringId: "offeringId",
|
|
21
24
|
});
|
|
@@ -631,7 +634,11 @@ await client.notes.create("referralId", {
|
|
|
631
634
|
<dd>
|
|
632
635
|
|
|
633
636
|
```typescript
|
|
634
|
-
await client.offerings.list(
|
|
637
|
+
await client.offerings.list({
|
|
638
|
+
referrerId: "referrerId",
|
|
639
|
+
referrerIdType: "mcr",
|
|
640
|
+
referrerInstitutionId: "referrerInstitutionId",
|
|
641
|
+
});
|
|
635
642
|
```
|
|
636
643
|
|
|
637
644
|
</dd>
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.53";
|
package/version.js
CHANGED