@workadventure/iframe-api-typings 1.20.2 → 1.21.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.
Files changed (45) hide show
  1. package/libs/shared-utils/src/Events/ChatEvent.d.ts +20 -17
  2. package/package.json +2 -2
  3. package/play/src/front/Api/Events/AddPlayerEvent.d.ts +23 -17
  4. package/play/src/front/Api/Events/AskPositionEvent.d.ts +2 -2
  5. package/play/src/front/Api/Events/CameraFollowPlayerEvent.d.ts +2 -2
  6. package/play/src/front/Api/Events/CameraSetEvent.d.ts +4 -4
  7. package/play/src/front/Api/Events/CreateDynamicAreaEvent.d.ts +4 -4
  8. package/play/src/front/Api/Events/EmbeddedWebsiteEvent.d.ts +10 -10
  9. package/play/src/front/Api/Events/GameStateEvent.d.ts +16 -16
  10. package/play/src/front/Api/Events/HasPlayerMovedEvent.d.ts +3 -3
  11. package/play/src/front/Api/Events/IframeEvent.d.ts +625 -640
  12. package/play/src/front/Api/Events/ModalEvent.d.ts +4 -4
  13. package/play/src/front/Api/Events/MovePlayerToEvent.d.ts +2 -2
  14. package/play/src/front/Api/Events/OpenCoWebsiteEvent.d.ts +4 -4
  15. package/play/src/front/Api/Events/OpenPopupEvent.d.ts +6 -6
  16. package/play/src/front/Api/Events/PlaySoundEvent.d.ts +2 -2
  17. package/play/src/front/Api/Events/ProximityMeeting/JoinProximityMeetingEvent.d.ts +21 -16
  18. package/play/src/front/Api/Events/ProximityMeeting/ParticipantProximityMeetingEvent.d.ts +21 -16
  19. package/play/src/front/Api/Events/ReceiveEventEvent.d.ts +6 -6
  20. package/play/src/front/Api/Events/SendEventEvent.d.ts +6 -6
  21. package/play/src/front/Api/Events/SetAreaPropertyEvent.d.ts +2 -2
  22. package/play/src/front/Api/Events/SetPlayerVariableEvent.d.ts +5 -5
  23. package/play/src/front/Api/Events/SetPropertyEvent.d.ts +2 -2
  24. package/play/src/front/Api/Events/SetSharedPlayerVariableEvent.d.ts +4 -4
  25. package/play/src/front/Api/Events/SetVariableEvent.d.ts +6 -6
  26. package/play/src/front/Api/Events/SettingsEvent.d.ts +3 -3
  27. package/play/src/front/Api/Events/Ui/BannerEvent.d.ts +3 -3
  28. package/play/src/front/Api/Events/Ui/ButtonActionBarEvent.d.ts +2 -2
  29. package/play/src/front/Api/Events/Ui/MenuEvents.d.ts +4 -4
  30. package/play/src/front/Api/Events/Ui/UIWebsiteEvent.d.ts +35 -35
  31. package/play/src/front/Api/Events/UserInputChatEvent.d.ts +2 -2
  32. package/play/src/front/Api/Iframe/AbstractEvent.d.ts +2 -2
  33. package/play/src/front/Api/Iframe/AbstractState.d.ts +1 -1
  34. package/play/src/front/Api/Iframe/Player/ProximityMeeting.d.ts +25 -20
  35. package/play/src/front/Api/Iframe/Ui/Modal.d.ts +2 -2
  36. package/play/src/front/Api/Iframe/chat.d.ts +1 -1
  37. package/play/src/front/Api/Iframe/event.d.ts +1 -1
  38. package/play/src/front/Api/Iframe/mapEditor.d.ts +37 -0
  39. package/play/src/front/Api/Iframe/player.d.ts +2 -2
  40. package/play/src/front/Api/Iframe/playerState.d.ts +1 -1
  41. package/play/src/front/Api/Iframe/players.d.ts +11 -9
  42. package/play/src/front/Api/Iframe/state.d.ts +1 -1
  43. package/play/src/front/Api/Iframe/ui.d.ts +5 -4
  44. package/play/src/iframe_api.d.ts +1 -0
  45. package/play/src/front/Api/Events/NotificationEvent.d.ts +0 -18
