From abcb1ea8177c7dbd542dfe5d62caf99b3e66731e Mon Sep 17 00:00:00 2001 From: Eddie Yu Date: Tue, 6 Oct 2026 14:28:06 +0800 Subject: [PATCH 1/3] feat(client): add getBillCodes for GET /billcodes Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 5 +++++ famis_client.ts | 5 +++++ model/famis_models.ts | 11 +++++++++++ package.json | 2 +- 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a06b0c8..1228fb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 > Entries before 1.2.0 were not tracked in this file; see the git history for details. +## [1.4.2] — 2026-10-06 +### Added +- `FamisClient.getBillCodes(context)` — fetches `GET /billcodes`, with a new `BillCode` + model. (EY) + ## [1.4.1] — 2026-08-14 ### Fixed - Non-JSON error bodies (e.g. a plain-text `"Service Unavailable"` on a FAMIS 503) no diff --git a/famis_client.ts b/famis_client.ts index ea3e1c1..13fad68 100644 --- a/famis_client.ts +++ b/famis_client.ts @@ -18,6 +18,7 @@ import { AccountSegment, AccountSegmentValue, ActivityGroup, + BillCode, AdjustmentTransactionResponse, AdjustmentType, Asset, @@ -641,6 +642,10 @@ export class FamisClient { return this.getAll(context, 'payperiods'); } + async getBillCodes(context: QueryContext): Promise> { + return this.getAll(context, 'billcodes'); + } + //region TimeZones async getTimeZones(context: QueryContext): Promise> { return this.getAll(context, 'timezones'); diff --git a/model/famis_models.ts b/model/famis_models.ts index ef51d57..328f872 100644 --- a/model/famis_models.ts +++ b/model/famis_models.ts @@ -1656,6 +1656,17 @@ export interface PayPeriod { PayPeriodNumber: number; } +export interface BillCode { + Id: number; + Description: string; + UpdateDate: Date; + UpdatedById: number; + UpdatedByExternalId: string; + Active: boolean; + BillTypeId: number; + GlIncomeAccount: string; +} + export interface Property { Id: number; UpdateDate: Date; diff --git a/package.json b/package.json index a113baf..31111af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "facility360", - "version": "1.4.1", + "version": "1.4.2", "description": "A Node based 360Facility client SDK", "main": "dist/index.js", "files": [ From ce819fbc1c7019c323c73632343732e4bf36e78b Mon Sep 17 00:00:00 2001 From: Eddie Yu Date: Thu, 8 Oct 2026 08:57:38 +0800 Subject: [PATCH 2/3] fix(client): address PR review for getBillCodes (1.5.0) - Remove duplicate BillCode interface - Bump version to 1.5.0 (minor, new public API) - Move getBillCodes next to bill code associations - Add integration test for getBillCodes Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 2 +- famis_client.ts | 11 +++++++---- model/famis_models.ts | 11 ----------- package.json | 2 +- tests/integration.test.ts | 6 ++++++ 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1228fb9..09d5742 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 > Entries before 1.2.0 were not tracked in this file; see the git history for details. -## [1.4.2] — 2026-10-06 +## [1.5.0] — 2026-10-06 ### Added - `FamisClient.getBillCodes(context)` — fetches `GET /billcodes`, with a new `BillCode` model. (EY) diff --git a/famis_client.ts b/famis_client.ts index 13fad68..b78dacc 100644 --- a/famis_client.ts +++ b/famis_client.ts @@ -642,10 +642,6 @@ export class FamisClient { return this.getAll(context, 'payperiods'); } - async getBillCodes(context: QueryContext): Promise> { - return this.getAll(context, 'billcodes'); - } - //region TimeZones async getTimeZones(context: QueryContext): Promise> { return this.getAll(context, 'timezones'); @@ -1081,6 +1077,13 @@ export class FamisClient { //#endregion + //#region bill codes + async getBillCodes(context: QueryContext): Promise> { + return this.getAll(context, 'billcodes'); + } + + //#endregion + //#region property bill code associations async getPropertyBillCodeAssociations( context: QueryContext, diff --git a/model/famis_models.ts b/model/famis_models.ts index 328f872..ef51d57 100644 --- a/model/famis_models.ts +++ b/model/famis_models.ts @@ -1656,17 +1656,6 @@ export interface PayPeriod { PayPeriodNumber: number; } -export interface BillCode { - Id: number; - Description: string; - UpdateDate: Date; - UpdatedById: number; - UpdatedByExternalId: string; - Active: boolean; - BillTypeId: number; - GlIncomeAccount: string; -} - export interface Property { Id: number; UpdateDate: Date; diff --git a/package.json b/package.json index 31111af..380a310 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "facility360", - "version": "1.4.2", + "version": "1.5.0", "description": "A Node based 360Facility client SDK", "main": "dist/index.js", "files": [ diff --git a/tests/integration.test.ts b/tests/integration.test.ts index 59ac159..b0e0b7a 100644 --- a/tests/integration.test.ts +++ b/tests/integration.test.ts @@ -55,6 +55,12 @@ describe('Lists', async () => { }); }); + it('should fetch all bill codes', async function() { + const resp = await famisClient.getBillCodes(baseContext); + expect(resp).toBeTruthy(); + expect(resp.results).toBeTruthy(); + }); + it('should fetch all account segments', async function() { const resp = await famisClient.getAccountSegments(baseContext); expect(resp).toBeTruthy(); From e464a48b49ae954643e9107477dbca44a1741d29 Mon Sep 17 00:00:00 2001 From: Eddie Yu Date: Thu, 8 Oct 2026 08:58:56 +0800 Subject: [PATCH 3/3] fix(models): type BillCode.UpdateDate as string getAll returns raw JSON, so the value is an ISO string at runtime. Co-Authored-By: Claude Sonnet 5.5 --- model/famis_models.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/famis_models.ts b/model/famis_models.ts index ef51d57..9e16b8a 100644 --- a/model/famis_models.ts +++ b/model/famis_models.ts @@ -2459,7 +2459,7 @@ export interface ChargeType { export interface BillCode { Id: number; Description: string; - UpdateDate: Date; + UpdateDate: string; UpdatedById: number; UpdatedByExternalId: string; Active: boolean;