@contrail/documents 1.13.0-alpha.7535b68 → 1.13.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 +1 -0
- package/lib/sort-order-errors.d.ts +4 -2
- package/lib/sort-order-errors.js +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
10
10
|
### Added
|
|
11
11
|
|
|
12
12
|
- `SortOrderErrorCode.SORT_MODE_MISMATCH` / `SortOrderErrorMessage.SORT_MODE_MISMATCH` — returned when an ordering write targets a representation the document isn't using (a `sortIndex` write to an `array`-mode document, or a sort-order-array write to an `elementIndexing` document). The response's `currentSortMode` says which representation the document is on, so a client can switch and retry.
|
|
13
|
+
- `SortOrderErrorCode.SORT_INDEX_NOT_USABLE` / `SortOrderErrorMessage.SORT_INDEX_NOT_USABLE` — returned when a `sortIndex` write to an `elementIndexing` document carries a value that is not a non-empty string. Such a value would leave the document claiming `elementIndexing` while the read path silently fell back to sort-order-array order.
|
|
13
14
|
- `DOCUMENT_SORT_MODES` — the sort modes as a runtime array, for validators that need to check a value against the same source as the `DocumentSortMode` type.
|
|
14
15
|
|
|
15
16
|
## [1.12.0] - 2026-07-21
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export declare enum SortOrderErrorCode {
|
|
2
2
|
SORT_MIGRATION_IN_PROGRESS = "SORT_MIGRATION_IN_PROGRESS",
|
|
3
|
-
SORT_MODE_MISMATCH = "SORT_MODE_MISMATCH"
|
|
3
|
+
SORT_MODE_MISMATCH = "SORT_MODE_MISMATCH",
|
|
4
|
+
SORT_INDEX_NOT_USABLE = "SORT_INDEX_NOT_USABLE"
|
|
4
5
|
}
|
|
5
6
|
export declare enum SortOrderErrorMessage {
|
|
6
7
|
SORT_MIGRATION_IN_PROGRESS = "Sort order is being migrated for this document; editing is briefly locked",
|
|
7
|
-
SORT_MODE_MISMATCH = "Ordering write does not match the document's sort mode"
|
|
8
|
+
SORT_MODE_MISMATCH = "Ordering write does not match the document's sort mode",
|
|
9
|
+
SORT_INDEX_NOT_USABLE = "sortIndex must be a non-empty string"
|
|
8
10
|
}
|
package/lib/sort-order-errors.js
CHANGED
|
@@ -5,9 +5,11 @@ var SortOrderErrorCode;
|
|
|
5
5
|
(function (SortOrderErrorCode) {
|
|
6
6
|
SortOrderErrorCode["SORT_MIGRATION_IN_PROGRESS"] = "SORT_MIGRATION_IN_PROGRESS";
|
|
7
7
|
SortOrderErrorCode["SORT_MODE_MISMATCH"] = "SORT_MODE_MISMATCH";
|
|
8
|
+
SortOrderErrorCode["SORT_INDEX_NOT_USABLE"] = "SORT_INDEX_NOT_USABLE";
|
|
8
9
|
})(SortOrderErrorCode || (exports.SortOrderErrorCode = SortOrderErrorCode = {}));
|
|
9
10
|
var SortOrderErrorMessage;
|
|
10
11
|
(function (SortOrderErrorMessage) {
|
|
11
12
|
SortOrderErrorMessage["SORT_MIGRATION_IN_PROGRESS"] = "Sort order is being migrated for this document; editing is briefly locked";
|
|
12
13
|
SortOrderErrorMessage["SORT_MODE_MISMATCH"] = "Ordering write does not match the document's sort mode";
|
|
14
|
+
SortOrderErrorMessage["SORT_INDEX_NOT_USABLE"] = "sortIndex must be a non-empty string";
|
|
13
15
|
})(SortOrderErrorMessage || (exports.SortOrderErrorMessage = SortOrderErrorMessage = {}));
|