@opengovsg/refx-ts-sdk 0.0.33 → 0.0.35

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 (46) hide show
  1. package/api/resources/eligibility/client/Client.js +1 -1
  2. package/api/resources/health/client/Client.js +1 -1
  3. package/api/resources/notes/client/Client.js +1 -1
  4. package/api/resources/offerings/client/Client.js +2 -2
  5. package/api/resources/public/client/Client.js +1 -1
  6. package/api/resources/referrals/client/Client.d.ts +5 -7
  7. package/api/resources/referrals/client/Client.js +14 -16
  8. package/api/resources/referrals/client/requests/{EaConfirmReferralBody.d.ts → AcceptReferralBody.d.ts} +3 -5
  9. package/{dist/api/resources/referrals/client/requests/EaRejectReferralBody.d.ts → api/resources/referrals/client/requests/RejectReferralBody.d.ts} +1 -1
  10. package/api/resources/referrals/client/requests/index.d.ts +2 -2
  11. package/api/resources/webhooks/client/Client.js +2 -2
  12. package/api/types/TimelineEventType.d.ts +4 -1
  13. package/api/types/TimelineEventType.js +3 -0
  14. package/api/types/TriggerEmailReminderBody.d.ts +0 -5
  15. package/api/types/index.d.ts +0 -1
  16. package/api/types/index.js +0 -1
  17. package/dist/api/resources/eligibility/client/Client.js +1 -1
  18. package/dist/api/resources/health/client/Client.js +1 -1
  19. package/dist/api/resources/notes/client/Client.js +1 -1
  20. package/dist/api/resources/offerings/client/Client.js +2 -2
  21. package/dist/api/resources/public/client/Client.js +1 -1
  22. package/dist/api/resources/referrals/client/Client.d.ts +5 -7
  23. package/dist/api/resources/referrals/client/Client.js +14 -16
  24. package/dist/api/resources/referrals/client/requests/{EaConfirmReferralBody.d.ts → AcceptReferralBody.d.ts} +3 -5
  25. package/{api/resources/referrals/client/requests/EaRejectReferralBody.d.ts → dist/api/resources/referrals/client/requests/RejectReferralBody.d.ts} +1 -1
  26. package/dist/api/resources/referrals/client/requests/index.d.ts +2 -2
  27. package/dist/api/resources/webhooks/client/Client.js +2 -2
  28. package/dist/api/types/TimelineEventType.d.ts +4 -1
  29. package/dist/api/types/TimelineEventType.js +3 -0
  30. package/dist/api/types/TriggerEmailReminderBody.d.ts +0 -5
  31. package/dist/api/types/index.d.ts +0 -1
  32. package/dist/api/types/index.js +0 -1
  33. package/dist/version.d.ts +1 -1
  34. package/dist/version.js +1 -1
  35. package/package.json +1 -1
  36. package/reference.md +3 -5
  37. package/version.d.ts +1 -1
  38. package/version.js +1 -1
  39. package/api/types/EmailReminderSignature.d.ts +0 -9
  40. package/dist/api/resources/referrals/client/requests/EaRejectReferralBody.js +0 -5
  41. package/dist/api/types/EmailReminderSignature.d.ts +0 -9
  42. package/dist/api/types/EmailReminderSignature.js +0 -5
  43. /package/api/resources/referrals/client/requests/{EaConfirmReferralBody.js → AcceptReferralBody.js} +0 -0
  44. /package/api/resources/referrals/client/requests/{EaRejectReferralBody.js → RejectReferralBody.js} +0 -0
  45. /package/{api/types/EmailReminderSignature.js → dist/api/resources/referrals/client/requests/AcceptReferralBody.js} +0 -0
  46. /package/dist/api/resources/referrals/client/requests/{EaConfirmReferralBody.js → RejectReferralBody.js} +0 -0
