@workadventure/iframe-api-typings 1.11.4 → 1.12.1

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.
Files changed (62) hide show
  1. package/Api/Events/AddPlayerEvent.d.ts +86 -0
  2. package/Api/Events/AskPositionEvent.d.ts +15 -0
  3. package/Api/Events/ChatEvent.d.ts +29 -0
  4. package/Api/Events/ChatVisibilityEvent.d.ts +9 -0
  5. package/Api/Events/EnablePlayersTrackingEvent.d.ts +15 -0
  6. package/Api/Events/GameStateEvent.d.ts +6 -0
  7. package/Api/Events/IframeEvent.d.ts +1120 -93
  8. package/Api/Events/JoinMucEvent.d.ts +21 -0
  9. package/Api/Events/LeaveMucEvent.d.ts +12 -0
  10. package/Api/Events/NotificationEvent.d.ts +18 -0
  11. package/Api/Events/ProximityMeeting/JoinProximityMeetingEvent.d.ts +70 -0
  12. package/Api/Events/ProximityMeeting/ParticipantProximityMeetingEvent.d.ts +70 -0
  13. package/Api/Events/SetPlayerVariableEvent.d.ts +27 -0
  14. package/Api/Events/SetSharedPlayerVariableEvent.d.ts +18 -0
  15. package/Api/Events/SetVariableEvent.d.ts +1 -9
  16. package/Api/Events/SettingsEvent.d.ts +12 -0
  17. package/Api/Events/ShowBusinessCardEvent.d.ts +12 -0
  18. package/Api/Events/{ui → Ui}/MenuItemClickedEvent.d.ts +0 -0
  19. package/Api/Events/{ui → Ui}/MenuRegisterEvent.d.ts +0 -0
  20. package/Api/Events/{ui → Ui}/TriggerActionMessageEvent.d.ts +0 -0
  21. package/Api/Events/{ui → Ui}/UIWebsite.d.ts +0 -0
  22. package/Api/Iframe/AbstractState.d.ts +14 -0
  23. package/Api/{iframe → Iframe}/Area/Area.d.ts +1 -1
  24. package/Api/{iframe → Iframe}/IframeApiContribution.d.ts +0 -0
  25. package/Api/Iframe/Player/ProximityMeeting.d.ts +85 -0
  26. package/Api/Iframe/Players/RemotePlayer.d.ts +81 -0
  27. package/Api/{iframe → Iframe}/Room/EmbeddedWebsite.d.ts +0 -0
  28. package/Api/Iframe/Sound/Sound.d.ts +43 -0
  29. package/Api/{iframe → Iframe}/Ui/ActionMessage.d.ts +0 -0
  30. package/Api/{iframe → Iframe}/Ui/ButtonDescriptor.d.ts +0 -0
  31. package/Api/{iframe → Iframe}/Ui/Menu.d.ts +0 -0
  32. package/Api/{iframe → Iframe}/Ui/Popup.d.ts +0 -0
  33. package/Api/{iframe → Iframe}/Ui/UIWebsite.d.ts +14 -1
  34. package/Api/Iframe/area.d.ts +59 -0
  35. package/Api/Iframe/camera.d.ts +46 -0
  36. package/Api/Iframe/chat.d.ts +36 -0
  37. package/Api/Iframe/controls.d.ts +56 -0
  38. package/Api/Iframe/nav.d.ts +58 -0
  39. package/Api/Iframe/player.d.ts +141 -0
  40. package/Api/Iframe/playerState.d.ts +20 -0
  41. package/Api/Iframe/players.d.ts +135 -0
  42. package/Api/{iframe → Iframe}/registeredCallbacks.d.ts +2 -2
  43. package/Api/Iframe/room.d.ts +128 -0
  44. package/Api/Iframe/sound.d.ts +21 -0
  45. package/Api/Iframe/state.d.ts +15 -0
  46. package/Api/{iframe → Iframe}/ui.d.ts +44 -15
  47. package/Api/Iframe/website.d.ts +32 -0
  48. package/iframe_api.d.ts +38 -19
  49. package/package.json +3 -2
  50. package/Api/Events/RemotePlayerClickedEvent.d.ts +0 -19
  51. package/Api/iframe/Sound/Sound.d.ts +0 -8
  52. package/Api/iframe/area.d.ts +0 -25
  53. package/Api/iframe/camera.d.ts +0 -20
  54. package/Api/iframe/chat.d.ts +0 -16
  55. package/Api/iframe/controls.d.ts +0 -10
  56. package/Api/iframe/nav.d.ts +0 -20
  57. package/Api/iframe/player.d.ts +0 -43
  58. package/Api/iframe/room.d.ts +0 -58
  59. package/Api/iframe/sound.d.ts +0 -8
  60. package/Api/iframe/state.d.ts +0 -25
  61. package/Api/iframe/website.d.ts +0 -11
  62. package/Phaser/Map/ITiledMap.d.ts +0 -170
