@markwharton/eh-payroll 2.4.0 → 2.5.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,15 +71,6 @@ if (groupResult.ok) console.log(groupResult.data); // EHEmployeeGroup[]
71
71
  const hoursResult = await client.getStandardHours(employeeId);
72
72
  if (hoursResult.ok) console.log(hoursResult.data); // EHStandardHours
73
73
 
74
- // Discover available report columns
75
- const fieldsResult = await client.getReportFields();
76
- if (fieldsResult.ok) console.log(fieldsResult.data); // EHReportField[]
77
-
78
- // Run Employee Details Report with selected columns
79
- const reportResult = await client.getEmployeeDetailsReport({
80
- selectedColumns: ['FirstName', 'Surname', 'ExternalId']
81
- });
82
- if (reportResult.ok) console.log(reportResult.data); // Record<string, unknown>[]
83
74
  ```
84
75
 
85
76
  ## Result Pattern
@@ -117,9 +108,7 @@ const employees = result.data;
117
108
  | `getRosterShifts(from, to, options?)` | `string, string, EHRosterShiftOptions?` | `Result<EHRosterShift[]>` |
118
109
  | `getKiosks()` | — | `Result<EHKiosk[]>` |
119
110
  | `getKioskStaff(kioskId, options?)` | `number, EHKioskStaffOptions?` | `Result<EHKioskEmployee[]>` |
120
- | `getReportFields()` | — | `Result<EHReportField[]>` |
121
111
  | `getLeaveRequests(options?)` | `EHLeaveRequestOptions?` | `Result<EHLeaveRequest[]>` |
122
- | `getEmployeeDetailsReport(options?)` | `EHEmployeeDetailsReportOptions?` | `Result<Record<string, unknown>[]>` |
123
112
 
124
113
  ### `getLeaveRequests()`
125
114
 
@@ -140,10 +129,6 @@ Returns leave requests with all filters applied server-side. The business-level
140
129
  | `leaveCategoryId` | `number` | Filter by leave category ID |
141
130
  | `locationId` | `number` | Filter by location ID |
142
131
 
143
- ### `getEmployeeDetailsReport()`
144
-
145
- Returns all employees with the requested columns in a single API call. The response is dynamic — field keys depend on `selectedColumns`. Results are cached with `employeeDetailsReportTtl` (default: 2 min).
146
-
147
132
  ### `getRosterShifts()`
148
133
 
149
134
  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.
@@ -172,7 +157,7 @@ const client = new EHClient({
172
157
  });
173
158
  ```
174
159
 
175
- `EHConfig` extends `ClientConfig` from api-core, which provides the `baseUrl`, `onRequest`, `retry`, and `cacheInstance` fields. `apiKey`, `businessId`, `region`, `cache`, and `rateLimitPerSecond` are EH-specific. Pass `cacheInstance` to use a custom cache backend (e.g., `LayeredCache` with persistent stores); otherwise `cache: {}` creates an in-memory `TTLCache`. PII data (`includePii: true`) automatically skips persistent stores.
160
+ `EHConfig` extends `ClientConfig` from api-core, which provides the `baseUrl`, `onRequest`, `retry`, and `cacheInstance` fields. `apiKey`, `businessId`, `region`, `cache`, and `rateLimitPerSecond` are EH-specific. Pass `cacheInstance` to use a custom cache backend (e.g., `LayeredCache` with persistent stores); otherwise `cache: {}` creates an in-memory `TTLCache`. Set `persistRestricted: false` to keep restricted-tier data in memory only.
176
161
 
177
162
  ### Cache TTLs
178
163
 
@@ -186,10 +171,8 @@ const client = new EHClient({
186
171
  | Leave requests | 2 min |
187
172
  | Kiosks | 5 min |
188
173
  | Kiosk staff | 1 min |
189
- | Report fields | 10 min |
190
- | Employee details report | 2 min |
191
174
 
192
- Failed API results (`ok: false`) are never cached — transient errors won't persist for the full TTL. See the [root README Cache System section](../../README.md#cache-system) for the full cache architecture (layered stores, PII handling, request coalescing).
175
+ Failed API results (`ok: false`) are never cached — transient errors won't persist for the full TTL. See the [root README Cache System section](../../README.md#cache-system) for the full cache architecture (layered stores, restricted data handling, request coalescing).
193
176
 
194
177
  ### Rate Limiting
195
178
 
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 { EHConfig, EHLeaveRequest, EHLeaveRequestOptions, EHEmployeeOptions, EHSingleEmployeeOptions, EHStandardHours, EHLocation, EHEmployeeGroup, EHRosterShift, EHRosterShiftOptions, EHKiosk, EHKioskEmployee, EHKioskStaffOptions, EHReportField, EHEmployeeDetailsReportOptions } from './types.js';
9
+ import type { EHConfig, EHLeaveRequest, EHLeaveRequestOptions, EHEmployeeOptions, EHStandardHours, EHLocation, EHEmployeeGroup, EHRosterShift, EHRosterShiftOptions, EHKiosk, EHKioskEmployee, EHKioskStaffOptions } from './types.js';
10
10
  import type { EHAuEmployee } from './employee-types.generated.js';
11
11
  import type { Result } from '@markwharton/api-core';
12
12
  /**
@@ -93,7 +93,7 @@ export declare class EHClient {
93
93
  /**
94
94
  * Get a single employee by ID
95
95
  */
96
- getEmployee(employeeId: number, options?: EHSingleEmployeeOptions): Promise<Result<EHAuEmployee>>;
96
+ getEmployee(employeeId: number): Promise<Result<EHAuEmployee>>;
97
97
  /**
98
98
  * Get standard hours for an employee (includes FTE value)
99
99
  */
@@ -125,18 +125,4 @@ export declare class EHClient {
125
125
  * @param options - Optional query parameters
126
126
  */
127
127
  getKioskStaff(kioskId: number, options?: EHKioskStaffOptions): Promise<Result<EHKioskEmployee[]>>;
128
- /**
129
- * Get available fields for the Employee Details Report
130
- *
131
- * Returns the list of columns that can be requested via getEmployeeDetailsReport().
132
- * Use this to discover what data is available for the business.
133
- */
134
- getReportFields(): Promise<Result<EHReportField[]>>;
135
- /**
136
- * Get Employee Details Report
137
- *
138
- * Returns all employees with the requested columns in a single API call.
139
- * The response is dynamic (JObject[]) — field keys depend on selectedColumns.
140
- */
141
- getEmployeeDetailsReport(options?: EHEmployeeDetailsReportOptions): Promise<Result<Record<string, unknown>[]>>;
142
128
  }
package/dist/client.js CHANGED
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @see https://api.keypay.com.au/
8
8
  */
9
- import { AU_EMPLOYEE_OPERATIONAL_FIELDS, AU_EMPLOYEE_FIELDS, LEAVE_REQUEST_FIELDS, LOCATION_FIELDS, EMPLOYEE_GROUP_FIELDS, ROSTER_SHIFT_FIELDS, KIOSK_FIELDS, KIOSK_EMPLOYEE_FIELDS, } from './types.js';
9
+ import { AU_EMPLOYEE_FIELDS, LEAVE_REQUEST_FIELDS, LOCATION_FIELDS, EMPLOYEE_GROUP_FIELDS, ROSTER_SHIFT_FIELDS, KIOSK_FIELDS, KIOSK_EMPLOYEE_FIELDS, } from './types.js';
10
10
  import { buildBasicAuthHeader } from './utils.js';
11
11
  import { parseEHPayrollErrorResponse } from './errors.js';
12
12
  import { EH_API_BASE, EH_REGION_URLS } from './constants.js';
@@ -49,8 +49,6 @@ export class EHClient {
49
49
  rosterShiftsTtl: config.cache?.rosterShiftsTtl ?? 120000,
50
50
  kiosksTtl: config.cache?.kiosksTtl ?? 300000,
51
51
  kioskStaffTtl: config.cache?.kioskStaffTtl ?? 60000,
52
- reportFieldsTtl: config.cache?.reportFieldsTtl ?? 600000,
53
- employeeDetailsReportTtl: config.cache?.employeeDetailsReportTtl ?? 120000,
54
52
  };
55
53
  // Initialize retry config with defaults if provided
56
54
  this.retryConfig = resolveRetryConfig(config.retry);
@@ -254,16 +252,12 @@ export class EHClient {
254
252
  * Get all employees (unstructured format)
255
253
  */
256
254
  async getEmployees(options) {
257
- const fields = options?.includePii ? AU_EMPLOYEE_FIELDS : AU_EMPLOYEE_OPERATIONAL_FIELDS;
258
255
  const parts = ['employees'];
259
256
  if (options?.payScheduleId != null)
260
257
  parts.push(`ps:${options.payScheduleId}`);
261
258
  if (options?.locationId != null)
262
259
  parts.push(`loc:${options.locationId}`);
263
- if (options?.includePii)
264
- parts.push('pii');
265
260
  const cacheKey = parts.join(':');
266
- const persistOpt = (options?.includePii || !this.persistRestricted) ? { persist: false } : undefined;
267
261
  return this.cached(cacheKey, this.cacheTtl.employeesTtl, () => {
268
262
  const params = new URLSearchParams();
269
263
  if (options?.payScheduleId != null)
@@ -274,22 +268,19 @@ export class EHClient {
274
268
  return this.fetchPaginated((skip) => {
275
269
  params.set('$skip', String(skip));
276
270
  return `${this.baseUrl}/business/${this.businessId}/employee/unstructured?${params}`;
277
- }, fields);
278
- }, persistOpt);
271
+ }, AU_EMPLOYEE_FIELDS);
272
+ }, this.restrictedPersistOpt);
279
273
  }
280
274
  /**
281
275
  * Get a single employee by ID
282
276
  */
283
- async getEmployee(employeeId, options) {
284
- const fields = options?.includePii ? AU_EMPLOYEE_FIELDS : AU_EMPLOYEE_OPERATIONAL_FIELDS;
285
- const cacheKey = options?.includePii ? `employee:${employeeId}:pii` : `employee:${employeeId}`;
286
- const persistOpt = (options?.includePii || !this.persistRestricted) ? { persist: false } : undefined;
287
- return this.cached(cacheKey, this.cacheTtl.employeesTtl, async () => {
277
+ async getEmployee(employeeId) {
278
+ return this.cached(`employee:${employeeId}`, this.cacheTtl.employeesTtl, async () => {
288
279
  const url = `${this.baseUrl}/business/${this.businessId}/employee/unstructured/${employeeId}`;
289
280
  return this.fetchAndParse(url, async (r) => {
290
- return pickFields(await r.json(), fields);
281
+ return pickFields(await r.json(), AU_EMPLOYEE_FIELDS);
291
282
  });
292
- }, persistOpt);
283
+ }, this.restrictedPersistOpt);
293
284
  }
294
285
  // ============================================================================
295
286
  // Standard Hours
@@ -455,61 +446,4 @@ export class EHClient {
455
446
  });
456
447
  });
457
448
  }
