@onlyworlds/sdk 4.184.1 → 4.186.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/dist/index.d.ts +19 -2
- package/dist/index.js +11 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2790,6 +2790,14 @@ interface OwLinkEdit {
|
|
|
2790
2790
|
}
|
|
2791
2791
|
/** A proposal's state: `lapsed` once `expires` has passed (it may still be accepted or declined). */
|
|
2792
2792
|
type OwProposalState = 'open' | 'lapsed' | 'accepted' | 'declined';
|
|
2793
|
+
/**
|
|
2794
|
+
* What part of the world's house rules a queue row would change: `charter`, a Law that carries the
|
|
2795
|
+
* Charter mark (`x_charter_of`); `skill`, an Object the text of such a Law names; `new_charter`, a
|
|
2796
|
+
* Law an accept would make a Charter (on a proposal: it sets the mark, and the Law's supertype after
|
|
2797
|
+
* it is `Charter`; on a new element's row: a new Law that carries the mark). The house rules are
|
|
2798
|
+
* changed only by the world's owner and co-builders; anyone else proposes (403 `keeper_only`).
|
|
2799
|
+
*/
|
|
2800
|
+
type OwProposalHouse = 'charter' | 'skill' | 'new_charter';
|
|
2793
2801
|
/**
|
|
2794
2802
|
* A proposed change to an element (the document's `Proposal`): a record kept beside
|
|
2795
2803
|
* the element, never in its body. The element does not change until the world's owner or a
|
|
@@ -2804,6 +2812,8 @@ interface OwProposal {
|
|
|
2804
2812
|
element_type: string;
|
|
2805
2813
|
/** The element's id. */
|
|
2806
2814
|
element_id: string;
|
|
2815
|
+
/** The part of the house rules this proposal would change, null for anything else. Read when the row is served, as the world stands then; worked out only for the world's owner and co-builders, null to any other reader. */
|
|
2816
|
+
house: OwProposalHouse | null;
|
|
2807
2817
|
state: OwProposalState;
|
|
2808
2818
|
/**
|
|
2809
2819
|
* What the proposal changes, and only that: the proposed values of the fields (schema
|
|
@@ -2862,6 +2872,8 @@ interface OwProposedNewElement {
|
|
|
2862
2872
|
element_type: string;
|
|
2863
2873
|
/** The element's id, as `id`. */
|
|
2864
2874
|
element_id: string;
|
|
2875
|
+
/** `new_charter` when the new element is a Law that carries the Charter mark, `skill` when it is an Object a marked Law's text names, else null. Worked out only for the world's owner and co-builders, null to any other reader. */
|
|
2876
|
+
house: OwProposalHouse | null;
|
|
2865
2877
|
/** open; lapsed once the mark's `expires` has passed (it may still be accepted or declined). Never accepted or declined: a settled mark leaves the queue. */
|
|
2866
2878
|
state: 'open' | 'lapsed';
|
|
2867
2879
|
/** The mark's own `by`, the writer's word for who proposed it: a claim, never a record of who wrote the element or the mark (show it as `OwProposedMark.by` says); null when it names nobody. */
|
|
@@ -4925,7 +4937,8 @@ declare class OwV2Client {
|
|
|
4925
4937
|
* membership and Character, the lenses it starts with, the world's reading aids, and the front
|
|
4926
4938
|
* door (`front_door`: the sponsor and their Character, your own Character, the Charter and the
|
|
4927
4939
|
* Objects it names, the seats you sponsor). The client's PIN is sent here when it has one, so a
|
|
4928
|
-
* wrong PIN shows on this call first, which makes it the connection test
|
|
4940
|
+
* wrong PIN shows on this call first, which makes it the connection test for a key that can write;
|
|
4941
|
+
* beside a key that cannot (a read key, a player's), onlyworlds.com never reads a PIN. An account token is
|
|
4929
4942
|
* refused before sending: it is not a member of one world.
|
|
4930
4943
|
*/
|
|
4931
4944
|
me(): Promise<OwMe>;
|
|
@@ -5099,10 +5112,14 @@ declare class OwV2Client {
|
|
|
5099
5112
|
* `idempotencyKey`, derived from the key and the position (the ids the Python package mints),
|
|
5100
5113
|
* so a retry with the same key and items sends the same body; without one, a
|
|
5101
5114
|
* fresh UUIDv7. Ids you supply are kept.
|
|
5115
|
+
* With `createOnly: true` (sent as `create_only`), every item with an id is created as `create` creates it, never
|
|
5116
|
+
* replaced: an id the world already holds answers that item's slot `{status: 409}` with `id_conflict`, and the
|
|
5117
|
+
* element stays as it was. Left out or false, an item with an id held replaces it whole, as before.
|
|
5102
5118
|
*/
|
|
5103
5119
|
bulk(items: OwBulkItem[], opts?: {
|
|
5104
5120
|
atomic?: boolean;
|
|
5105
5121
|
idempotencyKey?: string;
|
|
5122
|
+
createOnly?: boolean;
|
|
5106
5123
|
}): Promise<OwBulkResponse>;
|
|
5107
5124
|
/**
|
|
5108
5125
|
* GET /changes -- one page of the world's ordered change feed.
|
|
@@ -8581,4 +8598,4 @@ declare class TokenResource {
|
|
|
8581
8598
|
}
|
|
8582
8599
|
|
|
8583
8600
|
export { AGENT_DOORS, ASK_LIMITS, BY_LINKS_3D_REST, BY_LINKS_3D_VERSION, CALENDAR_FIELD, CALENDAR_SUPERTYPE, CHARTER_PAIRS, DATE_FIELD, DECLARED_LINKS, ELEMENT_FAMILIES, ELEMENT_GROUPS, ELEMENT_ICONS, ELEMENT_LABELS, ELEMENT_SECTIONS, ELEMENT_TYPES, FAMILY_COLORS, FAMILY_ORDER, FIELD_ACRONYMS, FIELD_SCHEMA, FILE_EXTENSIONS, GROUP_COLORS, GROUP_ORDER, GameTier, MESSAGE_PAIR, NOTE_PAIR, ONLYWORLDS_VERSION, OwAddressError, OwApiError, OwNetworkError, OwPreconditionFailedError, OwProposedError, OwSignInError, OwStaleProposalError, OwV2Client, OwWorldFileError, PHOTO_MAX_BYTES, PHOTO_TYPES, PROPOSED_MARK, PUBLIC_FIELDS, RECORD_FIELD, REVIEW_PROPOSED_LABEL, ROOM_PAIRS, SPATIAL_TYPES, STRAND_FIELD, TOOLS, TRAIL_TIERS, TokenResource, VIEWS, WORLD_FILE_MAX_BYTES, WORLD_FILE_MAX_ENTRIES, WORLD_FILE_MEDIA_TYPE, absYearForEraYear, absoluteYear, approxYearLength, askerOf, base64url, breakdownStep, buildAskContext, buildWorldIndex, byCodePoint, carryOf, charterOf, compareInstants, dateOf, degreeOf, designPartsOf, detectKeyKind, displayYear, domainsOf, doorWhere, doorsOf, dragField, draughtText, editedBy, elementAddress, elementColor, eraForStep, errorFromResponse, familyOf, fieldLabel, fileKindOf, findOwLinks, floorDiv, floorMod, formatDuration, formatMidLabel, formatStep, formatYearLabel, getElementIcon, getElementLabel, groupOf, handsOnAsProposed, hasUnseenRecipients, instantOf, intercalaryInYear, isAddressedTo, isAgentDoor, isCharterElement, isDemoKey, isKnownOf, isLeapYear, isLens, isMessage, isNote, isOpenWork, isParseError, isRoomElement, isSentBy, isTemplate, isToEveryone, kindCanWrite, landingOf, layoutAround, layoutByKind, layoutByLinks3d, layoutOf, lensesInUse, lookupWorld, mapSpace, monthStartSteps, nfc, noteOf, openersFor, outDegreeOf, parseDate, parseErrorEnvelope, parseOwLink, pinExpectation, pkceChallenge, planPhoto, preparePhoto, proposedMarkOf, readCalendarConfig, readCalendarValue, readMarkOf, readOwLinkAt, readReportLine, readReportLines, readWorldFile, readingAidOf, recipientsOf, recordMarkOf, recordsOf, renderElement, reportTalksOf, reportThreadsOf, resolveCalendar, resolveCalendarLens, resolveEraDomains, resolveLens, roundHalfEven, senderStatus, simpleCaseFold, strandOf, talksOf, threadOf, trailByPlace, trimAndFold, typeWord, unplacedAround, unplacedByKind, unplacedByLinks3d, unreadFor, validateCalendarConfig, viewOf, weekdayForStep, workOf, workStateOf, worldCalendars, worldGraph, writeWorldFile, yearLength, yearStartStep };
|
|
8584
|
-
export type { AccessKeyResponse, CalendarConfig, CalendarEra, CalendarIntercalary, CalendarMonths, CalendarWeek, ElementFamily, ElementGroup, ElementType, EncryptionInfo, EraDomain, FieldInfo, FieldType, ListParams, OwAccountToken, OwAccountWorld, OwAddress, OwAddressAt, OwAddressForm, OwAddressFound, OwAddressReading, OwAddressReason, OwAddressingOptions, OwAgentJoined, OwAiAskAnswer, OwAiAskBody, OwAiMeter, OwAiRefusal, OwAiSortAnswer, OwAiSortBody, OwAiToken, OwAiUse, OwAllowance, OwAskAnswer, OwAskContext, OwAskContextOptions, OwAskLeftOut, OwAuthErrorCode, OwBulkItem, OwBulkItemResult, OwBulkResponse, OwCalendarElement, OwCarryLint, OwCarryOf, OwCarryPoint, OwCarryStop, OwChange, OwChangeDelete, OwChangeUpsert, OwChangesPage, OwCharterWorld, OwClientConfig, OwCreateAccountWorldInput, OwCreatedAccountWorld, OwCreatedWorldLink, OwDeleteReason, OwDesignPart, OwDoor, OwDragField, OwDraught, OwDraughtCompact, OwDraughtComponent, OwDraughtItem, OwDraughtLens, OwDraughtPolicy, OwEdited, OwElement, OwElementBase, OwElementMark, OwErrorBody, OwFieldsRefusal, OwFileAddedBy, OwFileDownload, OwFileKind, OwFileRow, OwFileTicket, OwFrontDoor, OwFrontDoorCharter, OwFrontDoorSkill, OwGraphCutReason, OwGraphEdge, OwGraphMark, OwGraphNode, OwGraphOptions, OwHiddenRow, OwInstant, OwJoinPreview, OwJoined, OwJoinedMembership, OwKeyKind, OwLanding, OwLandingCluster, OwLandingGap, OwLandingGapKind, OwLandingMember, OwLandingMode, OwLandingOptions, OwLayout3dHow, OwLayout3dPart, OwLayoutAround, OwLayoutAroundOptions, OwLayoutAroundPoint, OwLayoutByKind, OwLayoutByLinks3d, OwLayoutByLinks3dOptions, OwLayoutGraph, OwLayoutOf, OwLayoutPoint, OwLensCutReason, OwLensMail, OwLensOptions, OwLensReader, OwLensReading, OwLensWorld, OwLinkEdit, OwLookupElement, OwLookupHit, OwLookupLink, OwLookupOptions, OwLookupReason, OwMapSpace, OwMapSpaceMap, OwMapSpaceOutReason, OwMapSpaceOutline, OwMapSpacePin, OwMapSpacePoint, OwMe, OwMediaTicket, OwMember, OwMemberLenses, OwMemberRole, OwMessageMember, OwMintedAiToken, OwMintedKey, OwMySeat, OwNamesMap, OwOpener, OwOpenerKind, OwOpenerState, OwOpenerSurface, OwOpenersOptions, OwPage, OwPaidBy, OwPhotoOptions, OwPhotoPlan, OwPlayerJoined, OwPreparedPhoto, OwProposal, OwProposalAccepted, OwProposalConflict, OwProposalList, OwProposalQuery, OwProposalState, OwProposeInput, OwProposed, OwProposedMark, OwProposedNewElement, OwReadWorldFile, OwReadWorldFileOptions, OwReadingAids, OwReadingAidsCharter, OwReadingAidsDomain, OwReadingAidsGuide, OwReadingAidsHub, OwRecord, OwRecordMark, OwRecordStory, OwRemovalTicket, OwRemovedImage, OwRenderOptions, OwReportGroup, OwReportLine, OwReportLineOptions, OwReportLint, OwReportParentKind, OwReportThreads, OwResyncReason, OwReviewInput, OwReviewed, OwSearchResult, OwSearchResults, OwSeat, OwSeatCreated, OwSender, OwSenderStatus, OwServedReadingAids, OwSignInBegin, OwSignInBegun, OwSignInComplete, OwSignInReason, OwSignInResult, OwSignInStorage, OwSignedIn, OwSortAddToRow, OwSortAnswer, OwSortAskRow, OwSortLinkRow, OwSortMakeRow, OwSortNote, OwSortRef, OwSortRow, OwStrand, OwStrandSlot, OwStrandWorld, OwTalk, OwTool, OwToolNeeds, OwToolOpen, OwTrailGround, OwTrailHanger, OwTrailInput, OwTrailLayout, OwTrailPin, OwTrailPlace, OwTrailSettings, OwTrailSpiral, OwTrailTier, OwUploadedFile, OwUploadedImage, OwView, OwViewRow, OwViewsTable, OwWordPair, OwWork, OwWorkElement, OwWorkLint, OwWorkState, OwWorkWorld, OwWorldFileEntry, OwWorldFileReason, OwWorldFileRow, OwWorldFiles, OwWorldGraph, OwWorldIndex, OwWorldKeyMember, OwWorldKeyRow, OwWorldLens, OwWorldLensReading, OwWorldLenses, OwWorldLink, OwWorldMeta, OwWorldOrigin, OwWorldProducer, OwWorldProposalList, OwWorldProposalQuery, OwWorldProposalRow, OwWorldPublicPage, OwWorldSource, OwWriteDoor, OwWriteWorldFileOptions, OwWriteWorldFileReport, ParseError, ParseOptions, ParseResult, RevokeAllSessionsResponse, RevokeSessionResponse, SectionInfo, StepBreakdown, TokenConsumeParams, TokenConsumeResponse, TokenStatus, TokenTransport, WorldCalendar };
|
|
8601
|
+
export type { AccessKeyResponse, CalendarConfig, CalendarEra, CalendarIntercalary, CalendarMonths, CalendarWeek, ElementFamily, ElementGroup, ElementType, EncryptionInfo, EraDomain, FieldInfo, FieldType, ListParams, OwAccountToken, OwAccountWorld, OwAddress, OwAddressAt, OwAddressForm, OwAddressFound, OwAddressReading, OwAddressReason, OwAddressingOptions, OwAgentJoined, OwAiAskAnswer, OwAiAskBody, OwAiMeter, OwAiRefusal, OwAiSortAnswer, OwAiSortBody, OwAiToken, OwAiUse, OwAllowance, OwAskAnswer, OwAskContext, OwAskContextOptions, OwAskLeftOut, OwAuthErrorCode, OwBulkItem, OwBulkItemResult, OwBulkResponse, OwCalendarElement, OwCarryLint, OwCarryOf, OwCarryPoint, OwCarryStop, OwChange, OwChangeDelete, OwChangeUpsert, OwChangesPage, OwCharterWorld, OwClientConfig, OwCreateAccountWorldInput, OwCreatedAccountWorld, OwCreatedWorldLink, OwDeleteReason, OwDesignPart, OwDoor, OwDragField, OwDraught, OwDraughtCompact, OwDraughtComponent, OwDraughtItem, OwDraughtLens, OwDraughtPolicy, OwEdited, OwElement, OwElementBase, OwElementMark, OwErrorBody, OwFieldsRefusal, OwFileAddedBy, OwFileDownload, OwFileKind, OwFileRow, OwFileTicket, OwFrontDoor, OwFrontDoorCharter, OwFrontDoorSkill, OwGraphCutReason, OwGraphEdge, OwGraphMark, OwGraphNode, OwGraphOptions, OwHiddenRow, OwInstant, OwJoinPreview, OwJoined, OwJoinedMembership, OwKeyKind, OwLanding, OwLandingCluster, OwLandingGap, OwLandingGapKind, OwLandingMember, OwLandingMode, OwLandingOptions, OwLayout3dHow, OwLayout3dPart, OwLayoutAround, OwLayoutAroundOptions, OwLayoutAroundPoint, OwLayoutByKind, OwLayoutByLinks3d, OwLayoutByLinks3dOptions, OwLayoutGraph, OwLayoutOf, OwLayoutPoint, OwLensCutReason, OwLensMail, OwLensOptions, OwLensReader, OwLensReading, OwLensWorld, OwLinkEdit, OwLookupElement, OwLookupHit, OwLookupLink, OwLookupOptions, OwLookupReason, OwMapSpace, OwMapSpaceMap, OwMapSpaceOutReason, OwMapSpaceOutline, OwMapSpacePin, OwMapSpacePoint, OwMe, OwMediaTicket, OwMember, OwMemberLenses, OwMemberRole, OwMessageMember, OwMintedAiToken, OwMintedKey, OwMySeat, OwNamesMap, OwOpener, OwOpenerKind, OwOpenerState, OwOpenerSurface, OwOpenersOptions, OwPage, OwPaidBy, OwPhotoOptions, OwPhotoPlan, OwPlayerJoined, OwPreparedPhoto, OwProposal, OwProposalAccepted, OwProposalConflict, OwProposalHouse, OwProposalList, OwProposalQuery, OwProposalState, OwProposeInput, OwProposed, OwProposedMark, OwProposedNewElement, OwReadWorldFile, OwReadWorldFileOptions, OwReadingAids, OwReadingAidsCharter, OwReadingAidsDomain, OwReadingAidsGuide, OwReadingAidsHub, OwRecord, OwRecordMark, OwRecordStory, OwRemovalTicket, OwRemovedImage, OwRenderOptions, OwReportGroup, OwReportLine, OwReportLineOptions, OwReportLint, OwReportParentKind, OwReportThreads, OwResyncReason, OwReviewInput, OwReviewed, OwSearchResult, OwSearchResults, OwSeat, OwSeatCreated, OwSender, OwSenderStatus, OwServedReadingAids, OwSignInBegin, OwSignInBegun, OwSignInComplete, OwSignInReason, OwSignInResult, OwSignInStorage, OwSignedIn, OwSortAddToRow, OwSortAnswer, OwSortAskRow, OwSortLinkRow, OwSortMakeRow, OwSortNote, OwSortRef, OwSortRow, OwStrand, OwStrandSlot, OwStrandWorld, OwTalk, OwTool, OwToolNeeds, OwToolOpen, OwTrailGround, OwTrailHanger, OwTrailInput, OwTrailLayout, OwTrailPin, OwTrailPlace, OwTrailSettings, OwTrailSpiral, OwTrailTier, OwUploadedFile, OwUploadedImage, OwView, OwViewRow, OwViewsTable, OwWordPair, OwWork, OwWorkElement, OwWorkLint, OwWorkState, OwWorkWorld, OwWorldFileEntry, OwWorldFileReason, OwWorldFileRow, OwWorldFiles, OwWorldGraph, OwWorldIndex, OwWorldKeyMember, OwWorldKeyRow, OwWorldLens, OwWorldLensReading, OwWorldLenses, OwWorldLink, OwWorldMeta, OwWorldOrigin, OwWorldProducer, OwWorldProposalList, OwWorldProposalQuery, OwWorldProposalRow, OwWorldPublicPage, OwWorldSource, OwWriteDoor, OwWriteWorldFileOptions, OwWriteWorldFileReport, ParseError, ParseOptions, ParseResult, RevokeAllSessionsResponse, RevokeSessionResponse, SectionInfo, StepBreakdown, TokenConsumeParams, TokenConsumeResponse, TokenStatus, TokenTransport, WorldCalendar };
|
package/dist/index.js
CHANGED
|
@@ -1002,7 +1002,8 @@ var OwV2Client = class {
|
|
|
1002
1002
|
* membership and Character, the lenses it starts with, the world's reading aids, and the front
|
|
1003
1003
|
* door (`front_door`: the sponsor and their Character, your own Character, the Charter and the
|
|
1004
1004
|
* Objects it names, the seats you sponsor). The client's PIN is sent here when it has one, so a
|
|
1005
|
-
* wrong PIN shows on this call first, which makes it the connection test
|
|
1005
|
+
* wrong PIN shows on this call first, which makes it the connection test for a key that can write;
|
|
1006
|
+
* beside a key that cannot (a read key, a player's), onlyworlds.com never reads a PIN. An account token is
|
|
1006
1007
|
* refused before sending: it is not a member of one world.
|
|
1007
1008
|
*/
|
|
1008
1009
|
async me() {
|
|
@@ -1230,9 +1231,15 @@ var OwV2Client = class {
|
|
|
1230
1231
|
* `idempotencyKey`, derived from the key and the position (the ids the Python package mints),
|
|
1231
1232
|
* so a retry with the same key and items sends the same body; without one, a
|
|
1232
1233
|
* fresh UUIDv7. Ids you supply are kept.
|
|
1234
|
+
* With `createOnly: true` (sent as `create_only`), every item with an id is created as `create` creates it, never
|
|
1235
|
+
* replaced: an id the world already holds answers that item's slot `{status: 409}` with `id_conflict`, and the
|
|
1236
|
+
* element stays as it was. Left out or false, an item with an id held replaces it whole, as before.
|
|
1233
1237
|
*/
|
|
1234
1238
|
async bulk(items, opts = {}) {
|
|
1235
|
-
only("bulk", opts, ["atomic", "idempotencyKey"]);
|
|
1239
|
+
only("bulk", opts, ["atomic", "idempotencyKey", "createOnly"]);
|
|
1240
|
+
if (opts.createOnly !== void 0 && typeof opts.createOnly !== "boolean") {
|
|
1241
|
+
throw new TypeError("bulk: createOnly is true or false. Nothing was sent.");
|
|
1242
|
+
}
|
|
1236
1243
|
items.forEach((it, index) => refuseKnownOf(it.element, `bulk: items[${index}]`));
|
|
1237
1244
|
const body = {
|
|
1238
1245
|
items: items.map((it, index) => {
|
|
@@ -1242,7 +1249,8 @@ var OwV2Client = class {
|
|
|
1242
1249
|
}
|
|
1243
1250
|
return { type: it.type, element };
|
|
1244
1251
|
}),
|
|
1245
|
-
atomic: opts.atomic ?? false
|
|
1252
|
+
atomic: opts.atomic ?? false,
|
|
1253
|
+
...opts.createOnly === true ? { create_only: true } : {}
|
|
1246
1254
|
};
|
|
1247
1255
|
return this.request("POST", "/bulk/", {
|
|
1248
1256
|
write: true,
|