@opengovsg/refx-ts-sdk 0.0.0-develop-1746623964 → 0.0.0-develop-1748575737

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +11 -6
  3. package/api/index.d.ts +1 -1
  4. package/api/index.js +1 -1
  5. package/api/resources/eligibility/client/Client.js +1 -1
  6. package/api/resources/health/client/Client.js +1 -1
  7. package/api/resources/index.d.ts +3 -0
  8. package/api/resources/index.js +4 -1
  9. package/api/resources/links/client/Client.d.ts +55 -0
  10. package/api/resources/links/client/Client.js +133 -0
  11. package/api/resources/links/client/index.d.ts +1 -0
  12. package/api/resources/links/client/index.js +17 -0
  13. package/api/resources/links/client/requests/CreateLinkReqUpsert.d.ts +47 -0
  14. package/api/resources/links/client/requests/CreateLinkReqUpsert.js +5 -0
  15. package/api/resources/links/client/requests/index.d.ts +1 -0
  16. package/api/resources/links/client/requests/index.js +2 -0
  17. package/api/resources/links/index.d.ts +2 -0
  18. package/api/resources/links/index.js +18 -0
  19. package/api/resources/links/types/CreateLinkReqUpsertPatientGender.d.ts +11 -0
  20. package/api/resources/links/types/CreateLinkReqUpsertPatientGender.js +10 -0
  21. package/api/resources/links/types/index.d.ts +1 -0
  22. package/api/resources/links/types/index.js +17 -0
  23. package/api/resources/notes/client/Client.js +1 -1
  24. package/api/resources/offerings/client/Client.d.ts +1 -2
  25. package/api/resources/offerings/client/Client.js +6 -5
  26. package/api/resources/offerings/client/requests/OfferingsListTimeslotsRequest.d.ts +2 -3
  27. package/api/resources/public/client/Client.js +1 -1
  28. package/api/resources/referrals/client/Client.js +9 -9
  29. package/api/resources/webhooks/client/Client.js +2 -2
  30. package/api/types/ReferralLinkDto.d.ts +11 -0
  31. package/api/types/ReferralLinkDto.js +5 -0
  32. package/api/types/ReferralLinkType.d.ts +12 -0
  33. package/api/types/ReferralLinkType.js +11 -0
  34. package/api/types/ReferrerIdType.d.ts +6 -1
  35. package/api/types/ReferrerIdType.js +6 -0
  36. package/api/types/index.d.ts +2 -0
  37. package/api/types/index.js +2 -0
  38. package/dist/Client.d.ts +3 -0
  39. package/dist/Client.js +11 -6
  40. package/dist/api/index.d.ts +1 -1
  41. package/dist/api/index.js +1 -1
  42. package/dist/api/resources/eligibility/client/Client.js +1 -1
  43. package/dist/api/resources/health/client/Client.js +1 -1
  44. package/dist/api/resources/index.d.ts +3 -0
  45. package/dist/api/resources/index.js +4 -1
  46. package/dist/api/resources/links/client/Client.d.ts +55 -0
  47. package/dist/api/resources/links/client/Client.js +133 -0
  48. package/dist/api/resources/links/client/index.d.ts +1 -0
  49. package/dist/api/resources/links/client/index.js +17 -0
  50. package/dist/api/resources/links/client/requests/CreateLinkReqUpsert.d.ts +47 -0
  51. package/dist/api/resources/links/client/requests/CreateLinkReqUpsert.js +5 -0
  52. package/dist/api/resources/links/client/requests/index.d.ts +1 -0
  53. package/dist/api/resources/links/client/requests/index.js +2 -0
  54. package/dist/api/resources/links/index.d.ts +2 -0
  55. package/dist/api/resources/links/index.js +18 -0
  56. package/dist/api/resources/links/types/CreateLinkReqUpsertPatientGender.d.ts +11 -0
  57. package/dist/api/resources/links/types/CreateLinkReqUpsertPatientGender.js +10 -0
  58. package/dist/api/resources/links/types/index.d.ts +1 -0
  59. package/dist/api/resources/links/types/index.js +17 -0
  60. package/dist/api/resources/notes/client/Client.js +1 -1
  61. package/dist/api/resources/offerings/client/Client.d.ts +1 -2
  62. package/dist/api/resources/offerings/client/Client.js +6 -5
  63. package/dist/api/resources/offerings/client/requests/OfferingsListTimeslotsRequest.d.ts +2 -3
  64. package/dist/api/resources/public/client/Client.js +1 -1
  65. package/dist/api/resources/referrals/client/Client.js +9 -9
  66. package/dist/api/resources/webhooks/client/Client.js +2 -2
  67. package/dist/api/types/ReferralLinkDto.d.ts +11 -0
  68. package/dist/api/types/ReferralLinkDto.js +5 -0
  69. package/dist/api/types/ReferralLinkType.d.ts +12 -0
  70. package/dist/api/types/ReferralLinkType.js +11 -0
  71. package/dist/api/types/ReferrerIdType.d.ts +6 -1
  72. package/dist/api/types/ReferrerIdType.js +6 -0
  73. package/dist/api/types/index.d.ts +2 -0
  74. package/dist/api/types/index.js +2 -0
  75. package/dist/version.d.ts +1 -1
  76. package/dist/version.js +1 -1
  77. package/package.json +1 -1
  78. package/reference.md +63 -1
  79. package/version.d.ts +1 -1
  80. package/version.js +1 -1
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
18
+ __exportStar(require("./client"), exports);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Patient gender
6
+ */
7
+ export type CreateLinkReqUpsertPatientGender = "Male" | "Female";
8
+ export declare const CreateLinkReqUpsertPatientGender: {
9
+ readonly Male: "Male";
10
+ readonly Female: "Female";
11
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CreateLinkReqUpsertPatientGender = void 0;
7
+ exports.CreateLinkReqUpsertPatientGender = {
8
+ Male: "Male",
9
+ Female: "Female",
10
+ };
@@ -0,0 +1 @@
1
+ export * from "./CreateLinkReqUpsertPatientGender";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./CreateLinkReqUpsertPatientGender"), exports);
@@ -76,7 +76,7 @@ class Notes {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, `api/v1/referrals/${encodeURIComponent(referralId)}/notes`),
78
78
  method: "POST",
79
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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,
@@ -45,8 +45,7 @@ export declare class Offerings {
45
45
  *
46
46
  * @example
47
47
  * await client.offerings.listTimeslots("offeringId", {
48
- * from: 1.1,
49
- * isSubsidised: true
48
+ * from: 1.1
50
49
  * })
51
50
  */
52
51
  listTimeslots(offeringId: string, request: ReferralExchange.OfferingsListTimeslotsRequest, requestOptions?: Offerings.RequestOptions): Promise<ReferralExchange.Timeslot[]>;
@@ -84,7 +84,7 @@ class Offerings {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, "api/v1/offerings"),
86
86
  method: "GET",
87
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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",
@@ -130,8 +130,7 @@ class Offerings {
130
130
  *
131
131
  * @example
132
132
  * await client.offerings.listTimeslots("offeringId", {
133
- * from: 1.1,
134
- * isSubsidised: true
133
+ * from: 1.1
135
134
  * })
136
135
  */
137
136
  listTimeslots(offeringId, request, requestOptions) {
@@ -140,11 +139,13 @@ class Offerings {
140
139
  const { from: from_, isSubsidised } = request;
141
140
  const _queryParams = {};
142
141
  _queryParams["from"] = from_.toString();
143
- _queryParams["isSubsidised"] = isSubsidised.toString();
142
+ if (isSubsidised != null) {
143
+ _queryParams["isSubsidised"] = isSubsidised.toString();
144
+ }
144
145
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
145
146
  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`),
146
147
  method: "GET",
147
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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
149
  contentType: "application/json",
149
150
  queryParameters: _queryParams,
150
151
  requestType: "json",
@@ -4,11 +4,10 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * from: 1.1,
8
- * isSubsidised: true
7
+ * from: 1.1
9
8
  * }
10
9
  */
11
10
  export interface OfferingsListTimeslotsRequest {
12
11
  from: number;
13
- isSubsidised: boolean;
12
+ isSubsidised?: boolean;
14
13
  }
@@ -84,7 +84,7 @@ class Public {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, `api/v1/public/referrals/${encodeURIComponent(referralId)}`),
86
86
  method: "GET",
87
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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",
@@ -95,7 +95,7 @@ class Referrals {
95
95
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
96
96
  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"),
97
97
  method: "GET",
98
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "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),
98
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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),
99
99
  contentType: "application/json",
100
100
  queryParameters: _queryParams,
101
101
  requestType: "json",
@@ -171,7 +171,7 @@ class Referrals {
171
171
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
172
172
  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"),
173
173
  method: "POST",
174
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "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),
174
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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),
175
175
  contentType: "application/json",
176
176
  requestType: "json",
177
177
  body: request,
@@ -237,7 +237,7 @@ class Referrals {
237
237
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
238
238
  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)}`),
239
239
  method: "GET",
240
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "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),
240
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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),
241
241
  contentType: "application/json",
242
242
  queryParameters: _queryParams,
243
243
  requestType: "json",
@@ -291,7 +291,7 @@ class Referrals {
291
291
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
292
292
  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)}`),
293
293
  method: "DELETE",
294
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "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),
294
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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),
295
295
  contentType: "application/json",
296
296
  requestType: "json",
297
297
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -343,7 +343,7 @@ class Referrals {
343
343
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
344
344
  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`),
345
345
  method: "POST",
346
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "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),
346
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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),
347
347
  contentType: "application/json",
