@crowdedkingdoms/crowdyjs 7.1.0 → 8.0.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.
@@ -185,6 +185,8 @@ export type App = {
185
185
  __typename?: 'App';
186
186
  /** Unique numeric identifier of the app (primary key). */
187
187
  appId: Scalars['BigInt']['output'];
188
+ /** OAuth client type: "public" (browser/PKCE, no secret) or "confidential" (server-side, holds a secret). Defaults to "public". */
189
+ clientType: Scalars['String']['output'];
188
190
  /** Timestamp when the app was created. */
189
191
  createdAt: Scalars['DateTime']['output'];
190
192
  /** Numeric user id of the account that created the app. */
@@ -195,6 +197,10 @@ export type App = {
195
197
  description: Maybe<Scalars['String']['output']>;
196
198
  /** Resolved game-api base URL for SDK/runtime calls: the per-tenant URL for dedicated apps, or the shared platform URL for shared apps. Null for legacy or not-yet-deployed apps. */
197
199
  gameApiUrl: Maybe<Scalars['String']['output']>;
200
+ /** True for first-party/trusted apps: portal entry skips the consent screen. The Overworld (app 1) is trusted. Studio admins cannot set this; it is platform-controlled. */
201
+ isTrusted: Scalars['Boolean']['output'];
202
+ /** Browser destination (origin/URL) a player is redirected to when they portal into this app from the Overworld. Used to route the player and to validate portal redirect URIs. */
203
+ launchUrl: Maybe<Scalars['String']['output']>;
198
204
  /** Opaque JSON-encoded string of marketplace media (cover image URL, screenshots, long description, etc.). Stored internally as JSONB; clients must JSON.parse on read and JSON.stringify on write. Null/"{}" when unset. */
199
205
  metadata: Maybe<Scalars['String']['output']>;
200
206
  /** Human-readable display name of the app. */
@@ -203,6 +209,8 @@ export type App = {
203
209
  org: Maybe<Organization>;
204
210
  /** Numeric id of the organization that owns this app. */
205
211
  orgId: Scalars['BigInt']['output'];
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
+ redirectUris: Array<Scalars['String']['output']>;
206
214
  /** When runtimeStatus is not "active", why the runtime is gated: "free_allowance", "insufficient_funds", "spend_cap", or "subscription_lapsed". Null when active. */
207
215
  runtimeDenialReason: Maybe<Scalars['String']['output']>;
208
216
  /** Shared-environment runtime gate, mirrored to the game DB and enforced by game-api + Buddy: "active", "grace", "denied", or "suspended". */
@@ -252,6 +260,20 @@ export type AppAccessTier = {
252
260
  /** Timestamp when the tier was last updated. */
253
261
  updatedAt: Scalars['DateTime']['output'];
254
262
  };
263
+ /** A user's standing consent for an app to receive app-scoped tokens via the Overworld portal (the “connected apps” list). */
264
+ export type AppAuthorizationGrant = {
265
+ __typename?: 'AppAuthorizationGrant';
266
+ appId: Scalars['ID']['output'];
267
+ appName: Maybe<Scalars['String']['output']>;
268
+ grantId: Scalars['ID']['output'];
269
+ grantedAt: Scalars['DateTime']['output'];
270
+ revokedAt: Maybe<Scalars['DateTime']['output']>;
271
+ /** The scopes the user approved for this app. */
272
+ scopes: Array<Scalars['String']['output']>;
273
+ /** 'active' | 'revoked'. */
274
+ status: Scalars['String']['output'];
275
+ userId: Scalars['ID']['output'];
276
+ };
255
277
  export type AppAvatarState = {
256
278
  __typename?: 'AppAvatarState';
257
279
  /** App (game) id this state is scoped to. BigInt serialized as a decimal string. */
@@ -548,6 +570,13 @@ export type AuthResponse = {
548
570
  /** The authenticated user. */
549
571
  user: User;
550
572
  };
573
+ /** Approve (consent to) an app receiving app-scoped tokens via the Overworld portal. */
574
+ export type AuthorizeAppInput = {
575
+ /** App to authorize. */
576
+ appId: Scalars['BigInt']['input'];
577
+ /** Optional explicit scopes to grant (defaults to the app baseline). */
578
+ scopes?: InputMaybe<Array<Scalars['String']['input']>>;
579
+ };
551
580
  export type Avatar = {
552
581
  __typename?: 'Avatar';
553
582
  /** Avatar id and primary key (auto-increment). Serialized as a GraphQL ID (a numeric string). */
@@ -1275,6 +1304,11 @@ export type ClientTextPacketInput = {
1275
1304
  /** A unique identifier for the text source (typically the player UUID). Must be exactly 32 bytes when encoded as UTF-8. */
1276
1305
  uuid: Scalars['String']['input'];
1277
1306
  };
1307
+ /** Complete a magic-link sign-in with the emailed token. */
1308
+ export type CompleteLoginLinkInput = {
1309
+ /** The one-time token from the magic-link URL. */
1310
+ token: Scalars['String']['input'];
1311
+ };
1278
1312
  /** Relay-style pagination metadata for a connection. */
1279
1313
  export type ConnectionPageInfo = {
1280
1314
  __typename?: 'ConnectionPageInfo';
@@ -1817,6 +1851,11 @@ export type DestroyEnvironmentInput = {
1817
1851
  /** Slug of the environment to destroy (all cloud resources are torn down). */
1818
1852
  slug: Scalars['String']['input'];
1819
1853
  };
1854
+ /** Dev-only bypass sign-in (active only when DEV_AUTH_BYPASS is enabled; never in production). */
1855
+ export type DevLoginInput = {
1856
+ /** Email of the account to sign in as (created if absent). */
1857
+ email: Scalars['String']['input'];
1858
+ };
1820
1859
  /** Input for environmentQuote. Mirrors CreateEnvironmentInput’s class/flavor shape: dedicated needs the four per-role flavors + counts; dev_single needs only the single flavor. */
1821
1860
  export type EnvironmentQuoteInput = {
1822
1861
  /** Flavor name from environmentFlavors(datacenter) for the Caddy LB VMs in front of the game-api fleet; must have a published hourly price. Required for dedicated. */
@@ -2851,6 +2890,12 @@ export type LinkAppToEnvironmentInput = {
2851
2890
  /** Organization id (BigInt) that owns both the app and the environment. */
2852
2891
  orgId: Scalars['BigInt']['input'];
2853
2892
  };
2893
+ /** Link an additional federated identity to the signed-in account. */
2894
+ export type LinkIdentityInput = {
2895
+ code: Scalars['String']['input'];
2896
+ provider: Scalars['String']['input'];
2897
+ state: Scalars['String']['input'];
2898
+ };
2854
2899
  /** Arguments for listVoxelUpdatesByDistance: selects recorded voxel edits across chunks within a cubic (Chebyshev) radius of a center chunk, grouped per chunk and ordered by increasing distance. */
2855
2900
  export type ListVoxelUpdatesByDistanceInput = {
2856
2901
  /** Id of the app whose voxel edits to search (decimal string). */
@@ -2890,12 +2935,6 @@ export type LodDataInput = {
2890
2935
  /** LOD level (>= 0; 0 is the finest / highest detail). */
2891
2936
  level: Scalars['Int']['input'];
2892
2937
  };
2893
- export type LoginUserInput = {
2894
- /** Account email address. */
2895
- email: Scalars['String']['input'];
2896
- /** Account password (min 8 characters). */
2897
- password: Scalars['String']['input'];
2898
- };
2899
2938
  /** Input for mintAppToken: directly mint an app-scoped gameplay token for the calling user (native/direct path, no browser redirect). */
2900
2939
  export type MintAppTokenInput = {
2901
2940
  /** 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). */
@@ -2915,16 +2954,16 @@ export type Mutation = {
2915
2954
  archiveApp: App;
2916
2955
  /** Grant runtime permission keys to a group (optionally scoped to a single group role) on a grid by writing the `grid_group_grants` input table, then recompute the materialized effective ACL so every affected member gains the keys. Requires app-admin ('manage_apps'). Returns the grid's current group grants for the group. Use `grantGridPermissions` for per-user grants instead. */
2917
2956
  assignGroupToGrid: Array<GridGroupGrant>;
2957
+ /** Record the user's consent for an (untrusted) app to receive app-scoped tokens via the portal. Called from the Overworld consent screen before createPortalAuthorizationCode. Idempotent. Requires a SESSION token. */
2958
+ authorizeApp: AppAuthorizationGrant;
2918
2959
  /** DESTRUCTIVE. Cancels an app's paid shared-environment subscription. The app loses its paid shared slot (typically at currentPeriodEnd) and may be denied runtime once the period lapses unless a free slot covers it. Returns the updated subscription. Requires the 'manage_billing' permission on the app's org. */
2919
2960
  cancelSharedSubscription: AppSharedSubscription;
2920
2961
  /** 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. */
2921
2962
  capturePaypalCheckout: Checkout;
2922
- /** 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. */
2923
- changePassword: Scalars['Boolean']['output'];
2924
2963
  /** 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. */
2925
2964
  claimFreeAppAccess: AppUserAccess;
2926
- /** Confirms a user email address using the token from the confirmation email. Returns true on success, false if the token is invalid or expired. Public (the token authorizes the call). */
2927
- confirmEmail: Scalars['Boolean']['output'];
2965
+ /** 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
+ completeLoginLink: AuthResponse;
2928
2967
  /** 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. */
2929
2968
  connectUdpProxy: UdpProxyConnectionStatus;
2930
2969
  /** 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. */
@@ -2983,6 +3022,8 @@ export type Mutation = {
2983
3022
  deleteUserAppState: UserAppState;
2984
3023
  /** DESTRUCTIVE and IRREVERSIBLE. Tears down all cloud resources for the environment (per-tenant Postgres, game-api, Buddy, and load-balancer VMs plus DNS records) and revokes its service tokens; all tenant data is lost. Sets status to 'destroy_requested' and returns the tracking change order — poll orgEnvironment.destroyProgress. Fails if a destroy is already queued. After it reaches 'destroyed', call purgeEnvironment to remove the record. Requires the 'manage_environments' org permission. */
2985
3024
  destroyEnvironment: CksEnvironmentChangeOrder;
3025
+ /** DEV ONLY bypass sign-in: returns a session for the given email without email/social verification. Active only when DEV_AUTH_BYPASS is enabled; throws (FORBIDDEN) otherwise. Never enabled in production. */
3026
+ devLogin: AuthResponse;
2986
3027
  /** Close the UDP proxy session and socket for this game token. Unsubscribing from udpNotifications does not disconnect; use this mutation (or rely on server inactivity timeout). */
2987
3028
  disconnectUdpProxy: Scalars['Boolean']['output'];
2988
3029
  /** Exchange a one-time portal authorization code (with the matching PKCE verifier) for an app-scoped gameplay token. Public (the code + verifier authorize the call); called by the destination game at its own origin so the game never sees the player's session token. */
@@ -3055,11 +3096,11 @@ export type Mutation = {
3055
3096
  leaveTeam: Scalars['Boolean']['output'];
3056
3097
  /** Links an unlinked app to an existing environment for split-mode routing. Refuses shared apps and apps already linked elsewhere. Requires the 'manage_environments' org permission. */
3057
3098
  linkAppToEnvironment: App;
3058
- /** 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. */
3059
- login: AuthResponse;
3099
+ /** 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
+ linkIdentity: UserIdentity;
3060
3101
  /** 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. */
3061
3102
  logout: Scalars['Boolean']['output'];
3062
- /** Ends every active session for the authenticated user (deletes all their game_tokens and records revocations). Requires a valid session token. Use logout to end only the current session. */
3103
+ /** Ends every active session for the authenticated user (deletes all their game_tokens and records revocations). Requires a valid session token. */
3063
3104
  logoutAllDevices: Scalars['Boolean']['output'];
3064
3105
  /** Mint a short-lived, app-scoped gameplay token for the calling user (native/direct path; no browser redirect). Requires an identity SESSION token (app tokens cannot mint). Free/open apps auto-grant access; paid apps require an existing entitlement (else FORBIDDEN). Side effect: may create an app_user_access row on the app's free default tier. */
3065
3106
  mintAppToken: AppTokenResponse;
@@ -3077,8 +3118,6 @@ export type Mutation = {
3077
3118
  redeployEnvironment: CksEnvironmentChangeOrder;
3078
3119
  /** 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. */
3079
3120
  refreshAppToken: AppTokenResponse;
3080
- /** Creates a new (initially unconfirmed) account, sends a confirmation email, and returns an AuthResponse with a session `token` for immediate login (send as `Authorization: Bearer <token>`). Public; throws if the email already exists. */
3081
- register: AuthResponse;
3082
3121
  /** 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. */
3083
3122
  removeChannelMember: Scalars['Boolean']['output'];
3084
3123
  /** 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. */
@@ -3087,22 +3126,20 @@ export type Mutation = {
3087
3126
  removeSharedPaymentMethod: Scalars['Boolean']['output'];
3088
3127
  /** Remove a member from a team. Requires the 'manage_members' team permission, except that any member may remove themselves. DESTRUCTIVE: drops the membership and its roles. Returns true if a membership was removed. */
3089
3128
  removeTeamMember: Scalars['Boolean']['output'];
3090
- /** Starts the password-reset flow by emailing a reset link to the address. Always returns true regardless of whether the email exists or is confirmed (prevents account enumeration). Public. */
3091
- requestPasswordReset: Scalars['Boolean']['output'];
3129
+ /** 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
+ requestLoginLink: RequestLoginLinkResult;
3092
3131
  /** 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. */
3093
3132
  requestToJoinChannel: GroupMember;
3094
3133
  /** 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. */
3095
3134
  requestToJoinTeam: GroupMember;
3096
- /** 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. */
3097
- resendConfirmationEmail: Scalars['Boolean']['output'];
3098
- /** 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. */
3099
- resetPassword: Scalars['Boolean']['output'];
3100
3135
  /** 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. */
3101
3136
  restartEnvironmentServices: CksEnvironmentChangeOrder;
3102
3137
  /** 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. */
3103
3138
  resumeEnvironment: CksEnvironmentChangeOrder;
3104
3139
  /** Revoke a user's access to an app by setting their app_user_access status to 'revoked', and notifies the game API so the user immediately loses runtime access in Buddy. Requires the 'manage_access_tiers' permission on the app; super admins bypass. The row is retained for audit (not deleted); REVERSIBLE via grantAppAccess. */
3105
3140
  revokeAppAccess: AppUserAccess;
3141
+ /** Revoke a previously-granted app authorization and immediately revoke the user's live app tokens for it. Requires a SESSION token. */
3142
+ revokeAppAuthorization: Scalars['Boolean']['output'];
3106
3143
  /** Revoke a user's direct grants on a grid (deletes from the `grid_user_direct_grants` input table) and recompute their materialized effective ACL. Omit `permissionKeys` to remove ALL of the user's direct grants on the grid; pass a subset to remove only those keys. Does not affect permissions the user receives via group grants. Requires app-admin ('manage_apps'). DESTRUCTIVE for the targeted grants. Returns the user's remaining effective permission keys on the grid. */
3107
3144
  revokeGridPermissions: GridUserPermissions;
3108
3145
  /** Revoke group/role grants on a grid (deletes from the `grid_group_grants` input table) and recompute the materialized effective ACL. Omit `permissionKeys` to revoke ALL of the group/role's grants on the grid; pass a subset to revoke only those keys. Requires app-admin ('manage_apps'). DESTRUCTIVE: removes the granted permissions from every affected member. Returns the group's remaining grants on the grid. */
@@ -3127,6 +3164,8 @@ export type Mutation = {
3127
3164
  sendVoxelUpdate: Scalars['Boolean']['output'];
3128
3165
  /** 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. */
3129
3166
  setAppBudget: AppBudget;
3167
+ /** 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
+ setAppClientSettings: PortalConsentState;
3130
3169
  /** 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. */
3131
3170
  setAppSpendCaps: AppRuntimeState;
3132
3171
  /** 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. */
@@ -3157,8 +3196,14 @@ export type Mutation = {
3157
3196
  setTeamPolicy: AppGroupPolicy;
3158
3197
  /** Begins vaulting a card for off-session auto-billing. Returns a Stripe SetupIntent client secret the browser confirms; no charge is made here. Requires the 'manage_billing' org permission. */
3159
3198
  setupSharedPaymentMethod: PaymentMethodSetup;
3199
+ /** Complete a federated sign-in from the provider callback (code + state). Returns a session AuthResponse, creating/linking the account by provider identity. Public. */
3200
+ socialLoginComplete: AuthResponse;
3201
+ /** Begin a federated (social) sign-in: returns an authorizeUrl to redirect the user to and an opaque state to round-trip back to socialLoginComplete. Public. */
3202
+ socialLoginStart: SocialLoginStart;
3160
3203
  /** Checks whether the authenticated user is allowed to teleport an actor to a destination within an app and returns the authorization result. This is an authorization check only — it does NOT itself move the actor; the UDP runtime performs the actual movement. Requires a valid bearer game token plus the app-level "teleport" runtime permission. Returns success=false with errorCode INVALID_APP_ID (non-positive appId), UNAUTHORIZED (reserved sentinel destination -6,-6,-6 or missing permission), or success=true / NO_ERROR when allowed. */
3161
3204
  teleportRequest: TeleportResponse;
3205
+ /** Unlink a federated identity from the signed-in account by identityId. Refuses to remove your last remaining sign-in method. Requires a session token. */
3206
+ unlinkIdentity: Scalars['Boolean']['output'];
3162
3207
  /** Update an existing access tier (name, ordering, pricing, permissions, etc.); only fields present in the input are changed. Requires the 'manage_access_tiers' permission on the app that owns the tier (resolved from tierId); super admins bypass. SIDE EFFECTS: re-syncs the tier's permissions to the game API. Throws if the tier is not found or the caller lacks permission. */
3163
3208
  updateAccessTier: AppAccessTier;
3164
3209
  /** Partially updates an actor (appId, avatarId, chunk, publicState, privateState); fields omitted from `input` are left unchanged. OWNER-EXCLUSIVE: only the actor’s owner may update (throws Unauthorized otherwise). Requires a valid game token. `uuid` is the 32-character ASCII actor id. */
@@ -3232,6 +3277,9 @@ export type MutationArchiveAppArgs = {
3232
3277
  export type MutationAssignGroupToGridArgs = {
3233
3278
  input: AssignGroupToGridInput;
3234
3279
  };
3280
+ export type MutationAuthorizeAppArgs = {
3281
+ input: AuthorizeAppInput;
3282
+ };
3235
3283
  export type MutationCancelSharedSubscriptionArgs = {
3236
3284
  appId: Scalars['BigInt']['input'];
3237
3285
  idempotencyKey?: InputMaybe<Scalars['String']['input']>;
@@ -3240,15 +3288,11 @@ export type MutationCapturePaypalCheckoutArgs = {
3240
3288
  idempotencyKey?: InputMaybe<Scalars['String']['input']>;
3241
3289
  orderId: Scalars['String']['input'];
3242
3290
  };
3243
- export type MutationChangePasswordArgs = {
3244
- currentPassword: Scalars['String']['input'];
3245
- newPassword: Scalars['String']['input'];
3246
- };
3247
3291
  export type MutationClaimFreeAppAccessArgs = {
3248
3292
  appId: Scalars['BigInt']['input'];
3249
3293
  };
3250
- export type MutationConfirmEmailArgs = {
3251
- token: Scalars['String']['input'];
3294
+ export type MutationCompleteLoginLinkArgs = {
3295
+ input: CompleteLoginLinkInput;
3252
3296
  };
3253
3297
  export type MutationCreateAccessTierArgs = {
3254
3298
  input: CreateAccessTierInput;
@@ -3337,6 +3381,9 @@ export type MutationDeleteUserAppStateArgs = {
3337
3381
  export type MutationDestroyEnvironmentArgs = {
3338
3382
  input: DestroyEnvironmentInput;
3339
3383
  };
3384
+ export type MutationDevLoginArgs = {
3385
+ input: DevLoginInput;
3386
+ };
3340
3387
  export type MutationExchangePortalCodeArgs = {
3341
3388
  input: ExchangePortalCodeInput;
3342
3389
  };
@@ -3449,8 +3496,8 @@ export type MutationLeaveTeamArgs = {
3449
3496
  export type MutationLinkAppToEnvironmentArgs = {
3450
3497
  input: LinkAppToEnvironmentInput;
3451
3498
  };
3452
- export type MutationLoginArgs = {
3453
- loginUserInput: LoginUserInput;
3499
+ export type MutationLinkIdentityArgs = {
3500
+ input: LinkIdentityInput;
3454
3501
  };
3455
3502
  export type MutationMintAppTokenArgs = {
3456
3503
  input: MintAppTokenInput;
@@ -3484,9 +3531,6 @@ export type MutationPutCpSecretArgs = {
3484
3531
  export type MutationRedeployEnvironmentArgs = {
3485
3532
  input: RedeployEnvironmentInput;
3486
3533
  };
3487
- export type MutationRegisterArgs = {
3488
- registerUserInput: RegisterUserInput;
3489
- };
3490
3534
  export type MutationRemoveChannelMemberArgs = {
3491
3535
  groupId: Scalars['BigInt']['input'];
3492
3536
  userId: Scalars['BigInt']['input'];
@@ -3505,8 +3549,8 @@ export type MutationRemoveTeamMemberArgs = {
3505
3549
  groupId: Scalars['BigInt']['input'];
3506
3550
  userId: Scalars['BigInt']['input'];
3507
3551
  };
3508
- export type MutationRequestPasswordResetArgs = {
3509
- email: Scalars['String']['input'];
3552
+ export type MutationRequestLoginLinkArgs = {
3553
+ input: RequestLoginLinkInput;
3510
3554
  };
3511
3555
  export type MutationRequestToJoinChannelArgs = {
3512
3556
  groupId: Scalars['BigInt']['input'];
@@ -3514,12 +3558,6 @@ export type MutationRequestToJoinChannelArgs = {
3514
3558
  export type MutationRequestToJoinTeamArgs = {
3515
3559
  groupId: Scalars['BigInt']['input'];
3516
3560
  };
3517
- export type MutationResendConfirmationEmailArgs = {
3518
- email: Scalars['String']['input'];
3519
- };
3520
- export type MutationResetPasswordArgs = {
3521
- resetPasswordInput: ResetPasswordInput;
3522
- };
3523
3561
  export type MutationRestartEnvironmentServicesArgs = {
3524
3562
  input: RestartEnvironmentServicesInput;
3525
3563
  };
@@ -3531,6 +3569,9 @@ export type MutationRevokeAppAccessArgs = {
3531
3569
  idempotencyKey?: InputMaybe<Scalars['String']['input']>;
3532
3570
  userId: Scalars['BigInt']['input'];
3533
3571
  };
3572
+ export type MutationRevokeAppAuthorizationArgs = {
3573
+ appId: Scalars['BigInt']['input'];
3574
+ };
3534
3575
  export type MutationRevokeGridPermissionsArgs = {
3535
3576
  input: RevokeGridPermissionsInput;
3536
3577
  };
@@ -3571,6 +3612,9 @@ export type MutationSetAppBudgetArgs = {
3571
3612
  monthlyLimitCents: Scalars['BigInt']['input'];
3572
3613
  orgId: Scalars['BigInt']['input'];
3573
3614
  };
3615
+ export type MutationSetAppClientSettingsArgs = {
3616
+ input: SetAppClientSettingsInput;
3617
+ };
3574
3618
  export type MutationSetAppSpendCapsArgs = {
3575
3619
  appId: Scalars['BigInt']['input'];
3576
3620
  dailyLimitCents?: InputMaybe<Scalars['BigInt']['input']>;
@@ -3630,9 +3674,18 @@ export type MutationSetupSharedPaymentMethodArgs = {
3630
3674
  idempotencyKey?: InputMaybe<Scalars['String']['input']>;
3631
3675
  orgId: Scalars['BigInt']['input'];
3632
3676
  };
3677
+ export type MutationSocialLoginCompleteArgs = {
3678
+ input: SocialLoginCompleteInput;
3679
+ };
3680
+ export type MutationSocialLoginStartArgs = {
3681
+ input: SocialLoginStartInput;
3682
+ };
3633
3683
  export type MutationTeleportRequestArgs = {
3634
3684
  input: TeleportRequestInput;
3635
3685
  };
3686
+ export type MutationUnlinkIdentityArgs = {
3687
+ identityId: Scalars['String']['input'];
3688
+ };
3636
3689
  export type MutationUpdateAccessTierArgs = {
3637
3690
  input: UpdateAccessTierInput;
3638
3691
  tierId: Scalars['BigInt']['input'];
@@ -4012,6 +4065,20 @@ export type PortalAuthorizationCode = {
4012
4065
  /** The validated redirect URI the player should be sent to. */
4013
4066
  redirectUri: Scalars['String']['output'];
4014
4067
  };
4068
+ /** Whether portaling into an app requires a consent prompt on the Overworld. */
4069
+ export type PortalConsentState = {
4070
+ __typename?: 'PortalConsentState';
4071
+ /** True if the user already has an active grant for this app. */
4072
+ alreadyGranted: Scalars['Boolean']['output'];
4073
+ /** App id, as a String. */
4074
+ appId: Scalars['String']['output'];
4075
+ /** App display name. */
4076
+ appName: Maybe<Scalars['String']['output']>;
4077
+ /** True if the Overworld must show a consent screen (untrusted app, not yet granted) before creating a portal code. */
4078
+ consentRequired: Scalars['Boolean']['output'];
4079
+ /** True for first-party/trusted apps (consent is always skipped). */
4080
+ trusted: Scalars['Boolean']['output'];
4081
+ };
4015
4082
  /** Postgres billing tier: bandwidth allotment and capacity charge. Usage metering deferred. */
4016
4083
  export type PostgresBillingTier = {
4017
4084
  __typename?: 'PostgresBillingTier';
@@ -4090,6 +4157,8 @@ export type Query = {
4090
4157
  appsConnection: AppsConnection;
4091
4158
  /** All apps belonging to an organization, identified by the org's slug, regardless of visibility or status (includes drafts and archived). Requires authentication; intended for org dashboards. Ordered newest-first. Returns an empty list for an unknown slug. */
4092
4159
  appsForOrg: Array<App>;
4160
+ /** The federated sign-in providers currently enabled (e.g. ['google']). Use one with socialLoginStart. The dev mock provider only appears when the dev bypass is enabled. */
4161
+ availableLoginProviders: Array<Scalars['String']['output']>;
4093
4162
  /** Fetches a single avatar by id. Requires a valid game token. Owner-aware: the owner receives full state; non-owners receive a public copy with `privateState` stripped (null). Throws NotFound if the id does not exist. State blobs are base64-encoded binary. */
4094
4163
  avatar: Avatar;
4095
4164
  /** Reads one avatar’s per-app state (keyed by appId+avatarId). PUBLIC READ: any authenticated user may read it. Requires a valid game token. Returns null when no row exists. `state` is base64-encoded binary. */
@@ -4234,6 +4303,8 @@ export type Query = {
4234
4303
  myAppAccess: Maybe<AppUserAccess>;
4235
4304
  /** Apps the authenticated caller can see in their account: those owned by an org they are an active member of, OR those where they hold an active app_user_access grant. Requires authentication. Includes apps of any visibility/status (e.g. drafts the caller can access). Ordered newest-first. */
4236
4305
  myApps: Array<App>;
4306
+ /** The calling user's active app authorizations ("connected apps"). Requires a SESSION token. */
4307
+ myAuthorizedApps: Array<AppAuthorizationGrant>;
4237
4308
  /** Lists all avatars owned by the authenticated user, including full `publicState` and `privateState` (the caller is always the owner here). Requires a valid bearer game token; takes no arguments. State blobs are base64-encoded binary. Use `userAvatars` to view another user’s avatars (private state is stripped for non-owners). */
4238
4309
  myAvatars: Array<AvatarDto>;
4239
4310
  /** The caller's channels in an app, with their roles and effective channel permissions (e.g. whether they hold send_messages). Use this to discover which channels the current user can read/post in. */
@@ -4247,6 +4318,8 @@ export type Query = {
4247
4318
  * @deprecated Legacy donation/property-token data; these products are no longer purchasable. Retained for historical records.
4248
4319
  */
4249
4320
  myDonationData: UserDonationData;
4321
+ /** The signed-in user's linked sign-in identities. */
4322
+ myIdentities: Array<UserIdentity>;
4250
4323
  /** Lists the authenticated caller's organization memberships. Each entry bundles the org, the caller's effective permission keys, and assigned roles. Requires a valid session token. */
4251
4324
  myOrganizations: Array<OrgMembership>;
4252
4325
  /**
@@ -4292,6 +4365,8 @@ export type Query = {
4292
4365
  platformConfig: PlatformConfig;
4293
4366
  /** 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. */
4294
4367
  playerPulse: PlayerPulse;
4368
+ /** Whether portaling the calling user into an app needs a consent prompt. Trusted (first-party) apps and already-granted apps return consentRequired=false. The Overworld calls this before createPortalAuthorizationCode. Requires a SESSION token. */
4369
+ portalConsent: PortalConsentState;
4295
4370
  /** Public read-only catalog of active Postgres billing tiers. Usage metering deferred. */
4296
4371
  postgresBillingTiers: Array<PostgresBillingTier>;
4297
4372
  /** Lists the app-scoped quota rules explicitly configured for an app (excludes org-, tier-, and free-tier-default quotas). Use `effectiveQuota` to resolve the limit actually applied for a given metric. Requires the 'view_usage' app permission. */
@@ -4721,6 +4796,9 @@ export type QueryPaymentEventsConnectionArgs = {
4721
4796
  export type QueryPlayerPulseArgs = {
4722
4797
  orgId: Scalars['BigInt']['input'];
4723
4798
  };
4799
+ export type QueryPortalConsentArgs = {
4800
+ appId: Scalars['BigInt']['input'];
4801
+ };
4724
4802
  export type QueryQuotasForAppArgs = {
4725
4803
  appId: Scalars['BigInt']['input'];
4726
4804
  };
@@ -4819,19 +4897,20 @@ export type RedeployEnvironmentInput = {
4819
4897
  /** 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). */
4820
4898
  version?: InputMaybe<Scalars['String']['input']>;
4821
4899
  };
4822
- export type RegisterUserInput = {
4823
- /** Email for the new account; the confirmation email is sent here. */
4900
+ /** Request an emailed magic-link to sign in (passwordless). */
4901
+ export type RequestLoginLinkInput = {
4902
+ /** Email address to send the one-time sign-in link to. */
4824
4903
  email: Scalars['String']['input'];
4825
- /** Optional initial public gamertag (min 3 characters). Can be set later via updateGamertag. */
4826
- gamertag?: InputMaybe<Scalars['String']['input']>;
4827
- /** Password for the new account (min 8 characters). */
4828
- password: Scalars['String']['input'];
4829
- };
4830
- export type ResetPasswordInput = {
4831
- /** New password to set (min 8 characters). */
4832
- newPassword: Scalars['String']['input'];
4833
- /** Password-reset token from the emailed reset link. */
4834
- token: Scalars['String']['input'];
4904
+ /** Where to send the user after they click the link (origin must be an allowed app/UI origin). Defaults to the platform sign-in page. */
4905
+ redirectUri?: InputMaybe<Scalars['String']['input']>;
4906
+ };
4907
+ /** Result of requesting a magic link. */
4908
+ export type RequestLoginLinkResult = {
4909
+ __typename?: 'RequestLoginLinkResult';
4910
+ /** DEV ONLY: when DEV_AUTH_BYPASS is enabled (so no email is delivered), the one-time token to pass to completeLoginLink. Always null in production. */
4911
+ devToken: Maybe<Scalars['String']['output']>;
4912
+ /** Always true (does not reveal whether the email exists). */
4913
+ sent: Scalars['Boolean']['output'];
4835
4914
  };
4836
4915
  export type RestartEnvironmentServicesInput = {
4837
4916
  /** Organization id (BigInt) that owns the environment. */
@@ -5149,6 +5228,16 @@ export type ServiceQuota = {
5149
5228
  /** When the rule was last updated (ISO-8601 UTC timestamp). */
5150
5229
  updatedAt: Scalars['DateTime']['output'];
5151
5230
  };
5231
+ /** Register/update an app's OAuth client settings for the portal handoff (requires manage_apps on the app). */
5232
+ export type SetAppClientSettingsInput = {
5233
+ appId: Scalars['BigInt']['input'];
5234
+ /** OAuth client type: 'public' (browser/PKCE) or 'confidential'. */
5235
+ clientType?: InputMaybe<Scalars['String']['input']>;
5236
+ /** Browser launch URL players are sent to when entering the app. */
5237
+ launchUrl?: InputMaybe<Scalars['String']['input']>;
5238
+ /** Allow-listed redirect URIs for the portal authorization code (origin-matched). Replaces the current list. */
5239
+ redirectUris?: InputMaybe<Array<Scalars['String']['input']>>;
5240
+ };
5152
5241
  /** Set the per-app automation policy (guardrails / platform ceilings). */
5153
5242
  export type SetAutomationPolicyInput = {
5154
5243
  /** The app (tenant). */
@@ -5311,6 +5400,29 @@ export type SingleActorMessageNotification = {
5311
5400
  /** The destination actor’s UUID (your own actor’s UUID, echoed from the message). */
5312
5401
  uuid: Scalars['String']['output'];
5313
5402
  };
5403
+ /** Complete a federated sign-in from the provider callback. */
5404
+ export type SocialLoginCompleteInput = {
5405
+ /** The authorization code returned by the provider. */
5406
+ code: Scalars['String']['input'];
5407
+ provider: Scalars['String']['input'];
5408
+ /** The opaque state value from socialLoginStart (CSRF binding). */
5409
+ state: Scalars['String']['input'];
5410
+ };
5411
+ /** A federated sign-in handoff: redirect the user to authorizeUrl. */
5412
+ export type SocialLoginStart = {
5413
+ __typename?: 'SocialLoginStart';
5414
+ /** Provider authorize URL to redirect the user to. */
5415
+ authorizeUrl: Scalars['String']['output'];
5416
+ /** Opaque state to round-trip back to socialLoginComplete. */
5417
+ state: Scalars['String']['output'];
5418
+ };
5419
+ /** Begin a federated (social) sign-in. */
5420
+ export type SocialLoginStartInput = {
5421
+ /** Provider id, e.g. 'google' (see availableLoginProviders). */
5422
+ provider: Scalars['String']['input'];
5423
+ /** The callback URL the provider returns to (must be a registered auth callback for your app/UI). */
5424
+ redirectUri: Scalars['String']['input'];
5425
+ };
5314
5426
  export type Subscription = {
5315
5427
  __typename?: 'Subscription';
5316
5428
  /** Realtime downlink from the game server: spatial notifications and responses, GenericErrorResponse (errors from your sends, correlated by sequenceNumber), and RealtimeConnectionEvent (lifecycle/setup failures). Requires a bearer game token AND an appId-scoped connection — the appId is read from the graphql-transport-ws connection (game tokens are app-agnostic and one UDP socket is shared across apps, so an app-agnostic subscription is rejected with a RealtimeConnectionEvent code APP_ID_REQUIRED, and a missing/invalid token with AUTH_REQUIRED). On subscribe, opens a UDP proxy session if none exists (binds to the least-loaded game server); open/transport failures are delivered as RealtimeConnectionEvent (code UDP_PROXY_CONNECTION_FAILED) and then the stream ends. Only this app’s spatial fan-out is delivered; appId-less control frames always pass. Subscribe before/while sending so async results are not missed. Unsubscribing stops delivery only — it does NOT close the UDP session; call disconnectUdpProxy (or rely on the server inactivity timeout) to release it. */
@@ -5829,6 +5941,20 @@ export type UserEdge = {
5829
5941
  /** The node at the end of this edge. */
5830
5942
  node: User;
5831
5943
  };
5944
+ /** A federated / passwordless sign-in identity linked to a user account (a social provider, an emailed magic link, or the dev bypass). */
5945
+ export type UserIdentity = {
5946
+ __typename?: 'UserIdentity';
5947
+ createdAt: Scalars['DateTime']['output'];
5948
+ email: Maybe<Scalars['String']['output']>;
5949
+ emailVerified: Scalars['Boolean']['output'];
5950
+ identityId: Scalars['ID']['output'];
5951
+ lastLoginAt: Maybe<Scalars['DateTime']['output']>;
5952
+ /** The identity provider: 'google' | 'apple' | 'discord' | 'email' (magic link) | 'dev' (dev bypass). */
5953
+ provider: Scalars['String']['output'];
5954
+ /** The provider's stable subject id ('sub'). For 'email'/'dev' this is the lowercased email. */
5955
+ subject: Scalars['String']['output'];
5956
+ userId: Scalars['ID']['output'];
5957
+ };
5832
5958
  /** Aggregated property-token balances for a user. LEGACY: property tokens are no longer purchasable. Returned by the deprecated myPropertyTokens query. */
5833
5959
  export type UserPropertyTokenData = {
5834
5960
  __typename?: 'UserPropertyTokenData';
@@ -6776,47 +6902,6 @@ export type UpdateAppMutation = {
6776
6902
  updatedAt: string;
6777
6903
  };
6778
6904
  };
6779
- export type ChangePasswordMutationVariables = Exact<{
6780
- currentPassword: Scalars['String']['input'];
6781
- newPassword: Scalars['String']['input'];
6782
- }>;
6783
- export type ChangePasswordMutation = {
6784
- __typename?: 'Mutation';
6785
- changePassword: boolean;
6786
- };
6787
- export type ConfirmEmailMutationVariables = Exact<{
6788
- token: Scalars['String']['input'];
6789
- }>;
6790
- export type ConfirmEmailMutation = {
6791
- __typename?: 'Mutation';
6792
- confirmEmail: boolean;
6793
- };
6794
- export type LoginMutationVariables = Exact<{
6795
- input: LoginUserInput;
6796
- }>;
6797
- export type LoginMutation = {
6798
- __typename?: 'Mutation';
6799
- login: {
6800
- __typename?: 'AuthResponse';
6801
- token: string;
6802
- gameTokenId: string;
6803
- user: {
6804
- __typename?: 'User';
6805
- userId: string;
6806
- email: string | null;
6807
- gamertag: string | null;
6808
- disambiguation: string | null;
6809
- isConfirmed: boolean;
6810
- createdAt: string;
6811
- grantEarlyAccess: boolean;
6812
- grantEarlyAccessOverride: boolean;
6813
- orgId: string | null;
6814
- externalId: string | null;
6815
- userType: string;
6816
- isSuperAdmin: boolean;
6817
- };
6818
- };
6819
- };
6820
6905
  export type LogoutMutationVariables = Exact<{
6821
6906
  [key: string]: never;
6822
6907
  }>;
@@ -6831,53 +6916,6 @@ export type LogoutAllDevicesMutation = {
6831
6916
  __typename?: 'Mutation';
6832
6917
  logoutAllDevices: boolean;
6833
6918
  };
6834
- export type RegisterMutationVariables = Exact<{
6835
- input: RegisterUserInput;
6836
- }>;
6837
- export type RegisterMutation = {
6838
- __typename?: 'Mutation';
6839
- register: {
6840
- __typename?: 'AuthResponse';
6841
- token: string;
6842
- gameTokenId: string;
6843
- user: {
6844
- __typename?: 'User';
6845
- userId: string;
6846
- email: string | null;
6847
- gamertag: string | null;
6848
- disambiguation: string | null;
6849
- isConfirmed: boolean;
6850
- createdAt: string;
6851
- grantEarlyAccess: boolean;
6852
- grantEarlyAccessOverride: boolean;
6853
- orgId: string | null;
6854
- externalId: string | null;
6855
- userType: string;
6856
- isSuperAdmin: boolean;
6857
- };
6858
- };
6859
- };
6860
- export type RequestPasswordResetMutationVariables = Exact<{
6861
- email: Scalars['String']['input'];
6862
- }>;
6863
- export type RequestPasswordResetMutation = {
6864
- __typename?: 'Mutation';
6865
- requestPasswordReset: boolean;
6866
- };
6867
- export type ResendConfirmationEmailMutationVariables = Exact<{
6868
- email: Scalars['String']['input'];
6869
- }>;
6870
- export type ResendConfirmationEmailMutation = {
6871
- __typename?: 'Mutation';
6872
- resendConfirmationEmail: boolean;
6873
- };
6874
- export type ResetPasswordMutationVariables = Exact<{
6875
- input: ResetPasswordInput;
6876
- }>;
6877
- export type ResetPasswordMutation = {
6878
- __typename?: 'Mutation';
6879
- resetPassword: boolean;
6880
- };
6881
6919
  export type UserAvatarsQueryVariables = Exact<{
6882
6920
  userId: Scalars['BigInt']['input'];
6883
6921
  }>;
@@ -12015,15 +12053,8 @@ export declare const AppsConnectionDocument: DocumentNode<AppsConnectionQuery, A
12015
12053
  export declare const MyAppsDocument: DocumentNode<MyAppsQuery, MyAppsQueryVariables>;
12016
12054
  export declare const SetAppVisibilityDocument: DocumentNode<SetAppVisibilityMutation, SetAppVisibilityMutationVariables>;
12017
12055
  export declare const UpdateAppDocument: DocumentNode<UpdateAppMutation, UpdateAppMutationVariables>;
12018
- export declare const ChangePasswordDocument: DocumentNode<ChangePasswordMutation, ChangePasswordMutationVariables>;
12019
- export declare const ConfirmEmailDocument: DocumentNode<ConfirmEmailMutation, ConfirmEmailMutationVariables>;
12020
- export declare const LoginDocument: DocumentNode<LoginMutation, LoginMutationVariables>;
12021
12056
  export declare const LogoutDocument: DocumentNode<LogoutMutation, LogoutMutationVariables>;
12022
12057
  export declare const LogoutAllDevicesDocument: DocumentNode<LogoutAllDevicesMutation, LogoutAllDevicesMutationVariables>;
12023
- export declare const RegisterDocument: DocumentNode<RegisterMutation, RegisterMutationVariables>;
12024
- export declare const RequestPasswordResetDocument: DocumentNode<RequestPasswordResetMutation, RequestPasswordResetMutationVariables>;
12025
- export declare const ResendConfirmationEmailDocument: DocumentNode<ResendConfirmationEmailMutation, ResendConfirmationEmailMutationVariables>;
12026
- export declare const ResetPasswordDocument: DocumentNode<ResetPasswordMutation, ResetPasswordMutationVariables>;
12027
12058
  export declare const UserAvatarsDocument: DocumentNode<UserAvatarsQuery, UserAvatarsQueryVariables>;
12028
12059
  export declare const AvatarByIdDocument: DocumentNode<AvatarByIdQuery, AvatarByIdQueryVariables>;
12029
12060
  export declare const MyAvatarsDocument: DocumentNode<MyAvatarsQuery, MyAvatarsQueryVariables>;