import type { GraphQLClient } from '../client.js'; /** * Public platform discovery returned by {@link PlatformAPI.config}: how SDKs * find the shared game-api so they can route apps deployed to the shared * environment. All fields are public (no auth required to read them). */ export interface PlatformConfig { /** Shared game-api HTTP/GraphQL root for shared-environment apps; `null` if unset. */ sharedGameApiUrl: string | null; /** Shared game-api WebSocket root (subscriptions / UDP proxy); `null` if unset. */ sharedGameApiWsUrl: string | null; /** Free shared app slots an org gets before a paid subscription is required. */ freeAppsPerOrg: number; } /** * Public platform discovery — exposed as `client.platform`. * * Part of the management surface. * **Public**: no authentication required. Lets a client discover the shared * game-api URL (for apps published to the shared environment) *before* it has a * per-app endpoint, then build a per-app `CrowdyClient` against it. * * @example * ```ts * const base = createCrowdyClient({ httpUrl: 'https://api.example.com/graphql' }); * const cfg = await base.platform.config(); * const gameClient = createCrowdyClient({ * httpUrl: cfg.sharedGameApiUrl ?? undefined, * wsUrl: cfg.sharedGameApiWsUrl ?? undefined, * tokenStore: base.session.tokenStore, * }); * ``` */ export declare class PlatformAPI { private readonly api; constructor(api: GraphQLClient); /** * Fetch public platform discovery: the shared game-api URL clients use for * shared-environment apps, plus the free shared-app quota. **Public** — no * authentication required. * * @returns A {@link PlatformConfig} (`sharedGameApiUrl`, `sharedGameApiWsUrl`, * and `freeAppsPerOrg`). * @throws {CrowdyGraphQLError} on transport/validation failures. */ config(): Promise; } //# sourceMappingURL=platform.d.ts.map