@indxsearch/indx-types 2.3.0 → 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/CHANGELOG.md +25 -0
- package/README.md +2 -2
- package/dist/enums.d.ts +0 -1
- package/dist/enums.js +3 -1
- package/dist/problem.d.ts +8 -1
- package/dist/status.d.ts +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 3.0.0
|
|
6
|
+
|
|
7
|
+
### Major Changes
|
|
8
|
+
|
|
9
|
+
- 257de84: `SystemState.Hibernated` (-1) is removed, matching the server: hibernation is no longer a state
|
|
10
|
+
of its own. A hibernated dataset reports `Created` and its status carries `recordsOnDisk > 0`
|
|
11
|
+
(new field, with `fieldsDiscovered` beside it); the library's `Hibernate()` lands in `Loaded`.
|
|
12
|
+
Code switching on `Hibernated` or comparing `systemState === -1` should derive it instead:
|
|
13
|
+
`state === SystemState.Created && recordsOnDisk > 0`.
|
|
14
|
+
|
|
5
15
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
16
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
17
|
|
|
18
|
+
## [2.4.0] - 2026-09-14
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- `rateLimited` in `IndxProblemCode`, with `retryAfterSeconds` on `IndxProblem`: the
|
|
23
|
+
server's anonymous auth endpoints (login, register, password reset) answer 429 with it
|
|
24
|
+
after too many attempts from one address; so do API calls over a key's per-second budget
|
|
25
|
+
(where the operator enabled it), heavy operations beyond the server's concurrency cap, and
|
|
26
|
+
searches beyond its queue.
|
|
27
|
+
|
|
8
28
|
## [2.3.0] - 2026-09-12
|
|
9
29
|
|
|
10
30
|
### Changed
|
|
@@ -40,14 +60,17 @@ First stable release of the v2 line, targeting IndxCloudApi v2 (IndxSearchLib v5
|
|
|
40
60
|
pre-release that shipped under the `next` tag.)
|
|
41
61
|
|
|
42
62
|
### Changed
|
|
63
|
+
|
|
43
64
|
- **BREAKING**: Type definitions target IndxCloudApi v2 (Indx v5).
|
|
44
65
|
- `DataSetListDto` reflects the team model (`name`, `teamName`, `role`).
|
|
45
66
|
|
|
46
67
|
### Added
|
|
68
|
+
|
|
47
69
|
- `LicenseInfo.licenseFileFound` and `ProcessError.timeStampUtc`, matching the
|
|
48
70
|
IndxCloudApi v2 OpenAPI schema exactly (verified field-by-field).
|
|
49
71
|
|
|
50
72
|
### Compatibility
|
|
73
|
+
|
|
51
74
|
- Requires IndxCloudApi v2
|
|
52
75
|
- Zero runtime dependencies (types-only package)
|
|
53
76
|
|
|
@@ -56,6 +79,7 @@ pre-release that shipped under the `next` tag.)
|
|
|
56
79
|
## [1.0.0] - 2026-01-21
|
|
57
80
|
|
|
58
81
|
### Added
|
|
82
|
+
|
|
59
83
|
- Initial release of `@indxsearch/indx-types`
|
|
60
84
|
- Complete TypeScript type definitions for IndxCloudApi v1.0.2
|
|
61
85
|
- `CoverageSetup` interface with all current properties
|
|
@@ -74,6 +98,7 @@ pre-release that shipped under the `next` tag.)
|
|
|
74
98
|
- Apache 2.0 license
|
|
75
99
|
|
|
76
100
|
### Technical Details
|
|
101
|
+
|
|
77
102
|
- Based on official Swagger specification from https://cloud.indx.co/swagger/v1/swagger.json
|
|
78
103
|
- All properties correctly typed with optional modifiers matching API spec
|
|
79
104
|
- `documentKey` correctly typed as `number` (Int32)
|
package/README.md
CHANGED
|
@@ -158,10 +158,10 @@ if (status.systemState === SystemState.Ready) {
|
|
|
158
158
|
|
|
159
159
|
#### Authentication
|
|
160
160
|
|
|
161
|
-
Auth is **bearer-token only
|
|
161
|
+
Auth is **bearer-token only**. Create a token on the Indx Dashboard and pass it as `preAuthenticatedToken`. The email/password login flow is deprecated and being removed.
|
|
162
162
|
|
|
163
163
|
- `ChangePasswordRequest` - Password change payload (`currentPassword`, `newPassword`)
|
|
164
|
-
- `LoginInfo` / `LoginResponse
|
|
164
|
+
- `LoginInfo` / `LoginResponse`, _Deprecated_: legacy email/password login types, being removed in favour of token-only auth.
|
|
165
165
|
|
|
166
166
|
#### Error Types
|
|
167
167
|
- `ParseResult` - JSON parse outcome for a token (progress, record index, error info)
|
package/dist/enums.d.ts
CHANGED
package/dist/enums.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
// Hibernated = -1 was removed Sep 2026 together with the server's: hibernation is a position in
|
|
2
|
+
// the pipeline, not a state. A hibernated dataset reports Created with recordsOnDisk > 0 in its
|
|
3
|
+
// status; the library's Hibernate() lands in Loaded.
|
|
1
4
|
export var SystemState;
|
|
2
5
|
(function (SystemState) {
|
|
3
|
-
SystemState[SystemState["Hibernated"] = -1] = "Hibernated";
|
|
4
6
|
SystemState[SystemState["Created"] = 0] = "Created";
|
|
5
7
|
SystemState[SystemState["Loading"] = 1] = "Loading";
|
|
6
8
|
SystemState[SystemState["Loaded"] = 2] = "Loaded";
|
package/dist/problem.d.ts
CHANGED
|
@@ -11,8 +11,13 @@
|
|
|
11
11
|
* `currentState`, `allowedStates` and `retryable`; when retryable (Loading / Indexing) the
|
|
12
12
|
* response also has a `Retry-After` header.
|
|
13
13
|
* - `shadowBusy` (409): a field-configuration or replace build is in progress; try again later.
|
|
14
|
+
* - `rateLimited` (429): too many attempts from this address on an anonymous auth endpoint
|
|
15
|
+
* (login, register, password reset); this API key exceeded its per-second budget where the
|
|
16
|
+
* operator enabled per-key limits; or too many calls from this address carried no bearer token
|
|
17
|
+
* that validates (missing, expired or invalid). Carries `retryAfterSeconds` and a `Retry-After`
|
|
18
|
+
* header; wait that long and retry.
|
|
14
19
|
*/
|
|
15
|
-
export type IndxProblemCode = 'invalidArgument' | 'invalidDatasetName' | 'loadFailed' | 'operationFailed' | 'unknownFilter' | 'invalidCredentials' | 'emailNotConfirmed' | 'insufficientRole' | 'datasetNotFound' | 'documentNotFound' | 'teamNotFound' | 'invalidState' | 'shadowBusy';
|
|
20
|
+
export type IndxProblemCode = 'invalidArgument' | 'invalidDatasetName' | 'loadFailed' | 'operationFailed' | 'unknownFilter' | 'invalidCredentials' | 'emailNotConfirmed' | 'insufficientRole' | 'datasetNotFound' | 'documentNotFound' | 'teamNotFound' | 'invalidState' | 'shadowBusy' | 'rateLimited';
|
|
16
21
|
/**
|
|
17
22
|
* An Indx error response body (`application/problem+json`, RFC 9457) with the `code`
|
|
18
23
|
* extension every endpoint adds. 401 from the JWT middleware comes without a body.
|
|
@@ -36,6 +41,8 @@ export interface IndxProblem {
|
|
|
36
41
|
retryable?: boolean;
|
|
37
42
|
/** `invalidState` in the Error state: the engine's error message. */
|
|
38
43
|
errorMessage?: string;
|
|
44
|
+
/** `rateLimited` only: seconds until the window opens again (also the `Retry-After` header). */
|
|
45
|
+
retryAfterSeconds?: number;
|
|
39
46
|
/** Registration / password endpoints: per-field validation messages. */
|
|
40
47
|
errors?: string[];
|
|
41
48
|
}
|
package/dist/status.d.ts
CHANGED
|
@@ -31,6 +31,11 @@ export interface SystemStatus {
|
|
|
31
31
|
version?: string | null;
|
|
32
32
|
timeOfInstanceCreation: string;
|
|
33
33
|
timeOfLastIndexBuild: string;
|
|
34
|
+
/** Records the store holds for this dataset, readable without waking it. Created with
|
|
35
|
+
* recordsOnDisk > 0 is what "hibernated" means since Hibernated left SystemState. */
|
|
36
|
+
recordsOnDisk: number;
|
|
37
|
+
/** Fields in the stored field configuration; 0 = not analyzed. */
|
|
38
|
+
fieldsDiscovered: number;
|
|
34
39
|
shadowBuildInProgress: boolean;
|
|
35
40
|
shadowBuildStartedUtc?: string | null;
|
|
36
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indxsearch/indx-types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "TypeScript type definitions for Indx v2. Provides complete types for search queries, filters, boosts, results, and system status based on the official Swagger specification.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"indx",
|