import type { CoWebsite } from "./front/Api/Iframe/nav"; import type { ButtonDescriptor } from "./front/Api/Iframe/Ui/ButtonDescriptor"; import type { Popup } from "./front/Api/Iframe/Ui/Popup"; import type { Sound } from "./front/Api/Iframe/Sound/Sound"; export type { CreateUIWebsiteEvent, ModifyUIWebsiteEvent, UIWebsiteEvent, UIWebsiteCSSValue, UIWebsiteMargin, UIWebsitePosition, UIWebsiteSize, ViewportPositionHorizontal, ViewportPositionVertical, } from "./front/Api/Events/Ui/UIWebsiteEvent"; export type { CreateEmbeddedWebsiteEvent, ModifyEmbeddedWebsiteEvent, Rectangle, } from "./front/Api/Events/EmbeddedWebsiteEvent"; export type { HasPlayerMovedEvent } from "./front/Api/Events/HasPlayerMovedEvent"; export type { UIWebsite } from "./front/Api/Iframe/Ui/UIWebsite"; export type { Menu } from "./front/Api/Iframe/Ui/Menu"; export type { ActionMessage } from "./front/Api/Iframe/Ui/ActionMessage"; export type { Position } from "./front/Api/Iframe/player"; export type { EmbeddedWebsite } from "./front/Api/Iframe/Room/EmbeddedWebsite"; export type { Area } from "./front/Api/Iframe/Area/Area"; export type { ActionsMenuAction } from "./front/Api/Iframe/ui"; export type { TileDescriptor } from "./front/Api/Iframe/room"; export type { ScriptingEvent } from "./front/Api/Iframe/AbstractEvent"; export type { RemotePlayerInterface } from "./front/Api/Iframe/Players/RemotePlayer"; export type { SendChatMessageOptions, SendLocalChatMessageOptions, SendBubbleChatMessageOptions, } from "../../libs/shared-utils/src/Events/ChatEvent"; export type { RoomState } from "./front/Api/Iframe/RoomState"; export type { PrivatePlayerState } from "./front/Api/Iframe/PrivatePlayerState"; export type { PublicPlayerState } from "./front/Api/Iframe/PublicPlayerState"; declare const wa: { ui: import("./front/Api/Iframe/ui").WorkAdventureUiCommands; nav: import("./front/Api/Iframe/nav").WorkadventureNavigationCommands; controls: import("./front/Api/Iframe/controls").WorkadventureControlsCommands; chat: import("./front/Api/Iframe/chat").WorkadventureChatCommands; sound: import("./front/Api/Iframe/sound").WorkadventureSoundCommands; room: import("./front/Api/Iframe/room").WorkadventureRoomCommands; player: import("./front/Api/Iframe/player").WorkadventurePlayerCommands; players: import("./front/Api/Iframe/players").WorkadventurePlayersCommands; camera: import("./front/Api/Iframe/camera").WorkAdventureCameraCommands; spaces: import("./front/Api/Iframe/spaces").WorkAdventureSpacesCommands; state: import("./front/Api/Iframe/state").WorkadventureStateCommands & import("./iframe_api").RoomState; event: import("./front/Api/Iframe/event").WorkadventureEventCommands; mapEditor: import("./front/Api/Iframe/mapEditor").WorkadventureMapEditorCommands; /** * When your script / iFrame loads WorkAdventure, it takes a few milliseconds for your * script / iFrame to exchange data with WorkAdventure. You should wait for the WorkAdventure * API to be fully ready using the WA.onInit() method. * {@link https://docs.workadventu.re/map-building/api-start.md#waiting-for-workadventure-api-to-be-available | Website documentation} * * Some properties (like the current username, or the room ID) are not available until WA.onInit has completed. * * @returns {void} */ onInit(): Promise; /** * The metadata sent by the administration website. * Important: You need to wait for the end of the initialization before accessing. * {@link https://docs.workadventu.re/map-building/api-metadata.md | Website documentation} * * @returns {unknown} Metadata */ readonly metadata: unknown; /** * The iframeId (only set if the code is executed from a UIWebsite iframe) * Important: You need to wait for the end of the initialization before accessing. * {@link https://docs.workadventu.re/map-building/api-ui.md#get-ui-website-by-id | Website documentation} * * @returns {string|undefined} IframeId */ readonly iframeId: string | undefined; /** * @deprecated Use WA.chat.sendChatMessage instead */ sendChatMessage(message: string, author: string): void; /** * @deprecated Use WA.chat.disablePlayerControls instead */ disablePlayerControls(): void; /** * @deprecated Use WA.controls.restorePlayerControls instead */ restorePlayerControls(): void; /** * @deprecated Use WA.ui.displayBubble instead */ displayBubble(): void; /** * @deprecated Use WA.ui.removeBubble instead */ removeBubble(): void; /** * @deprecated Use WA.nav.openTab instead */ openTab(url: string): void; /** * @deprecated Use WA.sound.loadSound instead */ loadSound(url: string): Sound; /** * @deprecated Use WA.nav.goToPage instead */ goToPage(url: string): void; /** * @deprecated Use WA.nav.goToRoom instead */ goToRoom(url: string): void; /** * @deprecated Use WA.nav.openCoWebSite instead */ openCoWebSite(url: string, allowApi?: boolean, allowPolicy?: string): Promise; /** * @deprecated Use WA.nav.closeCoWebSite instead */ closeCoWebSite(): Promise; /** * @deprecated Use WA.ui.openPopup instead */ openPopup(targetObject: string, message: string, buttons: ButtonDescriptor[]): Popup; /** * @deprecated Use WA.chat.onChatMessage instead */ onChatMessage(callback: (message: string) => void): void; /** * @deprecated Use WA.room.onEnterZone instead */ onEnterZone(name: string, callback: () => void): void; /** * @deprecated Use WA.room.onLeaveZone instead */ onLeaveZone(name: string, callback: () => void): void; }; export type WorkAdventureApi = typeof wa; export type { Sound, Popup, ButtonDescriptor, CoWebsite }; declare global { interface Window { WA: WorkAdventureApi; } let WA: WorkAdventureApi; }