UNPKG

@casual-simulation/aux-common

Version:
211 lines 9.66 kB
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. * - "static inst", "local inst", and "local" indicates that the instance should be loaded statically. * - "public inst", "free inst", and "free" indicates that the instance should be loaded from the public partition. * - "private inst", "studio inst", and "studio" 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' | 'static inst' | 'local inst' | 'local' | 'public inst' | 'private inst' | 'free inst' | 'free' | 'studio inst' | 'studio' | 'sign in' | 'sign up' | 'sign out' | 'delete inst'; export declare const BIOS_OPTION_SCHEMA: z.ZodEnum<["enter join code", "join inst", "static inst", "local inst", "local", "public inst", "private inst", "free inst", "free", "studio inst", "studio", "sign in", "sign up", "sign out", "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; /** * 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; /** * 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" * - "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; /** * 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 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; } export declare const WEB_CONFIG_SCHEMA: z.ZodObject<{ version: any; causalRepoConnectionProtocol: z.ZodEnum<["websocket", "apiary-aws"]>; causalRepoConnectionUrl: z.ZodString; collaborativeRepoLocalPersistence: z.ZodBoolean; staticRepoLocalPersistence: z.ZodBoolean; sharedPartitionsVersion: z.ZodEnum<["v2"]>; vmOrigin: z.ZodNullable<z.ZodString>; authOrigin: z.ZodNullable<z.ZodString>; recordsOrigin: z.ZodNullable<z.ZodString>; disableCollaboration: z.ZodNullable<z.ZodBoolean>; ab1BootstrapURL: z.ZodNullable<z.ZodString>; arcGisApiKey: z.ZodNullable<z.ZodString>; jitsiAppName: z.ZodNullable<z.ZodString>; what3WordsApiKey: z.ZodNullable<z.ZodString>; playerMode: z.ZodNullable<z.ZodEnum<["player", "builder"]>>; requirePrivoLogin: z.ZodBoolean; allowedBiosOptions: z.ZodNullable<z.ZodArray<z.ZodEnum<["enter join code", "join inst", "static inst", "local inst", "local", "public inst", "private inst", "free inst", "free", "studio inst", "studio", "sign in", "sign up", "sign out", "delete inst"]>, "many">>; defaultBiosOption: z.ZodNullable<z.ZodEnum<["enter join code", "join inst", "static inst", "local inst", "local", "public inst", "private inst", "free inst", "free", "studio inst", "studio", "sign in", "sign up", "sign out", "delete inst"]>>; automaticBiosOption: z.ZodNullable<z.ZodEnum<["enter join code", "join inst", "static inst", "local inst", "local", "public inst", "private inst", "free inst", "free", "studio inst", "studio", "sign in", "sign up", "sign out", "delete inst"]>>; logoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>; logoBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>; logoTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strip", z.ZodTypeAny, { version?: any; causalRepoConnectionProtocol?: "apiary-aws" | "websocket"; causalRepoConnectionUrl?: string; collaborativeRepoLocalPersistence?: boolean; staticRepoLocalPersistence?: boolean; sharedPartitionsVersion?: "v2"; vmOrigin?: string; authOrigin?: string; recordsOrigin?: string; disableCollaboration?: boolean; ab1BootstrapURL?: string; arcGisApiKey?: string; jitsiAppName?: string; what3WordsApiKey?: string; playerMode?: "builder" | "player"; requirePrivoLogin?: boolean; allowedBiosOptions?: ("local" | "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst")[]; defaultBiosOption?: "local" | "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst"; automaticBiosOption?: "local" | "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst"; logoUrl?: string; logoBackgroundColor?: string; logoTitle?: string; }, { version?: any; causalRepoConnectionProtocol?: "apiary-aws" | "websocket"; causalRepoConnectionUrl?: string; collaborativeRepoLocalPersistence?: boolean; staticRepoLocalPersistence?: boolean; sharedPartitionsVersion?: "v2"; vmOrigin?: string; authOrigin?: string; recordsOrigin?: string; disableCollaboration?: boolean; ab1BootstrapURL?: string; arcGisApiKey?: string; jitsiAppName?: string; what3WordsApiKey?: string; playerMode?: "builder" | "player"; requirePrivoLogin?: boolean; allowedBiosOptions?: ("local" | "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst")[]; defaultBiosOption?: "local" | "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst"; automaticBiosOption?: "local" | "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst"; logoUrl?: string; logoBackgroundColor?: string; logoTitle?: string; }>; //# sourceMappingURL=WebConfig.d.ts.map