@indxsearch/indx-types 2.4.0 → 3.1.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 CHANGED
@@ -1,7 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - `SystemStatus` describes a rebuild's outcome: `shadowBuildFinishedUtc` says when the last rebuild ended, and `shadowBuildError` why it failed, if it did. A failed rebuild changes nothing: the dataset keeps serving what it had.
8
+
3
9
  All notable changes to this project will be documented in this file.
4
10
 
11
+ ## 3.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - 257de84: `SystemState.Hibernated` (-1) is removed, matching the server: hibernation is no longer a state
16
+ of its own. A hibernated dataset reports `Created` and its status carries `recordsOnDisk > 0`
17
+ (new field, with `fieldsDiscovered` beside it); the library's `Hibernate()` lands in `Loaded`.
18
+ Code switching on `Hibernated` or comparing `systemState === -1` should derive it instead:
19
+ `state === SystemState.Created && recordsOnDisk > 0`.
20
+
5
21
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
22
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
23
 
@@ -50,14 +66,17 @@ First stable release of the v2 line, targeting IndxCloudApi v2 (IndxSearchLib v5
50
66
  pre-release that shipped under the `next` tag.)
51
67
 
52
68
  ### Changed
69
+
53
70
  - **BREAKING**: Type definitions target IndxCloudApi v2 (Indx v5).
54
71
  - `DataSetListDto` reflects the team model (`name`, `teamName`, `role`).
55
72
 
56
73
  ### Added
74
+
57
75
  - `LicenseInfo.licenseFileFound` and `ProcessError.timeStampUtc`, matching the
58
76
  IndxCloudApi v2 OpenAPI schema exactly (verified field-by-field).
59
77
 
60
78
  ### Compatibility
79
+
61
80
  - Requires IndxCloudApi v2
62
81
  - Zero runtime dependencies (types-only package)
63
82
 
@@ -66,6 +85,7 @@ pre-release that shipped under the `next` tag.)
66
85
  ## [1.0.0] - 2026-01-21
67
86
 
68
87
  ### Added
88
+
69
89
  - Initial release of `@indxsearch/indx-types`
70
90
  - Complete TypeScript type definitions for IndxCloudApi v1.0.2
71
91
  - `CoverageSetup` interface with all current properties
@@ -84,6 +104,7 @@ pre-release that shipped under the `next` tag.)
84
104
  - Apache 2.0 license
85
105
 
86
106
  ### Technical Details
107
+
87
108
  - Based on official Swagger specification from https://cloud.indx.co/swagger/v1/swagger.json
88
109
  - All properties correctly typed with optional modifiers matching API spec
89
110
  - `documentKey` correctly typed as `number` (Int32)
package/README.md CHANGED
@@ -18,7 +18,7 @@ npm install @indxsearch/indx-types
18
18
 
19
19
  ## Version Compatibility
20
20
 
21
- This package (`@indxsearch/indx-types` 2.x) provides types for **Indx v2.0** (IndxSearchLib v5). The shapes are generated from and verified against the live v5 OpenAPI spec.
21
+ This package (`@indxsearch/indx-types` 3.x) provides types for **Indx v2.0** (IndxSearchLib v5). The shapes are generated from and verified against the live v5 OpenAPI spec.
22
22
 
23
23
  ## Usage
24
24
 
@@ -158,10 +158,10 @@ if (status.systemState === SystemState.Ready) {
158
158
 
159
159
  #### Authentication
160
160
 
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.
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` - _Deprecated_ — legacy email/password login types, being removed in favour of token-only auth.
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
@@ -1,5 +1,4 @@
1
1
  export declare enum SystemState {
2
- Hibernated = -1,
3
2
  Created = 0,
4
3
  Loading = 1,
5
4
  Loaded = 2,
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
@@ -13,10 +13,9 @@
13
13
  * - `shadowBusy` (409): a field-configuration or replace build is in progress; try again later.
14
14
  * - `rateLimited` (429): too many attempts from this address on an anonymous auth endpoint
15
15
  * (login, register, password reset); this API key exceeded its per-second budget where the
16
- * operator enabled per-key limits; or the server is at capacity — its cap on concurrent
17
- * heavy operations (load, replace, index, wake-up, batch document changes) is reached, or
18
- * its search queue is full. Carries `retryAfterSeconds` and a `Retry-After` header; wait that
19
- * long and retry.
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.
20
19
  */
21
20
  export type IndxProblemCode = 'invalidArgument' | 'invalidDatasetName' | 'loadFailed' | 'operationFailed' | 'unknownFilter' | 'invalidCredentials' | 'emailNotConfirmed' | 'insufficientRole' | 'datasetNotFound' | 'documentNotFound' | 'teamNotFound' | 'invalidState' | 'shadowBusy' | 'rateLimited';
22
21
  /**
package/dist/status.d.ts CHANGED
@@ -31,6 +31,18 @@ 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;
39
+ /** True while a rebuild on a shadow engine runs. `PUT fields/configuration` and
40
+ * `POST index` on a Ready dataset answer 202 as soon as one is started. */
34
41
  shadowBuildInProgress: boolean;
35
42
  shadowBuildStartedUtc?: string | null;
43
+ /** When the last rebuild ended; null while one runs and before the first. */
44
+ shadowBuildFinishedUtc?: string | null;
45
+ /** Why the last rebuild failed, or null. A failed rebuild swaps nothing in: the dataset
46
+ * keeps serving with the documents and field configuration it had. */
47
+ shadowBuildError?: string | null;
36
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indxsearch/indx-types",
3
- "version": "2.4.0",
3
+ "version": "3.1.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",