@workadventure/iframe-api-typings 1.26.10 → 1.26.11
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
CHANGED
|
@@ -9,12 +9,15 @@ export declare const iframeMessagePortTypeGuards: {
|
|
|
9
9
|
data: z.ZodObject<{
|
|
10
10
|
spaceName: z.ZodString;
|
|
11
11
|
filterType: z.ZodEnum<["everyone", "streaming"]>;
|
|
12
|
+
propertiesToSync: z.ZodArray<z.ZodString, "many">;
|
|
12
13
|
}, "strip", z.ZodTypeAny, {
|
|
13
14
|
spaceName: string;
|
|
14
15
|
filterType: "everyone" | "streaming";
|
|
16
|
+
propertiesToSync: string[];
|
|
15
17
|
}, {
|
|
16
18
|
spaceName: string;
|
|
17
19
|
filterType: "everyone" | "streaming";
|
|
20
|
+
propertiesToSync: string[];
|
|
18
21
|
}>;
|
|
19
22
|
iframeEvents: z.ZodUnion<[z.ZodObject<{
|
|
20
23
|
type: z.ZodLiteral<"watch">;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IframeEvent, IframeQuery, IframeQueryMap } from "../Events/IframeEvent";
|
|
2
1
|
import { IframeMessagePortData, IframeMessagePortMap } from "../Events/MessagePortEvents";
|
|
2
|
+
import { IframeEvent, IframeQuery, IframeQueryMap } from "../Events/IframeEvent";
|
|
3
3
|
import { CheckedIframeMessagePort } from "./CheckedIframeMessagePort";
|
|
4
4
|
export declare function sendToWorkadventure(content: IframeEvent, transfer?: Transferable[]): void;
|
|
5
5
|
export declare const answerPromises: Map<number, {
|
|
@@ -10,7 +10,11 @@ export declare const answerPromisesMessagePort: Map<number, {
|
|
|
10
10
|
resolve: () => void;
|
|
11
11
|
reject: (reason?: any) => void;
|
|
12
12
|
}>;
|
|
13
|
-
export declare function queryWorkadventure<T extends keyof IframeQueryMap>(content: IframeQuery<T>,
|
|
13
|
+
export declare function queryWorkadventure<T extends keyof IframeQueryMap>(content: IframeQuery<T>, options?: {
|
|
14
|
+
transfer?: Transferable[];
|
|
15
|
+
signal?: AbortSignal;
|
|
16
|
+
timeout?: number | null;
|
|
17
|
+
}): Promise<IframeQueryMap[T]["answer"]>;
|
|
14
18
|
export declare function openMessagePort<K extends keyof IframeMessagePortMap>(type: K, data: IframeMessagePortData<K>["data"]): Promise<CheckedIframeMessagePort<K>>;
|
|
15
19
|
/**
|
|
16
20
|
* !! be aware that the implemented attributes (addMethodsAtRoot and subObjectIdentifier) must be readonly
|
|
@@ -14,9 +14,10 @@ export declare class WorkAdventureSpacesCommands extends IframeApiContribution<W
|
|
|
14
14
|
* {@link https://docs.workadventu.re/map-building/api-spaces.md#start-following-player | Website documentation}
|
|
15
15
|
*
|
|
16
16
|
* @param {string} spaceName Name of the space to join
|
|
17
|
-
* @param {("everyone"|"streaming")} filterType Type of filter to apply when joining the space.
|
|
17
|
+
* @param {("everyone"|"streaming")} filterType Type of filter to apply when joining the space. This must match the filter decided by the first person joining the space.
|
|
18
|
+
* @param {string[]} propertiesToSync List of properties to listen to. You will be notified if any of these properties change when synchronizing in the space.
|
|
18
19
|
*/
|
|
19
|
-
joinSpace(spaceName: string, filterType: "everyone" | "streaming"): Promise<Space>;
|
|
20
|
+
joinSpace(spaceName: string, filterType: "everyone" | "streaming", propertiesToSync: string[]): Promise<Space>;
|
|
20
21
|
}
|
|
21
22
|
declare const _default: WorkAdventureSpacesCommands;
|
|
22
23
|
export default _default;
|