@3dsource/metabox-front-api 0.0.3 → 0.0.4

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.
Files changed (36) hide show
  1. package/README.md +1 -1
  2. package/dist/actions/ApiAction.d.ts +4 -0
  3. package/dist/actions/ApiAction.js +10 -0
  4. package/dist/actions/GetFastRender.d.ts +55 -0
  5. package/dist/actions/GetFastRender.js +61 -0
  6. package/dist/actions/GetPdf.d.ts +40 -0
  7. package/dist/actions/GetPdf.js +51 -0
  8. package/dist/actions/SetEnvironment.d.ts +31 -0
  9. package/dist/actions/SetEnvironment.js +45 -0
  10. package/dist/actions/SetMaterial.d.ts +49 -0
  11. package/dist/actions/SetMaterial.js +65 -0
  12. package/dist/actions/SetProduct.d.ts +15 -0
  13. package/dist/actions/SetProduct.js +29 -0
  14. package/dist/actions/ShowEmbeddedMenu.d.ts +15 -0
  15. package/dist/actions/ShowEmbeddedMenu.js +29 -0
  16. package/dist/actions/WatchCallbacks.d.ts +16 -0
  17. package/dist/actions/WatchCallbacks.js +27 -0
  18. package/dist/index.d.ts +18 -0
  19. package/dist/index.js +22 -0
  20. package/dist/interfaces/FromMetaboxMessagePayloads.d.ts +130 -0
  21. package/dist/interfaces/FromMetaboxMessagePayloads.js +41 -0
  22. package/dist/interfaces/ToMetaboxMessagePayloads.d.ts +53 -0
  23. package/dist/interfaces/ToMetaboxMessagePayloads.js +12 -0
  24. package/dist/interfaces/UniversalConfigurator.d.ts +152 -0
  25. package/dist/interfaces/UniversalConfigurator.js +1 -0
  26. package/dist/lib/UrlUtils.d.ts +18 -0
  27. package/dist/lib/UrlUtils.js +37 -0
  28. package/dist/lib/initializeCommunicator.d.ts +87 -0
  29. package/dist/lib/initializeCommunicator.js +133 -0
  30. package/dist/lib/integrateMetaBox.d.ts +24 -0
  31. package/dist/lib/integrateMetaBox.js +55 -0
  32. package/dist/lib/saveImage.d.ts +11 -0
  33. package/dist/lib/saveImage.js +23 -0
  34. package/dist/lib/sleep.d.ts +10 -0
  35. package/dist/lib/sleep.js +17 -0
  36. package/package.json +2 -2
package/README.md CHANGED
@@ -39,7 +39,7 @@ Insert this code into your HTML file just before the closing `</body>` tag:
39
39
  this.api = api;
