@crowdedkingdoms/crowdyjs 8.20.0 → 8.21.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/README.md +5 -1
- package/dist/domains/marketplace.d.ts +12 -1
- package/dist/domains/marketplace.d.ts.map +1 -1
- package/dist/domains/marketplace.js +18 -1
- package/dist/generated/graphql.d.ts +107 -0
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/kit/npcs.d.ts.map +1 -1
- package/dist/kit/social.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,10 @@ CrowdyJS v4 targets browsers by default and uses native `fetch`, `WebSocket`, `c
|
|
|
20
20
|
> `client.playerModel` (owner/grid-confined flexible data + automations), first-class grid
|
|
21
21
|
> ownership methods on `client.gameApps`, and app code-admission methods on
|
|
22
22
|
> `client.apps` require the 2026-07-20 game-api/management-api player-runtime
|
|
23
|
-
> schemas.
|
|
23
|
+
> schemas. Player-authorized one-chunk claims and owner release through
|
|
24
|
+
> `marketplace.claimGridChunk` / `marketplace.releaseClaimedGrid` require the
|
|
25
|
+
> corresponding 2026-07-22 Game API claim schema. Older servers reject only
|
|
26
|
+
> those operations during GraphQL validation.
|
|
24
27
|
|
|
25
28
|
> **Player-code authoring DX:** `playerCompute.setRequires`,
|
|
26
29
|
> `marketplace.trustGridAuthor`, self-authored `gridClientMods` fields, and
|
|
@@ -117,6 +120,7 @@ If `managementUrl` is omitted, the SDK falls back to `httpUrl` for backwards-com
|
|
|
117
120
|
| `client.compute` | **Compute Modules** — server-side Rust/WASM logic: author + deploy source (`upsertModule`, `deployVersion`, `waitForCompile`), triggers + policy, synchronous `invoke`, and monitoring (`moduleRuns`, `moduleStats`, `moduleLogs`, `appDiagnostics`). Modules run server-only; see [Compute Modules docs](https://docs.crowdedkingdoms.com/game-api/compute-modules). |
|
|
118
121
|
| `client.playerCompute` | Player-authored SERVER/CLIENT Rust/WASM bound to player-owned grids: deploy source, activate/deactivate, list modules/versions, and delete self-authored modules. |
|
|
119
122
|
| `client.playerModel` | Player-owned flexible model containers and grid-confined automations (`containers`, `createContainer`, `setProperty`, `automations`, `createAutomation`, …). |
|
|
123
|
+
| `client.marketplace` | Player-code store/install/consent flows plus player-authorized grid claims: `claimGridOwnership` preserves the existing-grid policy flow, while `claimGridChunk` atomically creates and owns one chunk under `SELF_CLAIM` and `releaseClaimedGrid` releases an eligible owner-created claim. |
|
|
120
124
|
| `client.udp` | UDP proxy subscriptions + spatial mutations (`sendActorUpdate`, `sendVoxelUpdate`, `sendAudioPacket`, `sendTextPacket`, `sendClientEvent`). |
|
|
121
125
|
| `client.realtime` | Connection status, manual `connect()` / `disconnect()`, `onStatus()` listener. |
|
|
122
126
|
| `client.refreshGameplayToken()` | Safely rotates an active game client's app token: disconnects the old-token UDP proxy, refreshes/stores the token, and opens the new-token proxy while existing realtime handlers resubscribe in place. |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GraphQLClient } from '../client.js';
|
|
2
|
-
import { type MarketplaceCreateAccountSessionMutation, type MarketplaceCreateAccountSessionMutationVariables, type MarketplaceCreateOrgAccountSessionMutation, type MarketplaceCreateOrgAccountSessionMutationVariables, type MarketplaceRenewAcquisitionMutationVariables, type MarketplaceTopUpAcquisitionMutationVariables, type MarketplaceRefundAcquisitionMutationVariables, type MarketplaceGridListingsQueryVariables, type MarketplacePurchaseGridMutationVariables, type MarketplaceSetListingPricingMutationVariables, type MarketplaceSetOrgShareMutationVariables, type MarketplaceBeginSellerOnboardingMutationVariables, type MarketplaceBeginOrgSellerOnboardingMutationVariables, type MarketplaceRequestPayoutMutationVariables, type MarketplaceSpendPayoutToWalletMutationVariables, type MarketplaceCommerceRiskQueueQueryVariables, type MarketplaceDecideRiskFlagMutationVariables, type MarketplaceCreateGridListingMutationVariables, type MarketplaceGridListingsQuery, type MarketplacePurchaseGridMutation, type MarketplaceBeginSellerOnboardingMutation, type MarketplaceBeginOrgSellerOnboardingMutation, type MarketplaceMySellerBalanceQuery, type MarketplaceCommerceRiskQueueQuery, type MarketplaceCreateGridListingMutation, type MarketplaceListingsQuery, type MarketplaceListingsQueryVariables, type MarketplaceListingVersionsQuery, type MarketplaceListingVersionsQueryVariables, type MarketplaceMyAcquisitionsQuery, type MarketplaceMyAcquisitionsQueryVariables, type MarketplaceMyInstallsQuery, type MarketplaceMyInstallsQueryVariables, type MarketplaceGridClientModsQuery, type MarketplaceGridClientModsQueryVariables, type MarketplaceClientArtifactQuery, type MarketplaceClientArtifactQueryVariables, type MarketplacePublishListingMutation, type MarketplacePublishListingMutationVariables, type MarketplacePublishVersionMutation, type MarketplacePublishVersionMutationVariables, type MarketplaceAcquireMutation, type MarketplaceAcquireMutationVariables, type MarketplaceInstallMutation, type MarketplaceInstallMutationVariables, type MarketplaceUninstallMutationVariables, type MarketplaceConsentGridClientModMutationVariables, type MarketplaceTrustGridAuthorMutation, type MarketplaceTrustGridAuthorMutationVariables, type MarketplaceGridClaimPolicyQuery, type MarketplaceGridClaimPolicyQueryVariables, type MarketplaceGridClaimRequestsQuery, type MarketplaceGridClaimRequestsQueryVariables, type MarketplaceClaimGridOwnershipMutation, type MarketplaceClaimGridOwnershipMutationVariables, type MarketplaceDecideGridClaimMutation, type MarketplaceDecideGridClaimMutationVariables, type MarketplaceIssueGridClaimInviteMutationVariables, type MarketplaceAdmissionQueueQuery, type MarketplaceAdmissionQueueQueryVariables, type MarketplaceAppListingsQuery, type MarketplaceAppListingsQueryVariables, type MarketplaceAppAcquisitionsQuery, type MarketplaceAppAcquisitionsQueryVariables, type MarketplaceTransferListingMutation, type MarketplaceTransferListingMutationVariables, type MarketplaceSetListingStatusMutation, type MarketplaceSetListingStatusMutationVariables, type MarketplaceSetGridClaimPolicyMutation, type MarketplaceSetGridClaimPolicyMutationVariables } from '../generated/graphql.js';
|
|
2
|
+
import { type MarketplaceCreateAccountSessionMutation, type MarketplaceCreateAccountSessionMutationVariables, type MarketplaceCreateOrgAccountSessionMutation, type MarketplaceCreateOrgAccountSessionMutationVariables, type MarketplaceRenewAcquisitionMutationVariables, type MarketplaceTopUpAcquisitionMutationVariables, type MarketplaceRefundAcquisitionMutationVariables, type MarketplaceGridListingsQueryVariables, type MarketplacePurchaseGridMutationVariables, type MarketplaceSetListingPricingMutationVariables, type MarketplaceSetOrgShareMutationVariables, type MarketplaceBeginSellerOnboardingMutationVariables, type MarketplaceBeginOrgSellerOnboardingMutationVariables, type MarketplaceRequestPayoutMutationVariables, type MarketplaceSpendPayoutToWalletMutationVariables, type MarketplaceCommerceRiskQueueQueryVariables, type MarketplaceDecideRiskFlagMutationVariables, type MarketplaceCreateGridListingMutationVariables, type MarketplaceGridListingsQuery, type MarketplacePurchaseGridMutation, type MarketplaceBeginSellerOnboardingMutation, type MarketplaceBeginOrgSellerOnboardingMutation, type MarketplaceMySellerBalanceQuery, type MarketplaceCommerceRiskQueueQuery, type MarketplaceCreateGridListingMutation, type MarketplaceListingsQuery, type MarketplaceListingsQueryVariables, type MarketplaceListingVersionsQuery, type MarketplaceListingVersionsQueryVariables, type MarketplaceMyAcquisitionsQuery, type MarketplaceMyAcquisitionsQueryVariables, type MarketplaceMyInstallsQuery, type MarketplaceMyInstallsQueryVariables, type MarketplaceGridClientModsQuery, type MarketplaceGridClientModsQueryVariables, type MarketplaceClientArtifactQuery, type MarketplaceClientArtifactQueryVariables, type MarketplacePublishListingMutation, type MarketplacePublishListingMutationVariables, type MarketplacePublishVersionMutation, type MarketplacePublishVersionMutationVariables, type MarketplaceAcquireMutation, type MarketplaceAcquireMutationVariables, type MarketplaceInstallMutation, type MarketplaceInstallMutationVariables, type MarketplaceUninstallMutationVariables, type MarketplaceConsentGridClientModMutationVariables, type MarketplaceTrustGridAuthorMutation, type MarketplaceTrustGridAuthorMutationVariables, type MarketplaceGridClaimPolicyQuery, type MarketplaceGridClaimPolicyQueryVariables, type MarketplaceGridClaimRequestsQuery, type MarketplaceGridClaimRequestsQueryVariables, type MarketplaceClaimGridOwnershipMutation, type MarketplaceClaimGridOwnershipMutationVariables, type MarketplaceClaimGridChunkMutation, type MarketplaceClaimGridChunkMutationVariables, type MarketplaceReleaseClaimedGridMutation, type MarketplaceReleaseClaimedGridMutationVariables, type MarketplaceDecideGridClaimMutation, type MarketplaceDecideGridClaimMutationVariables, type MarketplaceIssueGridClaimInviteMutationVariables, type MarketplaceAdmissionQueueQuery, type MarketplaceAdmissionQueueQueryVariables, type MarketplaceAppListingsQuery, type MarketplaceAppListingsQueryVariables, type MarketplaceAppAcquisitionsQuery, type MarketplaceAppAcquisitionsQueryVariables, type MarketplaceTransferListingMutation, type MarketplaceTransferListingMutationVariables, type MarketplaceSetListingStatusMutation, type MarketplaceSetListingStatusMutationVariables, type MarketplaceSetGridClaimPolicyMutation, type MarketplaceSetGridClaimPolicyMutationVariables } from '../generated/graphql.js';
|
|
3
3
|
/**
|
|
4
4
|
* The P4a player-code marketplace (free mode) — exposed as
|
|
5
5
|
* `client.marketplace`. Player-facing browse/publish/acquire/install/consent
|
|
@@ -67,6 +67,17 @@ export declare class MarketplaceAPI {
|
|
|
67
67
|
gridClaimRequests(variables: MarketplaceGridClaimRequestsQueryVariables): Promise<MarketplaceGridClaimRequestsQuery['gridClaimRequests']>;
|
|
68
68
|
/** Claim grid ownership under the app policy (server-authorized, D4). */
|
|
69
69
|
claimGridOwnership(variables: MarketplaceClaimGridOwnershipMutationVariables): Promise<MarketplaceClaimGridOwnershipMutation['claimGridOwnership']>;
|
|
70
|
+
/**
|
|
71
|
+
* Atomically create and claim one chunk under the app's SELF_CLAIM policy.
|
|
72
|
+
* Uses the authenticated player, rejects protected/overlapping chunks, and
|
|
73
|
+
* returns authoritative bounds plus effective build/mod permissions.
|
|
74
|
+
*/
|
|
75
|
+
claimGridChunk(variables: MarketplaceClaimGridChunkMutationVariables): Promise<MarketplaceClaimGridChunkMutation['claimGridChunk']>;
|
|
76
|
+
/**
|
|
77
|
+
* Release a one-chunk grid created by `claimGridChunk`. The authenticated
|
|
78
|
+
* caller must still own the claim; other grid origins cannot be released.
|
|
79
|
+
*/
|
|
80
|
+
releaseClaimedGrid(variables: MarketplaceReleaseClaimedGridMutationVariables): Promise<MarketplaceReleaseClaimedGridMutation['releaseClaimedGrid']>;
|
|
70
81
|
/** Approve or deny a pending claim request (approvers/staff). */
|
|
71
82
|
decideGridClaim(variables: MarketplaceDecideGridClaimMutationVariables): Promise<MarketplaceDecideGridClaimMutation['decideGridClaim']>;
|
|
72
83
|
/** Issue a standing claim invite (approvers/staff; INVITE mode). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/domains/marketplace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/domains/marketplace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAsCL,KAAK,uCAAuC,EAC5C,KAAK,gDAAgD,EACrD,KAAK,0CAA0C,EAC/C,KAAK,mDAAmD,EAOxD,KAAK,4CAA4C,EACjD,KAAK,4CAA4C,EACjD,KAAK,6CAA6C,EAClD,KAAK,qCAAqC,EAC1C,KAAK,wCAAwC,EAC7C,KAAK,6CAA6C,EAClD,KAAK,uCAAuC,EAC5C,KAAK,iDAAiD,EACtD,KAAK,oDAAoD,EACzD,KAAK,yCAAyC,EAC9C,KAAK,+CAA+C,EACpD,KAAK,0CAA0C,EAC/C,KAAK,0CAA0C,EAC/C,KAAK,6CAA6C,EAClD,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAC7C,KAAK,2CAA2C,EAChD,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,EACtC,KAAK,oCAA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A4B,CAAC,CACtE;IAQD,sFAAsF;IAChF,uBAAuB,CAC3B,SAAS,EAAE,mDAAmD,GAC7D,OAAO,CACR,0CAA0C,CAAC,+BAA+B,CAAC,CAC5E;IAQD,6EAA6E;IACvE,qBAAqB,CACzB,SAAS,EAAE,iDAAiD,GAC3D,OAAO,CAAC,wCAAwC,CAAC,uBAAuB,CAAC,CAAC;IAQ7E,8EAA8E;IACxE,wBAAwB,CAC5B,SAAS,EAAE,oDAAoD,GAC9D,OAAO,CACR,2CAA2C,CAAC,0BAA0B,CAAC,CACxE;IAQD,kDAAkD;IAC5C,eAAe,IAAI,OAAO,CAC9B,+BAA+B,CAAC,uBAAuB,CAAC,CACzD;IAQD,6EAA6E;IACvE,aAAa,CACjB,SAAS,GAAE,yCAA8C,GACxD,OAAO,CAAC,MAAM,CAAC;IAQlB,kFAAkF;IAC5E,mBAAmB,CACvB,SAAS,EAAE,+CAA+C,GACzD,OAAO,CAAC,MAAM,CAAC;IAQlB,+DAA+D;IACzD,iBAAiB,CACrB,SAAS,EAAE,0CAA0C,GACpD,OAAO,CAAC,iCAAiC,CAAC,mBAAmB,CAAC,CAAC;IAQlE,2DAA2D;IACrD,cAAc,CAClB,SAAS,EAAE,0CAA0C,GACpD,OAAO,CAAC,OAAO,CAAC;IAQnB,0EAA0E;IACpE,iBAAiB,CACrB,SAAS,EAAE,6CAA6C,GACvD,OAAO,CAAC,oCAAoC,CAAC,mBAAmB,CAAC,CAAC;CAOtE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MarketplaceListingsDocument, MarketplaceListingVersionsDocument, MarketplaceMyAcquisitionsDocument, MarketplaceMyInstallsDocument, MarketplaceGridClientModsDocument, MarketplaceClientArtifactDocument, MarketplacePublishListingDocument, MarketplacePublishVersionDocument, MarketplaceAcquireDocument, MarketplaceInstallDocument, MarketplaceUninstallDocument, MarketplaceConsentGridClientModDocument, MarketplaceTrustGridAuthorDocument, MarketplaceGridClaimPolicyDocument, MarketplaceGridClaimRequestsDocument, MarketplaceClaimGridOwnershipDocument, MarketplaceDecideGridClaimDocument, MarketplaceIssueGridClaimInviteDocument, MarketplaceAdmissionQueueDocument, MarketplaceAppListingsDocument, MarketplaceAppAcquisitionsDocument, MarketplaceTransferListingDocument, MarketplaceSetListingStatusDocument, MarketplaceSetGridClaimPolicyDocument, MarketplaceRenewAcquisitionDocument, MarketplaceTopUpAcquisitionDocument, MarketplaceRefundAcquisitionDocument, MarketplaceGridListingsDocument, MarketplacePurchaseGridDocument, MarketplaceSetListingPricingDocument, MarketplaceSetOrgShareDocument, MarketplaceBeginSellerOnboardingDocument, MarketplaceBeginOrgSellerOnboardingDocument, MarketplaceCreateAccountSessionDocument, MarketplaceCreateOrgAccountSessionDocument, MarketplaceMySellerBalanceDocument, MarketplaceRequestPayoutDocument, MarketplaceSpendPayoutToWalletDocument, MarketplaceCommerceRiskQueueDocument, MarketplaceDecideRiskFlagDocument, MarketplaceCreateGridListingDocument, } from '../generated/graphql.js';
|
|
1
|
+
import { MarketplaceListingsDocument, MarketplaceListingVersionsDocument, MarketplaceMyAcquisitionsDocument, MarketplaceMyInstallsDocument, MarketplaceGridClientModsDocument, MarketplaceClientArtifactDocument, MarketplacePublishListingDocument, MarketplacePublishVersionDocument, MarketplaceAcquireDocument, MarketplaceInstallDocument, MarketplaceUninstallDocument, MarketplaceConsentGridClientModDocument, MarketplaceTrustGridAuthorDocument, MarketplaceGridClaimPolicyDocument, MarketplaceGridClaimRequestsDocument, MarketplaceClaimGridOwnershipDocument, MarketplaceClaimGridChunkDocument, MarketplaceReleaseClaimedGridDocument, MarketplaceDecideGridClaimDocument, MarketplaceIssueGridClaimInviteDocument, MarketplaceAdmissionQueueDocument, MarketplaceAppListingsDocument, MarketplaceAppAcquisitionsDocument, MarketplaceTransferListingDocument, MarketplaceSetListingStatusDocument, MarketplaceSetGridClaimPolicyDocument, MarketplaceRenewAcquisitionDocument, MarketplaceTopUpAcquisitionDocument, MarketplaceRefundAcquisitionDocument, MarketplaceGridListingsDocument, MarketplacePurchaseGridDocument, MarketplaceSetListingPricingDocument, MarketplaceSetOrgShareDocument, MarketplaceBeginSellerOnboardingDocument, MarketplaceBeginOrgSellerOnboardingDocument, MarketplaceCreateAccountSessionDocument, MarketplaceCreateOrgAccountSessionDocument, MarketplaceMySellerBalanceDocument, MarketplaceRequestPayoutDocument, MarketplaceSpendPayoutToWalletDocument, MarketplaceCommerceRiskQueueDocument, MarketplaceDecideRiskFlagDocument, MarketplaceCreateGridListingDocument, } from '../generated/graphql.js';
|
|
2
2
|
/**
|
|
3
3
|
* The P4a player-code marketplace (free mode) — exposed as
|
|
4
4
|
* `client.marketplace`. Player-facing browse/publish/acquire/install/consent
|
|
@@ -125,6 +125,23 @@ export class MarketplaceAPI {
|
|
|
125
125
|
const data = await this.game.request(MarketplaceClaimGridOwnershipDocument, variables);
|
|
126
126
|
return data.claimGridOwnership;
|
|
127
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Atomically create and claim one chunk under the app's SELF_CLAIM policy.
|
|
130
|
+
* Uses the authenticated player, rejects protected/overlapping chunks, and
|
|
131
|
+
* returns authoritative bounds plus effective build/mod permissions.
|
|
132
|
+
*/
|
|
133
|
+
async claimGridChunk(variables) {
|
|
134
|
+
const data = await this.game.request(MarketplaceClaimGridChunkDocument, variables);
|
|
135
|
+
return data.claimGridChunk;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Release a one-chunk grid created by `claimGridChunk`. The authenticated
|
|
139
|
+
* caller must still own the claim; other grid origins cannot be released.
|
|
140
|
+
*/
|
|
141
|
+
async releaseClaimedGrid(variables) {
|
|
142
|
+
const data = await this.game.request(MarketplaceReleaseClaimedGridDocument, variables);
|
|
143
|
+
return data.releaseClaimedGrid;
|
|
144
|
+
}
|
|
128
145
|
/** Approve or deny a pending claim request (approvers/staff). */
|
|
129
146
|
async decideGridClaim(variables) {
|
|
130
147
|
const data = await this.game.request(MarketplaceDecideGridClaimDocument, variables);
|
|
@@ -904,6 +904,24 @@ export type Chunk = {
|
|
|
904
904
|
/** BASE64-encoded binary blob of the dense voxel-type grid. When present, the DECODED buffer is exactly 4096 bytes: one unsigned byte (voxel type 0-255) per voxel, indexed as x + y*16 + z*256 with x,y,z in 0-15. Null when the chunk has no voxel grid yet. Decode from base64 before reading. */
|
|
905
905
|
voxels: Maybe<Scalars['String']['output']>;
|
|
906
906
|
};
|
|
907
|
+
/** Authoritative result of an ordinary player claiming one chunk as a new grid under SELF_CLAIM. Grid creation, title assignment, and direct ACL grants are committed atomically. */
|
|
908
|
+
export type ChunkClaimResult = {
|
|
909
|
+
__typename?: 'ChunkClaimResult';
|
|
910
|
+
/** Full effective runtime permission-key set materialized for the caller on the new grid after grid limits are applied. */
|
|
911
|
+
effectivePermissionKeys: Array<Scalars['String']['output']>;
|
|
912
|
+
/** Id of the one-chunk grid created for this claim. */
|
|
913
|
+
gridId: Scalars['BigInt']['output'];
|
|
914
|
+
/** High corner of the claimed grid. It equals lowChunk because a player claim covers exactly one chunk. */
|
|
915
|
+
highChunk: ChunkCoordinates;
|
|
916
|
+
/** Low corner of the claimed grid. It equals highChunk because a player claim covers exactly one chunk. */
|
|
917
|
+
lowChunk: ChunkCoordinates;
|
|
918
|
+
/** True when the effective ACL contains both write and run permission for at least one player-code target (server or client). */
|
|
919
|
+
moddable: Scalars['Boolean']['output'];
|
|
920
|
+
/** New current user ownership record created atomically with the grid. */
|
|
921
|
+
ownership: GridOwnership;
|
|
922
|
+
/** App claim policy applied by the server. This mutation succeeds only for SELF_CLAIM. */
|
|
923
|
+
policy: GridClaimPolicy;
|
|
924
|
+
};
|
|
907
925
|
/** Integer (x, y, z) address of a 16x16x16-voxel chunk within an app's world grid. Each unit step moves one whole chunk (16 voxels) along that axis. Components are signed 64-bit integers serialized as decimal strings (see the BigInt scalar). */
|
|
908
926
|
export type ChunkCoordinates = {
|
|
909
927
|
__typename?: 'ChunkCoordinates';
|
|
@@ -3566,6 +3584,8 @@ export type Mutation = {
|
|
|
3566
3584
|
changePassword: Scalars['Boolean']['output'];
|
|
3567
3585
|
/** Self-service: the authenticated caller claims access to an app via its free, open-by-default tier. Requires authentication only (no org membership needed). ENTITLEMENT CHANGE: grants the free default tier as a 'system' grant and notifies the game API. Idempotent: returns the existing row if already granted, and never overrides a prior revoke. Errors if the app has no free default tier or is archived. */
|
|
3568
3586
|
claimFreeAppAccess: AppUserAccess;
|
|
3587
|
+
/** Claim one currently unclaimed chunk as a new player-owned grid. Requires an ordinary app-scoped player token and active app access, but never manage_apps. The app's policy must be SELF_CLAIM. The server validates the app's grid assignment and peer-overlap rules, then atomically creates a one-chunk grid, assigns current-user ownership, grants access/update_voxel_data/use_voice_chat/teleport plus player-code keys already carried by the caller's tier, and materializes the effective ACL. Conflicts and policy denials throw GraphQL errors; no partial grid, ownership, or grant rows remain. */
|
|
3588
|
+
claimGridChunk: ChunkClaimResult;
|
|
3569
3589
|
/** Claim grid ownership under the app's claim policy (D4, server-authorized — no client manage_apps involved). SELF_CLAIM assigns ownership immediately; APPROVAL creates a pending request for designated approvers; INVITE requires a standing invite (consumed on use); MARKETPLACE_ONLY refuses (ownership arrives only via grid purchase, P4b). The grid must exist and have no current owner; game rules gate who may attempt a claim. */
|
|
3570
3590
|
claimGridOwnership: GridClaimResult;
|
|
3571
3591
|
/** Complete a magic-link sign-in with the emailed token; returns a session AuthResponse. Public (the token authorizes the call); throws if invalid/expired/used. */
|
|
@@ -3808,6 +3828,8 @@ export type Mutation = {
|
|
|
3808
3828
|
refundPlayerCodeAcquisition: Scalars['Int']['output'];
|
|
3809
3829
|
/** Registers a new email + password account: creates the (initially unconfirmed) account, emails a confirmation link, and returns an AuthResponse with a session `token` for immediate use (send as `Authorization: Bearer <token>`). If an account already exists for the email (e.g. created via magic link/social), the password is attached pending email confirmation and no session is returned (throws CONFLICT). Public. */
|
|
3810
3830
|
register: AuthResponse;
|
|
3831
|
+
/** Release a one-chunk grid previously created through claimGridChunk. Requires an ordinary app-scoped player token and the caller must still be its current user owner. Refuses foreign grids, studio/marketplace grids, and grids assigned through legacy claimGridOwnership. Atomically removes active install attachments, self-claim ownership, direct/effective ACL rows, and the grid so its chunk can be claimed again. Player modules on the grid are deleted by the grid cascade. */
|
|
3832
|
+
releaseClaimedGrid: ReleaseClaimedGridResult;
|
|
3811
3833
|
/** Remove a member from a channel. Requires the 'manage_members' channel permission, except that any member may remove themselves. Notifies Buddy to stop routing to the removed member. Returns true if a membership was removed. */
|
|
3812
3834
|
removeChannelMember: Scalars['Boolean']['output'];
|
|
3813
3835
|
/** Removes a user from an organization. Requires the 'manage_members' permission on the org (super admins bypass). DESTRUCTIVE: revokes the user's membership and role assignments in that org. Returns false if the user was not a member. */
|
|
@@ -4046,6 +4068,10 @@ export type MutationChangePasswordArgs = {
|
|
|
4046
4068
|
export type MutationClaimFreeAppAccessArgs = {
|
|
4047
4069
|
appId: Scalars['BigInt']['input'];
|
|
4048
4070
|
};
|
|
4071
|
+
export type MutationClaimGridChunkArgs = {
|
|
4072
|
+
appId: Scalars['BigInt']['input'];
|
|
4073
|
+
chunk: ChunkCoordinatesInput;
|
|
4074
|
+
};
|
|
4049
4075
|
export type MutationClaimGridOwnershipArgs = {
|
|
4050
4076
|
appId: Scalars['BigInt']['input'];
|
|
4051
4077
|
gridId: Scalars['BigInt']['input'];
|
|
@@ -4467,6 +4493,10 @@ export type MutationRefundPlayerCodeAcquisitionArgs = {
|
|
|
4467
4493
|
export type MutationRegisterArgs = {
|
|
4468
4494
|
registerUserInput: RegisterUserInput;
|
|
4469
4495
|
};
|
|
4496
|
+
export type MutationReleaseClaimedGridArgs = {
|
|
4497
|
+
appId: Scalars['BigInt']['input'];
|
|
4498
|
+
gridId: Scalars['BigInt']['input'];
|
|
4499
|
+
};
|
|
4470
4500
|
export type MutationRemoveChannelMemberArgs = {
|
|
4471
4501
|
groupId: Scalars['BigInt']['input'];
|
|
4472
4502
|
userId: Scalars['BigInt']['input'];
|
|
@@ -6917,6 +6947,20 @@ export type RegisterUserInput = {
|
|
|
6917
6947
|
/** Password for the new account (min 8 characters). */
|
|
6918
6948
|
password: Scalars['String']['input'];
|
|
6919
6949
|
};
|
|
6950
|
+
/** Result of releasing a grid created by the caller through claimGridChunk. The ownership, direct/effective ACL, and grid have been removed atomically, making its chunk claimable again. */
|
|
6951
|
+
export type ReleaseClaimedGridResult = {
|
|
6952
|
+
__typename?: 'ReleaseClaimedGridResult';
|
|
6953
|
+
/** Id of the self-claimed grid that was removed. */
|
|
6954
|
+
gridId: Scalars['BigInt']['output'];
|
|
6955
|
+
/** High corner of the removed one-chunk grid. */
|
|
6956
|
+
highChunk: ChunkCoordinates;
|
|
6957
|
+
/** Low corner of the removed one-chunk grid. */
|
|
6958
|
+
lowChunk: ChunkCoordinates;
|
|
6959
|
+
/** Claim policy under which the removed grid was created. */
|
|
6960
|
+
policy: GridClaimPolicy;
|
|
6961
|
+
/** True after the ownership, ACL rows, and grid were removed in one committed transaction. */
|
|
6962
|
+
released: Scalars['Boolean']['output'];
|
|
6963
|
+
};
|
|
6920
6964
|
/** Request an emailed magic-link to sign in (passwordless). */
|
|
6921
6965
|
export type RequestLoginLinkInput = {
|
|
6922
6966
|
/** Email address to send the one-time sign-in link to. */
|
|
@@ -13647,6 +13691,67 @@ export type MarketplaceClaimGridOwnershipMutation = {
|
|
|
13647
13691
|
claimRequestId: string | null;
|
|
13648
13692
|
};
|
|
13649
13693
|
};
|
|
13694
|
+
export type MarketplaceClaimGridChunkMutationVariables = Exact<{
|
|
13695
|
+
appId: Scalars['BigInt']['input'];
|
|
13696
|
+
chunk: ChunkCoordinatesInput;
|
|
13697
|
+
}>;
|
|
13698
|
+
export type MarketplaceClaimGridChunkMutation = {
|
|
13699
|
+
__typename?: 'Mutation';
|
|
13700
|
+
claimGridChunk: {
|
|
13701
|
+
__typename?: 'ChunkClaimResult';
|
|
13702
|
+
gridId: string;
|
|
13703
|
+
policy: GridClaimPolicy;
|
|
13704
|
+
moddable: boolean;
|
|
13705
|
+
effectivePermissionKeys: Array<string>;
|
|
13706
|
+
lowChunk: {
|
|
13707
|
+
__typename?: 'ChunkCoordinates';
|
|
13708
|
+
x: string;
|
|
13709
|
+
y: string;
|
|
13710
|
+
z: string;
|
|
13711
|
+
};
|
|
13712
|
+
highChunk: {
|
|
13713
|
+
__typename?: 'ChunkCoordinates';
|
|
13714
|
+
x: string;
|
|
13715
|
+
y: string;
|
|
13716
|
+
z: string;
|
|
13717
|
+
};
|
|
13718
|
+
ownership: {
|
|
13719
|
+
__typename?: 'GridOwnership';
|
|
13720
|
+
gridOwnershipId: string;
|
|
13721
|
+
ownerKind: GridOwnerKind;
|
|
13722
|
+
ownerRef: string;
|
|
13723
|
+
tenure: GridTenure;
|
|
13724
|
+
acquiredVia: string;
|
|
13725
|
+
acquiredAt: string;
|
|
13726
|
+
expiresAt: string | null;
|
|
13727
|
+
};
|
|
13728
|
+
};
|
|
13729
|
+
};
|
|
13730
|
+
export type MarketplaceReleaseClaimedGridMutationVariables = Exact<{
|
|
13731
|
+
appId: Scalars['BigInt']['input'];
|
|
13732
|
+
gridId: Scalars['BigInt']['input'];
|
|
13733
|
+
}>;
|
|
13734
|
+
export type MarketplaceReleaseClaimedGridMutation = {
|
|
13735
|
+
__typename?: 'Mutation';
|
|
13736
|
+
releaseClaimedGrid: {
|
|
13737
|
+
__typename?: 'ReleaseClaimedGridResult';
|
|
13738
|
+
gridId: string;
|
|
13739
|
+
policy: GridClaimPolicy;
|
|
13740
|
+
released: boolean;
|
|
13741
|
+
lowChunk: {
|
|
13742
|
+
__typename?: 'ChunkCoordinates';
|
|
13743
|
+
x: string;
|
|
13744
|
+
y: string;
|
|
13745
|
+
z: string;
|
|
13746
|
+
};
|
|
13747
|
+
highChunk: {
|
|
13748
|
+
__typename?: 'ChunkCoordinates';
|
|
13749
|
+
x: string;
|
|
13750
|
+
y: string;
|
|
13751
|
+
z: string;
|
|
13752
|
+
};
|
|
13753
|
+
};
|
|
13754
|
+
};
|
|
13650
13755
|
export type MarketplaceDecideGridClaimMutationVariables = Exact<{
|
|
13651
13756
|
appId: Scalars['BigInt']['input'];
|
|
13652
13757
|
requestId: Scalars['String']['input'];
|
|
@@ -17219,6 +17324,8 @@ export declare const MarketplaceConsentGridClientModDocument: DocumentNode<Marke
|
|
|
17219
17324
|
export declare const MarketplaceGridClaimPolicyDocument: DocumentNode<MarketplaceGridClaimPolicyQuery, MarketplaceGridClaimPolicyQueryVariables>;
|
|
17220
17325
|
export declare const MarketplaceGridClaimRequestsDocument: DocumentNode<MarketplaceGridClaimRequestsQuery, MarketplaceGridClaimRequestsQueryVariables>;
|
|
17221
17326
|
export declare const MarketplaceClaimGridOwnershipDocument: DocumentNode<MarketplaceClaimGridOwnershipMutation, MarketplaceClaimGridOwnershipMutationVariables>;
|
|
17327
|
+
export declare const MarketplaceClaimGridChunkDocument: DocumentNode<MarketplaceClaimGridChunkMutation, MarketplaceClaimGridChunkMutationVariables>;
|
|
17328
|
+
export declare const MarketplaceReleaseClaimedGridDocument: DocumentNode<MarketplaceReleaseClaimedGridMutation, MarketplaceReleaseClaimedGridMutationVariables>;
|
|
17222
17329
|
export declare const MarketplaceDecideGridClaimDocument: DocumentNode<MarketplaceDecideGridClaimMutation, MarketplaceDecideGridClaimMutationVariables>;
|
|
17223
17330
|
export declare const MarketplaceIssueGridClaimInviteDocument: DocumentNode<MarketplaceIssueGridClaimInviteMutation, MarketplaceIssueGridClaimInviteMutationVariables>;
|
|
17224
17331
|
export declare const MarketplaceAdmissionQueueDocument: DocumentNode<MarketplaceAdmissionQueueQuery, MarketplaceAdmissionQueueQueryVariables>;
|