348
348
  requestType: "json",
349
349
  body: request,
@@ -398,7 +398,7 @@ class Referrals {
398
398
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
399
399
  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`),
400
400
  method: "POST",
401
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "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),
401
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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),
402
402
  contentType: "application/json",
403
403
  requestType: "json",
404
404
  body: request,
@@ -451,7 +451,7 @@ class Referrals {
451
451
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
452
452
  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`),
453
453
  method: "POST",
454
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "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),
454
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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),
455
455
  contentType: "application/json",
456
456
  requestType: "json",
457
457
  body: request,
@@ -506,7 +506,7 @@ class Referrals {
506
506
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
507
507
  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`),
508
508
  method: "POST",
509
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "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),
509
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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),
510
510
  contentType: "application/json",
511
511
  requestType: "json",
512
512
  body: request,
@@ -558,7 +558,7 @@ class Referrals {
558
558
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
559
559
  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`),
560
560
  method: "POST",
561
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "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),
561
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "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),
562
562
  contentType: "application/json",
563
563
  requestType: "json",
564
564
  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.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
72
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
73
73
  contentType: "application/json",
74
74
  requestType: "json",
75
75
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -113,7 +113,7 @@ class Webhooks {
113
113
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
114
114
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, `api/v1/webhooks/formsg/form-submission/${encodeURIComponent(formId)}`),
115
115
  method: "POST",
