import type { GraphQLClient } from '../client.js'; import { type GridOwnershipQuery, type AssignGridOwnershipMutation, type TransferGridOwnershipMutation, type GridUserPermissionsQuery, type NearbyGridPermissionsQuery, type GridPermissionLimitsQuery, type GridGroupGrantsQuery, type CreateGridMutation, type DeleteGridMutation, type GrantGridPermissionsMutation, type RevokeGridPermissionsMutation, type SetGridPermissionLimitsMutation, type AssignGroupToGridMutation, type RevokeGroupFromGridMutation, type AssignGridOwnershipInput, type TransferGridOwnershipInput, type NearbyGridPermissionsInput, type CreateGridInput, type DeleteGridInput, type GrantGridPermissionsInput, type RevokeGridPermissionsInput, type SetGridPermissionLimitsInput, type AssignGroupToGridInput, type RevokeGroupFromGridInput } from '../generated/graphql.js'; /** * App grids + grid runtime-permission administration — exposed as * `client.gameApps` (and grouped under `client.admin`). * * Targets the **game-api**. A grid is a named 3D box of chunks that runtime * (voxel) permissions are scoped to. EVERY operation requires app-admin * (`manage_apps` on the owning org). Mutations recompute the materialized * effective ACL that Buddy enforces. `BigInt` ids are decimal strings. * * @throws {CrowdyGraphQLError} `UNAUTHENTICATED` / `FORBIDDEN` / `SCOPE_MISSING` * when the caller lacks `manage_apps`. */ export declare class GameAppsAPI { private readonly graphql; constructor(graphql: GraphQLClient); /** * Read the current first-class title record for a grid. Returns `null` when * the grid has no current or unexpired owner. Requires authentication. */ ownership(appId: string, gridId: string): Promise; /** * Assign an unowned grid to one user. This bootstrap path requires * `manage_apps` and assigns title only; grant runtime permissions separately. */ assignOwnership(input: AssignGridOwnershipInput): Promise; /** * Transfer title as the current user owner or an app admin. This security- * sensitive operation disables player modules, wipes their state, removes * the old owner's direct grants, and gives the new owner no implicit grants. */ transferOwnership(input: TransferGridOwnershipInput): Promise; /** * Read a user's effective (materialized) runtime permission keys on a grid. * * @param appId - App that owns the grid. * @param gridId - Grid to read permissions on. * @param userId - User whose effective permissions to read. * @returns The user's effective grid permissions. */ userPermissions(appId: string, gridId: string, userId: string): Promise; /** * List grids overlapping a chunk-coordinate box with a user's effective keys * on each. * * @param input - {@link NearbyGridPermissionsInput} (app, user, corners). * @returns The overlapping grids with effective permissions. */ nearbyPermissions(input: NearbyGridPermissionsInput): Promise; /** * Read the permission-key whitelist configured for a grid (empty = no limit). * * @param appId - App that owns the grid. * @param gridId - Grid whose whitelist to read. * @returns The grid's permission limits. */ permissionLimits(appId: string, gridId: string): Promise; /** * List a group's grants on a grid (rows of the group-grants input table). * * @param appId - App that owns the grid. * @param gridId - Grid to list group grants on. * @param groupId - Group whose grants to list. * @returns The group's grid grants. */ groupGrants(appId: string, gridId: string, groupId: string): Promise; /** * Create a grid (a named box of chunks). Returns a hybrid response: on success * `grid` is set and `error` is `NO_ERROR`; on failure `grid` is `null`. * * @param input - {@link CreateGridInput} (app + two opposite corners). * @returns The create-grid result. */ createGrid(input: CreateGridInput): Promise; /** * Delete a studio-created peer grid so its chunk box no longer blocks * overlapping grid creation. Returns a hybrid response: on success `gridId` * is set and `error` is `NO_ERROR`; on failure `gridId` is `null` and `error` * is a UDP-style code (e.g. `GRID_NOT_FOUND`, * `CANNOT_DELETE_DEFAULT_WORLD_GRID`, `GRID_HAS_NESTED_CHILDREN`). The * open-by-default world grid and any grid that still contains nested child * grids cannot be deleted. * * @param input - {@link DeleteGridInput} (the app + grid id to delete). * @returns The delete-grid result. */ deleteGrid(input: DeleteGridInput): Promise; /** * Grant runtime permission keys directly to a user on a grid; recomputes the * effective ACL. * * @param input - {@link GrantGridPermissionsInput}. * @returns The user's effective grid permissions after the grant. */ grantPermissions(input: GrantGridPermissionsInput): Promise; /** * Revoke a user's direct grants on a grid (omit keys to revoke all); * recomputes the effective ACL. * * @param input - {@link RevokeGridPermissionsInput}. * @returns The user's remaining effective grid permissions. */ revokePermissions(input: RevokeGridPermissionsInput): Promise; /** * Replace a grid's permission-key whitelist (empty = no limit); recomputes the * effective ACL. * * @param input - {@link SetGridPermissionLimitsInput}. * @returns The grid's updated permission limits. */ setPermissionLimits(input: SetGridPermissionLimitsInput): Promise; /** * Grant permission keys to a group (optionally a single role) on a grid; * recomputes the effective ACL. * * @param input - {@link AssignGroupToGridInput}. * @returns The group's grid grants after the assignment. */ assignGroup(input: AssignGroupToGridInput): Promise; /** * Revoke a group/role's grants on a grid (omit keys to revoke all); recomputes * the effective ACL. * * @param input - {@link RevokeGroupFromGridInput}. * @returns The group's remaining grid grants. */ revokeGroup(input: RevokeGroupFromGridInput): Promise; } //# sourceMappingURL=gameApps.d.ts.map