@onlyworlds/sdk 4.28.0 → 4.29.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 +12 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.js +14 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.29.0] — 2026-10-16
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `rekeySeat(worldId, seatId)` (keel #355 piece 3, D108): a new key and secret for a seat whose AI lost
|
|
12
|
+
its own, by its sponsor or the world's owner. The old key and secret stop at once; the answer has
|
|
13
|
+
`createSeat`'s shape (`OwSeatCreated`: `key`, `pin`, `env`), shown once. No Idempotency-Key, by keel's
|
|
14
|
+
rule: if the answer is lost too, ask for another.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- `createSeat`'s doc names `rekeySeat` as the way back from a lost answer.
|
|
18
|
+
- `OwApiError.param`'s doc: `API-Pin` on a 401 PIN refusal (keel #357, D107), not only a 422/400's field.
|
|
19
|
+
|
|
8
20
|
## [4.28.0] — 2026-10-16
|
|
9
21
|
|
|
10
22
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -2412,7 +2412,7 @@ declare class OwApiError extends Error {
|
|
|
2412
2412
|
readonly code: string | null;
|
|
2413
2413
|
/** Error family from the envelope, e.g. 'invalid_request', 'not_found'. */
|
|
2414
2414
|
readonly type: string | null;
|
|
2415
|
-
/** Offending field/param named by the envelope (422/400), else null. */
|
|
2415
|
+
/** Offending field/param named by the envelope (a 422/400's field; `API-Pin` on a 401 PIN refusal, keel #357), else null. */
|
|
2416
2416
|
readonly param: string | null;
|
|
2417
2417
|
/** Documentation link from the envelope -- show it to users/logs verbatim. */
|
|
2418
2418
|
readonly docUrl: string | null;
|
|
@@ -2815,7 +2815,7 @@ declare class OwV2Client {
|
|
|
2815
2815
|
* `mine` (members only: it plays the Character you play). 201 with `key`, `pin` and the
|
|
2816
2816
|
* `.env` lines in `env`, shown in this answer only. Sends no Idempotency-Key, by keel's rule:
|
|
2817
2817
|
* a replay would have to keep the key. If the answer is lost, listSeats shows the seat without
|
|
2818
|
-
* its key:
|
|
2818
|
+
* its key: rekeySeat gives it a new one (or removeSeat and make another). Needs the client's `ow_a_` token.
|
|
2819
2819
|
*/
|
|
2820
2820
|
createSeat(worldId: string, opts: {
|
|
2821
2821
|
name: string;
|
|
@@ -2827,6 +2827,14 @@ declare class OwV2Client {
|
|
|
2827
2827
|
* as the world's owner, every seat. No keys or secrets. Needs the client's `ow_a_` token.
|
|
2828
2828
|
*/
|
|
2829
2829
|
listSeats(worldId: string): Promise<OwSeat[]>;
|
|
2830
|
+
/**
|
|
2831
|
+
* POST /account/worlds/{worldId}/seats/{seatId}/key -- a new key and secret for a seat whose AI
|
|
2832
|
+
* lost its own: its sponsor or the world's owner may. The old key and secret stop at once;
|
|
2833
|
+
* nothing else about the seat changes. 201 with the same shape as createSeat (`key`, `pin`,
|
|
2834
|
+
* `env`), shown in this answer only. No Idempotency-Key, by keel's rule: if this answer is lost
|
|
2835
|
+
* too, ask for another new key. Needs the client's `ow_a_` token.
|
|
2836
|
+
*/
|
|
2837
|
+
rekeySeat(worldId: string, seatId: string): Promise<OwSeatCreated>;
|
|
2830
2838
|
/**
|
|
2831
2839
|
* DELETE /account/worlds/{worldId}/seats/{seatId} -- remove an agent seat: its sponsor or the
|
|
2832
2840
|
* world's owner may. Its key and secret stop at once; a Character it made that nobody touched
|
package/dist/index.js
CHANGED
|
@@ -636,7 +636,7 @@ var OwV2Client = class {
|
|
|
636
636
|
* `mine` (members only: it plays the Character you play). 201 with `key`, `pin` and the
|
|
637
637
|
* `.env` lines in `env`, shown in this answer only. Sends no Idempotency-Key, by keel's rule:
|
|
638
638
|
* a replay would have to keep the key. If the answer is lost, listSeats shows the seat without
|
|
639
|
-
* its key:
|
|
639
|
+
* its key: rekeySeat gives it a new one (or removeSeat and make another). Needs the client's `ow_a_` token.
|
|
640
640
|
*/
|
|
641
641
|
async createSeat(worldId, opts) {
|
|
642
642
|
if (this.keyKind !== "account") {
|
|
@@ -658,6 +658,19 @@ var OwV2Client = class {
|
|
|
658
658
|
const page = await this.request("GET", `/account/worlds/${encodeURIComponent(worldId)}/seats`);
|
|
659
659
|
return page.data;
|
|
660
660
|
}
|
|
661
|
+
/**
|
|
662
|
+
* POST /account/worlds/{worldId}/seats/{seatId}/key -- a new key and secret for a seat whose AI
|
|
663
|
+
* lost its own: its sponsor or the world's owner may. The old key and secret stop at once;
|
|
664
|
+
* nothing else about the seat changes. 201 with the same shape as createSeat (`key`, `pin`,
|
|
665
|
+
* `env`), shown in this answer only. No Idempotency-Key, by keel's rule: if this answer is lost
|
|
666
|
+
* too, ask for another new key. Needs the client's `ow_a_` token.
|
|
667
|
+
*/
|
|
668
|
+
async rekeySeat(worldId, seatId) {
|
|
669
|
+
if (this.keyKind !== "account") {
|
|
670
|
+
throw new TypeError("rekeySeat needs an account token (ow_a_)");
|
|
671
|
+
}
|
|
672
|
+
return this.request("POST", `/account/worlds/${encodeURIComponent(worldId)}/seats/${encodeURIComponent(seatId)}/key`);
|
|
673
|
+
}
|
|
661
674
|
/**
|
|
662
675
|
* DELETE /account/worlds/{worldId}/seats/{seatId} -- remove an agent seat: its sponsor or the
|
|
663
676
|
* world's owner may. Its key and secret stop at once; a Character it made that nobody touched
|