@crowdedkingdoms/crowdyjs 15.2.0 → 15.3.0-test.1

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.
@@ -3708,6 +3708,10 @@ export type GmAppDiagnostics = {
3708
3708
  failedEvents24h: Scalars['Int']['output'];
3709
3709
  /** Defined functions. */
3710
3710
  functionCount: Scalars['Int']['output'];
3711
+ /** Model-driven notifications emitted in the last 24h, across every function and automation. */
3712
+ notificationsEmitted24h: Scalars['Int']['output'];
3713
+ /** Of those, how many reached nobody: the target channel had no members in this app. Emission is best-effort and cannot fail your function, so this is the only place an undeliverable notification is visible — a non-zero count here beside a healthy run history is the signature of a notification aimed at a channel this app does not own. Check gameModelLint for NOTIFICATION_CHANNEL_FOREIGN, which names the function. Note this does NOT mean delivery is broken: it counts datagrams that were sent to every server successfully and had no recipient. */
3714
+ notificationsUndeliverable24h: Scalars['Int']['output'];
3711
3715
  /** Property rows in the app. */
3712
3716
  propertyCount: Scalars['Int']['output'];
3713
3717
  /** Sessions in the app. */
@@ -4132,7 +4136,7 @@ export type GmFunction = {
4132
4136
  returnType: Maybe<Scalars['String']['output']>;
4133
4137
  /** Declarative one-shot timers armed atomically with the function's mutations. */
4134
4138
  timers: Array<GmFunctionTimer>;
4135
- /** Non-fatal static-analysis warnings from the last upload. */
4139
+ /** Non-fatal static-analysis warnings, recomputed for this read rather than remembered from the upload. That matters because they are cross-object: a call to a function written later stops being a warning once that function exists, and starts being one again if it is deleted. For the structured form, with a code and a severity per finding, use gameModelLint. */
4136
4140
  warnings: Array<Scalars['String']['output']>;
4137
4141
  };
4138
4142
  /** The player-invoke breaker's mode and thresholds on the answering instance, with this app's circuits. The mode decides whether any of it refuses anything. */
@@ -4254,6 +4258,82 @@ export type GmInvokeResult = {
4254
4258
  /** True if the invocation succeeded; false if it was rejected or errored. */
4255
4259
  success: Scalars['Boolean']['output'];
4256
4260
  };
4261
+ /** What is wrong, at the granularity a developer would fix. One code per distinguishable remedy: a missing `fn:` target and a missing timer target are both an unresolved name and are kept apart because the second one arms successfully and fails minutes later somewhere else. */
4262
+ export declare enum GmLintCode {
4263
+ /** The app holds containers and declares no types at all — the shape an app takes when it is recreated or moved between organizations, because containers are made on demand by the client and schema is not carried with them. */
4264
+ AppHasNoContainerTypes = "APP_HAS_NO_CONTAINER_TYPES",
4265
+ /** An automation trigger's filter cannot match, so it will never dispatch. */
4266
+ AutomationTriggerUnmatchable = "AUTOMATION_TRIGGER_UNMATCHABLE",
4267
+ /** A container names a type this app has not defined. The client cannot bind it, and the only symptom is "no container bound for entity" in the game's own log. */
4268
+ ContainerTypeUndefined = "CONTAINER_TYPE_UNDEFINED",
4269
+ /** A `fn:` call names a function this app does not define. */
4270
+ FunctionNotDefined = "FUNCTION_NOT_DEFINED",
4271
+ /** A stored function definition no longer compiles, so it is inert. Only possible for a row written before a validation the compiler enforces now; re-upsert it. */
4272
+ FunctionUncompilable = "FUNCTION_UNCOMPILABLE",
4273
+ /** A grid builtin was given a mode or axis literal outside its allowed set. */
4274
+ GridLiteralInvalid = "GRID_LITERAL_INVALID",
4275
+ /** A channel notification names a channel that belongs to a different app. Membership is scoped to the app, so the datagram reaches nobody no matter how healthy delivery is — the shape a model takes when it is copied out of the app it was authored against. Repoint it, or name the channel with `channel_name` so it cannot go stale again. */
4276
+ NotificationChannelForeign = "NOTIFICATION_CHANNEL_FOREIGN",
4277
+ /** A channel notification names a channel id, or a channel name, that this app does not have. A warning rather than an error because the channel may simply not exist yet. */
4278
+ NotificationChannelUnknown = "NOTIFICATION_CHANNEL_UNKNOWN",
4279
+ /** An expression references a `$param` the function does not declare. */
4280
+ ParamNotDeclared = "PARAM_NOT_DECLARED",
4281
+ /** A permission-key literal is not in the runtime_permissions catalog. */
4282
+ PermissionKeyUnknown = "PERMISSION_KEY_UNKNOWN",
4283
+ /** `self.<key>` is not in the property definitions for the function's container type. */
4284
+ PropertyNotDeclared = "PROPERTY_NOT_DECLARED",
4285
+ /** A timer's target function does not exist. */
4286
+ TimerTargetMissing = "TIMER_TARGET_MISSING",
4287
+ /** A timer's target exists but is not autonomousInvocable, so the timer arms and then fails when it fires. */
4288
+ TimerTargetNotAutonomous = "TIMER_TARGET_NOT_AUTONOMOUS"
4289
+ }
4290
+ /** One problem with one object in the game model, recomputed at read time rather than remembered from a write. */
4291
+ export type GmLintFindingType = {
4292
+ __typename?: 'GmLintFindingType';
4293
+ /** What is wrong. */
4294
+ code: GmLintCode;
4295
+ /** How many objects this row stands for, when one finding summarises many (for example a type missing under 40 containers). */
4296
+ count: Maybe<Scalars['Int']['output']>;
4297
+ /** What is wrong, in a sentence. */
4298
+ message: Scalars['String']['output'];
4299
+ /** What to do about it. */
4300
+ remedy: Maybe<Scalars['String']['output']>;
4301
+ /** ERROR is provably broken and gate-eligible; WARNING is reported only. */
4302
+ severity: GmLintSeverity;
4303
+ /** The object's own name — a function name, a container type name — not a rendered label. Group and deduplicate on (code, subject). */
4304
+ subject: Scalars['String']['output'];
4305
+ /** What kind of object this is about. */
4306
+ subjectKind: GmLintSubjectKind;
4307
+ };
4308
+ /** Whether an app's game model hangs together. Every check is recomputed on demand: a stored warning goes stale the moment an unrelated object changes, which is the failure this replaces. */
4309
+ export type GmLintResult = {
4310
+ __typename?: 'GmLintResult';
4311
+ /** The app that was linted. */
4312
+ appId: Scalars['BigInt']['output'];
4313
+ /** True when there are no ERROR findings. WARNING findings do not make an app unclean, because most of them are a normal mid-edit state. */
4314
+ clean: Scalars['Boolean']['output'];
4315
+ /** How many findings have severity ERROR. */
4316
+ errorCount: Scalars['Int']['output'];
4317
+ /** Findings, errors first, then by code and subject. */
4318
+ findings: Array<GmLintFindingType>;
4319
+ /** How many findings have severity WARNING. */
4320
+ warningCount: Scalars['Int']['output'];
4321
+ };
4322
+ /** How much a finding is worth doing something about. Only ERROR is ever eligible to gate anything; WARNING is reported and never enforced, because ordinary authoring is transiently inconsistent and a gate that fought it would be worse than the problem. */
4323
+ export declare enum GmLintSeverity {
4324
+ /** Provably broken. No reading of the app makes this fine, and the platform can say so without knowing your intent. */
4325
+ Error = "ERROR",
4326
+ /** Suspicious and frequently correct anyway — most often because you are mid-edit and the other half is not written yet. */
4327
+ Warning = "WARNING"
4328
+ }
4329
+ /** What kind of object a finding is about, so results can be grouped without parsing `subject`. */
4330
+ export declare enum GmLintSubjectKind {
4331
+ App = "APP",
4332
+ Automation = "AUTOMATION",
4333
+ Container = "CONTAINER",
4334
+ ContainerType = "CONTAINER_TYPE",
4335
+ Function = "FUNCTION"
4336
+ }
4257
4337
  /** One property write applied during a function invocation (with before/after values). */
4258
4338
  export type GmMutationApplied = {
4259
4339
  __typename?: 'GmMutationApplied';
@@ -4502,7 +4582,7 @@ export type GraphQlServer = {
4502
4582
  memoryUsagePct: Maybe<Scalars['Float']['output']>;
4503
4583
  /** Cloud provider instance id of the underlying host, if known. */
4504
4584
  providerInstanceId: Maybe<Scalars['String']['output']>;
4505
- /** Public hostname clients can reach this instance on directly over TLS, e.g. `ck-api-or-1.prod.v7.cks-env.com`. Null when the instance has no public DNS name or certificate yet, in which case it is reachable only through the shared load balancer and must not be connected to directly. Prefer the `gameApiUrl` returned by mintAppToken over building a URL from this field: that call already picks a low-load instance for you. */
4585
+ /** Public hostname clients can reach this instance on directly over TLS, e.g. `ck-api-or-1.prod.crowdedkingdoms.com`. Null when the instance has no public DNS name or certificate yet, in which case it is reachable only through the shared load balancer and must not be connected to directly. Prefer the `gameApiUrl` returned by mintAppToken over building a URL from this field: that call already picks a low-load instance for you. */
4506
4586
  publicHostname: Maybe<Scalars['String']['output']>;
4507
4587
  /** Public IPv4 address clients use to reach this server, if assigned. */
4508
4588
  publicIp4: Maybe<Scalars['String']['output']>;
@@ -4929,7 +5009,7 @@ export type Mutation = {
4929
5009
  cancelSharedSubscription: AppSharedSubscription;
4930
5010
  /** 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. */
4931
5011
  capturePaypalCheckout: Checkout;
4932
- /** 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. */
5012
+ /** Changes the authenticated user's password after verifying the current password. Requires a valid session token. Returns true on success. Refuses with extensions.code INVALID_CURRENT_PASSWORD (403) when the current password is wrong, and PASSWORD_NOT_SET (409) when the account has no password to change — use setInitialPassword for that, which needs only the session. NEITHER of those means the session is invalid, and neither is UNAUTHENTICATED: both were until v1.60.0, so a client that signs the user out on UNAUTHENTICATED was signing them out over a typo. Existing sessions are not revoked. */
4933
5013
  changePassword: Scalars['Boolean']['output'];
4934
5014
  /** 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. */
4935
5015
  claimFreeAppAccess: AppUserAccess;
@@ -5055,7 +5135,7 @@ export type Mutation = {
5055
5135
  crowdyStudioProjectSave: CrowdyStudioProject;
5056
5136
  /** Apply a batch of project-file upserts and deletes in one transaction under one expected project revision. Requires an app-scoped token and exact project ownership. No partial writes survive path, manifest, independent 8-file/64-KiB-file/256-KiB-target caps, aggregate storage, or revision failures. */
5057
5137
  crowdyStudioProjectSaveFiles: CrowdyStudioProject;
5058
- /** Optimistically save selected private project metadata and increment its monotonic revision. Requires an app-scoped token and exact project ownership. A stale expectedRevision returns CONFLICT; grid affinity remains an authoring hint and never bypasses player-compute deployment checks. */
5138
+ /** Optimistically save selected private project metadata and increment its monotonic revision. Requires an app-scoped token and exact project ownership. A stale expectedRevision is refused with extensions.code CROWDY_STUDIO_REVISION_CONFLICT (HTTP 409) — that exact string, not CONFLICT, which is what an earlier wording of this sentence implied and what one SDK consequently matched on; grid affinity remains an authoring hint and never bypasses player-compute deployment checks. */
5059
5139
  crowdyStudioProjectSaveMetadata: CrowdyStudioProject;
5060
5140
  /** Archive or restore a private project without deleting any source or provenance, using optimistic revision control. Requires an app-scoped token and exact owner match. Archived projects remain readable by their owner but are read-only until restored. */
5061
5141
  crowdyStudioProjectSetArchived: CrowdyStudioProject;
@@ -5221,8 +5301,10 @@ export type Mutation = {
5221
5301
  refreshAppToken: AppTokenResponse;
5222
5302
  /** Request a refund of a paid acquisition (P4b). Allowed only within the refund window and before meaningful use (first install/fetch voids it), capped per buyer; a successful refund credits the wallet, reverses the ledger split, claws back the seller balance, revokes the acquisition, and drains installs. Returns cents refunded. */
5223
5303
  refundPlayerCodeAcquisition: Scalars['Int']['output'];
5224
- /** 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. */
5304
+ /** 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, refused with extensions.code EMAIL_ALREADY_REGISTERED (409). It is a routine outcome rather than a fault, and it reached clients as INTERNAL_SERVER_ERROR before v1.60.0, which is why several of them match it by its message text. Public. */
5225
5305
  register: AuthResponse;
5306
+ /** OPERATOR ONLY. Reverses a retirement: the organization returns to status 'active', deleted_at is cleared, and the tombstone records who put it back and why rather than being deleted. Its apps are LEFT ARCHIVED — un-archiving is archiveApp's inverse and belongs to whoever decides which apps should serve traffic again. Refuses an organization that is not currently retired. */
5307
+ reinstateOrganization: OrgRetirementType;
5226
5308
  /** Release a one-chunk grid previously created through claimGridChunk. Requires an ordinary app-scoped player token and the caller must still be its current user owner. Refuses foreign grids, studio/marketplace grids, and grids assigned through legacy claimGridOwnership. Atomically removes active install attachments, self-claim ownership, direct/effective ACL rows, and the grid so its chunk can be claimed again. Player modules on the grid are deleted by the grid cascade. */
5227
5309
  releaseClaimedGrid: ReleaseClaimedGridResult;
5228
5310
  /** 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. */
@@ -5249,6 +5331,8 @@ export type Mutation = {
5249
5331
  resendConfirmationEmail: Scalars['Boolean']['output'];
5250
5332
  /** 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. */
5251
5333
  resetPassword: Scalars['Boolean']['output'];
5334
+ /** OPERATOR ONLY. Retires an organization: sets organizations.status to 'retired', stamps deleted_at, archives its apps, and writes a tombstone to org_retirements. RETIREMENT IS A STATE, NOT A DELETION — no wallet_transactions, org_billing_waivers, app_shared_usage_charges or other ledger row is altered or removed, so an auditor can still reconstruct exactly what this organization spent, with the same joins as before, indefinitely. There is no purge and no retention window, by decision rather than by omission: org ledger rows are retained forever (operator decision, 2026-08-21), so retirement is only ever a state. A retired organization's remaining wallet balance is FROZEN indefinitely by the same decision — held, not refunded and not forfeited — and the amount is recorded on the tombstone. AFTER RETIREMENT the org's API tokens stop authenticating, its members lose every org permission (super admins excepted, so this is reversible), and it is excluded from the caller's organization list — but it is still readable by id and slug, because a retired org that answers like a missing one is worse than one that says what it is. Refuses unless expectedSlug matches the org named by orgId, and refuses an organization holding money unless acknowledgeFrozenBalance is passed. Reverse it with reinstateOrganization. */
5335
+ retireOrganization: OrgRetirementType;
5252
5336
  /** 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. */
5253
5337
  revokeAppAccess: AppUserAccess;
5254
5338
  /** Withdraw consent for an app and immediately invalidate every app-scoped token the authenticated user holds for it, whichever session minted them — the tokens stop authenticating on their next request, not at their next refresh. Atomic: if the tokens cannot be invalidated, consent is left in place and this returns an error, so a successful response is the only state in which access has actually been withdrawn. Does NOT sign the user out: their identity session and their tokens for other apps are untouched. Returns false when there was nothing to revoke (no active grant and no live tokens), which makes a repeat call safe. Requires a SESSION token. */
@@ -5313,7 +5397,7 @@ export type Mutation = {
5313
5397
  setEarlyAccessOverride: User;
5314
5398
  /** Replace the whitelist of permission keys allowed on a grid (writes the `grid_permission_limits` input table), then recompute the grid's materialized effective ACL so any keys no longer on the whitelist are dropped for all users. Pass an empty array to remove all limits. Requires app-admin ('manage_apps'). DESTRUCTIVE: narrowing the whitelist can strip effective permissions from existing users on the grid. */
5315
5399
  setGridPermissionLimits: GridPermissionLimits;
5316
- /** Adds a password to the signed-in account when it does not have one yet — for an account created by magic link or a social provider, which previously had no in-product way to add password sign-in. Requires a valid session token; the session is the proof of account control, so the password is usable immediately and no email confirmation is needed. Throws CONFLICT if a password is already set (use changePassword, which verifies the current one). A security notification is emailed to the account address. Existing sessions are not revoked. */
5400
+ /** Adds a password to the signed-in account when it does not have one yet — for an account created by magic link or a social provider, which previously had no in-product way to add password sign-in. Requires a valid session token; the session is the proof of account control, so the password is usable immediately and no email confirmation is needed. Refuses with extensions.code PASSWORD_ALREADY_SET (409) when a password is already set use changePassword, which verifies the current one, or the reset flow if it is forgotten. (Before v1.60.0 that refusal reached clients as INTERNAL_SERVER_ERROR while this description said CONFLICT, so a client could only recognise it by the message text.) A security notification is emailed to the account address. Existing sessions are not revoked. */
5317
5401
  setInitialPassword: Scalars['Boolean']['output'];
5318
5402
  /** Set (author-only) the acquisition mode and pricing for a code listing. Non-free modes require completed seller onboarding. Curation can reject a listing but never reprice it (07 §1.2). */
5319
5403
  setListingPricing: Scalars['Boolean']['output'];
@@ -5321,7 +5405,7 @@ export type Mutation = {
5321
5405
  setOperator: User;
5322
5406
  /** OPERATOR ONLY. Sets or clears an organization billing exemption. When true, org-wallet debits and money-driven runtime denials are skipped; usage is still metered and every waived amount is written to org_billing_waivers. Does not waive player-wallet charges, failure breakers, or the per-minute compute budget. reason is required when setting true. SIDE EFFECT: re-evaluates the runtime gate for every shared app in the org, so clearing the exemption re-denies immediately instead of waiting for the next hourly tick. */
5323
5407
  setOrgBillingExempt: BillingExemptOrgType;
5324
- /** Super admin only. Used to freeze/unfreeze orgs platform-wide. SIDE EFFECT: sets organizations.status, which gates the org's platform access. */
5408
+ /** Super admin only. Used to freeze/unfreeze orgs platform-wide. SIDE EFFECT: sets organizations.status. What that gates today is narrower than it sounds: a non-'active' status stops the org's API TOKENS from authenticating, but it does not remove its members' permissions, so a frozen org's signed-in members can still act. Refuses 'retired' in either direction — retirement is retireOrganization, which writes a tombstone. */
5325
5409
  setOrgStatus: Organization;
5326
5410
  /** Configure the caller's player-wallet auto-recharge: enable/disable, per-period ceiling, recharge amount, and low-water threshold. Enabling requires a vaulted payment method. */
5327
5411
  setPlayerAutoBilling: PlayerAutoBilling;
@@ -5959,6 +6043,9 @@ export type MutationRefundPlayerCodeAcquisitionArgs = {
5959
6043
  export type MutationRegisterArgs = {
5960
6044
  registerUserInput: RegisterUserInput;
5961
6045
  };
6046
+ export type MutationReinstateOrganizationArgs = {
6047
+ input: ReinstateOrganizationInput;
6048
+ };
5962
6049
  export type MutationReleaseClaimedGridArgs = {
5963
6050
  appId: Scalars['BigInt']['input'];
5964
6051
  gridId: Scalars['BigInt']['input'];
@@ -6003,6 +6090,9 @@ export type MutationResendConfirmationEmailArgs = {
6003
6090
  export type MutationResetPasswordArgs = {
6004
6091
  resetPasswordInput: ResetPasswordInput;
6005
6092
  };
6093
+ export type MutationRetireOrganizationArgs = {
6094
+ input: RetireOrganizationInput;
6095
+ };
6006
6096
  export type MutationRevokeAppAccessArgs = {
6007
6097
  appId: Scalars['BigInt']['input'];
6008
6098
  idempotencyKey?: InputMaybe<Scalars['String']['input']>;
@@ -6400,6 +6490,38 @@ export type OrgPermission = {
6400
6490
  /** Stable permission key used in role grants (e.g. 'manage_members', 'manage_tokens'). */
6401
6491
  permissionKey: Scalars['ID']['output'];
6402
6492
  };
6493
+ /** A record of one organization retirement. Retirement is a STATE, not a deletion: every ledger row the organization ever wrote is still present and still references it, so what the org spent stays reconstructable with the same joins as before. This row says who retired it, why, and what it was holding at the time. */
6494
+ export type OrgRetirementType = {
6495
+ __typename?: 'OrgRetirementType';
6496
+ /** How many of the org apps were archived by the retirement. Apps already archived are not counted and are not touched. */
6497
+ appsArchived: Scalars['Int']['output'];
6498
+ /** Wallet balance in cents at the moment of retirement. This money is FROZEN indefinitely, not refunded and not forfeited — the operator decided that on 2026-08-21. It is recorded here rather than only in the wallet so that every organization holding frozen money is enumerable from one table if the policy is ever revisited. */
6499
+ balanceCentsAtRetirement: Scalars['BigInt']['output'];
6500
+ /** True when the caller had to pass acknowledgeFrozenBalance because the org held money, which is frozen indefinitely rather than refunded or forfeited. */
6501
+ frozenBalanceAcknowledged: Scalars['Boolean']['output'];
6502
+ /** The retired organization (BigInt as a decimal string). */
6503
+ orgId: Scalars['BigInt']['output'];
6504
+ /** The organization name. */
6505
+ orgName: Scalars['String']['output'];
6506
+ /** The organization slug as it stood when it was retired. */
6507
+ orgSlug: Scalars['String']['output'];
6508
+ /** Why the organization was retired. */
6509
+ reason: Scalars['String']['output'];
6510
+ /** When the retirement was reversed, or null while it is in force. */
6511
+ reinstatedAt: Maybe<Scalars['DateTime']['output']>;
6512
+ /** Operator user_id who reinstated the organization. */
6513
+ reinstatedByUserId: Maybe<Scalars['BigInt']['output']>;
6514
+ /** Why the organization was reinstated. */
6515
+ reinstatedReason: Maybe<Scalars['String']['output']>;
6516
+ /** When it was retired. */
6517
+ retiredAt: Scalars['DateTime']['output'];
6518
+ /** Operator user_id who retired it. */
6519
+ retiredByUserId: Scalars['BigInt']['output'];
6520
+ /** Retirement record id (BigInt as a decimal string). */
6521
+ retirementId: Scalars['BigInt']['output'];
6522
+ /** How many org wallet_transactions rows existed at retirement. All of them are still there — this number is the claim that the ledger survived, stated at the moment it would have been easiest to lose. */
6523
+ walletTxnCountAtRetirement: Scalars['BigInt']['output'];
6524
+ };
6403
6525
  export type OrgRole = {
6404
6526
  __typename?: 'OrgRole';
6405
6527
  /** When the role was created. */
@@ -6521,7 +6643,7 @@ export type Organization = {
6521
6643
  ownerUserId: Scalars['BigInt']['output'];
6522
6644
  /** Unique URL-safe slug (lowercase letters, numbers, and dashes). */
6523
6645
  slug: Scalars['String']['output'];
6524
- /** Lifecycle status, e.g. 'active' or 'frozen'. Set platform-wide via setOrgStatus. */
6646
+ /** Lifecycle status: 'active', 'frozen' (setOrgStatus) or 'retired' (retireOrganization). A retired organization still resolves by id and slug — it is a state, not a deletion, and its whole ledger is intact — but it grants its members no permissions, its API tokens no longer authenticate, and it is omitted from myOrganizations. */
6525
6647
  status: Scalars['String']['output'];
6526
6648
  /** When the organization was last updated. */
6527
6649
  updatedAt: Scalars['DateTime']['output'];
@@ -7587,6 +7709,8 @@ export type Query = {
7587
7709
  gameModelFunctionCircuits: GmFunctionBreakerStatus;
7588
7710
  /** List studio-defined functions for an app, optionally filtered to those attached to a container type. Requires app-admin ('manage_apps'). */
7589
7711
  gameModelFunctions: Array<GmFunction>;
7712
+ /** Whether an app's game model hangs together: containers whose type does not exist, functions calling functions that are not defined, timers targeting something that cannot be invoked autonomously, unmatchable automation triggers, and stored definitions that no longer compile. Every check is recomputed on demand — a stored warning goes stale the moment an unrelated object changes, which is exactly how an app can look healthy while being unable to bind anything. ERROR findings are provably broken; WARNING findings are frequently just a mid-edit state. Requires app-admin ('manage_apps'). */
7713
+ gameModelLint: GmLintResult;
7590
7714
  /** Read the app's game-model runtime policy (session creation policy + default participant role). Requires app-admin ('manage_apps'). */
7591
7715
  gameModelPolicy: GmAppPolicy;
7592
7716
  /** List the property definitions for a container type. Requires app-admin ('manage_apps'). */
@@ -7755,6 +7879,8 @@ export type Query = {
7755
7879
  quotasForApp: Array<ServiceQuota>;
7756
7880
  /** Lists the org-scoped quota rules explicitly configured for an organization (excludes app-, tier-, and free-tier-default quotas). Use `effectiveQuota` to resolve the limit actually applied for a given metric. Requires the 'view_usage' org permission. */
7757
7881
  quotasForOrg: Array<ServiceQuota>;
7882
+ /** OPERATOR ONLY. Every organization currently retired, newest first. A retirement nobody can enumerate is indistinguishable from an organization that was quietly lost. */
7883
+ retiredOrganizations: Array<OrgRetirementType>;
7758
7884
  /** Lists all valid runtime permission keys (e.g. "access", "teleport", "update_voxel_data", "use_voice_chat") that may be assigned to an access tier permissionKeys. PUBLIC: no authentication required. Ordered by the permission bit index. */
7759
7885
  runtimePermissions: Array<Scalars['String']['output']>;
7760
7886
  /** Pick a low-load game server for a native (direct-UDP) client to connect to: returns a random server from the least-loaded ~20% (by client count) of ReadyForClients servers to spread load, always CO-LOCATED with the datacenter that holds the data for this app (all rows for one app live in a single datacenter). This REFUSES rather than returning a Buddy elsewhere, because every gameplay write for the session would otherwise cross datacenters — invisible, because each write still succeeds — and the refusal tells you which of three situations you are in. If you reached the wrong datacenter (the shared entry name resolves to all of them, so this is the common case for a client that has not re-discovered) it is WRONG_DATACENTER, carrying gameApiUrl and gameApiWsUrl in extensions: reconnect there and retry, which the CrowdyJS and CrowdyCPP clients do for you. If the app’s own datacenter is not serving at all it is APP_UNAVAILABLE, deliberately with no endpoint. Only when this IS the app’s datacenter and it has no healthy co-located Buddy is it NO_LOCAL_BUDDY — also with no endpoint, because there is nowhere else to go; that one needs an operator. Requires a bearer game token; as a side effect it authorizes that token’s P2P session with the chosen Buddy so the native client’s spatial datagrams are accepted. Connect the native client to the returned ip4 and clientPort. Browser clients should instead use the UDP proxy (connectUdpProxy / udpNotifications) and do not need this. */
@@ -8171,6 +8297,9 @@ export type QueryGameModelFunctionsArgs = {
8171
8297
  appId: Scalars['BigInt']['input'];
8172
8298
  containerTypeName?: InputMaybe<Scalars['String']['input']>;
8173
8299
  };
8300
+ export type QueryGameModelLintArgs = {
8301
+ appId: Scalars['BigInt']['input'];
8302
+ };
8174
8303
  export type QueryGameModelPolicyArgs = {
8175
8304
  appId: Scalars['BigInt']['input'];
8176
8305
  };
@@ -8544,6 +8673,13 @@ export type RegisterUserInput = {
8544
8673
  /** Password for the new account (min 8 characters). */
8545
8674
  password: Scalars['String']['input'];
8546
8675
  };
8676
+ /** Which retired organization to put back, and why. */
8677
+ export type ReinstateOrganizationInput = {
8678
+ /** Organization to reinstate (BigInt as a decimal string). */
8679
+ orgId: Scalars['BigInt']['input'];
8680
+ /** Why the retirement is being reversed. Required and stored. */
8681
+ reason: Scalars['String']['input'];
8682
+ };
8547
8683
  /** Result of releasing a grid created by the caller through claimGridChunk. The ownership, direct/effective ACL, and grid have been removed atomically, making its chunk claimable again. */
8548
8684
  export type ReleaseClaimedGridResult = {
8549
8685
  __typename?: 'ReleaseClaimedGridResult';
@@ -8577,6 +8713,19 @@ export type ResetPasswordInput = {
8577
8713
  /** Password-reset token from the emailed reset link. */
8578
8714
  token: Scalars['String']['input'];
8579
8715
  };
8716
+ /** Which organization to retire, proof that you mean that one, and why. */
8717
+ export type RetireOrganizationInput = {
8718
+ /** Required when the organization holds a non-zero wallet balance. Retirement FREEZES that balance indefinitely: the money is held, deliberately, and is neither refunded nor forfeited. That is settled policy (operator decision, 2026-08-21), not a placeholder for one. The amount is recorded on the tombstone so every organization it applies to stays enumerable if the policy is ever revisited. Refusing by default rather than omitting the case is deliberate — an unreachable dangerous path guarantees the danger and removes the fix. */
8719
+ acknowledgeFrozenBalance?: InputMaybe<Scalars['Boolean']['input']>;
8720
+ /** Required when the organization is a tier's DURABLE PROBE ORGANIZATION — the `<family>-<tier>` org scripts/probe-org.sh reuses on every run. Retiring one frees nothing: the slug stays taken, organizationBySlug keeps returning it, and the next probe run fails on a bare permission denial days later, so the cost lands on somebody else. The refusal names the family and tells you that reinstateOrganization is the way back. */
8721
+ acknowledgeProbeInfrastructure?: InputMaybe<Scalars['Boolean']['input']>;
8722
+ /** The slug the organization must currently have. Refused if it does not match, which is what stops a mistyped or copy-pasted id from retiring a paying customer. There is no bulk form of this mutation for the same reason. */
8723
+ expectedSlug: Scalars['String']['input'];
8724
+ /** Organization to retire (BigInt as a decimal string). */
8725
+ orgId: Scalars['BigInt']['input'];
8726
+ /** Why this organization is being retired. Required and stored on the tombstone. */
8727
+ reason: Scalars['String']['input'];
8728
+ };
8580
8729
  /** Immediately revoke one visible lease. */
8581
8730
  export type RevokeAgentLeaseInput = {
8582
8731
  /** Current attached client epoch. */
@@ -8699,7 +8848,7 @@ export type SaveCrowdyStudioProjectInput = {
8699
8848
  deletes?: InputMaybe<Array<CrowdyStudioProjectFileDeleteInput>>;
8700
8849
  /** New private description, explicit null to clear, or omit to preserve. */
8701
8850
  description?: InputMaybe<Scalars['String']['input']>;
8702
- /** Current project revision. A stale value returns CONFLICT with CROWDY_STUDIO_REVISION_CONFLICT and applies no metadata or file writes. */
8851
+ /** Current project revision. A stale value is refused with extensions.code CROWDY_STUDIO_REVISION_CONFLICT (HTTP 409) — that exact code, not CONFLICT — and applies no metadata or file writes. */
8703
8852
  expectedRevision: Scalars['BigInt']['input'];
8704
8853
  /** New optional grid affinity, explicit null to clear, or omit to preserve. Affinity never grants deploy authority. */
8705
8854
  gridId?: InputMaybe<Scalars['BigInt']['input']>;
@@ -8728,7 +8877,7 @@ export type SaveCrowdyStudioProjectMetadataInput = {
8728
8877
  clientModuleName?: InputMaybe<Scalars['String']['input']>;
8729
8878
  /** New private description, explicit null to clear, or omit to preserve. */
8730
8879
  description?: InputMaybe<Scalars['String']['input']>;
8731
- /** Current project revision. A stale value returns CONFLICT with CROWDY_STUDIO_REVISION_CONFLICT. */
8880
+ /** Current project revision. A stale value is refused with extensions.code CROWDY_STUDIO_REVISION_CONFLICT (HTTP 409); branch on that exact code, not on CONFLICT. */
8732
8881
  expectedRevision: Scalars['BigInt']['input'];
8733
8882
  /** New optional grid affinity, explicit null to clear, or omit to preserve. Affinity never grants deploy authority. */
8734
8883
  gridId?: InputMaybe<Scalars['BigInt']['input']>;
@@ -10164,6 +10313,7 @@ export declare enum UserCodeFaultKind {
10164
10313
  InternalError = "INTERNAL_ERROR",
10165
10314
  MemoryExceeded = "MEMORY_EXCEEDED",
10166
10315
  ModuleLoadFailed = "MODULE_LOAD_FAILED",
10316
+ NotificationUndeliverable = "NOTIFICATION_UNDELIVERABLE",
10167
10317
  PlatformBusy = "PLATFORM_BUSY",
10168
10318
  QuotaExhausted = "QUOTA_EXHAUSTED",
10169
10319
  RateLimitExceeded = "RATE_LIMIT_EXCEEDED",
@@ -15976,6 +16126,8 @@ export type GameModelAppDiagnosticsQuery = {
15976
16126
  events24h: number;
15977
16127
  failedEvents24h: number;
15978
16128
  automationEvents24h: number;
16129
+ notificationsEmitted24h: number;
16130
+ notificationsUndeliverable24h: number;
15979
16131
  topFunctions: Array<{
15980
16132
  __typename?: 'GmTopFunction';
15981
16133
  functionName: string;
@@ -16052,6 +16204,29 @@ export type GameModelTimersQuery = {
16052
16204
  createdAt: string;
16053
16205
  }>;
16054
16206
  };
16207
+ export type CrowdyModelLintQueryVariables = Exact<{
16208
+ appId: Scalars['BigInt']['input'];
16209
+ }>;
16210
+ export type CrowdyModelLintQuery = {
16211
+ __typename?: 'Query';
16212
+ gameModelLint: {
16213
+ __typename?: 'GmLintResult';
16214
+ appId: string;
16215
+ errorCount: number;
16216
+ warningCount: number;
16217
+ clean: boolean;
16218
+ findings: Array<{
16219
+ __typename?: 'GmLintFindingType';
16220
+ code: GmLintCode;
16221
+ severity: GmLintSeverity;
16222
+ subjectKind: GmLintSubjectKind;
16223
+ subject: string;
16224
+ message: string;
16225
+ remedy: string | null;
16226
+ count: number | null;
16227
+ }>;
16228
+ };
16229
+ };
16055
16230
  export type GameModelActivePlayerCountQueryVariables = Exact<{
16056
16231
  appId: Scalars['BigInt']['input'];
16057
16232
  }>;
@@ -20978,6 +21153,7 @@ export declare const GameModelAppDiagnosticsDocument: DocumentNode<GameModelAppD
20978
21153
  export declare const GameModelScheduleInvokeDocument: DocumentNode<GameModelScheduleInvokeMutation, GameModelScheduleInvokeMutationVariables>;
20979
21154
  export declare const GameModelCancelTimerDocument: DocumentNode<GameModelCancelTimerMutation, GameModelCancelTimerMutationVariables>;
20980
21155
  export declare const GameModelTimersDocument: DocumentNode<GameModelTimersQuery, GameModelTimersQueryVariables>;
21156
+ export declare const CrowdyModelLintDocument: DocumentNode<CrowdyModelLintQuery, CrowdyModelLintQueryVariables>;
20981
21157
  export declare const GameModelActivePlayerCountDocument: DocumentNode<GameModelActivePlayerCountQuery, GameModelActivePlayerCountQueryVariables>;
20982
21158
  export declare const GameModelActivePlayerCountChangedDocument: DocumentNode<GameModelActivePlayerCountChangedSubscription, GameModelActivePlayerCountChangedSubscriptionVariables>;
20983
21159
  export declare const GameModelCreateSessionDocument: DocumentNode<GameModelCreateSessionMutation, GameModelCreateSessionMutationVariables>;