@onlyworlds/sdk 4.26.0 → 4.27.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
@@ -5,6 +5,14 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.27.0] — 2026-10-16
9
+
10
+ ### Added
11
+ - `OwApiError.isIdempotencyInFlight` (keel #307, D105): a request with the same Idempotency-Key is still
12
+ running (409 `idempotency_in_flight`, `retryAfter` 1). Nothing was written by this one; send again with
13
+ the same key and body after `retryAfter` and it replays the first answer. `isIdempotencyConflict` stays
14
+ the different-body case only. The client still does not retry for you.
15
+
8
16
  ## [4.26.0] — 2026-10-15
9
17
 
10
18
  ### Added
package/dist/index.d.ts CHANGED
@@ -2394,6 +2394,13 @@ declare class OwApiError extends Error {
2394
2394
  * conflict: keel also answers 409 `id_conflict` (see isIdConflict).
2395
2395
  */
2396
2396
  get isIdempotencyConflict(): boolean;
2397
+ /**
2398
+ * A request with this Idempotency-Key is still running (409 `idempotency_in_flight`, keel
2399
+ * #307, D105): two sends of one create or bulk overlapped. Nothing was written by this one.
2400
+ * Wait `retryAfter` seconds (keel sends 1) and send again with the SAME key and body: once
2401
+ * the first has answered, that retry replays its answer. Not a key conflict (see above).
2402
+ */
2403
+ get isIdempotencyInFlight(): boolean;
2397
2404
  /**
2398
2405
  * The id is already taken (409 `id_conflict`): a create with an id that exists
2399
2406
  * (keel D39), or a PUT whose id belongs to another world (D70). Retrying will not
package/dist/index.js CHANGED
@@ -26,6 +26,15 @@ var OwApiError = class extends Error {
26
26
  get isIdempotencyConflict() {
27
27
  return this.status === 409 && this.code === "idempotency_error";
28
28
  }
29
+ /**
30
+ * A request with this Idempotency-Key is still running (409 `idempotency_in_flight`, keel
31
+ * #307, D105): two sends of one create or bulk overlapped. Nothing was written by this one.
32
+ * Wait `retryAfter` seconds (keel sends 1) and send again with the SAME key and body: once
33
+ * the first has answered, that retry replays its answer. Not a key conflict (see above).
34
+ */
35
+ get isIdempotencyInFlight() {
36
+ return this.status === 409 && this.code === "idempotency_in_flight";
37
+ }
29
38
  /**
30
39
  * The id is already taken (409 `id_conflict`): a create with an id that exists
31
40
  * (keel D39), or a PUT whose id belongs to another world (D70). Retrying will not
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.26.0",
3
+ "version": "4.27.0",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {