@onlyworlds/sdk 4.76.2 → 4.77.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,12 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.77.0] - 2026-10-26
9
+
10
+ ### Added
11
+
12
+ - **`isCharacterPlayed`** on `OwApiError`: a delete (or a review's decline) of a Character someone plays on the roster, the world's `owner_character` or a live member's, an AI seat's or a player's, answers 422 `character_played` (`param` id) and deletes nothing. The predicate tells it from a malformed id's 422, which carries the same `param`. The way out is to re-point that member to another Character, or remove the member, then delete.
13
+
8
14
  ## [4.76.2] - 2026-10-25
9
15
 
10
16
  ### Changed
package/dist/index.d.ts CHANGED
@@ -3336,6 +3336,16 @@ declare class OwApiError extends Error {
3336
3336
  * `character_taken` (see isCharacterTaken).
3337
3337
  */
3338
3338
  get isCharacterInvalid(): boolean;
3339
+ /**
3340
+ * delete, or reviewNewElement's decline: the Character is one someone plays on the roster, the
3341
+ * world's `owner_character` or a live member's, an AI seat's or a player's Character (422
3342
+ * `character_played`, `param` id). Nothing was deleted; the message says who plays it, never by
3343
+ * email or username. Re-point that member to another Character (the owner's own through
3344
+ * patchWorld's `owner_character`, a seat's by the owner on the member PATCH, a person's own
3345
+ * through setMyCharacter), or remove the member, then delete. Never true for a malformed id's
3346
+ * 422, which carries the same `param`.
3347
+ */
3348
+ get isCharacterPlayed(): boolean;
3339
3349
  /**
3340
3350
  * redeemJoin: the world already has its 50 live players (422 `world_full`),
3341
3351
  * at any player link, a table's or a link for one's. Nothing is spent; a place frees when the
package/dist/index.js CHANGED
@@ -223,6 +223,18 @@ var OwApiError = class extends Error {
223
223
  get isCharacterInvalid() {
224
224
  return this.status === 422 && this.code === "invalid_request" && this.param === "character";
225
225
  }
226
+ /**
227
+ * delete, or reviewNewElement's decline: the Character is one someone plays on the roster, the
228
+ * world's `owner_character` or a live member's, an AI seat's or a player's Character (422
229
+ * `character_played`, `param` id). Nothing was deleted; the message says who plays it, never by
230
+ * email or username. Re-point that member to another Character (the owner's own through
231
+ * patchWorld's `owner_character`, a seat's by the owner on the member PATCH, a person's own
232
+ * through setMyCharacter), or remove the member, then delete. Never true for a malformed id's
233
+ * 422, which carries the same `param`.
234
+ */
235
+ get isCharacterPlayed() {
236
+ return this.status === 422 && this.code === "character_played";
237
+ }
226
238
  /**
227
239
  * redeemJoin: the world already has its 50 live players (422 `world_full`),
228
240
  * at any player link, a table's or a link for one's. Nothing is spent; a place frees when the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.76.2",
3
+ "version": "4.77.0",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {