Skip to content

Commit

Permalink
Release 0.0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Dec 17, 2024
1 parent 4927b47 commit d6e3fde
Show file tree
Hide file tree
Showing 32 changed files with 84 additions and 181 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.10",
"version": "0.0.11",
"private": false,
"repository": "https://github.com/opengovsg/refer-ts-sdk",
"main": "./index.js",
Expand Down
10 changes: 4 additions & 6 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ await client.eligibility.get({

```typescript
await client.referrals.list({
offset: 1.1,
pageSize: 1.1,
hciCode: "hciCode",
});
```
Expand Down Expand Up @@ -831,7 +829,7 @@ await client.public.getReferral("referralId");

## Webhooks

<details><summary><code>client.webhooks.<a href="/src/api/resources/webhooks/client/Client.ts">submitSingHealthFormSg</a>() -> void</code></summary>
<details><summary><code>client.webhooks.<a href="/src/api/resources/webhooks/client/Client.ts">submitSingHealthFormsg</a>() -> void</code></summary>
<dl>
<dd>

Expand All @@ -844,7 +842,7 @@ await client.public.getReferral("referralId");
<dd>

```typescript
await client.webhooks.submitSingHealthFormSg();
await client.webhooks.submitSingHealthFormsg();
```

</dd>
Expand All @@ -871,7 +869,7 @@ await client.webhooks.submitSingHealthFormSg();
</dl>
</details>

<details><summary><code>client.webhooks.<a href="/src/api/resources/webhooks/client/Client.ts">submitFormSg</a>(formId) -> void</code></summary>
<details><summary><code>client.webhooks.<a href="/src/api/resources/webhooks/client/Client.ts">submitFormsg</a>(formId) -> void</code></summary>
<dl>
<dd>

Expand All @@ -884,7 +882,7 @@ await client.webhooks.submitSingHealthFormSg();
<dd>

```typescript
await client.webhooks.submitFormSg("formId");
await client.webhooks.submitFormsg("formId");
```

</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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"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/resources/notes/client/requests/CreateNoteReq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
export interface CreateNoteReq {
/** Note content - plaintext. */
content?: string;
/** Author HCI code. Must be already tied by your system. */
/** Author HCI code. Must be already tied to your system. */
authorHciCode: string;
}
12 changes: 6 additions & 6 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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -107,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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -178,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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
48 changes: 26 additions & 22 deletions src/api/resources/referrals/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export class Referrals {
*
* @example
* await client.referrals.list({
* offset: 1.1,
* pageSize: 1.1,
* hciCode: "hciCode"
* })
*/
Expand All @@ -47,8 +45,14 @@ export class Referrals {
): Promise<ReferralExchange.PaginatedReferralsDto> {
const { offset, pageSize, hciCode, status, role } = request;
const _queryParams: Record<string, string | string[] | object | object[]> = {};
_queryParams["offset"] = offset.toString();
_queryParams["pageSize"] = pageSize.toString();
if (offset != null) {
_queryParams["offset"] = offset.toString();
}

if (pageSize != null) {
_queryParams["pageSize"] = pageSize.toString();
}

_queryParams["hciCode"] = hciCode;
if (status != null) {
if (Array.isArray(status)) {
Expand All @@ -72,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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -156,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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -225,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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -288,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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -352,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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -419,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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -486,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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -553,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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -616,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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@ import * as ReferralExchange from "../../../../index";
/**
* @example
* {
* offset: 1.1,
* pageSize: 1.1,
* hciCode: "hciCode"
* }
*/
export interface ReferralsListRequest {
/**
* Offset for pagination
*/
offset: number;
offset?: number;
/**
* Number of items per page
*/
pageSize: number;
pageSize?: number;
/**
* To identify the requesting institution
*/
Expand Down
16 changes: 8 additions & 8 deletions src/api/resources/webhooks/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export class Webhooks {
* @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
* await client.webhooks.submitSingHealthFormSg()
* await client.webhooks.submitSingHealthFormsg()
*/
public async submitSingHealthFormSg(requestOptions?: Webhooks.RequestOptions): Promise<void> {
public async submitSingHealthFormsg(requestOptions?: Webhooks.RequestOptions): Promise<void> {
const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ??
Expand All @@ -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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -92,9 +92,9 @@ export class Webhooks {
* @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
* await client.webhooks.submitFormSg("formId")
* await client.webhooks.submitFormsg("formId")
*/
public async submitFormSg(formId: string, requestOptions?: Webhooks.RequestOptions): Promise<void> {
public async submitFormsg(formId: string, requestOptions?: Webhooks.RequestOptions): Promise<void> {
const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ??
Expand All @@ -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.10",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.10",
"X-Fern-SDK-Version": "0.0.11",
"User-Agent": "@opengovsg/refx-ts-sdk/0.0.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
1 change: 1 addition & 0 deletions src/api/types/AttachmentDto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

export interface AttachmentDto {
url: string;
/** Human readable - include extension */
name: string;
}
7 changes: 0 additions & 7 deletions src/api/types/CancelledEventMetadata.ts

This file was deleted.

7 changes: 0 additions & 7 deletions src/api/types/CreatedEventMetadata.ts

This file was deleted.

7 changes: 0 additions & 7 deletions src/api/types/EaReminderSentMetadata.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/api/types/InstitutionCoreDto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as ReferralExchange from "../index";
export interface InstitutionCoreDto {
hciCode: string;
name: string;
system: ReferralExchange.InstitutionCoreDtoSystem;
system: ReferralExchange.System;
block: string;
streetName: string;
buildingName?: string;
Expand Down
9 changes: 0 additions & 9 deletions src/api/types/NoteCreatedMetadata.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/api/types/OfferingFullDto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface OfferingFullDto {
specialty: string;
/** Whether the offering is able to receive new referrals currently */
isActive: boolean;
/** Whether this offering supports urgent referrals. TODO - will deprecate soon. */
/** Whether this offering supports urgent referrals. TODO - may deprecate soon. */
isUrgentable: boolean;
/** Whether this offering supports subsidized referrals. */
isSubsidisable: boolean;
Expand Down
Loading

0 comments on commit d6e3fde

Please sign in to comment.