@onlyworlds/sdk 4.147.0 → 4.149.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,18 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.149.0] - 2026-11-10
9
+
10
+ ### Changed
11
+
12
+ - **`lenses_from` can be `none`** on `OwMe` and `OwMember`: a member or seat that never chose its lenses and that nothing brings a lens to (no Character, or Titles that name none), told apart from `chosen`, which an empty list chosen on purpose still reads. What a row reads is unchanged; the owner's row and a removed row are always `chosen`. A TypeScript switch over the field gains a case.
13
+
14
+ ## [4.148.0] - 2026-11-10
15
+
16
+ ### Added
17
+
18
+ - **A file on an element can be an image**: `OwFileKind` gains `png`, `jpg`, `webp` and `avif`, and `FILE_EXTENSIONS` (so `fileKindOf`, `createFileTicket` and `uploadFile`) reads `.png`, `.jpg`, `.jpeg` (kind `jpg`), `.webp` and `.avif`, as onlyworlds.com now takes them. `uploadFile(type, id, file)` with `screen.png` sends instead of refusing before the request. An image file is private to the element's readers like every file, and is not the element's picture (`image_url`). `.svg` and `.gif` are still refused before sending.
19
+
8
20
  ## [4.147.0] - 2026-11-10
9
21
 
10
22
  ### Added
