@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.
@@ -4,7 +4,7 @@
4
4
  * All Rights Reserved
5
5
  */
6
6
  import { ApiAction } from './ApiAction';
7
- import { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
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: ToMetaBoxApiActions.getFastRender,
58
+ action: ToMetaBoxApiAction.getFastRender,
59
59
  });
60
60
  }
61
61
  }
@@ -4,7 +4,7 @@
4
4
  * All Rights Reserved
5
5
  */
6
6
  import { ApiAction } from './ApiAction';
7
- import { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
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: ToMetaBoxApiActions.getPdf,
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 { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
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: ToMetaBoxApiActions.loadLevel,
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 { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
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: ToMetaBoxApiActions.setMaterialById,
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 { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
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: ToMetaBoxApiActions.setProduct,
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 { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
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: ToMetaBoxApiActions.showEmbeddedMenu,
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 { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
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: ToMetaBoxApiActions.watchCallbacks,
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 FromMetaboxApiActions: {
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 FromMetaBoxAction = (typeof FromMetaboxApiActions)[keyof typeof FromMetaboxApiActions];
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.
@@ -3,7 +3,7 @@
3
3
  * 3DSource.com, Sergii Karanda steve@3dsource.com
4
4
  * All Rights Reserved
5
5
  */
6
- export const FromMetaboxApiActions = {
6
+ export const FromMetaboxApiAction = {
7
7
  bridge: 'bridge',
8
8
  unrealCallback: 'unrealCallback',
9
9
  unrealFeatureBridge: 'unrealFeatureBridge',
@@ -1,5 +1,5 @@
1
1
  import type { MimeType } from '../actions/GetFastRender';
2
- export declare const ToMetaBoxApiActions: {
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 ToMetaBoxAction = (typeof ToMetaBoxApiActions)[keyof typeof ToMetaBoxApiActions];
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: ToMetaBoxAction;
47
+ action: ToMetaBoxActions;
48
48
  payload?: ToMetaboxMessagePayload | never;
49
49
  }
50
50
  export interface ToMetaBoxMessage {
@@ -3,7 +3,7 @@
3
3
  * 3DSource.com, Sergii Karanda steve@3dsource.com
4
4
  * All Rights Reserved
5
5
  */
6
- export const ToMetaBoxApiActions = {
6
+ export const ToMetaBoxApiAction = {
7
7
  getPdf: 'getPdf',
8
8
  loadLevel: 'loadLevel',
9
9
  setProduct: 'setProduct',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3dsource/metabox-front-api",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "API for MetaBox configurator",
5
5
  "main": "dist/index.ts",
6
6
  "unpkg": "dist/index.js",