aves-sdk 5.0.0 → 5.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/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ <a id="v5.0.1"></a>
9
+ ## [5.0.1] - 2026-10-21
10
+
11
+ Typed master record responses, a safe `timeoutMs`, and no empty error messages. No API change.
12
+
13
+ ### Fixed
14
+
15
+ - **Master record responses are typed again.** Since 5.0.0 `MasterRecordDetailResponse`, `ManageMasterRecordRS` and `SearchMasterRecordRS` items were published as `{ [x: Uncapitalize<string>]: any }`, because `createApiValidationSchema` returned `Schema.Schema.AnyNoContext`. It now declares the wire struct it builds (encoded input fields under their wire keys, server-only overrides replacing their twins), so `result.data.recordCode`, `email`, `modifiedDate`, `financialDetail.currencyCode`, … have their real types, as in 4.x. Pinned in `src/types.test-d.ts` (no index signature, exact field types). Declarations: 404 kB → 467 kB.
16
+ - **`timeoutMs` is checked when the client is built.** Effect's `Duration.millis` reads a string as nanoseconds and `NaN` / a negative value as 0, so `timeoutMs: "30000"` (typical when read from an env var, and accepted by 1.x through `setTimeout`) made every request time out at once. A numeric string is now read as milliseconds; anything that is not a positive number throws `AvesValidationError` from `createAvesClient` / `new AvesClient` / `avesClientLayer` / `makeAvesRuntime`.
17
+ - **`AvesApiError.message` is never empty.** A non-OK `RsStatus` without `ErrorDescription` now reads `AVES responded with status ERROR (code 7)`, and an HTTP error with an empty body `AVES responded with HTTP 503`, instead of `""`.
18
+
8
19
  <a id="v5.0.0"></a>
9
20
  ## [5.0.0] - 2026-08-24
10
21
 
package/README.md CHANGED
@@ -118,7 +118,7 @@ createAvesClient(options, deps?)
118
118
  | `hostID` | 6-digit host id |
119
119
  | `xtoken` | Auth token |
120
120
  | `languageCode` | Optional 2-digit language code |
121
- | `timeoutMs` | Optional request timeout (default 30000) |
121
+ | `timeoutMs` | Optional request timeout in milliseconds (default 30000). A numeric string (e.g. from an env var) is accepted; any other non-positive value throws `AvesValidationError` when the client is created |
122
122
 
123
123
  Optional DI (tests / custom HTTP):
124
124
 
package/dist/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ <a id="v5.0.1"></a>
9
+ ## [5.0.1] - 2026-10-21
10
+
11
+ Typed master record responses, a safe `timeoutMs`, and no empty error messages. No API change.
12
+
13
+ ### Fixed
14
+
15
+ - **Master record responses are typed again.** Since 5.0.0 `MasterRecordDetailResponse`, `ManageMasterRecordRS` and `SearchMasterRecordRS` items were published as `{ [x: Uncapitalize<string>]: any }`, because `createApiValidationSchema` returned `Schema.Schema.AnyNoContext`. It now declares the wire struct it builds (encoded input fields under their wire keys, server-only overrides replacing their twins), so `result.data.recordCode`, `email`, `modifiedDate`, `financialDetail.currencyCode`, … have their real types, as in 4.x. Pinned in `src/types.test-d.ts` (no index signature, exact field types). Declarations: 404 kB → 467 kB.
16
+ - **`timeoutMs` is checked when the client is built.** Effect's `Duration.millis` reads a string as nanoseconds and `NaN` / a negative value as 0, so `timeoutMs: "30000"` (typical when read from an env var, and accepted by 1.x through `setTimeout`) made every request time out at once. A numeric string is now read as milliseconds; anything that is not a positive number throws `AvesValidationError` from `createAvesClient` / `new AvesClient` / `avesClientLayer` / `makeAvesRuntime`.
17
+ - **`AvesApiError.message` is never empty.** A non-OK `RsStatus` without `ErrorDescription` now reads `AVES responded with status ERROR (code 7)`, and an HTTP error with an empty body `AVES responded with HTTP 503`, instead of `""`.
18
+
8
19
  <a id="v5.0.0"></a>
9
20
  ## [5.0.0] - 2026-08-24
10
21