@brownandroot/api 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -189,6 +189,10 @@ export declare class ApiHubClient {
189
189
  getCostcodes(): Promise<Costcode[]>;
190
190
  getCostcodesDropdown(): Promise<DropdownOption[]>;
191
191
  getCostcode(id: string): Promise<Costcode>;
192
+ /** Get cost codes for a specific business unit, formatted for dropdown controls */
193
+ getCostcodesDropdownByBu(businessUnitId: string): Promise<DropdownOption[]>;
194
+ /** Get cost codes for a specific business unit and pay type, formatted for dropdown controls */
195
+ getCostcodesDropdownByBuAndPayType(businessUnitId: string, payTypeCode: string): Promise<DropdownOption[]>;
192
196
  getPaytypes(): Promise<Paytype[]>;
193
197
  getPaytypesDropdown(): Promise<PaytypeDropdownOption[]>;
194
198
  getPaytype(id: string): Promise<Paytype>;
package/dist/index.js CHANGED
@@ -110,6 +110,14 @@ export class ApiHubClient {
110
110
  async getCostcode(id) {
111
111
  return this.request(`/costcodes/${encodeURIComponent(id)}`);
112
112
  }
113
+ /** Get cost codes for a specific business unit, formatted for dropdown controls */
114
+ async getCostcodesDropdownByBu(businessUnitId) {
115
+ return this.request(`/costcodes/by-bu/${encodeURIComponent(businessUnitId)}/dropdown`);
116
+ }
117
+ /** Get cost codes for a specific business unit and pay type, formatted for dropdown controls */
118
+ async getCostcodesDropdownByBuAndPayType(businessUnitId, payTypeCode) {
119
+ return this.request(`/costcodes/by-bu/${encodeURIComponent(businessUnitId)}/by-paytype/${encodeURIComponent(payTypeCode)}/dropdown`);
120
+ }
113
121
  // -----------------------------------------------------------------------
114
122
  // Pay Types
115
123
  // -----------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brownandroot/api",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",