diff --git a/package.json b/package.json index 635ec06..2da7354 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opengovsg/refx-ts-sdk", - "version": "0.0.20", + "version": "0.0.21", "private": false, "repository": "https://github.com/opengovsg/refer-ts-sdk", "main": "./index.js", diff --git a/reference.md b/reference.md index d068006..a2fa7d4 100644 --- a/reference.md +++ b/reference.md @@ -662,54 +662,6 @@ await client.offerings.list(); -
client.offerings.get(offeringId) -> ReferralExchange.OfferingDto -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.offerings.get("offeringId"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**offeringId:** `string` - -
-
- -
-
- -**requestOptions:** `Offerings.RequestOptions` - -
-
-
-
- -
-
-
-
client.offerings.listTimeslots(offeringId, { ...params }) -> ReferralExchange.Timeslot[]
diff --git a/src/api/resources/eligibility/client/Client.ts b/src/api/resources/eligibility/client/Client.ts index 1ea4013..1eafeb9 100644 --- a/src/api/resources/eligibility/client/Client.ts +++ b/src/api/resources/eligibility/client/Client.ts @@ -58,8 +58,8 @@ export class Eligibility { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/health/client/Client.ts b/src/api/resources/health/client/Client.ts index 3ab29c0..0c7ed69 100644 --- a/src/api/resources/health/client/Client.ts +++ b/src/api/resources/health/client/Client.ts @@ -47,8 +47,8 @@ export class Health { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/notes/client/Client.ts b/src/api/resources/notes/client/Client.ts index 5939834..7113883 100644 --- a/src/api/resources/notes/client/Client.ts +++ b/src/api/resources/notes/client/Client.ts @@ -55,8 +55,8 @@ export class Notes { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/offerings/client/Client.ts b/src/api/resources/offerings/client/Client.ts index f7790fe..5a6bb01 100644 --- a/src/api/resources/offerings/client/Client.ts +++ b/src/api/resources/offerings/client/Client.ts @@ -47,8 +47,8 @@ export class Offerings { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -86,68 +86,6 @@ export class Offerings { } } - /** - * @param {string} offeringId - * @param {Offerings.RequestOptions} requestOptions - Request-specific configuration. - * - * @example - * await client.offerings.get("offeringId") - */ - public async get( - offeringId: string, - requestOptions?: Offerings.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? - environments.ReferralExchangeEnvironment.Production, - `api/v1/offerings/${encodeURIComponent(offeringId)}` - ), - method: "GET", - headers: { - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return _response.body as ReferralExchange.OfferingDto; - } - - if (_response.error.reason === "status-code") { - throw new errors.ReferralExchangeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.ReferralExchangeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.ReferralExchangeTimeoutError( - "Timeout exceeded when calling GET /api/v1/offerings/{offeringId}." - ); - case "unknown": - throw new errors.ReferralExchangeError({ - message: _response.error.errorMessage, - }); - } - } - /** * @param {string} offeringId * @param {ReferralExchange.OfferingsListTimeslotsRequest} request @@ -178,8 +116,8 @@ export class Offerings { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/public/client/Client.ts b/src/api/resources/public/client/Client.ts index d5bc71e..89a5908 100644 --- a/src/api/resources/public/client/Client.ts +++ b/src/api/resources/public/client/Client.ts @@ -61,8 +61,8 @@ export class Public { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/referrals/client/Client.ts b/src/api/resources/referrals/client/Client.ts index 6c0de1d..7d52e6e 100644 --- a/src/api/resources/referrals/client/Client.ts +++ b/src/api/resources/referrals/client/Client.ts @@ -76,8 +76,8 @@ export class Referrals { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -160,8 +160,8 @@ export class Referrals { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -229,8 +229,8 @@ export class Referrals { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -292,8 +292,8 @@ export class Referrals { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -356,8 +356,8 @@ export class Referrals { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -423,8 +423,8 @@ export class Referrals { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -490,8 +490,8 @@ export class Referrals { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -557,8 +557,8 @@ export class Referrals { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -620,8 +620,8 @@ export class Referrals { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/webhooks/client/Client.ts b/src/api/resources/webhooks/client/Client.ts index 06a0194..f5af483 100644 --- a/src/api/resources/webhooks/client/Client.ts +++ b/src/api/resources/webhooks/client/Client.ts @@ -46,8 +46,8 @@ export class Webhooks { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -105,8 +105,8 @@ export class Webhooks { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", - "X-Fern-SDK-Version": "0.0.20", - "User-Agent": "@opengovsg/refx-ts-sdk/0.0.20", + "X-Fern-SDK-Version": "0.0.21", + "User-Agent": "@opengovsg/refx-ts-sdk/0.0.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/version.ts b/src/version.ts index 777b6a7..0b955c2 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "0.0.20"; +export const SDK_VERSION = "0.0.21"; diff --git a/yarn.lock b/yarn.lock index b49f63c..f467bfa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1319,9 +1319,9 @@ emoji-regex@^8.0.0: integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.1: - version "5.17.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" - integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + version "5.18.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz#91eb1db193896b9801251eeff1c6980278b1e404" + integrity sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -1686,9 +1686,9 @@ is-arrayish@^0.2.1: integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== is-core-module@^2.16.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.0.tgz#6c01ffdd5e33c49c1d2abfa93334a85cb56bd81c" - integrity sha512-urTSINYfAYgcbLb0yDQ6egFm6h3Mo1DcF9EkyXSRjjzdHbsulg01qhwWuXdOoUBuTkbQ80KDboXa0vFJ+BDH+g== + version "2.16.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" + integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== dependencies: hasown "^2.0.2"