@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 +4 -0
- package/dist/index.js +8 -0
- package/package.json +1 -1
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
|
// -----------------------------------------------------------------------
|