@markwharton/eh-payroll 3.2.2 → 3.4.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/README.md CHANGED
@@ -71,6 +71,10 @@ if (groupResult.ok) console.log(groupResult.data); // PayrollEmployeeGroup[]
71
71
  const hoursResult = await client.getStandardHours(employeeId);
72
72
  if (hoursResult.ok) console.log(hoursResult.data); // PayrollStandardHours
73
73
 
74
+ // Get leave balances for an employee
75
+ const balanceResult = await client.getEmployeeLeaveBalances(employeeId);
76
+ if (balanceResult.ok) console.log(balanceResult.data); // PayrollLeaveBalance[]
77
+
74
78
  ```
75
79
 
76
80
  ## Result Pattern
@@ -86,8 +90,13 @@ All methods return `Result<T>` — see [api-core Result Pattern](../../README.md
86
90
  | `getEmployee(employeeId)` | `number` | `Result<PayrollAuEmployee>` |
87
91
  | `getEmployeeImage(employeeId)` | `number` | `Result<PayrollEmployeeImage>` |
88
92
  | `getStandardHours(employeeId)` | `number` | `Result<PayrollStandardHours>` |
93
+ | `getEmployeeLeaveBalances(employeeId, options?)` | `number, PayrollLeaveBalanceOptions?` | `Result<PayrollLeaveBalance[]>` |
94
+ | `getUnavailabilities(options?)` | `PayrollUnavailabilityOptions?` | `Result<PayrollUnavailability[]>` |
89
95
  | `getLocations()` | — | `Result<PayrollLocation[]>` |
90
96
  | `getEmployeeGroups()` | — | `Result<PayrollEmployeeGroup[]>` |
97
+ | `getPublicHolidays(options?)` | `PayrollPublicHolidayOptions?` | `Result<PayrollPublicHoliday[]>` |
98
+ | `getWorkTypes()` | — | `Result<PayrollWorkType[]>` |
99
+ | `getLeaveCategories()` | — | `Result<PayrollLeaveCategory[]>` |
91
100
  | `getRosterShifts(from, to, options?)` | `string, string, PayrollRosterShiftOptions?` | `Result<PayrollRosterShift[]>` |
92
101
  | `getKiosks()` | — | `Result<PayrollKiosk[]>` |
93
102
  | `getKioskStaff(kioskId, options?)` | `number, PayrollKioskStaffOptions?` | `Result<PayrollKioskEmployee[]>` |
@@ -131,6 +140,49 @@ Returns leave requests for a specific employee using the per-employee endpoint w
131
140
  | `fromDate` | `string` | Start date filter (ISO 8601) |
132
141
  | `toDate` | `string` | End date filter (ISO 8601) |
133
142
 
143
+ ### `getEmployeeLeaveBalances()`
144
+
145
+ Returns the accrued leave balance per category for an employee. The balance is the "live" value calculated from pay runs — updated after each pay run is processed. Supports an optional `asAtDate` parameter for point-in-time balance queries.
146
+
147
+ **`PayrollLeaveBalanceOptions`:**
148
+
149
+ | Option | Type | Description |
150
+ |--------|------|-------------|
151
+ | `asAtDate` | `string` | Point-in-time date for balance query (ISO 8601 date-time) |
152
+
153
+ ### `getUnavailabilities()`
154
+
155
+ Returns unavailability records for the business. The endpoint returns a flat array (not paginated).
156
+
157
+ **Unavailabilities are time-series data** — always use `fromDate`/`toDate` filters to bound the result set.
158
+
159
+ **`PayrollUnavailabilityOptions`:**
160
+
161
+ | Option | Type | Description |
162
+ |--------|------|-------------|
163
+ | `fromDate` | `string` | Start date filter (YYYY-MM-DD) |
164
+ | `toDate` | `string` | End date filter (YYYY-MM-DD) |
165
+ | `employeeId` | `number` | Filter by employee ID |
166
+ | `defaultLocationId` | `number` | Filter by default location ID |
167
+
168
+ ### `getPublicHolidays()`
169
+
170
+ Returns public holidays for the business.
171
+
172
+ **`PayrollPublicHolidayOptions`:**
173
+
174
+ | Option | Type | Description |
175
+ |--------|------|-------------|
176
+ | `year` | `number` | Filter by year |
177
+
178
+ ### `getWorkTypes()`
179
+
180
+ Returns all work types for the business. Automatically paginates through all results.
181
+
182
+ ### `getLeaveCategories()`
183
+
184
+ Returns all leave categories for the business. Automatically paginates through all results.
185
+
134
186
  ### `getRosterShifts()`
135
187
 
136
188
  Automatically paginates through all results (100 per page). Returns the complete set of roster shifts for the requested date range. All filter options are applied server-side, reducing the number of results and pages fetched.
package/dist/client.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @see https://api.keypay.com.au/
8
8
  */
9
- import type { PayrollConfig, PayrollLeaveRequest, PayrollLeaveRequestOptions, PayrollEmployeeLeaveRequestOptions, PayrollEmployeeOptions, PayrollStandardHours, PayrollLocation, PayrollEmployeeGroup, PayrollRosterShift, PayrollRosterShiftOptions, PayrollKiosk, PayrollKioskEmployee, PayrollKioskStaffOptions, PayrollEmployeeImage } from './types.js';
9
+ import type { PayrollConfig, PayrollLeaveRequest, PayrollLeaveRequestOptions, PayrollEmployeeLeaveRequestOptions, PayrollEmployeeOptions, PayrollStandardHours, PayrollLeaveBalance, PayrollLeaveBalanceOptions, PayrollPublicHoliday, PayrollPublicHolidayOptions, PayrollWorkType, PayrollLeaveCategory, PayrollUnavailability, PayrollUnavailabilityOptions, PayrollLocation, PayrollEmployeeGroup, PayrollRosterShift, PayrollRosterShiftOptions, PayrollKiosk, PayrollKioskEmployee, PayrollKioskStaffOptions, PayrollEmployeeImage } from './types.js';
10
10
  import type { PayrollEmployee } from './employee-types.generated.js';
11
11
  import type { Result } from '@markwharton/api-core';
12
12
  /**
@@ -129,6 +129,27 @@ export declare class PayrollClient {
129
129
  * Get standard hours for an employee (includes FTE value)
130
130
  */
131
131
  getStandardHours(employeeId: number): Promise<Result<PayrollStandardHours>>;
132
+ /**
133
+ * Get leave balances for an employee
134
+ *
135
+ * Returns the accrued leave balance per category. The balance is the "live"
136
+ * value calculated from pay runs — updated after each pay run is processed.
137
+ *
138
+ * @param employeeId - Employee identifier
139
+ * @param options - Optional query parameters (e.g., asAtDate for point-in-time balance)
140
+ * @see https://api.keypay.com.au/australia/reference/employee/leave-balances--get-leave-balances.html
141
+ */
142
+ getEmployeeLeaveBalances(employeeId: number, options?: PayrollLeaveBalanceOptions): Promise<Result<PayrollLeaveBalance[]>>;
143
+ /**
144
+ * Get unavailabilities
145
+ *
146
+ * Returns unavailability records for the business, with optional filters.
147
+ * The endpoint returns a flat array (not paginated).
148
+ *
149
+ * **Unavailabilities are time-series data** — always use fromDate/toDate
150
+ * filters to bound the result set.
151
+ */
152
+ getUnavailabilities(options?: PayrollUnavailabilityOptions): Promise<Result<PayrollUnavailability[]>>;
132
153
  /**
133
154
  * Get all business locations
134
155
  */
@@ -137,6 +158,20 @@ export declare class PayrollClient {
137
158
  * Get all employee groups
138
159
  */
139
160
  getEmployeeGroups(): Promise<Result<PayrollEmployeeGroup[]>>;
161
+ /**
162
+ * Get public holidays for the business
163
+ *
164
+ * @param options - Optional filters (year)
165
+ */
166
+ getPublicHolidays(options?: PayrollPublicHolidayOptions): Promise<Result<PayrollPublicHoliday[]>>;
167
+ /**
168
+ * Get all work types for the business
169
+ */
170
+ getWorkTypes(): Promise<Result<PayrollWorkType[]>>;
171
+ /**
172
+ * Get all leave categories for the business
173
+ */
174
+ getLeaveCategories(): Promise<Result<PayrollLeaveCategory[]>>;
140
175
  /**
141
176
  * Get roster shifts for a date range
142
177
  *
@@ -145,6 +180,13 @@ export declare class PayrollClient {
145
180
  * @param options - Optional filters
146
181
  */
147
182
  getRosterShifts(fromDate: string, toDate: string, options?: PayrollRosterShiftOptions): Promise<Result<PayrollRosterShift[]>>;
183
+ /**
184
+ * Get a single kiosk by ID
185
+ *
186
+ * @param kioskId - Kiosk identifier
187
+ * @see https://api.keypay.com.au/australia/reference/manager/manager-kiosk--get-api-v2-business-by-business-id-manager-kiosk-by-id.html
188
+ */
189
+ getKiosk(kioskId: number): Promise<Result<PayrollKiosk>>;
148
190
  /**
149
191
  * Get all kiosks for the business
150
192
  */
package/dist/client.js CHANGED
@@ -78,6 +78,7 @@ export class PayrollClient {
78
78
  this.cache?.invalidate('employees');
79
79
  this.cache?.invalidate('employee:');
80
80
  this.cache?.invalidate('standardhours:');
81
+ this.cache?.invalidate('leavebalances:');
81
82
  }
82
83
  /**
83
84
  * Invalidate cached leave request data (business-level and per-employee).
@@ -365,6 +366,69 @@ export class PayrollClient {
365
366
  }, this.restrictedPersistOpt);
366
367
  }
367
368
  // ============================================================================
369
+ // Leave Balances
370
+ // ============================================================================
371
+ /**
372
+ * Get leave balances for an employee
373
+ *
374
+ * Returns the accrued leave balance per category. The balance is the "live"
375
+ * value calculated from pay runs — updated after each pay run is processed.
376
+ *
377
+ * @param employeeId - Employee identifier
378
+ * @param options - Optional query parameters (e.g., asAtDate for point-in-time balance)
379
+ * @see https://api.keypay.com.au/australia/reference/employee/leave-balances--get-leave-balances.html
380
+ */
381
+ async getEmployeeLeaveBalances(employeeId, options) {
382
+ return this.cached(`leavebalances:${employeeId}`, this.cacheTtl.standardHoursTtl, async () => {
383
+ const params = options?.asAtDate ? new URLSearchParams({ asAtDate: options.asAtDate }) : undefined;
384
+ const url = this.businessUrl(`employee/${employeeId}/leavebalances`, params);
385
+ return this.fetchAndParse(url, async (r) => {
386
+ return (await r.json())
387
+ .map(item => pickFields(item, ENTITIES.PayrollLeaveBalance.fields));
388
+ });
389
+ }, this.restrictedPersistOpt);
390
+ }
391
+ // ============================================================================
392
+ // Unavailability
393
+ // ============================================================================
394
+ /**
395
+ * Get unavailabilities
396
+ *
397
+ * Returns unavailability records for the business, with optional filters.
398
+ * The endpoint returns a flat array (not paginated).
399
+ *
400
+ * **Unavailabilities are time-series data** — always use fromDate/toDate
401
+ * filters to bound the result set.
402
+ */
403
+ async getUnavailabilities(options) {
404
+ const parts = ['unavailabilities'];
405
+ if (options?.fromDate)
406
+ parts.push(`from:${options.fromDate}`);
407
+ if (options?.toDate)
408
+ parts.push(`to:${options.toDate}`);
409
+ if (options?.employeeId != null)
410
+ parts.push(`eid:${options.employeeId}`);
411
+ if (options?.defaultLocationId != null)
412
+ parts.push(`lid:${options.defaultLocationId}`);
413
+ const cacheKey = parts.join(':');
414
+ return this.cached(cacheKey, this.cacheTtl.leaveRequestsTtl, async () => {
415
+ const params = new URLSearchParams();
416
+ if (options?.fromDate)
417
+ params.set('FromDate', options.fromDate);
418
+ if (options?.toDate)
419
+ params.set('ToDate', options.toDate);
420
+ if (options?.employeeId != null)
421
+ params.set('EmployeeId', String(options.employeeId));
422
+ if (options?.defaultLocationId != null)
423
+ params.set('DefaultLocationId', String(options.defaultLocationId));
424
+ const url = this.businessUrl(ENTITIES.PayrollUnavailability.path, params);
425
+ return this.fetchAndParse(url, async (r) => {
426
+ return (await r.json())
427
+ .map(item => pickFields(item, ENTITIES.PayrollUnavailability.fields));
428
+ });
429
+ }, this.restrictedPersistOpt);
430
+ }
431
+ // ============================================================================
368
432
  // Locations
369
433
  // ============================================================================
370
434
  /**
@@ -395,6 +459,55 @@ export class PayrollClient {
395
459
  });
396
460
  }
397
461
  // ============================================================================
462
+ // Public Holidays
463
+ // ============================================================================
464
+ /**
465
+ * Get public holidays for the business
466
+ *
467
+ * @param options - Optional filters (year)
468
+ */
469
+ async getPublicHolidays(options) {
470
+ const cacheKey = options?.year ? `publicholidays:${options.year}` : 'publicholidays';
471
+ return this.cached(cacheKey, this.cacheTtl.locationsTtl, async () => {
472
+ const params = options?.year ? new URLSearchParams({ year: String(options.year) }) : undefined;
473
+ const url = this.businessUrl(ENTITIES.PayrollPublicHoliday.path, params);
474
+ return this.fetchAndParse(url, async (r) => {
475
+ return (await r.json())
476
+ .map(item => pickFields(item, ENTITIES.PayrollPublicHoliday.fields));
477
+ });
478
+ });
479
+ }
480
+ // ============================================================================
481
+ // Work Types
482
+ // ============================================================================
483
+ /**
484
+ * Get all work types for the business
485
+ */
486
+ async getWorkTypes() {
487
+ return this.cached('worktypes', this.cacheTtl.locationsTtl, () => {
488
+ const params = new URLSearchParams({ '$top': String(DEFAULT_PAGE_SIZE) });
489
+ return this.fetchPaginated((skip) => {
490
+ params.set('$skip', String(skip));
491
+ return this.businessUrl(ENTITIES.PayrollWorkType.path, params);
492
+ }, ENTITIES.PayrollWorkType.fields);
493
+ });
494
+ }
495
+ // ============================================================================
496
+ // Leave Categories
497
+ // ============================================================================
498
+ /**
499
+ * Get all leave categories for the business
500
+ */
501
+ async getLeaveCategories() {
502
+ return this.cached('leavecategories', this.cacheTtl.locationsTtl, () => {
503
+ const params = new URLSearchParams({ '$top': String(DEFAULT_PAGE_SIZE) });
504
+ return this.fetchPaginated((skip) => {
505
+ params.set('$skip', String(skip));
506
+ return this.businessUrl(ENTITIES.PayrollLeaveCategory.path, params);
507
+ }, ENTITIES.PayrollLeaveCategory.fields);
508
+ });
509
+ }
510
+ // ============================================================================
398
511
  // Roster Shifts
399
512
  // ============================================================================
400
513
  /**
@@ -480,6 +593,21 @@ export class PayrollClient {
480
593
  // ============================================================================
481
594
  // Time & Attendance (Kiosk)
482
595
  // ============================================================================
596
+ /**
597
+ * Get a single kiosk by ID
598
+ *
599
+ * @param kioskId - Kiosk identifier
600
+ * @see https://api.keypay.com.au/australia/reference/manager/manager-kiosk--get-api-v2-business-by-business-id-manager-kiosk-by-id.html
601
+ */
602
+ async getKiosk(kioskId) {
603
+ return this.cached(`kiosk:${kioskId}:detail`, this.cacheTtl.kiosksTtl, async () => {
604
+ // KeyPay serves single kiosk at manager/kiosk/{id}, not kiosk/{id}
605
+ const url = this.businessUrl(`manager/${ENTITIES.PayrollKiosk.path}/${kioskId}`);
606
+ return this.fetchAndParse(url, async (r) => {
607
+ return pickFields(await r.json(), ENTITIES.PayrollKiosk.fields);
608
+ });
609
+ });
610
+ }
483
611
  /**
484
612
  * Get all kiosks for the business
485
613
  */
package/dist/index.d.ts CHANGED
@@ -20,8 +20,8 @@
20
20
  * ```
