import type { RemoteCausalRepoProtocol, SharedPartitionsVersion } from '../partitions'; import { z } from 'zod'; /** * The possible BIOS options. * * - "enter join code" indicates that the user should be prompted to enter a join code. * - "temp" indicates that a temporary instance should be created (no persistence). * - "static inst", "local inst", and "local" indicates that the instance should be loaded statically. * - "public inst", "free inst", "public", and "free" indicates that the instance should be loaded from the public partition. * - "private inst", "studio inst", "studio", and "locked" indicates that the instance should be loaded from the private partition. * - "sign in" indicates that the user should be prompted to sign in. * - "sign up" indicates that the user should be prompted to sign up. * - "sign out" indicates that the user should be logged out. */ export type BiosOption = 'enter join code' | 'join inst' | 'temp' | 'temp local' | 'static inst' | 'local inst' | 'local' | 'public inst' | 'public' | 'free inst' | 'free' | 'private inst' | 'studio inst' | 'studio' | 'locked' | 'sign in' | 'sign up' | 'sign out' | 'delete inst'; export declare const BIOS_OPTION_SCHEMA: z.ZodEnum<{ local: "local"; studio: "studio"; locked: "locked"; "enter join code": "enter join code"; "join inst": "join inst"; temp: "temp"; "temp local": "temp local"; "static inst": "static inst"; "local inst": "local inst"; "public inst": "public inst"; public: "public"; "free inst": "free inst"; free: "free"; "private inst": "private inst"; "studio inst": "studio inst"; "sign in": "sign in"; "sign up": "sign up"; "sign out": "sign out"; "delete inst": "delete inst"; }>; /** * Defines an interface for the configuration that the web client should try to pull from the server. */ export interface WebConfig { /** * The protocol version. */ version: 1 | 2 | null; /** * The protocol that should be used for realtime connections. */ causalRepoConnectionProtocol: RemoteCausalRepoProtocol; /** * The URL that should be used for realtime connections. */ causalRepoConnectionUrl?: string | null; /** * Whether collaborative repositories should be persisted locally. * Defaults to false. */ collaborativeRepoLocalPersistence?: boolean; /** * Whether static repositories should be persisted locally. * Defaults to true. */ staticRepoLocalPersistence?: boolean; /** * The version of the shared partitions that should be used. */ sharedPartitionsVersion?: SharedPartitionsVersion | null; /** * The HTTP Origin that should be used for VM Iframes. */ vmOrigin?: string | null; /** * Whether to disable the VM entirely. * * This is primarily for custom domains and enabling full PWA support. * * Defaults to false. */ disableVm?: boolean; /** * The HTTP origin that should be used for auth iframes. */ authOrigin?: string | null; /** * The HTTP origin that should be used for records. */ recordsOrigin?: string | null; /** * Whether collaboration should be disabled. * Setting this to true will replace the shared partition of simulations * with tempLocal partitions. */ disableCollaboration?: boolean | null; /** * The URL that should be used to bootstrap AB1. */ ab1BootstrapURL?: string | null; /** * Whether the server should inject the AB1 Bootstrap script via a script tag. */ serverInjectBootstrapper?: boolean; /** * The API key that should be used for the ArcGIS mapping API. */ arcGisApiKey?: string | null; /** * The app name that should be used for the Jitsi meet portal. */ jitsiAppName?: string | null; /** * The API Key that should be used for what3words integration. */ what3WordsApiKey?: string | null; /** * Gets the player mode of this CasualOS version. * * - "player" indicates that the instance has been configured for experiencing AUXes. * - "builder" indicates that the instance has been configured for building AUXes. */ playerMode?: 'player' | 'builder' | null; /** * Whether to require that users login with Privo before they can access collaboration features. */ requirePrivoLogin?: boolean; /** * The allowed BIOS options. * If omitted, then all options are allowed. * * Possible options are: * - "enter join code" * - "temp" * - "static inst" * - "public inst" * - "private inst" * - "sign in" * - "sign up" * - "sign out" */ allowedBiosOptions?: BiosOption[]; /** * The default BIOS option. * If specified, then the BIOS will automatically select this option when shown. */ defaultBiosOption?: BiosOption; /** * The automatic BIOS option. * If specified, then the BIOS will automatically execute this option. */ automaticBiosOption?: BiosOption; /** * The instance ID to use when executing the automatic BIOS option. * * Should be formatted as `{recordName/{instName}`. For local/public insts, recordName can be omitted (e.g. `/{instName}`). */ automaticBiosOptionInst?: string | null; /** * Whether full support for the DOM should be enabled. * This will run the VM without the web worker so that scripts have direct access to the iframe. * May not be supported in all environments. * Requires a separate VM origin for security purposes. * Defaults to false. */ enableDom?: boolean; /** * Whether to enable debug mode for the VM. */ debug?: boolean; /** * The URL of the logo to display in the loading screen. */ logoUrl?: string | null; /** * The title that should be used for the player page. */ pageTitle?: string | null; /** * The description that should be used for the player page. */ pageDescription?: string | null; /** * The title of the logo to display in the loading screen. */ logoTitle?: string | null; /** * The background color of the logo to display in the loading screen. * This is used to set the background color of the splash screen. */ logoBackgroundColor?: string | null; /** * The URL that users can visit for support. */ supportUrl?: string | null; /** * Whether to enable SMS authentication. * Defaults to false. */ enableSmsAuthentication?: boolean; icons?: { favicon?: string | null; appleTouchIcon?: string | null; }; /** * The API key that should be used for PostHog analytics. If not specified, then PostHog will not be initialized. */ postHogApiKey?: string | null; /** * The HTTP host that should be used for PostHog analytics. If not specified, then the default PostHog cloud host will be used. */ postHogApiHost?: string | null; /** * Whether to enable simple analytics. Defaults to false. */ enableSimpleAnalytics?: boolean | null; /** * Whether to disable loading the grid portal by default. */ noAutomaticGridPortal?: boolean | null; } /** * The configuration interface that extends the web config with computed options. */ export interface CasualOSConfig extends WebConfig { /** * Whether subscriptions are supported in this configuration. */ subscriptionsSupported: boolean; /** * Whether studios are supported in this configuration. */ studiosSupported: boolean; /** * The comID that was used to load this configuration. */ comId?: string | null; } export declare const WEB_CONFIG_SCHEMA: z.ZodObject<{ causalRepoConnectionProtocol: z.ZodPrefault>; causalRepoConnectionUrl: z.ZodOptional; collaborativeRepoLocalPersistence: z.ZodPrefault; staticRepoLocalPersistence: z.ZodPrefault; sharedPartitionsVersion: z.ZodPrefault>; vmOrigin: z.ZodOptional>; disableVM: z.ZodOptional>; authOrigin: z.ZodOptional>; recordsOrigin: z.ZodOptional>; disableCollaboration: z.ZodOptional>; ab1BootstrapURL: z.ZodOptional>; serverInjectBootstrapper: z.ZodOptional>; arcGisApiKey: z.ZodOptional>; jitsiAppName: z.ZodOptional>; what3WordsApiKey: z.ZodOptional>; playerMode: z.ZodOptional>>; requirePrivoLogin: z.ZodPrefault; allowedBiosOptions: z.ZodOptional>>>; defaultBiosOption: z.ZodOptional>>; automaticBiosOption: z.ZodOptional>>; automaticBiosOptionInst: z.ZodOptional>; enableDom: z.ZodPrefault; debug: z.ZodPrefault; enableSmsAuthentication: z.ZodOptional>; logoUrl: z.ZodOptional>; logoBackgroundColor: z.ZodOptional>; logoTitle: z.ZodOptional>; pageTitle: z.ZodOptional>; pageDescription: z.ZodOptional>; icons: z.ZodOptional>; appleTouchIcon: z.ZodOptional>; }, z.core.$strip>>>; supportUrl: z.ZodOptional>; postHogApiKey: z.ZodOptional>; postHogApiHost: z.ZodOptional>; enableSimpleAnalytics: z.ZodOptional>; noAutomaticGridPortal: z.ZodOptional>; }, z.core.$strip>; export declare function parseWebConfig(config: any, defaultConfig: WebConfig): WebConfig; //# sourceMappingURL=WebConfig.d.ts.map