diff --git a/README.md b/README.md index b46ccc5..13f3e8e 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # Opengovsg TypeScript Library [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fopengovsg%2Frefer-ts-sdk) -[![npm shield](https://img.shields.io/npm/v/ogp-refx)](https://www.npmjs.com/package/ogp-refx) +[![npm shield](https://img.shields.io/npm/v/@opengovsg/refx-ts-sdk)](https://www.npmjs.com/package/@opengovsg/refx-ts-sdk) The Opengovsg TypeScript library provides convenient access to the Opengovsg API from TypeScript. ## Installation ```sh -npm i -s ogp-refx +npm i -s @opengovsg/refx-ts-sdk ``` ## Reference @@ -20,7 +20,7 @@ A full reference for this library is available [here](./reference.md). Instantiate and use the client with the following: ```typescript -import { ReferralExchangeClient } from "ogp-refx"; +import { ReferralExchangeClient } from "@opengovsg/refx-ts-sdk"; const client = new ReferralExchangeClient({ environment: "YOUR_BASE_URL", apiKey: "YOUR_API_KEY" }); await client.referrals.upsert({ @@ -57,7 +57,7 @@ The SDK exports all request and response types as TypeScript interfaces. Simply following namespace: ```typescript -import { ReferralExchange } from "ogp-refx"; +import { ReferralExchange } from "@opengovsg/refx-ts-sdk"; const request: ReferralExchange.EligibilityGetRequest = { ... @@ -70,7 +70,7 @@ When the API returns a non-success status code (4xx or 5xx response), a subclass will be thrown. ```typescript -import { ReferralExchangeError } from "ogp-refx"; +import { ReferralExchangeError } from "@opengovsg/refx-ts-sdk"; try { await client.referrals.upsert(...); @@ -157,7 +157,7 @@ The SDK provides a way for your to customize the underlying HTTP client / Fetch unsupported environment, this provides a way for you to break glass and ensure the SDK works. ```typescript -import { ReferralExchangeClient } from "ogp-refx"; +import { ReferralExchangeClient } from "@opengovsg/refx-ts-sdk"; const client = new ReferralExchangeClient({ ... diff --git a/package.json b/package.json index 7d39bd8..7842444 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "ogp-refx", - "version": "0.0.3", + "name": "@opengovsg/refx-ts-sdk", + "version": "2024.10.3", "private": false, "repository": "https://github.com/opengovsg/refer-ts-sdk", "main": "./index.js", diff --git a/src/api/resources/eligibility/client/Client.ts b/src/api/resources/eligibility/client/Client.ts index c494f6f..15aea22 100644 --- a/src/api/resources/eligibility/client/Client.ts +++ b/src/api/resources/eligibility/client/Client.ts @@ -52,9 +52,9 @@ export class Eligibility { method: "GET", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "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 16cdd87..f639ce5 100644 --- a/src/api/resources/health/client/Client.ts +++ b/src/api/resources/health/client/Client.ts @@ -41,9 +41,9 @@ export class Health { method: "GET", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "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 83b1cc0..c7f8d31 100644 --- a/src/api/resources/offerings/client/Client.ts +++ b/src/api/resources/offerings/client/Client.ts @@ -41,9 +41,9 @@ export class Offerings { method: "GET", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -100,9 +100,9 @@ export class Offerings { method: "GET", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -172,9 +172,9 @@ export class Offerings { method: "GET", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "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 6414c9e..c50f379 100644 --- a/src/api/resources/public/client/Client.ts +++ b/src/api/resources/public/client/Client.ts @@ -50,9 +50,9 @@ export class Public { method: "GET", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "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 e923eff..ac8e868 100644 --- a/src/api/resources/referrals/client/Client.ts +++ b/src/api/resources/referrals/client/Client.ts @@ -70,9 +70,9 @@ export class Referrals { method: "GET", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -152,9 +152,9 @@ export class Referrals { method: "POST", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -212,9 +212,9 @@ export class Referrals { method: "GET", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -273,9 +273,9 @@ export class Referrals { method: "DELETE", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -336,9 +336,9 @@ export class Referrals { method: "POST", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -402,9 +402,9 @@ export class Referrals { method: "POST", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -468,9 +468,9 @@ export class Referrals { method: "POST", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -534,9 +534,9 @@ export class Referrals { method: "POST", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "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 f66308a..cf86b69 100644 --- a/src/api/resources/webhooks/client/Client.ts +++ b/src/api/resources/webhooks/client/Client.ts @@ -43,9 +43,9 @@ export class Webhooks { method: "POST", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -101,9 +101,9 @@ export class Webhooks { method: "POST", headers: { "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "ogp-refx", - "X-Fern-SDK-Version": "0.0.3", - "User-Agent": "ogp-refx/0.0.3", + "X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk", + "X-Fern-SDK-Version": "2024.10.3", + "User-Agent": "@opengovsg/refx-ts-sdk/2024.10.3", "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 6ad3d11..f6d6343 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "0.0.3"; +export const SDK_VERSION = "2024.10.3";