@markwharton/eh-payroll 2.7.2 → 3.0.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/client.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * @see https://api.keypay.com.au/
8
8
  */
9
9
  import type { EHConfig, EHLeaveRequest, EHLeaveRequestOptions, EHEmployeeLeaveRequestOptions, EHEmployeeOptions, EHStandardHours, EHLocation, EHEmployeeGroup, EHRosterShift, EHRosterShiftOptions, EHKiosk, EHKioskEmployee, EHKioskStaffOptions, EHEmployeeImage } from './types.js';
10
- import type { EHAuEmployee } from './employee-types.generated.js';
10
+ import type { EHEmployee } from './employee-types.generated.js';
11
11
  import type { Result } from '@markwharton/api-core';
12
12
  /**
13
13
  * Employment Hero Payroll API Client
@@ -112,11 +112,11 @@ export declare class EHClient {
112
112
  /**
113
113
  * Get all employees
114
114
  */
115
- getEmployees(options?: EHEmployeeOptions): Promise<Result<EHAuEmployee[]>>;
115
+ getEmployees(options?: EHEmployeeOptions): Promise<Result<EHEmployee[]>>;
116
116
  /**
117
117
  * Get a single employee by ID
118
118
  */
119
- getEmployee(employeeId: number): Promise<Result<EHAuEmployee>>;
119
+ getEmployee(employeeId: number): Promise<Result<EHEmployee>>;
120
120
  /**
121
121
  * Get employee profile image
122
122
  *
@@ -79,7 +79,7 @@ export interface EHEmployeeCommon {
79
79
  workTypes: string | null;
80
80
  }
81
81
  /** AU region employee (70 region-specific fields) */