21
21
  */
22
22
  export { PayrollClient } from './client.js';
23
- export type { PayrollConfig, PayrollCacheConfig, PayrollRetryConfig, PayrollLeaveRequest, PayrollLeaveRequestOptions, PayrollLeaveRequestGroupBy, PayrollEmployeeLeaveRequestOptions, PayrollLeaveRequestStatus, PayrollEmployee, PayrollEmployeeStatus, PayrollLeaveAccrualStartDateType, PayrollCloselyHeldReporting, PayrollMedicareLevySurchargeWithholdingTier, PayrollSingleTouchPayrollCategory, PayrollTaxCategory, PayrollEmployeeOptions, PayrollStandardHours, PayrollLocation, PayrollEmployeeGroup, PayrollRosterShift, PayrollRosterShiftOptions, PayrollShiftStatus, PayrollAttendanceStatus, PayrollKiosk, PayrollKioskEmployee, PayrollKioskStaffOptions, PayrollEmployeeImage, } from './types.js';
24
- export { PAYROLL_EMPLOYEE_FIELDS, PAYROLL_LEAVE_REQUEST_FIELDS, PAYROLL_LOCATION_FIELDS, PAYROLL_EMPLOYEE_GROUP_FIELDS, PAYROLL_ROSTER_SHIFT_FIELDS, PAYROLL_KIOSK_FIELDS, PAYROLL_KIOSK_EMPLOYEE_FIELDS, ENTITIES, } from './types.js';
23
+ export type { PayrollConfig, PayrollCacheConfig, PayrollRetryConfig, PayrollLeaveRequest, PayrollLeaveRequestOptions, PayrollLeaveRequestGroupBy, PayrollEmployeeLeaveRequestOptions, PayrollLeaveRequestStatus, PayrollEmployee, PayrollEmployeeStatus, PayrollLeaveAccrualStartDateType, PayrollCloselyHeldReporting, PayrollMedicareLevySurchargeWithholdingTier, PayrollSingleTouchPayrollCategory, PayrollTaxCategory, PayrollEmployeeOptions, PayrollStandardHours, PayrollLeaveBalance, PayrollLeaveBalanceOptions, PayrollLeaveBalanceUnitType, PayrollPublicHoliday, PayrollPublicHolidayOptions, PayrollWorkType, PayrollEmploymentType, PayrollWorkTypeMappingType, PayrollLeaveCategory, PayrollLeaveCategoryUnitType, PayrollLeaveUnitType, PayrollLeaveCategoryType, PayrollUnavailability, PayrollUnavailabilityOptions, PayrollDayOfWeek, PayrollLocation, PayrollEmployeeGroup, PayrollRosterShift, PayrollRosterShiftOptions, PayrollShiftStatus, PayrollAttendanceStatus, PayrollKiosk, PayrollKioskEmployee, PayrollKioskStaffOptions, PayrollEmployeeImage, } from './types.js';
24
+ export { PAYROLL_EMPLOYEE_FIELDS, PAYROLL_LEAVE_REQUEST_FIELDS, PAYROLL_LEAVE_BALANCE_FIELDS, PAYROLL_PUBLIC_HOLIDAY_FIELDS, PAYROLL_WORK_TYPE_FIELDS, PAYROLL_LEAVE_CATEGORY_FIELDS, PAYROLL_UNAVAILABILITY_FIELDS, PAYROLL_LOCATION_FIELDS, PAYROLL_EMPLOYEE_GROUP_FIELDS, PAYROLL_ROSTER_SHIFT_FIELDS, PAYROLL_KIOSK_FIELDS, PAYROLL_KIOSK_EMPLOYEE_FIELDS, ENTITIES, } from './types.js';
25
25
  export type { AccessTier } from './types.js';
