@workadventure/iframe-api-typings 1.23.10 → 1.24.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/package.json +1 -1
- package/play/src/front/Api/Events/IframeEvent.d.ts +19 -12
- package/play/src/front/Api/Events/ProximityMeeting/AppendPCMDataEvent.d.ts +3 -3
- package/play/src/front/Api/Events/Ui/MenuEvents.d.ts +8 -0
- package/play/src/front/Api/Iframe/Player/ProximityMeeting.d.ts +1 -1
- package/play/src/front/Api/Iframe/playerState.d.ts +1 -1
- package/play/src/front/Api/Iframe/ui.d.ts +4 -0
- package/play/src/iframe_api.d.ts +1 -1
package/package.json
CHANGED
|
@@ -738,14 +738,18 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
738
738
|
key: z.ZodString;
|
|
739
739
|
options: z.ZodObject<{
|
|
740
740
|
allowApi: z.ZodBoolean;
|
|
741
|
+
allow: z.ZodOptional<z.ZodString>;
|
|
741
742
|
}, "strip", z.ZodTypeAny, {
|
|
742
743
|
allowApi: boolean;
|
|
744
|
+
allow?: string | undefined;
|
|
743
745
|
}, {
|
|
744
746
|
allowApi: boolean;
|
|
747
|
+
allow?: string | undefined;
|
|
745
748
|
}>;
|
|
746
749
|
}, "strip", z.ZodTypeAny, {
|
|
747
750
|
options: {
|
|
748
751
|
allowApi: boolean;
|
|
752
|
+
allow?: string | undefined;
|
|
749
753
|
};
|
|
750
754
|
name: string;
|
|
751
755
|
key: string;
|
|
@@ -753,6 +757,7 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
753
757
|
}, {
|
|
754
758
|
options: {
|
|
755
759
|
allowApi: boolean;
|
|
760
|
+
allow?: string | undefined;
|
|
756
761
|
};
|
|
757
762
|
name: string;
|
|
758
763
|
key: string;
|
|
@@ -763,6 +768,7 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
763
768
|
data: {
|
|
764
769
|
options: {
|
|
765
770
|
allowApi: boolean;
|
|
771
|
+
allow?: string | undefined;
|
|
766
772
|
};
|
|
767
773
|
name: string;
|
|
768
774
|
key: string;
|
|
@@ -773,6 +779,7 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
773
779
|
data: {
|
|
774
780
|
options: {
|
|
775
781
|
allowApi: boolean;
|
|
782
|
+
allow?: string | undefined;
|
|
776
783
|
};
|
|
777
784
|
name: string;
|
|
778
785
|
key: string;
|
|
@@ -3314,21 +3321,21 @@ export declare const isIframeResponseEvent: z.ZodUnion<[z.ZodObject<{
|
|
|
3314
3321
|
}>, z.ZodObject<{
|
|
3315
3322
|
type: z.ZodLiteral<"appendPCMData">;
|
|
3316
3323
|
data: z.ZodObject<{
|
|
3317
|
-
data: z.ZodType<Float32Array
|
|
3324
|
+
data: z.ZodType<Float32Array<ArrayBuffer>, z.ZodTypeDef, Float32Array<ArrayBuffer>>;
|
|
3318
3325
|
}, "strip", z.ZodTypeAny, {
|
|
3319
|
-
data: Float32Array
|
|
3326
|
+
data: Float32Array<ArrayBuffer>;
|
|
3320
3327
|
}, {
|
|
3321
|
-
data: Float32Array
|
|
3328
|
+
data: Float32Array<ArrayBuffer>;
|
|
3322
3329
|
}>;
|
|
3323
3330
|
}, "strip", z.ZodTypeAny, {
|
|
3324
3331
|
type: "appendPCMData";
|
|
3325
3332
|
data: {
|
|
3326
|
-
data: Float32Array
|
|
3333
|
+
data: Float32Array<ArrayBuffer>;
|
|
3327
3334
|
};
|
|
3328
3335
|
}, {
|
|
3329
3336
|
type: "appendPCMData";
|
|
3330
3337
|
data: {
|
|
3331
|
-
data: Float32Array
|
|
3338
|
+
data: Float32Array<ArrayBuffer>;
|
|
3332
3339
|
};
|
|
3333
3340
|
}>]>;
|
|
3334
3341
|
export type IframeResponseEvent = z.infer<typeof isIframeResponseEvent>;
|
|
@@ -4270,11 +4277,11 @@ export declare const iframeQueryMapTypeGuards: {
|
|
|
4270
4277
|
};
|
|
4271
4278
|
appendPCMData: {
|
|
4272
4279
|
query: z.ZodObject<{
|
|
4273
|
-
data: z.ZodType<Float32Array
|
|
4280
|
+
data: z.ZodType<Float32Array<ArrayBuffer>, z.ZodTypeDef, Float32Array<ArrayBuffer>>;
|
|
4274
4281
|
}, "strip", z.ZodTypeAny, {
|
|
4275
|
-
data: Float32Array
|
|
4282
|
+
data: Float32Array<ArrayBuffer>;
|
|
4276
4283
|
}, {
|
|
4277
|
-
data: Float32Array
|
|
4284
|
+
data: Float32Array<ArrayBuffer>;
|
|
4278
4285
|
}>;
|
|
4279
4286
|
answer: z.ZodUndefined;
|
|
4280
4287
|
};
|
|
@@ -4317,15 +4324,15 @@ export interface IframeQueryWrapper<T extends keyof IframeQueryMap> {
|
|
|
4317
4324
|
id: number;
|
|
4318
4325
|
query: IframeQuery<T>;
|
|
4319
4326
|
}
|
|
4320
|
-
export declare const isIframeQueryKey: (type: string) => type is
|
|
4321
|
-
export declare const isIframeQuery: (event: any) => event is IframeQuery<
|
|
4322
|
-
export declare const isIframeQueryWrapper: (event: any) => event is IframeQueryWrapper<
|
|
4327
|
+
export declare const isIframeQueryKey: (type: string) => type is keyof IframeQueryMap;
|
|
4328
|
+
export declare const isIframeQuery: (event: any) => event is IframeQuery<keyof IframeQueryMap>;
|
|
4329
|
+
export declare const isIframeQueryWrapper: (event: any) => event is IframeQueryWrapper<keyof IframeQueryMap>;
|
|
4323
4330
|
export interface IframeAnswerEvent<T extends keyof IframeQueryMap> {
|
|
4324
4331
|
id: number;
|
|
4325
4332
|
type: T;
|
|
4326
4333
|
data: IframeQueryMap[T]["answer"];
|
|
4327
4334
|
}
|
|
4328
|
-
export declare const isIframeAnswerEvent: (event: any) => event is IframeAnswerEvent<
|
|
4335
|
+
export declare const isIframeAnswerEvent: (event: any) => event is IframeAnswerEvent<keyof IframeQueryMap>;
|
|
4329
4336
|
export declare const isIframeErrorAnswerEvent: z.ZodObject<{
|
|
4330
4337
|
id: z.ZodNumber;
|
|
4331
4338
|
type: z.ZodString;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const isAppendPCMDataEvent: z.ZodObject<{
|
|
3
|
-
data: z.ZodType<Float32Array
|
|
3
|
+
data: z.ZodType<Float32Array<ArrayBuffer>, z.ZodTypeDef, Float32Array<ArrayBuffer>>;
|
|
4
4
|
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
data: Float32Array
|
|
5
|
+
data: Float32Array<ArrayBuffer>;
|
|
6
6
|
}, {
|
|
7
|
-
data: Float32Array
|
|
7
|
+
data: Float32Array<ArrayBuffer>;
|
|
8
8
|
}>;
|
|
9
9
|
/**
|
|
10
10
|
* Appends PCM data to the stream played to all players in the current bubble.
|
|
@@ -12,10 +12,13 @@ export declare const isUnregisterMenuEvent: z.ZodObject<{
|
|
|
12
12
|
export type UnregisterMenuEvent = z.infer<typeof isUnregisterMenuEvent>;
|
|
13
13
|
export declare const isMenuRegisterOptions: z.ZodObject<{
|
|
14
14
|
allowApi: z.ZodBoolean;
|
|
15
|
+
allow: z.ZodOptional<z.ZodString>;
|
|
15
16
|
}, "strip", z.ZodTypeAny, {
|
|
16
17
|
allowApi: boolean;
|
|
18
|
+
allow?: string | undefined;
|
|
17
19
|
}, {
|
|
18
20
|
allowApi: boolean;
|
|
21
|
+
allow?: string | undefined;
|
|
19
22
|
}>;
|
|
20
23
|
/**
|
|
21
24
|
* A message sent from a script to the game to add a custom menu from the menu
|
|
@@ -26,14 +29,18 @@ export declare const isMenuRegisterEvent: z.ZodObject<{
|
|
|
26
29
|
key: z.ZodString;
|
|
27
30
|
options: z.ZodObject<{
|
|
28
31
|
allowApi: z.ZodBoolean;
|
|
32
|
+
allow: z.ZodOptional<z.ZodString>;
|
|
29
33
|
}, "strip", z.ZodTypeAny, {
|
|
30
34
|
allowApi: boolean;
|
|
35
|
+
allow?: string | undefined;
|
|
31
36
|
}, {
|
|
32
37
|
allowApi: boolean;
|
|
38
|
+
allow?: string | undefined;
|
|
33
39
|
}>;
|
|
34
40
|
}, "strip", z.ZodTypeAny, {
|
|
35
41
|
options: {
|
|
36
42
|
allowApi: boolean;
|
|
43
|
+
allow?: string | undefined;
|
|
37
44
|
};
|
|
38
45
|
name: string;
|
|
39
46
|
key: string;
|
|
@@ -41,6 +48,7 @@ export declare const isMenuRegisterEvent: z.ZodObject<{
|
|
|
41
48
|
}, {
|
|
42
49
|
options: {
|
|
43
50
|
allowApi: boolean;
|
|
51
|
+
allow?: string | undefined;
|
|
44
52
|
};
|
|
45
53
|
name: string;
|
|
46
54
|
key: string;
|
|
@@ -18,5 +18,5 @@ export declare class WorkadventurePlayerStateCommands extends AbstractWorkadvent
|
|
|
18
18
|
scope?: "world" | "room";
|
|
19
19
|
}): Promise<void>;
|
|
20
20
|
}
|
|
21
|
-
export declare const playerState: WorkadventurePlayerStateCommands &
|
|
21
|
+
export declare const playerState: WorkadventurePlayerStateCommands & PlayerState;
|
|
22
22
|
export {};
|
|
@@ -20,6 +20,10 @@ interface MenuDescriptor {
|
|
|
20
20
|
* A unique technical key identifying this menu
|
|
21
21
|
*/
|
|
22
22
|
key?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The "allow" attribute of the iframe tag.
|
|
25
|
+
*/
|
|
26
|
+
allow?: string;
|
|
23
27
|
}
|
|
24
28
|
export type MenuOptions = RequireOnlyOne<MenuDescriptor, "callback" | "iframe">;
|
|
25
29
|
export interface ActionMessageOptions {
|
package/play/src/iframe_api.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ declare const wa: {
|
|
|
50
50
|
*
|
|
51
51
|
* @returns {unknown|undefined} Metadata
|
|
52
52
|
*/
|
|
53
|
-
readonly metadata: unknown;
|
|
53
|
+
readonly metadata: unknown | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* The iframeId (only set if the code is executed from a UIWebsite iframe)
|
|
56
56
|
* Important: You need to wait for the end of the initialization before accessing.
|