@@ -80,7 +80,7 @@ class Eligibility {
80
80
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
81
81
  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"),
82
82
  method: "GET",
83
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
84
  contentType: "application/json",
85
85
  queryParameters: _queryParams,
86
86
  requestType: "json",
@@ -69,7 +69,7 @@ class Health {
69
69
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
70
70
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, "api/v1/health"),
71
71
  method: "GET",
72
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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,
@@ -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.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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,
@@ -72,7 +72,7 @@ class Offerings {
72
72
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
73
73
  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"),
74
74
  method: "GET",
75
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
75
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
76
76
  contentType: "application/json",
77
77
  requestType: "json",
78
78
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -131,7 +131,7 @@ class Offerings {
131
131
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
132
132
  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`),
133
133
  method: "GET",
134
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
134
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
135
135
  contentType: "application/json",
136
136
  queryParameters: _queryParams,
137
137
  requestType: "json",
@@ -79,7 +79,7 @@ class Public {
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/public/referrals/${encodeURIComponent(referralId)}`),
81
81
  method: "GET",
82
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
82
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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
  queryParameters: _queryParams,
85
85
  requestType: "json",
@@ -120,20 +120,18 @@ export declare class Referrals {
120
120
  amend(referralId: string, request: ReferralExchange.AmendReferralReq, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.ReferralDto>;
121
121
  /**
122
122
  * @param {string} referralId - Referral ID
123
- * @param {ReferralExchange.EaConfirmReferralBody} request
123
+ * @param {ReferralExchange.AcceptReferralBody} request
124
124
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
125
125
  *
126
126
  * @throws {@link ReferralExchange.UnauthorizedError}
127
127
  *
128
128
  * @example
129
- * await client.referrals.accept("referralId", {
130
- * appointmentTime: 1714857600000
131
- * })
129
+ * await client.referrals.accept("referralId")
132
130
  */
133
- accept(referralId: string, request: ReferralExchange.EaConfirmReferralBody, requestOptions?: Referrals.RequestOptions): Promise<void>;
131
+ accept(referralId: string, request?: ReferralExchange.AcceptReferralBody, requestOptions?: Referrals.RequestOptions): Promise<void>;
134
132
  /**
135
133
  * @param {string} referralId - Referral ID
136
- * @param {ReferralExchange.EaRejectReferralBody} request
134
+ * @param {ReferralExchange.RejectReferralBody} request
137
135
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
138
136
  *
139
137
  * @throws {@link ReferralExchange.UnauthorizedError}
@@ -143,7 +141,7 @@ export declare class Referrals {
143
141
  * rejectionMessage: "rejectionMessage"
144
142
  * })
145
143
  */
146
- reject(referralId: string, request: ReferralExchange.EaRejectReferralBody, requestOptions?: Referrals.RequestOptions): Promise<void>;
144
+ reject(referralId: string, request: ReferralExchange.RejectReferralBody, requestOptions?: Referrals.RequestOptions): Promise<void>;
147
145
  /**
148
146
  * @param {string} referralId - Referral ID
149
147
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
@@ -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.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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,
@@ -232,7 +232,7 @@ class Referrals {
232
232
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
233
233
  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)}`),
234
234
  method: "GET",
235
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
235
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
236
236
  contentType: "application/json",
237
237
  queryParameters: _queryParams,
238
238
  requestType: "json",
@@ -286,7 +286,7 @@ class Referrals {
286
286
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
287
287
  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)}`),
288
288
  method: "DELETE",
289
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
289
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
290
290
  contentType: "application/json",
291
291
  requestType: "json",
292
292
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -338,7 +338,7 @@ class Referrals {
338
338
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
339
339
  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`),
340
340
  method: "POST",
341
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
341
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
342
342
  contentType: "application/json",
343
343
  requestType: "json",
344
344
  body: request,
@@ -393,7 +393,7 @@ class Referrals {
393
393
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
394
394
  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`),
395
395
  method: "POST",
396
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
396
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
397
397
  contentType: "application/json",
398
398
  requestType: "json",
399
399
  body: request,
@@ -432,23 +432,21 @@ class Referrals {
432
432
  }
433
433
  /**
434
434
  * @param {string} referralId - Referral ID
435
- * @param {ReferralExchange.EaConfirmReferralBody} request
435
+ * @param {ReferralExchange.AcceptReferralBody} request
436
436
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
437
437
  *
438
438
  * @throws {@link ReferralExchange.UnauthorizedError}
439
439
  *
440
440
  * @example
441
- * await client.referrals.accept("referralId", {
442
- * appointmentTime: 1714857600000
443
- * })
441
+ * await client.referrals.accept("referralId")
444
442
  */
445
- accept(referralId, request, requestOptions) {
446
- return __awaiter(this, void 0, void 0, function* () {
443
+ accept(referralId_1) {
444
+ return __awaiter(this, arguments, void 0, function* (referralId, request = {}, requestOptions) {
447
445
  var _a, _b, _c;
448
446
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
449
447
  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`),
450
448
  method: "POST",
451
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
449
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
452
450
  contentType: "application/json",
453
451
  requestType: "json",
454
452
  body: request,
@@ -487,7 +485,7 @@ class Referrals {
487
485
  }
488
486
  /**
489
487
  * @param {string} referralId - Referral ID
490
- * @param {ReferralExchange.EaRejectReferralBody} request
488
+ * @param {ReferralExchange.RejectReferralBody} request
491
489
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
492
490
  *
493
491
  * @throws {@link ReferralExchange.UnauthorizedError}
@@ -503,7 +501,7 @@ class Referrals {
503
501
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
504
502
  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`),
505
503
  method: "POST",
506
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
504
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
507
505
  contentType: "application/json",
508
506
  requestType: "json",
509
507
  body: request,
@@ -555,7 +553,7 @@ class Referrals {
555
553
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
556
554
  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`),
557
555
  method: "POST",
558
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
556
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
559
557
  contentType: "application/json",
560
558
  requestType: "json",
561
559
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -3,13 +3,11 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {
7
- * appointmentTime: 1714857600000
8
- * }
6
+ * {}
9
7
  */
10
- export interface EaConfirmReferralBody {
8
+ export interface AcceptReferralBody {
11
9
  /** Appointment time, in milliseconds since epoch. */
12
- appointmentTime: number;
10
+ appointmentTime?: number;
13
11
  /** Note content */
14
12
  noteContent?: string;
15
13
  }
@@ -7,7 +7,7 @@
7
7
  * rejectionMessage: "rejectionMessage"
8
8
  * }
9
9
  */
10
- export interface EaRejectReferralBody {
10
+ export interface RejectReferralBody {
11
11
  /** Rejection message */
12
12
  rejectionMessage: string;
13
13
  }
@@ -3,5 +3,5 @@ export { type CreateReferralReq } from "./CreateReferralReq";
3
3
  export { type ReferralsGetRequest } from "./ReferralsGetRequest";
4
4
  export { type CancelReferralReq } from "./CancelReferralReq";
5
5
  export { type AmendReferralReq } from "./AmendReferralReq";
6
- export { type EaConfirmReferralBody } from "./EaConfirmReferralBody";
7
- export { type EaRejectReferralBody } from "./EaRejectReferralBody";
6
+ export { type AcceptReferralBody } from "./AcceptReferralBody";
7
+ export { type RejectReferralBody } from "./RejectReferralBody";
@@ -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.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type TimelineEventType = "draft.created" | "draft.updated" | "draft.deleted" | "referral.created" | "referral.confirmed" | "referral.rejected" | "referral.pending-cancelled" | "referral.amended" | "referral.cancelled" | "referral.validated" | "referral.pending-email-ack" | "appt.confirmed" | "appt.rescheduled" | "appt.rejected" | "note.created" | "singhealth-patient-details.submitted" | "referral.ea-reminder-sent" | "referral.form-response-submitted" | "referral.back-to-draft" | "referral.fyi-sent" | "referral.email-sent";
4
+ export type TimelineEventType = "draft.created" | "draft.updated" | "draft.deleted" | "referral.created" | "referral.confirmed" | "referral.rejected" | "referral.pending-cancelled" | "referral.amended" | "referral.cancelled" | "referral.validated" | "referral.pending-email-ack" | "appt.confirmed" | "appt.rescheduled" | "appt.rejected" | "note.created" | "singhealth-patient-details.submitted" | "referral.ea-reminder-sent" | "referral.form-response-submitted" | "referral.back-to-draft" | "referral.fyi-sent" | "referral.email-sent" | "referral.discharged" | "referral.sms-sent" | "referral.sms-status-changed";
5
5
  export declare const TimelineEventType: {
6
6
  readonly DraftCreated: "draft.created";
7
7
  readonly DraftUpdated: "draft.updated";
@@ -24,4 +24,7 @@ export declare const TimelineEventType: {
24
24
  readonly ReferralBackToDraft: "referral.back-to-draft";
25
25
  readonly ReferralFyiSent: "referral.fyi-sent";
26
26
  readonly ReferralEmailSent: "referral.email-sent";
27
+ readonly ReferralDischarged: "referral.discharged";
28
+ readonly ReferralSmsSent: "referral.sms-sent";
29
+ readonly ReferralSmsStatusChanged: "referral.sms-status-changed";
27
30
  };
@@ -26,4 +26,7 @@ exports.TimelineEventType = {
26
26
  ReferralBackToDraft: "referral.back-to-draft",
27
27
  ReferralFyiSent: "referral.fyi-sent",
28
28
  ReferralEmailSent: "referral.email-sent",
29
+ ReferralDischarged: "referral.discharged",
30
+ ReferralSmsSent: "referral.sms-sent",
31
+ ReferralSmsStatusChanged: "referral.sms-status-changed",
29
32
  };
@@ -1,12 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as ReferralExchange from "../index";
5
4
  export interface TriggerEmailReminderBody {
6
5
  /** Email to cc the reminder to */
7
6
  ccEmail?: string;
8
- /** Email to send the reminder from */
9
- fromEmail?: string;
10
- /** Signature to be added to the email */
11
- signature?: ReferralExchange.EmailReminderSignature;
12
7
  }
@@ -31,7 +31,6 @@ export * from "./FullReferralDto";
31
31
  export * from "./CreatePatientReqGender";
32
32
  export * from "./CreatePatientReq";
33
33
  export * from "./Timeslot";
34
- export * from "./EmailReminderSignature";
35
34
  export * from "./TriggerEmailReminderBody";
36
35
  export * from "./FormMetadata";
37
36
  export * from "./CreateReferralFormReq";
@@ -47,7 +47,6 @@ __exportStar(require("./FullReferralDto"), exports);
47
47
  __exportStar(require("./CreatePatientReqGender"), exports);
48
48
  __exportStar(require("./CreatePatientReq"), exports);
49
49
  __exportStar(require("./Timeslot"), exports);
50
- __exportStar(require("./EmailReminderSignature"), exports);
51
50
  __exportStar(require("./TriggerEmailReminderBody"), exports);
52
51
  __exportStar(require("./FormMetadata"), exports);
53
52
  __exportStar(require("./CreateReferralFormReq"), exports);
@@ -80,7 +80,7 @@ class Eligibility {
80
80
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
81
81
  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"),
82
82
  method: "GET",
83
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
84
  contentType: "application/json",
85
85
  queryParameters: _queryParams,
86
86
  requestType: "json",
@@ -69,7 +69,7 @@ class Health {
69
69
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
70
70
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ReferralExchangeEnvironment.SmartCms, "api/v1/health"),
71
71
  method: "GET",
72
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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,
@@ -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.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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,
@@ -72,7 +72,7 @@ class Offerings {
72
72
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
73
73
  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"),
74
74
  method: "GET",
75
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
75
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
76
76
  contentType: "application/json",
77
77
  requestType: "json",
78
78
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -131,7 +131,7 @@ class Offerings {
131
131
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
132
132
  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`),
133
133
  method: "GET",
134
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
134
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
135
135
  contentType: "application/json",
136
136
  queryParameters: _queryParams,
137
137
  requestType: "json",
@@ -79,7 +79,7 @@ class Public {
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/public/referrals/${encodeURIComponent(referralId)}`),
81
81
  method: "GET",
82
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
82
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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
  queryParameters: _queryParams,
85
85
  requestType: "json",
@@ -120,20 +120,18 @@ export declare class Referrals {
120
120
  amend(referralId: string, request: ReferralExchange.AmendReferralReq, requestOptions?: Referrals.RequestOptions): Promise<ReferralExchange.ReferralDto>;
121
121
  /**
122
122
  * @param {string} referralId - Referral ID
123
- * @param {ReferralExchange.EaConfirmReferralBody} request
123
+ * @param {ReferralExchange.AcceptReferralBody} request
124
124
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
125
125
  *
126
126
  * @throws {@link ReferralExchange.UnauthorizedError}
127
127
  *
128
128
  * @example
129
- * await client.referrals.accept("referralId", {
130
- * appointmentTime: 1714857600000
131
- * })
129
+ * await client.referrals.accept("referralId")
132
130
  */
133
- accept(referralId: string, request: ReferralExchange.EaConfirmReferralBody, requestOptions?: Referrals.RequestOptions): Promise<void>;
131
+ accept(referralId: string, request?: ReferralExchange.AcceptReferralBody, requestOptions?: Referrals.RequestOptions): Promise<void>;
134
132
  /**
135
133
  * @param {string} referralId - Referral ID
136
- * @param {ReferralExchange.EaRejectReferralBody} request
134
+ * @param {ReferralExchange.RejectReferralBody} request
137
135
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
138
136
  *
139
137
  * @throws {@link ReferralExchange.UnauthorizedError}
@@ -143,7 +141,7 @@ export declare class Referrals {
143
141
  * rejectionMessage: "rejectionMessage"
144
142
  * })
145
143
  */
146
- reject(referralId: string, request: ReferralExchange.EaRejectReferralBody, requestOptions?: Referrals.RequestOptions): Promise<void>;
144
+ reject(referralId: string, request: ReferralExchange.RejectReferralBody, requestOptions?: Referrals.RequestOptions): Promise<void>;
147
145
  /**
148
146
  * @param {string} referralId - Referral ID
149
147
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
@@ -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.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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,
@@ -232,7 +232,7 @@ class Referrals {
232
232
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
233
233
  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)}`),
234
234
  method: "GET",
235
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
235
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
236
236
  contentType: "application/json",
237
237
  queryParameters: _queryParams,
238
238
  requestType: "json",
@@ -286,7 +286,7 @@ class Referrals {
286
286
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
287
287
  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)}`),
288
288
  method: "DELETE",
289
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
289
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
290
290
  contentType: "application/json",
291
291
  requestType: "json",
292
292
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -338,7 +338,7 @@ class Referrals {
338
338
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
339
339
  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`),
340
340
  method: "POST",
341
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
341
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
342
342
  contentType: "application/json",
343
343
  requestType: "json",
344
344
  body: request,
@@ -393,7 +393,7 @@ class Referrals {
393
393
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
394
394
  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`),
395
395
  method: "POST",
396
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
396
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
397
397
  contentType: "application/json",
398
398
  requestType: "json",
399
399
  body: request,
@@ -432,23 +432,21 @@ class Referrals {
432
432
  }
433
433
  /**
434
434
  * @param {string} referralId - Referral ID
435
- * @param {ReferralExchange.EaConfirmReferralBody} request
435
+ * @param {ReferralExchange.AcceptReferralBody} request
436
436
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
437
437
  *
438
438
  * @throws {@link ReferralExchange.UnauthorizedError}
439
439
  *
440
440
  * @example
441
- * await client.referrals.accept("referralId", {
442
- * appointmentTime: 1714857600000
443
- * })
441
+ * await client.referrals.accept("referralId")
444
442
  */
445
- accept(referralId, request, requestOptions) {
446
- return __awaiter(this, void 0, void 0, function* () {
443
+ accept(referralId_1) {
444
+ return __awaiter(this, arguments, void 0, function* (referralId, request = {}, requestOptions) {
447
445
  var _a, _b, _c;
448
446
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
449
447
  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`),
450
448
  method: "POST",
451
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
449
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
452
450
  contentType: "application/json",
453
451
  requestType: "json",
454
452
  body: request,
@@ -487,7 +485,7 @@ class Referrals {
487
485
  }
488
486
  /**
489
487
  * @param {string} referralId - Referral ID
490
- * @param {ReferralExchange.EaRejectReferralBody} request
488
+ * @param {ReferralExchange.RejectReferralBody} request
491
489
  * @param {Referrals.RequestOptions} requestOptions - Request-specific configuration.
492
490
  *
493
491
  * @throws {@link ReferralExchange.UnauthorizedError}
@@ -503,7 +501,7 @@ class Referrals {
503
501
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
504
502
  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`),
505
503
  method: "POST",
506
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
504
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
507
505
  contentType: "application/json",
508
506
  requestType: "json",
509
507
  body: request,
@@ -555,7 +553,7 @@ class Referrals {
555
553
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
556
554
  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`),
557
555
  method: "POST",
558
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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),
556
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", "X-Fern-SDK-Version": "0.0.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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),
559
557
  contentType: "application/json",
560
558
  requestType: "json",
561
559
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -3,13 +3,11 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {
7
- * appointmentTime: 1714857600000
8
- * }
6
+ * {}
9
7
  */
10
- export interface EaConfirmReferralBody {
8
+ export interface AcceptReferralBody {
11
9
  /** Appointment time, in milliseconds since epoch. */
12
- appointmentTime: number;
10
+ appointmentTime?: number;
13
11
  /** Note content */
14
12
  noteContent?: string;
15
13
  }
@@ -7,7 +7,7 @@
7
7
  * rejectionMessage: "rejectionMessage"
8
8
  * }
9
9
  */
10
- export interface EaRejectReferralBody {
10
+ export interface RejectReferralBody {
11
11
  /** Rejection message */
12
12
  rejectionMessage: string;
13
13
  }
@@ -3,5 +3,5 @@ export { type CreateReferralReq } from "./CreateReferralReq";
3
3
  export { type ReferralsGetRequest } from "./ReferralsGetRequest";
4
4
  export { type CancelReferralReq } from "./CancelReferralReq";
5
5
  export { type AmendReferralReq } from "./AmendReferralReq";
6
- export { type EaConfirmReferralBody } from "./EaConfirmReferralBody";
7
- export { type EaRejectReferralBody } from "./EaRejectReferralBody";
6
+ export { type AcceptReferralBody } from "./AcceptReferralBody";
7
+ export { type RejectReferralBody } from "./RejectReferralBody";
@@ -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.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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.33", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.33", "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.35", "User-Agent": "@opengovsg/refx-ts-sdk/0.0.35", "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,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type TimelineEventType = "draft.created" | "draft.updated" | "draft.deleted" | "referral.created" | "referral.confirmed" | "referral.rejected" | "referral.pending-cancelled" | "referral.amended" | "referral.cancelled" | "referral.validated" | "referral.pending-email-ack" | "appt.confirmed" | "appt.rescheduled" | "appt.rejected" | "note.created" | "singhealth-patient-details.submitted" | "referral.ea-reminder-sent" | "referral.form-response-submitted" | "referral.back-to-draft" | "referral.fyi-sent" | "referral.email-sent";
4
+ export type TimelineEventType = "draft.created" | "draft.updated" | "draft.deleted" | "referral.created" | "referral.confirmed" | "referral.rejected" | "referral.pending-cancelled" | "referral.amended" | "referral.cancelled" | "referral.validated" | "referral.pending-email-ack" | "appt.confirmed" | "appt.rescheduled" | "appt.rejected" | "note.created" | "singhealth-patient-details.submitted" | "referral.ea-reminder-sent" | "referral.form-response-submitted" | "referral.back-to-draft" | "referral.fyi-sent" | "referral.email-sent" | "referral.discharged" | "referral.sms-sent" | "referral.sms-status-changed";
5
5
  export declare const TimelineEventType: {
6
6
  readonly DraftCreated: "draft.created";
7
7
  readonly DraftUpdated: "draft.updated";
@@ -24,4 +24,7 @@ export declare const TimelineEventType: {
24
24
  readonly ReferralBackToDraft: "referral.back-to-draft";
25
25
  readonly ReferralFyiSent: "referral.fyi-sent";
26
26
  readonly ReferralEmailSent: "referral.email-sent";
27
+ readonly ReferralDischarged: "referral.discharged";
28
+ readonly ReferralSmsSent: "referral.sms-sent";
29
+ readonly ReferralSmsStatusChanged: "referral.sms-status-changed";
27
30
  };
@@ -26,4 +26,7 @@ exports.TimelineEventType = {
26
26
  ReferralBackToDraft: "referral.back-to-draft",
27
27
  ReferralFyiSent: "referral.fyi-sent",
28
28
  ReferralEmailSent: "referral.email-sent",
29
+ ReferralDischarged: "referral.discharged",
30
+ ReferralSmsSent: "referral.sms-sent",
31
+ ReferralSmsStatusChanged: "referral.sms-status-changed",
29
32
  };
@@ -1,12 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as ReferralExchange from "../index";
5
4
  export interface TriggerEmailReminderBody {
6
5
  /** Email to cc the reminder to */
7
6
  ccEmail?: string;
8
- /** Email to send the reminder from */
9
- fromEmail?: string;
10
- /** Signature to be added to the email */
11
- signature?: ReferralExchange.EmailReminderSignature;
12
7
  }
@@ -31,7 +31,6 @@ export * from "./FullReferralDto";
31
31
  export * from "./CreatePatientReqGender";
32
32
  export * from "./CreatePatientReq";
33
33
  export * from "./Timeslot";
34
- export * from "./EmailReminderSignature";
35
34
  export * from "./TriggerEmailReminderBody";
36
35
  export * from "./FormMetadata";
37
36
  export * from "./CreateReferralFormReq";
@@ -47,7 +47,6 @@ __exportStar(require("./FullReferralDto"), exports);
47
47
  __exportStar(require("./CreatePatientReqGender"), exports);
48
48
  __exportStar(require("./CreatePatientReq"), exports);
49
49
  __exportStar(require("./Timeslot"), exports);
50
- __exportStar(require("./EmailReminderSignature"), exports);
51
50
  __exportStar(require("./TriggerEmailReminderBody"), exports);
52
51
  __exportStar(require("./FormMetadata"), exports);
53
52
  __exportStar(require("./CreateReferralFormReq"), exports);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.33";
1
+ export declare const SDK_VERSION = "0.0.35";
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.33";
4
+ exports.SDK_VERSION = "0.0.35";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengovsg/refx-ts-sdk",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "private": false,
5
5
  "repository": "https://github.com/opengovsg/refer-ts-sdk",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -409,9 +409,7 @@ await client.referrals.amend("referralId", {
409
409
  <dd>
410
410
 
411
411
  ```typescript
412
- await client.referrals.accept("referralId", {
413
- appointmentTime: 1714857600000,
414
- });
412
+ await client.referrals.accept("referralId");
415
413
  ```
416
414
 
417
415
  </dd>
@@ -435,7 +433,7 @@ await client.referrals.accept("referralId", {
435
433
  <dl>
436
434
  <dd>
437
435
 
438
- **request:** `ReferralExchange.EaConfirmReferralBody`
436
+ **request:** `ReferralExchange.AcceptReferralBody`
439
437
 
440
438
  </dd>
441
439
  </dl>
@@ -493,7 +491,7 @@ await client.referrals.reject("referralId", {
493
491
  <dl>
494
492
  <dd>
495
493
 
496
- **request:** `ReferralExchange.EaRejectReferralBody`
494
+ **request:** `ReferralExchange.RejectReferralBody`
497
495
 
498
496
  </dd>
499
497
  </dl>
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.33";
1
+ export declare const SDK_VERSION = "0.0.35";
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.33";
4
+ exports.SDK_VERSION = "0.0.35";
@@ -1,9 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface EmailReminderSignature {
5
- /** Name of the person signing the email */
6
- name: string;
7
- /** Title of the person signing the email */
8
- title: string;
9
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface EmailReminderSignature {
5
- /** Name of the person signing the email */
6
- name: string;
7
- /** Title of the person signing the email */
8
- title: string;
9
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });