@markwharton/eh-payroll 3.0.0 → 3.0.1

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.js CHANGED
@@ -321,8 +321,8 @@ export class EHClient {
321
321
  params.set('$top', String(DEFAULT_PAGE_SIZE));
322
322
  return this.fetchPaginated((skip) => {
323
323
  params.set('$skip', String(skip));
324
- return this.businessUrl(ENTITIES.EHAuEmployee.path, params);
325
- }, ENTITIES.EHAuEmployee.fields);
324
+ return this.businessUrl(ENTITIES.EHEmployee.path, params);
325
+ }, ENTITIES.EHEmployee.fields);
326
326
  }, this.restrictedPersistOpt);
327
327
  }
328
328
  /**
@@ -330,9 +330,9 @@ export class EHClient {
330
330
  */
331
331
  async getEmployee(employeeId) {
332
332
  return this.cached(`employee:${employeeId}`, this.cacheTtl.employeesTtl, async () => {
333
- const url = this.businessUrl(`${ENTITIES.EHAuEmployee.path}/${employeeId}`);
333
+ const url = this.businessUrl(`${ENTITIES.EHEmployee.path}/${employeeId}`);
334
334
  return this.fetchAndParse(url, async (r) => {
335
- return pickFields(await r.json(), ENTITIES.EHAuEmployee.fields);
335
+ return pickFields(await r.json(), ENTITIES.EHEmployee.fields);
336
336
  });
337
337
  }, this.restrictedPersistOpt);
338
338
  }
package/dist/types.js CHANGED
@@ -111,7 +111,7 @@ export const 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: EMPLOYEE_FIELDS, path: 'employee/unstructured', apiRef: 'employee/au-employee--get-employees', apiRefById: 'employee/au-employee--get-employee-by-id' },
114
+ EHEmployee: { 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": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Employment Hero Payroll API client",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",