@@ -3,11 +3,11 @@ export declare const isSendLocalChatMessageOptions: z.ZodObject<{
3
3
  scope: z.ZodLiteral<"local">;
4
4
  author: z.ZodOptional<z.ZodString>;
5
5
  }, "strip", z.ZodTypeAny, {
6
- author?: string | undefined;
7
6
  scope: "local";
8
- }, {
9
7
  author?: string | undefined;
8
+ }, {
10
9
  scope: "local";
10
+ author?: string | undefined;
11
11
  }>;
12
12
  export declare const isSendBubbleChatMessageOptions: z.ZodObject<{
13
13
  scope: z.ZodLiteral<"bubble">;
@@ -20,11 +20,11 @@ export declare const isSendChatMessageOptions: z.ZodUnion<[z.ZodObject<{
20
20
  scope: z.ZodLiteral<"local">;
21
21
  author: z.ZodOptional<z.ZodString>;
22
22
  }, "strip", z.ZodTypeAny, {
23
- author?: string | undefined;
24
23
  scope: "local";
25
- }, {
26
24
  author?: string | undefined;
25
+ }, {
27
26
  scope: "local";
27
+ author?: string | undefined;
28
28
  }>, z.ZodObject<{
29
29
  scope: z.ZodLiteral<"bubble">;
30
30
  }, "strip", z.ZodTypeAny, {
@@ -38,11 +38,11 @@ export declare const isChatEvent: z.ZodObject<{
38
38
  scope: z.ZodLiteral<"local">;
39
39
  author: z.ZodOptional<z.ZodString>;
40
40
  }, "strip", z.ZodTypeAny, {
41
- author?: string | undefined;
42
41
  scope: "local";
43
- }, {
44
42
  author?: string | undefined;
43
+ }, {
45
44
  scope: "local";
45
+ author?: string | undefined;
46
46
  }>, z.ZodObject<{
47
47
  scope: z.ZodLiteral<"bubble">;
48
48
  }, "strip", z.ZodTypeAny, {
@@ -53,16 +53,16 @@ export declare const isChatEvent: z.ZodObject<{
53
53
  }, "strip", z.ZodTypeAny, {
54
54
  message: string;
55
55
  options: {
56
- author?: string | undefined;
57
56
  scope: "local";
57
+ author?: string | undefined;
58
58
  } | {
59
59
  scope: "bubble";
60
60
  };
61
61
  }, {
62
62
  message: string;
63
63
  options: {
64
- author?: string | undefined;
65
64
  scope: "local";
65
+ author?: string | undefined;
66
66
  } | {
67
67
  scope: "bubble";
68
68
  };
@@ -75,19 +75,19 @@ export declare const isAuthor: z.ZodObject<{
75
75
  isMember: z.ZodBoolean;
76
76
  color: z.ZodOptional<z.ZodString>;
77
77
  }, "strip", z.ZodTypeAny, {
78
- color?: string | undefined;
79
78
  name: string;
80
79
  active: boolean;
81
80
  isMe: boolean;
82
81
  jid: string;
83
82
  isMember: boolean;
84
- }, {
85
83
  color?: string | undefined;
84
+ }, {
86
85
  name: string;
87
86
  active: boolean;
88
87
  isMe: boolean;
89
88
  jid: string;
90
89
  isMember: boolean;
90
+ color?: string | undefined;
91
91
  }>;
92
92
  export declare enum ChatMessageTypes {
93
93
  text = 1,
@@ -99,6 +99,7 @@ export declare enum ChatMessageTypes {
99
99
  }
100
100
  export declare const isChatMessageTypes: z.ZodNativeEnum<typeof ChatMessageTypes>;
101
101
  export declare const isChatMessage: z.ZodObject<{
102
+ id: z.ZodOptional<z.ZodString>;
102
103
  type: z.ZodNativeEnum<typeof ChatMessageTypes>;
103
104
  date: z.ZodDate;
104
105
  author: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -109,51 +110,53 @@ export declare const isChatMessage: z.ZodObject<{
109
110
  isMember: z.ZodBoolean;
110
111
  color: z.ZodOptional<z.ZodString>;
111
112
  }, "strip", z.ZodTypeAny, {
112
- color?: string | undefined;
113
113
  name: string;
114
114
  active: boolean;
115
115
  isMe: boolean;
116
116
  jid: string;
117
117
  isMember: boolean;
118
- }, {
119
118
  color?: string | undefined;
119
+ }, {
120
120
  name: string;
121
121
  active: boolean;
122
122
  isMe: boolean;
123
123
  jid: string;
124
124
  isMember: boolean;
125
+ color?: string | undefined;
125
126
  }>>>;
126
127
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
128
  targets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNullable<z.ZodString>, "many">>>;
128
129
  text: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
129
130
  }, "strip", z.ZodTypeAny, {
131
+ type: ChatMessageTypes;
132
+ date: Date;
130
133
  author?: {
131
- color?: string | undefined;
132
134
  name: string;
133
135
  active: boolean;
134
136
  isMe: boolean;
135
137
  jid: string;
136
138
  isMember: boolean;
139
+ color?: string | undefined;
137
140
  } | null | undefined;
138
141
  text?: string[] | null | undefined;
139
142
  name?: string | null | undefined;
143
+ id?: string | undefined;
140
144
  targets?: (string | null)[] | null | undefined;
145
+ }, {
141
146
  type: ChatMessageTypes;
142
147
  date: Date;
143
- }, {
144
148
  author?: {
145
- color?: string | undefined;
146
149
  name: string;
147
150
  active: boolean;
148
151
  isMe: boolean;
149
152
  jid: string;
150
153
  isMember: boolean;
154
+ color?: string | undefined;
151
155
  } | null | undefined;
152
156
  text?: string[] | null | undefined;
153
157
  name?: string | null | undefined;
158
+ id?: string | undefined;
154
159
  targets?: (string | null)[] | null | undefined;
155
- type: ChatMessageTypes;
156
- date: Date;
157
160
  }>;
158
161
  export type ChatMessage = z.infer<typeof isChatMessage>;
159
162
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workadventure/iframe-api-typings",
3
- "version": "v1.20.2",
3
+ "version": "v1.21.0",
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.14.3"
15
+ "zod": "^3.23.8"
16
16
  }
17
17
  }
@@ -16,33 +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
- outlineColor?: number | undefined;
21
21
  name: string;
22
- availabilityStatus: string;
23
22
  position: {
24
23
  x: number;
25
24
  y: number;
26
25
  };
27
- userUuid: string;
28
- variables: Map<string, unknown>;
29
26
  playerId: number;
30
- }, {
27
+ variables: Map<string, unknown>;
28
+ userUuid: string;
29
+ availabilityStatus: string;
31
30
  outlineColor?: number | undefined;
31
+ chatID?: string | null | undefined;
32
+ }, {
32
33
  name: string;
33
- availabilityStatus: string;
34
34
  position: {
35
35
  x: number;
36
36
  y: number;
37
37
  };
38
- userUuid: string;
39
- variables: Map<string, unknown>;
40
38
  playerId: number;
39
+ variables: Map<string, unknown>;
40
+ userUuid: string;
41
+ availabilityStatus: string;
42
+ outlineColor?: number | undefined;
43
+ chatID?: string | null | undefined;
41
44
  }>;
42
45
  export declare const isRemotePlayerChangedEvent: z.ZodObject<{
43
46
  name: z.ZodOptional<z.ZodString>;
44
- outlineColor: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
45
- availabilityStatus: z.ZodOptional<z.ZodString>;
46
47
  position: z.ZodOptional<z.ZodObject<{
47
48
  x: z.ZodNumber;
48
49
  y: z.ZodNumber;
@@ -53,28 +54,33 @@ export declare const isRemotePlayerChangedEvent: z.ZodObject<{
53
54
  x: number;
54
55
  y: number;
55
56
  }>>;
56
- variables: z.ZodOptional<z.ZodMap<z.ZodString, z.ZodUnknown>>;
57
57
  playerId: z.ZodNumber;
58
+ variables: z.ZodOptional<z.ZodMap<z.ZodString, z.ZodUnknown>>;
59
+ availabilityStatus: z.ZodOptional<z.ZodString>;
60
+ outlineColor: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
61
+ chatID: z.ZodNullable<z.ZodOptional<z.ZodString>>;
58
62
  }, "strip", z.ZodTypeAny, {
63
+ playerId: number;
59
64
  name?: string | undefined;
60
- outlineColor?: number | undefined;
61
- availabilityStatus?: string | undefined;
62
65
  position?: {
63
66
  x: number;
64
67
  y: number;
65
68
  } | undefined;
66
69
  variables?: Map<string, unknown> | undefined;
67
- playerId: number;
70
+ availabilityStatus?: string | undefined;
71
+ outlineColor?: number | undefined;
72
+ chatID?: string | null | undefined;
68
73
  }, {
74
+ playerId: number;
69
75
  name?: string | undefined;
70
- outlineColor?: number | undefined;
71
- availabilityStatus?: string | undefined;
72
76
  position?: {
73
77
  x: number;
74
78
  y: number;
75
79
  } | undefined;
76
80
  variables?: Map<string, unknown> | undefined;
77
- playerId: number;
81
+ availabilityStatus?: string | undefined;
82
+ outlineColor?: number | undefined;
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
@@ -3,11 +3,11 @@ export declare const isAskPositionEvent: z.ZodObject<{
3
3
  uuid: z.ZodString;
4
4
  playUri: z.ZodString;
5
5
  }, "strip", z.ZodTypeAny, {
6
- playUri: string;
7
6
  uuid: string;
8
- }, {
9
7
  playUri: string;
8
+ }, {
10
9
  uuid: string;
10
+ playUri: string;
11
11
  }>;
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.
@@ -3,11 +3,11 @@ export declare const isCameraFollowPlayerEvent: z.ZodObject<{
3
3
  smooth: z.ZodBoolean;
4
4
  duration: z.ZodOptional<z.ZodNumber>;
5
5
  }, "strip", z.ZodTypeAny, {
6
- duration?: number | undefined;
7
6
  smooth: boolean;
8
- }, {
9
7
  duration?: number | undefined;
8
+ }, {
10
9
  smooth: boolean;
10
+ duration?: number | undefined;
11
11
  }>;
12
12
  /**
13
13
  * A message sent from the iFrame to the game to make the camera follow player.
@@ -8,21 +8,21 @@ export declare const isCameraSetEvent: z.ZodObject<{
8
8
  smooth: z.ZodBoolean;
9
9
  duration: z.ZodOptional<z.ZodNumber>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- height?: number | undefined;
12
- width?: number | undefined;
13
- duration?: number | undefined;
14
11
  x: number;
15
12
  y: number;
16
13
  lock: boolean;
17
14
  smooth: boolean;
18
- }, {
19
15
  height?: number | undefined;
20
16
  width?: number | undefined;
21
17
  duration?: number | undefined;
18
+ }, {
22
19
  x: number;
23
20
  y: number;
24
21
  lock: boolean;
25
22
  smooth: boolean;
23
+ height?: number | undefined;
24
+ width?: number | undefined;
25
+ duration?: number | undefined;
26
26
  }>;
27
27
  /**
28
28
  * A message sent from the iFrame to the game to change the camera position.
@@ -6,17 +6,17 @@ export declare const isDynamicAreaEvent: z.ZodObject<{
6
6
  width: z.ZodOptional<z.ZodNumber>;
7
7
  height: z.ZodOptional<z.ZodNumber>;
8
8
  }, "strip", z.ZodTypeAny, {
9
+ name: string;
9
10
  height?: number | undefined;
10
11
  width?: number | undefined;
11
12
  x?: number | undefined;
12
13
  y?: number | undefined;
13
- name: string;
14
14
  }, {
15
+ name: string;
15
16
  height?: number | undefined;
16
17
  width?: number | undefined;
17
18
  x?: number | undefined;
18
19
  y?: 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
@@ -31,14 +31,14 @@ export declare const isCreateDynamicAreaEvent: z.ZodObject<{
31
31
  }, "strip", z.ZodTypeAny, {
32
32
  height: number;
33
33
  width: number;
34
+ name: string;
34
35
  x: number;
35
36
  y: number;
36
- name: string;
37
37
  }, {
38
38
  height: number;
39
39
  width: number;
40
+ name: string;
40
41
  x: number;
41
42
  y: number;
42
- name: string;
43
43
  }>;
44
44
  export type CreateDynamicAreaEvent = z.infer<typeof isCreateDynamicAreaEvent>;
@@ -29,29 +29,29 @@ export declare const isEmbeddedWebsiteEvent: z.ZodObject<{
29
29
  origin: z.ZodOptional<z.ZodEnum<["player", "map"]>>;
30
30
  scale: z.ZodOptional<z.ZodNumber>;
31
31
  }, "strip", z.ZodTypeAny, {
32
+ name: string;
32
33
  url?: string | undefined;
33
34
  height?: number | undefined;
34
35
  width?: number | undefined;
36
+ allowApi?: boolean | undefined;
35
37
  x?: number | undefined;
36
38
  y?: number | undefined;
37
- allowApi?: boolean | undefined;
38
39
  visible?: boolean | undefined;
39
40
  allow?: string | undefined;
40
41
  origin?: "map" | "player" | undefined;
41
42
  scale?: number | undefined;
42
- name: string;
43
43
  }, {
44
+ name: string;
44
45
  url?: string | undefined;
45
46
  height?: number | undefined;
46
47
  width?: number | undefined;
48
+ allowApi?: boolean | undefined;
47
49
  x?: number | undefined;
48
50
  y?: number | undefined;
49
- allowApi?: boolean | undefined;
50
51
  visible?: boolean | undefined;
51
52
  allow?: string | undefined;
52
53
  origin?: "map" | "player" | undefined;
53
54
  scale?: number | undefined;
54
- name: string;
55
55
  }>;
56
56
  /**
57
57
  * A message sent from the iFrame to the game to modify an embedded website
@@ -82,11 +82,6 @@ export declare const isCreateEmbeddedWebsiteEvent: z.ZodObject<{
82
82
  origin: z.ZodOptional<z.ZodEnum<["player", "map"]>>;
83
83
  scale: z.ZodOptional<z.ZodNumber>;
84
84
  }, "strip", z.ZodTypeAny, {
85
- allowApi?: boolean | undefined;
86
- visible?: boolean | undefined;
87
- allow?: string | undefined;
88
- origin?: "map" | "player" | undefined;
89
- scale?: number | undefined;
90
85
  url: string;
91
86
  name: string;
92
87
  position: {
@@ -95,12 +90,12 @@ export declare const isCreateEmbeddedWebsiteEvent: z.ZodObject<{
95
90
  x: number;
96
91
  y: number;
97
92
  };
98
- }, {
99
93
  allowApi?: boolean | undefined;
100
94
  visible?: boolean | undefined;
101
95
  allow?: string | undefined;
102
96
  origin?: "map" | "player" | undefined;
103
97
  scale?: number | undefined;
98
+ }, {
104
99
  url: string;
105
100
  name: string;
106
101
  position: {
@@ -109,5 +104,10 @@ export declare const isCreateEmbeddedWebsiteEvent: z.ZodObject<{
109
104
  x: number;
110
105
  y: number;
111
106
  };
107
+ allowApi?: boolean | undefined;
108
+ visible?: boolean | undefined;
109
+ allow?: string | undefined;
110
+ origin?: "map" | "player" | undefined;
111
+ scale?: number | undefined;
112
112
  }>;
113
113
  export type CreateEmbeddedWebsiteEvent = z.infer<typeof isCreateEmbeddedWebsiteEvent>;
@@ -16,37 +16,37 @@ export declare const isGameStateEvent: z.ZodObject<{
16
16
  iframeId: z.ZodOptional<z.ZodString>;
17
17
  isLogged: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
18
18
  }, "strip", z.ZodTypeAny, {
19
- metadata?: unknown;
19
+ roomId: string;
20
+ hashParameters: Record<string, string>;
21
+ mapUrl: string;
22
+ nickname: string;
23
+ tags: string[];
24
+ isLogged: boolean;
20
25
  uuid?: string | undefined;
21
- variables?: unknown;
22
- userRoomToken?: string | undefined;
23
26
  language?: string | undefined;
24
27
  playerId?: number | undefined;
25
28
  startLayerName?: string | undefined;
29
+ variables?: unknown;
26
30
  playerVariables?: unknown;
31
+ userRoomToken?: string | undefined;
32
+ metadata?: unknown;
27
33
  iframeId?: string | undefined;
28
- tags: string[];
34
+ }, {
29
35
  roomId: string;
30
- isLogged: boolean;
31
- mapUrl: string;
32
36
  hashParameters: Record<string, string>;
37
+ mapUrl: string;
33
38
  nickname: string;
34
- }, {
35
- metadata?: unknown;
39
+ tags: string[];
36
40
  uuid?: string | undefined;
37
- variables?: unknown;
38
- userRoomToken?: string | undefined;
39
- isLogged?: boolean | undefined;
40
41
  language?: string | undefined;
41
42
  playerId?: number | undefined;
42
43
  startLayerName?: string | undefined;
44
+ variables?: unknown;
43
45
  playerVariables?: unknown;
46
+ userRoomToken?: string | undefined;
47
+ metadata?: unknown;
44
48
  iframeId?: string | undefined;
45
- tags: string[];
46
- roomId: string;
47
- mapUrl: string;
48
- hashParameters: Record<string, string>;
49
- nickname: string;
49
+ isLogged?: boolean | undefined;
50
50
  }>;
51
51
  /**
52
52
  * A message sent from the game to the iFrame when the gameState is received by the script
@@ -7,19 +7,19 @@ export declare const isHasPlayerMovedEvent: z.ZodObject<{
7
7
  oldX: z.ZodOptional<z.ZodNumber>;
8
8
  oldY: z.ZodOptional<z.ZodNumber>;
9
9
  }, "strip", z.ZodTypeAny, {
10
- oldX?: number | undefined;
11
- oldY?: number | undefined;
12
10
  x: number;
13
11
  y: number;
14
12
  direction: "left" | "right" | "up" | "down";
15
13
  moving: boolean;
16
- }, {
17
14
  oldX?: number | undefined;
18
15
  oldY?: number | undefined;
16
+ }, {
19
17
  x: number;
20
18
  y: number;
21
19
  direction: "left" | "right" | "up" | "down";
22
20
  moving: boolean;
21
+ oldX?: number | undefined;
22
+ oldY?: number | undefined;
23
23
  }>;
24
24
  /**
25
25
  * A message sent from the game to the iFrame to notify a movement from the current player.