@onlyworlds/sdk 4.52.0 → 4.53.1

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/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # For AI agents using @onlyworlds/sdk
2
2
 
3
- **Current as of**: SDK **4.x** · schema-dist **v0.32.2-dist.37** (canonical 00.32.02).
3
+ **Current as of**: SDK **4.x** · schema-dist **v0.32.2-dist.41** (canonical 00.32.02).
4
4
  This line is asserted by `codegen:check` in CI — if the pin moves and this file is not
5
5
  re-read against it, the check fails rather than letting this document rot quietly.
6
6
 
package/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.53.1] - 2026-10-22
9
+
10
+ ### Changed
11
+
12
+ - **Schema repinned to schema-dist v0.32.2-dist.41** (same canonical 00.32.02; the dist now carries the `.owworld` conformance set at `fixtures/owworld/`, 80 cases, with `verdicts.json` and `CaseFolding-15.1.0.txt`, and its folder lint names a `world.json` with an `api` block that git tracks; no schema file moved). The set's two newest cases are `fail-OW-14-crc`, an entry whose bytes fail the CRC its headers declare, and `fail-OW-14-stored-short`, a stored entry holding fewer bytes than it declares. The reader already refused both as `not_openable`, naming the entry, and needed no change. The world-file conformance test reads the set from the vendored dist, so it runs in CI too, where it used to skip; it also checks that every zip on disk has a verdict. The fold table's test and generator read the dist's `CaseFolding-15.1.0.txt`, the same file the SDK held, and the table is unchanged. Folder spec §4.7 is RULED (v0.3.13). Nothing in the published package changes but its version and these documents: `codegen/` does not ship.
13
+
14
+ ## [4.53.0] - 2026-10-22
15
+
16
+ ### Changed
17
+
18
+ - **The last seven options objects refuse an unknown key** too: `patch` and `editLinks` (`ifMatch`; the edit itself is `{add, remove}`), `uploadImage`, `createFileTicket`, `uploadFile`, `createWorldLink` and `createSeat`. With 4.51.0 and 4.52.0 every method of the client that takes an object now names a stray key before anything is sent; a client that drops a key it does not know has no place left.
19
+
8
20
  ## [4.52.0] - 2026-10-22
9
21
 
10
22
  ### Changed
package/SCHEMA.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OnlyWorlds Schema Reference
2
2
 
3
- **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.32.2-dist.37** — canonical schema **00.32.02**, published 2026-10-21.
3
+ **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.32.2-dist.41** — canonical schema **00.32.02**, published 2026-10-22.
4
4
 
5
5
  GENERATED from the canonical schema YAML — do not hand-edit (regenerate: `python codegen/generate_types.py`).
6
6
  Written for both humans and AI agents reading this package locally.
package/dist/index.js CHANGED
@@ -673,6 +673,7 @@ var OwV2Client = class {
673
673
  * it for today's unconditional write.
674
674
  */
675
675
  async patch(type, id, partial, opts = {}) {
676
+ only("patch", opts, ["ifMatch"]);
676
677
  refuseKnownOf(partial, "patch");
677
678
  return this.request("PATCH", `/${type}/${id}/`, { write: true, body: sanitizePayload(partial), ifMatch: opts.ifMatch });
678
679
  }
@@ -692,6 +693,8 @@ var OwV2Client = class {
692
693
  * moves the element too.
693
694
  */
694
695
  async editLinks(type, id, field, edit, opts = {}) {
696
+ only("editLinks", opts, ["ifMatch"]);
697
+ only("editLinks", edit, ["add", "remove"], "The edit is { add?: string[], remove?: string[] }.");
695
698
  return this.request("POST", `/${type}/${id}/links/${field}`, { write: true, body: edit, ifMatch: opts.ifMatch });
696
699
  }
697
700
  /**
@@ -841,6 +844,7 @@ var OwV2Client = class {
841
844
  * needs a new one.
842
845
  */
843
846
  async uploadImage(image, opts = {}) {
847
+ only("uploadImage", opts, ["key", "ticket"]);
844
848
  const ticket = opts.ticket ?? await this.createMediaTicket();
845
849
  const size = typeof Blob !== "undefined" && image instanceof Blob ? image.size : image.byteLength;
846
850
  if (size > ticket.max_bytes) {
@@ -944,6 +948,7 @@ var OwV2Client = class {
944
948
  * `retryAfter`; 503 `media_unavailable`.
945
949
  */
946
950
  async createFileTicket(type, id, req) {
951
+ only("createFileTicket", req, ["name", "kind", "size", "label"]);
947
952
  const { name, size } = req;
948
953
  if (typeof name !== "string" || name.trim() === "") {
949
954
  throw new TypeError("createFileTicket needs the file's name, with its extension");
@@ -984,6 +989,7 @@ var OwV2Client = class {
984
989
  * upload succeeds: another file needs a new one.
985
990
  */
986
991
  async uploadFile(type, id, file, opts = {}) {
992
+ only("uploadFile", opts, ["name", "kind", "label", "ticket", "onProgress"]);
987
993
  const size = typeof Blob !== "undefined" && file instanceof Blob ? file.size : file.byteLength;
988
994
  let ticket = opts.ticket;
989
995
  if (!ticket) {
@@ -1249,6 +1255,7 @@ var OwV2Client = class {
1249
1255
  * `not_found` (`err.isNotFound`). A world key is a TypeError before anything is sent.
1250
1256
  */
1251
1257
  async createWorldLink(worldId, opts) {
1258
+ only("createWorldLink", opts, ["reader", "role", "days", "inviterName", "withCharacter", "character", "preview", "maxUses", "characters"]);
1252
1259
  if (this.keyKind !== "account") {
1253
1260
  throw new TypeError("createWorldLink needs an account token (ow_a_): only the world's owner makes links");
1254
1261
  }
@@ -1300,6 +1307,7 @@ var OwV2Client = class {
1300
1307
  * its key: rekeySeat gives it a new one (or removeSeat and make another). Needs the client's `ow_a_` token.
1301
1308
  */
1302
1309
  async createSeat(worldId, opts) {
1310
+ only("createSeat", opts, ["name", "role", "character"]);
1303
1311
  if (this.keyKind !== "account") {
1304
1312
  throw new TypeError("createSeat needs an account token (ow_a_): a seat is made by the person who answers for it");
1305
1313
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.52.0",
3
+ "version": "4.53.1",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {