@crowdedkingdoms/crowdyjs 8.0.0 → 8.1.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.
Files changed (59) hide show
  1. package/README.md +92 -15
  2. package/dist/client.d.ts +8 -0
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +5 -0
  5. package/dist/crowdy-client.d.ts +22 -0
  6. package/dist/crowdy-client.d.ts.map +1 -1
  7. package/dist/crowdy-client.js +21 -0
  8. package/dist/domains/gameModel.d.ts +54 -3
  9. package/dist/domains/gameModel.d.ts.map +1 -1
  10. package/dist/domains/gameModel.js +67 -4
  11. package/dist/domains/host.d.ts +14 -3
  12. package/dist/domains/host.d.ts.map +1 -1
  13. package/dist/domains/host.js +17 -3
  14. package/dist/domains/organizations.d.ts +3 -3
  15. package/dist/domains/organizations.js +3 -3
  16. package/dist/domains/quotas.d.ts +1 -1
  17. package/dist/domains/quotas.js +1 -1
  18. package/dist/domains/udp.d.ts +28 -17
  19. package/dist/domains/udp.d.ts.map +1 -1
  20. package/dist/domains/udp.js +28 -17
  21. package/dist/generated/graphql.d.ts +366 -6
  22. package/dist/generated/graphql.d.ts.map +1 -1
  23. package/dist/generated/graphql.js +13 -8
  24. package/dist/index.d.ts +3 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +3 -1
  27. package/dist/kit/blueprints.d.ts +259 -0
  28. package/dist/kit/blueprints.d.ts.map +1 -0
  29. package/dist/kit/blueprints.js +480 -0
  30. package/dist/kit/index.d.ts +7 -0
  31. package/dist/kit/index.d.ts.map +1 -0
  32. package/dist/kit/index.js +6 -0
  33. package/dist/kit/inventory.d.ts +111 -0
  34. package/dist/kit/inventory.d.ts.map +1 -0
  35. package/dist/kit/inventory.js +158 -0
  36. package/dist/kit/kit.d.ts +96 -0
  37. package/dist/kit/kit.d.ts.map +1 -0
  38. package/dist/kit/kit.js +98 -0
  39. package/dist/kit/npcs.d.ts +182 -0
  40. package/dist/kit/npcs.d.ts.map +1 -0
  41. package/dist/kit/npcs.js +106 -0
  42. package/dist/kit/objects.d.ts +108 -0
  43. package/dist/kit/objects.d.ts.map +1 -0
  44. package/dist/kit/objects.js +110 -0
  45. package/dist/kit/shared.d.ts +32 -0
  46. package/dist/kit/shared.d.ts.map +1 -0
  47. package/dist/kit/shared.js +39 -0
  48. package/dist/lb-cookie-store.d.ts +20 -0
  49. package/dist/lb-cookie-store.d.ts.map +1 -0
  50. package/dist/lb-cookie-store.js +73 -0
  51. package/dist/realtime.d.ts +20 -5
  52. package/dist/realtime.d.ts.map +1 -1
  53. package/dist/realtime.js +38 -0
  54. package/dist/types.d.ts +22 -6
  55. package/dist/types.d.ts.map +1 -1
  56. package/dist/world.d.ts +13 -8
  57. package/dist/world.d.ts.map +1 -1
  58. package/dist/world.js +13 -8
  59. package/package.json +6 -4
@@ -211,6 +211,8 @@ export type App = {
211
211
  orgId: Scalars['BigInt']['output'];
212
212
  /** OAuth-style redirect-URI allow-list for the portal handoff. A portal authorization code’s redirect_uri must match one of these by origin; empty disallows browser portal entry to this app. */
213
213
  redirectUris: Array<Scalars['String']['output']>;
214
+ /** Reserved sustained egress in bytes/s for shared apps. 0 = free tier; >0 bypasses the ~1 MB/s rate limit and incurs a monthly reservation fee. */
215
+ reservedEgressBytesPerSec: Scalars['BigInt']['output'];
214
216
  /** When runtimeStatus is not "active", why the runtime is gated: "free_allowance", "insufficient_funds", "spend_cap", or "subscription_lapsed". Null when active. */
215
217
  runtimeDenialReason: Maybe<Scalars['String']['output']>;
216
218
  /** Shared-environment runtime gate, mirrored to the game DB and enforced by game-api + Buddy: "active", "grace", "denied", or "suspended". */
@@ -409,7 +411,7 @@ export type AppSharedSubscription = {
409
411
  export declare enum AppStatus {
410
412
  /** Soft-deleted via archiveApp: retained but read-only and excluded from the marketplace. Reversible by setting status back to DRAFT or LIVE. */
411
413
  Archived = "ARCHIVED",
412
- /** Work-in-progress: invisible to non-members and never listed in the marketplace. Default for newly created apps. */
414
+ /** Work-in-progress: invisible to non-members and never listed in the marketplace. Selectable manually via updateApp; new apps default to LIVE. */
413
415
  Draft = "DRAFT",
414
416
  /** Published and purchasable/playable; eligible for the public marketplace when visibility=PUBLIC. */
415
417
  Live = "LIVE"
@@ -432,6 +434,26 @@ export type AppTokenResponse = {
432
434
  /** Opaque app-scoped gameplay token. Send to the target app's Game API as `Authorization: Bearer <token>` (and in the realtime `connectionParams`). Do NOT send it to the Management API for anything other than `me`/`refreshAppToken`. */
433
435
  token: Scalars['String']['output'];
434
436
  };
437
+ /** End-of-month egress projection for one shared app from linear extrapolation of calendar-month usage so far. */
438
+ export type AppUsageProjection = {
439
+ __typename?: 'AppUsageProjection';
440
+ /** App id (as a string). */
441
+ appId: Scalars['String']['output'];
442
+ /** Egress bytes recorded so far this calendar month (from app_monthly_egress). */
443
+ currentEgressBytes: Scalars['String']['output'];
444
+ /** Fractional UTC days elapsed since the calendar month started. */
445
+ daysElapsed: Scalars['Float']['output'];
446
+ /** Per-app free monthly egress allowance in bytes (5 decimal GB). */
447
+ freeAllowanceBytes: Scalars['String']['output'];
448
+ /** True when projected egress exceeds the free allowance, or null when insufficient data. */
449
+ onTrackToExceed: Maybe<Scalars['Boolean']['output']>;
450
+ /** Projected end-of-month egress bytes (linear extrapolation), or null when insufficient data. */
451
+ projectedBytes: Maybe<Scalars['String']['output']>;
452
+ /** Projected usage as a percentage of the free allowance, or null when insufficient data. */
453
+ projectedPctOfFree: Maybe<Scalars['Float']['output']>;
454
+ /** True when at least 3 days have elapsed in the month (projection is meaningful). */
455
+ sufficientData: Scalars['Boolean']['output'];
456
+ };
435
457
  /** Aggregate byte totals for one app over the requested window. All *Bytes fields are string counters (may exceed Int range). */
436
458
  export type AppUsageRollupRow = {
437
459
  __typename?: 'AppUsageRollupRow';
@@ -560,6 +582,12 @@ export type AssignGroupToGridInput = {
560
582
  /** Runtime permission key strings to grant to the group/role. Each must be a known key in runtime_permissions, unique, and at most 64 chars. */
561
583
  permissionKeys: Array<Scalars['String']['input']>;
562
584
  };
585
+ /** Whether the account has a password set. Does not reveal whether the email is registered. */
586
+ export type AuthMethodResult = {
587
+ __typename?: 'AuthMethodResult';
588
+ /** True when the account exists and has a password hash; false otherwise (including unknown emails). */
589
+ hasPassword: Scalars['Boolean']['output'];
590
+ };
563
591
  /** Result of a successful login or registration: a session token plus the authenticated user. */
564
592
  export type AuthResponse = {
565
593
  __typename?: 'AuthResponse';
@@ -671,6 +699,11 @@ export type ChannelMessageNotification = {
671
699
  /** The sending actor's UUID. */
672
700
  uuid: Scalars['String']['output'];
673
701
  };
702
+ /** Check whether an account has password sign-in enabled (email-first adaptive login). */
703
+ export type CheckAuthMethodInput = {
704
+ /** Email address to check. */
705
+ email: Scalars['String']['input'];
706
+ };
674
707
  export type Checkout = {
675
708
  __typename?: 'Checkout';
676
709
  /** Charge amount in minor currency units (cents) of `currency`, as a BigInt decimal string; null when the purpose carries no amount. */
@@ -965,6 +998,8 @@ export type CksEnvironment = {
965
998
  graphqlBillingTier: Maybe<Scalars['Int']['output']>;
966
999
  /** Opaque environment UUID (cks_environments.id). */
967
1000
  id: Scalars['String']['output'];
1001
+ /** True for the single platform-owned shared environment (slug 'shared') that hosts the shared game-api serving apps with deploymentTarget='shared'. Customer environments are always false. */
1002
+ isShared: Scalars['Boolean']['output'];
968
1003
  loadBalancerCount: Scalars['Int']['output'];
969
1004
  /** Release version actually observed running. Lags desiredEnvironmentVersion while a deploy is in progress. */
970
1005
  observedEnvironmentVersion: Maybe<Scalars['String']['output']>;
@@ -1620,7 +1655,7 @@ export type CreateAppInput = {
1620
1655
  orgId: Scalars['BigInt']['input'];
1621
1656
  /** URL-safe slug (1-128 chars, lowercase letters, numbers and dashes only). Must be unique within the org. */
1622
1657
  slug: Scalars['String']['input'];
1623
- /** Optional initial lifecycle status. Defaults to DRAFT when omitted. */
1658
+ /** Optional initial lifecycle status. Defaults to LIVE when omitted. */
1624
1659
  status?: InputMaybe<AppStatus>;
1625
1660
  /** Optional initial visibility. Defaults to PUBLIC when omitted. */
1626
1661
  visibility?: InputMaybe<AppVisibility>;
@@ -1711,6 +1746,8 @@ export type CreateEnvironmentInput = {
1711
1746
  gameApiMinServers?: InputMaybe<Scalars['Int']['input']>;
1712
1747
  /** GraphQL billing tier level from graphqlBillingTiers. Defaults to tier 1 for dedicated environments. */
1713
1748
  graphqlBillingTier?: InputMaybe<Scalars['Int']['input']>;
1749
+ /** Super-admin only: designate this as the single platform-owned shared environment (slug 'shared') that hosts the shared game-api for apps with deploymentTarget='shared'. Must be a dedicated environment. Customers cannot set this; the management API rejects it for non-super-admins. */
1750
+ isShared?: InputMaybe<Scalars['Boolean']['input']>;
1714
1751
  /** Number of Caddy load-balancer VMs in front of the game-api fleet (min 1). Required for dedicated; ignored for dev_single. */
1715
1752
  loadBalancerCount?: InputMaybe<Scalars['Int']['input']>;
1716
1753
  /** Organization id (BigInt) that will own and be billed for the environment. */
@@ -1926,6 +1963,8 @@ export type ExchangePortalCodeInput = {
1926
1963
  /** An org's free shared app slot quota usage. */
1927
1964
  export type FreeAppQuota = {
1928
1965
  __typename?: 'FreeAppQuota';
1966
+ /** Shared apps with free-slot / reserved / paid credit status. */
1967
+ apps: Array<FreeAppQuotaApp>;
1929
1968
  /** Organization id (BigInt). */
1930
1969
  orgId: Scalars['BigInt']['output'];
1931
1970
  /** Apps on a paid subscription (do not consume free slots). */
@@ -1934,9 +1973,29 @@ export type FreeAppQuota = {
1934
1973
  quota: Scalars['Int']['output'];
1935
1974
  /** Free slots still available (quota − usedFree). */
1936
1975
  remainingFree: Scalars['Int']['output'];
1976
+ /** Apps with reserved throughput (premium; do not consume free slots). */
1977
+ reservedApps: Scalars['Int']['output'];
1937
1978
  /** Free slots currently in use. */
1938
1979
  usedFree: Scalars['Int']['output'];
1939
1980
  };
1981
+ /** A shared app row in the org free-slot portfolio (free / reserved / paid credit). */
1982
+ export type FreeAppQuotaApp = {
1983
+ __typename?: 'FreeAppQuotaApp';
1984
+ /** App id (BigInt). */
1985
+ appId: Scalars['BigInt']['output'];
1986
+ /** True when the app consumes a free org slot (shared, not archived, no active subscription, no reserved throughput). */
1987
+ consumesFreeSlot: Scalars['Boolean']['output'];
1988
+ /** How this app is credited: 'free_slot', 'reserved', or 'paid_subscription'. */
1989
+ creditKind: Scalars['String']['output'];
1990
+ /** True when the app has an active legacy shared subscription. */
1991
+ hasActiveSubscription: Scalars['Boolean']['output'];
1992
+ /** App display name. */
1993
+ name: Scalars['String']['output'];
1994
+ /** Reserved egress throughput in bytes/sec (0 when none). */
1995
+ reservedEgressBytesPerSec: Scalars['BigInt']['output'];
1996
+ /** URL slug for the app. */
1997
+ slug: Scalars['String']['output'];
1998
+ };
1940
1999
  /** Status of the recurring free-play window during which gameplay is open without entitlement. */
1941
2000
  export type FreePlayWindowInfo = {
1942
2001
  __typename?: 'FreePlayWindowInfo';
@@ -1980,6 +2039,19 @@ export type FunctionParamInput = {
1980
2039
  /** int | float | string | bool | array | object | container_ref */
1981
2040
  valueType: Scalars['String']['input'];
1982
2041
  };
2042
+ /** A declarative grid-permission effect the function applies TRANSACTIONALLY with its property mutations: grant or revoke runtime grid permissions (the same ACL Buddy enforces on movement/voxel writes) driven by game logic. Expressions are compiled server-side and evaluated in the invocation context (params plus the injected $caller_user_id / $self_owner_id / $session_id / $current_turn_user_id). If an effect fails, the whole invocation rolls back. Applied effects are recorded on the invocation event. */
2043
+ export type FunctionPermissionEffectInput = {
2044
+ /** 'grant' (upsert direct grants, optionally expiring) or 'revoke' (delete direct grants for the listed keys). */
2045
+ action: Scalars['String']['input'];
2046
+ /** Expression resolving the grid id (int) the permissions apply to, e.g. "self.grid_id". The grid must belong to the app. */
2047
+ gridIdExpression: Scalars['String']['input'];
2048
+ /** Runtime permission keys to grant/revoke (validated against the runtime_permissions catalog, e.g. 'access', 'teleport', 'update_voxel_data', 'use_voice_chat'). */
2049
+ permissionKeys: Array<Scalars['String']['input']>;
2050
+ /** Grant only: optional expression resolving a TTL in seconds (int > 0) after which the grant expires (rentals/leases), e.g. '86400'. Omit for a non-expiring grant. */
2051
+ ttlSecondsExpression?: InputMaybe<Scalars['String']['input']>;
2052
+ /** Expression resolving the target user id (int), e.g. "$caller_user_id" or "self.owner_user_id". */
2053
+ userExpression: Scalars['String']['input'];
2054
+ };
1983
2055
  /** Startup contract for browser game clients. Fetch this after login to initialize protocol/version checks and UDP proxy state in one round trip. */
1984
2056
  export type GameClientBootstrap = {
1985
2057
  __typename?: 'GameClientBootstrap';
@@ -2395,6 +2467,8 @@ export type GmEvent = {
2395
2467
  mutationsAppliedJson: Scalars['String']['output'];
2396
2468
  /** JSON object of params. */
2397
2469
  paramsJson: Scalars['String']['output'];
2470
+ /** JSON array of grid-permission effects this invocation applied (audit trail for model-driven grants/revokes): [{ action, permission_keys, user_id, grid_id, expires_at }]. */
2471
+ permissionEffectsAppliedJson: Scalars['String']['output'];
2398
2472
  /** JSON-encoded return value. */
2399
2473
  returnValueJson: Maybe<Scalars['String']['output']>;
2400
2474
  /** The self container id the function ran against. */
@@ -2437,6 +2511,8 @@ export type GmFunction = {
2437
2511
  notifications: Array<GmFunctionNotification>;
2438
2512
  /** Typed parameters the function accepts. */
2439
2513
  parameters: Array<GmFunctionParam>;
2514
+ /** Declarative grid-permission effects (grant/revoke runtime grid ACL rows) applied atomically with the function's mutations. */
2515
+ permissionEffects: Array<GmFunctionPermissionEffect>;
2440
2516
  /** Optional expression whose value becomes the invoke result. */
2441
2517
  returnExpression: Maybe<Scalars['String']['output']>;
2442
2518
  /** Optional declared return value type. */
@@ -2480,6 +2556,20 @@ export type GmFunctionParam = {
2480
2556
  /** Value type: int | float | string | bool | array | object | container_ref. */
2481
2557
  valueType: Scalars['String']['output'];
2482
2558
  };
2559
+ /** A declarative grid-permission effect applied transactionally with the function's mutations: grant or revoke runtime grid permissions (the ACL Buddy enforces) driven by game logic. */
2560
+ export type GmFunctionPermissionEffect = {
2561
+ __typename?: 'GmFunctionPermissionEffect';
2562
+ /** 'grant' or 'revoke'. */
2563
+ action: Scalars['String']['output'];
2564
+ /** The expression (source) resolving the grid id. */
2565
+ gridIdExpression: Scalars['String']['output'];
2566
+ /** Runtime permission keys granted/revoked. */
2567
+ permissionKeys: Array<Scalars['String']['output']>;
2568
+ /** Grant only: optional expression resolving a TTL in seconds. */
2569
+ ttlSecondsExpression: Maybe<Scalars['String']['output']>;
2570
+ /** The expression (source) resolving the target user id. */
2571
+ userExpression: Scalars['String']['output'];
2572
+ };
2483
2573
  /** The outcome of a gameModelInvoke call (return value, applied writes, and any error). */
2484
2574
  export type GmInvokeResult = {
2485
2575
  __typename?: 'GmInvokeResult';
@@ -2935,6 +3025,12 @@ export type LodDataInput = {
2935
3025
  /** LOD level (>= 0; 0 is the finest / highest detail). */
2936
3026
  level: Scalars['Int']['input'];
2937
3027
  };
3028
+ export type LoginUserInput = {
3029
+ /** Account email address. */
3030
+ email: Scalars['String']['input'];
3031
+ /** Account password (min 8 characters). */
3032
+ password: Scalars['String']['input'];
3033
+ };
2938
3034
  /** Input for mintAppToken: directly mint an app-scoped gameplay token for the calling user (native/direct path, no browser redirect). */
2939
3035
  export type MintAppTokenInput = {
2940
3036
  /** Numeric id of the app to mint a confined gameplay token for. Free/open apps are auto-granted access; paid apps require an existing entitlement (else FORBIDDEN). */
@@ -2960,10 +3056,14 @@ export type Mutation = {
2960
3056
  cancelSharedSubscription: AppSharedSubscription;
2961
3057
  /** Captures an approved PayPal order after the hosted checkout redirects back, completes the checkout (wallet credit / access grant), and returns the updated Checkout. PayPal webhooks remain a backup for idempotent reconciliation if they arrive later. Requires an authenticated user who owns the checkout. */
2962
3058
  capturePaypalCheckout: Checkout;
3059
+ /** Changes the authenticated user's password after verifying the current password. Requires a valid session token. Returns true on success; throws if the current password is wrong. Existing sessions are not revoked. */
3060
+ changePassword: Scalars['Boolean']['output'];
2963
3061
  /** 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. */
2964
3062
  claimFreeAppAccess: AppUserAccess;
2965
3063
  /** 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. */
2966
3064
  completeLoginLink: AuthResponse;
3065
+ /** Confirms a user email address using the token from the confirmation email (also enables password sign-in for the account). Returns true on success, false if the token is invalid or expired. Public (the token authorizes the call). */
3066
+ confirmEmail: Scalars['Boolean']['output'];
2967
3067
  /** Open the UDP proxy session for this game token (idempotent: returns the existing status if one is already open). Binds a socket and selects the game server with the fewest clients on first open. Optional: send mutations and udpNotifications also create a session lazily when none exists. To force a fresh socket, call disconnectUdpProxy first. */
2968
3068
  connectUdpProxy: UdpProxyConnectionStatus;
2969
3069
  /** Create a new access tier (a free/paid bundle of runtime permissions) for an app. Requires the 'manage_access_tiers' permission on the app (input.appId); super admins bypass. SIDE EFFECTS: validates the tier's permission keys against runtimePermissions and notifies the game API so Buddy sees the new tier. Does NOT grant the tier to any user. */
@@ -3042,8 +3142,16 @@ export type Mutation = {
3042
3142
  gameModelDeleteAutomation: Scalars['Boolean']['output'];
3043
3143
  /** Delete an automation event trigger by id. Requires app-admin ('manage_apps'). Returns true if one was deleted. */
3044
3144
  gameModelDeleteAutomationTrigger: Scalars['Boolean']['output'];
3145
+ /** Delete a container instance. Cascades its instance properties and any edges connected to it. Allowed for an app admin or the container owner. Requires a valid token. DESTRUCTIVE. Returns true if a container was deleted. */
3146
+ gameModelDeleteContainer: Scalars['Boolean']['output'];
3147
+ /** Delete a container type. Also deletes its property definitions. Refuses if live containers of that type exist, or if functions are bound to it — delete those first. Requires app-admin ('manage_apps'). DESTRUCTIVE. Returns true if a type was deleted. */
3148
+ gameModelDeleteContainerType: Scalars['Boolean']['output'];
3149
+ /** Delete a directed relationship edge between two containers. Allowed for an app admin or the owner of the source (from) container. Requires a valid token. DESTRUCTIVE. Returns true if an edge was deleted. */
3150
+ gameModelDeleteEdge: Scalars['Boolean']['output'];
3045
3151
  /** Delete a studio-defined function by name. Requires app-admin ('manage_apps'). DESTRUCTIVE. Returns true if a function was deleted. */
3046
3152
  gameModelDeleteFunction: Scalars['Boolean']['output'];
3153
+ /** Delete a property definition from a container type. Does not remove instance property values already stored on containers. Requires app-admin ('manage_apps'). DESTRUCTIVE. Returns true if a definition was deleted. */
3154
+ gameModelDeletePropertyDef: Scalars['Boolean']['output'];
3047
3155
  /** Grant a feature key to an access tier, so users on that tier satisfy tier_feature authority checks for it. Requires app-admin ('manage_apps'). */
3048
3156
  gameModelGrantTierFeature: GmTierFeature;
3049
3157
  /** Invoke a studio-defined function against a 'self' container with JSON params. The server enforces the function's invoke policy (authority rule tree: owner_of_self / is_host / is_current_turn / is_participant / tier_feature / group_permission / grid_permission / condition), evaluates its expressions, atomically applies its declared property mutations, logs an event, and returns the result (return value + mutations applied, or success=false with an error message). This is the primary, safe way for players to mutate game state. Requires a valid token; only player-scope functions are invocable here. */
@@ -3098,6 +3206,8 @@ export type Mutation = {
3098
3206
  linkAppToEnvironment: App;
3099
3207
  /** Link an additional federated identity (from a socialLoginStart callback) to the signed-in account. Requires a session token; throws if the identity is already linked to another account. */
3100
3208
  linkIdentity: UserIdentity;
3209
+ /** Authenticates with email + password and starts a new session. Returns an AuthResponse whose `token` must be sent on subsequent requests as `Authorization: Bearer <token>`. Public (no auth required); throws on invalid credentials. If the account also has another verified sign-in method, the password must first be email-confirmed. */
3210
+ login: AuthResponse;
3101
3211
  /** Single-device logout: revokes the game token that authenticated this request by deleting its game_tokens row. Returns true if a token was revoked, false if the request had no game token. Other devices/tokens are unaffected (use the Management API to revoke all devices). After this, the bearer token is rejected and any open UDP proxy session will no longer authorize new traffic. */
3102
3212
  logout: Scalars['Boolean']['output'];
3103
3213
  /** Ends every active session for the authenticated user (deletes all their game_tokens and records revocations). Requires a valid session token. */
@@ -3118,6 +3228,8 @@ export type Mutation = {
3118
3228
  redeployEnvironment: CksEnvironmentChangeOrder;
3119
3229
  /** Rotate the calling app token for a fresh one (same app, extended TTL) and revoke the old. Call before the current token expires to keep playing without bouncing back through the Overworld. Allowed for app-scoped tokens; re-checks entitlement. */
3120
3230
  refreshAppToken: AppTokenResponse;
3231
+ /** 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. */
3232
+ register: AuthResponse;
3121
3233
  /** 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. */
3122
3234
  removeChannelMember: Scalars['Boolean']['output'];
3123
3235
  /** 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. */
@@ -3128,10 +3240,16 @@ export type Mutation = {
3128
3240
  removeTeamMember: Scalars['Boolean']['output'];
3129
3241
  /** Passwordless: email a one-time magic sign-in link to the address (creates the account on first sign-in). Always reports sent=true (no account enumeration). Public. */
3130
3242
  requestLoginLink: RequestLoginLinkResult;
3243
+ /** Starts the password-reset flow by emailing a reset link to the address. Always returns true regardless of whether the email exists (prevents account enumeration). The reset link is also the ownership-proven way an existing passwordless account adds a password. Public. */
3244
+ requestPasswordReset: Scalars['Boolean']['output'];
3131
3245
  /** Request to join a request-only channel (creates a pending membership a manager can approve via addChannelMember). Behaves identically to joinChannel; named for request-policy UIs. */
3132
3246
  requestToJoinChannel: GroupMember;
3133
3247
  /** Request to join a request-only team (creates a pending membership a manager can approve via addTeamMember). Behaves identically to joinTeam; named for request-policy UIs. */
3134
3248
  requestToJoinTeam: GroupMember;
3249
+ /** Re-sends the email-confirmation link. Always returns true regardless of whether the account exists or is already confirmed (prevents enumeration); the email is only sent for existing unconfirmed accounts. Public. */
3250
+ resendConfirmationEmail: Scalars['Boolean']['output'];
3251
+ /** Completes a password reset using the reset token and a new password. Returns true on success; throws if the token is invalid or expired. Public (the token authorizes the call). Existing sessions are not revoked. */
3252
+ resetPassword: Scalars['Boolean']['output'];
3135
3253
  /** SSH-restarts the Buddy systemd service on the active UDP runtime VM. Symptom relief when server_status heartbeat is stale (see CksBuddyHealth.isStale); does not replace cks-udp-api pool fixes. Requires the 'manage_environments' org permission. */
3136
3254
  restartEnvironmentServices: CksEnvironmentChangeOrder;
3137
3255
  /** Resumes a payment-suspended environment, queuing a change order and moving billingStatus to 'resume_queued' (and restarting runtime once it settles). Only valid when billingStatus is grace, suspension_queued, suspended, or resume_failed; otherwise fails. Resumes billable hourly charges. Requires the 'manage_environments' org permission. */
@@ -3148,7 +3266,7 @@ export type Mutation = {
3148
3266
  revokeOrgToken: Scalars['Boolean']['output'];
3149
3267
  /** Reverts every voxel edit made by `userId` in `appId` between `from` and `to`, returning one RollbackVoxelEventResult per affected voxel (`applied` tells you whether each was actually changed). DEFAULTS to dryRun=true, which only PREVIEWS the planned reversions without writing; pass dryRun=false to actually apply them (DESTRUCTIVE — mutates world state). Requires a valid bearer token AND the `manage_apps` permission on the org that owns `appId` (super admins bypass). */
3150
3268
  rollbackVoxelUpdates: Array<RollbackVoxelEventResult>;
3151
- /** Send an actor (player/NPC) state update for spatial replication to nearby chunks. Requires a bearer game token; opens a UDP proxy session automatically if none exists. Returns Boolean! that is true only when the datagram was ACCEPTED FOR SENDING to the game server — it does NOT confirm the world applied the update. The applied echo (ActorUpdateResponse) and any failure (GenericErrorResponse) arrive ASYNCHRONOUSLY on the udpNotifications subscription, correlated by the request sequenceNumber (correlation only — not an idempotency key; the server does not dedupe replays). Subscribe to udpNotifications before sending so the reply is not missed. */
3269
+ /** Send an actor (player/NPC) state update for spatial replication to nearby chunks. Requires a bearer game token; opens a UDP proxy session automatically if none exists. Returns Boolean! that is true only when the datagram was ACCEPTED FOR SENDING to the game server — it does NOT confirm the world applied the update. There is NO separate per-request success response: the game server fans the update out to every client in the target chunk INCLUDING the sender, so you observe your own applied update as an ActorUpdateNotification carrying the same sequenceNumber (ActorUpdateResponse is legacy and is never emitted). Failures arrive ASYNCHRONOUSLY as a GenericErrorResponse; both are correlated by the request sequenceNumber (correlation only — not an idempotency key; the server does not dedupe replays). Subscribe to udpNotifications before sending so the self-notification/error is not missed. */
3152
3270
  sendActorUpdate: Scalars['Boolean']['output'];
3153
3271
  /** Send a spatial voice/audio packet, fanned out to nearby actors as a ClientAudioNotification. Requires a bearer game token; voice may additionally be gated by a runtime/grid permission for the region — if the caller lacks it the game server responds asynchronously with a GenericErrorResponse (errorCode UNAUTHORIZED). Opens a UDP proxy session automatically if none exists. Returns Boolean! that is true only when the datagram was ACCEPTED FOR SENDING — NOT that it was delivered; the sender receives no echo, only errors (GenericErrorResponse, correlated by sequenceNumber) on udpNotifications. sequenceNumber is correlation only, not an idempotency key. */
3154
3272
  sendAudioPacket: Scalars['Boolean']['output'];
@@ -3160,12 +3278,14 @@ export type Mutation = {
3160
3278
  sendSingleActorMessage: Scalars['Boolean']['output'];
3161
3279
  /** Send a spatial text/chat packet, fanned out to nearby actors as a ClientTextNotification. Requires a bearer game token; opens a UDP proxy session automatically if none exists. Returns Boolean! that is true only when the datagram was ACCEPTED FOR SENDING to the game server — NOT confirmation of delivery. The sender receives no echo; failures arrive ASYNCHRONOUSLY as GenericErrorResponse on udpNotifications, correlated by the request sequenceNumber (correlation only — not an idempotency key; the server does not dedupe replays). */
3162
3280
  sendTextPacket: Scalars['Boolean']['output'];
3163
- /** Send a single voxel (block) update for spatial replication to nearby chunks. Requires a bearer game token; opens a UDP proxy session automatically if none exists. Returns Boolean! that is true only when the datagram was ACCEPTED FOR SENDING to the game server — NOT confirmation that the world applied the change. The applied echo (VoxelUpdateResponse) and any failure (GenericErrorResponse) arrive ASYNCHRONOUSLY on udpNotifications, correlated by the request sequenceNumber (correlation only — not an idempotency key; the server does not dedupe replays). */
3281
+ /** Send a single voxel (block) update for spatial replication to nearby chunks. Requires a bearer game token; opens a UDP proxy session automatically if none exists. Returns Boolean! that is true only when the datagram was ACCEPTED FOR SENDING to the game server — NOT confirmation that the world applied the change. There is NO separate per-request success response: the change fans out to nearby clients (the sender included) as a VoxelUpdateNotification carrying the same sequenceNumber (VoxelUpdateResponse is legacy and is never emitted). Failures arrive ASYNCHRONOUSLY as a GenericErrorResponse; both are correlated by the request sequenceNumber (correlation only — not an idempotency key; the server does not dedupe replays). */
3164
3282
  sendVoxelUpdate: Scalars['Boolean']['output'];
3165
3283
  /** Creates or updates an app's monthly spend cap (idempotent upsert keyed by org + app) and returns the resulting budget. This only records the cap used to monitor/limit overspend; it does not move money, charge a card, or alter the wallet balance. Requires the 'manage_billing' app permission. */
3166
3284
  setAppBudget: AppBudget;
3167
3285
  /** Register/update an app's portal client settings (redirect_uris, client_type, launch_url). Requires manage_apps on the app and a SESSION token. */
3168
3286
  setAppClientSettings: PortalConsentState;
3287
+ /** Reserve sustained egress throughput for a shared app (bypasses the ~1 MB/s free-tier rate limit). Billed at $3/MB/s/month from the org wallet; upgrades are prorated for the current month. Requires 'manage_billing' on the app's org. */
3288
+ setAppReservedThroughput: SetAppReservedThroughputResult;
3169
3289
  /** Sets per-app hourly/daily spend caps (in cents) and returns the re-evaluated runtime state. Pass null for a limit to clear that cap. Exceeding a cap denies the app's runtime (runtimeDenialReason = spend_cap). Requires the 'manage_billing' permission on the app's org. */
3170
3290
  setAppSpendCaps: AppRuntimeState;
3171
3291
  /** Super admin only (also requires the management API to be enabled for this deployment). Overrides an app visibility platform-wide, e.g. to take down (PRIVATE/UNLISTED) or relist (PUBLIC) an app. Throws ForbiddenException for non-super-admins or when management APIs are disabled. Throws if the app id does not exist. */
@@ -3288,12 +3408,19 @@ export type MutationCapturePaypalCheckoutArgs = {
3288
3408
  idempotencyKey?: InputMaybe<Scalars['String']['input']>;
3289
3409
  orderId: Scalars['String']['input'];
3290
3410
  };
3411
+ export type MutationChangePasswordArgs = {
3412
+ currentPassword: Scalars['String']['input'];
3413
+ newPassword: Scalars['String']['input'];
3414
+ };
3291
3415
  export type MutationClaimFreeAppAccessArgs = {
3292
3416
  appId: Scalars['BigInt']['input'];
3293
3417
  };
3294
3418
  export type MutationCompleteLoginLinkArgs = {
3295
3419
  input: CompleteLoginLinkInput;
3296
3420
  };
3421
+ export type MutationConfirmEmailArgs = {
3422
+ token: Scalars['String']['input'];
3423
+ };
3297
3424
  export type MutationCreateAccessTierArgs = {
3298
3425
  input: CreateAccessTierInput;
3299
3426
  };
@@ -3410,10 +3537,27 @@ export type MutationGameModelDeleteAutomationTriggerArgs = {
3410
3537
  appId: Scalars['BigInt']['input'];
3411
3538
  triggerId: Scalars['String']['input'];
3412
3539
  };
3540
+ export type MutationGameModelDeleteContainerArgs = {
3541
+ appId: Scalars['BigInt']['input'];
3542
+ containerId: Scalars['String']['input'];
3543
+ };
3544
+ export type MutationGameModelDeleteContainerTypeArgs = {
3545
+ appId: Scalars['BigInt']['input'];
3546
+ typeName: Scalars['String']['input'];
3547
+ };
3548
+ export type MutationGameModelDeleteEdgeArgs = {
3549
+ appId: Scalars['BigInt']['input'];
3550
+ edgeId: Scalars['String']['input'];
3551
+ };
3413
3552
  export type MutationGameModelDeleteFunctionArgs = {
3414
3553
  appId: Scalars['BigInt']['input'];
3415
3554
  name: Scalars['String']['input'];
3416
3555
  };
3556
+ export type MutationGameModelDeletePropertyDefArgs = {
3557
+ appId: Scalars['BigInt']['input'];
3558
+ containerTypeName: Scalars['String']['input'];
3559
+ key: Scalars['String']['input'];
3560
+ };
3417
3561
  export type MutationGameModelGrantTierFeatureArgs = {
3418
3562
  input: GrantTierFeatureInput;
3419
3563
  };
@@ -3499,6 +3643,9 @@ export type MutationLinkAppToEnvironmentArgs = {
3499
3643
  export type MutationLinkIdentityArgs = {
3500
3644
  input: LinkIdentityInput;
3501
3645
  };
3646
+ export type MutationLoginArgs = {
3647
+ loginUserInput: LoginUserInput;
3648
+ };
3502
3649
  export type MutationMintAppTokenArgs = {
3503
3650
  input: MintAppTokenInput;
3504
3651
  };
@@ -3531,6 +3678,9 @@ export type MutationPutCpSecretArgs = {
3531
3678
  export type MutationRedeployEnvironmentArgs = {
3532
3679
  input: RedeployEnvironmentInput;
3533
3680
  };
3681
+ export type MutationRegisterArgs = {
3682
+ registerUserInput: RegisterUserInput;
3683
+ };
3534
3684
  export type MutationRemoveChannelMemberArgs = {
3535
3685
  groupId: Scalars['BigInt']['input'];
3536
3686
  userId: Scalars['BigInt']['input'];
@@ -3552,12 +3702,21 @@ export type MutationRemoveTeamMemberArgs = {
3552
3702
  export type MutationRequestLoginLinkArgs = {
3553
3703
  input: RequestLoginLinkInput;
3554
3704
  };
3705
+ export type MutationRequestPasswordResetArgs = {
3706
+ email: Scalars['String']['input'];
3707
+ };
3555
3708
  export type MutationRequestToJoinChannelArgs = {
3556
3709
  groupId: Scalars['BigInt']['input'];
3557
3710
  };
3558
3711
  export type MutationRequestToJoinTeamArgs = {
3559
3712
  groupId: Scalars['BigInt']['input'];
3560
3713
  };
3714
+ export type MutationResendConfirmationEmailArgs = {
3715
+ email: Scalars['String']['input'];
3716
+ };
3717
+ export type MutationResetPasswordArgs = {
3718
+ resetPasswordInput: ResetPasswordInput;
3719
+ };
3561
3720
  export type MutationRestartEnvironmentServicesArgs = {
3562
3721
  input: RestartEnvironmentServicesInput;
3563
3722
  };
@@ -3615,6 +3774,10 @@ export type MutationSetAppBudgetArgs = {
3615
3774
  export type MutationSetAppClientSettingsArgs = {
3616
3775
  input: SetAppClientSettingsInput;
3617
3776
  };
3777
+ export type MutationSetAppReservedThroughputArgs = {
3778
+ idempotencyKey?: InputMaybe<Scalars['String']['input']>;
3779
+ input: SetAppReservedThroughputInput;
3780
+ };
3618
3781
  export type MutationSetAppSpendCapsArgs = {
3619
3782
  appId: Scalars['BigInt']['input'];
3620
3783
  dailyLimitCents?: InputMaybe<Scalars['BigInt']['input']>;
@@ -3806,6 +3969,20 @@ export type NotificationArgInput = {
3806
3969
  /** Argument name (kind-specific: chunk_x, channel_id, payload, target_uuid, ...). */
3807
3970
  name: Scalars['String']['input'];
3808
3971
  };
3972
+ /** Per-app projection row within an org rollup. */
3973
+ export type OrgAppUsageProjectionRow = {
3974
+ __typename?: 'OrgAppUsageProjectionRow';
3975
+ /** App id (as a string). */
3976
+ appId: Scalars['String']['output'];
3977
+ /** App display name. */
3978
+ appName: Scalars['String']['output'];
3979
+ /** Egress bytes so far this calendar month. */
3980
+ currentEgressBytes: Scalars['String']['output'];
3981
+ /** True when this app is on track to exceed its free allowance, or null when insufficient data. */
3982
+ onTrackToExceed: Maybe<Scalars['Boolean']['output']>;
3983
+ /** Projected end-of-month egress bytes, or null when insufficient data. */
3984
+ projectedBytes: Maybe<Scalars['String']['output']>;
3985
+ };
3809
3986
  /** Org off-session auto-billing configuration. */
3810
3987
  export type OrgAutoBilling = {
3811
3988
  __typename?: 'OrgAutoBilling';
@@ -3924,6 +4101,40 @@ export type OrgTokenWithSecret = {
3924
4101
  /** The plaintext token. Save it now; it is not stored. */
3925
4102
  token: Scalars['String']['output'];
3926
4103
  };
4104
+ /** Org-level rollup of per-app monthly egress projections for all shared apps. */
4105
+ export type OrgUsageProjection = {
4106
+ __typename?: 'OrgUsageProjection';
4107
+ /** Per-app projection breakdown. */
4108
+ apps: Array<OrgAppUsageProjectionRow>;
4109
+ /** Fractional UTC days elapsed since the calendar month started. */
4110
+ daysElapsed: Scalars['Float']['output'];
4111
+ /** True when any shared app is on track to exceed its free allowance. */
4112
+ onTrackToExceedAny: Scalars['Boolean']['output'];
4113
+ /** True when at least 3 days have elapsed in the month (projection is meaningful). */
4114
+ sufficientData: Scalars['Boolean']['output'];
4115
+ /** True when org total projected egress exceeds the combined free tier — suggest reserved throughput. */
4116
+ suggestReservedThroughput: Scalars['Boolean']['output'];
4117
+ /** Total free monthly egress allowance across all shared apps in the org (apps × 5 GB). */
4118
+ totalFreeAllowanceBytes: Scalars['String']['output'];
4119
+ /** Sum of projected end-of-month egress across shared apps, or null when insufficient data. */
4120
+ totalProjectedBytes: Maybe<Scalars['String']['output']>;
4121
+ };
4122
+ /** Org-level rollup of replication/GraphQL byte totals and GraphQL op counts across all apps in the organization for the time window. */
4123
+ export type OrgUsageSummary = {
4124
+ __typename?: 'OrgUsageSummary';
4125
+ /** Total GraphQL bytes received across all org apps (string counter). */
4126
+ graphqlRecvBytes: Scalars['String']['output'];
4127
+ /** Total GraphQL bytes sent across all org apps (string counter). */
4128
+ graphqlSendBytes: Scalars['String']['output'];
4129
+ /** Organization id (as a string). */
4130
+ orgId: Scalars['String']['output'];
4131
+ /** Total replication bytes received across all org apps (string counter). */
4132
+ replicationRecvBytes: Scalars['String']['output'];
4133
+ /** Total replication bytes sent across all org apps (string counter). */
4134
+ replicationSendBytes: Scalars['String']['output'];
4135
+ /** Total GraphQL operations (send + recv) across all org apps (string counter). */
4136
+ totalOps: Scalars['String']['output'];
4137
+ };
3927
4138
  export type OrgWallet = {
3928
4139
  __typename?: 'OrgWallet';
3929
4140
  /** Current wallet balance in minor currency units (cents) of `currency`, as a BigInt decimal string. May be negative if usage was charged against an empty wallet. */
@@ -4127,6 +4338,8 @@ export type Query = {
4127
4338
  actors: Array<Actor>;
4128
4339
  /** Relay-style cursor-paginated version of `actors`: lists actors owned by the authenticated user, optionally narrowed by `filter` (appId, avatarId, uuid, chunk). Page forward with `first` (default 50, max 200) and `after` (an opaque cursor from a previous page’s `pageInfo.endCursor`); `totalCount` is the full number of matching actors. Requires a valid game token; only the caller’s own actors are returned (full state included). */
4129
4340
  actorsConnection: ActorsConnection;
4341
+ /** Convenience for UI: returns true when the authenticated caller is the currently elected host for the given app (same election as gameHost), otherwise false (including when no host is elected). Not authoritative for server-side mutations — use gameModelInvoke's is_host policy for that. Requires a valid bearer game token (same auth as gameHost). */
4342
+ amIGameHost: Scalars['Boolean']['output'];
4130
4343
  /** Fetch a single app by its numeric id. Requires authentication (any signed-in user); does NOT enforce org/app permissions, so it can read apps the caller does not own, of any visibility/status. Returns null if the id does not exist. Prefer appBySlug for slug-based marketplace lookups. */
4131
4344
  app: Maybe<App>;
4132
4345
  /** Public listing of an app's access tiers (the free/paid bundles of runtime permissions), ordered by tierOrder ascending. PUBLIC: no authentication required. Powers the marketplace app detail / pricing page. Includes tiers of all statuses; inspect AppAccessTier.status to skip archived tiers. */
@@ -4145,6 +4358,8 @@ export type Query = {
4145
4358
  appRuntimeState: AppRuntimeState;
4146
4359
  /** An app's paid shared-environment subscription, or null when it has none (e.g. unpublished or on the free quota). Caller must be a member of the app's org. */
4147
4360
  appSharedSubscription: Maybe<AppSharedSubscription>;
4361
+ /** Linear end-of-month egress projection for one shared app from calendar-month usage so far. Requires at least 3 elapsed days in the month before returning projected values. Requires the 'view_usage' org permission. */
4362
+ appUsageProjection: AppUsageProjection;
4148
4363
  /** Replication and GraphQL byte totals plus the top GraphQL operations for one app over the time range. Read-only reporting; the app must be linked to an environment in the org. Requires the 'view_usage' org permission. */
4149
4364
  appUsageSummary: AppUsageSummary;
4150
4365
  /** Admin view of the user access records for an app (who has been granted/revoked access and on which tier). Requires the 'manage_access_tiers' permission on the app; super admins bypass. Ordered by most recently updated. Paginated via limit/offset. */
@@ -4179,6 +4394,8 @@ export type Query = {
4179
4394
  channelRoles: Array<GroupRole>;
4180
4395
  /** List all active channels in an app (not just the caller's). */
4181
4396
  channels: Array<Group>;
4397
+ /** Email-first adaptive login: check whether the account has password sign-in enabled. Public; does not reveal whether the email is registered. */
4398
+ checkAuthMethod: AuthMethodResult;
4182
4399
  /** Cross-tenant payments audit across all users, orgs, and apps (newest first), with optional filtering. Restricted to super admins; requests from non-super-admins are rejected. For a caller's own history use `myCheckouts` instead. */
4183
4400
  checkouts: CheckoutsPage;
4184
4401
  /** Cross-tenant payments audit across all users, orgs, and apps (newest first), with optional filtering. Restricted to super admins; requests from non-super-admins are rejected. For a caller's own history use `myCheckoutsConnection` instead. Relay cursor connection; prefer this over the offset-based checkouts. */
@@ -4353,6 +4570,10 @@ export type Query = {
4353
4570
  orgTokens: Array<OrgToken>;
4354
4571
  /** Aggregate replication/GraphQL byte totals per environment across the org for the time window. Read-only reporting. Requires the 'view_usage' org permission. */
4355
4572
  orgUsageByEnvironment: Array<EnvironmentUsageRollupRow>;
4573
+ /** Org rollup of per-app monthly egress projections for all shared apps, with upgrade prompts when on track to exceed free tier. Requires the 'view_usage' org permission. */
4574
+ orgUsageProjection: OrgUsageProjection;
4575
+ /** Org-level rollup of replication/GraphQL byte totals and GraphQL op counts across all apps in the organization for the time window. Read-only reporting. Requires the 'view_usage' org permission. */
4576
+ orgUsageSummary: OrgUsageSummary;
4356
4577
  /** Fetches an organization by id (BigInt as string). Requires a valid session token. Returns null if no such organization exists. */
4357
4578
  organization: Maybe<Organization>;
4358
4579
  /** Fetches an organization by its unique URL slug. Requires a valid session token. Returns null if not found. Use this when you only have the slug; otherwise prefer organization(id). */
@@ -4361,7 +4582,7 @@ export type Query = {
4361
4582
  paymentEvents: PaymentEventsPage;
4362
4583
  /** Audit log of inbound payment-provider webhook events (used for idempotent reconciliation of checkouts), newest first. Restricted to super admins; requests from non-super-admins are rejected. Relay cursor connection; prefer this over the offset-based paymentEvents. */
4363
4584
  paymentEventsConnection: PaymentEventsConnection;
4364
- /** Public platform discovery. Returns the shared game-api URL clients use for shared-environment apps. No auth required. */
4585
+ /** Public platform discovery. Returns the shared game-api URL clients use for shared-environment apps (served by the platform shared environment). No auth required. */
4365
4586
  platformConfig: PlatformConfig;
4366
4587
  /** Live concurrent players for the org vs its all-time peak, a percentile comparison against other studios, and the site-wide total. Requires the 'view_usage' org permission. */
4367
4588
  playerPulse: PlayerPulse;
@@ -4427,6 +4648,9 @@ export type QueryActorsConnectionArgs = {
4427
4648
  filter?: InputMaybe<ActorFilterInput>;
4428
4649
  first?: InputMaybe<Scalars['Int']['input']>;
4429
4650
  };
4651
+ export type QueryAmIGameHostArgs = {
4652
+ appId: Scalars['BigInt']['input'];
4653
+ };
4430
4654
  export type QueryAppArgs = {
4431
4655
  appId: Scalars['BigInt']['input'];
4432
4656
  };
@@ -4459,6 +4683,10 @@ export type QueryAppRuntimeStateArgs = {
4459
4683
  export type QueryAppSharedSubscriptionArgs = {
4460
4684
  appId: Scalars['BigInt']['input'];
4461
4685
  };
4686
+ export type QueryAppUsageProjectionArgs = {
4687
+ appId: Scalars['BigInt']['input'];
4688
+ orgId: Scalars['BigInt']['input'];
4689
+ };
4462
4690
  export type QueryAppUsageSummaryArgs = {
4463
4691
  appId: Scalars['BigInt']['input'];
4464
4692
  operationLimit?: InputMaybe<Scalars['Int']['input']>;
@@ -4519,6 +4747,9 @@ export type QueryChannelRolesArgs = {
4519
4747
  export type QueryChannelsArgs = {
4520
4748
  appId: Scalars['BigInt']['input'];
4521
4749
  };
4750
+ export type QueryCheckAuthMethodArgs = {
4751
+ input: CheckAuthMethodInput;
4752
+ };
4522
4753
  export type QueryCheckoutsArgs = {
4523
4754
  filter?: InputMaybe<CheckoutFilterInput>;
4524
4755
  limit?: InputMaybe<Scalars['Int']['input']>;
@@ -4779,6 +5010,13 @@ export type QueryOrgUsageByEnvironmentArgs = {
4779
5010
  orgId: Scalars['BigInt']['input'];
4780
5011
  since: Scalars['DateTime']['input'];
4781
5012
  };
5013
+ export type QueryOrgUsageProjectionArgs = {
5014
+ orgId: Scalars['BigInt']['input'];
5015
+ };
5016
+ export type QueryOrgUsageSummaryArgs = {
5017
+ orgId: Scalars['BigInt']['input'];
5018
+ since?: InputMaybe<Scalars['DateTime']['input']>;
5019
+ };
4782
5020
  export type QueryOrganizationArgs = {
4783
5021
  id: Scalars['BigInt']['input'];
4784
5022
  };
@@ -4897,6 +5135,14 @@ export type RedeployEnvironmentInput = {
4897
5135
  /** Target environment version. When omitted, redeploys to the latest available version for the class. Must be available, deployable by this class, and not older than the current version (forward-only — no rollback). */
4898
5136
  version?: InputMaybe<Scalars['String']['input']>;
4899
5137
  };
5138
+ export type RegisterUserInput = {
5139
+ /** Email for the new account; the confirmation email is sent here. */
5140
+ email: Scalars['String']['input'];
5141
+ /** Optional initial public gamertag (min 3 characters). Can be set later via updateGamertag. */
5142
+ gamertag?: InputMaybe<Scalars['String']['input']>;
5143
+ /** Password for the new account (min 8 characters). */
5144
+ password: Scalars['String']['input'];
5145
+ };
4900
5146
  /** Request an emailed magic-link to sign in (passwordless). */
4901
5147
  export type RequestLoginLinkInput = {
4902
5148
  /** Email address to send the one-time sign-in link to. */
@@ -4912,6 +5158,12 @@ export type RequestLoginLinkResult = {
4912
5158
  /** Always true (does not reveal whether the email exists). */
4913
5159
  sent: Scalars['Boolean']['output'];
4914
5160
  };
5161
+ export type ResetPasswordInput = {
5162
+ /** New password to set (min 8 characters). */
5163
+ newPassword: Scalars['String']['input'];
5164
+ /** Password-reset token from the emailed reset link. */
5165
+ token: Scalars['String']['input'];
5166
+ };
4915
5167
  export type RestartEnvironmentServicesInput = {
4916
5168
  /** Organization id (BigInt) that owns the environment. */
4917
5169
  orgId: Scalars['BigInt']['input'];
@@ -5066,6 +5318,8 @@ export type SeedFunctionInput = {
5066
5318
  notifications?: InputMaybe<Array<FunctionNotificationInput>>;
5067
5319
  /** Typed parameters the function accepts. */
5068
5320
  parameters?: InputMaybe<Array<FunctionParamInput>>;
5321
+ /** Declarative grid-permission effects (grant/revoke runtime grid ACL rows) applied atomically with the function's mutations. Max 4 per function. */
5322
+ permissionEffects?: InputMaybe<Array<FunctionPermissionEffectInput>>;
5069
5323
  /** Optional expression whose value becomes the invoke result. */
5070
5324
  returnExpression?: InputMaybe<Scalars['String']['input']>;
5071
5325
  /** Optional declared return value type. */
@@ -5238,6 +5492,23 @@ export type SetAppClientSettingsInput = {
5238
5492
  /** Allow-listed redirect URIs for the portal authorization code (origin-matched). Replaces the current list. */
5239
5493
  redirectUris?: InputMaybe<Array<Scalars['String']['input']>>;
5240
5494
  };
5495
+ /** Set or change an app's reserved sustained throughput on the shared environment. */
5496
+ export type SetAppReservedThroughputInput = {
5497
+ /** App to configure reserved throughput for. */
5498
+ appId: Scalars['BigInt']['input'];
5499
+ /** Organization that owns the app. */
5500
+ orgId: Scalars['BigInt']['input'];
5501
+ /** Reserved sustained egress in bytes/s (decimal MB/s: 1_000_000 = 1 MB/s). 0 clears the reservation (free tier). */
5502
+ reservedBytesPerSec: Scalars['BigInt']['input'];
5503
+ };
5504
+ /** Result of setAppReservedThroughput: updated app + reservation fee debited (0 when downgrading or unchanged). */
5505
+ export type SetAppReservedThroughputResult = {
5506
+ __typename?: 'SetAppReservedThroughputResult';
5507
+ /** App after the reservation change. */
5508
+ app: App;
5509
+ /** Cents debited from the org wallet for this change (prorated upgrade). 0 when clearing or lowering reservation. */
5510
+ chargedCents: Scalars['BigInt']['output'];
5511
+ };
5241
5512
  /** Set the per-app automation policy (guardrails / platform ceilings). */
5242
5513
  export type SetAutomationPolicyInput = {
5243
5514
  /** The app (tenant). */
@@ -5824,6 +6095,8 @@ export type UpsertFunctionInput = {
5824
6095
  notifications?: InputMaybe<Array<FunctionNotificationInput>>;
5825
6096
  /** Typed parameters the function accepts. */
5826
6097
  parameters?: InputMaybe<Array<FunctionParamInput>>;
6098
+ /** Declarative grid-permission effects (grant/revoke runtime grid ACL rows) applied atomically with the function's mutations. Max 4 per function. */
6099
+ permissionEffects?: InputMaybe<Array<FunctionPermissionEffectInput>>;
5827
6100
  /** Optional expression whose value becomes the invoke result. */
5828
6101
  returnExpression?: InputMaybe<Scalars['String']['input']>;
5829
6102
  /** Optional declared return value type. */
@@ -6196,7 +6469,7 @@ export type WalletTransaction = {
6196
6469
  referenceId: Maybe<Scalars['String']['output']>;
6197
6470
  /** Unique transaction id (BigInt as a decimal string). */
6198
6471
  transactionId: Scalars['BigInt']['output'];
6199
- /** What produced this transaction. Known values: "topup" (wallet credit from a checkout/top-up), "usage" (per-app usage charge, negative), "shared_usage" (shared-environment usage charge, negative), "environment_usage" (hourly environment cost, negative), "auto_recharge" (automatic wallet recharge). Other caller-supplied deposit types are possible. */
6472
+ /** What produced this transaction. Known values: "topup" (wallet credit from a checkout/top-up), "usage" (per-app usage charge, negative), "shared_usage" (shared-environment usage charge, negative), "reserved_throughput" (monthly/prorated reserved egress capacity, negative), "environment_usage" (hourly environment cost, negative), "auto_recharge" (automatic wallet recharge). Other caller-supplied deposit types are possible. */
6200
6473
  transactionType: Scalars['String']['output'];
6201
6474
  /** Wallet this transaction belongs to (BigInt as a decimal string). */
6202
6475
  walletId: Scalars['BigInt']['output'];
@@ -9198,6 +9471,14 @@ export type GameModelCreateContainerMutation = {
9198
9471
  metadataJson: string;
9199
9472
  };
9200
9473
  };
9474
+ export type GameModelDeleteContainerMutationVariables = Exact<{
9475
+ appId: Scalars['BigInt']['input'];
9476
+ containerId: Scalars['String']['input'];
9477
+ }>;
9478
+ export type GameModelDeleteContainerMutation = {
9479
+ __typename?: 'Mutation';
9480
+ gameModelDeleteContainer: boolean;
9481
+ };
9201
9482
  export type GameModelSetPropertyMutationVariables = Exact<{
9202
9483
  input: SetContainerPropertyInput;
9203
9484
  }>;
@@ -9229,6 +9510,14 @@ export type GameModelAddEdgeMutation = {
9229
9510
  weight: number | null;
9230
9511
  };
9231
9512
  };
9513
+ export type GameModelDeleteEdgeMutationVariables = Exact<{
9514
+ appId: Scalars['BigInt']['input'];
9515
+ edgeId: Scalars['String']['input'];
9516
+ }>;
9517
+ export type GameModelDeleteEdgeMutation = {
9518
+ __typename?: 'Mutation';
9519
+ gameModelDeleteEdge: boolean;
9520
+ };
9232
9521
  export type GameModelInvokeMutationVariables = Exact<{
9233
9522
  input: InvokeFunctionInput;
9234
9523
  }>;
@@ -9393,6 +9682,7 @@ export type GameModelEventsQuery = {
9393
9682
  automationId: string | null;
9394
9683
  paramsJson: string;
9395
9684
  mutationsAppliedJson: string;
9685
+ permissionEffectsAppliedJson: string;
9396
9686
  returnValueJson: string | null;
9397
9687
  success: boolean;
9398
9688
  errorMessage: string | null;
@@ -9427,6 +9717,7 @@ export type GameModelEventsConnectionQuery = {
9427
9717
  automationId: string | null;
9428
9718
  paramsJson: string;
9429
9719
  mutationsAppliedJson: string;
9720
+ permissionEffectsAppliedJson: string;
9430
9721
  returnValueJson: string | null;
9431
9722
  success: boolean;
9432
9723
  errorMessage: string | null;
@@ -9480,6 +9771,14 @@ export type GmFunctionFieldsFragment = {
9480
9771
  expression: string;
9481
9772
  }>;
9482
9773
  }>;
9774
+ permissionEffects: Array<{
9775
+ __typename?: 'GmFunctionPermissionEffect';
9776
+ action: string;
9777
+ permissionKeys: Array<string>;
9778
+ userExpression: string;
9779
+ gridIdExpression: string;
9780
+ ttlSecondsExpression: string | null;
9781
+ }>;
9483
9782
  };
9484
9783
  export type GmPropertyDefFieldsFragment = {
9485
9784
  __typename?: 'GmPropertyDef';
@@ -9541,6 +9840,23 @@ export type GameModelUpsertPropertyDefMutation = {
9541
9840
  description: string | null;
9542
9841
  };
9543
9842
  };
9843
+ export type GameModelDeletePropertyDefMutationVariables = Exact<{
9844
+ appId: Scalars['BigInt']['input'];
9845
+ containerTypeName: Scalars['String']['input'];
9846
+ key: Scalars['String']['input'];
9847
+ }>;
9848
+ export type GameModelDeletePropertyDefMutation = {
9849
+ __typename?: 'Mutation';
9850
+ gameModelDeletePropertyDef: boolean;
9851
+ };
9852
+ export type GameModelDeleteContainerTypeMutationVariables = Exact<{
9853
+ appId: Scalars['BigInt']['input'];
9854
+ typeName: Scalars['String']['input'];
9855
+ }>;
9856
+ export type GameModelDeleteContainerTypeMutation = {
9857
+ __typename?: 'Mutation';
9858
+ gameModelDeleteContainerType: boolean;
9859
+ };
9544
9860
  export type GameModelUpsertFunctionMutationVariables = Exact<{
9545
9861
  input: UpsertFunctionInput;
9546
9862
  }>;
@@ -9584,6 +9900,14 @@ export type GameModelUpsertFunctionMutation = {
9584
9900
  expression: string;
9585
9901
  }>;
9586
9902
  }>;
9903
+ permissionEffects: Array<{
9904
+ __typename?: 'GmFunctionPermissionEffect';
9905
+ action: string;
9906
+ permissionKeys: Array<string>;
9907
+ userExpression: string;
9908
+ gridIdExpression: string;
9909
+ ttlSecondsExpression: string | null;
9910
+ }>;
9587
9911
  };
9588
9912
  };
9589
9913
  export type GameModelDeleteFunctionMutationVariables = Exact<{
@@ -9688,6 +10012,14 @@ export type GameModelTypeSchemaQuery = {
9688
10012
  expression: string;
9689
10013
  }>;
9690
10014
  }>;
10015
+ permissionEffects: Array<{
10016
+ __typename?: 'GmFunctionPermissionEffect';
10017
+ action: string;
10018
+ permissionKeys: Array<string>;
10019
+ userExpression: string;
10020
+ gridIdExpression: string;
10021
+ ttlSecondsExpression: string | null;
10022
+ }>;
9691
10023
  }>;
9692
10024
  };
9693
10025
  };
@@ -9769,6 +10101,14 @@ export type GameModelFunctionQuery = {
9769
10101
  expression: string;
9770
10102
  }>;
9771
10103
  }>;
10104
+ permissionEffects: Array<{
10105
+ __typename?: 'GmFunctionPermissionEffect';
10106
+ action: string;
10107
+ permissionKeys: Array<string>;
10108
+ userExpression: string;
10109
+ gridIdExpression: string;
10110
+ ttlSecondsExpression: string | null;
10111
+ }>;
9772
10112
  };
9773
10113
  };
9774
10114
  export type GameModelFunctionsQueryVariables = Exact<{
@@ -9815,6 +10155,14 @@ export type GameModelFunctionsQuery = {
9815
10155
  expression: string;
9816
10156
  }>;
9817
10157
  }>;
10158
+ permissionEffects: Array<{
10159
+ __typename?: 'GmFunctionPermissionEffect';
10160
+ action: string;
10161
+ permissionKeys: Array<string>;
10162
+ userExpression: string;
10163
+ gridIdExpression: string;
10164
+ ttlSecondsExpression: string | null;
10165
+ }>;
9818
10166
  }>;
9819
10167
  };
9820
10168
  export type GameModelFeaturesQueryVariables = Exact<{
@@ -9873,6 +10221,13 @@ export type GameHostQuery = {
9873
10221
  earliestActorJoinedAt: string;
9874
10222
  } | null;
9875
10223
  };
10224
+ export type AmIGameHostQueryVariables = Exact<{
10225
+ appId: Scalars['BigInt']['input'];
10226
+ }>;
10227
+ export type AmIGameHostQuery = {
10228
+ __typename?: 'Query';
10229
+ amIGameHost: boolean;
10230
+ };
9876
10231
  export type ActorHeartbeatMutationVariables = Exact<{
9877
10232
  appId: Scalars['BigInt']['input'];
9878
10233
  }>;
@@ -12164,8 +12519,10 @@ export declare const GameModelCreateSessionDocument: DocumentNode<GameModelCreat
12164
12519
  export declare const GameModelJoinSessionDocument: DocumentNode<GameModelJoinSessionMutation, GameModelJoinSessionMutationVariables>;
12165
12520
  export declare const GameModelSetSessionTurnDocument: DocumentNode<GameModelSetSessionTurnMutation, GameModelSetSessionTurnMutationVariables>;
12166
12521
  export declare const GameModelCreateContainerDocument: DocumentNode<GameModelCreateContainerMutation, GameModelCreateContainerMutationVariables>;
12522
+ export declare const GameModelDeleteContainerDocument: DocumentNode<GameModelDeleteContainerMutation, GameModelDeleteContainerMutationVariables>;
12167
12523
  export declare const GameModelSetPropertyDocument: DocumentNode<GameModelSetPropertyMutation, GameModelSetPropertyMutationVariables>;
12168
12524
  export declare const GameModelAddEdgeDocument: DocumentNode<GameModelAddEdgeMutation, GameModelAddEdgeMutationVariables>;
12525
+ export declare const GameModelDeleteEdgeDocument: DocumentNode<GameModelDeleteEdgeMutation, GameModelDeleteEdgeMutationVariables>;
12169
12526
  export declare const GameModelInvokeDocument: DocumentNode<GameModelInvokeMutation, GameModelInvokeMutationVariables>;
12170
12527
  export declare const GameModelContainerDocument: DocumentNode<GameModelContainerQuery, GameModelContainerQueryVariables>;
12171
12528
  export declare const GameModelContainersDocument: DocumentNode<GameModelContainersQuery, GameModelContainersQueryVariables>;
@@ -12178,6 +12535,8 @@ export declare const GameModelEventsConnectionDocument: DocumentNode<GameModelEv
12178
12535
  export declare const GameModelSeedDocument: DocumentNode<GameModelSeedMutation, GameModelSeedMutationVariables>;
12179
12536
  export declare const GameModelUpsertContainerTypeDocument: DocumentNode<GameModelUpsertContainerTypeMutation, GameModelUpsertContainerTypeMutationVariables>;
12180
12537
  export declare const GameModelUpsertPropertyDefDocument: DocumentNode<GameModelUpsertPropertyDefMutation, GameModelUpsertPropertyDefMutationVariables>;
12538
+ export declare const GameModelDeletePropertyDefDocument: DocumentNode<GameModelDeletePropertyDefMutation, GameModelDeletePropertyDefMutationVariables>;
12539
+ export declare const GameModelDeleteContainerTypeDocument: DocumentNode<GameModelDeleteContainerTypeMutation, GameModelDeleteContainerTypeMutationVariables>;
12181
12540
  export declare const GameModelUpsertFunctionDocument: DocumentNode<GameModelUpsertFunctionMutation, GameModelUpsertFunctionMutationVariables>;
12182
12541
  export declare const GameModelDeleteFunctionDocument: DocumentNode<GameModelDeleteFunctionMutation, GameModelDeleteFunctionMutationVariables>;
12183
12542
  export declare const GameModelDefineFeatureDocument: DocumentNode<GameModelDefineFeatureMutation, GameModelDefineFeatureMutationVariables>;
@@ -12193,6 +12552,7 @@ export declare const GameModelTierFeaturesDocument: DocumentNode<GameModelTierFe
12193
12552
  export declare const GameModelPolicyDocument: DocumentNode<GameModelPolicyQuery, GameModelPolicyQueryVariables>;
12194
12553
  export declare const GameModelRevokeTierFeatureDocument: DocumentNode<GameModelRevokeTierFeatureMutation, GameModelRevokeTierFeatureMutationVariables>;
12195
12554
  export declare const GameHostDocument: DocumentNode<GameHostQuery, GameHostQueryVariables>;
12555
+ export declare const AmIGameHostDocument: DocumentNode<AmIGameHostQuery, AmIGameHostQueryVariables>;
12196
12556
  export declare const ActorHeartbeatDocument: DocumentNode<ActorHeartbeatMutation, ActorHeartbeatMutationVariables>;
12197
12557
  export declare const CreateOrgRoleDocument: DocumentNode<CreateOrgRoleMutation, CreateOrgRoleMutationVariables>;
12198
12558
  export declare const CreateOrgTokenDocument: DocumentNode<CreateOrgTokenMutation, CreateOrgTokenMutationVariables>;