@onlyworlds/sdk 4.120.0 → 4.121.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/dist/index.js CHANGED
@@ -876,7 +876,7 @@ var OwV2Client = class {
876
876
  compact: policy.compact,
877
877
  lens: policy.lens
878
878
  });
879
- return this.request("GET", `/character/${characterId}/context`, { query });
879
+ return this.request("GET", `/character/${characterId}/context`, { query, worldRead: true });
880
880
  }
881
881
  /**
882
882
  * Cursor-walk every page of a type. Politeness: uses config pageSize. On a client with `world`
@@ -1908,7 +1908,8 @@ var OwV2Client = class {
1908
1908
  }
1909
1909
  /**
1910
1910
  * POST /account/worlds/{id}/keys -- mint a world key, `scope` `'write'` (the default) or
1911
- * `'read'`, `name` as the key list shows it (at most 255 characters). The full key comes back
1911
+ * `'read'`, `name` as the key list shows it (trimmed, at most 80 characters, else a 422; null or blank: no
1912
+ * name). The full key comes back
1912
1913
  * once in `key`. The owner mints a world key; a member mints their own member key, 409
1913
1914
  * `pin_required` (`err.isPinRequired`) for a write key while the account has no PIN. Account
1914
1915
  * token only; no Idempotency-Key. `keep: true` keeps the key across a sign-out: revoking the token
@@ -2054,14 +2055,14 @@ var OwV2Client = class {
2054
2055
  const worldRead = opts.auth !== false && opts.worldRead === true && method.toUpperCase() === "GET";
2055
2056
  const accountToken = opts.auth !== false && this.keyKind === "account" ? opts.accountToken : void 0;
2056
2057
  if (opts.auth !== false && this.keyKind === "none" && !(worldRead && this.world !== void 0)) {
2057
- throw new TypeError(`${method} ${path} needs a key, and this client holds none: without one, only health, previewJoin, redeemJoin and signInWithPassword work, and list, listAll, get and getWorld with \`world\` set`);
2058
+ throw new TypeError(`${method} ${path} needs a key, and this client holds none: without one, only health, previewJoin, redeemJoin and signInWithPassword work, and list, listAll, get, getWorld and draught with \`world\` set`);
2058
2059
  }
2059
2060
  if (opts.auth !== false && this.keyKind === "account" && !ACCOUNT_ROUTE.test(path)) {
2060
2061
  if (!worldRead && accountToken === void 0) {
2061
- throw new TypeError(`${method} ${path} needs a world key: an account token sends the /account routes, worldLenses, setMyLenses and members, and with \`world\` set reads a world through list, listAll, get and getWorld only. Nothing was sent.`);
2062
+ throw new TypeError(`${method} ${path} needs a world key: an account token sends the /account routes, worldLenses, setMyLenses and members, and with \`world\` set reads a world through list, listAll, get, getWorld and draught only. Nothing was sent.`);
2062
2063
  }
2063
2064
  if (worldRead && this.world === void 0) {
2064
- throw new TypeError(`${method} ${path}: an account token reads a world only with \`world\` set (new OwV2Client({ apiKey, world })), through list, listAll, get and getWorld. Nothing was sent.`);
2065
+ throw new TypeError(`${method} ${path}: an account token reads a world only with \`world\` set (new OwV2Client({ apiKey, world })), through list, listAll, get, getWorld and draught. Nothing was sent.`);
2065
2066
  }
2066
2067
  if (accountToken === "world" && this.world === void 0) {
2067
2068
  throw new TypeError(`${method} ${path}: an account token names the world it sends to with \`world\`: set it (new OwV2Client({ apiKey, world })). Nothing was sent.`);
@@ -2315,10 +2316,10 @@ var CLIENT_CONFIG_KEYS = ["apiKey", "apiPin", "baseUrl", "pageSize", "changesPag
2315
2316
  function worldOf(value, keyKind) {
2316
2317
  if (value === void 0) return void 0;
2317
2318
  if (typeof value !== "string" || value.trim() === "") {
2318
- throw new TypeError(`OwV2Client: world is a world's id, a non-empty string; got ${JSON.stringify(value) ?? String(value)}. With it, an account token or no key reads that world through list, listAll, get and getWorld.`);
2319
+ throw new TypeError(`OwV2Client: world is a world's id, a non-empty string; got ${JSON.stringify(value) ?? String(value)}. With it, an account token or no key reads that world through list, listAll, get, getWorld and draught.`);
2319
2320
  }
2320
2321
  if (keyKind !== "account" && keyKind !== "none") {
2321
- throw new TypeError("OwV2Client: a world key reads its own world; `world` is for an account token or no key, which read the world it names through list, listAll, get and getWorld.");
2322
+ throw new TypeError("OwV2Client: a world key reads its own world; `world` is for an account token or no key, which read the world it names through list, listAll, get, getWorld and draught.");
2322
2323
  }
2323
2324
  return value;
2324
2325
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.120.0",
3
+ "version": "4.121.1",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {