Skip to content

Commit

Permalink
Release 0.0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Dec 18, 2024
1 parent 988bd48 commit e584085
Show file tree
Hide file tree
Showing 15 changed files with 53 additions and 50 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.16",
"version": "0.0.18",
"private": false,
"repository": "https://github.com/opengovsg/refer-ts-sdk",
"main": "./index.js",
Expand Down
4 changes: 2 additions & 2 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ await client.notes.create("referralId", {

## Offerings

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

Expand Down Expand Up @@ -662,7 +662,7 @@ await client.offerings.list();
</dl>
</details>

<details><summary><code>client.offerings.<a href="/src/api/resources/offerings/client/Client.ts">get</a>(offeringId) -> void</code></summary>
<details><summary><code>client.offerings.<a href="/src/api/resources/offerings/client/Client.ts">get</a>(offeringId) -> ReferralExchange.OfferingDto</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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
25 changes: 14 additions & 11 deletions src/api/resources/offerings/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import * as environments from "../../../../environments";
import * as core from "../../../../core";
import * as ReferralExchange from "../../../index";
import urlJoin from "url-join";
import * as errors from "../../../../errors/index";
import * as ReferralExchange from "../../../index";

export declare namespace Offerings {
interface Options {
Expand Down Expand Up @@ -36,7 +36,7 @@ export class Offerings {
* @example
* await client.offerings.list()
*/
public async list(requestOptions?: Offerings.RequestOptions): Promise<void> {
public async list(requestOptions?: Offerings.RequestOptions): Promise<ReferralExchange.OfferingDto[]> {
const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ??
Expand All @@ -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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand All @@ -61,7 +61,7 @@ export class Offerings {
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return;
return _response.body as ReferralExchange.OfferingDto[];
}

if (_response.error.reason === "status-code") {
Expand Down Expand Up @@ -93,7 +93,10 @@ export class Offerings {
* @example
* await client.offerings.get("offeringId")
*/
public async get(offeringId: string, requestOptions?: Offerings.RequestOptions): Promise<void> {
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)) ??
Expand All @@ -104,8 +107,8 @@ export class Offerings {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk",
"X-Fern-SDK-Version": "0.0.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand All @@ -118,7 +121,7 @@ export class Offerings {
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return;
return _response.body as ReferralExchange.OfferingDto;
}

if (_response.error.reason === "status-code") {
Expand Down Expand Up @@ -175,8 +178,8 @@ export class Offerings {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@opengovsg/refx-ts-sdk",
"X-Fern-SDK-Version": "0.0.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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.16",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.16",
"X-Fern-SDK-Version": "0.0.18",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.18",
"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/api/types/FullReferralDto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as ReferralExchange from "../index";
export interface FullReferralDto {
id: string;
sender: ReferralExchange.InstitutionCoreDto;
offering: ReferralExchange.OfferingFullDto;
offering: ReferralExchange.OfferingDto;
patient: ReferralExchange.GetReferralPatientDto;
referringDoctor: ReferralExchange.ReferringDoctorDto;
isSubsidised: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import * as ReferralExchange from "../index";

export interface OfferingFullDto {
export interface OfferingDto {
id: string;
/** Name of the offering - use these as labels */
name: string;
Expand Down
2 changes: 1 addition & 1 deletion src/api/types/PublicReferralDto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as ReferralExchange from "../index";
export interface PublicReferralDto {
id: string;
sender: ReferralExchange.InstitutionCoreDto;
offering: ReferralExchange.OfferingFullDto;
offering: ReferralExchange.OfferingDto;
patient: ReferralExchange.GetReferralPatientDto;
referringDoctor: ReferralExchange.ReferringDoctorDto;
isSubsidised: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/api/types/ReferralDto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as ReferralExchange from "../index";
export interface ReferralDto {
id: string;
sender: ReferralExchange.InstitutionCoreDto;
offering: ReferralExchange.OfferingFullDto;
offering: ReferralExchange.OfferingDto;
patient: ReferralExchange.GetReferralPatientDto;
referringDoctor: ReferralExchange.ReferringDoctorDto;
isSubsidised: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/api/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export * from "./ReferralStatusFilter";
export * from "./ReferralRole";
export * from "./System";
export * from "./InstitutionCoreDto";
export * from "./OfferingFullDto";
export * from "./OfferingDto";
export * from "./GetReferralPatientDtoGender";
export * from "./GetReferralPatientDto";
export * from "./ReferringDoctorDto";
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.16";
export const SDK_VERSION = "0.0.18";

0 comments on commit e584085

Please sign in to comment.