@workadventure/iframe-api-typings 1.25.6 → 1.25.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/iframe_api.d.ts +1 -111
- package/libs/shared-utils/src/Events/ChatEvent.d.ts +168 -0
- package/package.json +2 -2
- package/{Api → play/src/front/Api}/Events/ActionsMenuActionClickedEvent.d.ts +2 -2
- package/{Api → play/src/front/Api}/Events/AddActionsMenuKeyToRemotePlayerEvent.d.ts +2 -2
- package/{Api → play/src/front/Api}/Events/AddPlayerEvent.d.ts +17 -11
- package/{Api → play/src/front/Api}/Events/AskPositionEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/ButtonClickedEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/CameraFollowPlayerEvent.d.ts +4 -1
- package/{Api → play/src/front/Api}/Events/CameraSetEvent.d.ts +8 -5
- package/{Api → play/src/front/Api}/Events/ChangeAreaEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/ChangeLayerEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/ChatVisibilityEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/ClosePopupEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/ColorEvent.d.ts +1 -1
- package/{Api/Events/CreateAreaEvent.d.ts → play/src/front/Api/Events/CreateDynamicAreaEvent.d.ts} +14 -14
- package/{Api → play/src/front/Api}/Events/EmbeddedWebsiteEvent.d.ts +32 -32
- package/{Api → play/src/front/Api}/Events/EnablePlayersTrackingEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/EnterLeaveEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/GameStateEvent.d.ts +17 -8
- package/{Api → play/src/front/Api}/Events/GoToPageEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/HasPlayerMovedEvent.d.ts +5 -5
- package/{Api → play/src/front/Api}/Events/IframeEvent.d.ts +1849 -486
- package/{Api → play/src/front/Api}/Events/JoinMucEvent.d.ts +3 -3
- package/{Api → play/src/front/Api}/Events/LayerEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/LeaveMucEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/LoadPageEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/LoadSoundEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/LoadTilesetEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/MapDataEvent.d.ts +1 -1
- package/play/src/front/Api/Events/ModalEvent.d.ts +27 -0
- package/{Api → play/src/front/Api}/Events/MovePlayerToEvent.d.ts +3 -3
- package/{Api → play/src/front/Api}/Events/MovePlayerToEventAnswer.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/OpenCoWebsiteEvent.d.ts +3 -3
- package/{Api → play/src/front/Api}/Events/OpenPopupEvent.d.ts +7 -7
- package/{Api → play/src/front/Api}/Events/OpenTabEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/PlaySoundEvent.d.ts +3 -3
- package/{Api → play/src/front/Api}/Events/PlayerPosition.d.ts +1 -1
- package/play/src/front/Api/Events/ProximityMeeting/AppendPCMDataEvent.d.ts +14 -0
- package/{Api → play/src/front/Api}/Events/ProximityMeeting/JoinProximityMeetingEvent.d.ts +14 -9
- package/{Api → play/src/front/Api}/Events/ProximityMeeting/ParticipantProximityMeetingEvent.d.ts +14 -9
- package/play/src/front/Api/Events/ProximityMeeting/PlaySoundInBubbleEvent.d.ts +12 -0
- package/play/src/front/Api/Events/ProximityMeeting/StartStreamInBubbleEvent.d.ts +13 -0
- package/play/src/front/Api/Events/ReceiveEventEvent.d.ts +48 -0
- package/{Api → play/src/front/Api}/Events/RemoveActionsMenuKeyFromRemotePlayerEvent.d.ts +2 -2
- package/play/src/front/Api/Events/SendEventEvent.d.ts +48 -0
- package/{Api → play/src/front/Api}/Events/SetAreaPropertyEvent.d.ts +3 -3
- package/{Api → play/src/front/Api}/Events/SetPlayerVariableEvent.d.ts +6 -6
- package/{Api → play/src/front/Api}/Events/SetPropertyEvent.d.ts +3 -3
- package/{Api → play/src/front/Api}/Events/SetSharedPlayerVariableEvent.d.ts +4 -4
- package/{Api → play/src/front/Api}/Events/SetTilesEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/SetVariableEvent.d.ts +7 -7
- package/play/src/front/Api/Events/SettingsEvent.d.ts +24 -0
- package/{Api → play/src/front/Api}/Events/ShowBusinessCardEvent.d.ts +1 -1
- package/{Api → play/src/front/Api}/Events/StopSoundEvent.d.ts +1 -1
- package/play/src/front/Api/Events/TeleportPlayerToEvent.d.ts +12 -0
- package/play/src/front/Api/Events/Ui/BannerEvent.d.ts +42 -0
- package/play/src/front/Api/Events/Ui/ButtonActionBarEvent.d.ts +38 -0
- package/{Api/Events/Ui/MenuRegisterEvent.d.ts → play/src/front/Api/Events/Ui/MenuEvents.d.ts} +29 -7
- package/{Api → play/src/front/Api}/Events/Ui/MenuItemClickedEvent.d.ts +1 -1
- package/play/src/front/Api/Events/Ui/PlayVideoEvent.d.ts +67 -0
- package/{Api → play/src/front/Api}/Events/Ui/TriggerActionMessageEvent.d.ts +3 -3
- package/play/src/front/Api/Events/Ui/TriggerPlayerMessageEvent.d.ts +27 -0
- package/{Api/Events/Ui/UIWebsite.d.ts → play/src/front/Api/Events/Ui/UIWebsiteEvent.d.ts} +95 -95
- package/{Api → play/src/front/Api}/Events/UserInputChatEvent.d.ts +4 -1
- package/play/src/front/Api/Events/WamMapDataEvent.d.ts +12 -0
- package/{Api → play/src/front/Api}/Events/WasCameraUpdatedEvent.d.ts +6 -6
- package/play/src/front/Api/Iframe/AbstractEvent.d.ts +18 -0
- package/play/src/front/Api/Iframe/AbstractState.d.ts +19 -0
- package/{Api → play/src/front/Api}/Iframe/Area/Area.d.ts +5 -4
- package/{Api → play/src/front/Api}/Iframe/IframeApiContribution.d.ts +2 -2
- package/play/src/front/Api/Iframe/MapEditor/MapEditorArea.d.ts +12 -0
- package/play/src/front/Api/Iframe/Player/AudioStream.d.ts +5 -0
- package/play/src/front/Api/Iframe/Player/ProximityMeeting.d.ts +164 -0
- package/{Api → play/src/front/Api}/Iframe/Players/RemotePlayer.d.ts +14 -12
- package/play/src/front/Api/Iframe/PrivatePlayerState.d.ts +7 -0
- package/play/src/front/Api/Iframe/PublicPlayerState.d.ts +11 -0
- package/{Api → play/src/front/Api}/Iframe/Room/EmbeddedWebsite.d.ts +0 -3
- package/play/src/front/Api/Iframe/RoomState.d.ts +7 -0
- package/{Api → play/src/front/Api}/Iframe/Sound/Sound.d.ts +1 -1
- package/play/src/front/Api/Iframe/Ui/Banner.d.ts +21 -0
- package/play/src/front/Api/Iframe/Ui/ButtonActionBar.d.ts +25 -0
- package/{Api → play/src/front/Api}/Iframe/Ui/ButtonDescriptor.d.ts +1 -1
- package/play/src/front/Api/Iframe/Ui/Menu.d.ts +12 -0
- package/play/src/front/Api/Iframe/Ui/Modal.d.ts +28 -0
- package/play/src/front/Api/Iframe/Ui/PlayerMessage.d.ts +12 -0
- package/{Api → play/src/front/Api}/Iframe/Ui/UIWebsite.d.ts +11 -4
- package/play/src/front/Api/Iframe/Ui/Video.d.ts +5 -0
- package/{Api → play/src/front/Api}/Iframe/area.d.ts +9 -9
- package/{Api → play/src/front/Api}/Iframe/camera.d.ts +9 -9
- package/play/src/front/Api/Iframe/chat.d.ts +69 -0
- package/play/src/front/Api/Iframe/controls.d.ts +116 -0
- package/play/src/front/Api/Iframe/event.d.ts +15 -0
- package/play/src/front/Api/Iframe/mapEditor.d.ts +52 -0
- package/{Api → play/src/front/Api}/Iframe/nav.d.ts +9 -5
- package/{Api → play/src/front/Api}/Iframe/player.d.ts +41 -21
- package/{Api → play/src/front/Api}/Iframe/playerState.d.ts +8 -6
- package/{Api → play/src/front/Api}/Iframe/players.d.ts +30 -18
- package/{Api → play/src/front/Api}/Iframe/registeredCallbacks.d.ts +1 -1
- package/{Api → play/src/front/Api}/Iframe/room.d.ts +23 -16
- package/{Api → play/src/front/Api}/Iframe/sound.d.ts +1 -1
- package/{Api → play/src/front/Api}/Iframe/state.d.ts +5 -6
- package/{Api → play/src/front/Api}/Iframe/ui.d.ts +50 -8
- package/{Api → play/src/front/Api}/Iframe/website.d.ts +4 -4
- package/play/src/front/Api/types.d.ts +3 -0
- package/play/src/iframe_api.d.ts +130 -0
- package/Api/Events/ChatEvent.d.ts +0 -44
- package/Api/Events/NotificationEvent.d.ts +0 -18
- package/Api/Events/SettingsEvent.d.ts +0 -12
- package/Api/Iframe/AbstractState.d.ts +0 -14
- package/Api/Iframe/Player/ProximityMeeting.d.ts +0 -85
- package/Api/Iframe/Ui/Menu.d.ts +0 -8
- package/Api/Iframe/chat.d.ts +0 -36
- package/Api/Iframe/controls.d.ts +0 -56
- package/Api/types.d.ts +0 -3
- /package/{Api → play/src/front/Api}/Iframe/Ui/ActionMessage.d.ts +0 -0
- /package/{Api → play/src/front/Api}/Iframe/Ui/Popup.d.ts +0 -0
package/iframe_api.d.ts
CHANGED
|
@@ -1,111 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { ButtonDescriptor } from "./Api/Iframe/Ui/ButtonDescriptor";
|
|
3
|
-
import type { Popup } from "./Api/Iframe/Ui/Popup";
|
|
4
|
-
import type { Sound } from "./Api/Iframe/Sound/Sound";
|
|
5
|
-
export type { UIWebsite } from "./Api/Iframe/Ui/UIWebsite";
|
|
6
|
-
export type { Menu } from "./Api/Iframe/Ui/Menu";
|
|
7
|
-
export type { ActionMessage } from "./Api/Iframe/Ui/ActionMessage";
|
|
8
|
-
export type { EmbeddedWebsite } from "./Api/Iframe/Room/EmbeddedWebsite";
|
|
9
|
-
export type { Area } from "./Api/Iframe/Area/Area";
|
|
10
|
-
export type { ActionsMenuAction } from "./Api/Iframe/ui";
|
|
11
|
-
declare const wa: {
|
|
12
|
-
ui: import("./Api/Iframe/ui").WorkAdventureUiCommands;
|
|
13
|
-
nav: import("./Api/Iframe/nav").WorkadventureNavigationCommands;
|
|
14
|
-
controls: import("./Api/Iframe/controls").WorkadventureControlsCommands;
|
|
15
|
-
chat: import("./Api/Iframe/chat").WorkadventureChatCommands;
|
|
16
|
-
sound: import("./Api/Iframe/sound").WorkadventureSoundCommands;
|
|
17
|
-
room: import("./Api/Iframe/room").WorkadventureRoomCommands;
|
|
18
|
-
player: import("./Api/Iframe/player").WorkadventurePlayerCommands;
|
|
19
|
-
players: import("./Api/Iframe/players").WorkadventurePlayersCommands;
|
|
20
|
-
camera: import("./Api/Iframe/camera").WorkAdventureCameraCommands;
|
|
21
|
-
state: import("./Api/Iframe/state").WorkadventureStateCommands & {
|
|
22
|
-
[key: string]: unknown;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* When your script / iFrame loads WorkAdventure, it takes a few milliseconds for your
|
|
26
|
-
* script / iFrame to exchange data with WorkAdventure. You should wait for the WorkAdventure
|
|
27
|
-
* API to be fully ready using the WA.onInit() method.
|
|
28
|
-
* {@link https://workadventu.re/map-building/api-start.md#waiting-for-workadventure-api-to-be-available | Website documentation}
|
|
29
|
-
*
|
|
30
|
-
* Some properties (like the current user name, or the room ID) are not available until WA.onInit has completed.
|
|
31
|
-
*
|
|
32
|
-
* @returns {void}
|
|
33
|
-
*/
|
|
34
|
-
onInit(): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* The metadata sent by the administration website.
|
|
37
|
-
* Important: You need to wait for the end of the initialization before accessing.
|
|
38
|
-
* {@link https://workadventu.re/map-building/api-metadata.md | Website documentation}
|
|
39
|
-
*
|
|
40
|
-
* @returns {unknown|undefined} Metadata
|
|
41
|
-
*/
|
|
42
|
-
readonly metadata: unknown;
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated Use WA.chat.sendChatMessage instead
|
|
45
|
-
*/
|
|
46
|
-
sendChatMessage(message: string, author: string): void;
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated Use WA.chat.disablePlayerControls instead
|
|
49
|
-
*/
|
|
50
|
-
disablePlayerControls(): void;
|
|
51
|
-
/**
|
|
52
|
-
* @deprecated Use WA.controls.restorePlayerControls instead
|
|
53
|
-
*/
|
|
54
|
-
restorePlayerControls(): void;
|
|
55
|
-
/**
|
|
56
|
-
* @deprecated Use WA.ui.displayBubble instead
|
|
57
|
-
*/
|
|
58
|
-
displayBubble(): void;
|
|
59
|
-
/**
|
|
60
|
-
* @deprecated Use WA.ui.removeBubble instead
|
|
61
|
-
*/
|
|
62
|
-
removeBubble(): void;
|
|
63
|
-
/**
|
|
64
|
-
* @deprecated Use WA.nav.openTab instead
|
|
65
|
-
*/
|
|
66
|
-
openTab(url: string): void;
|
|
67
|
-
/**
|
|
68
|
-
* @deprecated Use WA.sound.loadSound instead
|
|
69
|
-
*/
|
|
70
|
-
loadSound(url: string): Sound;
|
|
71
|
-
/**
|
|
72
|
-
* @deprecated Use WA.nav.goToPage instead
|
|
73
|
-
*/
|
|
74
|
-
goToPage(url: string): void;
|
|
75
|
-
/**
|
|
76
|
-
* @deprecated Use WA.nav.goToRoom instead
|
|
77
|
-
*/
|
|
78
|
-
goToRoom(url: string): void;
|
|
79
|
-
/**
|
|
80
|
-
* @deprecated Use WA.nav.openCoWebSite instead
|
|
81
|
-
*/
|
|
82
|
-
openCoWebSite(url: string, allowApi?: boolean, allowPolicy?: string): Promise<CoWebsite>;
|
|
83
|
-
/**
|
|
84
|
-
* @deprecated Use WA.nav.closeCoWebSite instead
|
|
85
|
-
*/
|
|
86
|
-
closeCoWebSite(): Promise<void>;
|
|
87
|
-
/**
|
|
88
|
-
* @deprecated Use WA.ui.openPopup instead
|
|
89
|
-
*/
|
|
90
|
-
openPopup(targetObject: string, message: string, buttons: ButtonDescriptor[]): Popup;
|
|
91
|
-
/**
|
|
92
|
-
* @deprecated Use WA.chat.onChatMessage instead
|
|
93
|
-
*/
|
|
94
|
-
onChatMessage(callback: (message: string) => void): void;
|
|
95
|
-
/**
|
|
96
|
-
* @deprecated Use WA.room.onEnterZone instead
|
|
97
|
-
*/
|
|
98
|
-
onEnterZone(name: string, callback: () => void): void;
|
|
99
|
-
/**
|
|
100
|
-
* @deprecated Use WA.room.onLeaveZone instead
|
|
101
|
-
*/
|
|
102
|
-
onLeaveZone(name: string, callback: () => void): void;
|
|
103
|
-
};
|
|
104
|
-
export declare type WorkAdventureApi = typeof wa;
|
|
105
|
-
export type { Sound, Popup, ButtonDescriptor, CoWebsite };
|
|
106
|
-
declare global {
|
|
107
|
-
interface Window {
|
|
108
|
-
WA: WorkAdventureApi;
|
|
109
|
-
}
|
|
110
|
-
let WA: WorkAdventureApi;
|
|
111
|
-
}
|
|
1
|
+
export type * from "./play/src/iframe_api";
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isSendLocalChatMessageOptions: z.ZodObject<{
|
|
3
|
+
scope: z.ZodLiteral<"local">;
|
|
4
|
+
author: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
scope: "local";
|
|
7
|
+
author?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
scope: "local";
|
|
10
|
+
author?: string | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const isSendBubbleChatMessageOptions: z.ZodObject<{
|
|
13
|
+
scope: z.ZodLiteral<"bubble">;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
scope: "bubble";
|
|
16
|
+
}, {
|
|
17
|
+
scope: "bubble";
|
|
18
|
+
}>;
|
|
19
|
+
export declare const isSendChatMessageOptions: z.ZodUnion<[z.ZodObject<{
|
|
20
|
+
scope: z.ZodLiteral<"local">;
|
|
21
|
+
author: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
scope: "local";
|
|
24
|
+
author?: string | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
scope: "local";
|
|
27
|
+
author?: string | undefined;
|
|
28
|
+
}>, z.ZodObject<{
|
|
29
|
+
scope: z.ZodLiteral<"bubble">;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
scope: "bubble";
|
|
32
|
+
}, {
|
|
33
|
+
scope: "bubble";
|
|
34
|
+
}>]>;
|
|
35
|
+
export declare const isChatEvent: z.ZodObject<{
|
|
36
|
+
message: z.ZodString;
|
|
37
|
+
options: z.ZodUnion<[z.ZodObject<{
|
|
38
|
+
scope: z.ZodLiteral<"local">;
|
|
39
|
+
author: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
scope: "local";
|
|
42
|
+
author?: string | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
scope: "local";
|
|
45
|
+
author?: string | undefined;
|
|
46
|
+
}>, z.ZodObject<{
|
|
47
|
+
scope: z.ZodLiteral<"bubble">;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
scope: "bubble";
|
|
50
|
+
}, {
|
|
51
|
+
scope: "bubble";
|
|
52
|
+
}>]>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
message: string;
|
|
55
|
+
options: {
|
|
56
|
+
scope: "local";
|
|
57
|
+
author?: string | undefined;
|
|
58
|
+
} | {
|
|
59
|
+
scope: "bubble";
|
|
60
|
+
};
|
|
61
|
+
}, {
|
|
62
|
+
message: string;
|
|
63
|
+
options: {
|
|
64
|
+
scope: "local";
|
|
65
|
+
author?: string | undefined;
|
|
66
|
+
} | {
|
|
67
|
+
scope: "bubble";
|
|
68
|
+
};
|
|
69
|
+
}>;
|
|
70
|
+
export declare const isAuthor: z.ZodObject<{
|
|
71
|
+
name: z.ZodString;
|
|
72
|
+
active: z.ZodBoolean;
|
|
73
|
+
isMe: z.ZodBoolean;
|
|
74
|
+
jid: z.ZodString;
|
|
75
|
+
isMember: z.ZodBoolean;
|
|
76
|
+
color: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
name: string;
|
|
79
|
+
active: boolean;
|
|
80
|
+
isMe: boolean;
|
|
81
|
+
jid: string;
|
|
82
|
+
isMember: boolean;
|
|
83
|
+
color?: string | undefined;
|
|
84
|
+
}, {
|
|
85
|
+
name: string;
|
|
86
|
+
active: boolean;
|
|
87
|
+
isMe: boolean;
|
|
88
|
+
jid: string;
|
|
89
|
+
isMember: boolean;
|
|
90
|
+
color?: string | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
export declare enum ChatMessageTypes {
|
|
93
|
+
text = 1,
|
|
94
|
+
me = 2,
|
|
95
|
+
userIncoming = 3,
|
|
96
|
+
userOutcoming = 4,
|
|
97
|
+
userWriting = 5,
|
|
98
|
+
userStopWriting = 6
|
|
99
|
+
}
|
|
100
|
+
export declare const isChatMessageTypes: z.ZodNativeEnum<typeof ChatMessageTypes>;
|
|
101
|
+
export declare const isChatMessage: z.ZodObject<{
|
|
102
|
+
id: z.ZodOptional<z.ZodString>;
|
|
103
|
+
type: z.ZodNativeEnum<typeof ChatMessageTypes>;
|
|
104
|
+
date: z.ZodDate;
|
|
105
|
+
author: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
106
|
+
name: z.ZodString;
|
|
107
|
+
active: z.ZodBoolean;
|
|
108
|
+
isMe: z.ZodBoolean;
|
|
109
|
+
jid: z.ZodString;
|
|
110
|
+
isMember: z.ZodBoolean;
|
|
111
|
+
color: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
name: string;
|
|
114
|
+
active: boolean;
|
|
115
|
+
isMe: boolean;
|
|
116
|
+
jid: string;
|
|
117
|
+
isMember: boolean;
|
|
118
|
+
color?: string | undefined;
|
|
119
|
+
}, {
|
|
120
|
+
name: string;
|
|
121
|
+
active: boolean;
|
|
122
|
+
isMe: boolean;
|
|
123
|
+
jid: string;
|
|
124
|
+
isMember: boolean;
|
|
125
|
+
color?: string | undefined;
|
|
126
|
+
}>>>;
|
|
127
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
128
|
+
targets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNullable<z.ZodString>, "many">>>;
|
|
129
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
type: ChatMessageTypes;
|
|
132
|
+
date: Date;
|
|
133
|
+
author?: {
|
|
134
|
+
name: string;
|
|
135
|
+
active: boolean;
|
|
136
|
+
isMe: boolean;
|
|
137
|
+
jid: string;
|
|
138
|
+
isMember: boolean;
|
|
139
|
+
color?: string | undefined;
|
|
140
|
+
} | null | undefined;
|
|
141
|
+
text?: string[] | null | undefined;
|
|
142
|
+
name?: string | null | undefined;
|
|
143
|
+
id?: string | undefined;
|
|
144
|
+
targets?: (string | null)[] | null | undefined;
|
|
145
|
+
}, {
|
|
146
|
+
type: ChatMessageTypes;
|
|
147
|
+
date: Date;
|
|
148
|
+
author?: {
|
|
149
|
+
name: string;
|
|
150
|
+
active: boolean;
|
|
151
|
+
isMe: boolean;
|
|
152
|
+
jid: string;
|
|
153
|
+
isMember: boolean;
|
|
154
|
+
color?: string | undefined;
|
|
155
|
+
} | null | undefined;
|
|
156
|
+
text?: string[] | null | undefined;
|
|
157
|
+
name?: string | null | undefined;
|
|
158
|
+
id?: string | undefined;
|
|
159
|
+
targets?: (string | null)[] | null | undefined;
|
|
160
|
+
}>;
|
|
161
|
+
export type ChatMessage = z.infer<typeof isChatMessage>;
|
|
162
|
+
/**
|
|
163
|
+
* A message sent from the iFrame to the game to add a message in the chat.
|
|
164
|
+
*/
|
|
165
|
+
export type ChatEvent = z.infer<typeof isChatEvent>;
|
|
166
|
+
export type SendLocalChatMessageOptions = z.infer<typeof isSendLocalChatMessageOptions>;
|
|
167
|
+
export type SendBubbleChatMessageOptions = z.infer<typeof isSendBubbleChatMessageOptions>;
|
|
168
|
+
export type SendChatMessageOptions = z.infer<typeof isSendChatMessageOptions>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workadventure/iframe-api-typings",
|
|
3
|
-
"version": "v1.25.
|
|
3
|
+
"version": "v1.25.8",
|
|
4
4
|
"description": "Typescript typings for WorkAdventure iFrame API",
|
|
5
5
|
"main": "iframe_api.js",
|
|
6
6
|
"types": "iframe_api.d.ts",
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"rxjs": "^6.6.3",
|
|
15
|
-
"zod": "^3.
|
|
15
|
+
"zod": "^3.23.8"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -9,5 +9,5 @@ export declare const isActionsMenuActionClickedEvent: z.ZodObject<{
|
|
|
9
9
|
id: number;
|
|
10
10
|
actionName: string;
|
|
11
11
|
}>;
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export type ActionsMenuActionClickedEvent = z.infer<typeof isActionsMenuActionClickedEvent>;
|
|
13
|
+
export type ActionsMenuActionClickedEventCallback = (event: ActionsMenuActionClickedEvent) => void;
|
|
@@ -9,5 +9,5 @@ export declare const isAddActionsMenuKeyToRemotePlayerEvent: z.ZodObject<{
|
|
|
9
9
|
id: number;
|
|
10
10
|
actionKey: string;
|
|
11
11
|
}>;
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export type AddActionsMenuKeyToRemotePlayerEvent = z.infer<typeof isAddActionsMenuKeyToRemotePlayerEvent>;
|
|
13
|
+
export type AddActionsMenuKeyToRemotePlayerEventCallback = (event: AddActionsMenuKeyToRemotePlayerEvent) => void;
|
|
@@ -16,30 +16,34 @@ export declare const isAddPlayerEvent: z.ZodObject<{
|
|
|
16
16
|
y: number;
|
|
17
17
|
}>;
|
|
18
18
|
variables: z.ZodMap<z.ZodString, z.ZodUnknown>;
|
|
19
|
+
chatID: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
19
20
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
|
|
21
|
+
name: string;
|
|
21
22
|
position: {
|
|
22
23
|
x: number;
|
|
23
24
|
y: number;
|
|
24
25
|
};
|
|
25
|
-
name: string;
|
|
26
26
|
playerId: number;
|
|
27
27
|
variables: Map<string, unknown>;
|
|
28
28
|
userUuid: string;
|
|
29
29
|
availabilityStatus: string;
|
|
30
|
-
}, {
|
|
31
30
|
outlineColor?: number | undefined;
|
|
31
|
+
chatID?: string | null | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
name: string;
|
|
32
34
|
position: {
|
|
33
35
|
x: number;
|
|
34
36
|
y: number;
|
|
35
37
|
};
|
|
36
|
-
name: string;
|
|
37
38
|
playerId: number;
|
|
38
39
|
variables: Map<string, unknown>;
|
|
39
40
|
userUuid: string;
|
|
40
41
|
availabilityStatus: string;
|
|
42
|
+
outlineColor?: number | undefined;
|
|
43
|
+
chatID?: string | null | undefined;
|
|
41
44
|
}>;
|
|
42
45
|
export declare const isRemotePlayerChangedEvent: z.ZodObject<{
|
|
46
|
+
name: z.ZodOptional<z.ZodString>;
|
|
43
47
|
position: z.ZodOptional<z.ZodObject<{
|
|
44
48
|
x: z.ZodNumber;
|
|
45
49
|
y: z.ZodNumber;
|
|
@@ -50,37 +54,39 @@ export declare const isRemotePlayerChangedEvent: z.ZodObject<{
|
|
|
50
54
|
x: number;
|
|
51
55
|
y: number;
|
|
52
56
|
}>>;
|
|
53
|
-
name: z.ZodOptional<z.ZodString>;
|
|
54
57
|
playerId: z.ZodNumber;
|
|
55
58
|
variables: z.ZodOptional<z.ZodMap<z.ZodString, z.ZodUnknown>>;
|
|
56
59
|
availabilityStatus: z.ZodOptional<z.ZodString>;
|
|
57
60
|
outlineColor: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
61
|
+
chatID: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
58
62
|
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
playerId: number;
|
|
64
|
+
name?: string | undefined;
|
|
59
65
|
position?: {
|
|
60
66
|
x: number;
|
|
61
67
|
y: number;
|
|
62
68
|
} | undefined;
|
|
63
|
-
name?: string | undefined;
|
|
64
69
|
variables?: Map<string, unknown> | undefined;
|
|
65
70
|
availabilityStatus?: string | undefined;
|
|
66
71
|
outlineColor?: number | undefined;
|
|
67
|
-
|
|
72
|
+
chatID?: string | null | undefined;
|
|
68
73
|
}, {
|
|
74
|
+
playerId: number;
|
|
75
|
+
name?: string | undefined;
|
|
69
76
|
position?: {
|
|
70
77
|
x: number;
|
|
71
78
|
y: number;
|
|
72
79
|
} | undefined;
|
|
73
|
-
name?: string | undefined;
|
|
74
80
|
variables?: Map<string, unknown> | undefined;
|
|
75
81
|
availabilityStatus?: string | undefined;
|
|
76
82
|
outlineColor?: number | undefined;
|
|
77
|
-
|
|
83
|
+
chatID?: string | null | undefined;
|
|
78
84
|
}>;
|
|
79
85
|
/**
|
|
80
86
|
* A message sent from the game to the iFrame to notify a new player arrived in our viewport
|
|
81
87
|
*/
|
|
82
|
-
export
|
|
88
|
+
export type AddPlayerEvent = z.infer<typeof isAddPlayerEvent>;
|
|
83
89
|
/**
|
|
84
90
|
* A message sent from the game to the iFrame to notify a player has changed (moved / changed name, etc...)
|
|
85
91
|
*/
|
|
86
|
-
export
|
|
92
|
+
export type RemotePlayerChangedEvent = z.infer<typeof isRemotePlayerChangedEvent>;
|
|
@@ -12,4 +12,4 @@ export declare const isAskPositionEvent: z.ZodObject<{
|
|
|
12
12
|
/**
|
|
13
13
|
* A message sent from the iFrame to the game to ask the position of the user with uuid and walk to him.
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type AskPositionEvent = z.infer<typeof isAskPositionEvent>;
|
|
@@ -12,4 +12,4 @@ export declare const isButtonClickedEvent: z.ZodObject<{
|
|
|
12
12
|
/**
|
|
13
13
|
* A message sent from the game to the iFrame when a user enters or leaves a zone marked with the "zone" property.
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type ButtonClickedEvent = z.infer<typeof isButtonClickedEvent>;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const isCameraFollowPlayerEvent: z.ZodObject<{
|
|
3
3
|
smooth: z.ZodBoolean;
|
|
4
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
4
5
|
}, "strip", z.ZodTypeAny, {
|
|
5
6
|
smooth: boolean;
|
|
7
|
+
duration?: number | undefined;
|
|
6
8
|
}, {
|
|
7
9
|
smooth: boolean;
|
|
10
|
+
duration?: number | undefined;
|
|
8
11
|
}>;
|
|
9
12
|
/**
|
|
10
13
|
* A message sent from the iFrame to the game to make the camera follow player.
|
|
11
14
|
*/
|
|
12
|
-
export
|
|
15
|
+
export type CameraFollowPlayerEvent = z.infer<typeof isCameraFollowPlayerEvent>;
|
|
@@ -6,22 +6,25 @@ export declare const isCameraSetEvent: z.ZodObject<{
|
|
|
6
6
|
height: z.ZodOptional<z.ZodNumber>;
|
|
7
7
|
lock: z.ZodBoolean;
|
|
8
8
|
smooth: z.ZodBoolean;
|
|
9
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
9
10
|
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
width?: number | undefined;
|
|
11
|
-
height?: number | undefined;
|
|
12
11
|
x: number;
|
|
13
12
|
y: number;
|
|
14
13
|
lock: boolean;
|
|
15
14
|
smooth: boolean;
|
|
16
|
-
}, {
|
|
17
|
-
width?: number | undefined;
|
|
18
15
|
height?: number | undefined;
|
|
16
|
+
width?: number | undefined;
|
|
17
|
+
duration?: number | undefined;
|
|
18
|
+
}, {
|
|
19
19
|
x: number;
|
|
20
20
|
y: number;
|
|
21
21
|
lock: boolean;
|
|
22
22
|
smooth: boolean;
|
|
23
|
+
height?: number | undefined;
|
|
24
|
+
width?: number | undefined;
|
|
25
|
+
duration?: number | undefined;
|
|
23
26
|
}>;
|
|
24
27
|
/**
|
|
25
28
|
* A message sent from the iFrame to the game to change the camera position.
|
|
26
29
|
*/
|
|
27
|
-
export
|
|
30
|
+
export type CameraSetEvent = z.infer<typeof isCameraSetEvent>;
|
|
@@ -9,4 +9,4 @@ export declare const isChangeAreaEvent: z.ZodObject<{
|
|
|
9
9
|
/**
|
|
10
10
|
* A message sent from the game to the iFrame when a user enters or leaves an area.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type ChangeAreaEvent = z.infer<typeof isChangeAreaEvent>;
|
|
@@ -9,4 +9,4 @@ export declare const isChangeLayerEvent: z.ZodObject<{
|
|
|
9
9
|
/**
|
|
10
10
|
* A message sent from the game to the iFrame when a user enters or leaves a layer.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type ChangeLayerEvent = z.infer<typeof isChangeLayerEvent>;
|
|
@@ -9,4 +9,4 @@ export declare const isClosePopupEvent: z.ZodObject<{
|
|
|
9
9
|
/**
|
|
10
10
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type ClosePopupEvent = z.infer<typeof isClosePopupEvent>;
|
|
@@ -15,4 +15,4 @@ export declare const isColorEvent: z.ZodObject<{
|
|
|
15
15
|
/**
|
|
16
16
|
* A message sent from the iFrame to the game to dynamically set the outline of the player.
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export type ColorEvent = z.infer<typeof isColorEvent>;
|
package/{Api/Events/CreateAreaEvent.d.ts → play/src/front/Api/Events/CreateDynamicAreaEvent.d.ts}
RENAMED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const isDynamicAreaEvent: z.ZodObject<{
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
x: z.ZodOptional<z.ZodNumber>;
|
|
5
5
|
y: z.ZodOptional<z.ZodNumber>;
|
|
6
6
|
width: z.ZodOptional<z.ZodNumber>;
|
|
7
7
|
height: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
name: string;
|
|
10
|
+
height?: number | undefined;
|
|
11
|
+
width?: number | undefined;
|
|
9
12
|
x?: number | undefined;
|
|
10
13
|
y?: number | undefined;
|
|
11
|
-
width?: number | undefined;
|
|
12
|
-
height?: number | undefined;
|
|
13
|
-
name: string;
|
|
14
14
|
}, {
|
|
15
|
+
name: string;
|
|
16
|
+
height?: number | undefined;
|
|
17
|
+
width?: number | undefined;
|
|
15
18
|
x?: number | undefined;
|
|
16
19
|
y?: number | undefined;
|
|
17
|
-
width?: number | undefined;
|
|
18
|
-
height?: number | undefined;
|
|
19
|
-
name: string;
|
|
20
20
|
}>;
|
|
21
21
|
/**
|
|
22
22
|
* A message sent from the iFrame to the game to modify an embedded website
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
25
|
-
export declare const
|
|
24
|
+
export type ModifyDynamicAreaEvent = z.infer<typeof isDynamicAreaEvent>;
|
|
25
|
+
export declare const isCreateDynamicAreaEvent: z.ZodObject<{
|
|
26
26
|
name: z.ZodString;
|
|
27
27
|
x: z.ZodNumber;
|
|
28
28
|
y: z.ZodNumber;
|
|
29
29
|
width: z.ZodNumber;
|
|
30
30
|
height: z.ZodNumber;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
height: number;
|
|
33
|
+
width: number;
|
|
32
34
|
name: string;
|
|
33
35
|
x: number;
|
|
34
36
|
y: number;
|
|
35
|
-
width: number;
|
|
36
|
-
height: number;
|
|
37
37
|
}, {
|
|
38
|
+
height: number;
|
|
39
|
+
width: number;
|
|
38
40
|
name: string;
|
|
39
41
|
x: number;
|
|
40
42
|
y: number;
|
|
41
|
-
width: number;
|
|
42
|
-
height: number;
|
|
43
43
|
}>;
|
|
44
|
-
export
|
|
44
|
+
export type CreateDynamicAreaEvent = z.infer<typeof isCreateDynamicAreaEvent>;
|