@onlyworlds/sdk 4.98.0 → 4.99.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 +6 -0
- package/dist/index.d.ts +9 -4
- package/dist/index.js +11 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.99.0] - 2026-10-28
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`setMyLenses(null)` and `setMemberLenses(world, member, null)`**: `null` puts a lens list back to never chosen, so a seat playing a Character starts with its Titles' lenses again, while an empty list now keeps a seat off them (the API tells the two apart from this release on). On the owner's own list `null` is the empty list. Anything that is neither a list nor `null` is still refused before sending.
|
|
13
|
+
|
|
8
14
|
## [4.98.0] - 2026-10-28
|
|
9
15
|
|
|
10
16
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -3896,7 +3896,10 @@ declare class OwV2Client {
|
|
|
3896
3896
|
setMyCharacter(character: string | null): Promise<OwMe>;
|
|
3897
3897
|
/**
|
|
3898
3898
|
* PUT /me/lenses -- choose the lenses this key's holder starts with: lens ids in order, 0 to 20,
|
|
3899
|
-
* repeats dropped by keel; an empty list is a choice too (the draught then adds no frame)
|
|
3899
|
+
* repeats dropped by keel; an empty list is a choice too (the draught then adds no frame), and keeps
|
|
3900
|
+
* a seat off its Titles' lenses. `null` goes back to never chosen: a seat playing a Character then
|
|
3901
|
+
* starts with its Titles' lenses (`lenses_from` says where a list comes from); on the owner's own
|
|
3902
|
+
* keys `null` is the empty list. Any write
|
|
3900
3903
|
* key of the world, with its PIN, sets its own holder's list: a person member's, an agent seat's, or
|
|
3901
3904
|
* on the owner's keys the owner's own; answers GET /me's body. The draught reads the list whenever it
|
|
3902
3905
|
* is given no lens and no policy. 404 for a lens this key cannot see; 422 `not_a_lens`,
|
|
@@ -3905,7 +3908,7 @@ declare class OwV2Client {
|
|
|
3905
3908
|
* `world` names (`world=<id>`, the Bearer token, no PIN); without `world` set it is a TypeError
|
|
3906
3909
|
* before sending. A world key sends no `world`: the key names its world.
|
|
3907
3910
|
*/
|
|
3908
|
-
setMyLenses(lensIds: string[]): Promise<OwMe>;
|
|
3911
|
+
setMyLenses(lensIds: string[] | null): Promise<OwMe>;
|
|
3909
3912
|
/**
|
|
3910
3913
|
* GET /world/{worldId}/lenses -- every lens in the world this key can see, templates included and
|
|
3911
3914
|
* marked, each with its recipe echoed (`x_lens`, defaults filled in), the Titles it is the default
|
|
@@ -4453,7 +4456,9 @@ declare class OwV2Client {
|
|
|
4453
4456
|
removeSeat(worldId: string, seatId: string): Promise<void>;
|
|
4454
4457
|
/**
|
|
4455
4458
|
* PATCH /account/worlds/{worldId}/members/{memberId} with `lenses` alone -- set the lenses a row
|
|
4456
|
-
* starts with: lens ids in order, 0 to 20, repeats dropped by keel; an empty list is a choice too
|
|
4459
|
+
* starts with: lens ids in order, 0 to 20, repeats dropped by keel; an empty list is a choice too,
|
|
4460
|
+
* and keeps a seat off its Titles' lenses, while `null` puts the row back to never chosen (a seat
|
|
4461
|
+
* playing a Character then starts with its Titles' lenses; for `'owner'`, `null` is the empty list).
|
|
4457
4462
|
* A member sets its own row (any role), an agent's or a player's seat it answers for (its sponsor),
|
|
4458
4463
|
* or any seat as a co-builder; the owner sets any seat, and its own list with `'owner'` as
|
|
4459
4464
|
* `memberId`. Any other row is a 404; the owner naming a person's row is a 422 (a person sets its
|
|
@@ -4466,7 +4471,7 @@ declare class OwV2Client {
|
|
|
4466
4471
|
* (keel's `MemberLenses`), `id` null and `role` and `kind` `owner` for the owner's own list. The body is `{ lenses }` and
|
|
4467
4472
|
* nothing else: a role, Character or sponsor change is not sent here. Needs the client's `ow_a_` token.
|
|
4468
4473
|
*/
|
|
4469
|
-
setMemberLenses(worldId: string, memberId: string, lensIds: string[]): Promise<OwMemberLenses>;
|
|
4474
|
+
setMemberLenses(worldId: string, memberId: string, lensIds: string[] | null): Promise<OwMemberLenses>;
|
|
4470
4475
|
/**
|
|
4471
4476
|
* PUT /{type}/{id}/hidden -- hide an element. The owner's key or a co-builder's
|
|
4472
4477
|
* (a person's or a seat's) with its PIN; hiding a hidden element again changes nothing, and
|
package/dist/index.js
CHANGED
|
@@ -691,7 +691,10 @@ var OwV2Client = class {
|
|
|
691
691
|
}
|
|
692
692
|
/**
|
|
693
693
|
* PUT /me/lenses -- choose the lenses this key's holder starts with: lens ids in order, 0 to 20,
|
|
694
|
-
* repeats dropped by keel; an empty list is a choice too (the draught then adds no frame)
|
|
694
|
+
* repeats dropped by keel; an empty list is a choice too (the draught then adds no frame), and keeps
|
|
695
|
+
* a seat off its Titles' lenses. `null` goes back to never chosen: a seat playing a Character then
|
|
696
|
+
* starts with its Titles' lenses (`lenses_from` says where a list comes from); on the owner's own
|
|
697
|
+
* keys `null` is the empty list. Any write
|
|
695
698
|
* key of the world, with its PIN, sets its own holder's list: a person member's, an agent seat's, or
|
|
696
699
|
* on the owner's keys the owner's own; answers GET /me's body. The draught reads the list whenever it
|
|
697
700
|
* is given no lens and no policy. 404 for a lens this key cannot see; 422 `not_a_lens`,
|
|
@@ -701,8 +704,8 @@ var OwV2Client = class {
|
|
|
701
704
|
* before sending. A world key sends no `world`: the key names its world.
|
|
702
705
|
*/
|
|
703
706
|
async setMyLenses(lensIds) {
|
|
704
|
-
if (!Array.isArray(lensIds)) {
|
|
705
|
-
throw new TypeError("setMyLenses: lensIds is a list of lens ids ([] for none). Nothing was sent.");
|
|
707
|
+
if (lensIds !== null && !Array.isArray(lensIds)) {
|
|
708
|
+
throw new TypeError("setMyLenses: lensIds is a list of lens ids ([] for none, null for never chosen). Nothing was sent.");
|
|
706
709
|
}
|
|
707
710
|
return this.request("PUT", "/me/lenses", { accountToken: "world", body: { lenses: lensIds } });
|
|
708
711
|
}
|
|
@@ -1586,7 +1589,9 @@ var OwV2Client = class {
|
|
|
1586
1589
|
}
|
|
1587
1590
|
/**
|
|
1588
1591
|
* PATCH /account/worlds/{worldId}/members/{memberId} with `lenses` alone -- set the lenses a row
|
|
1589
|
-
* starts with: lens ids in order, 0 to 20, repeats dropped by keel; an empty list is a choice too
|
|
1592
|
+
* starts with: lens ids in order, 0 to 20, repeats dropped by keel; an empty list is a choice too,
|
|
1593
|
+
* and keeps a seat off its Titles' lenses, while `null` puts the row back to never chosen (a seat
|
|
1594
|
+
* playing a Character then starts with its Titles' lenses; for `'owner'`, `null` is the empty list).
|
|
1590
1595
|
* A member sets its own row (any role), an agent's or a player's seat it answers for (its sponsor),
|
|
1591
1596
|
* or any seat as a co-builder; the owner sets any seat, and its own list with `'owner'` as
|
|
1592
1597
|
* `memberId`. Any other row is a 404; the owner naming a person's row is a 422 (a person sets its
|
|
@@ -1603,8 +1608,8 @@ var OwV2Client = class {
|
|
|
1603
1608
|
if (this.keyKind !== "account") {
|
|
1604
1609
|
throw new TypeError("setMemberLenses needs an account token (ow_a_): a world key sets its own holder's list with setMyLenses");
|
|
1605
1610
|
}
|
|
1606
|
-
if (!Array.isArray(lensIds)) {
|
|
1607
|
-
throw new TypeError("setMemberLenses: lensIds is a list of lens ids ([] for none). Nothing was sent.");
|
|
1611
|
+
if (lensIds !== null && !Array.isArray(lensIds)) {
|
|
1612
|
+
throw new TypeError("setMemberLenses: lensIds is a list of lens ids ([] for none, null for never chosen). Nothing was sent.");
|
|
1608
1613
|
}
|
|
1609
1614
|
return this.request(
|
|
1610
1615
|
"PATCH",
|