package/dist/index.d.ts CHANGED
@@ -3022,8 +3022,13 @@ interface OwMe {
3022
3022
  * and no policy.
3023
3023
  */
3024
3024
  lenses: string[];
3025
- /** Where `lenses` comes from: `chosen` (your own list, empty for none) or `titles` (you chose none, and your Character's Titles bring these). Saving a list makes it your choice. */
3026
- lenses_from: 'chosen' | 'titles';
3025
+ /**
3026
+ * Where `lenses` comes from: `chosen` (your own list; an empty one is a choice of none), `titles`
3027
+ * (you never chose, and your Character's Titles bring these) or `none` (you never chose and nothing
3028
+ * brings you a lens: no Character, or Titles that name none; `lenses` is empty). The owner's is
3029
+ * always `chosen`. Saving a list makes it your choice.
3030
+ */
3031
+ lenses_from: 'chosen' | 'titles' | 'none';
3027
3032
  /**
3028
3033
  * Served only, never written: present only when `lenses` was served with a lens left out, one this
3029
3034
  * key cannot see; then it names `lenses`. Saving the list you were shown keeps that lens where it stands.
@@ -3155,8 +3160,13 @@ interface OwMember {
3155
3160
  * left out of what it is shown.
3156
3161
  */
3157
3162
  lenses: string[];
3158
- /** Where `lenses` comes from: `chosen` (the row's own list, empty for none) or `titles` (it chose none, and its Character's Titles bring these). */
3159
- lenses_from: 'chosen' | 'titles';
3163
+ /**
3164
+ * Where `lenses` comes from: `chosen` (the row's own list; an empty one is a choice of none),
3165
+ * `titles` (it never chose, and its Character's Titles bring these) or `none` (it never chose and
3166
+ * nothing brings it a lens: no Character, or Titles that name none; `lenses` is empty). The owner
3167
+ * row and a removed row are always `chosen`.
3168
+ */
3169
+ lenses_from: 'chosen' | 'titles' | 'none';
3160
3170
  /**
3161
3171
  * Agent rows only: who answers for this AI, as the roster names them: the sponsor's membership id
3162
3172
  * (the `id` of their row here), `owner` when the world's owner answers for it, or null for a seat
@@ -3885,12 +3895,14 @@ interface OwUploadedImage {
3885
3895
  [k: string]: unknown;
3886
3896
  }
3887
3897
  /**
3888
- * What a file on an element can be (keel `FileKind`): text (`txt`, `md`, `json`, `csv`,
3889
- * `yaml`, `toml`), `pdf`, and `zip` only as a world's own bundle. The upload host checks each
3890
- * against the file's first bytes. A file's name ends in its kind's extension; `.yml` counts as
3891
- * yaml and `.markdown` as md.
3898
+ * What a file on an element can be: text (`txt`, `md`, `json`, `csv`, `yaml`, `toml`), `pdf`,
3899
+ * `zip` only as a world's own bundle, and an image (`png`, `jpg`, `webp`, `avif`; no svg or gif).
3900
+ * The upload host checks each against the file's first bytes. A file's name ends in its kind's
3901
+ * extension; `.yml` counts as yaml, `.markdown` as md and `.jpeg` as jpg. An image file is private
3902
+ * to the element's readers like any file and is served as a download, not as an element's
3903
+ * picture (that is `image_url`).
3892
3904
  */
3893
- type OwFileKind = 'pdf' | 'txt' | 'md' | 'json' | 'csv' | 'yaml' | 'toml' | 'zip';
3905
+ type OwFileKind = 'pdf' | 'txt' | 'md' | 'json' | 'csv' | 'yaml' | 'toml' | 'zip' | 'png' | 'jpg' | 'webp' | 'avif';
3894
3906
  /** Who added a file. */
3895
3907
  interface OwFileAddedBy {
3896
3908
  /** A member's or a seat's name; the owner's username for the owner's keys. */
@@ -5063,7 +5075,7 @@ declare class OwV2Client {
5063
5075
  * (the ticket's file is already stored: an earlier send with this ticket succeeded, so the
5064
5076
  * file is there), 413 `too_large`, 415 `unsupported_type` (the bytes are not the kind:
5065
5077
  * a pdf must start as one, a text file must be UTF-8 with no NUL in its first 8 KB, a zip
5066
- * must be a world's own bundle; nothing is stored and the ticket is still unspent), 502
5078
+ * must be a world's own bundle, an image must be the kind its first bytes say; nothing is stored and the ticket is still unspent), 502
5067
5079
  * `write_failed` (nothing stored; the ticket is still unspent). A ticket is spent once the
5068
5080
  * upload succeeds: another file needs a new one.
5069
5081
  */
@@ -5658,8 +5670,8 @@ declare class OwV2Client {
5658
5670
  }): Promise<T>;
5659
5671
  }
5660
5672
  /**
5661
- * Every extension a file on an element may end in, to the kind it gives: keel's NAME_EXTS
5662
- * (files/service.py), `.yml` and `.markdown` included. A file picker's accept list is
5673
+ * Every extension a file on an element may end in, to the kind it gives, as onlyworlds.com reads
5674
+ * a name: `.yml`, `.markdown` and `.jpeg` included. A file picker's accept list is
5663
5675
  * `Object.keys(FILE_EXTENSIONS).map((e) => '.' + e)`.
5664
5676
  */
5665
5677
  declare const FILE_EXTENSIONS: Readonly<Record<string, OwFileKind>>;
package/dist/index.js CHANGED
@@ -1428,7 +1428,7 @@ var OwV2Client = class {
1428
1428
  * (the ticket's file is already stored: an earlier send with this ticket succeeded, so the
1429
1429
  * file is there), 413 `too_large`, 415 `unsupported_type` (the bytes are not the kind:
1430
1430
  * a pdf must start as one, a text file must be UTF-8 with no NUL in its first 8 KB, a zip
1431
- * must be a world's own bundle; nothing is stored and the ticket is still unspent), 502
1431
+ * must be a world's own bundle, an image must be the kind its first bytes say; nothing is stored and the ticket is still unspent), 502
1432
1432
  * `write_failed` (nothing stored; the ticket is still unspent). A ticket is spent once the
1433
1433
  * upload succeeds: another file needs a new one.
1434
1434
  */
@@ -2510,7 +2510,12 @@ var FILE_EXTENSIONS = Object.freeze({
2510
2510
  yaml: "yaml",
2511
2511
  yml: "yaml",
2512
2512
  toml: "toml",
2513
- zip: "zip"
2513
+ zip: "zip",
2514
+ png: "png",
2515
+ jpg: "jpg",
2516
+ jpeg: "jpg",
2517
+ webp: "webp",
2518
+ avif: "avif"
2514
2519
  });
2515
2520
  function fileKindOf(name) {
2516
2521
  const base = name.split(/[\\/]/).pop() ?? "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.147.0",
3
+ "version": "4.149.0",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {