New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@workadventure/iframe-api-typings

Package Overview
Dependencies
Maintainers
1
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@workadventure/iframe-api-typings - npm Package Compare versions

Comparing version

to
1.4.7

Api/Events/ButtonClickedEvent.d.ts

98

iframe_api.d.ts

@@ -1,50 +0,80 @@

import SoundConfig = Phaser.Types.Sound.SoundConfig;
interface WorkAdventureApi {
import type { ButtonDescriptor } from "./Api/iframe/Ui/ButtonDescriptor";
import type { Popup } from "./Api/iframe/Ui/Popup";
import type { Sound } from "./Api/iframe/Sound/Sound";
declare const wa: {
ui: import("./Api/iframe/ui").WorkAdventureUiCommands;
nav: import("./Api/iframe/nav").WorkadventureNavigationCommands;
controls: import("./Api/iframe/controls").WorkadventureControlsCommands;
chat: import("./Api/iframe/chat").WorkadventureChatCommands;
sound: import("./Api/iframe/sound").WorkadventureSoundCommands;
room: import("./Api/iframe/room").WorkadventureRoomCommands;
player: import("./Api/iframe/player").WorkadventurePlayerCommands;
/**
* @deprecated Use WA.chat.sendChatMessage instead
*/
sendChatMessage(message: string, author: string): void;
onChatMessage(callback: (message: string) => void): void;
onEnterZone(name: string, callback: () => void): void;
onLeaveZone(name: string, callback: () => void): void;
openPopup(targetObject: string, message: string, buttons: ButtonDescriptor[]): Popup;
openTab(url: string): void;
goToPage(url: string): void;
openCoWebSite(url: string, allowApi?: boolean, allowPolicy?: string): void;
closeCoWebSite(): 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;
}
declare global {
var WA: WorkAdventureApi;
}
declare type ButtonClickedCallback = (popup: Popup) => void;
interface ButtonDescriptor {
/**
* The label of the button
* @deprecated Use WA.nav.goToPage instead
*/
label: string;
goToPage(url: string): void;
/**
* The type of the button. Can be one of "normal", "primary", "success", "warning", "error", "disabled"
* @deprecated Use WA.nav.goToRoom instead
*/
className?: "normal" | "primary" | "success" | "warning" | "error" | "disabled";
goToRoom(url: string): void;
/**
* Callback called if the button is pressed
* @deprecated Use WA.nav.openCoWebSite instead
*/
callback: ButtonClickedCallback;
}
export declare class Popup {
private id;
constructor(id: number);
openCoWebSite(url: string, allowApi?: boolean, allowPolicy?: string): void;
/**
* Closes the popup
* @deprecated Use WA.nav.closeCoWebSite instead
*/
close(): void;
closeCoWebSite(): void;
/**
* @deprecated Use WA.controls.restorePlayerControls 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 declare type WorkAdventureApi = typeof wa;
declare global {
interface Window {
WA: WorkAdventureApi;
}
let WA: WorkAdventureApi;
}
export declare class Sound {
private url;
constructor(url: string);
play(config: SoundConfig): string;
stop(): string;
}
export {};
{
"name": "@workadventure/iframe-api-typings",
"version": "v1.4.6",
"version": "v1.4.7",
"description": "Typescript typings for WorkAdventure iFrame API",

@@ -5,0 +5,0 @@ "main": "iframe_api.js",