Skip to content

Commit

Permalink
Release 0.0.21
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Dec 23, 2024
1 parent 20f56c6 commit f682fdc
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 152 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
48 changes: 0 additions & 48 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -662,54 +662,6 @@ await client.offerings.list();
</dl>
</details>

<details><summary><code>client.offerings.<a href="/src/api/resources/offerings/client/Client.ts">get</a>(offeringId) -> ReferralExchange.OfferingDto</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.offerings.get("offeringId");
```

</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**offeringId:** `string`

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `Offerings.RequestOptions`

</dd>
</dl>
</dd>
</dl>

</dd>
</dl>
</details>

<details><summary><code>client.offerings.<a href="/src/api/resources/offerings/client/Client.ts">listTimeslots</a>(offeringId, { ...params }) -> ReferralExchange.Timeslot[]</code></summary>
<dl>
<dd>
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/eligibility/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/health/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/notes/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down
70 changes: 4 additions & 66 deletions src/api/resources/offerings/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down Expand Up @@ -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<ReferralExchange.OfferingDto> {
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
Expand Down Expand Up @@ -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()),
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/public/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down
36 changes: 18 additions & 18 deletions src/api/resources/referrals/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down Expand Up @@ -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()),
Expand Down Expand Up @@ -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()),
Expand Down Expand Up @@ -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()),
Expand Down Expand Up @@ -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()),
Expand Down Expand Up @@ -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()),
Expand Down Expand Up @@ -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()),
Expand Down Expand Up @@ -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()),
Expand Down Expand Up @@ -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()),
Expand Down
8 changes: 4 additions & 4 deletions src/api/resources/webhooks/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down Expand Up @@ -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()),
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SDK_VERSION = "0.0.20";
export const SDK_VERSION = "0.0.21";
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand Down

0 comments on commit f682fdc

Please sign in to comment.