@markwharton/eh-payroll 2.1.0 → 2.1.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/README.md +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -139,6 +139,8 @@ const client = new EHClient({
|
|
|
139
139
|
});
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
+
`EHConfig` extends `ClientConfig` from api-core, which provides the `baseUrl`, `onRequest`, and `retry` fields. `apiKey`, `businessId`, `region`, `cache`, and `rateLimitPerSecond` are EH-specific.
|
|
143
|
+
|
|
142
144
|
### Cache TTLs
|
|
143
145
|
|
|
144
146
|
| Cache Key | Default TTL |
|
|
@@ -154,7 +156,7 @@ const client = new EHClient({
|
|
|
154
156
|
|
|
155
157
|
### Rate Limiting
|
|
156
158
|
|
|
157
|
-
The client enforces a sliding-window rate limit of 5 requests per second (the [API limit](https://api.keypay.com.au/australia/guides/Usage.html)). All outbound requests pass through the rate limiter automatically. Set `rateLimitPerSecond: 0` in config to disable (useful for tests).
|
|
159
|
+
The client enforces a sliding-window rate limit of 5 requests per second (the [API limit](https://api.keypay.com.au/australia/guides/Usage.html)). All outbound requests pass through the rate limiter automatically. Set `rateLimitPerSecond: 0` in config to disable (useful for tests). The `RateLimiter` class is provided by api-core and operates per-instance (see Known Limitations in the root README).
|
|
158
160
|
|
|
159
161
|
### Retry
|
|
160
162
|
|
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export { AU_EMPLOYEE_OPERATIONAL_FIELDS, AU_EMPLOYEE_PII_FIELDS, AU_EMPLOYEE_FIE
|
|
|
25
25
|
export type { EHAuEmployee } from './employee-types.generated.js';
|
|
26
26
|
export { buildBasicAuthHeader } from './utils.js';
|
|
27
27
|
export { ok, err, getErrorMessage, pickFields, RateLimiter } from '@markwharton/api-core';
|
|
28
|
-
export type { Result, RetryConfig, OnRequestCallback,
|
|
28
|
+
export type { Result, RetryConfig, OnRequestCallback, ClientConfig } from '@markwharton/api-core';
|
|
29
29
|
export { EH_API_BASE, EH_REGION_URLS } from './constants.js';
|
|
30
30
|
export type { EHRegion } from './constants.js';
|
|
31
31
|
export { EHError, parseEHErrorResponse } from './errors.js';
|
package/dist/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Based on the API reference and KeyPay .NET SDK models.
|
|
6
6
|
*/
|
|
7
7
|
import type { EHRegion } from './constants.js';
|
|
8
|
-
import type { RetryConfig,
|
|
8
|
+
import type { RetryConfig, ClientConfig } from '@markwharton/api-core';
|
|
9
9
|
/**
|
|
10
10
|
* Cache configuration for EHClient
|
|
11
11
|
*
|
|
@@ -35,7 +35,7 @@ export type EHRetryConfig = RetryConfig;
|
|
|
35
35
|
/**
|
|
36
36
|
* Employment Hero Payroll configuration for API access
|
|
37
37
|
*/
|
|
38
|
-
export interface EHConfig extends
|
|
38
|
+
export interface EHConfig extends ClientConfig {
|
|
39
39
|
/** API key for authentication (used as Basic Auth username) */
|
|
40
40
|
apiKey: string;
|
|
41
41
|
/** Business ID to operate on */
|