@onlyworlds/sdk 4.34.0 → 4.35.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 +8 -2
- package/dist/index.js +5 -1
- 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.35.0] - 2026-10-20
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`createWorldLink(worldId, { preview })`** and `preview` on `OwWorldLink` (keel #422 PR 1, live 2026-10-20): a person or player link with `preview: true` is `/join/<world_id>#<code>`, so a chat that unfurls it shows the world's name and picture; the code stays in the fragment. Absent means off, as keel rules for the API; `true` on an agent link is 422, param `preview`. The wire gate failed on production's document until this release.
|
|
13
|
+
|
|
8
14
|
## [4.34.0] - 2026-10-20
|
|
9
15
|
|
|
10
16
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -2249,6 +2249,8 @@ interface OwWorldLink {
|
|
|
2249
2249
|
/** 0 or 1: a link works once. */
|
|
2250
2250
|
uses: number;
|
|
2251
2251
|
status: 'pending' | 'used' | 'revoked' | 'expired';
|
|
2252
|
+
/** Whether the link shows the world's name and picture when it is pasted into a chat (keel #422): then the link is `/join/<world_id>#<code>`, else `/join#<code>`. Never on an agent link. */
|
|
2253
|
+
preview?: boolean;
|
|
2252
2254
|
/** A player link only: the Character the player reads as; null while a link for a fresh Character is unused. `name` is null if that Character was deleted (the redeem then makes a fresh one). */
|
|
2253
2255
|
character?: {
|
|
2254
2256
|
id: string;
|
|
@@ -2260,7 +2262,7 @@ interface OwWorldLink {
|
|
|
2260
2262
|
interface OwCreatedWorldLink extends OwWorldLink {
|
|
2261
2263
|
/** The `ow_j_` join code. Shown once; it can never be read again. */
|
|
2262
2264
|
code: string;
|
|
2263
|
-
/** The invite link: the /join page with the code after `#`. */
|
|
2265
|
+
/** The invite link: the /join page (`/join/<world_id>` when `preview` is on) with the code after `#`. */
|
|
2264
2266
|
link: string;
|
|
2265
2267
|
/** The one line to send: who invites, to which world, and the link. */
|
|
2266
2268
|
line: string;
|
|
@@ -3142,7 +3144,10 @@ declare class OwV2Client {
|
|
|
3142
3144
|
* redeemJoin for a read key, keel #353); `role`, when left out, is keel's default: guest for a
|
|
3143
3145
|
* person link, contributor for an agent link (a player link is guest, and refuses any other), `days` (1, 7 or 30) to 7; `withCharacter` (agent links
|
|
3144
3146
|
* only) to true; `character` (player links only) a Character's id or `new` (the default):
|
|
3145
|
-
* whoever opens the link first reads as it, until removed.
|
|
3147
|
+
* whoever opens the link first reads as it, until removed. `preview` (person and player links,
|
|
3148
|
+
* keel #422) to false: true puts the world's id in the link's path, so a chat that unfurls it
|
|
3149
|
+
* shows the world's name and picture (the code stays after `#`); true on an agent link is
|
|
3150
|
+
* 422, param `preview`. 201 with the code, shown in this
|
|
3146
3151
|
* answer only. Owner only: anyone else, and a world that doesn't exist, gets 404
|
|
3147
3152
|
* `not_found` (`err.isNotFound`). A world key is a TypeError before anything is sent.
|
|
3148
3153
|
*/
|
|
@@ -3153,6 +3158,7 @@ declare class OwV2Client {
|
|
|
3153
3158
|
inviterName?: string;
|
|
3154
3159
|
withCharacter?: boolean;
|
|
3155
3160
|
character?: string;
|
|
3161
|
+
preview?: boolean;
|
|
3156
3162
|
}): Promise<OwCreatedWorldLink>;
|
|
3157
3163
|
/**
|
|
3158
3164
|
* GET /account/worlds/{worldId}/links -- the world's invite links, without their codes:
|
package/dist/index.js
CHANGED
|
@@ -902,7 +902,10 @@ var OwV2Client = class {
|
|
|
902
902
|
* redeemJoin for a read key, keel #353); `role`, when left out, is keel's default: guest for a
|
|
903
903
|
* person link, contributor for an agent link (a player link is guest, and refuses any other), `days` (1, 7 or 30) to 7; `withCharacter` (agent links
|
|
904
904
|
* only) to true; `character` (player links only) a Character's id or `new` (the default):
|
|
905
|
-
* whoever opens the link first reads as it, until removed.
|
|
905
|
+
* whoever opens the link first reads as it, until removed. `preview` (person and player links,
|
|
906
|
+
* keel #422) to false: true puts the world's id in the link's path, so a chat that unfurls it
|
|
907
|
+
* shows the world's name and picture (the code stays after `#`); true on an agent link is
|
|
908
|
+
* 422, param `preview`. 201 with the code, shown in this
|
|
906
909
|
* answer only. Owner only: anyone else, and a world that doesn't exist, gets 404
|
|
907
910
|
* `not_found` (`err.isNotFound`). A world key is a TypeError before anything is sent.
|
|
908
911
|
*/
|
|
@@ -916,6 +919,7 @@ var OwV2Client = class {
|
|
|
916
919
|
if (opts.inviterName !== void 0) body.inviter_name = opts.inviterName;
|
|
917
920
|
if (opts.withCharacter !== void 0) body.with_character = opts.withCharacter;
|
|
918
921
|
if (opts.character !== void 0) body.character = opts.character;
|
|
922
|
+
if (opts.preview !== void 0) body.preview = opts.preview;
|
|
919
923
|
return this.request("POST", `/account/worlds/${encodeURIComponent(worldId)}/links`, { body });
|
|
920
924
|
}
|
|
921
925
|
/**
|