82
- export interface EHAuEmployee extends EHEmployeeCommon {
82
+ export interface EHEmployee extends EHEmployeeCommon {
83
83
  australianResident: boolean;
84
84
  automaticallyApplyPublicHolidayNotWorkedEarningsLines: boolean;
85
85
  awardId: number | null;
package/dist/index.d.ts CHANGED
@@ -20,11 +20,10 @@
20
20
  * ```
21
21
  */
22
22
  export { EHClient } from './client.js';
23
- export type { EHConfig, EHCacheConfig, EHRetryConfig, EHLeaveRequest, EHEmployeeLeaveRequest, EHLeaveRequestOptions, EHEmployeeLeaveRequestOptions, EHLeaveRequestStatus, EHEmployee, EHEmployeeOptions, EHStandardHours, EHLocation, EHEmployeeGroup, EHRosterShift, EHRosterShiftOptions, EHAttendanceStatus, EHKiosk, EHKioskEmployee, EHKioskStaffOptions, EHEmployeeImage, } from './types.js';
24
- export { AU_EMPLOYEE_FIELDS, LEAVE_REQUEST_FIELDS, LOCATION_FIELDS, EMPLOYEE_GROUP_FIELDS, ROSTER_SHIFT_FIELDS, KIOSK_FIELDS, KIOSK_EMPLOYEE_FIELDS, ENTITIES, } from './types.js';
23
+ export type { EHConfig, EHCacheConfig, EHRetryConfig, EHLeaveRequest, EHLeaveRequestOptions, EHEmployeeLeaveRequestOptions, EHLeaveRequestStatus, EHEmployee, EHEmployeeOptions, EHStandardHours, EHLocation, EHEmployeeGroup, EHRosterShift, EHRosterShiftOptions, EHAttendanceStatus, EHKiosk, EHKioskEmployee, EHKioskStaffOptions, EHEmployeeImage, } from './types.js';
24
+ export { EMPLOYEE_FIELDS, LEAVE_REQUEST_FIELDS, LOCATION_FIELDS, EMPLOYEE_GROUP_FIELDS, ROSTER_SHIFT_FIELDS, KIOSK_FIELDS, KIOSK_EMPLOYEE_FIELDS, ENTITIES, } from './types.js';
25
25
  export type { AccessTier } from './types.js';
26
26
  export { METHOD_TIERS } from './types.js';
27
- export type { EHAuEmployee } from './employee-types.generated.js';
28
27
  export { buildBasicAuthHeader } from './utils.js';
29
28
  export { ok, err, getErrorMessage, pickFields, normalizeEnum, RateLimiter, TTLCache, MemoryCacheStore, LayeredCache } from '@markwharton/api-core';
30
29
  export type { Result, RetryConfig, OnRequestCallback, ClientConfig, Cache, CacheStore, CacheGetOptions } from '@markwharton/api-core';
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@
22
22
  // Main client
23
23
  export { EHClient } from './client.js';
24
24
  // Field definitions (for pickFields)
25
- export { AU_EMPLOYEE_FIELDS, LEAVE_REQUEST_FIELDS, LOCATION_FIELDS, EMPLOYEE_GROUP_FIELDS, ROSTER_SHIFT_FIELDS, KIOSK_FIELDS, KIOSK_EMPLOYEE_FIELDS, ENTITIES, } from './types.js';
25
+ export { EMPLOYEE_FIELDS, LEAVE_REQUEST_FIELDS, LOCATION_FIELDS, EMPLOYEE_GROUP_FIELDS, ROSTER_SHIFT_FIELDS, KIOSK_FIELDS, 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';
package/dist/types.d.ts CHANGED
@@ -53,11 +53,10 @@ export interface EHConfig extends ClientConfig {
53
53
  * Employee from unstructured endpoint
54
54
  *
55
55
  * Region-specific types are generated from Swagger specs.
56
- * EHEmployee is an alias for EHAuEmployee for backward compatibility.
57
56
  *
58
57
  * @see employee-types.generated.ts
59
58
  */
60
- export type { EHAuEmployee as EHEmployee } from './employee-types.generated.js';
59
+ export type { EHEmployee } from './employee-types.generated.js';
61
60
  /**
62
61
  * Standard hours for an employee
63
62
  *
@@ -216,9 +215,6 @@ export interface EHEmployeeImage {
216
215
  /** Content type from response header (e.g., 'image/png') */
217
216
  contentType: string;
218
217
  }
219
- /** Employee-scoped leave request (same shape, different API operation). */
220
- export interface EHEmployeeLeaveRequest extends EHLeaveRequest {
221
- }
222
218
  /** Leave request status values */
223
219
  export type EHLeaveRequestStatus = 'Approved' | 'Pending' | 'Rejected' | 'Cancelled';
224
220
  /**
@@ -421,8 +417,8 @@ export declare const ROSTER_SHIFT_FIELDS: {
421
417
  readonly published: true;
422
418
  readonly accepted: true;
423
419
  };
424
- /** Fields for EHAuEmployee — set false to exclude from API responses */
425
- export declare const AU_EMPLOYEE_FIELDS: {
420
+ /** Fields for EHEmployee — set false to exclude from API responses */
421
+ export declare const EMPLOYEE_FIELDS: {
426
422
  readonly id: true;
427
423
  readonly externalId: true;
428
424
  readonly firstName: true;
package/dist/types.js CHANGED
@@ -41,8 +41,8 @@ export const ROSTER_SHIFT_FIELDS = {
41
41
  workTypeId: true, workTypeName: true, startTime: true, endTime: true,
42
42
  notes: true, published: true, accepted: true,
43
43
  };
44
- /** Fields for EHAuEmployee — set false to exclude from API responses */
45
- export const AU_EMPLOYEE_FIELDS = {
44
+ /** Fields for EHEmployee — set false to exclude from API responses */
45
+ export const EMPLOYEE_FIELDS = {
46
46
  // Identity
47
47
  id: true, externalId: true, firstName: true, surname: true, status: true,
48
48
  // Dates
@@ -111,7 +111,7 @@ export const AU_EMPLOYEE_FIELDS = {
111
111
  };
112
112
  /** Entity registry — maps interface names to field specs and API path segments. */
113
113
  export const ENTITIES = {
114
- EHAuEmployee: { fields: AU_EMPLOYEE_FIELDS, path: 'employee/unstructured', apiRef: 'employee/au-employee--get-employees', apiRefById: 'employee/au-employee--get-employee-by-id' },
114
+ EHAuEmployee: { fields: EMPLOYEE_FIELDS, path: 'employee/unstructured', apiRef: 'employee/au-employee--get-employees', apiRefById: 'employee/au-employee--get-employee-by-id' },
115
115
  EHLeaveRequest: { fields: LEAVE_REQUEST_FIELDS, path: 'leaverequest', apiRef: 'leave-requests/au-business-hours-leave-request--list-leave-requests' },
116
116
  EHEmployeeLeaveRequest: { fields: LEAVE_REQUEST_FIELDS, path: 'employee/{employeeId}/leaverequest', apiRef: 'leave-requests/au-hours-leave-request--get-leave-requests' },
117
117
  EHLocation: { fields: LOCATION_FIELDS, path: 'location', apiRef: 'location/au-location--get-locations' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markwharton/eh-payroll",
3
- "version": "2.7.2",
3
+ "version": "3.0.0",
4
4
  "description": "Employment Hero Payroll API client",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",