40
40
  this.api.addEventListener('metaboxData', (data) => {
41
41
  const { action, payload, eventType } = data;
42
- if (action !== FromMetaBoxApiAction.bridge) {
42
+ if (action !== FromMetaboxApiActions.bridge) {
43
43
  return;
44
44
  }
45
45
 
@@ -0,0 +1,4 @@
1
+ import type { Communicator } from '../lib/initializeCommunicator';
2
+ export declare class ApiAction {
3
+ protected api: Communicator;
4
+ }
@@ -0,0 +1,10 @@
1
+ /*
2
+ * Copyright (c) 2025.
3
+ * 3DSource.com, Sergii Karanda steve@3dsource.com
4
+ * All Rights Reserved
5
+ */
6
+ export class ApiAction {
7
+ constructor() {
8
+ this.api = window.env3DSource.api;
9
+ }
10
+ }
@@ -0,0 +1,55 @@
1
+ import { ApiAction } from './ApiAction';
2
+ /**
3
+ * Image format.
4
+ * @remarks
5
+ * This type represents the allowed image formats.
6
+ */
7
+ export type MimeType = 'image/png' | 'image/jpeg' | 'image/webp';
8
+ /**
9
+ * Represents a fast render action.
10
+ * @remarks
11
+ * This class sends a message to the MetaBox API to obtain a fast render based on the provided format and optional size.
12
+ *
13
+ * **Important:** Before invoking this action, ensure that the MetaBox viewport is fully loaded. This is indicated by the event:
14
+ * ```javascript
15
+ * data.eventType === 'viewportReady' && data.payload === true.
16
+ * ```
17
+ * Only then request be processed.
18
+ *
19
+ * @example
20
+ * import { integrateMetaBox, GetFastRender, saveImage } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
21
+ *
22
+ * // Integrate the MetaBox configurator into an HTML element with the ID 'embed3DSource'
23
+ * integrateMetaBox(
24
+ * 'https://metabox.3dsource.com/metabox-configurator/basic/12345678-1234-1234-1234-01234567890?introImage=https://example.com/intro.webp&sidebar=false',
25
+ * 'embed3DSource'
26
+ * );
27
+ *
28
+ * // Set up the global API environment
29
+ * window.env3DSource = window.env3DSource || {};
30
+ * window.env3DSource.apiReady = (api) => {
31
+ * // Listen for events from the MetaBox API
32
+ * api.addEventListener('metaboxData', (data) => {
33
+ * // Ensure the viewport is ready before sending render requests
34
+ * if (data.eventType === 'viewportReady' && data.payload === true) {
35
+ * // Request a fast render (PNG image with 1024x1024 dimensions)
36
+ * new GetFastRender('image/png', { x: 1024, y: 1024 });
37
+ * }
38
+ * // Process the fast render response
39
+ * if (data.eventType === 'getFastRender') {
40
+ * saveImage(data.payload, 'Render.png');
41
+ * }
42
+ * });
43
+ * };
44
+ */
45
+ export declare class GetFastRender extends ApiAction {
46
+ /**
47
+ * Constructs an instance of GetFastRender.
48
+ * @param mimeType - The output format.
49
+ * @param size - Optional size in pixels.
50
+ */
51
+ constructor(mimeType: MimeType, size?: {
52
+ x: number;
53
+ y: number;
54
+ });
55
+ }
@@ -0,0 +1,61 @@
1
+ /*
2
+ * Copyright (c) 2025.
3
+ * 3DSource.com, Sergii Karanda steve@3dsource.com
4
+ * All Rights Reserved
5
+ */
6
+ import { ApiAction } from './ApiAction';
7
+ import { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
8
+ /**
9
+ * Represents a fast render action.
10
+ * @remarks
11
+ * This class sends a message to the MetaBox API to obtain a fast render based on the provided format and optional size.
12
+ *
13
+ * **Important:** Before invoking this action, ensure that the MetaBox viewport is fully loaded. This is indicated by the event:
14
+ * ```javascript
15
+ * data.eventType === 'viewportReady' && data.payload === true.
16
+ * ```
17
+ * Only then request be processed.
18
+ *
19
+ * @example
20
+ * import { integrateMetaBox, GetFastRender, saveImage } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
21
+ *
22
+ * // Integrate the MetaBox configurator into an HTML element with the ID 'embed3DSource'
23
+ * integrateMetaBox(
24
+ * 'https://metabox.3dsource.com/metabox-configurator/basic/12345678-1234-1234-1234-01234567890?introImage=https://example.com/intro.webp&sidebar=false',
25
+ * 'embed3DSource'
26
+ * );
27
+ *
28
+ * // Set up the global API environment
29
+ * window.env3DSource = window.env3DSource || {};
30
+ * window.env3DSource.apiReady = (api) => {
31
+ * // Listen for events from the MetaBox API
32
+ * api.addEventListener('metaboxData', (data) => {
33
+ * // Ensure the viewport is ready before sending render requests
34
+ * if (data.eventType === 'viewportReady' && data.payload === true) {
35
+ * // Request a fast render (PNG image with 1024x1024 dimensions)
36
+ * new GetFastRender('image/png', { x: 1024, y: 1024 });
37
+ * }
38
+ * // Process the fast render response
39
+ * if (data.eventType === 'getFastRender') {
40
+ * saveImage(data.payload, 'Render.png');
41
+ * }
42
+ * });
43
+ * };
44
+ */
45
+ export class GetFastRender extends ApiAction {
46
+ /**
47
+ * Constructs an instance of GetFastRender.
48
+ * @param mimeType - The output format.
49
+ * @param size - Optional size in pixels.
50
+ */
51
+ constructor(mimeType, size) {
52
+ super();
53
+ this.api.sendMessageToMetaBox({
54
+ payload: {
55
+ format: mimeType,
56
+ size,
57
+ },
58
+ action: ToMetaBoxApiActions.getFastRender,
59
+ });
60
+ }
61
+ }
@@ -0,0 +1,40 @@
1
+ import { ApiAction } from './ApiAction';
2
+ /**
3
+ * Represents an action to get a PDF from Metabox.
4
+ * @remarks
5
+ * This class sends a message to the MetaBox API to generate a PDF based on the current configuration.
6
+ * This action does not require any parameters.
7
+ *
8
+ * **Important:** Before invoking this action, ensure that the MetaBox viewport is fully loaded. This is indicated by the event:
9
+ *```javascript
10
+ * data.eventType === 'viewportReady' && data.payload === true.
11
+ * ```
12
+ * Only then request be processed.
13
+ *
14
+ * @example
15
+ * import { integrateMetaBox, GetPdf } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
16
+ *
17
+ * integrateMetaBox(
18
+ * 'https://metabox.3dsource.com/metabox-configurator/basic/12345678-1234-1234-1234-01234567890?introImage=https://example.com/intro.webp&sidebar=false',
19
+ * 'embed3DSource'
20
+ * );
21
+ *
22
+ * window.env3DSource = window.env3DSource || {};
23
+ * window.env3DSource.apiReady = (api) => {
24
+ * api.addEventListener('metaboxData', (data) => {
25
+ * if (data.eventType === 'viewportReady' && data.payload === true) {
26
+ * // Request a PDF of the current configuration
27
+ * new GetPdf();
28
+ * }
29
+ * });
30
+ * };
31
+ */
32
+ export declare class GetPdf extends ApiAction {
33
+ /**
34
+ * Creates an instance of GetPdf.
35
+ *
36
+ * @remarks
37
+ * This constructor does not require any parameters.
38
+ */
39
+ constructor();
40
+ }
@@ -0,0 +1,51 @@
1
+ /*
2
+ * Copyright (c) 2025.
3
+ * 3DSource.com, Sergii Karanda steve@3dsource.com
4
+ * All Rights Reserved
5
+ */
6
+ import { ApiAction } from './ApiAction';
7
+ import { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
8
+ /**
9
+ * Represents an action to get a PDF from Metabox.
10
+ * @remarks
11
+ * This class sends a message to the MetaBox API to generate a PDF based on the current configuration.
12
+ * This action does not require any parameters.
13
+ *
14
+ * **Important:** Before invoking this action, ensure that the MetaBox viewport is fully loaded. This is indicated by the event:
15
+ *```javascript
16
+ * data.eventType === 'viewportReady' && data.payload === true.
17
+ * ```
18
+ * Only then request be processed.
19
+ *
20
+ * @example
21
+ * import { integrateMetaBox, GetPdf } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
22
+ *
23
+ * integrateMetaBox(
24
+ * 'https://metabox.3dsource.com/metabox-configurator/basic/12345678-1234-1234-1234-01234567890?introImage=https://example.com/intro.webp&sidebar=false',
25
+ * 'embed3DSource'
26
+ * );
27
+ *
28
+ * window.env3DSource = window.env3DSource || {};
29
+ * window.env3DSource.apiReady = (api) => {
30
+ * api.addEventListener('metaboxData', (data) => {
31
+ * if (data.eventType === 'viewportReady' && data.payload === true) {
32
+ * // Request a PDF of the current configuration
33
+ * new GetPdf();
34
+ * }
35
+ * });
36
+ * };
37
+ */
38
+ export class GetPdf extends ApiAction {
39
+ /**
40
+ * Creates an instance of GetPdf.
41
+ *
42
+ * @remarks
43
+ * This constructor does not require any parameters.
44
+ */
45
+ constructor() {
46
+ super();
47
+ this.api.sendMessageToMetaBox({
48
+ action: ToMetaBoxApiActions.getPdf,
49
+ });
50
+ }
51
+ }
@@ -0,0 +1,31 @@
1
+ import { ApiAction } from './ApiAction';
2
+ /**
3
+ * Represents an action to set the environment by its ID.
4
+ * @remarks
5
+ * This action sends a message to the MetaBox API to load the environment level using the specified environment ID.
6
+ * It requires the MetaBox API to be properly initialized and an event listener to be registered.
7
+ *
8
+ * @example
9
+ * import { integrateMetaBox, SetEnvironment } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
10
+ *
11
+ * // Integrate the MetaBox configurator into an HTML element with the ID 'embed3DSource'
12
+ * integrateMetaBox(
13
+ * 'https://metabox.3dsource.com/metabox-configurator/basic/12345678-1234-1234-1234-01234567890?introImage=https://example.com/intro.webp&sidebar=false',
14
+ * 'embed3DSource'
15
+ * );
16
+ *
17
+ * // Setup API ready callback
18
+ * window.env3DSource = window.env3DSource || {};
19
+ * window.env3DSource.apiReady = (api) => {
20
+ * // Change the environment to '55555555-1234-1234-1234-01234567890'
21
+ * new SetEnvironment('55555555-1234-1234-1234-01234567890');
22
+ * };
23
+ */
24
+ export declare class SetEnvironment extends ApiAction {
25
+ /**
26
+ * Creates an instance of SetEnvironment.
27
+ *
28
+ * @param environmentId - The environment ID.
29
+ */
30
+ constructor(environmentId: string);
31
+ }
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Copyright (c) 2025.
3
+ * 3DSource.com, Sergii Karanda steve@3dsource.com
4
+ * All Rights Reserved
5
+ */
6
+ import { ApiAction } from './ApiAction';
7
+ import { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
8
+ /**
9
+ * Represents an action to set the environment by its ID.
10
+ * @remarks
11
+ * This action sends a message to the MetaBox API to load the environment level using the specified environment ID.
12
+ * It requires the MetaBox API to be properly initialized and an event listener to be registered.
13
+ *
14
+ * @example
15
+ * import { integrateMetaBox, SetEnvironment } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
16
+ *
17
+ * // Integrate the MetaBox configurator into an HTML element with the ID 'embed3DSource'
18
+ * integrateMetaBox(
19
+ * 'https://metabox.3dsource.com/metabox-configurator/basic/12345678-1234-1234-1234-01234567890?introImage=https://example.com/intro.webp&sidebar=false',
20
+ * 'embed3DSource'
21
+ * );
22
+ *
23
+ * // Setup API ready callback
24
+ * window.env3DSource = window.env3DSource || {};
25
+ * window.env3DSource.apiReady = (api) => {
26
+ * // Change the environment to '55555555-1234-1234-1234-01234567890'
27
+ * new SetEnvironment('55555555-1234-1234-1234-01234567890');
28
+ * };
29
+ */
30
+ export class SetEnvironment extends ApiAction {
31
+ /**
32
+ * Creates an instance of SetEnvironment.
33
+ *
34
+ * @param environmentId - The environment ID.
35
+ */
36
+ constructor(environmentId) {
37
+ super();
38
+ this.api.sendMessageToMetaBox({
39
+ payload: {
40
+ id: environmentId,
41
+ },
42
+ action: ToMetaBoxApiActions.loadLevel,
43
+ });
44
+ }
45
+ }
@@ -0,0 +1,49 @@
1
+ import { ApiAction } from './ApiAction';
2
+ /**
3
+ * Represents an action to set a material by its ID.
4
+ *
5
+ * @remarks
6
+ * This action sends a message to the MetaBox API to update the material on a specific product slot using the provided identifiers.
7
+
8
+ * **Important:** Before invoking this action, ensure that the MetaBox already dispatched
9
+ * as minimum one eventType:"basicConfiguratorDataWithState":
10
+ * ```javascript
11
+ * data.eventType === 'basicConfiguratorDataWithState'.
12
+ * ```
13
+ * Only then request be processed.
14
+ *
15
+ * @example
16
+ * import { SetMaterial } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
17
+ *
18
+ * // Integrate the MetaBox configurator into an HTML element with the ID 'embed3DSource'
19
+ * integrateMetaBox(
20
+ * 'https://metabox.3dsource.com/metabox-configurator/basic/12345678-1234-1234-1234-01234567890?introImage=https://example.com/intro.webp&sidebar=false',
21
+ * 'embed3DSource'
22
+ * );
23
+ *
24
+ * // Set up the global API environment
25
+ * window.env3DSource = window.env3DSource || {};
26
+ * window.env3DSource.apiReady = (api) => {
27
+ * // Listen for events from the MetaBox API
28
+ * api.addEventListener('metaboxData', (data) => {
29
+ * // Process SetMaterial
30
+ * if (data.eventType === 'basicConfiguratorDataWithState') {
31
+ * new SetMaterial(
32
+ * 'ffea6b5c-3a8a-4f56-9417-e605acb5cca3',
33
+ * 'carpaint',
34
+ * 'dd829d6e-9200-47a7-8d5b-af5df89b7e91',
35
+ * );
36
+ * }
37
+ * });
38
+ * };
39
+ */
40
+ export declare class SetMaterial extends ApiAction {
41
+ /**
42
+ * Creates an instance of SetMaterial.
43
+ *
44
+ * @param productId - The product ID.
45
+ * @param slotId - The slot ID.
46
+ * @param materialId - The material ID.
47
+ */
48
+ constructor(productId: string, slotId: string, materialId: string);
49
+ }
@@ -0,0 +1,65 @@
1
+ /*
2
+ * Copyright (c) 2025.
3
+ * 3DSource.com, Sergii Karanda steve@3dsource.com
4
+ * All Rights Reserved
5
+ */
6
+ import { ApiAction } from './ApiAction';
7
+ import { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
8
+ /**
9
+ * Represents an action to set a material by its ID.
10
+ *
11
+ * @remarks
12
+ * This action sends a message to the MetaBox API to update the material on a specific product slot using the provided identifiers.
13
+
14
+ * **Important:** Before invoking this action, ensure that the MetaBox already dispatched
15
+ * as minimum one eventType:"basicConfiguratorDataWithState":
16
+ * ```javascript
17
+ * data.eventType === 'basicConfiguratorDataWithState'.
18
+ * ```
19
+ * Only then request be processed.
20
+ *
21
+ * @example
22
+ * import { SetMaterial } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
23
+ *
24
+ * // Integrate the MetaBox configurator into an HTML element with the ID 'embed3DSource'
25
+ * integrateMetaBox(
26
+ * 'https://metabox.3dsource.com/metabox-configurator/basic/12345678-1234-1234-1234-01234567890?introImage=https://example.com/intro.webp&sidebar=false',
27
+ * 'embed3DSource'
28
+ * );
29
+ *
30
+ * // Set up the global API environment
31
+ * window.env3DSource = window.env3DSource || {};
32
+ * window.env3DSource.apiReady = (api) => {
33
+ * // Listen for events from the MetaBox API
34
+ * api.addEventListener('metaboxData', (data) => {
35
+ * // Process SetMaterial
36
+ * if (data.eventType === 'basicConfiguratorDataWithState') {
37
+ * new SetMaterial(
38
+ * 'ffea6b5c-3a8a-4f56-9417-e605acb5cca3',
39
+ * 'carpaint',
40
+ * 'dd829d6e-9200-47a7-8d5b-af5df89b7e91',
41
+ * );
42
+ * }
43
+ * });
44
+ * };
45
+ */
46
+ export class SetMaterial extends ApiAction {
47
+ /**
48
+ * Creates an instance of SetMaterial.
49
+ *
50
+ * @param productId - The product ID.
51
+ * @param slotId - The slot ID.
52
+ * @param materialId - The material ID.
53
+ */
54
+ constructor(productId, slotId, materialId) {
55
+ super();
56
+ this.api.sendMessageToMetaBox({
57
+ payload: {
58
+ productId,
59
+ slotId,
60
+ materialId,
61
+ },
62
+ action: ToMetaBoxApiActions.setMaterialById,
63
+ });
64
+ }
65
+ }
@@ -0,0 +1,15 @@
1
+ import { ApiAction } from './ApiAction';
2
+ /**
3
+ * Represents an action to set a product by its ID.
4
+ *
5
+ * @remarks
6
+ * This action sends a message to the MetaBox API to set a product using the provided product ID.
7
+ */
8
+ export declare class SetProduct extends ApiAction {
9
+ /**
10
+ * Creates an instance of SetProduct.
11
+ *
12
+ * @param productId - The product ID.
13
+ */
14
+ constructor(productId: string);
15
+ }
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Copyright (c) 2025.
3
+ * 3DSource.com, Sergii Karanda steve@3dsource.com
4
+ * All Rights Reserved
5
+ */
6
+ import { ApiAction } from './ApiAction';
7
+ import { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
8
+ /**
9
+ * Represents an action to set a product by its ID.
10
+ *
11
+ * @remarks
12
+ * This action sends a message to the MetaBox API to set a product using the provided product ID.
13
+ */
14
+ export class SetProduct extends ApiAction {
15
+ /**
16
+ * Creates an instance of SetProduct.
17
+ *
18
+ * @param productId - The product ID.
19
+ */
20
+ constructor(productId) {
21
+ super();
22
+ this.api.sendMessageToMetaBox({
23
+ payload: {
24
+ productId,
25
+ },
26
+ action: ToMetaBoxApiActions.setProduct,
27
+ });
28
+ }
29
+ }
@@ -0,0 +1,15 @@
1
+ import { ApiAction } from './ApiAction';
2
+ /**
3
+ * Represents an action to toggle the Embedded Menu in MetaBox.
4
+ *
5
+ * @remarks
6
+ * This action sends a message to the MetaBox API to toggle the visibility of the embedded menu.
7
+ */
8
+ export declare class ShowEmbeddedMenu extends ApiAction {
9
+ /**
10
+ * Creates an instance of ShowEmbeddedMenu.
11
+ *
12
+ * @param visible - A flag indicating whether the embedded menu should be visible.
13
+ */
14
+ constructor(visible: boolean);
15
+ }
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Copyright (c) 2025.
3
+ * 3DSource.com, Sergii Karanda steve@3dsource.com
4
+ * All Rights Reserved
5
+ */
6
+ import { ApiAction } from './ApiAction';
7
+ import { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
8
+ /**
9
+ * Represents an action to toggle the Embedded Menu in MetaBox.
10
+ *
11
+ * @remarks
12
+ * This action sends a message to the MetaBox API to toggle the visibility of the embedded menu.
13
+ */
14
+ export class ShowEmbeddedMenu extends ApiAction {
15
+ /**
16
+ * Creates an instance of ShowEmbeddedMenu.
17
+ *
18
+ * @param visible - A flag indicating whether the embedded menu should be visible.
19
+ */
20
+ constructor(visible) {
21
+ super();
22
+ this.api.sendMessageToMetaBox({
23
+ action: ToMetaBoxApiActions.showEmbeddedMenu,
24
+ payload: {
25
+ visible,
26
+ },
27
+ });
28
+ }
29
+ }
@@ -0,0 +1,16 @@
1
+ import { ApiAction } from './ApiAction';
2
+ /**
3
+ * @internal
4
+ * Represents an action to watch Unreal callbacks from Unreal engine.
5
+ * @remarks
6
+ * This class sends a message to the MetaBox API to generate a PDF based on the current configuration.
7
+ */
8
+ export declare class WatchCallbacks extends ApiAction {
9
+ /**
10
+ * Creates an instance of WatchCallbacks.
11
+ *
12
+ * @remarks
13
+ * This constructor does not require any parameters.
14
+ */
15
+ constructor();
16
+ }
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Copyright (c) 2025.
3
+ * 3DSource.com, Sergii Karanda steve@3dsource.com
4
+ * All Rights Reserved
5
+ */
6
+ import { ApiAction } from './ApiAction';
7
+ import { ToMetaBoxApiActions } from '../interfaces/ToMetaboxMessagePayloads';
8
+ /**
9
+ * @internal
10
+ * Represents an action to watch Unreal callbacks from Unreal engine.
11
+ * @remarks
12
+ * This class sends a message to the MetaBox API to generate a PDF based on the current configuration.
13
+ */
14
+ export class WatchCallbacks extends ApiAction {
15
+ /**
16
+ * Creates an instance of WatchCallbacks.
17
+ *
18
+ * @remarks
19
+ * This constructor does not require any parameters.
20
+ */
21
+ constructor() {
22
+ super();
23
+ this.api.sendMessageToMetaBox({
24
+ action: ToMetaBoxApiActions.watchCallbacks,
25
+ });
26
+ }
27
+ }
@@ -0,0 +1,18 @@
1
+ export { ShowEmbeddedMenu } from './actions/ShowEmbeddedMenu';
2
+ export { SetEnvironment } from './actions/SetEnvironment';
3
+ export { SetProduct } from './actions/SetProduct';
4
+ export { GetPdf } from './actions/GetPdf';
5
+ export { SetMaterial } from './actions/SetMaterial';
6
+ export { GetFastRender } from './actions/GetFastRender';
7
+ export { MimeType } from './actions/GetFastRender';
8
+ export * from './lib/integrateMetaBox';
9
+ export * from './lib/initializeCommunicator';
10
+ export * from './lib/saveImage';
11
+ export * from './lib/sleep';
12
+ export * from './lib/UrlUtils';
13
+ export * from './interfaces/UniversalConfigurator';
14
+ export { ToMetaboxMessagePayloads } from './interfaces/ToMetaboxMessagePayloads';
15
+ export { FromMetaBoxAPIEnvelope } from './interfaces/FromMetaboxMessagePayloads';
16
+ export { MetaBoxApiEnvelope } from './interfaces/FromMetaboxMessagePayloads';
17
+ export { FromMetaBoxApiEvents } from './interfaces/FromMetaboxMessagePayloads';
18
+ export { FromMetaboxMessagePayloads } from './interfaces/FromMetaboxMessagePayloads';
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright (c) 2025.
3
+ * 3DSource.com, Sergii Karanda steve@3dsource.com
4
+ * All Rights Reserved
5
+ */
6
+ /*
7
+ * Copyright (c) 2025.
8
+ * 3DSource.com, Sergii Karanda steve@3dsource.com
9
+ * All Rights Reserved
10
+ */
11
+ export { ShowEmbeddedMenu } from './actions/ShowEmbeddedMenu';
12
+ export { SetEnvironment } from './actions/SetEnvironment';
13
+ export { SetProduct } from './actions/SetProduct';
14
+ export { GetPdf } from './actions/GetPdf';
15
+ export { SetMaterial } from './actions/SetMaterial';
16
+ export { GetFastRender } from './actions/GetFastRender';
17
+ export * from './lib/integrateMetaBox';
18
+ export * from './lib/initializeCommunicator';
19
+ export * from './lib/saveImage';
20
+ export * from './lib/sleep';
21
+ export * from './lib/UrlUtils';
22
+ export * from './interfaces/UniversalConfigurator';