458
- // ============================================================================
459
- // Employee Details Report
460
- // ============================================================================
461
- /**
462
- * Get available fields for the Employee Details Report
463
- *
464
- * Returns the list of columns that can be requested via getEmployeeDetailsReport().
465
- * Use this to discover what data is available for the business.
466
- */
467
- async getReportFields() {
468
- return this.cached('reportfields', this.cacheTtl.reportFieldsTtl, async () => {
469
- const url = `${this.baseUrl}/business/${this.businessId}/report/employeedetails/fields`;
470
- return this.fetchAndParse(url, async (r) => {
471
- return await r.json();
472
- });
473
- });
474
- }
475
- /**
476
- * Get Employee Details Report
477
- *
478
- * Returns all employees with the requested columns in a single API call.
479
- * The response is dynamic (JObject[]) — field keys depend on selectedColumns.
480
- */
481
- async getEmployeeDetailsReport(options) {
482
- const parts = ['report:employeedetails'];
483
- if (options?.selectedColumns?.length)
484
- parts.push(`cols:${options.selectedColumns.join(',')}`);
485
- if (options?.locationId != null)
486
- parts.push(`loc:${options.locationId}`);
487
- if (options?.employingEntityId != null)
488
- parts.push(`ee:${options.employingEntityId}`);
489
- if (options?.includeActive != null)
490
- parts.push(`a:${options.includeActive}`);
491
- if (options?.includeInactive != null)
492
- parts.push(`i:${options.includeInactive}`);
493
- const cacheKey = parts.join(':');
494
- return this.cached(cacheKey, this.cacheTtl.employeeDetailsReportTtl, async () => {
495
- const params = new URLSearchParams();
496
- if (options?.selectedColumns) {
497
- for (const col of options.selectedColumns) {
498
- params.append('selectedColumns', col);
499
- }
500
- }
501
- if (options?.locationId != null)
502
- params.set('locationId', String(options.locationId));
503
- if (options?.employingEntityId != null)
504
- params.set('employingEntityId', String(options.employingEntityId));
505
- if (options?.includeActive != null)
506
- params.set('includeActive', String(options.includeActive));
507
- if (options?.includeInactive != null)
508
- params.set('includeInactive', String(options.includeInactive));
509
- const url = this.businessUrl('report/employeedetails', params);
510
- return this.fetchAndParse(url, async (r) => {
511
- return await r.json();
512
- });
513
- }, this.restrictedPersistOpt);
514
- }
515
449
  }
