@workadventure/iframe-api-typings 1.14.3 → 1.14.7

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.
@@ -6,13 +6,13 @@ export declare const isJoinMucEvent: z.ZodObject<{
6
6
  subscribe: z.ZodBoolean;
7
7
  }, "strip", z.ZodTypeAny, {
8
8
  type: string;
9
- url: string;
10
9
  name: string;
10
+ url: string;
11
11
  subscribe: boolean;
12
12
  }, {
13
13
  type: string;
14
- url: string;
15
14
  name: string;
15
+ url: string;
16
16
  subscribe: boolean;
17
17
  }>;
18
18
  /**
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  export declare const isModalEvent: z.ZodObject<{
3
3
  src: z.ZodString;
4
4
  allow: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
5
- tiltle: z.ZodDefault<z.ZodOptional<z.ZodString>>;
5
+ title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6
6
  position: z.ZodDefault<z.ZodOptional<z.ZodEnum<["right", "left", "center"]>>>;
7
7
  allowApi: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8
8
  }, "strip", z.ZodTypeAny, {
@@ -10,12 +10,12 @@ export declare const isModalEvent: z.ZodObject<{
10
10
  position: "left" | "right" | "center";
11
11
  allow: string | null;
12
12
  src: string;
13
- tiltle: string;
13
+ title: string;
14
14
  }, {
15
15
  allowApi?: boolean | undefined;
16
16
  position?: "left" | "right" | "center" | undefined;
17
17
  allow?: string | null | undefined;
18
- tiltle?: string | undefined;
18
+ title?: string | undefined;
19
19
  src: string;
20
20
  }>;
21
21
  /**
@@ -19,22 +19,22 @@ export declare const isJoinProximityMeetingEvent: z.ZodObject<{
19
19
  variables: z.ZodMap<z.ZodString, z.ZodUnknown>;
20
20
  }, "strip", z.ZodTypeAny, {
21
21
  outlineColor?: number | undefined;
22
+ name: string;
22
23
  position: {
23
24
  x: number;
24
25
  y: number;
25
26
  };
26
- name: string;
27
27
  playerId: number;
28
28
  variables: Map<string, unknown>;
29
29
  userUuid: string;
30
30
  availabilityStatus: string;
31
31
  }, {
32
32
  outlineColor?: number | undefined;
33
+ name: string;
33
34
  position: {
34
35
  x: number;
35
36
  y: number;
36
37
  };
37
- name: string;
38
38
  playerId: number;
39
39
  variables: Map<string, unknown>;
40
40
  userUuid: string;
@@ -43,11 +43,11 @@ export declare const isJoinProximityMeetingEvent: z.ZodObject<{
43
43
  }, "strip", z.ZodTypeAny, {
44
44
  users: {
45
45
  outlineColor?: number | undefined;
46
+ name: string;
46
47
  position: {
47
48
  x: number;
48
49
  y: number;
49
50
  };
50
- name: string;
51
51
  playerId: number;
52
52
  variables: Map<string, unknown>;
53
53
  userUuid: string;
@@ -56,11 +56,11 @@ export declare const isJoinProximityMeetingEvent: z.ZodObject<{
56
56
  }, {
57
57
  users: {
58
58
  outlineColor?: number | undefined;
59
+ name: string;
59
60
  position: {
60
61
  x: number;
61
62
  y: number;
62
63
  };
63
- name: string;
64
64
  playerId: number;
65
65
  variables: Map<string, unknown>;
66
66
  userUuid: string;
@@ -19,22 +19,22 @@ export declare const isParticipantProximityMeetingEvent: z.ZodObject<{
19
19
  variables: z.ZodMap<z.ZodString, z.ZodUnknown>;
20
20
  }, "strip", z.ZodTypeAny, {
21
21
  outlineColor?: number | undefined;
22
+ name: string;
22
23
  position: {
23
24
  x: number;
24
25
  y: number;
25
26
  };
26
- name: string;
27
27
  playerId: number;
28
28
  variables: Map<string, unknown>;
29
29
  userUuid: string;
30
30
  availabilityStatus: string;
31
31
  }, {
32
32
  outlineColor?: number | undefined;
33
+ name: string;
33
34
  position: {
34
35
  x: number;
35
36
  y: number;
36
37
  };
37
- name: string;
38
38
  playerId: number;
39
39
  variables: Map<string, unknown>;
40
40
  userUuid: string;
@@ -43,11 +43,11 @@ export declare const isParticipantProximityMeetingEvent: z.ZodObject<{
43
43
  }, "strip", z.ZodTypeAny, {
44
44
  user: {
45
45
  outlineColor?: number | undefined;
46
+ name: string;
46
47
  position: {
47
48
  x: number;
48
49
  y: number;
49
50
  };
50
- name: string;
51
51
  playerId: number;
52
52
  variables: Map<string, unknown>;
53
53
  userUuid: string;
@@ -56,11 +56,11 @@ export declare const isParticipantProximityMeetingEvent: z.ZodObject<{
56
56
  }, {
57
57
  user: {
58
58
  outlineColor?: number | undefined;
59
+ name: string;
59
60
  position: {
60
61
  x: number;
61
62
  y: number;
62
63
  };
63
- name: string;
64
64
  playerId: number;
65
65
  variables: Map<string, unknown>;
66
66
  userUuid: string;
@@ -4,15 +4,21 @@ export declare const isSettingsEvent: z.ZodObject<{
4
4
  chatSounds: z.ZodBoolean;
5
5
  enableChat: z.ZodBoolean;
6
6
  enableChatUpload: z.ZodBoolean;
7
+ enableChatOnlineList: z.ZodBoolean;
8
+ enableChatDisconnectedList: z.ZodBoolean;
7
9
  }, "strip", z.ZodTypeAny, {
8
10
  notification: boolean;
9
11
  chatSounds: boolean;
10
12
  enableChat: boolean;
11
13
  enableChatUpload: boolean;
14
+ enableChatOnlineList: boolean;
15
+ enableChatDisconnectedList: boolean;
12
16
  }, {
13
17
  notification: boolean;
14
18
  chatSounds: boolean;
15
19
  enableChat: boolean;
16
20
  enableChatUpload: boolean;
21
+ enableChatOnlineList: boolean;
22
+ enableChatDisconnectedList: boolean;
17
23
  }>;
18
24
  export declare type SettingsEvent = z.infer<typeof isSettingsEvent>;
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ export declare const isAddButtonActionBarEvent: z.ZodObject<{
3
+ id: z.ZodString;
4
+ label: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ id: string;
7
+ label: string;
8
+ }, {
9
+ id: string;
10
+ label: string;
11
+ }>;
12
+ export declare type AddButtonActionBarEvent = z.infer<typeof isAddButtonActionBarEvent>;
13
+ export declare type AddActionsButtonActionBarEventCallback = (event: AddButtonActionBarEvent) => void;
14
+ export declare const isRemoveButtonActionBarEvent: z.ZodObject<{
15
+ id: z.ZodString;
16
+ }, "strip", z.ZodTypeAny, {
17
+ id: string;
18
+ }, {
19
+ id: string;
20
+ }>;
21
+ export declare type RemoveButtonActionBarEvent = z.infer<typeof isRemoveButtonActionBarEvent>;
@@ -9,14 +9,14 @@ export declare const isXmppSettingsMessageEvent: z.ZodObject<{
9
9
  subscribe: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
10
10
  }, "strip", z.ZodTypeAny, {
11
11
  type: string;
12
- url: string;
13
12
  name: string;
13
+ url: string;
14
14
  subscribe: boolean;
15
15
  }, {
16
16
  subscribe?: boolean | undefined;
17
17
  type: string;
18
- url: string;
19
18
  name: string;
19
+ url: string;
20
20
  }>, "many">;
21
21
  jabberId: z.ZodString;
22
22
  jabberPassword: z.ZodString;
@@ -25,8 +25,8 @@ export declare const isXmppSettingsMessageEvent: z.ZodObject<{
25
25
  conferenceDomain: string;
26
26
  rooms: {
27
27
  type: string;
28
- url: string;
29
28
  name: string;
29
+ url: string;
30
30
  subscribe: boolean;
31
31
  }[];
32
32
  jabberId: string;
@@ -37,8 +37,8 @@ export declare const isXmppSettingsMessageEvent: z.ZodObject<{
37
37
  rooms: {
38
38
  subscribe?: boolean | undefined;
39
39
  type: string;
40
- url: string;
41
40
  name: string;
41
+ url: string;
42
42
  }[];
43
43
  jabberId: string;
44
44
  jabberPassword: string;
@@ -7,11 +7,11 @@ export declare class WorkadventureProximityMeetingCommands extends IframeApiCont
7
7
  callback: (event: {
8
8
  users: {
9
9
  outlineColor?: number | undefined;
10
+ name: string;
10
11
  position: {
11
12
  x: number;
12
13
  y: number;
13
14
  };
14
- name: string;
15
15
  playerId: number;
16
16
  variables: Map<string, unknown>;
17
17
  userUuid: string;
@@ -23,11 +23,11 @@ export declare class WorkadventureProximityMeetingCommands extends IframeApiCont
23
23
  callback: (event: {
24
24
  user: {
25
25
  outlineColor?: number | undefined;
26
+ name: string;
26
27
  position: {
27
28
  x: number;
28
29
  y: number;
29
30
  };
30
- name: string;
31
31
  playerId: number;
32
32
  variables: Map<string, unknown>;
33
33
  userUuid: string;
@@ -39,11 +39,11 @@ export declare class WorkadventureProximityMeetingCommands extends IframeApiCont
39
39
  callback: (event: {
40
40
  user: {
41
41
  outlineColor?: number | undefined;
42
+ name: string;
42
43
  position: {
43
44
  x: number;
44
45
  y: number;
45
46
  };
46
- name: string;
47
47
  playerId: number;
48
48
  variables: Map<string, unknown>;
49
49
  userUuid: string;
@@ -0,0 +1,31 @@
1
+ import { AddButtonActionBarEvent } from "../../Events/Ui/ButtonActionBarEvent";
2
+ import { IframeApiContribution } from "../IframeApiContribution";
3
+ export declare type ButtonActionBarClickedCallback = (buttonActionBar: AddButtonActionBarEvent) => void;
4
+ export declare class WorkAdventureButtonActionBarCommands extends IframeApiContribution<WorkAdventureButtonActionBarCommands> {
5
+ private _callbacks;
6
+ callbacks: {
7
+ type: "buttonActionBarTrigger";
8
+ callback: (event: {
9
+ id: string;
10
+ label: string;
11
+ }) => void;
12
+ }[];
13
+ /**
14
+ * Add action bar button
15
+ * {@link http://workadventure.localhost/map-building/api-ui.md#add-action-bar | Website documentation}
16
+ *
17
+ * @param id
18
+ * @param label
19
+ * @param callback
20
+ */
21
+ addButton(id: string, label: string, callback?: ButtonActionBarClickedCallback): void;
22
+ /**
23
+ * Remove action bar button
24
+ * {@link http://workadventure.localhost/map-building/api-ui.md#remove-action-bar | Website documentation}
25
+ *
26
+ * @param id
27
+ */
28
+ removeButton(id: string): void;
29
+ }
30
+ declare const _default: WorkAdventureButtonActionBarCommands;
31
+ export default _default;
@@ -1,15 +1,25 @@
1
1
  import { IframeApiContribution } from "../IframeApiContribution";
2
2
  import type { ModalEvent } from "../../Events/ModalEvent";
3
3
  export declare class WorkadventureModalCommands extends IframeApiContribution<WorkadventureModalCommands> {
4
- callbacks: never[];
4
+ private _closeCallback?;
5
+ callbacks: {
6
+ type: "modalCloseTrigger";
7
+ callback: (event: {
8
+ allowApi: boolean;
9
+ position: "left" | "right" | "center";
10
+ allow: string | null;
11
+ src: string;
12
+ title: string;
13
+ }) => void;
14
+ }[];
5
15
  /**
6
- * Open instantly the chat window.
7
- * {@link https://workadventu.re/map-building/api-chat.md#open-the-modal-window | Website documentation}
16
+ * Open instantly the modal window.
17
+ * {@link http://workadventure.localhost/map-building/api-ui.md#open-the-modal-iframe | Website documentation}
8
18
  */
9
- openModal(modalEvent: ModalEvent): void;
19
+ openModal(modalEvent: ModalEvent, closeCallback?: (arg: ModalEvent) => void): void;
10
20
  /**
11
- * Close instantly the chat window.
12
- * {@link https://workadventu.re/map-building/api-chat.md#close-the-modal-window | Website documentation}
21
+ * Close instantly the modal window.
22
+ * {@link http://workadventure.localhost/map-building/api-ui.md#close-the-chat-window | Website documentation}
13
23
  */
14
24
  closeModal(): void;
15
25
  }
