@workadventure/iframe-api-typings 1.17.6 → 1.18.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/libs/shared-utils/src/Events/ChatEvent.d.ts +165 -0
- package/package.json +1 -1
- package/{front → play/src/front}/Api/Events/GameStateEvent.d.ts +15 -12
- package/{front → play/src/front}/Api/Events/IframeEvent.d.ts +495 -230
- package/play/src/front/Api/Events/ProximityMeeting/PlaySoundInBubbleEvent.d.ts +12 -0
- package/play/src/front/Api/Events/ReceiveEventEvent.d.ts +48 -0
- package/play/src/front/Api/Events/SendEventEvent.d.ts +48 -0
- package/{front → play/src/front}/Api/Events/SetSharedPlayerVariableEvent.d.ts +3 -3
- package/{front → play/src/front}/Api/Events/UserInputChatEvent.d.ts +3 -0
- package/play/src/front/Api/Iframe/AbstractEvent.d.ts +18 -0
- package/{front → play/src/front}/Api/Iframe/Player/ProximityMeeting.d.ts +10 -9
- package/{front → play/src/front}/Api/Iframe/Players/RemotePlayer.d.ts +6 -0
- package/play/src/front/Api/Iframe/chat.d.ts +66 -0
- package/play/src/front/Api/Iframe/event.d.ts +15 -0
- package/{front → play/src/front}/Api/Iframe/player.d.ts +3 -1
- package/{front → play/src/front}/Api/Iframe/room.d.ts +9 -2
- package/{iframe_api.d.ts → play/src/iframe_api.d.ts} +4 -0
- package/front/Api/Events/ChatEvent.d.ts +0 -47
- package/front/Api/Events/XmppSettingsMessageEvent.d.ts +0 -43
- package/front/Api/Iframe/chat.d.ts +0 -36
- package/{front → play/src/front}/Api/Events/ActionsMenuActionClickedEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/AddActionsMenuKeyToRemotePlayerEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/AddPlayerEvent.d.ts +13 -13
- package/{front → play/src/front}/Api/Events/AskPositionEvent.d.ts +2 -2
- package/{front → play/src/front}/Api/Events/ButtonClickedEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/CameraFollowPlayerEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/CameraSetEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/ChangeAreaEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/ChangeLayerEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/ChatVisibilityEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/ClosePopupEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/ColorEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/CreateDynamicAreaEvent.d.ts +2 -2
- package/{front → play/src/front}/Api/Events/EmbeddedWebsiteEvent.d.ts +2 -2
- package/{front → play/src/front}/Api/Events/EnablePlayersTrackingEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/EnterLeaveEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/GoToPageEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/HasPlayerMovedEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/JoinMucEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/LayerEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/LeaveMucEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/LoadPageEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/LoadSoundEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/LoadTilesetEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/MapDataEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/ModalEvent.d.ts +3 -3
- package/{front → play/src/front}/Api/Events/MovePlayerToEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/MovePlayerToEventAnswer.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/NotificationEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/OpenCoWebsiteEvent.d.ts +2 -2
- package/{front → play/src/front}/Api/Events/OpenPopupEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/OpenTabEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/PlaySoundEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/PlayerPosition.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/ProximityMeeting/JoinProximityMeetingEvent.d.ts +12 -12
- package/{front → play/src/front}/Api/Events/ProximityMeeting/ParticipantProximityMeetingEvent.d.ts +12 -12
- package/{front → play/src/front}/Api/Events/RemoveActionsMenuKeyFromRemotePlayerEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/SetAreaPropertyEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/SetPlayerVariableEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/SetPropertyEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/SetTilesEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/SetVariableEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/SettingsEvent.d.ts +3 -3
- package/{front → play/src/front}/Api/Events/ShowBusinessCardEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/StopSoundEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/TeleportPlayerToEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/Ui/BannerEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/Ui/ButtonActionBarEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/Ui/MenuEvents.d.ts +2 -2
- package/{front → play/src/front}/Api/Events/Ui/MenuItemClickedEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/Ui/TriggerActionMessageEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Events/Ui/UIWebsiteEvent.d.ts +20 -20
- package/{front → play/src/front}/Api/Events/WasCameraUpdatedEvent.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/AbstractState.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/Area/Area.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/IframeApiContribution.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/Room/EmbeddedWebsite.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/Sound/Sound.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/Ui/ActionMessage.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/Ui/Banner.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/Ui/ButtonActionBar.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/Ui/ButtonDescriptor.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/Ui/Menu.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/Ui/Modal.d.ts +2 -2
- package/{front → play/src/front}/Api/Iframe/Ui/Popup.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/Ui/UIWebsite.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/area.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/camera.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/controls.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/nav.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/playerState.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/players.d.ts +6 -6
- package/{front → play/src/front}/Api/Iframe/registeredCallbacks.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/sound.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/state.d.ts +0 -0
- package/{front → play/src/front}/Api/Iframe/ui.d.ts +3 -3
- /package/{front → play/src/front}/Api/Iframe/website.d.ts +0 -0
- /package/{front → play/src/front}/Api/types.d.ts +0 -0
|
@@ -0,0 +1,165 @@
|
|
|
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
|
+
author?: string | undefined;
|
|
7
|
+
scope: "local";
|
|
8
|
+
}, {
|
|
9
|
+
author?: string | undefined;
|
|
10
|
+
scope: "local";
|
|
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
|
+
author?: string | undefined;
|
|
24
|
+
scope: "local";
|
|
25
|
+
}, {
|
|
26
|
+
author?: string | undefined;
|
|
27
|
+
scope: "local";
|
|
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
|
+
author?: string | undefined;
|
|
42
|
+
scope: "local";
|
|
43
|
+
}, {
|
|
44
|
+
author?: string | undefined;
|
|
45
|
+
scope: "local";
|
|
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
|
+
author?: string | undefined;
|
|
57
|
+
scope: "local";
|
|
58
|
+
} | {
|
|
59
|
+
scope: "bubble";
|
|
60
|
+
};
|
|
61
|
+
}, {
|
|
62
|
+
message: string;
|
|
63
|
+
options: {
|
|
64
|
+
author?: string | undefined;
|
|
65
|
+
scope: "local";
|
|
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
|
+
color?: string | undefined;
|
|
79
|
+
name: string;
|
|
80
|
+
active: boolean;
|
|
81
|
+
isMe: boolean;
|
|
82
|
+
jid: string;
|
|
83
|
+
isMember: boolean;
|
|
84
|
+
}, {
|
|
85
|
+
color?: string | undefined;
|
|
86
|
+
name: string;
|
|
87
|
+
active: boolean;
|
|
88
|
+
isMe: boolean;
|
|
89
|
+
jid: string;
|
|
90
|
+
isMember: boolean;
|
|
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
|
+
type: z.ZodNativeEnum<typeof ChatMessageTypes>;
|
|
103
|
+
date: z.ZodDate;
|
|
104
|
+
author: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
105
|
+
name: z.ZodString;
|
|
106
|
+
active: z.ZodBoolean;
|
|
107
|
+
isMe: z.ZodBoolean;
|
|
108
|
+
jid: z.ZodString;
|
|
109
|
+
isMember: z.ZodBoolean;
|
|
110
|
+
color: z.ZodOptional<z.ZodString>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
color?: string | undefined;
|
|
113
|
+
name: string;
|
|
114
|
+
active: boolean;
|
|
115
|
+
isMe: boolean;
|
|
116
|
+
jid: string;
|
|
117
|
+
isMember: boolean;
|
|
118
|
+
}, {
|
|
119
|
+
color?: string | undefined;
|
|
120
|
+
name: string;
|
|
121
|
+
active: boolean;
|
|
122
|
+
isMe: boolean;
|
|
123
|
+
jid: string;
|
|
124
|
+
isMember: boolean;
|
|
125
|
+
}>>>;
|
|
126
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
127
|
+
targets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNullable<z.ZodString>, "many">>>;
|
|
128
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
author?: {
|
|
131
|
+
color?: string | undefined;
|
|
132
|
+
name: string;
|
|
133
|
+
active: boolean;
|
|
134
|
+
isMe: boolean;
|
|
135
|
+
jid: string;
|
|
136
|
+
isMember: boolean;
|
|
137
|
+
} | null | undefined;
|
|
138
|
+
text?: string[] | null | undefined;
|
|
139
|
+
name?: string | null | undefined;
|
|
140
|
+
targets?: (string | null)[] | null | undefined;
|
|
141
|
+
type: ChatMessageTypes;
|
|
142
|
+
date: Date;
|
|
143
|
+
}, {
|
|
144
|
+
author?: {
|
|
145
|
+
color?: string | undefined;
|
|
146
|
+
name: string;
|
|
147
|
+
active: boolean;
|
|
148
|
+
isMe: boolean;
|
|
149
|
+
jid: string;
|
|
150
|
+
isMember: boolean;
|
|
151
|
+
} | null | undefined;
|
|
152
|
+
text?: string[] | null | undefined;
|
|
153
|
+
name?: string | null | undefined;
|
|
154
|
+
targets?: (string | null)[] | null | undefined;
|
|
155
|
+
type: ChatMessageTypes;
|
|
156
|
+
date: Date;
|
|
157
|
+
}>;
|
|
158
|
+
export type ChatMessage = z.infer<typeof isChatMessage>;
|
|
159
|
+
/**
|
|
160
|
+
* A message sent from the iFrame to the game to add a message in the chat.
|
|
161
|
+
*/
|
|
162
|
+
export type ChatEvent = z.infer<typeof isChatEvent>;
|
|
163
|
+
export type SendLocalChatMessageOptions = z.infer<typeof isSendLocalChatMessageOptions>;
|
|
164
|
+
export type SendBubbleChatMessageOptions = z.infer<typeof isSendBubbleChatMessageOptions>;
|
|
165
|
+
export type SendChatMessageOptions = z.infer<typeof isSendChatMessageOptions>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const isGameStateEvent: z.ZodObject<{
|
|
3
3
|
roomId: z.ZodString;
|
|
4
|
+
hashParameters: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
4
5
|
mapUrl: z.ZodString;
|
|
5
6
|
nickname: z.ZodString;
|
|
6
7
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -15,35 +16,37 @@ export declare const isGameStateEvent: z.ZodObject<{
|
|
|
15
16
|
iframeId: z.ZodOptional<z.ZodString>;
|
|
16
17
|
isLogged: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
17
18
|
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
metadata?: unknown;
|
|
20
|
+
variables?: unknown;
|
|
21
|
+
userRoomToken?: string | undefined;
|
|
22
|
+
uuid?: string | undefined;
|
|
18
23
|
language?: string | undefined;
|
|
19
24
|
playerId?: number | undefined;
|
|
20
|
-
uuid?: string | undefined;
|
|
21
25
|
startLayerName?: string | undefined;
|
|
22
|
-
variables?: unknown;
|
|
23
26
|
playerVariables?: unknown;
|
|
24
|
-
userRoomToken?: string | undefined;
|
|
25
|
-
metadata?: unknown;
|
|
26
27
|
iframeId?: string | undefined;
|
|
28
|
+
tags: string[];
|
|
27
29
|
roomId: string;
|
|
30
|
+
isLogged: boolean;
|
|
28
31
|
mapUrl: string;
|
|
32
|
+
hashParameters: Record<string, string>;
|
|
29
33
|
nickname: string;
|
|
30
|
-
tags: string[];
|
|
31
|
-
isLogged: boolean;
|
|
32
34
|
}, {
|
|
35
|
+
metadata?: unknown;
|
|
36
|
+
variables?: unknown;
|
|
37
|
+
userRoomToken?: string | undefined;
|
|
38
|
+
isLogged?: boolean | undefined;
|
|
39
|
+
uuid?: string | undefined;
|
|
33
40
|
language?: string | undefined;
|
|
34
41
|
playerId?: number | undefined;
|
|
35
|
-
uuid?: string | undefined;
|
|
36
42
|
startLayerName?: string | undefined;
|
|
37
|
-
variables?: unknown;
|
|
38
43
|
playerVariables?: unknown;
|
|
39
|
-
userRoomToken?: string | undefined;
|
|
40
|
-
metadata?: unknown;
|
|
41
44
|
iframeId?: string | undefined;
|
|
42
|
-
|
|
45
|
+
tags: string[];
|
|
43
46
|
roomId: string;
|
|
44
47
|
mapUrl: string;
|
|
48
|
+
hashParameters: Record<string, string>;
|
|
45
49
|
nickname: string;
|
|
46
|
-
tags: string[];
|
|
47
50
|
}>;
|
|
48
51
|
/**
|
|
49
52
|
* A message sent from the game to the iFrame when the gameState is received by the script
|