@workadventure/iframe-api-typings 1.9.3 → 1.10.0
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/Api/Events/ActionsMenuActionClickedEvent.d.ts +13 -0
- package/Api/Events/AddActionsMenuKeyToRemotePlayerEvent.d.ts +13 -0
- package/Api/Events/ButtonClickedEvent.d.ts +15 -0
- package/Api/Events/CameraFollowPlayerEvent.d.ts +12 -0
- package/Api/Events/CameraSetEvent.d.ts +27 -0
- package/Api/Events/ChangeAreaEvent.d.ts +12 -0
- package/Api/Events/ChangeLayerEvent.d.ts +12 -0
- package/Api/Events/ChatEvent.d.ts +15 -0
- package/Api/Events/ClosePopupEvent.d.ts +12 -0
- package/Api/Events/ColorEvent.d.ts +18 -0
- package/Api/Events/EmbeddedWebsiteEvent.d.ts +113 -0
- package/Api/Events/EnterLeaveEvent.d.ts +12 -0
- package/Api/Events/GameStateEvent.d.ts +39 -0
- package/Api/Events/GoToPageEvent.d.ts +12 -0
- package/Api/Events/HasPlayerMovedEvent.d.ts +28 -0
- package/Api/Events/IframeEvent.d.ts +1492 -0
- package/Api/Events/LayerEvent.d.ts +12 -0
- package/Api/Events/LoadPageEvent.d.ts +12 -0
- package/Api/Events/LoadSoundEvent.d.ts +12 -0
- package/Api/Events/LoadTilesetEvent.d.ts +12 -0
- package/Api/Events/MapDataEvent.d.ts +12 -0
- package/Api/Events/MovePlayerToEvent.d.ts +15 -0
- package/Api/Events/MovePlayerToEventAnswer.d.ts +15 -0
- package/Api/Events/OpenCoWebsiteEvent.d.ts +37 -0
- package/Api/Events/OpenPopupEvent.d.ts +46 -0
- package/Api/Events/OpenTabEvent.d.ts +12 -0
- package/Api/Events/PlaySoundEvent.d.ts +80 -0
- package/Api/Events/PlayerPosition.d.ts +12 -0
- package/Api/Events/RemotePlayerClickedEvent.d.ts +13 -0
- package/{front/src/Api → Api}/Events/RemoveActionsMenuKeyFromRemotePlayerEvent.d.ts +9 -3
- package/Api/Events/SetTilesEvent.d.ts +21 -0
- package/Api/Events/SetVariableEvent.d.ts +48 -0
- package/Api/Events/StopSoundEvent.d.ts +12 -0
- package/Api/Events/UserInputChatEvent.d.ts +12 -0
- package/Api/Events/WasCameraUpdatedEvent.d.ts +25 -0
- package/Api/Events/setPropertyEvent.d.ts +18 -0
- package/Api/Events/ui/MenuItemClickedEvent.d.ts +12 -0
- package/Api/Events/ui/MenuRegisterEvent.d.ts +46 -0
- package/Api/Events/ui/TriggerActionMessageEvent.d.ts +27 -0
- package/Api/Events/ui/UIWebsite.d.ts +289 -0
- package/{front/src/Api → Api}/iframe/IframeApiContribution.d.ts +4 -4
- package/{front/src/Api → Api}/iframe/Room/EmbeddedWebsite.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/Sound/Sound.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/Ui/ActionMessage.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/Ui/ButtonDescriptor.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/Ui/Menu.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/Ui/Popup.d.ts +0 -0
- package/Api/iframe/Ui/UIWebsite.d.ts +33 -0
- package/{front/src/Api → Api}/iframe/camera.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/chat.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/controls.d.ts +2 -0
- package/{front/src/Api → Api}/iframe/nav.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/player.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/registeredCallbacks.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/room.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/sound.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/state.d.ts +0 -0
- package/{front/src/Api → Api}/iframe/ui.d.ts +2 -0
- package/{front/src/Api → Api}/iframe/website.d.ts +0 -0
- package/{front/src/Api → Api}/types.d.ts +0 -0
- package/{front/src/Phaser → Phaser}/Map/ITiledMap.d.ts +0 -0
- package/{front/src/iframe_api.d.ts → iframe_api.d.ts} +6 -0
- package/package.json +4 -1
- package/desktop/electron/src/preload-app/types.d.ts +0 -8
- package/front/src/Api/Events/ActionsMenuActionClickedEvent.d.ts +0 -7
- package/front/src/Api/Events/AddActionsMenuKeyToRemotePlayerEvent.d.ts +0 -7
- package/front/src/Api/Events/ButtonClickedEvent.d.ts +0 -9
- package/front/src/Api/Events/CameraFollowPlayerEvent.d.ts +0 -8
- package/front/src/Api/Events/CameraSetEvent.d.ts +0 -13
- package/front/src/Api/Events/ChangeLayerEvent.d.ts +0 -8
- package/front/src/Api/Events/ChangeZoneEvent.d.ts +0 -8
- package/front/src/Api/Events/ChatEvent.d.ts +0 -9
- package/front/src/Api/Events/ClosePopupEvent.d.ts +0 -8
- package/front/src/Api/Events/ColorEvent.d.ts +0 -10
- package/front/src/Api/Events/EmbeddedWebsiteEvent.d.ts +0 -43
- package/front/src/Api/Events/EnterLeaveEvent.d.ts +0 -8
- package/front/src/Api/Events/GameStateEvent.d.ts +0 -17
- package/front/src/Api/Events/GoToPageEvent.d.ts +0 -8
- package/front/src/Api/Events/HasPlayerMovedEvent.d.ts +0 -14
- package/front/src/Api/Events/IframeEvent.d.ts +0 -293
- package/front/src/Api/Events/LayerEvent.d.ts +0 -8
- package/front/src/Api/Events/LoadPageEvent.d.ts +0 -8
- package/front/src/Api/Events/LoadSoundEvent.d.ts +0 -8
- package/front/src/Api/Events/LoadTilesetEvent.d.ts +0 -8
- package/front/src/Api/Events/MapDataEvent.d.ts +0 -8
- package/front/src/Api/Events/MovePlayerToEvent.d.ts +0 -7
- package/front/src/Api/Events/MovePlayerToEventAnswer.d.ts +0 -7
- package/front/src/Api/Events/OpenCoWebsiteEvent.d.ts +0 -17
- package/front/src/Api/Events/OpenPopupEvent.d.ts +0 -14
- package/front/src/Api/Events/OpenTabEvent.d.ts +0 -8
- package/front/src/Api/Events/PlaySoundEvent.d.ts +0 -17
- package/front/src/Api/Events/PlayerPosition.d.ts +0 -6
- package/front/src/Api/Events/RemotePlayerClickedEvent.d.ts +0 -9
- package/front/src/Api/Events/SetTilesEvent.d.ts +0 -11
- package/front/src/Api/Events/SetVariableEvent.d.ts +0 -18
- package/front/src/Api/Events/StopSoundEvent.d.ts +0 -8
- package/front/src/Api/Events/UserInputChatEvent.d.ts +0 -8
- package/front/src/Api/Events/WasCameraUpdatedEvent.d.ts +0 -13
- package/front/src/Api/Events/setPropertyEvent.d.ts +0 -10
- package/front/src/Api/Events/ui/MenuItemClickedEvent.d.ts +0 -8
- package/front/src/Api/Events/ui/MenuRegisterEvent.d.ts +0 -22
- package/front/src/Api/Events/ui/TriggerActionMessageEvent.d.ts +0 -15
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isActionsMenuActionClickedEvent: z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
actionName: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
id: number;
|
|
7
|
+
actionName: string;
|
|
8
|
+
}, {
|
|
9
|
+
id: number;
|
|
10
|
+
actionName: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare type ActionsMenuActionClickedEvent = z.infer<typeof isActionsMenuActionClickedEvent>;
|
|
13
|
+
export declare type ActionsMenuActionClickedEventCallback = (event: ActionsMenuActionClickedEvent) => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isAddActionsMenuKeyToRemotePlayerEvent: z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
actionKey: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
id: number;
|
|
7
|
+
actionKey: string;
|
|
8
|
+
}, {
|
|
9
|
+
id: number;
|
|
10
|
+
actionKey: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare type AddActionsMenuKeyToRemotePlayerEvent = z.infer<typeof isAddActionsMenuKeyToRemotePlayerEvent>;
|
|
13
|
+
export declare type AddActionsMenuKeyToRemotePlayerEventCallback = (event: AddActionsMenuKeyToRemotePlayerEvent) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isButtonClickedEvent: z.ZodObject<{
|
|
3
|
+
popupId: z.ZodNumber;
|
|
4
|
+
buttonId: z.ZodNumber;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
popupId: number;
|
|
7
|
+
buttonId: number;
|
|
8
|
+
}, {
|
|
9
|
+
popupId: number;
|
|
10
|
+
buttonId: number;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* A message sent from the game to the iFrame when a user enters or leaves a zone marked with the "zone" property.
|
|
14
|
+
*/
|
|
15
|
+
export declare type ButtonClickedEvent = z.infer<typeof isButtonClickedEvent>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isCameraFollowPlayerEvent: z.ZodObject<{
|
|
3
|
+
smooth: z.ZodBoolean;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
smooth: boolean;
|
|
6
|
+
}, {
|
|
7
|
+
smooth: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* A message sent from the iFrame to the game to make the camera follow player.
|
|
11
|
+
*/
|
|
12
|
+
export declare type CameraFollowPlayerEvent = z.infer<typeof isCameraFollowPlayerEvent>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isCameraSetEvent: z.ZodObject<{
|
|
3
|
+
x: z.ZodNumber;
|
|
4
|
+
y: z.ZodNumber;
|
|
5
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
lock: z.ZodBoolean;
|
|
8
|
+
smooth: z.ZodBoolean;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
width?: number | undefined;
|
|
11
|
+
height?: number | undefined;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
lock: boolean;
|
|
15
|
+
smooth: boolean;
|
|
16
|
+
}, {
|
|
17
|
+
width?: number | undefined;
|
|
18
|
+
height?: number | undefined;
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
lock: boolean;
|
|
22
|
+
smooth: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* A message sent from the iFrame to the game to change the camera position.
|
|
26
|
+
*/
|
|
27
|
+
export declare type CameraSetEvent = z.infer<typeof isCameraSetEvent>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isChangeZoneEvent: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
name: string;
|
|
6
|
+
}, {
|
|
7
|
+
name: string;
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* A message sent from the game to the iFrame when a user enters or leaves a zone.
|
|
11
|
+
*/
|
|
12
|
+
export declare type ChangeAreaEvent = z.infer<typeof isChangeZoneEvent>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isChangeLayerEvent: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
name: string;
|
|
6
|
+
}, {
|
|
7
|
+
name: string;
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* A message sent from the game to the iFrame when a user enters or leaves a layer.
|
|
11
|
+
*/
|
|
12
|
+
export declare type ChangeLayerEvent = z.infer<typeof isChangeLayerEvent>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isChatEvent: z.ZodObject<{
|
|
3
|
+
message: z.ZodString;
|
|
4
|
+
author: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
message: string;
|
|
7
|
+
author: string;
|
|
8
|
+
}, {
|
|
9
|
+
message: string;
|
|
10
|
+
author: string;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* A message sent from the iFrame to the game to add a message in the chat.
|
|
14
|
+
*/
|
|
15
|
+
export declare type ChatEvent = z.infer<typeof isChatEvent>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isClosePopupEvent: z.ZodObject<{
|
|
3
|
+
popupId: z.ZodNumber;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
popupId: number;
|
|
6
|
+
}, {
|
|
7
|
+
popupId: number;
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* A message sent from the iFrame to the game to add a message in the chat.
|
|
11
|
+
*/
|
|
12
|
+
export declare type ClosePopupEvent = z.infer<typeof isClosePopupEvent>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isColorEvent: z.ZodObject<{
|
|
3
|
+
red: z.ZodNumber;
|
|
4
|
+
green: z.ZodNumber;
|
|
5
|
+
blue: z.ZodNumber;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
red: number;
|
|
8
|
+
green: number;
|
|
9
|
+
blue: number;
|
|
10
|
+
}, {
|
|
11
|
+
red: number;
|
|
12
|
+
green: number;
|
|
13
|
+
blue: number;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* A message sent from the iFrame to the game to dynamically set the outline of the player.
|
|
17
|
+
*/
|
|
18
|
+
export declare type ColorEvent = z.infer<typeof isColorEvent>;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isRectangle: z.ZodObject<{
|
|
3
|
+
x: z.ZodNumber;
|
|
4
|
+
y: z.ZodNumber;
|
|
5
|
+
width: z.ZodNumber;
|
|
6
|
+
height: z.ZodNumber;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}, {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}>;
|
|
18
|
+
export declare type Rectangle = z.infer<typeof isRectangle>;
|
|
19
|
+
export declare const isEmbeddedWebsiteEvent: z.ZodObject<{
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
url: z.ZodOptional<z.ZodString>;
|
|
22
|
+
visible: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
allowApi: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
allow: z.ZodOptional<z.ZodString>;
|
|
25
|
+
x: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
y: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
origin: z.ZodOptional<z.ZodEnum<["player", "map"]>>;
|
|
30
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
url?: string | undefined;
|
|
33
|
+
allowApi?: boolean | undefined;
|
|
34
|
+
x?: number | undefined;
|
|
35
|
+
y?: number | undefined;
|
|
36
|
+
width?: number | undefined;
|
|
37
|
+
height?: number | undefined;
|
|
38
|
+
visible?: boolean | undefined;
|
|
39
|
+
allow?: string | undefined;
|
|
40
|
+
origin?: "player" | "map" | undefined;
|
|
41
|
+
scale?: number | undefined;
|
|
42
|
+
name: string;
|
|
43
|
+
}, {
|
|
44
|
+
url?: string | undefined;
|
|
45
|
+
allowApi?: boolean | undefined;
|
|
46
|
+
x?: number | undefined;
|
|
47
|
+
y?: number | undefined;
|
|
48
|
+
width?: number | undefined;
|
|
49
|
+
height?: number | undefined;
|
|
50
|
+
visible?: boolean | undefined;
|
|
51
|
+
allow?: string | undefined;
|
|
52
|
+
origin?: "player" | "map" | undefined;
|
|
53
|
+
scale?: number | undefined;
|
|
54
|
+
name: string;
|
|
55
|
+
}>;
|
|
56
|
+
/**
|
|
57
|
+
* A message sent from the iFrame to the game to modify an embedded website
|
|
58
|
+
*/
|
|
59
|
+
export declare type ModifyEmbeddedWebsiteEvent = z.infer<typeof isEmbeddedWebsiteEvent>;
|
|
60
|
+
export declare const isCreateEmbeddedWebsiteEvent: z.ZodObject<{
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
url: z.ZodString;
|
|
63
|
+
position: z.ZodObject<{
|
|
64
|
+
x: z.ZodNumber;
|
|
65
|
+
y: z.ZodNumber;
|
|
66
|
+
width: z.ZodNumber;
|
|
67
|
+
height: z.ZodNumber;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
}, {
|
|
74
|
+
x: number;
|
|
75
|
+
y: number;
|
|
76
|
+
width: number;
|
|
77
|
+
height: number;
|
|
78
|
+
}>;
|
|
79
|
+
visible: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
allowApi: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
allow: z.ZodOptional<z.ZodString>;
|
|
82
|
+
origin: z.ZodOptional<z.ZodEnum<["player", "map"]>>;
|
|
83
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
allowApi?: boolean | undefined;
|
|
86
|
+
visible?: boolean | undefined;
|
|
87
|
+
allow?: string | undefined;
|
|
88
|
+
origin?: "player" | "map" | undefined;
|
|
89
|
+
scale?: number | undefined;
|
|
90
|
+
name: string;
|
|
91
|
+
url: string;
|
|
92
|
+
position: {
|
|
93
|
+
x: number;
|
|
94
|
+
y: number;
|
|
95
|
+
width: number;
|
|
96
|
+
height: number;
|
|
97
|
+
};
|
|
98
|
+
}, {
|
|
99
|
+
allowApi?: boolean | undefined;
|
|
100
|
+
visible?: boolean | undefined;
|
|
101
|
+
allow?: string | undefined;
|
|
102
|
+
origin?: "player" | "map" | undefined;
|
|
103
|
+
scale?: number | undefined;
|
|
104
|
+
name: string;
|
|
105
|
+
url: string;
|
|
106
|
+
position: {
|
|
107
|
+
x: number;
|
|
108
|
+
y: number;
|
|
109
|
+
width: number;
|
|
110
|
+
height: number;
|
|
111
|
+
};
|
|
112
|
+
}>;
|
|
113
|
+
export declare type CreateEmbeddedWebsiteEvent = z.infer<typeof isCreateEmbeddedWebsiteEvent>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isEnterLeaveEvent: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
name: string;
|
|
6
|
+
}, {
|
|
7
|
+
name: string;
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* A message sent from the game to the iFrame when a user enters or leaves a zone marked with the "zone" property.
|
|
11
|
+
*/
|
|
12
|
+
export declare type EnterLeaveEvent = z.infer<typeof isEnterLeaveEvent>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isGameStateEvent: z.ZodObject<{
|
|
3
|
+
roomId: z.ZodString;
|
|
4
|
+
mapUrl: z.ZodString;
|
|
5
|
+
nickname: z.ZodString;
|
|
6
|
+
language: z.ZodOptional<z.ZodString>;
|
|
7
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
8
|
+
startLayerName: z.ZodOptional<z.ZodString>;
|
|
9
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
10
|
+
variables: z.ZodUnknown;
|
|
11
|
+
playerVariables: z.ZodUnknown;
|
|
12
|
+
userRoomToken: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
language?: string | undefined;
|
|
15
|
+
uuid?: string | undefined;
|
|
16
|
+
startLayerName?: string | undefined;
|
|
17
|
+
variables?: unknown;
|
|
18
|
+
playerVariables?: unknown;
|
|
19
|
+
userRoomToken?: string | undefined;
|
|
20
|
+
roomId: string;
|
|
21
|
+
mapUrl: string;
|
|
22
|
+
nickname: string;
|
|
23
|
+
tags: string[];
|
|
24
|
+
}, {
|
|
25
|
+
language?: string | undefined;
|
|
26
|
+
uuid?: string | undefined;
|
|
27
|
+
startLayerName?: string | undefined;
|
|
28
|
+
variables?: unknown;
|
|
29
|
+
playerVariables?: unknown;
|
|
30
|
+
userRoomToken?: string | undefined;
|
|
31
|
+
roomId: string;
|
|
32
|
+
mapUrl: string;
|
|
33
|
+
nickname: string;
|
|
34
|
+
tags: string[];
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* A message sent from the game to the iFrame when the gameState is received by the script
|
|
38
|
+
*/
|
|
39
|
+
export declare type GameStateEvent = z.infer<typeof isGameStateEvent>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isGoToPageEvent: z.ZodObject<{
|
|
3
|
+
url: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
url: string;
|
|
6
|
+
}, {
|
|
7
|
+
url: string;
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* A message sent from the iFrame to the game to add a message in the chat.
|
|
11
|
+
*/
|
|
12
|
+
export declare type GoToPageEvent = z.infer<typeof isGoToPageEvent>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isHasPlayerMovedEvent: z.ZodObject<{
|
|
3
|
+
direction: z.ZodEnum<["right", "left", "up", "down"]>;
|
|
4
|
+
moving: z.ZodBoolean;
|
|
5
|
+
x: z.ZodNumber;
|
|
6
|
+
y: z.ZodNumber;
|
|
7
|
+
oldX: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
oldY: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
oldX?: number | undefined;
|
|
11
|
+
oldY?: number | undefined;
|
|
12
|
+
direction: "right" | "left" | "up" | "down";
|
|
13
|
+
moving: boolean;
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
}, {
|
|
17
|
+
oldX?: number | undefined;
|
|
18
|
+
oldY?: number | undefined;
|
|
19
|
+
direction: "right" | "left" | "up" | "down";
|
|
20
|
+
moving: boolean;
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* A message sent from the game to the iFrame to notify a movement from the current player.
|
|
26
|
+
*/
|
|
27
|
+
export declare type HasPlayerMovedEvent = z.infer<typeof isHasPlayerMovedEvent>;
|
|
28
|
+
export declare type HasPlayerMovedEventCallback = (event: HasPlayerMovedEvent) => void;
|