116
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1746623964", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1746623964", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
116
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.0-develop-1748575737", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.0-develop-1748575737", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
117
117
  contentType: "application/json",
118
118
  requestType: "json",
119
119
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as ReferralExchange from "../index";
5
+ export interface ReferralLinkDto {
6
+ type: ReferralExchange.ReferralLinkType;
7
+ /** The ID of the referral */
8
+ referralId: string;
9
+ /** The URL of the link */
10
+ url: string;
11
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * type of referral link
6
+ */
7
+ export type ReferralLinkType = "upsert" | "amend" | "select-timeslot";
8
+ export declare const ReferralLinkType: {
9
+ readonly Upsert: "upsert";
10
+ readonly Amend: "amend";
11
+ readonly SelectTimeslot: "select-timeslot";
12
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ReferralLinkType = void 0;
7
+ exports.ReferralLinkType = {
8
+ Upsert: "upsert",
9
+ Amend: "amend",
10
+ SelectTimeslot: "select-timeslot",
11
+ };
@@ -4,4 +4,9 @@
4
4
  /**
5
5
  * Type of ID specified in referrerId. Use together with `referrerId` and `referrerInstitutionId` to filter based on referrer.
6
6
  */
7
- export type ReferrerIdType = "mcr";
7
+ export type ReferrerIdType = "mcr" | "nric" | "email";
8
+ export declare const ReferrerIdType: {
9
+ readonly Mcr: "mcr";
10
+ readonly Nric: "nric";
11
+ readonly Email: "email";
12
+ };
@@ -3,3 +3,9 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ReferrerIdType = void 0;
7
+ exports.ReferrerIdType = {
8
+ Mcr: "mcr",
9
+ Nric: "nric",
10
+ Email: "email",
11
+ };
@@ -38,5 +38,7 @@ export * from "./Timeslot";
38
38
  export * from "./TriggerEmailReminderBody";
39
39
  export * from "./FormMetadata";
40
40
  export * from "./CreateReferralFormReq";
41
+ export * from "./ReferralLinkType";
42
+ export * from "./ReferralLinkDto";
41
43
  export * from "./PublicReferralDto";
42
44
  export * from "./OkResponse";
@@ -54,5 +54,7 @@ __exportStar(require("./Timeslot"), exports);
54
54
  __exportStar(require("./TriggerEmailReminderBody"), exports);
55
55
  __exportStar(require("./FormMetadata"), exports);
56
56
  __exportStar(require("./CreateReferralFormReq"), exports);
57
+ __exportStar(require("./ReferralLinkType"), exports);
58
+ __exportStar(require("./ReferralLinkDto"), exports);
57
59
  __exportStar(require("./PublicReferralDto"), exports);
58
60
  __exportStar(require("./OkResponse"), exports);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.0-develop-1746623964";
1
+ export declare const SDK_VERSION = "0.0.0-develop-1748575737";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.0-develop-1746623964";
4
+ exports.SDK_VERSION = "0.0.0-develop-1748575737";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengovsg/refx-ts-sdk",
3
- "version": "0.0.0-develop-1746623964",
3
+ "version": "0.0.0-develop-1748575737",
4
4
  "private": false,
5
5
  "repository": "https://github.com/opengovsg/refer-ts-sdk",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -683,7 +683,6 @@ await client.offerings.list();
683
683
  ```typescript
684
684
  await client.offerings.listTimeslots("offeringId", {
685
685
  from: 1.1,
686
- isSubsidised: true,
687
686
  });
688
687
  ```
689
688
 
@@ -727,6 +726,69 @@ await client.offerings.listTimeslots("offeringId", {
727
726
  </dl>
728
727
  </details>
729
728
 
729
+ ## Links
730
+
731
+ <details><summary><code>client.links.<a href="/src/api/resources/links/client/Client.ts">createUpsertLink</a>({ ...params }) -> ReferralExchange.ReferralLinkDto</code></summary>
732
+ <dl>
733
+ <dd>
734
+
735
+ #### 🔌 Usage
736
+
737
+ <dl>
738
+ <dd>
739
+
740
+ <dl>
741
+ <dd>
742
+
743
+ ```typescript
744
+ await client.links.createUpsertLink({
745
+ referrerInstitutionId: "referrerInstitutionId",
746
+ referrerInstitutionName: "referrerInstitutionName",
747
+ referrerId: "referrerId",
748
+ referrerName: "referrerName",
749
+ referrerIdType: "referrerIdType",
750
+ referrerEmail: "referrerEmail",
751
+ referrerContactNumber: "referrerContactNumber",
752
+ patientUin: "patientUin",
753
+ patientName: "patientName",
754
+ patientPhoneNumber: "91234567",
755
+ patientDob: "1990-01-01",
756
+ patientGender: "Male",
757
+ });
758
+ ```
759
+
760
+ </dd>
761
+ </dl>
762
+ </dd>
763
+ </dl>
764
+
765
+ #### ⚙️ Parameters
766
+
767
+ <dl>
768
+ <dd>
769
+
770
+ <dl>
771
+ <dd>
772
+
773
+ **request:** `ReferralExchange.CreateLinkReqUpsert`
774
+
775
+ </dd>
776
+ </dl>
777
+
778
+ <dl>
779
+ <dd>
780
+
781
+ **requestOptions:** `Links.RequestOptions`
782
+
783
+ </dd>
784
+ </dl>
785
+ </dd>
786
+ </dl>
787
+
788
+ </dd>
789
+ </dl>
790
+ </details>
791
+
730
792
  ## Public
731
793
 
732
794
  <details><summary><code>client.public.<a href="/src/api/resources/public/client/Client.ts">getReferral</a>(referralId, { ...params }) -> ReferralExchange.PublicReferralDto</code></summary>
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.0-develop-1746623964";
1
+ export declare const SDK_VERSION = "0.0.0-develop-1748575737";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.0-develop-1746623964";
4
+ exports.SDK_VERSION = "0.0.0-develop-1748575737";