26
26
  export { METHOD_TIERS } from './types.js';
27
27
  export { buildBasicAuthHeader } from './utils.js';
@@ -32,8 +32,8 @@ export type { PayrollRegion } from './constants.js';
32
32
  export { PayrollError, parsePayrollErrorResponse } from './errors.js';
33
33
  export type { PayrollParsedError } from './errors.js';
34
34
  export { PayrollClient as EHClient } from './client.js';
35
- export type { PayrollConfig as EHConfig, PayrollCacheConfig as EHCacheConfig, PayrollRetryConfig as EHRetryConfig, PayrollLeaveRequest as EHLeaveRequest, PayrollLeaveRequestOptions as EHLeaveRequestOptions, PayrollLeaveRequestGroupBy as EHLeaveRequestGroupBy, PayrollEmployeeLeaveRequestOptions as EHEmployeeLeaveRequestOptions, PayrollLeaveRequestStatus as EHLeaveRequestStatus, PayrollEmployee as EHEmployee, PayrollEmployeeStatus as EHEmployeeStatus, PayrollLeaveAccrualStartDateType as EHLeaveAccrualStartDateType, PayrollCloselyHeldReporting as EHCloselyHeldReporting, PayrollMedicareLevySurchargeWithholdingTier as EHMedicareLevySurchargeWithholdingTier, PayrollSingleTouchPayrollCategory as EHSingleTouchPayrollCategory, PayrollTaxCategory as EHTaxCategory, PayrollEmployeeOptions as EHEmployeeOptions, PayrollStandardHours as EHStandardHours, PayrollLocation as EHLocation, PayrollEmployeeGroup as EHEmployeeGroup, PayrollRosterShift as EHRosterShift, PayrollRosterShiftOptions as EHRosterShiftOptions, PayrollShiftStatus as EHShiftStatus, PayrollAttendanceStatus as EHAttendanceStatus, PayrollKiosk as EHKiosk, PayrollKioskEmployee as EHKioskEmployee, PayrollKioskStaffOptions as EHKioskStaffOptions, PayrollEmployeeImage as EHEmployeeImage, } from './types.js';
36
- export { PAYROLL_EMPLOYEE_FIELDS as EMPLOYEE_FIELDS, PAYROLL_LEAVE_REQUEST_FIELDS as LEAVE_REQUEST_FIELDS, PAYROLL_LOCATION_FIELDS as LOCATION_FIELDS, PAYROLL_EMPLOYEE_GROUP_FIELDS as EMPLOYEE_GROUP_FIELDS, PAYROLL_ROSTER_SHIFT_FIELDS as ROSTER_SHIFT_FIELDS, PAYROLL_KIOSK_FIELDS as KIOSK_FIELDS, PAYROLL_KIOSK_EMPLOYEE_FIELDS as KIOSK_EMPLOYEE_FIELDS, } from './types.js';
35
+ export type { PayrollConfig as EHConfig, PayrollCacheConfig as EHCacheConfig, PayrollRetryConfig as EHRetryConfig, PayrollLeaveRequest as EHLeaveRequest, PayrollLeaveRequestOptions as EHLeaveRequestOptions, PayrollLeaveRequestGroupBy as EHLeaveRequestGroupBy, PayrollEmployeeLeaveRequestOptions as EHEmployeeLeaveRequestOptions, PayrollLeaveRequestStatus as EHLeaveRequestStatus, PayrollEmployee as EHEmployee, PayrollEmployeeStatus as EHEmployeeStatus, PayrollLeaveAccrualStartDateType as EHLeaveAccrualStartDateType, PayrollCloselyHeldReporting as EHCloselyHeldReporting, PayrollMedicareLevySurchargeWithholdingTier as EHMedicareLevySurchargeWithholdingTier, PayrollSingleTouchPayrollCategory as EHSingleTouchPayrollCategory, PayrollTaxCategory as EHTaxCategory, PayrollEmployeeOptions as EHEmployeeOptions, PayrollStandardHours as EHStandardHours, PayrollLeaveBalance as EHLeaveBalance, PayrollLeaveBalanceOptions as EHLeaveBalanceOptions, PayrollLeaveBalanceUnitType as EHLeaveBalanceUnitType, PayrollPublicHoliday as EHPublicHoliday, PayrollPublicHolidayOptions as EHPublicHolidayOptions, PayrollWorkType as EHWorkType, PayrollEmploymentType as EHEmploymentType, PayrollWorkTypeMappingType as EHWorkTypeMappingType, PayrollLeaveCategory as EHLeaveCategory, PayrollLeaveCategoryUnitType as EHLeaveCategoryUnitType, PayrollLeaveUnitType as EHLeaveUnitType, PayrollLeaveCategoryType as EHLeaveCategoryType, PayrollUnavailability as EHUnavailability, PayrollUnavailabilityOptions as EHUnavailabilityOptions, PayrollDayOfWeek as EHDayOfWeek, PayrollLocation as EHLocation, PayrollEmployeeGroup as EHEmployeeGroup, PayrollRosterShift as EHRosterShift, PayrollRosterShiftOptions as EHRosterShiftOptions, PayrollShiftStatus as EHShiftStatus, PayrollAttendanceStatus as EHAttendanceStatus, PayrollKiosk as EHKiosk, PayrollKioskEmployee as EHKioskEmployee, PayrollKioskStaffOptions as EHKioskStaffOptions, PayrollEmployeeImage as EHEmployeeImage, } from './types.js';
36
+ export { PAYROLL_EMPLOYEE_FIELDS as EMPLOYEE_FIELDS, PAYROLL_LEAVE_REQUEST_FIELDS as LEAVE_REQUEST_FIELDS, PAYROLL_LEAVE_BALANCE_FIELDS as LEAVE_BALANCE_FIELDS, PAYROLL_PUBLIC_HOLIDAY_FIELDS as PUBLIC_HOLIDAY_FIELDS, PAYROLL_WORK_TYPE_FIELDS as WORK_TYPE_FIELDS, PAYROLL_LEAVE_CATEGORY_FIELDS as LEAVE_CATEGORY_FIELDS, PAYROLL_UNAVAILABILITY_FIELDS as UNAVAILABILITY_FIELDS, PAYROLL_LOCATION_FIELDS as LOCATION_FIELDS, PAYROLL_EMPLOYEE_GROUP_FIELDS as EMPLOYEE_GROUP_FIELDS, PAYROLL_ROSTER_SHIFT_FIELDS as ROSTER_SHIFT_FIELDS, PAYROLL_KIOSK_FIELDS as KIOSK_FIELDS, PAYROLL_KIOSK_EMPLOYEE_FIELDS as KIOSK_EMPLOYEE_FIELDS, } from './types.js';
37
37
  export { PAYROLL_API_BASE as EH_API_BASE, PAYROLL_REGION_URLS as EH_REGION_URLS } from './constants.js';
