@onlyworlds/sdk 4.121.0 → 4.122.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 CHANGED
@@ -5,6 +5,18 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.122.0] - 2026-10-31
9
+
10
+ ### Added
11
+
12
+ - **`listAccountTokens()` and `revokeAccountToken(tokenId, opts?)`**: the account's tokens (`GET /account/tokens`, each by name and last four, with `last_used_at`, `revoked`, `expires_at`, `keys_minted` and `audience`; typed `OwAccountToken`), and a revoke by id (`DELETE /account/tokens/{tokenId}`), this client's own token included, so a tool done with a sign-in can end it by the `tokenId` the sign-in answered. An id that is not one of the account's tokens is a 404 (`err.isNotFound`); `signal` and `keepalive` go to fetch as `revokeWorldKey`'s do. Account token only; a world key is a `TypeError` before sending.
13
+
14
+ ## [4.121.1] - 2026-10-31
15
+
16
+ ### Fixed
17
+
18
+ - **`draught` reads with `world` set, as `list`, `get` and `getWorld` do.** The API serves the draught to an account token that names the world (the account's own access there) and to a keyless reader of a world open to the public; the client refused both before sending. It now sends `world=<id>` with the Bearer, or with no credential.
19
+
8
20
  ## [4.121.0] - 2026-10-31
9
21
 
10
22
  ### Added
package/dist/index.d.ts CHANGED
@@ -3558,6 +3558,27 @@ interface OwMintedKey {
3558
3558
  /** True when minted with `keep: true`: no revoke of the token that minted it takes it (a sign-out keeps it). */
3559
3559
  kept?: boolean;
3560
3560
  }
3561
+ /** An account token as GET /account/tokens lists it: by name and last four, never the token itself. */
3562
+ interface OwAccountToken {
3563
+ /** The token's id: revokeAccountToken takes it, and a sign-in answers it as `tokenId`. */
3564
+ id: string;
3565
+ /** The label given at mint (a device, a tool). */
3566
+ name: string;
3567
+ /** The token's last four characters, to tell tokens apart. */
3568
+ last4: string;
3569
+ last_used_at: string | null;
3570
+ revoked: boolean;
3571
+ /** When the token stops working, for a sign-in tool's token with a lifetime; null never expires. Past it the token is refused as a revoked one. */
3572
+ expires_at: string | null;
3573
+ /** How many live world keys this token minted. */
3574
+ keys_minted: number;
3575
+ /** Who the token is for: empty for a token made by hand or a sign-in tool's; `mcp` for a hosted client's grant on the MCP server. */
3576
+ audience: string;
3577
+ /** On an `mcp` token only: the client's name, as it registered itself, or its id when it is no longer registered. */
3578
+ client?: string;
3579
+ /** On an `mcp` token only: the host the client returns the person to. */
3580
+ return_host?: string;
3581
+ }
3561
3582
  interface OwSeat {
3562
3583
  /** The seat's membership id: removeSeat takes it, and GET /members names the seat by it. */
3563
3584
  id: string;
@@ -3805,7 +3826,7 @@ interface OwClientConfig {
3805
3826
  /**
3806
3827
  * The key: an ow_w_ (write) or ow_r_ (read) world key, an ow_a_ account token (sent as a Bearer token, for the account routes, and with `world` set for that world's reads), or a 10-digit legacy key.
3807
3828
  * Leave it out for a client that holds none, such as a friend with only a link (since 4.30.0): it can call health,
3808
- * previewJoin, redeemJoin and signInWithPassword (and with `world` set, list, listAll, get and getWorld), and any
3829
+ * previewJoin, redeemJoin and signInWithPassword (and with `world` set, list, listAll, get, getWorld and draught), and any
3809
3830
  * other call is a TypeError before anything is sent.
3810
3831
  */
3811
3832
  apiKey?: string;
@@ -4435,7 +4456,8 @@ declare class OwV2Client {
4435
4456
  * and in no other section; a room-marked Message is in `messages` or nowhere. `lens` (a lens id)
4436
4457
  * adds `lenses`, one frame with that lens read for this key's own view (beside `depth` or `budget`
4437
4458
  * a 422); with no policy key but `compact`, the packet adds one frame per lens chosen with
4438
- * setMyLenses. Served `Cache-Control: private, no-store`.
4459
+ * setMyLenses. Served `Cache-Control: private, no-store`. On a client with `world` set, an account token
4460
+ * reads the draught as the account's own access there, and no key reads it as the public reads the world.
4439
4461
  */
4440
4462
  draught(characterId: string, policy?: OwDraughtPolicy & {
4441
4463
  compact?: false;
@@ -5092,6 +5114,26 @@ declare class OwV2Client {
5092
5114
  signal?: AbortSignal;
5093
5115
  keepalive?: boolean;
5094
5116
  }): Promise<void>;
5117
+ /**
5118
+ * GET /account/tokens -- the account's tokens, each by name and last four, never the token
5119
+ * itself: when it was last used, whether it is revoked, when it expires, how many live world
5120
+ * keys it minted, and who it is for (`audience`). Account token only.
5121
+ */
5122
+ listAccountTokens(): Promise<OwAccountToken[]>;
5123
+ /**
5124
+ * DELETE /account/tokens/{tokenId} -- revoke one of the account's tokens, this client's own
5125
+ * included (a tool done with a sign-in revokes it by the `tokenId` the sign-in answered); every
5126
+ * other token stays live. A token a tool got through Sign in with OnlyWorlds takes the world keys
5127
+ * it minted with it, unless the person holds another live token of the same tool, which then
5128
+ * takes them; a token made by hand or by a password sign-in revokes itself only. An id that is
5129
+ * not one of the account's tokens is a 404 (`err.isNotFound`). Once a client revokes its own
5130
+ * token, its next call is refused as a revoked token's. `signal` and `keepalive` go to fetch
5131
+ * as given, as revokeWorldKey's do. Account token only.
5132
+ */
5133
+ revokeAccountToken(tokenId: string, opts?: {
5134
+ signal?: AbortSignal;
5135
+ keepalive?: boolean;
5136
+ }): Promise<void>;
5095
5137
  /**
5096
5138
  * Start Sign in with OnlyWorlds from a tool's page: mint `state` and a PKCE verifier, keep them
5097
5139
  * under `clientId` in `storage` (sessionStorage by default; in Node pass one), and send the
@@ -6891,4 +6933,4 @@ declare class TokenResource {
6891
6933
  getEncryptionInfo(): Promise<EncryptionInfo>;
6892
6934
  }
6893
6935
 
6894
- export { AGENT_DOORS, ASK_LIMITS, type AccessKeyResponse, CALENDAR_FIELD, CALENDAR_SUPERTYPE, CHARTER_PAIRS, type CalendarConfig, type CalendarEra, type CalendarIntercalary, type CalendarMonths, type CalendarWeek, DATE_FIELD, ELEMENT_FAMILIES, ELEMENT_GROUPS, ELEMENT_ICONS, ELEMENT_LABELS, ELEMENT_SECTIONS, ELEMENT_TYPES, type ElementFamily, type ElementGroup, type ElementType, type EncryptionInfo, type EraDomain, FAMILY_COLORS, FAMILY_ORDER, FIELD_ACRONYMS, FIELD_SCHEMA, FILE_EXTENSIONS, type FieldInfo, type FieldType, GROUP_COLORS, GROUP_ORDER, GameTier, type ListParams, MESSAGE_PAIR, NOTE_PAIR, ONLYWORLDS_VERSION, type OwAccountWorld, type OwAddress, OwAddressError, type OwAddressForm, type OwAddressReading, type OwAddressReason, type OwAddressingOptions, type OwAgentJoined, type OwAllowance, OwApiError, type OwAskAnswer, type OwAskContext, type OwAskContextOptions, type OwAskLeftOut, type OwAuthErrorCode, type OwBulkItem, type OwBulkItemResult, type OwBulkResponse, type OwCalendarElement, type OwChange, type OwChangeDelete, type OwChangeUpsert, type OwChangesPage, type OwCharterWorld, type OwClientConfig, type OwCreateAccountWorldInput, type OwCreatedAccountWorld, type OwCreatedWorldLink, type OwDeleteReason, type OwDoor, type OwDragField, type OwDraught, type OwDraughtCompact, type OwDraughtComponent, type OwDraughtItem, type OwDraughtLens, type OwDraughtPolicy, type OwEdited, type OwElement, type OwElementBase, type OwErrorBody, type OwFileAddedBy, type OwFileDownload, type OwFileKind, type OwFileRow, type OwFileTicket, type OwFrontDoor, type OwGraphCutReason, type OwGraphEdge, type OwGraphMark, type OwGraphNode, type OwGraphOptions, type OwHiddenRow, type OwJoinPreview, type OwJoined, type OwJoinedMembership, type OwKeyKind, type OwLensCutReason, type OwLensMail, type OwLensOptions, type OwLensReader, type OwLensReading, type OwLensWorld, type OwLinkEdit, type OwLookupElement, type OwLookupHit, type OwLookupLink, type OwLookupOptions, type OwLookupReason, type OwMe, type OwMediaTicket, type OwMember, type OwMemberLenses, type OwMemberRole, type OwMessageMember, type OwMintedKey, type OwMySeat, type OwNamesMap, OwNetworkError, type OwOpener, type OwOpenerKind, type OwOpenerState, type OwOpenerSurface, type OwPage, type OwPhotoOptions, type OwPhotoPlan, type OwPlayerJoined, OwPreconditionFailedError, type OwPreparedPhoto, type OwProposal, type OwProposalAccepted, type OwProposalConflict, type OwProposalList, type OwProposalQuery, type OwProposalState, type OwProposeInput, type OwProposed, OwProposedError, type OwProposedMark, type OwProposedNewElement, type OwReadWorldFile, type OwReadWorldFileOptions, type OwReadingAids, type OwReadingAidsCharter, type OwReadingAidsDomain, type OwReadingAidsGuide, type OwReadingAidsHub, type OwRemovalTicket, type OwRemovedImage, type OwRenderOptions, type OwResyncReason, type OwReviewInput, type OwReviewed, type OwSeat, type OwSeatCreated, type OwSender, type OwSenderStatus, type OwServedReadingAids, type OwSignInBegin, type OwSignInBegun, type OwSignInComplete, OwSignInError, type OwSignInReason, type OwSignInResult, type OwSignInStorage, type OwSignedIn, type OwSortAddToRow, type OwSortAnswer, type OwSortAskRow, type OwSortLinkRow, type OwSortMakeRow, type OwSortNote, type OwSortRef, type OwSortRow, OwStaleProposalError, type OwStrand, type OwStrandSlot, type OwStrandWorld, type OwTool, type OwToolNeeds, type OwToolOpen, type OwUploadedFile, type OwUploadedImage, OwV2Client, type OwWordPair, type OwWorldFileEntry, OwWorldFileError, type OwWorldFileReason, type OwWorldFileRow, type OwWorldFiles, type OwWorldGraph, type OwWorldIndex, type OwWorldLens, type OwWorldLensReading, type OwWorldLenses, type OwWorldLink, type OwWorldMeta, type OwWorldOrigin, type OwWorldProducer, type OwWorldProposalList, type OwWorldProposalQuery, type OwWorldProposalRow, type OwWorldPublicPage, type OwWorldSource, type OwWriteDoor, type OwWriteWorldFileOptions, type OwWriteWorldFileReport, PHOTO_MAX_BYTES, PHOTO_TYPES, PROPOSED_MARK, PUBLIC_FIELDS, type ParseError, type ParseOptions, type ParseResult, REVIEW_PROPOSED_LABEL, ROOM_PAIRS, type RevokeAllSessionsResponse, type RevokeSessionResponse, SPATIAL_TYPES, STRAND_FIELD, type SectionInfo, type StepBreakdown, TOOLS, type TokenConsumeParams, type TokenConsumeResponse, TokenResource, type TokenStatus, type TokenTransport, WORLD_FILE_MAX_BYTES, WORLD_FILE_MAX_ENTRIES, WORLD_FILE_MEDIA_TYPE, type WorldCalendar, absYearForEraYear, absoluteYear, approxYearLength, base64url, breakdownStep, buildAskContext, buildWorldIndex, charterOf, dateOf, degreeOf, detectKeyKind, displayYear, domainsOf, doorWhere, doorsOf, dragField, draughtText, editedBy, elementAddress, elementColor, eraForStep, errorFromResponse, familyOf, fieldLabel, fileKindOf, floorDiv, floorMod, formatDuration, formatMidLabel, formatStep, formatYearLabel, getElementIcon, getElementLabel, groupOf, handsOnAsProposed, hasUnseenRecipients, intercalaryInYear, isAddressedTo, isAgentDoor, isCharterElement, isDemoKey, isKnownOf, isLeapYear, isLens, isMessage, isNote, isParseError, isRoomElement, isSentBy, isTemplate, isToEveryone, kindCanWrite, lensesInUse, lookupWorld, monthStartSteps, nfc, noteOf, openersFor, outDegreeOf, parseDate, parseErrorEnvelope, parseOwLink, pinExpectation, pkceChallenge, planPhoto, preparePhoto, proposedMarkOf, readCalendarConfig, readCalendarValue, readMarkOf, readWorldFile, readingAidOf, recipientsOf, renderElement, resolveCalendar, resolveCalendarLens, resolveEraDomains, resolveLens, senderStatus, simpleCaseFold, strandOf, threadOf, typeWord, unreadFor, validateCalendarConfig, weekdayForStep, worldCalendars, worldGraph, writeWorldFile, yearLength, yearStartStep };
6936
+ export { AGENT_DOORS, ASK_LIMITS, type AccessKeyResponse, CALENDAR_FIELD, CALENDAR_SUPERTYPE, CHARTER_PAIRS, type CalendarConfig, type CalendarEra, type CalendarIntercalary, type CalendarMonths, type CalendarWeek, DATE_FIELD, ELEMENT_FAMILIES, ELEMENT_GROUPS, ELEMENT_ICONS, ELEMENT_LABELS, ELEMENT_SECTIONS, ELEMENT_TYPES, type ElementFamily, type ElementGroup, type ElementType, type EncryptionInfo, type EraDomain, FAMILY_COLORS, FAMILY_ORDER, FIELD_ACRONYMS, FIELD_SCHEMA, FILE_EXTENSIONS, type FieldInfo, type FieldType, GROUP_COLORS, GROUP_ORDER, GameTier, type ListParams, MESSAGE_PAIR, NOTE_PAIR, ONLYWORLDS_VERSION, type OwAccountToken, type OwAccountWorld, type OwAddress, OwAddressError, type OwAddressForm, type OwAddressReading, type OwAddressReason, type OwAddressingOptions, type OwAgentJoined, type OwAllowance, OwApiError, type OwAskAnswer, type OwAskContext, type OwAskContextOptions, type OwAskLeftOut, type OwAuthErrorCode, type OwBulkItem, type OwBulkItemResult, type OwBulkResponse, type OwCalendarElement, type OwChange, type OwChangeDelete, type OwChangeUpsert, type OwChangesPage, type OwCharterWorld, type OwClientConfig, type OwCreateAccountWorldInput, type OwCreatedAccountWorld, type OwCreatedWorldLink, type OwDeleteReason, type OwDoor, type OwDragField, type OwDraught, type OwDraughtCompact, type OwDraughtComponent, type OwDraughtItem, type OwDraughtLens, type OwDraughtPolicy, type OwEdited, type OwElement, type OwElementBase, type OwErrorBody, type OwFileAddedBy, type OwFileDownload, type OwFileKind, type OwFileRow, type OwFileTicket, type OwFrontDoor, type OwGraphCutReason, type OwGraphEdge, type OwGraphMark, type OwGraphNode, type OwGraphOptions, type OwHiddenRow, type OwJoinPreview, type OwJoined, type OwJoinedMembership, type OwKeyKind, type OwLensCutReason, type OwLensMail, type OwLensOptions, type OwLensReader, type OwLensReading, type OwLensWorld, type OwLinkEdit, type OwLookupElement, type OwLookupHit, type OwLookupLink, type OwLookupOptions, type OwLookupReason, type OwMe, type OwMediaTicket, type OwMember, type OwMemberLenses, type OwMemberRole, type OwMessageMember, type OwMintedKey, type OwMySeat, type OwNamesMap, OwNetworkError, type OwOpener, type OwOpenerKind, type OwOpenerState, type OwOpenerSurface, type OwPage, type OwPhotoOptions, type OwPhotoPlan, type OwPlayerJoined, OwPreconditionFailedError, type OwPreparedPhoto, type OwProposal, type OwProposalAccepted, type OwProposalConflict, type OwProposalList, type OwProposalQuery, type OwProposalState, type OwProposeInput, type OwProposed, OwProposedError, type OwProposedMark, type OwProposedNewElement, type OwReadWorldFile, type OwReadWorldFileOptions, type OwReadingAids, type OwReadingAidsCharter, type OwReadingAidsDomain, type OwReadingAidsGuide, type OwReadingAidsHub, type OwRemovalTicket, type OwRemovedImage, type OwRenderOptions, type OwResyncReason, type OwReviewInput, type OwReviewed, type OwSeat, type OwSeatCreated, type OwSender, type OwSenderStatus, type OwServedReadingAids, type OwSignInBegin, type OwSignInBegun, type OwSignInComplete, OwSignInError, type OwSignInReason, type OwSignInResult, type OwSignInStorage, type OwSignedIn, type OwSortAddToRow, type OwSortAnswer, type OwSortAskRow, type OwSortLinkRow, type OwSortMakeRow, type OwSortNote, type OwSortRef, type OwSortRow, OwStaleProposalError, type OwStrand, type OwStrandSlot, type OwStrandWorld, type OwTool, type OwToolNeeds, type OwToolOpen, type OwUploadedFile, type OwUploadedImage, OwV2Client, type OwWordPair, type OwWorldFileEntry, OwWorldFileError, type OwWorldFileReason, type OwWorldFileRow, type OwWorldFiles, type OwWorldGraph, type OwWorldIndex, type OwWorldLens, type OwWorldLensReading, type OwWorldLenses, type OwWorldLink, type OwWorldMeta, type OwWorldOrigin, type OwWorldProducer, type OwWorldProposalList, type OwWorldProposalQuery, type OwWorldProposalRow, type OwWorldPublicPage, type OwWorldSource, type OwWriteDoor, type OwWriteWorldFileOptions, type OwWriteWorldFileReport, PHOTO_MAX_BYTES, PHOTO_TYPES, PROPOSED_MARK, PUBLIC_FIELDS, type ParseError, type ParseOptions, type ParseResult, REVIEW_PROPOSED_LABEL, ROOM_PAIRS, type RevokeAllSessionsResponse, type RevokeSessionResponse, SPATIAL_TYPES, STRAND_FIELD, type SectionInfo, type StepBreakdown, TOOLS, type TokenConsumeParams, type TokenConsumeResponse, TokenResource, type TokenStatus, type TokenTransport, WORLD_FILE_MAX_BYTES, WORLD_FILE_MAX_ENTRIES, WORLD_FILE_MEDIA_TYPE, type WorldCalendar, absYearForEraYear, absoluteYear, approxYearLength, base64url, breakdownStep, buildAskContext, buildWorldIndex, charterOf, dateOf, degreeOf, detectKeyKind, displayYear, domainsOf, doorWhere, doorsOf, dragField, draughtText, editedBy, elementAddress, elementColor, eraForStep, errorFromResponse, familyOf, fieldLabel, fileKindOf, floorDiv, floorMod, formatDuration, formatMidLabel, formatStep, formatYearLabel, getElementIcon, getElementLabel, groupOf, handsOnAsProposed, hasUnseenRecipients, intercalaryInYear, isAddressedTo, isAgentDoor, isCharterElement, isDemoKey, isKnownOf, isLeapYear, isLens, isMessage, isNote, isParseError, isRoomElement, isSentBy, isTemplate, isToEveryone, kindCanWrite, lensesInUse, lookupWorld, monthStartSteps, nfc, noteOf, openersFor, outDegreeOf, parseDate, parseErrorEnvelope, parseOwLink, pinExpectation, pkceChallenge, planPhoto, preparePhoto, proposedMarkOf, readCalendarConfig, readCalendarValue, readMarkOf, readWorldFile, readingAidOf, recipientsOf, renderElement, resolveCalendar, resolveCalendarLens, resolveEraDomains, resolveLens, senderStatus, simpleCaseFold, strandOf, threadOf, typeWord, unreadFor, validateCalendarConfig, weekdayForStep, worldCalendars, worldGraph, writeWorldFile, yearLength, yearStartStep };
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`
@@ -1952,6 +1952,41 @@ var OwV2Client = class {
1952
1952
  if (opts.keepalive !== void 0) send.keepalive = opts.keepalive;
1953
1953
  await this.request("DELETE", `/account/worlds/${encodeURIComponent(worldId)}/keys/${encodeURIComponent(keyId)}`, send);
1954
1954
  }
1955
+ /**
1956
+ * GET /account/tokens -- the account's tokens, each by name and last four, never the token
1957
+ * itself: when it was last used, whether it is revoked, when it expires, how many live world
1958
+ * keys it minted, and who it is for (`audience`). Account token only.
1959
+ */
1960
+ async listAccountTokens() {
1961
+ if (this.keyKind !== "account") {
1962
+ throw new TypeError("listAccountTokens needs an account token (ow_a_)");
1963
+ }
1964
+ const page = await this.request("GET", "/account/tokens");
1965
+ return page.data;
1966
+ }
1967
+ /**
1968
+ * DELETE /account/tokens/{tokenId} -- revoke one of the account's tokens, this client's own
1969
+ * included (a tool done with a sign-in revokes it by the `tokenId` the sign-in answered); every
1970
+ * other token stays live. A token a tool got through Sign in with OnlyWorlds takes the world keys
1971
+ * it minted with it, unless the person holds another live token of the same tool, which then
1972
+ * takes them; a token made by hand or by a password sign-in revokes itself only. An id that is
1973
+ * not one of the account's tokens is a 404 (`err.isNotFound`). Once a client revokes its own
1974
+ * token, its next call is refused as a revoked token's. `signal` and `keepalive` go to fetch
1975
+ * as given, as revokeWorldKey's do. Account token only.
1976
+ */
1977
+ async revokeAccountToken(tokenId, opts = {}) {
1978
+ only("revokeAccountToken", opts, ["signal", "keepalive"]);
1979
+ if (this.keyKind !== "account") {
1980
+ throw new TypeError("revokeAccountToken needs an account token (ow_a_)");
1981
+ }
1982
+ if (typeof tokenId !== "string" || tokenId === "") {
1983
+ throw new TypeError(`revokeAccountToken: tokenId is a token's id, a non-empty string; got ${JSON.stringify(tokenId) ?? String(tokenId)}. Nothing was sent.`);
1984
+ }
1985
+ const send = {};
1986
+ if (opts.signal !== void 0) send.signal = opts.signal;
1987
+ if (opts.keepalive !== void 0) send.keepalive = opts.keepalive;
1988
+ await this.request("DELETE", `/account/tokens/${encodeURIComponent(tokenId)}`, send);
1989
+ }
1955
1990
  // -- Sign in with OnlyWorlds (OAuth 2.1 code + PKCE) ----------------------
1956
1991
  /**
1957
1992
  * Start Sign in with OnlyWorlds from a tool's page: mint `state` and a PKCE verifier, keep them
@@ -2055,14 +2090,14 @@ var OwV2Client = class {
2055
2090
  const worldRead = opts.auth !== false && opts.worldRead === true && method.toUpperCase() === "GET";
2056
2091
  const accountToken = opts.auth !== false && this.keyKind === "account" ? opts.accountToken : void 0;
2057
2092
  if (opts.auth !== false && this.keyKind === "none" && !(worldRead && this.world !== void 0)) {
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 and getWorld with \`world\` set`);
2093
+ 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`);
2059
2094
  }
2060
2095
  if (opts.auth !== false && this.keyKind === "account" && !ACCOUNT_ROUTE.test(path)) {
2061
2096
  if (!worldRead && accountToken === void 0) {
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 and getWorld only. Nothing was sent.`);
2097
+ 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.`);
2063
2098
  }
2064
2099
  if (worldRead && this.world === void 0) {
2065
- 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.`);
2100
+ 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.`);
2066
2101
  }
2067
2102
  if (accountToken === "world" && this.world === void 0) {
2068
2103
  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.`);
@@ -2316,10 +2351,10 @@ var CLIENT_CONFIG_KEYS = ["apiKey", "apiPin", "baseUrl", "pageSize", "changesPag
2316
2351
  function worldOf(value, keyKind) {
2317
2352
  if (value === void 0) return void 0;
2318
2353
  if (typeof value !== "string" || value.trim() === "") {
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 and getWorld.`);
2354
+ 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.`);
2320
2355
  }
2321
2356
  if (keyKind !== "account" && keyKind !== "none") {
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 and getWorld.");
2357
+ 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.");
2323
2358
  }
2324
2359
  return value;
2325
2360
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.121.0",
3
+ "version": "4.122.0",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {