@onlyworlds/sdk 4.42.4 → 4.43.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 +18 -2
- package/dist/index.js +21 -2
- 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.43.0] - 2026-10-22
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `adopt(type, id, member)`: change who made an element, `POST /{type}/{id}/adopt` with `{member}` (keel #427, D141, live 2026-10-22 00:43). `member` is a membership id of the world or `'owner'` (`created_by` null). The owner's key or a co-builder's with its PIN; a contributor's is 403 `not_author` (`isNotAuthor`). Returns the updated element; the write takes a new `change_seq` and the feed carries the element with its new `created_by`.
|
|
12
|
+
- `createWorldLink`'s `maxUses` is documented for person links too (keel #390, D140, live the same hour): 2 to 50 lets in that many accounts, each joining once with the link's role. The client sent it already; the comment said player links only.
|
|
13
|
+
|
|
8
14
|
## [4.42.4] - 2026-10-21
|
|
9
15
|
|
|
10
16
|
### Fixed
|
package/dist/index.d.ts
CHANGED
|
@@ -3028,6 +3028,19 @@ declare class OwV2Client {
|
|
|
3028
3028
|
editLinks(type: ElementType | string, id: string, field: string, edit: OwLinkEdit, opts?: {
|
|
3029
3029
|
ifMatch?: number;
|
|
3030
3030
|
}): Promise<OwElement>;
|
|
3031
|
+
/**
|
|
3032
|
+
* POST /{type}/{id}/adopt with {member} -- change who made an element (keel #427, D141).
|
|
3033
|
+
* `member` is a membership id of this world (a person or an AI seat, as `members()` lists
|
|
3034
|
+
* them) or `'owner'`, which sets `created_by` to null. The world's owner key or a
|
|
3035
|
+
* co-builder's (a person's or a seat's) with its PIN; a contributor's is 403 `not_author`
|
|
3036
|
+
* (`err.isNotAuthor`), a member id the world lacks 404. Nothing else in the element changes,
|
|
3037
|
+
* but the write stamps `changed_by` and `changed_via` and takes a new `change_seq`, so the
|
|
3038
|
+
* feed carries the element with its new `created_by`. Returns the updated element. A
|
|
3039
|
+
* contributor only changes what it created, so this hands it an element someone else made,
|
|
3040
|
+
* or takes one back; when the element is hidden, or the member is a guest, the old and the
|
|
3041
|
+
* new maker may each get a `view` reset on the feed.
|
|
3042
|
+
*/
|
|
3043
|
+
adopt(type: ElementType | string, id: string, member: string | 'owner'): Promise<OwElement>;
|
|
3031
3044
|
/**
|
|
3032
3045
|
* POST /bulk -- up to ~1000 items. Partial success by default (HTTP 200
|
|
3033
3046
|
* always; inspect per-slot numeric `status` + top-level `errors` flag);
|
|
@@ -3332,8 +3345,11 @@ declare class OwV2Client {
|
|
|
3332
3345
|
* whoever opens the link first reads as it, until removed. `preview` (person and player links,
|
|
3333
3346
|
* keel #422) to false: true puts the world's id in the link's path, so a chat that unfurls it
|
|
3334
3347
|
* shows the world's name and picture (the code stays after `#`); true on an agent link is
|
|
3335
|
-
* 422, param `preview`. `maxUses` (player links
|
|
3336
|
-
*
|
|
3348
|
+
* 422, param `preview`. `maxUses` (person and player links; an agent link takes none) to 1, a
|
|
3349
|
+
* link for one. On a person link (keel #390, D140) 2 to 50 lets in that many accounts, each
|
|
3350
|
+
* joining once with the link's role, until every use is taken, it expires or it is revoked;
|
|
3351
|
+
* who already joined stays. On a player link (keel #422 PR 2) 2 to 50 makes a table, one
|
|
3352
|
+
* link that seats that many players, each picking one of
|
|
3337
3353
|
* `characters` (Character ids of the world, in the order a pick screen shows them; a hidden
|
|
3338
3354
|
* one is 422, param `characters`). `characters` empty or left out: each player names a fresh
|
|
3339
3355
|
* Character after themselves. A table takes no `character`, not even `new` (422, param
|
package/dist/index.js
CHANGED
|
@@ -491,6 +491,22 @@ var OwV2Client = class {
|
|
|
491
491
|
async editLinks(type, id, field, edit, opts = {}) {
|
|
492
492
|
return this.request("POST", `/${type}/${id}/links/${field}`, { write: true, body: edit, ifMatch: opts.ifMatch });
|
|
493
493
|
}
|
|
494
|
+
/**
|
|
495
|
+
* POST /{type}/{id}/adopt with {member} -- change who made an element (keel #427, D141).
|
|
496
|
+
* `member` is a membership id of this world (a person or an AI seat, as `members()` lists
|
|
497
|
+
* them) or `'owner'`, which sets `created_by` to null. The world's owner key or a
|
|
498
|
+
* co-builder's (a person's or a seat's) with its PIN; a contributor's is 403 `not_author`
|
|
499
|
+
* (`err.isNotAuthor`), a member id the world lacks 404. Nothing else in the element changes,
|
|
500
|
+
* but the write stamps `changed_by` and `changed_via` and takes a new `change_seq`, so the
|
|
501
|
+
* feed carries the element with its new `created_by`. Returns the updated element. A
|
|
502
|
+
* contributor only changes what it created, so this hands it an element someone else made,
|
|
503
|
+
* or takes one back; when the element is hidden, or the member is a guest, the old and the
|
|
504
|
+
* new maker may each get a `view` reset on the feed.
|
|
505
|
+
*/
|
|
506
|
+
async adopt(type, id, member) {
|
|
507
|
+
if (typeof member !== "string" || member === "") throw new TypeError('adopt: member must be a membership id or "owner"');
|
|
508
|
+
return this.request("POST", `/${type}/${id}/adopt`, { write: true, body: { member } });
|
|
509
|
+
}
|
|
494
510
|
// -- Bulk ----------------------------------------------------------------
|
|
495
511
|
/**
|
|
496
512
|
* POST /bulk -- up to ~1000 items. Partial success by default (HTTP 200
|
|
@@ -1003,8 +1019,11 @@ var OwV2Client = class {
|
|
|
1003
1019
|
* whoever opens the link first reads as it, until removed. `preview` (person and player links,
|
|
1004
1020
|
* keel #422) to false: true puts the world's id in the link's path, so a chat that unfurls it
|
|
1005
1021
|
* shows the world's name and picture (the code stays after `#`); true on an agent link is
|
|
1006
|
-
* 422, param `preview`. `maxUses` (player links
|
|
1007
|
-
*
|
|
1022
|
+
* 422, param `preview`. `maxUses` (person and player links; an agent link takes none) to 1, a
|
|
1023
|
+
* link for one. On a person link (keel #390, D140) 2 to 50 lets in that many accounts, each
|
|
1024
|
+
* joining once with the link's role, until every use is taken, it expires or it is revoked;
|
|
1025
|
+
* who already joined stays. On a player link (keel #422 PR 2) 2 to 50 makes a table, one
|
|
1026
|
+
* link that seats that many players, each picking one of
|
|
1008
1027
|
* `characters` (Character ids of the world, in the order a pick screen shows them; a hidden
|
|
1009
1028
|
* one is 422, param `characters`). `characters` empty or left out: each player names a fresh
|
|
1010
1029
|
* Character after themselves. A table takes no `character`, not even `new` (422, param
|