@@ -0,0 +1,86 @@
1
+ import { z } from "zod";
2
+ export declare const isAddPlayerEvent: z.ZodObject<{
3
+ playerId: z.ZodNumber;
4
+ name: z.ZodString;
5
+ userUuid: z.ZodString;
6
+ availabilityStatus: z.ZodString;
7
+ outlineColor: z.ZodOptional<z.ZodNumber>;
8
+ position: z.ZodObject<{
9
+ x: z.ZodNumber;
10
+ y: z.ZodNumber;
11
+ }, "strip", z.ZodTypeAny, {
12
+ x: number;
13
+ y: number;
14
+ }, {
15
+ x: number;
16
+ y: number;
17
+ }>;
18
+ variables: z.ZodMap<z.ZodString, z.ZodUnknown>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ outlineColor?: number | undefined;
21
+ position: {
22
+ x: number;
23
+ y: number;
24
+ };
25
+ name: string;
26
+ playerId: number;
27
+ variables: Map<string, unknown>;
28
+ userUuid: string;
29
+ availabilityStatus: string;
30
+ }, {
31
+ outlineColor?: number | undefined;
32
+ position: {
33
+ x: number;
34
+ y: number;
35
+ };
36
+ name: string;
37
+ playerId: number;
38
+ variables: Map<string, unknown>;
39
+ userUuid: string;
40
+ availabilityStatus: string;
41
+ }>;
42
+ export declare const isRemotePlayerChangedEvent: z.ZodObject<{
43
+ position: z.ZodOptional<z.ZodObject<{
44
+ x: z.ZodNumber;
45
+ y: z.ZodNumber;
46
+ }, "strip", z.ZodTypeAny, {
47
+ x: number;
48
+ y: number;
49
+ }, {
50
+ x: number;
51
+ y: number;
52
+ }>>;
53
+ name: z.ZodOptional<z.ZodString>;
54
+ playerId: z.ZodNumber;
55
+ variables: z.ZodOptional<z.ZodMap<z.ZodString, z.ZodUnknown>>;
56
+ availabilityStatus: z.ZodOptional<z.ZodString>;
57
+ outlineColor: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ position?: {
60
+ x: number;
61
+ y: number;
62
+ } | undefined;
63
+ name?: string | undefined;
64
+ variables?: Map<string, unknown> | undefined;
65
+ availabilityStatus?: string | undefined;
66
+ outlineColor?: number | undefined;
67
+ playerId: number;
68
+ }, {
69
+ position?: {
70
+ x: number;
71
+ y: number;
72
+ } | undefined;
73
+ name?: string | undefined;
74
+ variables?: Map<string, unknown> | undefined;
75
+ availabilityStatus?: string | undefined;
76
+ outlineColor?: number | undefined;
77
+ playerId: number;
78
+ }>;
79
+ /**
80
+ * A message sent from the game to the iFrame to notify a new player arrived in our viewport
81
+ */
82
+ export declare type AddPlayerEvent = z.infer<typeof isAddPlayerEvent>;
83
+ /**
84
+ * A message sent from the game to the iFrame to notify a player has changed (moved / changed name, etc...)
85
+ */
86
+ export declare type RemotePlayerChangedEvent = z.infer<typeof isRemotePlayerChangedEvent>;
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+ export declare const isAskPositionEvent: z.ZodObject<{
3
+ uuid: z.ZodString;
4
+ playUri: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ uuid: string;
7
+ playUri: string;
8
+ }, {
9
+ uuid: string;
10
+ playUri: string;
11
+ }>;
12
+ /**
13
+ * A message sent from the iFrame to the game to ask the position of the user with uuid and walk to him.
14
+ */
15
+ export declare type AskPositionEvent = z.infer<typeof isAskPositionEvent>;
@@ -9,6 +9,35 @@ export declare const isChatEvent: z.ZodObject<{
9
9
  message: string;
10
10
  author: string;
11
11
  }>;
12
+ export declare enum ChatMessageTypes {
13
+ text = 1,
14
+ me = 2,
15
+ userIncoming = 3,
16
+ userOutcoming = 4,
17
+ userWriting = 5,
18
+ userStopWriting = 6
19
+ }
20
+ export declare const isChatMessageTypes: z.ZodNativeEnum<typeof ChatMessageTypes>;
21
+ export declare const isChatMessage: z.ZodObject<{
22
+ type: z.ZodNativeEnum<typeof ChatMessageTypes>;
23
+ date: z.ZodDate;
24
+ author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ targets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNullable<z.ZodString>, "many">>>;
26
+ text: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNullable<z.ZodString>, "many">>>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ author?: string | null | undefined;
29
+ text?: (string | null)[] | null | undefined;
30
+ targets?: (string | null)[] | null | undefined;
31
+ type: ChatMessageTypes;
32
+ date: Date;
33
+ }, {
34
+ author?: string | null | undefined;
35
+ text?: (string | null)[] | null | undefined;
36
+ targets?: (string | null)[] | null | undefined;
37
+ type: ChatMessageTypes;
38
+ date: Date;
39
+ }>;
40
+ export declare type ChatMessage = z.infer<typeof isChatMessage>;
12
41
  /**
13
42
  * A message sent from the iFrame to the game to add a message in the chat.
14
43
  */
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+ export declare const isChatVisibilityEvent: z.ZodObject<{
3
+ visibility: z.ZodBoolean;
4
+ }, "strip", z.ZodTypeAny, {
5
+ visibility: boolean;
6
+ }, {
7
+ visibility: boolean;
8
+ }>;
9
+ export declare type ChatVisibilityEvent = z.infer<typeof isChatVisibilityEvent>;
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+ export declare const isEnablePlayersTrackingEvent: z.ZodObject<{
3
+ players: z.ZodBoolean;
4
+ movement: z.ZodBoolean;
5
+ }, "strip", z.ZodTypeAny, {
6
+ players: boolean;
7
+ movement: boolean;
8
+ }, {
9
+ players: boolean;
10
+ movement: boolean;
11
+ }>;
12
+ /**
13
+ * A message sent from the game to the iFrame to notify the game that the iframe is interested in tracking users.
14
+ */
15
+ export declare type EnablePlayersTrackingEvent = z.infer<typeof isEnablePlayersTrackingEvent>;
@@ -4,30 +4,36 @@ export declare const isGameStateEvent: z.ZodObject<{
4
4
  mapUrl: z.ZodString;
5
5
  nickname: z.ZodString;
6
6
  language: z.ZodOptional<z.ZodString>;
7
+ playerId: z.ZodOptional<z.ZodNumber>;
7
8
  uuid: z.ZodOptional<z.ZodString>;
8
9
  startLayerName: z.ZodOptional<z.ZodString>;
9
10
  tags: z.ZodArray<z.ZodString, "many">;
10
11
  variables: z.ZodUnknown;
11
12
  playerVariables: z.ZodUnknown;
12
13
  userRoomToken: z.ZodOptional<z.ZodString>;
14
+ metadata: z.ZodOptional<z.ZodUnknown>;
13
15
  }, "strip", z.ZodTypeAny, {
14
16
  language?: string | undefined;
17
+ playerId?: number | undefined;
15
18
  uuid?: string | undefined;
16
19
  startLayerName?: string | undefined;
17
20
  variables?: unknown;
18
21
  playerVariables?: unknown;
19
22
  userRoomToken?: string | undefined;
23
+ metadata?: unknown;
20
24
  roomId: string;
21
25
  mapUrl: string;
22
26
  nickname: string;
23
27
  tags: string[];
24
28
  }, {
25
29
  language?: string | undefined;
30
+ playerId?: number | undefined;
26
31
  uuid?: string | undefined;
27
32
  startLayerName?: string | undefined;
28
33
  variables?: unknown;
29
34
  playerVariables?: unknown;
30
35
  userRoomToken?: string | undefined;
36
+ metadata?: unknown;
31
37
  roomId: string;
32
38
  mapUrl: string;
33
39
  nickname: string;