@workadventure/iframe-api-typings
Advanced tools
Comparing version
@@ -6,7 +6,7 @@ import { z } from "zod"; | ||
export declare const isUnregisterMenuEvent: z.ZodObject<{ | ||
name: z.ZodString; | ||
key: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
name: string; | ||
key: string; | ||
}, { | ||
name: string; | ||
key: string; | ||
}>; | ||
@@ -27,2 +27,3 @@ export type UnregisterMenuEvent = z.infer<typeof isUnregisterMenuEvent>; | ||
iframe: z.ZodOptional<z.ZodString>; | ||
key: z.ZodString; | ||
options: z.ZodObject<{ | ||
@@ -41,2 +42,3 @@ allowApi: z.ZodBoolean; | ||
name: string; | ||
key: string; | ||
}, { | ||
@@ -48,2 +50,3 @@ iframe?: string | undefined; | ||
name: string; | ||
key: string; | ||
}>; | ||
@@ -55,8 +58,8 @@ export type MenuRegisterEvent = z.infer<typeof isMenuRegisterEvent>; | ||
export declare const isOpenMenuEvent: z.ZodObject<{ | ||
name: z.ZodString; | ||
key: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
name: string; | ||
key: string; | ||
}, { | ||
name: string; | ||
key: string; | ||
}>; | ||
export type OpenMenuEvent = z.infer<typeof isOpenMenuEvent>; |
@@ -56,4 +56,8 @@ import { IframeApiContribution } from "./IframeApiContribution"; | ||
closeCoWebSite(): Promise<void>; | ||
/** | ||
* Redirect the user to the OIDC login page | ||
*/ | ||
goToLogin(): Promise<void>; | ||
} | ||
declare const _default: WorkadventureNavigationCommands; | ||
export default _default; |
@@ -18,2 +18,6 @@ import type { Observable } from "rxjs"; | ||
allowApi?: boolean; | ||
/** | ||
* A unique technical key identifying this menu | ||
*/ | ||
key?: string; | ||
} | ||
@@ -95,2 +99,8 @@ export type MenuOptions = RequireOnlyOne<MenuDescriptor, "callback" | "iframe">; | ||
registerMenuCommand(commandDescriptor: string, options: MenuOptions | ((commandDescriptor: string) => void)): Menu; | ||
/** | ||
* Retrieves a menu from its key. | ||
* Keys are set when the menu is created with `registerMenuCommand` | ||
* In addition, the standard menus have the following keys: "settings", "profile", "invite", "credit", "globalMessages", "contact", "report" | ||
*/ | ||
getMenuCommand(key: string): Promise<Menu>; | ||
addActionsMenuKeyToRemotePlayer(id: number, actionKey: string): void; | ||
@@ -97,0 +107,0 @@ removeActionsMenuKeyFromRemotePlayer(id: number, actionKey: string): void; |
@@ -1,6 +0,4 @@ | ||
import { MenuOptions } from "../ui"; | ||
export declare class Menu { | ||
private menuName; | ||
private options; | ||
constructor(menuName: string, options: MenuOptions); | ||
private key; | ||
constructor(key: string); | ||
/** | ||
@@ -11,5 +9,5 @@ * remove the menu | ||
/** | ||
* Programmatically open the menu | ||
* Programmatically open the menu (only works if the menu has been defined with the "iframe" property) | ||
*/ | ||
open(): void; | ||
} |
{ | ||
"name": "@workadventure/iframe-api-typings", | ||
"version": "v1.16.8", | ||
"version": "v1.16.10", | ||
"description": "Typescript typings for WorkAdventure iFrame API", | ||
@@ -5,0 +5,0 @@ "main": "iframe_api.js", |
Sorry, the diff of this file is too big to display
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
218272
0.36%6900
0.35%