38
38
  export type { PayrollRegion as EHRegion } from './constants.js';
39
39
  export { PayrollError as EHPayrollError, parsePayrollErrorResponse as parseEHPayrollErrorResponse } from './errors.js';
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@
22
22
  // Main client
23
23
  export { PayrollClient } from './client.js';
24
24
  // Field definitions (for pickFields)
25
- export { PAYROLL_EMPLOYEE_FIELDS, PAYROLL_LEAVE_REQUEST_FIELDS, PAYROLL_LOCATION_FIELDS, PAYROLL_EMPLOYEE_GROUP_FIELDS, PAYROLL_ROSTER_SHIFT_FIELDS, PAYROLL_KIOSK_FIELDS, PAYROLL_KIOSK_EMPLOYEE_FIELDS, ENTITIES, } from './types.js';
25
+ export { PAYROLL_EMPLOYEE_FIELDS, PAYROLL_LEAVE_REQUEST_FIELDS, PAYROLL_LEAVE_BALANCE_FIELDS, PAYROLL_PUBLIC_HOLIDAY_FIELDS, PAYROLL_WORK_TYPE_FIELDS, PAYROLL_LEAVE_CATEGORY_FIELDS, PAYROLL_UNAVAILABILITY_FIELDS, PAYROLL_LOCATION_FIELDS, PAYROLL_EMPLOYEE_GROUP_FIELDS, PAYROLL_ROSTER_SHIFT_FIELDS, PAYROLL_KIOSK_FIELDS, PAYROLL_KIOSK_EMPLOYEE_FIELDS, ENTITIES, } from './types.js';
26
26
  export { METHOD_TIERS } from './types.js';
27
27
  // Utilities
28
28
  export { buildBasicAuthHeader } from './utils.js';
@@ -38,7 +38,7 @@ export { PayrollError, parsePayrollErrorResponse } from './errors.js';
38
38
  // Client
39
39
  export { PayrollClient as EHClient } from './client.js';
40
40
  // Field definitions
41
- export { PAYROLL_EMPLOYEE_FIELDS as EMPLOYEE_FIELDS, PAYROLL_LEAVE_REQUEST_FIELDS as LEAVE_REQUEST_FIELDS, PAYROLL_LOCATION_FIELDS as LOCATION_FIELDS, PAYROLL_EMPLOYEE_GROUP_FIELDS as EMPLOYEE_GROUP_FIELDS, PAYROLL_ROSTER_SHIFT_FIELDS as ROSTER_SHIFT_FIELDS, PAYROLL_KIOSK_FIELDS as KIOSK_FIELDS, PAYROLL_KIOSK_EMPLOYEE_FIELDS as KIOSK_EMPLOYEE_FIELDS, } from './types.js';
41
+ export { PAYROLL_EMPLOYEE_FIELDS as EMPLOYEE_FIELDS, PAYROLL_LEAVE_REQUEST_FIELDS as LEAVE_REQUEST_FIELDS, PAYROLL_LEAVE_BALANCE_FIELDS as LEAVE_BALANCE_FIELDS, PAYROLL_PUBLIC_HOLIDAY_FIELDS as PUBLIC_HOLIDAY_FIELDS, PAYROLL_WORK_TYPE_FIELDS as WORK_TYPE_FIELDS, PAYROLL_LEAVE_CATEGORY_FIELDS as LEAVE_CATEGORY_FIELDS, PAYROLL_UNAVAILABILITY_FIELDS as UNAVAILABILITY_FIELDS, PAYROLL_LOCATION_FIELDS as LOCATION_FIELDS, PAYROLL_EMPLOYEE_GROUP_FIELDS as EMPLOYEE_GROUP_FIELDS, PAYROLL_ROSTER_SHIFT_FIELDS as ROSTER_SHIFT_FIELDS, PAYROLL_KIOSK_FIELDS as KIOSK_FIELDS, PAYROLL_KIOSK_EMPLOYEE_FIELDS as KIOSK_EMPLOYEE_FIELDS, } from './types.js';
42
42
  // Constants
43
43
  export { PAYROLL_API_BASE as EH_API_BASE, PAYROLL_REGION_URLS as EH_REGION_URLS } from './constants.js';
44
44
  // Errors
package/dist/types.d.ts CHANGED
@@ -203,6 +203,173 @@ export interface PayrollLeaveRequest {
203
203
  /** Status: Approved, Pending, Rejected, Cancelled */
204
204
  status: string;
205
205
  }