@@ -20,11 +20,11 @@ export declare class WorkadventurePlayersCommands extends IframeApiContribution<
20
20
  type: "addRemotePlayer";
21
21
  callback: (event: {
22
22
  outlineColor?: number | undefined;
23
+ name: string;
23
24
  position: {
24
25
  x: number;
25
26
  y: number;
26
27
  };
27
- name: string;
28
28
  playerId: number;
29
29
  variables: Map<string, unknown>;
30
30
  userUuid: string;
@@ -36,11 +36,11 @@ export declare class WorkadventurePlayersCommands extends IframeApiContribution<
36
36
  } | {
37
37
  type: "remotePlayerChanged";
38
38
  callback: (event: {
39
+ name?: string | undefined;
39
40
  position?: {
40
41
  x: number;
41
42
  y: number;
42
43
  } | undefined;
43
- name?: string | undefined;
44
44
  variables?: Map<string, unknown> | undefined;
45
45
  availabilityStatus?: string | undefined;
46
46
  outlineColor?: number | undefined;
@@ -9,6 +9,7 @@ import { Subject } from "rxjs";
9
9
  import type { UIWebsiteCommands } from "./Ui/UIWebsite";
10
10
  import { RemotePlayer } from "./Players/RemotePlayer";
11
11
  import type { WorkadventureModalCommands } from "./Ui/Modal";
12
+ import { WorkAdventureButtonActionBarCommands } from "./Ui/ButtonActionBar";
12
13
  interface MenuDescriptor {
13
14
  callback?: (commandDescriptor: string) => void;
14
15
  iframe?: string;
@@ -53,11 +54,11 @@ export declare class WorkAdventureUiCommands extends IframeApiContribution<WorkA
53
54
  type: "remotePlayerClickedEvent";
54
55
  callback: (event: {
55
56
  outlineColor?: number | undefined;
57
+ name: string;
56
58
  position: {
57
59
  x: number;
58
60
  y: number;
59
61
  };
60
- name: string;
61
62
  playerId: number;
62
63
  variables: Map<string, unknown>;
63
64
  userUuid: string;
@@ -111,6 +112,7 @@ export declare class WorkAdventureUiCommands extends IframeApiContribution<WorkA
111
112
  displayActionMessage(actionMessageOptions: ActionMessageOptions): ActionMessage;
112
113
  get website(): UIWebsiteCommands;
113
114
  get modal(): WorkadventureModalCommands;
115
+ get actionBar(): WorkAdventureButtonActionBarCommands;
114
116
  }
115
117
  declare const _default: WorkAdventureUiCommands;
116
118
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workadventure/iframe-api-typings",
3
- "version": "v1.14.3",
3
+ "version": "v1.14.7",
4
4
  "description": "Typescript typings for WorkAdventure iFrame API",
5
5
  "main": "iframe_api.js",
6
6
  "types": "iframe_api.d.ts",