package/dist/index.d.ts CHANGED
@@ -20,8 +20,8 @@
20
20
  * ```
21
21
  */
22
22
  export { EHClient } from './client.js';
23
- export type { EHConfig, EHCacheConfig, EHRetryConfig, EHLeaveRequest, EHLeaveRequestOptions, EHLeaveRequestStatus, EHEmployee, EHEmployeeOptions, EHSingleEmployeeOptions, EHStandardHours, EHLocation, EHEmployeeGroup, EHRosterShift, EHRosterShiftOptions, EHAttendanceStatus, EHKiosk, EHKioskEmployee, EHKioskStaffOptions, EHReportField, EHEmployeeDetailsReportOptions, } from './types.js';
24
- export { AU_EMPLOYEE_OPERATIONAL_FIELDS, AU_EMPLOYEE_PII_FIELDS, AU_EMPLOYEE_FIELDS, LEAVE_REQUEST_FIELDS, LOCATION_FIELDS, EMPLOYEE_GROUP_FIELDS, ROSTER_SHIFT_FIELDS, KIOSK_FIELDS, KIOSK_EMPLOYEE_FIELDS, } from './types.js';
23
+ export type { EHConfig, EHCacheConfig, EHRetryConfig, EHLeaveRequest, EHLeaveRequestOptions, EHLeaveRequestStatus, EHEmployee, EHEmployeeOptions, EHStandardHours, EHLocation, EHEmployeeGroup, EHRosterShift, EHRosterShiftOptions, EHAttendanceStatus, EHKiosk, EHKioskEmployee, EHKioskStaffOptions, } from './types.js';
24
+ export { AU_EMPLOYEE_FIELDS, LEAVE_REQUEST_FIELDS, LOCATION_FIELDS, EMPLOYEE_GROUP_FIELDS, ROSTER_SHIFT_FIELDS, KIOSK_FIELDS, KIOSK_EMPLOYEE_FIELDS, } from './types.js';
25
25
  export type { AccessTier } from './types.js';
26
26
  export { METHOD_TIERS } from './types.js';
27
27
  export type { EHAuEmployee } from './employee-types.generated.js';
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@
22
22
  // Main client
23
23
  export { EHClient } from './client.js';
24
24
  // Field key constants (whitelists for pickFields)
25
- export { AU_EMPLOYEE_OPERATIONAL_FIELDS, AU_EMPLOYEE_PII_FIELDS, AU_EMPLOYEE_FIELDS, LEAVE_REQUEST_FIELDS, LOCATION_FIELDS, EMPLOYEE_GROUP_FIELDS, ROSTER_SHIFT_FIELDS, KIOSK_FIELDS, KIOSK_EMPLOYEE_FIELDS, } from './types.js';
25
+ export { AU_EMPLOYEE_FIELDS, LEAVE_REQUEST_FIELDS, LOCATION_FIELDS, EMPLOYEE_GROUP_FIELDS, ROSTER_SHIFT_FIELDS, KIOSK_FIELDS, KIOSK_EMPLOYEE_FIELDS, } 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
@@ -29,10 +29,6 @@ export interface EHCacheConfig {
29
29
  kiosksTtl?: number;
30
30
  /** TTL for kiosk staff (default: 60000 = 1 min) */
31
31
  kioskStaffTtl?: number;
32
- /** TTL for report fields (default: 600000 = 10 min) */
33
- reportFieldsTtl?: number;
34
- /** TTL for employee details report (default: 120000 = 2 min) */
35
- employeeDetailsReportTtl?: number;
36
32
  }
37
33
  /** @deprecated Use `RetryConfig` from `@markwharton/api-core` directly. */
38
34
  export type EHRetryConfig = RetryConfig;
@@ -237,15 +233,6 @@ export interface EHEmployeeOptions {
237
233
  payScheduleId?: number;
238
234
  /** Filter by location ID */
239
235
  locationId?: number;
240
- /** Include PII fields (default: false — operational fields only) */
241
- includePii?: boolean;
242
- }
243
- /**
244
- * Options for getEmployee (single)
245
- */
246
- export interface EHSingleEmployeeOptions {
247
- /** Include PII fields (default: false — operational fields only) */
248
- includePii?: boolean;
249
236
  }
250
237
  /**
251
238
  * Options for getRosterShifts
@@ -322,32 +309,6 @@ export interface EHKioskStaffOptions {
322
309
  /** Restrict current shifts to current kiosk location (default: false) */
323
310
  restrictCurrentShiftsToCurrentKioskLocation?: boolean;
324
311
  }
325
- /**
326
- * Available field for the Employee Details Report
327
- *
328
- * From GET /business/{id}/report/employeedetails/fields
329
- */
330
- export interface EHReportField {
331
- /** Field identifier (used in selectedColumns) */
332
- value: string;
333
- /** Human-readable field name */
334
- displayText: string;
335
- }
336
- /**
337
- * Options for getEmployeeDetailsReport
338
- */
339
- export interface EHEmployeeDetailsReportOptions {
340
- /** Column names to include in the report */
341
- selectedColumns?: string[];
342
- /** Filter by location ID */
343
- locationId?: number;
344
- /** Filter by employing entity ID */
345
- employingEntityId?: number;
346
- /** Include active employees (default: true) */
347
- includeActive?: boolean;
348
- /** Include inactive employees (default: false) */
349
- includeInactive?: boolean;
350
- }
351
312
  /** Whitelisted fields for EHLeaveRequest */
352
313
  export declare const LEAVE_REQUEST_FIELDS: readonly ["id", "employeeId", "leaveCategoryId", "employee", "leaveCategory", "fromDate", "toDate", "totalHours", "hoursApplied", "notes", "status"];
353
314
  /** Whitelisted fields for EHLocation */
@@ -360,25 +321,15 @@ export declare const KIOSK_EMPLOYEE_FIELDS: readonly ["employeeId", "firstName",
360
321
  export declare const EMPLOYEE_GROUP_FIELDS: readonly ["id", "name"];
361
322
  /** Whitelisted fields for EHRosterShift */
362
323
  export declare const ROSTER_SHIFT_FIELDS: readonly ["id", "employeeId", "employeeName", "locationId", "locationName", "workTypeId", "workTypeName", "startTime", "endTime", "notes", "published", "accepted"];
363
- /**
364
- * Operational fields for EHAuEmployee (52 fields)
365
- * Identity, employment structure, pay config, scheduling, leave, AU compliance.
366
- */
367
- export declare const AU_EMPLOYEE_OPERATIONAL_FIELDS: readonly ["id", "externalId", "firstName", "surname", "status", "startDate", "endDate", "anniversaryDate", "dateCreated", "employmentType", "jobTitle", "employmentAgreement", "employmentAgreementId", "paySchedule", "payRateTemplate", "rate", "rateUnit", "hoursPerWeek", "hoursPerDay", "primaryPayCategory", "payConditionRuleSet", "overrideTemplateRate", "automaticallyPayEmployee", "primaryLocation", "locations", "tags", "workTypes", "reportingDimensionValues", "leaveAccrualStartDateType", "leaveTemplate", "leaveYearStart", "isEnabledForTimesheets", "rosteringNotificationChoices", "paySlipNotificationType", "terminationReason", "australianResident", "awardId", "businessAwardPackage", "automaticallyApplyPublicHolidayNotWorkedEarningsLines", "closelyHeldEmployee", "closelyHeldReporting", "disableAutoProgression", "dvlPaySlipDescription", "employingEntityId", "includeInPortableLongServiceLeaveReport", "portableLongServiceLeaveId", "isExemptFromFloodLevy", "isExemptFromPayrollTax", "isSeasonalWorker", "maximumQuarterlySuperContributionsBase", "superThresholdAmount", "singleTouchPayroll"];
368
- /**
369
- * PII fields for EHAuEmployee (87 fields)
370
- * Personal data, contact info, bank accounts, addresses, tax, super, emergency contacts.
371
- */
372
- export declare const AU_EMPLOYEE_PII_FIELDS: readonly ["dateOfBirth", "gender", "title", "middleName", "preferredName", "previousSurname", "emailAddress", "homePhone", "mobilePhone", "workPhone", "bankAccount1_AccountName", "bankAccount1_AccountNumber", "bankAccount1_AllocatedPercentage", "bankAccount1_BSB", "bankAccount1_FixedAmount", "bankAccount2_AccountName", "bankAccount2_AccountNumber", "bankAccount2_AllocatedPercentage", "bankAccount2_BSB", "bankAccount2_FixedAmount", "bankAccount3_AccountName", "bankAccount3_AccountNumber", "bankAccount3_AllocatedPercentage", "bankAccount3_BSB", "bankAccount3_FixedAmount", "emergencyContact1_Address", "emergencyContact1_AlternateContactNumber", "emergencyContact1_ContactNumber", "emergencyContact1_Name", "emergencyContact1_Relationship", "emergencyContact2_Address", "emergencyContact2_AlternateContactNumber", "emergencyContact2_ContactNumber", "emergencyContact2_Name", "emergencyContact2_Relationship", "postalStreetAddress", "postalAddressLine2", "postalPostCode", "postalCountry", "postalState", "postalSuburb", "postalAddressIsOverseas", "residentialStreetAddress", "residentialAddressLine2", "residentialPostCode", "residentialCountry", "residentialState", "residentialSuburb", "residentialAddressIsOverseas", "taxFileNumber", "taxCategory", "taxVariation", "claimTaxFreeThreshold", "claimMedicareLevyReduction", "medicareLevyExemption", "medicareLevyReductionDependentCount", "medicareLevyReductionSpouse", "medicareLevySurchargeWithholdingTier", "seniorsTaxOffset", "otherTaxOffset", "stslDebt", "hasWithholdingVariation", "dateTaxFileDeclarationReported", "dateTaxFileDeclarationSigned", "superFund1_AllocatedPercentage", "superFund1_EmployerNominatedFund", "superFund1_FixedAmount", "superFund1_FundName", "superFund1_MemberNumber", "superFund1_ProductCode", "superFund2_AllocatedPercentage", "superFund2_EmployerNominatedFund", "superFund2_FixedAmount", "superFund2_FundName", "superFund2_MemberNumber", "superFund2_ProductCode", "superFund3_AllocatedPercentage", "superFund3_EmployerNominatedFund", "superFund3_FixedAmount", "superFund3_FundName", "superFund3_MemberNumber", "superFund3_ProductCode", "contractorABN", "employingEntityABN", "hasApprovedWorkingHolidayVisa", "workingHolidayVisaCountry", "workingHolidayVisaStartDate"];
373
- /** All whitelisted fields for EHAuEmployee (operational + PII) */
324
+ /** Whitelisted fields for EHAuEmployee (139 fields) */
374
325
  export declare const AU_EMPLOYEE_FIELDS: readonly ["id", "externalId", "firstName", "surname", "status", "startDate", "endDate", "anniversaryDate", "dateCreated", "employmentType", "jobTitle", "employmentAgreement", "employmentAgreementId", "paySchedule", "payRateTemplate", "rate", "rateUnit", "hoursPerWeek", "hoursPerDay", "primaryPayCategory", "payConditionRuleSet", "overrideTemplateRate", "automaticallyPayEmployee", "primaryLocation", "locations", "tags", "workTypes", "reportingDimensionValues", "leaveAccrualStartDateType", "leaveTemplate", "leaveYearStart", "isEnabledForTimesheets", "rosteringNotificationChoices", "paySlipNotificationType", "terminationReason", "australianResident", "awardId", "businessAwardPackage", "automaticallyApplyPublicHolidayNotWorkedEarningsLines", "closelyHeldEmployee", "closelyHeldReporting", "disableAutoProgression", "dvlPaySlipDescription", "employingEntityId", "includeInPortableLongServiceLeaveReport", "portableLongServiceLeaveId", "isExemptFromFloodLevy", "isExemptFromPayrollTax", "isSeasonalWorker", "maximumQuarterlySuperContributionsBase", "superThresholdAmount", "singleTouchPayroll", "dateOfBirth", "gender", "title", "middleName", "preferredName", "previousSurname", "emailAddress", "homePhone", "mobilePhone", "workPhone", "bankAccount1_AccountName", "bankAccount1_AccountNumber", "bankAccount1_AllocatedPercentage", "bankAccount1_BSB", "bankAccount1_FixedAmount", "bankAccount2_AccountName", "bankAccount2_AccountNumber", "bankAccount2_AllocatedPercentage", "bankAccount2_BSB", "bankAccount2_FixedAmount", "bankAccount3_AccountName", "bankAccount3_AccountNumber", "bankAccount3_AllocatedPercentage", "bankAccount3_BSB", "bankAccount3_FixedAmount", "emergencyContact1_Address", "emergencyContact1_AlternateContactNumber", "emergencyContact1_ContactNumber", "emergencyContact1_Name", "emergencyContact1_Relationship", "emergencyContact2_Address", "emergencyContact2_AlternateContactNumber", "emergencyContact2_ContactNumber", "emergencyContact2_Name", "emergencyContact2_Relationship", "postalStreetAddress", "postalAddressLine2", "postalPostCode", "postalCountry", "postalState", "postalSuburb", "postalAddressIsOverseas", "residentialStreetAddress", "residentialAddressLine2", "residentialPostCode", "residentialCountry", "residentialState", "residentialSuburb", "residentialAddressIsOverseas", "taxFileNumber", "taxCategory", "taxVariation", "claimTaxFreeThreshold", "claimMedicareLevyReduction", "medicareLevyExemption", "medicareLevyReductionDependentCount", "medicareLevyReductionSpouse", "medicareLevySurchargeWithholdingTier", "seniorsTaxOffset", "otherTaxOffset", "stslDebt", "hasWithholdingVariation", "dateTaxFileDeclarationReported", "dateTaxFileDeclarationSigned", "superFund1_AllocatedPercentage", "superFund1_EmployerNominatedFund", "superFund1_FixedAmount", "superFund1_FundName", "superFund1_MemberNumber", "superFund1_ProductCode", "superFund2_AllocatedPercentage", "superFund2_EmployerNominatedFund", "superFund2_FixedAmount", "superFund2_FundName", "superFund2_MemberNumber", "superFund2_ProductCode", "superFund3_AllocatedPercentage", "superFund3_EmployerNominatedFund", "superFund3_FixedAmount", "superFund3_FundName", "superFund3_MemberNumber", "superFund3_ProductCode", "contractorABN", "employingEntityABN", "hasApprovedWorkingHolidayVisa", "workingHolidayVisaCountry", "workingHolidayVisaStartDate"];
375
326
  /** Access tier for method-level authorization */
376
327
  export type AccessTier = 'standard' | 'restricted';
377
328
  /**
378
329
  * Access tier for each data method.
379
330
  *
380
- * Standard: operational data (locations, groups, kiosks, roster shifts, report fields).
381
- * Restricted: employee-level data (employees, standard hours, leave requests, employee reports).
331
+ * Standard: operational data (locations, groups, kiosks, roster shifts).
332
+ * Restricted: employee-level data (employees, standard hours, leave requests).
382
333
  * Utility methods (validate, clear, invalidate) are not included.
383
334
  */
384
335
  export declare const METHOD_TIERS: Record<string, AccessTier>;
package/dist/types.js CHANGED
@@ -41,11 +41,8 @@ export const ROSTER_SHIFT_FIELDS = [
41
41
  'workTypeId', 'workTypeName', 'startTime', 'endTime',
42
42
  'notes', 'published', 'accepted',
43
43
  ];
44
- /**
45
- * Operational fields for EHAuEmployee (52 fields)
46
- * Identity, employment structure, pay config, scheduling, leave, AU compliance.
47
- */
48
- export const AU_EMPLOYEE_OPERATIONAL_FIELDS = [
44
+ /** Whitelisted fields for EHAuEmployee (139 fields) */
45
+ export const AU_EMPLOYEE_FIELDS = [
49
46
  // Identity
50
47
  'id', 'externalId', 'firstName', 'surname', 'status',
51
48
  // Dates
@@ -71,12 +68,6 @@ export const AU_EMPLOYEE_OPERATIONAL_FIELDS = [
71
68
  'isExemptFromFloodLevy', 'isExemptFromPayrollTax', 'isSeasonalWorker',
72
69
  'maximumQuarterlySuperContributionsBase', 'superThresholdAmount',
73
70
  'singleTouchPayroll',
74
- ];
75
- /**
76
- * PII fields for EHAuEmployee (87 fields)
77
- * Personal data, contact info, bank accounts, addresses, tax, super, emergency contacts.
78
- */
79
- export const AU_EMPLOYEE_PII_FIELDS = [
80
71
  // Personal
81
72
  'dateOfBirth', 'gender', 'title', 'middleName', 'preferredName', 'previousSurname',
82
73
  // Contact
@@ -118,16 +109,11 @@ export const AU_EMPLOYEE_PII_FIELDS = [
118
109
  // Visa
119
110
  'hasApprovedWorkingHolidayVisa', 'workingHolidayVisaCountry', 'workingHolidayVisaStartDate',
120
111
  ];
121
- /** All whitelisted fields for EHAuEmployee (operational + PII) */
122
- export const AU_EMPLOYEE_FIELDS = [
123
- ...AU_EMPLOYEE_OPERATIONAL_FIELDS,
124
- ...AU_EMPLOYEE_PII_FIELDS,
125
- ];
126
112
  /**
127
113
  * Access tier for each data method.
128
114
  *
129
- * Standard: operational data (locations, groups, kiosks, roster shifts, report fields).
130
- * Restricted: employee-level data (employees, standard hours, leave requests, employee reports).
115
+ * Standard: operational data (locations, groups, kiosks, roster shifts).
116
+ * Restricted: employee-level data (employees, standard hours, leave requests).
131
117
  * Utility methods (validate, clear, invalidate) are not included.
132
118
  */
133
119
  export const METHOD_TIERS = {
@@ -136,10 +122,8 @@ export const METHOD_TIERS = {
136
122
  getKiosks: 'standard',
137
123
  getKioskStaff: 'standard',
138
124
  getRosterShifts: 'standard',
139
- getReportFields: 'standard',
140
125
  getEmployees: 'restricted',
141
126
  getLeaveRequests: 'restricted',
142
127
  getEmployee: 'restricted',
143
128
  getStandardHours: 'restricted',
144
- getEmployeeDetailsReport: 'restricted',
145
129
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markwharton/eh-payroll",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Employment Hero Payroll API client",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",