206
+ /**
207
+ * Leave balance for an employee
208
+ *
209
+ * From GET /business/{id}/employee/{eid}/leavebalances
210
+ * Fields from Swagger LeaveBalanceModel (Employee tag).
211
+ */
212
+ export interface PayrollLeaveBalance {
213
+ /** Leave category ID */
214
+ leaveCategoryId: number;
215
+ /** Leave category name (e.g., "Annual Leave") */
216
+ leaveCategoryName: string;
217
+ /** Accrued leave balance amount */
218
+ accruedAmount: number;
219
+ /** Unit type for the balance */
220
+ unitType: PayrollLeaveBalanceUnitType;
221
+ }
222
+ /** Leave balance unit types */
223
+ export type PayrollLeaveBalanceUnitType = 'Hours' | 'Days' | 'Weeks';
224
+ /**
225
+ * Options for getEmployeeLeaveBalances
226
+ */
227
+ export interface PayrollLeaveBalanceOptions {
228
+ /** Point-in-time date for the balance query (ISO 8601 date-time) */
229
+ asAtDate?: string;
230
+ }
231
+ /**
232
+ * Public holiday
233
+ *
234
+ * From GET /business/{id}/publicholiday
235
+ * Fields from Swagger PublicHolidayModel.
236
+ */
237
+ export interface PayrollPublicHoliday {
238
+ /** Holiday ID */
239
+ id: number | null;
240
+ /** Holiday date (ISO 8601 datetime) */
241
+ date: string | null;
242
+ /** Holiday description (e.g., "Australia Day") */
243
+ description: string;
244
+ /** Applicable states (e.g., ["NSW", "VIC"]) */
245
+ states: string[];
246
+ /** Applicable location IDs */
247
+ locationIds: number[];
248
+ /** Additional note */
249
+ note: string | null;
250
+ /** Whether this is a system-generated holiday */
251
+ isSystem: boolean;
252
+ /** Override flag — marks a date as not a public holiday */
253
+ notAPublicHoliday: boolean;
254
+ }
255
+ /**
256
+ * Options for getPublicHolidays
257
+ */
258
+ export interface PayrollPublicHolidayOptions {
259
+ /** Filter by year */
260
+ year?: number;
261
+ }
262
+ /**
263
+ * Work type
264
+ *
265
+ * From GET /business/{id}/worktype
266
+ * Fields from Swagger AuWorkTypeModel.
267
+ */
268
+ export interface PayrollWorkType {
269
+ /** Work type ID */
270
+ id: number;
271
+ /** Work type name */
272
+ name: string;
273
+ /** Short code */
274
+ shortCode: string | null;
275
+ /** Applicable employment types */
276
+ employmentTypes: PayrollEmploymentType[];
277
+ /** Associated pay category ID */
278
+ payCategoryId: number | null;
279
+ /** Associated leave category ID */
280
+ leaveCategoryId: number | null;
281
+ /** Whether this work type accrues leave */
282
+ accruesLeave: boolean;
283
+ /** Mapping type */
284
+ mappingType: PayrollWorkTypeMappingType | null;
285
+ /** External identifier */
286
+ externalId: string | null;
287
+ /** Source system */
288
+ source: string | null;
289
+ }
290
+ /** Employment type values from Swagger AuEmploymentTypeEnum */
291
+ export type PayrollEmploymentType = 'Unknown' | 'FullTime' | 'PartTime' | 'LabourHire' | 'SuperannuationIncomeStream' | 'Casual';
292
+ /** Work type mapping type values from Swagger WorkTypeMappingType */
293
+ export type PayrollWorkTypeMappingType = 'PayCategory' | 'LeaveCategory' | 'PrimaryPayCategory' | 'ShiftCondition';
294
+ /**
295
+ * Leave category
296
+ *
297
+ * From GET /business/{id}/leavecategory
298
+ * Fields from Swagger AuLeaveCategoryModel.
299
+ */
300
+ export interface PayrollLeaveCategory {
301
+ /** Leave category ID */
302
+ id: number;
303
+ /** Category name (e.g., "Annual Leave") */
304
+ name: string;
305
+ /** Entitlement units per year */
306
+ units: number;
307
+ /** Unit type for accrual (e.g., Days, Weeks) */
308
+ unitType: PayrollLeaveCategoryUnitType;
309
+ /** Unit type for leave taken */
310
+ leaveUnitType: PayrollLeaveUnitType;
311
+ /** Whether leave automatically accrues */
312
+ automaticallyAccrues: boolean;
313
+ /** Whether the category is private (hidden from employees) */
314
+ isPrivate: boolean;
315
+ /** Whether the balance is untracked */
316
+ isBalanceUntracked: boolean;
317
+ /** Whether to exclude from termination payout */
318
+ excludeFromTerminationPayout: boolean;
319
+ /** Leave category type */
320
+ leaveCategoryType: PayrollLeaveCategoryType;
321
+ }
322
+ /** Leave category unit type values from Swagger LeaveAllowanceUnitEnum */
323
+ export type PayrollLeaveCategoryUnitType = 'Days' | 'Weeks' | 'HoursPerHourWorked' | 'HoursPerPayRun' | 'StandardDays' | 'StandardWeeks' | 'DayPerCalendarDay' | 'DayPerMonth';
324
+ /** Leave unit type values from Swagger LeaveUnitTypeEnum */
325
+ export type PayrollLeaveUnitType = 'Hours' | 'Days' | 'Weeks';
326
+ /** Leave category type values from Swagger AuLeaveCategoryTypeEnum */
327
+ export type PayrollLeaveCategoryType = 'Standard' | 'LongServiceLeave' | 'PersonalCarersLeave';
328
+ /**
329
+ * Employee unavailability
330
+ *
331
+ * From GET /business/{id}/unavailability
332
+ * Fields from Swagger UnavailabilityModel.
333
+ */
334
+ export interface PayrollUnavailability {
335
+ /** Unavailability ID */
336
+ id: number;
337
+ /** Employee ID */
338
+ employeeId: number;
339
+ /** Start date (ISO 8601 datetime) */
340
+ fromDate: string;
341
+ /** End date (ISO 8601 datetime) */
342
+ toDate: string | null;
343
+ /** Recurring end date (ISO 8601 datetime) */
344
+ endDate: string | null;
345
+ /** Reason for unavailability */
346
+ reason: string | null;
347
+ /** Whether this is a recurring unavailability */
348
+ recurring: boolean;
349
+ /** Day of week for recurring unavailability */
350
+ recurringDay: PayrollDayOfWeek | null;
351
+ /** Whether the unavailability covers the full day */
352
+ isAllDay: boolean;
353
+ /** Whether the unavailability is view-only */
354
+ viewOnly: boolean;
355
+ }
356
+ /** Day of week values from Swagger DayOfWeek */
357
+ export type PayrollDayOfWeek = 'Sunday' | 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday';
358
+ /**
359
+ * Options for getUnavailabilities
360
+ *
361
+ * All filters are passed server-side to the API.
362
+ */
363
+ export interface PayrollUnavailabilityOptions {
364
+ /** Filter by start date (ISO 8601 date-time → API FromDate) */
365
+ fromDate?: string;
366
+ /** Filter by end date (ISO 8601 date-time → API ToDate) */
367
+ toDate?: string;
368
+ /** Filter by employee ID (→ API EmployeeId) */
369
+ employeeId?: number;
370
+ /** Filter by default location ID (→ API DefaultLocationId) */
371
+ defaultLocationId?: number;
372
+ }
206
373
  /**
207
374
  * Employee profile image
208
375
  *
@@ -355,6 +522,85 @@ export declare const PAYROLL_LEAVE_REQUEST_FIELDS: {
355
522
  readonly notes: true;
356
523
  readonly status: true;
357
524
  };
525
+ /** Fields for PayrollLeaveBalance — set false to exclude from API responses */
526
+ export declare const PAYROLL_LEAVE_BALANCE_FIELDS: {
527
+ readonly leaveCategoryId: true;
528
+ readonly leaveCategoryName: true;
529
+ readonly accruedAmount: true;
530
+ readonly unitType: true;
531
+ };
532
+ /** Fields for PayrollPublicHoliday — set false to exclude from API responses */
533
+ export declare const PAYROLL_PUBLIC_HOLIDAY_FIELDS: {
534
+ readonly id: true;
535
+ readonly date: true;
536
+ readonly description: true;
537
+ readonly states: true;
538
+ readonly locationIds: true;
539
+ readonly note: true;
540
+ readonly isSystem: true;
541
+ readonly notAPublicHoliday: true;
542
+ readonly mondayisedAlternativeToId: false;
543
+ };
544
+ /** Fields for PayrollWorkType — set false to exclude from API responses */
545
+ export declare const PAYROLL_WORK_TYPE_FIELDS: {
546
+ readonly id: true;
547
+ readonly name: true;
548
+ readonly shortCode: true;
549
+ readonly employmentTypes: true;
550
+ readonly payCategoryId: true;
551
+ readonly leaveCategoryId: true;
552
+ readonly accruesLeave: true;
553
+ readonly mappingType: true;
554
+ readonly externalId: true;
555
+ readonly source: true;
556
+ readonly awardPackageId: false;
557
+ readonly awardPackageName: false;
558
+ };
559
+ /** Fields for PayrollLeaveCategory — set false to exclude from API responses */
560
+ export declare const PAYROLL_LEAVE_CATEGORY_FIELDS: {
561
+ readonly id: true;
562
+ readonly name: true;
563
+ readonly units: true;
564
+ readonly unitType: true;
565
+ readonly leaveUnitType: true;
566
+ readonly automaticallyAccrues: true;
567
+ readonly isPrivate: true;
568
+ readonly isBalanceUntracked: true;
569
+ readonly excludeFromTerminationPayout: true;
570
+ readonly leaveCategoryType: true;
571
+ readonly contingentPeriod: false;
572
+ readonly entitlementPeriod: false;
573
+ readonly leaveLoading: false;
574
+ readonly leaveAccrualRule: false;
575
+ readonly transferOnTerminationToPayCategoryId: false;
576
+ readonly externalId: false;
577
+ readonly source: false;
578
+ readonly deductFromPrimaryPayCategory: false;
579
+ readonly deductFromPayCategoryId: false;
580
+ readonly transferToPayCategoryId: false;
581
+ readonly hideAccrualsOnPayslip: false;
582
+ readonly useDeductFromPayCategoryRate: false;
583
+ readonly isNamePrivate: false;
584
+ readonly payoutAsETP: false;
585
+ readonly accruesFirstPayRunPerPeriodOnly: false;
586
+ readonly preventNegativeBalanceUnpaidLeaveCategoryId: false;
587
+ readonly leaveEntitlement: false;
588
+ };
589
+ /** Fields for PayrollUnavailability — set false to exclude from API responses */
590
+ export declare const PAYROLL_UNAVAILABILITY_FIELDS: {
591
+ readonly id: true;
592
+ readonly employeeId: true;
593
+ readonly fromDate: true;
594
+ readonly toDate: true;
595
+ readonly endDate: true;
596
+ readonly reason: true;
597
+ readonly recurring: true;
598
+ readonly recurringDay: true;
599
+ readonly isAllDay: true;
600
+ readonly viewOnly: true;
601
+ readonly recurringDays: false;
602
+ readonly recurringDaysCsv: false;
603
+ };
358
604
  /** Fields for PayrollLocation — set false to exclude from API responses */
