@workadventure/iframe-api-typings 1.9.5 → 1.10.2
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 +9 -3
- package/Api/Events/AddActionsMenuKeyToRemotePlayerEvent.d.ts +9 -3
- package/Api/Events/ButtonClickedEvent.d.ts +9 -3
- package/Api/Events/CameraFollowPlayerEvent.d.ts +7 -3
- package/Api/Events/CameraSetEvent.d.ts +19 -5
- package/Api/Events/ChangeAreaEvent.d.ts +12 -0
- package/Api/Events/ChangeLayerEvent.d.ts +7 -3
- package/Api/Events/ChatEvent.d.ts +9 -3
- package/Api/Events/ClosePopupEvent.d.ts +7 -3
- package/Api/Events/ColorEvent.d.ts +11 -3
- package/Api/Events/EmbeddedWebsiteEvent.d.ts +98 -28
- package/Api/Events/EnterLeaveEvent.d.ts +7 -3
- package/Api/Events/GameStateEvent.d.ts +31 -9
- package/Api/Events/GoToPageEvent.d.ts +7 -3
- package/Api/Events/HasPlayerMovedEvent.d.ts +20 -6
- package/Api/Events/IframeEvent.d.ts +1330 -131
- package/Api/Events/LayerEvent.d.ts +7 -3
- package/Api/Events/LoadPageEvent.d.ts +7 -3
- package/Api/Events/LoadSoundEvent.d.ts +7 -3
- package/Api/Events/LoadTilesetEvent.d.ts +7 -3
- package/Api/Events/MapDataEvent.d.ts +8 -4
- package/Api/Events/MovePlayerToEvent.d.ts +12 -4
- package/Api/Events/MovePlayerToEventAnswer.d.ts +11 -3
- package/Api/Events/OpenCoWebsiteEvent.d.ts +30 -10
- package/Api/Events/OpenPopupEvent.d.ts +38 -6
- package/Api/Events/OpenTabEvent.d.ts +7 -3
- package/Api/Events/PlaySoundEvent.d.ts +75 -12
- package/Api/Events/PlayerPosition.d.ts +9 -3
- package/Api/Events/RemotePlayerClickedEvent.d.ts +7 -3
- package/Api/Events/RemoveActionsMenuKeyFromRemotePlayerEvent.d.ts +9 -3
- package/Api/Events/SetTilesEvent.d.ts +14 -4
- package/Api/Events/SetVariableEvent.d.ts +40 -10
- package/Api/Events/StopSoundEvent.d.ts +7 -3
- package/Api/Events/UserInputChatEvent.d.ts +7 -3
- package/Api/Events/WasCameraUpdatedEvent.d.ts +15 -3
- package/Api/Events/setPropertyEvent.d.ts +12 -4
- package/Api/Events/ui/MenuItemClickedEvent.d.ts +7 -3
- package/Api/Events/ui/MenuRegisterEvent.d.ts +32 -8
- package/Api/Events/ui/TriggerActionMessageEvent.d.ts +19 -7
- package/Api/Events/ui/UIWebsite.d.ts +289 -0
- package/Api/iframe/IframeApiContribution.d.ts +4 -4
- package/Api/iframe/Ui/UIWebsite.d.ts +33 -0
- package/Api/iframe/controls.d.ts +2 -0
- package/Api/iframe/ui.d.ts +2 -0
- package/package.json +1 -1
- package/Api/Events/ChangeZoneEvent.d.ts +0 -8
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isActionsMenuActionClickedEvent:
|
|
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
|
+
}, {
|
|
3
9
|
id: number;
|
|
4
10
|
actionName: string;
|
|
5
11
|
}>;
|
|
6
|
-
export declare type ActionsMenuActionClickedEvent =
|
|
12
|
+
export declare type ActionsMenuActionClickedEvent = z.infer<typeof isActionsMenuActionClickedEvent>;
|
|
7
13
|
export declare type ActionsMenuActionClickedEventCallback = (event: ActionsMenuActionClickedEvent) => void;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isAddActionsMenuKeyToRemotePlayerEvent:
|
|
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
|
+
}, {
|
|
3
9
|
id: number;
|
|
4
10
|
actionKey: string;
|
|
5
11
|
}>;
|
|
6
|
-
export declare type AddActionsMenuKeyToRemotePlayerEvent =
|
|
12
|
+
export declare type AddActionsMenuKeyToRemotePlayerEvent = z.infer<typeof isAddActionsMenuKeyToRemotePlayerEvent>;
|
|
7
13
|
export declare type AddActionsMenuKeyToRemotePlayerEventCallback = (event: AddActionsMenuKeyToRemotePlayerEvent) => void;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isButtonClickedEvent:
|
|
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
|
+
}, {
|
|
3
9
|
popupId: number;
|
|
4
10
|
buttonId: number;
|
|
5
11
|
}>;
|
|
6
12
|
/**
|
|
7
13
|
* A message sent from the game to the iFrame when a user enters or leaves a zone marked with the "zone" property.
|
|
8
14
|
*/
|
|
9
|
-
export declare type ButtonClickedEvent =
|
|
15
|
+
export declare type ButtonClickedEvent = z.infer<typeof isButtonClickedEvent>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isCameraFollowPlayerEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isCameraFollowPlayerEvent: z.ZodObject<{
|
|
3
|
+
smooth: z.ZodBoolean;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
smooth: boolean;
|
|
6
|
+
}, {
|
|
3
7
|
smooth: boolean;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the iFrame to the game to make the camera follow player.
|
|
7
11
|
*/
|
|
8
|
-
export declare type CameraFollowPlayerEvent =
|
|
12
|
+
export declare type CameraFollowPlayerEvent = z.infer<typeof isCameraFollowPlayerEvent>;
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isCameraSetEvent:
|
|
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;
|
|
3
19
|
x: number;
|
|
4
20
|
y: number;
|
|
5
|
-
width: number | undefined;
|
|
6
|
-
height: number | undefined;
|
|
7
21
|
lock: boolean;
|
|
8
22
|
smooth: boolean;
|
|
9
23
|
}>;
|
|
10
24
|
/**
|
|
11
25
|
* A message sent from the iFrame to the game to change the camera position.
|
|
12
26
|
*/
|
|
13
|
-
export declare type CameraSetEvent =
|
|
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>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isChangeLayerEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isChangeLayerEvent: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
name: string;
|
|
6
|
+
}, {
|
|
3
7
|
name: string;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the game to the iFrame when a user enters or leaves a layer.
|
|
7
11
|
*/
|
|
8
|
-
export declare type ChangeLayerEvent =
|
|
12
|
+
export declare type ChangeLayerEvent = z.infer<typeof isChangeLayerEvent>;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isChatEvent:
|
|
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
|
+
}, {
|
|
3
9
|
message: string;
|
|
4
10
|
author: string;
|
|
5
11
|
}>;
|
|
6
12
|
/**
|
|
7
13
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
8
14
|
*/
|
|
9
|
-
export declare type ChatEvent =
|
|
15
|
+
export declare type ChatEvent = z.infer<typeof isChatEvent>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isClosePopupEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isClosePopupEvent: z.ZodObject<{
|
|
3
|
+
popupId: z.ZodNumber;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
popupId: number;
|
|
6
|
+
}, {
|
|
3
7
|
popupId: number;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
7
11
|
*/
|
|
8
|
-
export declare type ClosePopupEvent =
|
|
12
|
+
export declare type ClosePopupEvent = z.infer<typeof isClosePopupEvent>;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isColorEvent:
|
|
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
|
+
}, {
|
|
3
11
|
red: number;
|
|
4
12
|
green: number;
|
|
5
13
|
blue: number;
|
|
@@ -7,4 +15,4 @@ export declare const isColorEvent: tg.TypeGuard<object & {
|
|
|
7
15
|
/**
|
|
8
16
|
* A message sent from the iFrame to the game to dynamically set the outline of the player.
|
|
9
17
|
*/
|
|
10
|
-
export declare type ColorEvent =
|
|
18
|
+
export declare type ColorEvent = z.infer<typeof isColorEvent>;
|
|
@@ -1,43 +1,113 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isRectangle:
|
|
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, {
|
|
3
8
|
x: number;
|
|
4
9
|
y: number;
|
|
5
10
|
width: number;
|
|
6
11
|
height: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const isEmbeddedWebsiteEvent: tg.TypeGuard<object & {
|
|
9
|
-
name: string;
|
|
10
|
-
} & Partial<{
|
|
11
|
-
url: string;
|
|
12
|
-
visible: boolean;
|
|
13
|
-
allowApi: boolean;
|
|
14
|
-
allow: string;
|
|
12
|
+
}, {
|
|
15
13
|
x: number;
|
|
16
14
|
y: number;
|
|
17
15
|
width: number;
|
|
18
16
|
height: number;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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;
|
|
23
90
|
name: string;
|
|
24
91
|
url: string;
|
|
25
|
-
position:
|
|
92
|
+
position: {
|
|
26
93
|
x: number;
|
|
27
94
|
y: number;
|
|
28
95
|
width: number;
|
|
29
96
|
height: number;
|
|
30
97
|
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
allow
|
|
35
|
-
origin
|
|
36
|
-
scale
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isEnterLeaveEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isEnterLeaveEvent: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
name: string;
|
|
6
|
+
}, {
|
|
3
7
|
name: string;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the game to the iFrame when a user enters or leaves a zone marked with the "zone" property.
|
|
7
11
|
*/
|
|
8
|
-
export declare type EnterLeaveEvent =
|
|
12
|
+
export declare type EnterLeaveEvent = z.infer<typeof isEnterLeaveEvent>;
|
|
@@ -1,17 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isGameStateEvent:
|
|
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;
|
|
3
31
|
roomId: string;
|
|
4
32
|
mapUrl: string;
|
|
5
33
|
nickname: string;
|
|
6
|
-
language: string | undefined;
|
|
7
|
-
uuid: string | undefined;
|
|
8
|
-
startLayerName: string | null;
|
|
9
34
|
tags: string[];
|
|
10
|
-
variables: object;
|
|
11
|
-
playerVariables: object;
|
|
12
|
-
userRoomToken: string | undefined;
|
|
13
35
|
}>;
|
|
14
36
|
/**
|
|
15
37
|
* A message sent from the game to the iFrame when the gameState is received by the script
|
|
16
38
|
*/
|
|
17
|
-
export declare type GameStateEvent =
|
|
39
|
+
export declare type GameStateEvent = z.infer<typeof isGameStateEvent>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isGoToPageEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isGoToPageEvent: z.ZodObject<{
|
|
3
|
+
url: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
url: string;
|
|
6
|
+
}, {
|
|
3
7
|
url: string;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
7
11
|
*/
|
|
8
|
-
export declare type GoToPageEvent =
|
|
12
|
+
export declare type GoToPageEvent = z.infer<typeof isGoToPageEvent>;
|
|
@@ -1,14 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isHasPlayerMovedEvent:
|
|
3
|
-
direction:
|
|
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";
|
|
4
20
|
moving: boolean;
|
|
5
21
|
x: number;
|
|
6
22
|
y: number;
|
|
7
|
-
oldX: number | undefined;
|
|
8
|
-
oldY: number | undefined;
|
|
9
23
|
}>;
|
|
10
24
|
/**
|
|
11
25
|
* A message sent from the game to the iFrame to notify a movement from the current player.
|
|
12
26
|
*/
|
|
13
|
-
export declare type HasPlayerMovedEvent =
|
|
27
|
+
export declare type HasPlayerMovedEvent = z.infer<typeof isHasPlayerMovedEvent>;
|
|
14
28
|
export declare type HasPlayerMovedEventCallback = (event: HasPlayerMovedEvent) => void;
|