@3dsource/metabox-front-api 0.0.5 → 0.0.6
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/dist/actions/GetFastRender.js +2 -2
- package/dist/actions/GetPdf.js +2 -2
- package/dist/actions/SetEnvironment.js +2 -2
- package/dist/actions/SetMaterial.js +2 -2
- package/dist/actions/SetProduct.js +2 -2
- package/dist/actions/ShowEmbeddedMenu.js +2 -2
- package/dist/actions/WatchCallbacks.js +2 -2
- package/dist/interfaces/FromMetaboxMessagePayloads.d.ts +2 -2
- package/dist/interfaces/FromMetaboxMessagePayloads.js +1 -1
- package/dist/interfaces/ToMetaboxMessagePayloads.d.ts +3 -3
- package/dist/interfaces/ToMetaboxMessagePayloads.js +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* All Rights Reserved
|
|
5
5
|
*/
|
|
6
6
|
import { ApiAction } from './ApiAction';
|
|
7
|
-
import {
|
|
7
|
+
import { ToMetaBoxApiAction } from '../interfaces/ToMetaboxMessagePayloads';
|
|
8
8
|
/**
|
|
9
9
|
* Represents a fast render action.
|
|
10
10
|
* @remarks
|
|
@@ -55,7 +55,7 @@ export class GetFastRender extends ApiAction {
|
|
|
55
55
|
format: mimeType,
|
|
56
56
|
size,
|
|
57
57
|
},
|
|
58
|
-
action:
|
|
58
|
+
action: ToMetaBoxApiAction.getFastRender,
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
}
|
package/dist/actions/GetPdf.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* All Rights Reserved
|
|
5
5
|
*/
|
|
6
6
|
import { ApiAction } from './ApiAction';
|
|
7
|
-
import {
|
|
7
|
+
import { ToMetaBoxApiAction } from '../interfaces/ToMetaboxMessagePayloads';
|
|
8
8
|
/**
|
|
9
9
|
* Represents an action to get a PDF from Metabox.
|
|
10
10
|
* @remarks
|
|
@@ -45,7 +45,7 @@ export class GetPdf extends ApiAction {
|
|
|
45
45
|
constructor() {
|
|
46
46
|
super();
|
|
47
47
|
this.api.sendMessageToMetaBox({
|
|
48
|
-
action:
|
|
48
|
+
action: ToMetaBoxApiAction.getPdf,
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* All Rights Reserved
|
|
5
5
|
*/
|
|
6
6
|
import { ApiAction } from './ApiAction';
|
|
7
|
-
import {
|
|
7
|
+
import { ToMetaBoxApiAction } from '../interfaces/ToMetaboxMessagePayloads';
|
|
8
8
|
/**
|
|
9
9
|
* Represents an action to set the environment by its ID.
|
|
10
10
|
* @remarks
|
|
@@ -39,7 +39,7 @@ export class SetEnvironment extends ApiAction {
|
|
|
39
39
|
payload: {
|
|
40
40
|
id: environmentId,
|
|
41
41
|
},
|
|
42
|
-
action:
|
|
42
|
+
action: ToMetaBoxApiAction.loadLevel,
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* All Rights Reserved
|
|
5
5
|
*/
|
|
6
6
|
import { ApiAction } from './ApiAction';
|
|
7
|
-
import {
|
|
7
|
+
import { ToMetaBoxApiAction } from '../interfaces/ToMetaboxMessagePayloads';
|
|
8
8
|
/**
|
|
9
9
|
* Represents an action to set a material by its ID.
|
|
10
10
|
*
|
|
@@ -59,7 +59,7 @@ export class SetMaterial extends ApiAction {
|
|
|
59
59
|
slotId,
|
|
60
60
|
materialId,
|
|
61
61
|
},
|
|
62
|
-
action:
|
|
62
|
+
action: ToMetaBoxApiAction.setMaterialById,
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* All Rights Reserved
|
|
5
5
|
*/
|
|
6
6
|
import { ApiAction } from './ApiAction';
|
|
7
|
-
import {
|
|
7
|
+
import { ToMetaBoxApiAction } from '../interfaces/ToMetaboxMessagePayloads';
|
|
8
8
|
/**
|
|
9
9
|
* Represents an action to set a product by its ID.
|
|
10
10
|
*
|
|
@@ -23,7 +23,7 @@ export class SetProduct extends ApiAction {
|
|
|
23
23
|
payload: {
|
|
24
24
|
productId,
|
|
25
25
|
},
|
|
26
|
-
action:
|
|
26
|
+
action: ToMetaBoxApiAction.setProduct,
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* All Rights Reserved
|
|
5
5
|
*/
|
|
6
6
|
import { ApiAction } from './ApiAction';
|
|
7
|
-
import {
|
|
7
|
+
import { ToMetaBoxApiAction } from '../interfaces/ToMetaboxMessagePayloads';
|
|
8
8
|
/**
|
|
9
9
|
* Represents an action to toggle the Embedded Menu in MetaBox.
|
|
10
10
|
*
|
|
@@ -20,7 +20,7 @@ export class ShowEmbeddedMenu extends ApiAction {
|
|
|
20
20
|
constructor(visible) {
|
|
21
21
|
super();
|
|
22
22
|
this.api.sendMessageToMetaBox({
|
|
23
|
-
action:
|
|
23
|
+
action: ToMetaBoxApiAction.showEmbeddedMenu,
|
|
24
24
|
payload: {
|
|
25
25
|
visible,
|
|
26
26
|
},
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* All Rights Reserved
|
|
5
5
|
*/
|
|
6
6
|
import { ApiAction } from './ApiAction';
|
|
7
|
-
import {
|
|
7
|
+
import { ToMetaBoxApiAction } from '../interfaces/ToMetaboxMessagePayloads';
|
|
8
8
|
/**
|
|
9
9
|
* @internal
|
|
10
10
|
* Represents an action to watch Unreal callbacks from Unreal engine.
|
|
@@ -21,7 +21,7 @@ export class WatchCallbacks extends ApiAction {
|
|
|
21
21
|
constructor() {
|
|
22
22
|
super();
|
|
23
23
|
this.api.sendMessageToMetaBox({
|
|
24
|
-
action:
|
|
24
|
+
action: ToMetaBoxApiAction.watchCallbacks,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ConfiguratorEnvelope } from './UniversalConfigurator';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const FromMetaboxApiAction: {
|
|
3
3
|
readonly bridge: "bridge";
|
|
4
4
|
readonly unrealCallback: "unrealCallback";
|
|
5
5
|
readonly unrealFeatureBridge: "unrealFeatureBridge";
|
|
@@ -40,7 +40,7 @@ export declare const FromMetaboxApiActions: {
|
|
|
40
40
|
readonly getFastRender: "getFastRender";
|
|
41
41
|
readonly appLoaded: "appLoaded";
|
|
42
42
|
};
|
|
43
|
-
export type
|
|
43
|
+
export type FromMetaBoxActions = (typeof FromMetaboxApiAction)[keyof typeof FromMetaboxApiAction];
|
|
44
44
|
/**
|
|
45
45
|
* @internal
|
|
46
46
|
* Used for signaling that the app is loaded and ready to open api.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MimeType } from '../actions/GetFastRender';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const ToMetaBoxApiAction: {
|
|
3
3
|
readonly getPdf: "getPdf";
|
|
4
4
|
readonly loadLevel: "loadLevel";
|
|
5
5
|
readonly setProduct: "setProduct";
|
|
@@ -11,7 +11,7 @@ export declare const ToMetaBoxApiActions: {
|
|
|
11
11
|
readonly showEmbeddedMenu: "showEmbeddedMenu";
|
|
12
12
|
readonly forceSetDeviceType: "forceSetDeviceType";
|
|
13
13
|
};
|
|
14
|
-
export type
|
|
14
|
+
export type ToMetaBoxActions = (typeof ToMetaBoxApiAction)[keyof typeof ToMetaBoxApiAction];
|
|
15
15
|
export type ToMetaboxMessagePayload = ToMetaboxMessagePayloads[keyof ToMetaboxMessagePayloads];
|
|
16
16
|
export interface ToMetaboxMessagePayloads {
|
|
17
17
|
getPdf: void;
|
|
@@ -44,7 +44,7 @@ export interface ToMetaboxMessagePayloads {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
export interface ToMetaBoxMessageEnvelope {
|
|
47
|
-
action:
|
|
47
|
+
action: ToMetaBoxActions;
|
|
48
48
|
payload?: ToMetaboxMessagePayload | never;
|
|
49
49
|
}
|
|
50
50
|
export interface ToMetaBoxMessage {
|