359
605
  export declare const PAYROLL_LOCATION_FIELDS: {
360
606
  readonly id: true;
package/dist/types.js CHANGED
@@ -12,6 +12,42 @@ export const PAYROLL_LEAVE_REQUEST_FIELDS = {
12
12
  id: true, employeeId: true, leaveCategoryId: true, employee: true, leaveCategory: true,
13
13
  fromDate: true, toDate: true, totalHours: true, hoursApplied: true, notes: true, status: true,
14
14
  };
15
+ /** Fields for PayrollLeaveBalance — set false to exclude from API responses */
16
+ export const PAYROLL_LEAVE_BALANCE_FIELDS = {
17
+ leaveCategoryId: true, leaveCategoryName: true, accruedAmount: true, unitType: true,
18
+ };
19
+ /** Fields for PayrollPublicHoliday — set false to exclude from API responses */
20
+ export const PAYROLL_PUBLIC_HOLIDAY_FIELDS = {
21
+ id: true, date: true, description: true, states: true, locationIds: true,
22
+ note: true, isSystem: true, notAPublicHoliday: true,
23
+ mondayisedAlternativeToId: false,
24
+ };
25
+ /** Fields for PayrollWorkType — set false to exclude from API responses */
26
+ export const PAYROLL_WORK_TYPE_FIELDS = {
27
+ id: true, name: true, shortCode: true, employmentTypes: true,
28
+ payCategoryId: true, leaveCategoryId: true, accruesLeave: true, mappingType: true,
29
+ externalId: true, source: true,
30
+ awardPackageId: false, awardPackageName: false,
31
+ };
32
+ /** Fields for PayrollLeaveCategory — set false to exclude from API responses */
33
+ export const PAYROLL_LEAVE_CATEGORY_FIELDS = {
34
+ id: true, name: true, units: true, unitType: true, leaveUnitType: true,
35
+ automaticallyAccrues: true, isPrivate: true, isBalanceUntracked: true,
36
+ excludeFromTerminationPayout: true, leaveCategoryType: true,
37
+ contingentPeriod: false, entitlementPeriod: false, leaveLoading: false,
38
+ leaveAccrualRule: false, transferOnTerminationToPayCategoryId: false,
39
+ externalId: false, source: false, deductFromPrimaryPayCategory: false,
40
+ deductFromPayCategoryId: false, transferToPayCategoryId: false,
41
+ hideAccrualsOnPayslip: false, useDeductFromPayCategoryRate: false,
42
+ isNamePrivate: false, payoutAsETP: false, accruesFirstPayRunPerPeriodOnly: false,
43
+ preventNegativeBalanceUnpaidLeaveCategoryId: false, leaveEntitlement: false,
44
+ };
45
+ /** Fields for PayrollUnavailability — set false to exclude from API responses */
46
+ export const PAYROLL_UNAVAILABILITY_FIELDS = {
47
+ id: true, employeeId: true, fromDate: true, toDate: true, endDate: true,
48
+ reason: true, recurring: true, recurringDay: true, isAllDay: true, viewOnly: true,
49
+ recurringDays: false, recurringDaysCsv: false,
50
+ };
15
51
  /** Fields for PayrollLocation — set false to exclude from API responses */
16
52
  export const PAYROLL_LOCATION_FIELDS = {
17
53
  id: true, parentId: true, name: true, externalId: true, source: true,
@@ -116,20 +152,29 @@ export const ENTITIES = {
116
152
  PayrollEmployeeLeaveRequest: { fields: PAYROLL_LEAVE_REQUEST_FIELDS, path: 'employee/{employeeId}/leaverequest', apiRef: 'leave-requests/au-hours-leave-request--get-leave-requests' },
117
153
  PayrollLocation: { fields: PAYROLL_LOCATION_FIELDS, path: 'location', apiRef: 'location/au-location--get-locations' },
118
154
  PayrollRosterShift: { fields: PAYROLL_ROSTER_SHIFT_FIELDS, path: 'rostershift', apiRef: 'roster-shifts/au-roster-shift--get' },
119
- PayrollKiosk: { fields: PAYROLL_KIOSK_FIELDS, path: 'kiosk', apiRef: 'time-and-attendance/kiosk--get-all' },
155
+ PayrollKiosk: { fields: PAYROLL_KIOSK_FIELDS, path: 'kiosk', apiRef: 'time-and-attendance/kiosk--get-all', apiRefById: 'manager/manager-kiosk--get-api-v2-business-by-business-id-manager-kiosk-by-id' },
120
156
  PayrollKioskEmployee: { fields: PAYROLL_KIOSK_EMPLOYEE_FIELDS, path: 'kiosk/{kioskId}/staff', apiRef: 'time-and-attendance/generic-time-and-attendance--get-staff' },
121
157
  PayrollEmployeeGroup: { fields: PAYROLL_EMPLOYEE_GROUP_FIELDS, path: 'employeegroup', apiRef: 'employee-groups/au-employee-group--get-groups' },
122
158
  PayrollStandardHours: { path: 'employee/{employeeId}/standardhours', apiRef: 'employee/au-employee-standard-hours--get' },
123
- // Backward compatibility aliases (deprecated use Payroll* keys)
159
+ PayrollLeaveBalance: { fields: PAYROLL_LEAVE_BALANCE_FIELDS, path: 'employee/{employeeId}/leavebalances', apiRef: 'employee/leave-balances--get-leave-balances' },
160
+ PayrollPublicHoliday: { fields: PAYROLL_PUBLIC_HOLIDAY_FIELDS, path: 'publicholiday', apiRef: 'public-holiday/au-public-holiday--get-public-holidays-for-year' },
161
+ PayrollWorkType: { fields: PAYROLL_WORK_TYPE_FIELDS, path: 'worktype', apiRef: 'work-type/au-business-work-type--get-work-types' },
162
+ PayrollLeaveCategory: { fields: PAYROLL_LEAVE_CATEGORY_FIELDS, path: 'leavecategory', apiRef: 'leave-categories/au-leave-category--get-leave-categories' },
163
+ PayrollUnavailability: { fields: PAYROLL_UNAVAILABILITY_FIELDS, path: 'unavailability', apiRef: 'unavailability/unavailability--get' },
124
164
  EHEmployee: { fields: PAYROLL_EMPLOYEE_FIELDS, path: 'employee/unstructured', apiRef: 'employee/au-employee--get-employees', apiRefById: 'employee/au-employee--get-employee-by-id' },
125
165
  EHLeaveRequest: { fields: PAYROLL_LEAVE_REQUEST_FIELDS, path: 'leaverequest', apiRef: 'leave-requests/au-business-hours-leave-request--list-leave-requests' },
126
166
  EHEmployeeLeaveRequest: { fields: PAYROLL_LEAVE_REQUEST_FIELDS, path: 'employee/{employeeId}/leaverequest', apiRef: 'leave-requests/au-hours-leave-request--get-leave-requests' },
127
167
  EHLocation: { fields: PAYROLL_LOCATION_FIELDS, path: 'location', apiRef: 'location/au-location--get-locations' },
128
168
  EHRosterShift: { fields: PAYROLL_ROSTER_SHIFT_FIELDS, path: 'rostershift', apiRef: 'roster-shifts/au-roster-shift--get' },
129
- EHKiosk: { fields: PAYROLL_KIOSK_FIELDS, path: 'kiosk', apiRef: 'time-and-attendance/kiosk--get-all' },
169
+ EHKiosk: { fields: PAYROLL_KIOSK_FIELDS, path: 'kiosk', apiRef: 'time-and-attendance/kiosk--get-all', apiRefById: 'manager/manager-kiosk--get-api-v2-business-by-business-id-manager-kiosk-by-id' },
130
170
  EHKioskEmployee: { fields: PAYROLL_KIOSK_EMPLOYEE_FIELDS, path: 'kiosk/{kioskId}/staff', apiRef: 'time-and-attendance/generic-time-and-attendance--get-staff' },
131
171
  EHEmployeeGroup: { fields: PAYROLL_EMPLOYEE_GROUP_FIELDS, path: 'employeegroup', apiRef: 'employee-groups/au-employee-group--get-groups' },
132
172
  EHStandardHours: { path: 'employee/{employeeId}/standardhours', apiRef: 'employee/au-employee-standard-hours--get' },
173
+ EHLeaveBalance: { fields: PAYROLL_LEAVE_BALANCE_FIELDS, path: 'employee/{employeeId}/leavebalances', apiRef: 'employee/leave-balances--get-leave-balances' },
174
+ EHPublicHoliday: { fields: PAYROLL_PUBLIC_HOLIDAY_FIELDS, path: 'publicholiday', apiRef: 'public-holiday/au-public-holiday--get-public-holidays-for-year' },
175
+ EHWorkType: { fields: PAYROLL_WORK_TYPE_FIELDS, path: 'worktype', apiRef: 'work-type/au-business-work-type--get-work-types' },
176
+ EHLeaveCategory: { fields: PAYROLL_LEAVE_CATEGORY_FIELDS, path: 'leavecategory', apiRef: 'leave-categories/au-leave-category--get-leave-categories' },
177
+ EHUnavailability: { fields: PAYROLL_UNAVAILABILITY_FIELDS, path: 'unavailability', apiRef: 'unavailability/unavailability--get' },
133
178
  };
134
179
  /**
135
180
  * Access tier for each data method.
@@ -141,13 +186,19 @@ export const ENTITIES = {
141
186
  export const METHOD_TIERS = {
142
187
  getLocations: 'standard',
143
188
  getEmployeeGroups: 'standard',
189
+ getKiosk: 'standard',
144
190
  getKiosks: 'standard',
145
191
  getKioskStaff: 'standard',
146
192
  getRosterShifts: 'standard',
193
+ getPublicHolidays: 'standard',
194
+ getWorkTypes: 'standard',
195
+ getLeaveCategories: 'standard',
147
196
  getEmployees: 'restricted',
148
197
  getLeaveRequests: 'restricted',
149
198
  getEmployeeLeaveRequests: 'restricted',
150
199
  getEmployee: 'restricted',
151
200
  getEmployeeImage: 'restricted',
152
201
  getStandardHours: 'restricted',
202
+ getEmployeeLeaveBalances: 'restricted',
203
+ getUnavailabilities: 'restricted',
153
204
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markwharton/eh-payroll",
3
- "version": "3.2.2",
3
+ "version": "3.4.0",
4
4
  "description": "Employment Hero Payroll API client",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",