@3dsource/metabox-front-api 3.0.32 → 3.0.34

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.
@@ -1,5 +1,4 @@
1
- import { Observable } from 'rxjs';
2
-
1
+ import { Observable } from "rxjs";
3
2
  /**
4
3
  * @internal
5
4
  * @hidden
@@ -20,7 +19,7 @@ import { Observable } from 'rxjs';
20
19
  *
21
20
  * @internal
22
21
  */
23
- declare const Metabox = "metabox";
22
+ export declare const Metabox = "metabox";
24
23
  /**
25
24
  * Identifier used as the `host` field in postMessage envelopes sent to the iframe.
26
25
  *
@@ -36,7 +35,7 @@ declare const Metabox = "metabox";
36
35
  *
37
36
  * @internal
38
37
  */
39
- declare const MetaboxHost = "metaboxHost";
38
+ export declare const MetaboxHost = "metaboxHost";
40
39
  /**
41
40
  * Action string dispatched by the iframe when the configurator app has loaded.
42
41
  *
@@ -54,7 +53,7 @@ declare const MetaboxHost = "metaboxHost";
54
53
  *
55
54
  * @internal
56
55
  */
57
- declare const AppLoaded = "appLoaded";
56
+ export declare const AppLoaded = "appLoaded";
58
57
  /**
59
58
  * Default production domain for the Metabox Basic Configurator.
60
59
  *
@@ -73,16 +72,16 @@ declare const AppLoaded = "appLoaded";
73
72
  /**
74
73
  * @deprecated
75
74
  */
76
- declare const Metabox_V3 = "metabox_v3";
75
+ export declare const Metabox_V3 = "metabox_v3";
77
76
  /**
78
77
  * @deprecated
79
78
  */
80
- declare const MetaboxHost_V3 = "metaboxHost_v3";
79
+ export declare const MetaboxHost_V3 = "metaboxHost_v3";
81
80
  /**
82
81
  * @deprecated
83
82
  */
84
- declare const AppLoaded_V3 = "appLoaded_v3";
85
- declare const MetaboxDomain = "metabox.3dsource.com";
83
+ export declare const AppLoaded_V3 = "appLoaded_v3";
84
+ export declare const MetaboxDomain = "metabox.3dsource.com";
86
85
  /**
87
86
  * Base route path appended to the domain when building the configurator iframe URL.
88
87
  *
@@ -97,10 +96,8 @@ declare const MetaboxDomain = "metabox.3dsource.com";
97
96
  * Let integrateMetabox() handle URL construction. Only reference if building URLs manually
98
97
  * (e.g., QR codes, email links, server-side rendering).
99
98
  */
100
- declare const BasicRouteUrl = "metabox-configurator/basic";
101
-
102
- declare const VERSION = "3.0.32";
103
-
99
+ export declare const BasicRouteUrl = "metabox-configurator/basic";
100
+ export declare const VERSION = "3.0.34";
104
101
  /**
105
102
  * Configuration options for integrating the Metabox Basic Configurator iframe into a host page.
106
103
  * Passed as the `config` parameter to {@link integrateMetabox}.
@@ -123,30 +120,30 @@ declare const VERSION = "3.0.32";
123
120
  * manually via the ResumeStream command.
124
121
  */
125
122
  interface IntegrateMetaboxConfig {
126
- /** If true, disables Metabox custom template and all related logic. */
127
- standalone?: boolean;
128
- /** URL to an image displayed while the configurator is loading (added as `?loadingImage=...`). */
129
- loadingImage?: string;
130
- /** URL to a video shown on the intro screen (added as `?introVideo=...`). */
131
- introVideo?: string;
132
- /** URL to an image shown on the intro screen (added as `?introImage=...`). */
133
- introImage?: string;
134
- /** Predefined state for the configurator on initial loading in rison format (see
135
- * https://github.com/Nanonid/rison) (added as `?state=...`). */
136
- state?: string;
137
- /** Custom domain for testing purposes. Defaults to `metabox.3dsource.com`. HTTPS is enforced. */
138
- domain?: string;
139
- /** If true, shows the loading progress bar inside the configurator (added as `?showLoadingProgress=true`). */
140
- showLoadingProgress?: boolean;
141
- /** If true, shows the resume stream popup when the stream is paused (added as `?showResumeStreamPopup=true`). */
142
- showResumeStreamPopup?: boolean;
143
- /** If true, shows the user inactivity countdown popup before disconnecting (added as `?showUserInactivityTimer=true`). */
144
- showUserInactivityTimer?: boolean;
145
- /** Inactivity timeout in seconds before the user is warned and eventually disconnected (added as `?userInactivityTimeout=...`). */
146
- userInactivityTimeout?: number;
147
- /** Controls whether the pixel stream starts automatically on load (added as `?autoStartStream=...`).
148
- * Set to `false` to defer streaming until you start it manually via the {@link ResumeStream} command. */
149
- autoStartStream?: boolean;
123
+ /** If true, disables Metabox custom template and all related logic. */
124
+ standalone?: boolean;
125
+ /** URL to an image displayed while the configurator is loading (added as `?loadingImage=...`). */
126
+ loadingImage?: string;
127
+ /** URL to a video shown on the intro screen (added as `?introVideo=...`). */
128
+ introVideo?: string;
129
+ /** URL to an image shown on the intro screen (added as `?introImage=...`). */
130
+ introImage?: string;
131
+ /** Predefined state for the configurator on initial loading in rison format (see
132
+ * https://github.com/Nanonid/rison) (added as `?state=...`). */
133
+ state?: string;
134
+ /** Custom domain for testing purposes. Defaults to `metabox.3dsource.com`. HTTPS is enforced. */
135
+ domain?: string;
136
+ /** If true, shows the loading progress bar inside the configurator (added as `?showLoadingProgress=true`). */
137
+ showLoadingProgress?: boolean;
138
+ /** If true, shows the resume stream popup when the stream is paused (added as `?showResumeStreamPopup=true`). */
139
+ showResumeStreamPopup?: boolean;
140
+ /** If true, shows the user inactivity countdown popup before disconnecting (added as `?showUserInactivityTimer=true`). */
141
+ showUserInactivityTimer?: boolean;
142
+ /** Inactivity timeout in seconds before the user is warned and eventually disconnected (added as `?userInactivityTimeout=...`). */
143
+ userInactivityTimeout?: number;
144
+ /** Controls whether the pixel stream starts automatically on load (added as `?autoStartStream=...`).
145
+ * Set to `false` to defer streaming until you start it manually via the {@link ResumeStream} command. */
146
+ autoStartStream?: boolean;
150
147
  }
151
148
  /**
152
149
  * Internal configuration sent to the Metabox Basic Configurator via postMessage.
@@ -164,14 +161,13 @@ interface IntegrateMetaboxConfig {
164
161
  * command class constructors for their specific parameter requirements rather than this config.
165
162
  */
166
163
  interface MetaboxCommandConfig {
167
- /** If true, disables Metabox custom template and all related logic. */
168
- standalone?: boolean;
169
- /** The URL of the host page embedding the configurator. */
170
- hostUrl: string;
171
- /** The API version string sent to the configurator for compatibility. */
172
- apiVersion: string;
164
+ /** If true, disables Metabox custom template and all related logic. */
165
+ standalone?: boolean;
166
+ /** The URL of the host page embedding the configurator. */
167
+ hostUrl: string;
168
+ /** The API version string sent to the configurator for compatibility. */
169
+ apiVersion: string;
173
170
  }
174
-
175
171
  /**
176
172
  * Registry of all action identifiers that can be sent from the host application to the Metabox Basic Configurator.
177
173
  * Each key maps to a string used as the `action` field in the postMessage envelope.
@@ -188,33 +184,33 @@ interface MetaboxCommandConfig {
188
184
  * Each key is an action name, value is its description. Excellent reference for AI coding agents to understand
189
185
  * the full command vocabulary available.
190
186
  */
191
- declare const MetaboxBasicConfiguratorActions: {
192
- readonly metaboxConfig: "metaboxConfig";
193
- readonly resumeStream: "resumeStream";
194
- readonly stopStream: "stopStream";
195
- readonly setEnvironment: "setEnvironment";
196
- readonly setEnvironmentMaterialById: "setEnvironmentMaterialById";
197
- readonly setProduct: "setProduct";
198
- readonly setProductMaterialById: "setProductMaterialById";
199
- readonly setMaterials: "setMaterials";
200
- readonly getPdf: "getPdf";
201
- readonly getCallToActionInformation: "getCallToActionInformation";
202
- readonly getScreenshot: "getScreenshot";
203
- readonly showEmbeddedMenu: "showEmbeddedMenu";
204
- readonly showOverlayInterface: "showOverlayInterface";
205
- readonly getCamera: "getCamera";
206
- readonly setCamera: "setCamera";
207
- readonly resetCamera: "resetCamera";
208
- readonly resetConfiguration: "resetConfiguration";
209
- readonly applyZoom: "applyZoom";
210
- readonly initShowcase: "initShowcase";
211
- readonly playShowcase: "playShowcase";
212
- readonly pauseShowcase: "pauseShowcase";
213
- readonly stopShowcase: "stopShowcase";
214
- readonly sendCommandToUnreal: "sendCommandToUnreal";
215
- readonly showMeasurement: "showMeasurement";
216
- readonly hideMeasurement: "hideMeasurement";
217
- readonly resetUserInactivityTimer: "resetUserInactivityTimer";
187
+ export declare const MetaboxBasicConfiguratorActions: {
188
+ readonly metaboxConfig: "metaboxConfig";
189
+ readonly resumeStream: "resumeStream";
190
+ readonly stopStream: "stopStream";
191
+ readonly setEnvironment: "setEnvironment";
192
+ readonly setEnvironmentMaterialById: "setEnvironmentMaterialById";
193
+ readonly setProduct: "setProduct";
194
+ readonly setProductMaterialById: "setProductMaterialById";
195
+ readonly setMaterials: "setMaterials";
196
+ readonly getPdf: "getPdf";
197
+ readonly getCallToActionInformation: "getCallToActionInformation";
198
+ readonly getScreenshot: "getScreenshot";
199
+ readonly showEmbeddedMenu: "showEmbeddedMenu";
200
+ readonly showOverlayInterface: "showOverlayInterface";
201
+ readonly getCamera: "getCamera";
202
+ readonly setCamera: "setCamera";
203
+ readonly resetCamera: "resetCamera";
204
+ readonly resetConfiguration: "resetConfiguration";
205
+ readonly applyZoom: "applyZoom";
206
+ readonly initShowcase: "initShowcase";
207
+ readonly playShowcase: "playShowcase";
208
+ readonly pauseShowcase: "pauseShowcase";
209
+ readonly stopShowcase: "stopShowcase";
210
+ readonly sendCommandToUnreal: "sendCommandToUnreal";
211
+ readonly showMeasurement: "showMeasurement";
212
+ readonly hideMeasurement: "hideMeasurement";
213
+ readonly resetUserInactivityTimer: "resetUserInactivityTimer";
218
214
  };
219
215
  /**
220
216
  * Union of all action string literals from {@link MetaboxBasicConfiguratorActions}.
@@ -230,12 +226,12 @@ declare const MetaboxBasicConfiguratorActions: {
230
226
  * Reference for building command dispatchers or admin tools. Full command set includes all values of
231
227
  * MetaboxBasicConfiguratorActions like: "metaboxConfig" | "setEnvironment" | "setEnvironmentMaterialById" | ...
232
228
  */
233
- type ToMetaBoxActions = (typeof MetaboxBasicConfiguratorActions)[keyof typeof MetaboxBasicConfiguratorActions];
229
+ export type ToMetaBoxActions = (typeof MetaboxBasicConfiguratorActions)[keyof typeof MetaboxBasicConfiguratorActions];
234
230
  /**
235
231
  * @internal
236
232
  * @hidden
237
233
  */
238
- type ToMetaboxMessagePayload = ToMetaboxMessagePayloads[keyof ToMetaboxMessagePayloads];
234
+ export type ToMetaboxMessagePayload = ToMetaboxMessagePayloads[keyof ToMetaboxMessagePayloads];
239
235
  /**
240
236
  * Interface for messages sent from the application to the Basic Metabox API.
241
237
  *
@@ -250,59 +246,59 @@ type ToMetaboxMessagePayload = ToMetaboxMessagePayloads[keyof ToMetaboxMessagePa
250
246
  * Use as TypeScript type reference for proper typing when building dynamic command dispatchers.
251
247
  * Each key corresponds to a command name and its value defines the expected payload structure.
252
248
  */
253
- interface ToMetaboxMessagePayloads {
254
- [MetaboxBasicConfiguratorActions.metaboxConfig]: {
255
- appId: string;
256
- config: MetaboxCommandConfig;
257
- };
258
- [MetaboxBasicConfiguratorActions.setProduct]: {
259
- productId: string;
260
- };
261
- [MetaboxBasicConfiguratorActions.setEnvironment]: {
262
- id: string;
263
- };
264
- [MetaboxBasicConfiguratorActions.getPdf]: void;
265
- [MetaboxBasicConfiguratorActions.getCallToActionInformation]: void;
266
- [MetaboxBasicConfiguratorActions.getScreenshot]: {
267
- format: MimeType;
268
- size?: {
269
- x: number;
270
- y: number;
271
- };
272
- };
273
- [MetaboxBasicConfiguratorActions.setProductMaterialById]: {
274
- slotId: string;
275
- materialId: string;
276
- };
277
- [MetaboxBasicConfiguratorActions.setEnvironmentMaterialById]: {
278
- slotId: string;
279
- materialId: string;
280
- };
281
- [MetaboxBasicConfiguratorActions.setMaterials]: {
282
- materials: MaterialCommandEnvelope[];
283
- };
284
- [MetaboxBasicConfiguratorActions.showEmbeddedMenu]: {
285
- visible: boolean;
286
- };
287
- [MetaboxBasicConfiguratorActions.showOverlayInterface]: {
288
- visible: boolean;
289
- };
290
- [MetaboxBasicConfiguratorActions.getCamera]: void;
291
- [MetaboxBasicConfiguratorActions.setCamera]: {
292
- camera: CameraCommandPayload;
293
- };
294
- [MetaboxBasicConfiguratorActions.resetCamera]: void;
295
- [MetaboxBasicConfiguratorActions.resetConfiguration]: void;
296
- [MetaboxBasicConfiguratorActions.applyZoom]: {
297
- zoom: number;
249
+ export interface ToMetaboxMessagePayloads {
250
+ [MetaboxBasicConfiguratorActions.metaboxConfig]: {
251
+ appId: string;
252
+ config: MetaboxCommandConfig;
253
+ };
254
+ [MetaboxBasicConfiguratorActions.setProduct]: {
255
+ productId: string;
256
+ };
257
+ [MetaboxBasicConfiguratorActions.setEnvironment]: {
258
+ id: string;
259
+ };
260
+ [MetaboxBasicConfiguratorActions.getPdf]: void;
261
+ [MetaboxBasicConfiguratorActions.getCallToActionInformation]: void;
262
+ [MetaboxBasicConfiguratorActions.getScreenshot]: {
263
+ format: MimeType;
264
+ size?: {
265
+ x: number;
266
+ y: number;
298
267
  };
299
- [MetaboxBasicConfiguratorActions.initShowcase]: void;
300
- [MetaboxBasicConfiguratorActions.playShowcase]: void;
301
- [MetaboxBasicConfiguratorActions.pauseShowcase]: void;
302
- [MetaboxBasicConfiguratorActions.stopShowcase]: void;
303
- [MetaboxBasicConfiguratorActions.sendCommandToUnreal]: object;
304
- [MetaboxBasicConfiguratorActions.resetUserInactivityTimer]: void;
305
- [MetaboxBasicConfiguratorActions.stopStream]: void;
268
+ };
269
+ [MetaboxBasicConfiguratorActions.setProductMaterialById]: {
270
+ slotId: string;
271
+ materialId: string;
272
+ };
273
+ [MetaboxBasicConfiguratorActions.setEnvironmentMaterialById]: {
274
+ slotId: string;
275
+ materialId: string;
276
+ };
277
+ [MetaboxBasicConfiguratorActions.setMaterials]: {
278
+ materials: MaterialCommandEnvelope[];
279
+ };
280
+ [MetaboxBasicConfiguratorActions.showEmbeddedMenu]: {
281
+ visible: boolean;
282
+ };
283
+ [MetaboxBasicConfiguratorActions.showOverlayInterface]: {
284
+ visible: boolean;
285
+ };
286
+ [MetaboxBasicConfiguratorActions.getCamera]: void;
287
+ [MetaboxBasicConfiguratorActions.setCamera]: {
288
+ camera: CameraCommandPayload;
289
+ };
290
+ [MetaboxBasicConfiguratorActions.resetCamera]: void;
291
+ [MetaboxBasicConfiguratorActions.resetConfiguration]: void;
292
+ [MetaboxBasicConfiguratorActions.applyZoom]: {
293
+ zoom: number;
294
+ };
295
+ [MetaboxBasicConfiguratorActions.initShowcase]: void;
296
+ [MetaboxBasicConfiguratorActions.playShowcase]: void;
297
+ [MetaboxBasicConfiguratorActions.pauseShowcase]: void;
298
+ [MetaboxBasicConfiguratorActions.stopShowcase]: void;
299
+ [MetaboxBasicConfiguratorActions.sendCommandToUnreal]: object;
300
+ [MetaboxBasicConfiguratorActions.resetUserInactivityTimer]: void;
301
+ [MetaboxBasicConfiguratorActions.stopStream]: void;
306
302
  }
307
303
  /**
308
304
  * One entry of a {@link SetMaterials} batch — the full envelope of a single material command,
@@ -320,18 +316,18 @@ interface ToMetaboxMessagePayloads {
320
316
  * Reference this type when parsing or logging raw postMessage traffic, or when reconstructing a
321
317
  * saved configuration. Discriminate on `action` to tell the targets apart.
322
318
  */
323
- type MaterialCommandEnvelope = {
324
- action: typeof MetaboxBasicConfiguratorActions.setProductMaterialById;
325
- payload: {
326
- slotId: string;
327
- materialId: string;
328
- };
319
+ export type MaterialCommandEnvelope = {
320
+ action: typeof MetaboxBasicConfiguratorActions.setProductMaterialById;
321
+ payload: {
322
+ slotId: string;
323
+ materialId: string;
324
+ };
329
325
  } | {
330
- action: typeof MetaboxBasicConfiguratorActions.setEnvironmentMaterialById;
331
- payload: {
332
- slotId: string;
333
- materialId: string;
334
- };
326
+ action: typeof MetaboxBasicConfiguratorActions.setEnvironmentMaterialById;
327
+ payload: {
328
+ slotId: string;
329
+ materialId: string;
330
+ };
335
331
  };
336
332
  /**
337
333
  * Payload for the {@link SetCamera} command describing the desired camera state in the Unreal scene.
@@ -351,33 +347,33 @@ type MaterialCommandEnvelope = {
351
347
  * Only include restriction fields you want to enforce; omitted values keep current settings.
352
348
  * In orbit mode, distance limits are relative to the orbit pivot.
353
349
  */
354
- interface CameraCommandPayload {
355
- /** Field of a view angle in degrees. */
356
- fov?: number;
357
- /** Camera control mode: `'fps'` for first-person or `'orbit'` for orbital rotation around pivot. */
358
- mode?: 'fps' | 'orbit';
359
- /** Camera position in 3D world space. */
360
- position?: {
361
- x: number;
362
- y: number;
363
- z: number;
364
- };
365
- /** Camera rotation angles in degrees. */
366
- rotation?: {
367
- horizontal: number;
368
- vertical: number;
369
- };
370
- /** Min/max constraints applied to camera movement, zoom, and rotation. */
371
- restrictions?: {
372
- maxDistanceToPivot?: number;
373
- maxFov?: number;
374
- maxHorizontalRotation?: number;
375
- maxVerticalRotation?: number;
376
- minDistanceToPivot?: number;
377
- minFov?: number;
378
- minHorizontalRotation?: number;
379
- minVerticalRotation?: number;
380
- };
350
+ export interface CameraCommandPayload {
351
+ /** Field of a view angle in degrees. */
352
+ fov?: number;
353
+ /** Camera control mode: `'fps'` for first-person or `'orbit'` for orbital rotation around pivot. */
354
+ mode?: 'fps' | 'orbit';
355
+ /** Camera position in 3D world space. */
356
+ position?: {
357
+ x: number;
358
+ y: number;
359
+ z: number;
360
+ };
361
+ /** Camera rotation angles in degrees. */
362
+ rotation?: {
363
+ horizontal: number;
364
+ vertical: number;
365
+ };
366
+ /** Min/max constraints applied to camera movement, zoom, and rotation. */
367
+ restrictions?: {
368
+ maxDistanceToPivot?: number;
369
+ maxFov?: number;
370
+ maxHorizontalRotation?: number;
371
+ maxVerticalRotation?: number;
372
+ minDistanceToPivot?: number;
373
+ minFov?: number;
374
+ minHorizontalRotation?: number;
375
+ minVerticalRotation?: number;
376
+ };
381
377
  }
382
378
  /**
383
379
  * @internal
@@ -395,15 +391,15 @@ interface CameraCommandPayload {
395
391
  * Do not construct manually. The Communicator handles all message wrapping. Only reference this interface
396
392
  * if debugging raw postMessage traffic in browser devtools to diagnose why commands aren't being received.
397
393
  */
398
- interface ToMetaBoxMessageEnvelope {
399
- action: ToMetaBoxActions;
400
- payload?: ToMetaboxMessagePayload | never;
394
+ export interface ToMetaBoxMessageEnvelope {
395
+ action: ToMetaBoxActions;
396
+ payload?: ToMetaboxMessagePayload | never;
401
397
  }
402
398
  /**
403
399
  * @internal
404
400
  * @hidden
405
401
  */
406
- type ToMetaboxTarget = 'metabox' | 'child';
402
+ export type ToMetaboxTarget = 'metabox' | 'child';
407
403
  /**
408
404
  * @internal
409
405
  * @hidden
@@ -420,17 +416,23 @@ type ToMetaboxTarget = 'metabox' | 'child';
420
416
  * Do not construct ToMetaBoxMessage objects. Always use `api.sendCommandToMetabox(new CommandName(...))`.
421
417
  * The Communicator wraps your command in the correct message format automatically.
422
418
  */
423
- interface ToMetaBoxMessage {
424
- host: typeof MetaboxHost;
425
- envelope: ToMetaBoxMessageEnvelope;
426
- /**
427
- * @deprecated, use envelope instead of payload
428
- */
429
- payload: ToMetaBoxMessageEnvelope;
430
- target: ToMetaboxTarget;
431
- apiVersion: string;
419
+ export interface ToMetaBoxMessage {
420
+ host: typeof MetaboxHost;
421
+ envelope: ToMetaBoxMessageEnvelope;
422
+ /**
423
+ * @deprecated, use envelope instead of payload
424
+ */
425
+ payload: ToMetaBoxMessageEnvelope;
426
+ target: ToMetaboxTarget;
427
+ apiVersion: string;
428
+ /**
429
+ * True when the command is sent while the host page has transient user activation
430
+ * (a click or key press within the last few seconds). Metabox counts analytics for
431
+ * embed API commands only when it is true, so a command sent on page load is not
432
+ * recorded as a shopper's choice.
433
+ */
434
+ userActivated: boolean;
432
435
  }
433
-
434
436
  /**
435
437
  * Represents an ecom configurator object with all necessary information about cta.
436
438
  *
@@ -447,14 +449,14 @@ interface ToMetaBoxMessage {
447
449
  * configuration data when CTA is triggered.
448
450
  */
449
451
  interface EcomConfigurator {
450
- /** The unique ecom configurator identifier. */
451
- id: string;
452
- /** The created data of ecom configurator. */
453
- createdAt: string;
454
- /** A reference to the Call To Action Information. */
455
- cta?: Cta;
456
- /** Represents object typename for the ecom configurator. */
457
- __typename: 'Configurator';
452
+ /** The unique ecom configurator identifier. */
453
+ id: string;
454
+ /** The created data of ecom configurator. */
455
+ createdAt: string;
456
+ /** A reference to the Call To Action Information. */
457
+ cta?: Cta;
458
+ /** Represents object typename for the ecom configurator. */
459
+ __typename: 'Configurator';
458
460
  }
459
461
  /**
460
462
  * Represents the call-to-action information for an ecom configurator.
@@ -473,16 +475,15 @@ interface EcomConfigurator {
473
475
  * the config JSON to the callback URL. The backend returns `{ redirectUrl }`.
474
476
  */
475
477
  interface Cta {
476
- /** The indicator of whether the call-to-action is enabled or not. */
477
- enabled: boolean;
478
- /** Label of button for call-to-action. */
479
- label: string;
480
- /** Callback URL using for sent configurator selected information to this url and redirected to the url after get response. */
481
- callbackUrl: string;
482
- /** Represents object typename for the CTA object. */
483
- __typename: 'Cta';
478
+ /** The indicator of whether the call-to-action is enabled or not. */
479
+ enabled: boolean;
480
+ /** Label of button for call-to-action. */
481
+ label: string;
482
+ /** Callback URL using for sent configurator selected information to this url and redirected to the url after get response. */
483
+ callbackUrl: string;
484
+ /** Represents object typename for the CTA object. */
485
+ __typename: 'Cta';
484
486
  }
485
-
486
487
  /**
487
488
  * Represents a basic configurator object with its configuration, selected materials,
488
489
  * product identifier, and associated environment with its materials.
@@ -503,26 +504,26 @@ interface Cta {
503
504
  * (scene materials). Rebuild affected UI sections on each update.
504
505
  */
505
506
  interface ConfiguratorEnvelope {
506
- /**
507
- * A reference to the universal configurator.
508
- */
509
- configurator: UniversalConfigurator;
510
- /**
511
- * The unique product identifier.
512
- */
513
- productId: string;
514
- /**
515
- * A record mapping product material selections.
516
- */
517
- productMaterialsIds: SelectedIds;
518
- /**
519
- * The unique environment identifier.
520
- */
521
- environmentId: string;
522
- /**
523
- * A record mapping environment material selections.
524
- */
525
- environmentMaterialsIds: SelectedIds;
507
+ /**
508
+ * A reference to the universal configurator.
509
+ */
510
+ configurator: UniversalConfigurator;
511
+ /**
512
+ * The unique product identifier.
513
+ */
514
+ productId: string;
515
+ /**
516
+ * A record mapping product material selections.
517
+ */
518
+ productMaterialsIds: SelectedIds;
519
+ /**
520
+ * The unique environment identifier.
521
+ */
522
+ environmentId: string;
523
+ /**
524
+ * A record mapping environment material selections.
525
+ */
526
+ environmentMaterialsIds: SelectedIds;
526
527
  }
527
528
  /**
528
529
  * Represents the universal configurator with its basic properties and components.
@@ -542,22 +543,22 @@ interface ConfiguratorEnvelope {
542
543
  * product listing, each product's `slots` for material options, and `environments` for scene switching.
543
544
  */
544
545
  interface UniversalConfigurator {
545
- /** Unique identifier for the configurator. */
546
- id: string;
547
- /** The name of the configurator. */
548
- name: string;
549
- /** Label for the product collection. */
550
- productCollectionLabel: string;
551
- /** A list of products for the configurator. */
552
- products: UniversalConfiguratorProduct[];
553
- /** A list of available environments. */
554
- environments: UniversalConfiguratorEnvironment[];
555
- /** Indicates if the configurator is active. */
556
- isActive: boolean;
557
- /** Indicates if the cta in ecom configurator is enabled or not. */
558
- ctaEnabled: boolean;
559
- /** Represents object typename for the configurator. */
560
- __typename: 'UniversalConfigurator';
546
+ /** Unique identifier for the configurator. */
547
+ id: string;
548
+ /** The name of the configurator. */
549
+ name: string;
550
+ /** Label for the product collection. */
551
+ productCollectionLabel: string;
552
+ /** A list of products for the configurator. */
553
+ products: UniversalConfiguratorProduct[];
554
+ /** A list of available environments. */
555
+ environments: UniversalConfiguratorEnvironment[];
556
+ /** Indicates if the configurator is active. */
557
+ isActive: boolean;
558
+ /** Indicates if the cta in ecom configurator is enabled or not. */
559
+ ctaEnabled: boolean;
560
+ /** Represents object typename for the configurator. */
561
+ __typename: 'UniversalConfigurator';
561
562
  }
562
563
  /**
563
564
  * Represents a product within the universal configurator.
@@ -575,16 +576,16 @@ interface UniversalConfigurator {
575
576
  * Sort by `position` if rendering a product list to match the order configured in MetaBox admin.
576
577
  */
577
578
  interface UniversalConfiguratorProduct {
578
- /** The product's unique identifier. */
579
- productId: string;
580
- /** Position index of the product. */
581
- position: number;
582
- /** Display label for the product. */
583
- label: string;
584
- /** The detailed product information. */
585
- product: Product;
586
- /** Represents object typename for the product. */
587
- __typename: 'UniversalConfiguratorProduct';
579
+ /** The product's unique identifier. */
580
+ productId: string;
581
+ /** Position index of the product. */
582
+ position: number;
583
+ /** Display label for the product. */
584
+ label: string;
585
+ /** The detailed product information. */
586
+ product: Product;
587
+ /** Represents object typename for the product. */
588
+ __typename: 'UniversalConfiguratorProduct';
588
589
  }
589
590
  /**
590
591
  * Represents product details including visual assets and configuration.
@@ -600,22 +601,22 @@ interface UniversalConfiguratorProduct {
600
601
  * (ERP, PIM, Shopify, etc.). The product represents the underlying 3D asset rendered in the Unreal viewport.
601
602
  */
602
603
  interface Product {
603
- /** The title of the product. */
604
- title: string;
605
- /** List of thumbnails for the product. */
606
- thumbnailList: Thumbnail[];
607
- /** Available slots for the product. */
608
- slots: Slot[];
609
- /** List of metaProperties for the product (optional). */
610
- metaProperties: MetaProperty[];
611
- /** Unique identifier for the product. */
612
- id: string;
613
- /** Unique external id for the product. */
614
- externalId: string;
615
- /** Showcase details for the product. */
616
- showcase?: Showcase;
617
- /** Represents object typename for the product. */
618
- __typename: 'Product';
604
+ /** The title of the product. */
605
+ title: string;
606
+ /** List of thumbnails for the product. */
607
+ thumbnailList: Thumbnail[];
608
+ /** Available slots for the product. */
609
+ slots: Slot[];
610
+ /** List of metaProperties for the product (optional). */
611
+ metaProperties: MetaProperty[];
612
+ /** Unique identifier for the product. */
613
+ id: string;
614
+ /** Unique external id for the product. */
615
+ externalId: string;
616
+ /** Showcase details for the product. */
617
+ showcase?: Showcase;
618
+ /** Represents object typename for the product. */
619
+ __typename: 'Product';
619
620
  }
620
621
  /**
621
622
  * Represents a thumbnail image entity with dimensions and URL path.
@@ -632,14 +633,14 @@ interface Product {
632
633
  * Implement lazy loading for grids with many options. Consider preloading thumbnails for the currently visible category.
633
634
  */
634
635
  interface Thumbnail {
635
- /** Width of the thumbnail. */
636
- width: number;
637
- /** Height of the thumbnail. */
638
- height: number;
639
- /** URL path to the thumbnail image. */
640
- urlPath: string;
641
- /** Represents object typename (as a string, flexible type). */
642
- __typename: 'Thumbnail';
636
+ /** Width of the thumbnail. */
637
+ width: number;
638
+ /** Height of the thumbnail. */
639
+ height: number;
640
+ /** URL path to the thumbnail image. */
641
+ urlPath: string;
642
+ /** Represents object typename (as a string, flexible type). */
643
+ __typename: 'Thumbnail';
643
644
  }
644
645
  /**
645
646
  * Represents a slot within a product that may allow material customization.
@@ -658,14 +659,14 @@ interface Thumbnail {
658
659
  * for that specific surface.
659
660
  */
660
661
  interface Slot {
661
- /** Unique identifier for the slot. */
662
- id: string;
663
- /** Display a label for the slot. */
664
- label: string;
665
- /** A list of enabled materials for the slot. */
666
- enabledMaterials: Material[];
667
- /** Represents object typename for the slot. */
668
- __typename: 'Slot';
662
+ /** Unique identifier for the slot. */
663
+ id: string;
664
+ /** Display a label for the slot. */
665
+ label: string;
666
+ /** A list of enabled materials for the slot. */
667
+ enabledMaterials: Material[];
668
+ /** Represents object typename for the slot. */
669
+ __typename: 'Slot';
669
670
  }
670
671
  /**
671
672
  * Represents a metaProperty within a product that may allow business logic customization.
@@ -682,16 +683,16 @@ interface Slot {
682
683
  * display purposes — tooltips, pricing, lead times, availability badges. These are set by content teams in MetaBox admin.
683
684
  */
684
685
  interface MetaProperty {
685
- /** Unique identifier for the metaProperty. */
686
- id: string;
687
- /** Display the name for the metaProperty. */
688
- name: string;
689
- /** Value for the metaProperty. */
690
- value: string;
691
- /** Type for the metaProperty. */
692
- type: string;
693
- /** Represents object typename for the metaProperty. */
694
- __typename: 'MetaProperty';
686
+ /** Unique identifier for the metaProperty. */
687
+ id: string;
688
+ /** Display the name for the metaProperty. */
689
+ name: string;
690
+ /** Value for the metaProperty. */
691
+ value: string;
692
+ /** Type for the metaProperty. */
693
+ type: string;
694
+ /** Represents object typename for the metaProperty. */
695
+ __typename: 'MetaProperty';
695
696
  }
696
697
  /**
697
698
  * Represents a material that can be applied to a product slot.
@@ -710,16 +711,16 @@ interface MetaProperty {
710
711
  * Pass material.id to SetProductMaterial or SetEnvironmentMaterial.
711
712
  */
712
713
  interface Material {
713
- /** Unique identifier for the material. */
714
- id: string;
715
- /** Title or name of the material. */
716
- title: string;
717
- /** Unique external id for the material. */
718
- externalId: string;
719
- /** List of thumbnails for the material. */
720
- thumbnailList: Thumbnail[];
721
- /** Represents object typename for the material. */
722
- __typename: 'Material';
714
+ /** Unique identifier for the material. */
715
+ id: string;
716
+ /** Title or name of the material. */
717
+ title: string;
718
+ /** Unique external id for the material. */
719
+ externalId: string;
720
+ /** List of thumbnails for the material. */
721
+ thumbnailList: Thumbnail[];
722
+ /** Represents object typename for the material. */
723
+ __typename: 'Material';
723
724
  }
724
725
  /**
725
726
  * Details showcase the presentation of a product.
@@ -737,12 +738,12 @@ interface Material {
737
738
  * via showcaseStatusChanged.
738
739
  */
739
740
  interface Showcase {
740
- /** A list of low-bandwidth versions for the showcase (optional). */
741
- lowBandwidth?: (Timecode | null)[] | null;
742
- /** Duration for the showcase (optional). */
743
- duration?: number;
744
- /** Represents object typename for the showcase. */
745
- __typename: 'Showcase';
741
+ /** A list of low-bandwidth versions for the showcase (optional). */
742
+ lowBandwidth?: (Timecode | null)[] | null;
743
+ /** Duration for the showcase (optional). */
744
+ duration?: number;
745
+ /** Represents object typename for the showcase. */
746
+ __typename: 'Showcase';
746
747
  }
747
748
  /**
748
749
  * Represents a low-bandwidth entity used in showcases in LBM mode.
@@ -759,27 +760,27 @@ interface Showcase {
759
760
  * Combine with showcaseStatusChanged to build full media player controls for product demo presentations.
760
761
  */
761
762
  interface Timecode {
762
- /** Time marker for the entity. */
763
- time: number;
764
- /** Duration of the entity display. */
765
- duration: number;
766
- /** Represents object typename (as a string, flexible type). */
767
- __typename: 'Timecode';
763
+ /** Time marker for the entity. */
764
+ time: number;
765
+ /** Duration of the entity display. */
766
+ duration: number;
767
+ /** Represents object typename (as a string, flexible type). */
768
+ __typename: 'Timecode';
768
769
  }
769
770
  /**
770
771
  * Represents the environment settings for a universal configurator.
771
772
  */
772
773
  interface UniversalConfiguratorEnvironment {
773
- /** Unique identifier for the environment. */
774
- environmentId: string;
775
- /** Position index of the environment. */
776
- position: number;
777
- /** Display label for the environment. */
778
- label: string;
779
- /** Detailed environment configuration. */
780
- environment: Environment;
781
- /** Represents object typename for the environment. */
782
- __typename: 'UniversalConfiguratorEnvironment';
774
+ /** Unique identifier for the environment. */
775
+ environmentId: string;
776
+ /** Position index of the environment. */
777
+ position: number;
778
+ /** Display label for the environment. */
779
+ label: string;
780
+ /** Detailed environment configuration. */
781
+ environment: Environment;
782
+ /** Represents object typename for the environment. */
783
+ __typename: 'UniversalConfiguratorEnvironment';
783
784
  }
784
785
  /**
785
786
  * Represents an environment with associated media and configuration.
@@ -796,22 +797,22 @@ interface UniversalConfiguratorEnvironment {
796
797
  * Check udsEnabled to know if time-of-day controls are available. Iterate a slot array to build environment material pickers.
797
798
  */
798
799
  interface Environment {
799
- /** Unique identifier for the environment. */
800
- id: string;
801
- /** Title or name of the environment. */
802
- title: string;
803
- /** Flag indicating if UDS is enabled. */
804
- udsEnabled: boolean;
805
- /** The north yaw of the sun in the environment. */
806
- sunNorthYaw: number;
807
- /** The UDS hour setting for the environment. */
808
- udsHour: number;
809
- /** Represents object typename for the environment. */
810
- __typename: 'Environment';
811
- /** List of thumbnails for the environment (optional). */
812
- thumbnailList: Thumbnail[];
813
- /** List of slots for the environment (optional). */
814
- slots: Slot[];
800
+ /** Unique identifier for the environment. */
801
+ id: string;
802
+ /** Title or name of the environment. */
803
+ title: string;
804
+ /** Flag indicating if UDS is enabled. */
805
+ udsEnabled: boolean;
806
+ /** The north yaw of the sun in the environment. */
807
+ sunNorthYaw: number;
808
+ /** The UDS hour setting for the environment. */
809
+ udsHour: number;
810
+ /** Represents object typename for the environment. */
811
+ __typename: 'Environment';
812
+ /** List of thumbnails for the environment (optional). */
813
+ thumbnailList: Thumbnail[];
814
+ /** List of slots for the environment (optional). */
815
+ slots: Slot[];
815
816
  }
816
817
  /**
817
818
  * Defines the structure for a mapping of selected materials.
@@ -858,8 +859,8 @@ type ShowCaseStatus = 'init' | 'play' | 'pause' | 'stop';
858
859
  * inform users about stream quality, or scale screenshot size requests proportionally.
859
860
  */
860
861
  interface VideoResolution {
861
- width: number | null;
862
- height: number | null;
862
+ width: number | null;
863
+ height: number | null;
863
864
  }
864
865
  /**
865
866
  * Video stream statistics reported by the Metabox player.
@@ -877,26 +878,25 @@ interface VideoResolution {
877
878
  * Subscribe via `api.addEventListener('videoStatsUpdated', (stats: VideoStats) => {...})`.
878
879
  */
879
880
  interface VideoStats {
880
- /** Video encoder quantization parameter (lower = better quality). */
881
- qp?: number;
882
- /** Current bitrate in bits per second. */
883
- bitrate?: number;
884
- /** Decoded frames per second. */
885
- framesPerSecond?: number;
886
- /** Inter-arrival jitter in seconds. */
887
- jitter?: number;
888
- /** Current round-trip time in seconds. */
889
- rtt?: number;
890
- /** The total number of frames successfully decoded. */
891
- framesDecoded?: number;
892
- /** The total number of frames dropped. */
893
- framesDropped?: number;
894
- /** Total number of frames received. */
895
- framesReceived?: number;
896
- /** Total number of packets lost. */
897
- packetsLost?: number;
881
+ /** Video encoder quantization parameter (lower = better quality). */
882
+ qp?: number;
883
+ /** Current bitrate in bits per second. */
884
+ bitrate?: number;
885
+ /** Decoded frames per second. */
886
+ framesPerSecond?: number;
887
+ /** Inter-arrival jitter in seconds. */
888
+ jitter?: number;
889
+ /** Current round-trip time in seconds. */
890
+ rtt?: number;
891
+ /** The total number of frames successfully decoded. */
892
+ framesDecoded?: number;
893
+ /** The total number of frames dropped. */
894
+ framesDropped?: number;
895
+ /** Total number of frames received. */
896
+ framesReceived?: number;
897
+ /** Total number of packets lost. */
898
+ packetsLost?: number;
898
899
  }
899
-
900
900
  /**
901
901
  * Lifecycle of a {@link GetPdf} render.
902
902
  *
@@ -961,76 +961,81 @@ type CtaStatus = 'started' | 'ready' | 'failed';
961
961
  * viewportReady→boolean, showcaseStatusChanged→ShowCaseStatus.
962
962
  */
963
963
  interface FromMetaboxMessagePayloads {
964
- /**
965
- * Dispatches every time the configurator data is updated.
966
- * I.e., when the user changes the configuration. (Material, Product, Environment)
967
- */
968
- configuratorDataUpdated: ConfiguratorEnvelope;
969
- /**
970
- * Dispatches every time the ecom configurator data is updated (label, endpointUrl).
971
- */
972
- ecomConfiguratorDataUpdated: EcomConfigurator;
973
- /**
974
- * Dispatches every time when the Unreal Viewport is visible/hidden.
975
- */
976
- viewportReady: boolean;
977
- /**
978
- * Dispatches every time when while the configurator loads. Shows showcase status information on a scene.
979
- */
980
- showcaseStatusChanged: ShowCaseStatus;
981
- /**
982
- * Dispatches at the moment while the configurator loads. Shows status information.
983
- */
984
- statusMessageChanged: string | null;
985
- /**
986
- * Dispatches every time when Unreal is sending an ordered render with a new GetScreenshot() command.
987
- */
988
- screenshotReady: string | null;
989
- /**
990
- * Dispatches as a GetPdf() render starts, finishes or fails. The document is
991
- * delivered by the browser download either way; this only reports progress.
992
- */
993
- pdfStatusChanged: PdfStatus;
994
- /**
995
- * Dispatches as a GetCallToActionInformation() workflow starts, completes or
996
- * fails. MetaBox handles the redirect itself; this only reports progress.
997
- */
998
- ctaStatusChanged: CtaStatus;
999
- /**
1000
- * Dispatches every time when Unreal is changing its video stream size.
1001
- */
1002
- videoResolutionChanged: VideoResolution;
1003
- /**
1004
- * Dispatches every time when the User sends get camera command new GetCamera() command.
1005
- */
1006
- getCameraResult: CameraCommandPayload;
1007
- /**
1008
- * @deprecated
1009
- * Dispatches every time when the configurator connected/disconnected with Unreal Engine.
1010
- */
1011
- dataChannelConnected: boolean;
1012
- /**
1013
- * Dispatches periodically with aggregated video stream statistics.
1014
- */
1015
- videoStatsUpdated: VideoStats;
1016
- /**
1017
- * Dispatches when the loading progress or loader visibility changes.
1018
- * `percents` is the smoothed progress value (0–100).
1019
- * `loaderVisible` indicates whether the loading overlay is currently shown.
1020
- */
1021
- loadingStatusChanged: {
1022
- percents: number;
1023
- loaderVisible: boolean;
1024
- };
1025
- /**
1026
- * Dispatches when user inactivity (AFK) is detected and the countdown to disconnect begins.
1027
- * `remainingSecondsToDisconnect` counts down (e.g. 15, 14, 13…) until the session is terminated.
1028
- * `countdownVisible` indicates whether the AFK countdown popup is currently shown.
1029
- */
1030
- userInactivityDetected: {
1031
- remainingSecondsToDisconnect: number;
1032
- countdownVisible: boolean;
1033
- };
964
+ /**
965
+ * Dispatches every time the configurator data is updated.
966
+ * I.e., when the user changes the configuration. (Material, Product, Environment)
967
+ */
968
+ configuratorDataUpdated: ConfiguratorEnvelope;
969
+ /**
970
+ * Dispatches every time the ecom configurator data is updated (label, endpointUrl).
971
+ */
972
+ ecomConfiguratorDataUpdated: EcomConfigurator;
973
+ /**
974
+ * Dispatches every time when the Unreal Viewport is visible/hidden.
975
+ */
976
+ viewportReady: boolean;
977
+ /**
978
+ * Dispatches every time when while the configurator loads. Shows showcase status information on a scene.
979
+ */
980
+ showcaseStatusChanged: ShowCaseStatus;
981
+ /**
982
+ * Dispatches at the moment while the configurator loads. Shows status information.
983
+ */
984
+ statusMessageChanged: string | null;
985
+ /**
986
+ * Dispatches every time when Unreal is sending an ordered render with a new GetScreenshot() command.
987
+ */
988
+ screenshotReady: string | null;
989
+ /**
990
+ * Dispatches as a GetPdf() render starts, finishes or fails. The document is
991
+ * delivered by the browser download either way; this only reports progress.
992
+ */
993
+ pdfStatusChanged: PdfStatus;
994
+ /**
995
+ * Dispatches as a GetCallToActionInformation() workflow starts, completes or
996
+ * fails. MetaBox handles the redirect itself; this only reports progress.
997
+ */
998
+ ctaStatusChanged: CtaStatus;
999
+ /**
1000
+ * Dispatches every time when Unreal is changing its video stream size.
1001
+ */
1002
+ videoResolutionChanged: VideoResolution;
1003
+ /**
1004
+ * Dispatches every time when the User sends get camera command new GetCamera() command.
1005
+ */
1006
+ getCameraResult: CameraCommandPayload;
1007
+ /**
1008
+ * @deprecated
1009
+ * Dispatches every time when the configurator connected/disconnected with Unreal Engine.
1010
+ */
1011
+ dataChannelConnected: boolean;
1012
+ /**
1013
+ * Dispatches periodically with aggregated video stream statistics.
1014
+ */
1015
+ videoStatsUpdated: VideoStats;
1016
+ /**
1017
+ * Dispatches when the loading progress or loader visibility changes.
1018
+ * `percents` is the smoothed progress value (0–100).
1019
+ * `loaderVisible` indicates whether the loading overlay is currently shown.
1020
+ */
1021
+ loadingStatusChanged: {
1022
+ percents: number;
1023
+ loaderVisible: boolean;
1024
+ };
1025
+ /**
1026
+ * Dispatches when user inactivity (AFK) is detected and the countdown to disconnect begins.
1027
+ * `remainingSecondsToDisconnect` counts down (e.g. 15, 14, 13…) until the session is terminated.
1028
+ * `countdownVisible` indicates whether the AFK countdown popup is currently shown.
1029
+ */
1030
+ userInactivityDetected: {
1031
+ remainingSecondsToDisconnect: number;
1032
+ countdownVisible: boolean;
1033
+ };
1034
+ /**
1035
+ * Dispatches when the configurator id does not exist or is not available.
1036
+ * Nothing will load; `configuratorDataUpdated` will not follow.
1037
+ */
1038
+ configuratorNotFound: true;
1034
1039
  }
1035
1040
  /**
1036
1041
  * Union of all event names received from MetaBox.
@@ -1066,9 +1071,9 @@ type FromMetaBoxApiEvents = keyof FromMetaboxMessagePayloads;
1066
1071
  * against this structure to diagnose malformed messages. The Communicator handles all wrapping/unwrapping.
1067
1072
  */
1068
1073
  interface MetaBoxApiEnvelope<T extends FromMetaBoxApiEvents> {
1069
- action: 'bridge';
1070
- eventType: T;
1071
- payload: FromMetaboxMessagePayloads[T];
1074
+ action: 'bridge';
1075
+ eventType: T;
1076
+ payload: FromMetaboxMessagePayloads[T];
1072
1077
  }
1073
1078
  /**
1074
1079
  * Identifies which side of the iframe boundary the Communicator is running on.
@@ -1092,21 +1097,19 @@ type MetaboxEnvironment = 'metabox' | 'host';
1092
1097
  * Used for signaling that the app is loaded and ready to open api.
1093
1098
  */
1094
1099
  interface MCAppLoaded {
1095
- action: typeof AppLoaded;
1096
- eventType?: unknown;
1097
- payload: {
1098
- appId: string;
1099
- version?: string;
1100
- };
1100
+ action: typeof AppLoaded;
1101
+ eventType?: unknown;
1102
+ payload: {
1103
+ appId: string;
1104
+ version?: string;
1105
+ };
1101
1106
  }
1102
1107
  /**
1103
1108
  * @internal
1104
1109
  * @hidden
1105
1110
  * This creates a union of all event envelopes defined in MetaBoxAPIPayloads.
1106
1111
  */
1107
- type FromMetaBoxAPIEnvelope = {
1108
- [K in keyof FromMetaboxMessagePayloads]: MetaBoxApiEnvelope<K>;
1109
- }[keyof FromMetaboxMessagePayloads] | MCAppLoaded;
1112
+ type FromMetaBoxAPIEnvelope = { [K in keyof FromMetaboxMessagePayloads]: MetaBoxApiEnvelope<K>; }[keyof FromMetaboxMessagePayloads] | MCAppLoaded;
1110
1113
  /**
1111
1114
  * @internal
1112
1115
  * @hidden
@@ -1129,11 +1132,10 @@ type FromMetaboxTarget = 'parent' | 'communicator';
1129
1132
  * Only reference if debugging raw postMessage traffic in browser devtools.
1130
1133
  */
1131
1134
  interface FromMetaBoxMessage {
1132
- host: typeof Metabox;
1133
- envelope: FromMetaBoxAPIEnvelope;
1134
- target: FromMetaboxTarget;
1135
+ host: typeof Metabox;
1136
+ envelope: FromMetaBoxAPIEnvelope;
1137
+ target: FromMetaboxTarget;
1135
1138
  }
1136
-
1137
1139
  /**
1138
1140
  * Base class for commands sent to the Metabox API.
1139
1141
  *
@@ -1152,11 +1154,10 @@ interface FromMetaBoxMessage {
1152
1154
  * @internal
1153
1155
  * @hidden
1154
1156
  */
1155
- declare class CommandBase {
1156
- /** The message envelope populated by subclass constructors and sent via {@link Communicator.sendCommandToMetabox}. */
1157
- data: ToMetaBoxMessageEnvelope;
1157
+ export declare class CommandBase {
1158
+ /** The message envelope populated by subclass constructors and sent via {@link Communicator.sendCommandToMetabox}. */
1159
+ data: ToMetaBoxMessageEnvelope;
1158
1160
  }
1159
-
1160
1161
  /**
1161
1162
  * Represents a callback listener for specific message types.
1162
1163
  * Used internally by EventDispatcher to store event listeners.
@@ -1175,11 +1176,11 @@ declare class CommandBase {
1175
1176
  *
1176
1177
  * @public
1177
1178
  */
1178
- interface Listener {
1179
- /** The message type this listener is registered for */
1180
- messageType: string;
1181
- /** The callback function to execute when a message of the specified type is received */
1182
- callback: (data: unknown) => void;
1179
+ export interface Listener {
1180
+ /** The message type this listener is registered for */
1181
+ messageType: string;
1182
+ /** The callback function to execute when a message of the specified type is received */
1183
+ callback: (data: unknown) => void;
1183
1184
  }
1184
1185
  /**
1185
1186
  * EventDispatcher is a class that manages event listeners and dispatches events to them.
@@ -1195,39 +1196,38 @@ interface Listener {
1195
1196
  * Do not reference or extend EventDispatcher in application code. Use only the Communicator interface methods.
1196
1197
  * If debugging communication failures, check browser console for postMessage errors related to this layer.
1197
1198
  */
1198
- declare class EventDispatcher {
1199
- /**
1200
- * Storage for callback listeners by message type.
1201
- */
1202
- listeners: Listener[];
1203
- /**
1204
- * Removes all registered listeners. Subclasses override this to perform additional cleanup.
1205
- * @param key - Instance key (used by subclass overrides for registry cleanup).
1206
- */
1207
- destroy(key: string): void;
1208
- /**
1209
- * Adds an event listener for receiving specific types of messages.
1210
- *
1211
- * @param {string} messageType - The message type to listen for.
1212
- * @param callback - The callback function to execute when a message is received.
1213
- */
1214
- addEventListener(messageType: string, callback: (data: unknown) => void): this;
1215
- /**
1216
- * Dispatches an event to all listeners of a specific message type.
1217
- *
1218
- * @param {string} messageType - The message type.
1219
- * @param data - The data associated with the event.
1220
- */
1221
- dispatchEvent(messageType: string, data: unknown): this;
1222
- /**
1223
- * Removes an event listener for a specific type of message.
1224
- *
1225
- * @param {string} messageType - The message type.
1226
- * @param callback - The callback function to remove.
1227
- */
1228
- removeEventListener(messageType: string, callback: (data: unknown) => void): this;
1199
+ export declare class EventDispatcher {
1200
+ /**
1201
+ * Storage for callback listeners by message type.
1202
+ */
1203
+ listeners: Listener[];
1204
+ /**
1205
+ * Removes all registered listeners. Subclasses override this to perform additional cleanup.
1206
+ * @param key - Instance key (used by subclass overrides for registry cleanup).
1207
+ */
1208
+ destroy(key: string): void;
1209
+ /**
1210
+ * Adds an event listener for receiving specific types of messages.
1211
+ *
1212
+ * @param {string} messageType - The message type to listen for.
1213
+ * @param callback - The callback function to execute when a message is received.
1214
+ */
1215
+ addEventListener(messageType: string, callback: (data: unknown) => void): this;
1216
+ /**
1217
+ * Dispatches an event to all listeners of a specific message type.
1218
+ *
1219
+ * @param {string} messageType - The message type.
1220
+ * @param data - The data associated with the event.
1221
+ */
1222
+ dispatchEvent(messageType: string, data: unknown): this;
1223
+ /**
1224
+ * Removes an event listener for a specific type of message.
1225
+ *
1226
+ * @param {string} messageType - The message type.
1227
+ * @param callback - The callback function to remove.
1228
+ */
1229
+ removeEventListener(messageType: string, callback: (data: unknown) => void): this;
1229
1230
  }
1230
-
1231
1231
  /**
1232
1232
  * What `integrateMetabox` knows about the iframe it created and the origin it
1233
1233
  * pointed that iframe at. Lets the Communicator check who is talking to it and
@@ -1235,11 +1235,11 @@ declare class EventDispatcher {
1235
1235
  *
1236
1236
  * @internal
1237
1237
  */
1238
- interface CommunicatorConnection {
1239
- /** The embedded iframe, when we created it ourselves. */
1240
- iframe: HTMLIFrameElement | null;
1241
- /** Origin of the configurator document, or `null` when it is not known yet. */
1242
- origin: string | null;
1238
+ export interface CommunicatorConnection {
1239
+ /** The embedded iframe, when we created it ourselves. */
1240
+ iframe: HTMLIFrameElement | null;
1241
+ /** Origin of the configurator document, or `null` when it is not known yet. */
1242
+ origin: string | null;
1243
1243
  }
1244
1244
  /**
1245
1245
  * Handles messaging between the host page and embedded Metabox content.
@@ -1260,125 +1260,124 @@ interface CommunicatorConnection {
1260
1260
  *
1261
1261
  * @internal Use {@link Communicator.createInstance} or the {@link integrateMetabox} helper to instantiate.
1262
1262
  */
1263
- declare class Communicator extends EventDispatcher {
1264
- /**
1265
- * Singleton reference to the current communicator instance.
1266
- */
1267
- static instance: Communicator | null;
1268
- /**
1269
- * Bound handler for incoming postMessage events.
1270
- */
1271
- private binder;
1272
- /** Which side of the iframe boundary this instance runs on — see `acceptsMessageFrom`. */
1273
- private readonly environment;
1274
- /** The iframe we drive, when the integration created it. */
1275
- private readonly iframe;
1276
- /** Pinned configurator origin; `null` until we learn it. */
1277
- private readonly targetOrigin;
1278
- /** Keeps the "rejected an inbound message" warning to one per instance. */
1279
- private senderRejectionReported;
1280
- /** Keeps the "unknown configurator origin" warning to one per instance. */
1281
- private wildcardTargetReported;
1282
- /** Keeps the "our iframe left the document" warning to one per instance. */
1283
- private staleFrameReported;
1284
- /**
1285
- * Constructs a Communicator, replacing any existing instance, and begins listening for messages.
1286
- * @internal
1287
- */
1288
- constructor(data: MCAppLoaded['payload'], environment: MetaboxEnvironment, config?: Partial<MetaboxCommandConfig>, connection?: CommunicatorConnection);
1289
- /**
1290
- * Listens for Metabox to signal readiness, then initializes communicator.
1291
- * @param apiReadyCallback - Called with the new Communicator once the Metabox is loaded.
1292
- * @param {MetaboxEnvironment} environment - The environment in which the Communicator is running.
1293
- * @param {MetaboxCommandConfig} config - optional initial config: standalone - if true - disable metabox custom template and all logic
1294
- * @param {CommunicatorConnection} connection - the iframe and origin `integrateMetabox`
1295
- * built, so the handshake can be attributed and later messages addressed precisely.
1296
- * Omitted by hand-rolled embeds, which are then identified through the
1297
- * `embeddedContent` id and the handshake's own origin.
1298
- * @returns A cancel function that removes the handshake `message` listener.
1299
- * `integrateMetabox` (the public entry point) calls this automatically when
1300
- * a new integration supersedes a still-pending one, so direct internal
1301
- * callers only need it for explicit early teardown. Idempotent.
1302
- */
1303
- static createInstance(apiReadyCallback: (api: Communicator) => void, environment: MetaboxEnvironment, config?: Partial<MetaboxCommandConfig>, connection?: CommunicatorConnection): () => void;
1304
- /**
1305
- * The origin to address the configurator by, decided once from the handshake.
1306
- *
1307
- * Prefers what `integrateMetabox` computed from the iframe URL, but yields to
1308
- * the origin the handshake actually came from when the two disagree: a redirect
1309
- * (a `config.domain` override pointing at a host that 30x's elsewhere) would
1310
- * otherwise pin an origin nothing answers on, and every command would be
1311
- * dropped silently. The sender already passed the window gate, so this cannot
1312
- * be steered by an unrelated page.
1313
- */
1314
- private static resolveHandshakeOrigin;
1315
- /**
1316
- * Cleans up resources and stops listening for messages.
1317
- */
1318
- destroy(key: string): void;
1319
- /** Destroys all active Communicator instances and clears the internal registry. */
1320
- static clearAll(): void;
1321
- /**
1322
- * Retrieves a registered Communicator instance by its key.
1323
- * @param key - The composite key (`version_environment_appId`) identifying the instance.
1324
- */
1325
- static getCommunicator(key: string): {
1326
- instance: Communicator;
1327
- } | undefined;
1328
- /**
1329
- * Posts a command to the Metabox iframe.
1330
- * @param command - An action command containing data to send.
1331
- */
1332
- sendCommandToMetabox<T extends CommandBase>(command: T): void;
1333
- /**
1334
- * A superseding `integrateMetabox` call removes the iframe this handle was
1335
- * built for. Commands then fall through to whatever now holds the contract id,
1336
- * addressed by the origin pinned for the *old* integration — so if the new one
1337
- * points at a different origin, the browser drops them without a word. The
1338
- * handle is stale at that point and should be replaced by the one from the new
1339
- * integration; say so rather than letting it fail quietly.
1340
- */
1341
- private reportStaleFrame;
1342
- /**
1343
- * `targetOrigin` for the iframe. The very first command is `metaboxConfig`,
1344
- * which carries `hostUrl: location.href` — on a shop page that routinely holds
1345
- * order ids and session parameters — so it must not be broadcast to whatever
1346
- * document currently occupies the frame.
1347
- *
1348
- * Falls back to a wildcard rather than refusing to send: this leg carries
1349
- * commands, and a configurator that silently stops responding on a customer
1350
- * site is worse than the status quo. The fallback is reported once so it does
1351
- * not pass unnoticed.
1352
- */
1353
- private resolveTarget;
1354
- /**
1355
- * Registers an event listener for messages dispatched by the Metabox.
1356
- * @param messageType - The event name to listen for (e.g. `'configuratorDataUpdated'`).
1357
- * @param callback - Handler invoked with the typed payload when the event fires.
1358
- * @override
1359
- */
1360
- addEventListener<T extends FromMetaBoxApiEvents>(messageType: T, callback: (data: FromMetaboxMessagePayloads[T]) => void): this;
1361
- /**
1362
- * Dispatches a typed event to all registered listeners.
1363
- * @param messageType - The event name to dispatch.
1364
- * @param data - The payload to pass to each listener.
1365
- * @override
1366
- */
1367
- dispatchEvent<T extends FromMetaBoxApiEvents>(messageType: T, data: FromMetaboxMessagePayloads[T]): this;
1368
- /**
1369
- * Removes a previously registered event listener.
1370
- * @param messageType - The event name the listener was registered for.
1371
- * @param callback - The same function reference that was passed to {@link addEventListener}.
1372
- * @override
1373
- */
1374
- removeEventListener<T extends FromMetaBoxApiEvents>(messageType: T, callback: (data: FromMetaboxMessagePayloads[T]) => void): this;
1375
- /**
1376
- * Filters and dispatches incoming messages from the Metabox.
1377
- * @param {MessageEvent} event - The postMessage event received on a window.
1378
- */
1379
- private handleMessageReceived;
1263
+ export declare class Communicator extends EventDispatcher {
1264
+ /**
1265
+ * Singleton reference to the current communicator instance.
1266
+ */
1267
+ static instance: Communicator | null;
1268
+ /**
1269
+ * Bound handler for incoming postMessage events.
1270
+ */
1271
+ private binder;
1272
+ /** Which side of the iframe boundary this instance runs on — see `acceptsMessageFrom`. */
1273
+ private readonly environment;
1274
+ /** The iframe we drive, when the integration created it. */
1275
+ private readonly iframe;
1276
+ /** Pinned configurator origin; `null` until we learn it. */
1277
+ private readonly targetOrigin;
1278
+ /** Keeps the "rejected an inbound message" warning to one per instance. */
1279
+ private senderRejectionReported;
1280
+ /** Keeps the "unknown configurator origin" warning to one per instance. */
1281
+ private wildcardTargetReported;
1282
+ /** Keeps the "our iframe left the document" warning to one per instance. */
1283
+ private staleFrameReported;
1284
+ /**
1285
+ * Constructs a Communicator, replacing any existing instance, and begins listening for messages.
1286
+ * @internal
1287
+ */
1288
+ constructor(data: MCAppLoaded['payload'], environment: MetaboxEnvironment, config?: Partial<MetaboxCommandConfig>, connection?: CommunicatorConnection);
1289
+ /**
1290
+ * Listens for Metabox to signal readiness, then initializes communicator.
1291
+ * @param apiReadyCallback - Called with the new Communicator once the Metabox is loaded.
1292
+ * @param {MetaboxEnvironment} environment - The environment in which the Communicator is running.
1293
+ * @param {MetaboxCommandConfig} config - optional initial config: standalone - if true - disable metabox custom template and all logic
1294
+ * @param {CommunicatorConnection} connection - the iframe and origin `integrateMetabox`
1295
+ * built, so the handshake can be attributed and later messages addressed precisely.
1296
+ * Omitted by hand-rolled embeds, which are then identified through the
1297
+ * `embeddedContent` id and the handshake's own origin.
1298
+ * @returns A cancel function that removes the handshake `message` listener.
1299
+ * `integrateMetabox` (the public entry point) calls this automatically when
1300
+ * a new integration supersedes a still-pending one, so direct internal
1301
+ * callers only need it for explicit early teardown. Idempotent.
1302
+ */
1303
+ static createInstance(apiReadyCallback: (api: Communicator) => void, environment: MetaboxEnvironment, config?: Partial<MetaboxCommandConfig>, connection?: CommunicatorConnection): () => void;
1304
+ /**
1305
+ * The origin to address the configurator by, decided once from the handshake.
1306
+ *
1307
+ * Prefers what `integrateMetabox` computed from the iframe URL, but yields to
1308
+ * the origin the handshake actually came from when the two disagree: a redirect
1309
+ * (a `config.domain` override pointing at a host that 30x's elsewhere) would
1310
+ * otherwise pin an origin nothing answers on, and every command would be
1311
+ * dropped silently. The sender already passed the window gate, so this cannot
1312
+ * be steered by an unrelated page.
1313
+ */
1314
+ private static resolveHandshakeOrigin;
1315
+ /**
1316
+ * Cleans up resources and stops listening for messages.
1317
+ */
1318
+ destroy(key: string): void;
1319
+ /** Destroys all active Communicator instances and clears the internal registry. */
1320
+ static clearAll(): void;
1321
+ /**
1322
+ * Retrieves a registered Communicator instance by its key.
1323
+ * @param key - The composite key (`version_environment_appId`) identifying the instance.
1324
+ */
1325
+ static getCommunicator(key: string): {
1326
+ instance: Communicator;
1327
+ } | undefined;
1328
+ /**
1329
+ * Posts a command to the Metabox iframe.
1330
+ * @param command - An action command containing data to send.
1331
+ */
1332
+ sendCommandToMetabox<T extends CommandBase>(command: T): void;
1333
+ /**
1334
+ * A superseding `integrateMetabox` call removes the iframe this handle was
1335
+ * built for. Commands then fall through to whatever now holds the contract id,
1336
+ * addressed by the origin pinned for the *old* integration — so if the new one
1337
+ * points at a different origin, the browser drops them without a word. The
1338
+ * handle is stale at that point and should be replaced by the one from the new
1339
+ * integration; say so rather than letting it fail quietly.
1340
+ */
1341
+ private reportStaleFrame;
1342
+ /**
1343
+ * `targetOrigin` for the iframe. The very first command is `metaboxConfig`,
1344
+ * which carries `hostUrl: location.href` — on a shop page that routinely holds
1345
+ * order ids and session parameters — so it must not be broadcast to whatever
1346
+ * document currently occupies the frame.
1347
+ *
1348
+ * Falls back to a wildcard rather than refusing to send: this leg carries
1349
+ * commands, and a configurator that silently stops responding on a customer
1350
+ * site is worse than the status quo. The fallback is reported once so it does
1351
+ * not pass unnoticed.
1352
+ */
1353
+ private resolveTarget;
1354
+ /**
1355
+ * Registers an event listener for messages dispatched by the Metabox.
1356
+ * @param messageType - The event name to listen for (e.g. `'configuratorDataUpdated'`).
1357
+ * @param callback - Handler invoked with the typed payload when the event fires.
1358
+ * @override
1359
+ */
1360
+ addEventListener<T extends FromMetaBoxApiEvents>(messageType: T, callback: (data: FromMetaboxMessagePayloads[T]) => void): this;
1361
+ /**
1362
+ * Dispatches a typed event to all registered listeners.
1363
+ * @param messageType - The event name to dispatch.
1364
+ * @param data - The payload to pass to each listener.
1365
+ * @override
1366
+ */
1367
+ dispatchEvent<T extends FromMetaBoxApiEvents>(messageType: T, data: FromMetaboxMessagePayloads[T]): this;
1368
+ /**
1369
+ * Removes a previously registered event listener.
1370
+ * @param messageType - The event name the listener was registered for.
1371
+ * @param callback - The same function reference that was passed to {@link addEventListener}.
1372
+ * @override
1373
+ */
1374
+ removeEventListener<T extends FromMetaBoxApiEvents>(messageType: T, callback: (data: FromMetaboxMessagePayloads[T]) => void): this;
1375
+ /**
1376
+ * Filters and dispatches incoming messages from the Metabox.
1377
+ * @param {MessageEvent} event - The postMessage event received on a window.
1378
+ */
1379
+ private handleMessageReceived;
1380
1380
  }
1381
-
1382
1381
  /**
1383
1382
  * Integrates the Metabox Basic Configurator into the page by injecting an iframe and
1384
1383
  * initializing a Communicator instance for host-to-iframe messaging.
@@ -1453,8 +1452,7 @@ declare class Communicator extends EventDispatcher {
1453
1452
  * },
1454
1453
  * );
1455
1454
  */
1456
- declare function integrateMetabox(configuratorId: string, containerId: string, apiReadyCallback: (api: Communicator) => void, config?: IntegrateMetaboxConfig): () => void;
1457
-
1455
+ export declare function integrateMetabox(configuratorId: string, containerId: string, apiReadyCallback: (api: Communicator) => void, config?: IntegrateMetaboxConfig): () => void;
1458
1456
  /**
1459
1457
  * Saves an image by triggering a download.
1460
1458
  *
@@ -1484,8 +1482,7 @@ declare function integrateMetabox(configuratorId: string, containerId: string, a
1484
1482
  * @param {string} imageUrl - The URL of the image to save.
1485
1483
  * @param {string} filename - The name of the file to save.
1486
1484
  */
1487
- declare function saveImage(imageUrl: string, filename: string): void;
1488
-
1485
+ export declare function saveImage(imageUrl: string, filename: string): void;
1489
1486
  /**
1490
1487
  * Sets the URL parameters based on the provided state.
1491
1488
  *
@@ -1495,7 +1492,7 @@ declare function saveImage(imageUrl: string, filename: string): void;
1495
1492
  *
1496
1493
  * @param {Record<string, string>} state - An object containing key-value pairs to set as URL parameters.
1497
1494
  */
1498
- declare function setUrlParams(state: Record<string, string>): void;
1495
+ export declare function setUrlParams(state: Record<string, string>): void;
1499
1496
  /**
1500
1497
  * Retrieves the URL parameters as an object.
1501
1498
  *
@@ -1506,8 +1503,7 @@ declare function setUrlParams(state: Record<string, string>): void;
1506
1503
  *
1507
1504
  * @returns An object containing the URL parameters.
1508
1505
  */
1509
- declare function getUrlParams(): Record<string, string>;
1510
-
1506
+ export declare function getUrlParams(): Record<string, string>;
1511
1507
  /**
1512
1508
  * Constructs the iframe source URL for the Metabox Basic Configurator.
1513
1509
  *
@@ -1530,8 +1526,7 @@ declare function getUrlParams(): Record<string, string>;
1530
1526
  * @param {string} configuratorId - An string identifier for the configurator.
1531
1527
  * @param {IntegrateMetaboxConfig} config - An object containing the configuration options.
1532
1528
  */
1533
- declare const prepareIframeSrc: (configuratorId: string, config?: IntegrateMetaboxConfig) => string;
1534
-
1529
+ export declare const prepareIframeSrc: (configuratorId: string, config?: IntegrateMetaboxConfig) => string;
1535
1530
  /**
1536
1531
  * Wrapper helper function to use with RxJS the same way as `fromEvent`, to listen to events from the Communicator.
1537
1532
  *
@@ -1552,8 +1547,7 @@ declare const prepareIframeSrc: (configuratorId: string, config?: IntegrateMetab
1552
1547
  * @returns An Observable that emits the typed payload each time the event fires.
1553
1548
  * @internal
1554
1549
  */
1555
- declare function fromCommunicatorEvent<T extends FromMetaBoxApiEvents>(target: Communicator, eventName: T): Observable<FromMetaboxMessagePayloads[T]>;
1556
-
1550
+ export declare function fromCommunicatorEvent<T extends FromMetaBoxApiEvents>(target: Communicator, eventName: T): Observable<FromMetaboxMessagePayloads[T]>;
1557
1551
  /**
1558
1552
  * Represents a command to send Metabox Config to Metabox Basic Configurator.
1559
1553
  *
@@ -1576,10 +1570,9 @@ declare function fromCommunicatorEvent<T extends FromMetaBoxApiEvents>(target: C
1576
1570
  * @param {string} appId - The unique identifier for the Communicator Instance
1577
1571
  * @param {MetaboxCommandConfig} config - optional initial config: standalone - if true - disable metabox custom template and all logic
1578
1572
  */
1579
- declare class MetaboxConfig extends CommandBase {
1580
- constructor(appId: string, config: MetaboxCommandConfig);
1573
+ export declare class MetaboxConfig extends CommandBase {
1574
+ constructor(appId: string, config: MetaboxCommandConfig);
1581
1575
  }
1582
-
1583
1576
  /**
1584
1577
  * Represents a command to get a PDF from Metabox Basic Configurator.
1585
1578
  * This class sends a message to the Metabox API to generate a PDF based on the current configuration.
@@ -1626,10 +1619,9 @@ declare class MetaboxConfig extends CommandBase {
1626
1619
  * api.sendCommandToMetabox(new GetPdf());
1627
1620
  * };
1628
1621
  */
1629
- declare class GetPdf extends CommandBase {
1630
- constructor();
1622
+ export declare class GetPdf extends CommandBase {
1623
+ constructor();
1631
1624
  }
1632
-
1633
1625
  /**
1634
1626
  * Represents a command to get a Call To Action Information from Metabox Basic Configurator.
1635
1627
  * This class sends a message to the Metabox API to generate Call To Action information based on the current
@@ -1671,10 +1663,9 @@ declare class GetPdf extends CommandBase {
1671
1663
  * api.sendCommandToMetabox(new GetCallToActionInformation());
1672
1664
  * };
1673
1665
  */
1674
- declare class GetCallToActionInformation extends CommandBase {
1675
- constructor();
1666
+ export declare class GetCallToActionInformation extends CommandBase {
1667
+ constructor();
1676
1668
  }
1677
-
1678
1669
  /**
1679
1670
  * Represents a command to get the camera configuration from Unreal.
1680
1671
  * This class sends a message to the Metabox API to get the camera from a scene.
@@ -1705,10 +1696,9 @@ declare class GetCallToActionInformation extends CommandBase {
1705
1696
  * api.sendCommandToMetabox(new GetCamera());
1706
1697
  * };
1707
1698
  */
1708
- declare class GetCamera extends CommandBase {
1709
- constructor();
1699
+ export declare class GetCamera extends CommandBase {
1700
+ constructor();
1710
1701
  }
1711
-
1712
1702
  /**
1713
1703
  * Represents a command to set the camera configuration.
1714
1704
  * This class sends a message to the Metabox API to set the camera on a scene.
@@ -1750,10 +1740,9 @@ declare class GetCamera extends CommandBase {
1750
1740
  *
1751
1741
  * @param {CameraCommandPayload} camera - The camera configuration.
1752
1742
  */
1753
- declare class SetCamera extends CommandBase {
1754
- constructor(camera: CameraCommandPayload);
1743
+ export declare class SetCamera extends CommandBase {
1744
+ constructor(camera: CameraCommandPayload);
1755
1745
  }
1756
-
1757
1746
  /**
1758
1747
  * Represents a command to reset the camera to its initial position.
1759
1748
  * This class sends a message to the Metabox API to reset the camera on a scene.
@@ -1775,10 +1764,9 @@ declare class SetCamera extends CommandBase {
1775
1764
  * api.sendCommandToMetabox(new ResetCamera());
1776
1765
  * };
1777
1766
  */
1778
- declare class ResetCamera extends CommandBase {
1779
- constructor();
1767
+ export declare class ResetCamera extends CommandBase {
1768
+ constructor();
1780
1769
  }
1781
-
1782
1770
  /**
1783
1771
  * Represents a command to reset the configurator state to its defaults.
1784
1772
  * This class sends a message to the Metabox API to restore product, materials,
@@ -1815,10 +1803,9 @@ declare class ResetCamera extends CommandBase {
1815
1803
  * api.sendCommandToMetabox(new ResetConfiguration());
1816
1804
  * };
1817
1805
  */
1818
- declare class ResetConfiguration extends CommandBase {
1819
- constructor();
1806
+ export declare class ResetConfiguration extends CommandBase {
1807
+ constructor();
1820
1808
  }
1821
-
1822
1809
  /**
1823
1810
  * Represents a command to apply zoom and change the camera zoom on a scene.
1824
1811
  * This class sends a command to the Metabox API to change zoom on a scene.
@@ -1844,10 +1831,9 @@ declare class ResetConfiguration extends CommandBase {
1844
1831
  *
1845
1832
  * @param {number} zoom - The zoom value to apply.
1846
1833
  */
1847
- declare class ApplyZoom extends CommandBase {
1848
- constructor(zoom: number);
1834
+ export declare class ApplyZoom extends CommandBase {
1835
+ constructor(zoom: number);
1849
1836
  }
1850
-
1851
1837
  /**
1852
1838
  * @remarks
1853
1839
  * Represents a command to initialize Showcase for a product scene and start a sequence for the product.
@@ -1879,10 +1865,9 @@ declare class ApplyZoom extends CommandBase {
1879
1865
  * api.sendCommandToMetabox(new InitShowcase());
1880
1866
  * };
1881
1867
  */
1882
- declare class InitShowcase extends CommandBase {
1883
- constructor();
1868
+ export declare class InitShowcase extends CommandBase {
1869
+ constructor();
1884
1870
  }
1885
-
1886
1871
  /**
1887
1872
  * Represents a command to play Showcase for a product when it is already initialized and paused.
1888
1873
  * This class sends a command to the Metabox API to play showcase for a product if it is already initialized and paused.
@@ -1912,10 +1897,9 @@ declare class InitShowcase extends CommandBase {
1912
1897
  * api.sendCommandToMetabox(new PlayShowcase());
1913
1898
  * };
1914
1899
  */
1915
- declare class PlayShowcase extends CommandBase {
1916
- constructor();
1900
+ export declare class PlayShowcase extends CommandBase {
1901
+ constructor();
1917
1902
  }
1918
-
1919
1903
  /**
1920
1904
  * @internal
1921
1905
  * @hidden
@@ -1923,10 +1907,9 @@ declare class PlayShowcase extends CommandBase {
1923
1907
  *
1924
1908
  * @param {Object} payload - An raw command that will be sent into MetaBox Unreal Application.
1925
1909
  */
1926
- declare class UnrealCommand extends CommandBase {
1927
- constructor(payload: object);
1910
+ export declare class UnrealCommand extends CommandBase {
1911
+ constructor(payload: object);
1928
1912
  }
1929
-
1930
1913
  /**
1931
1914
  * Represents a command to pause Showcase for a product when it is already initialized and playing.
1932
1915
  * This class sends a command to the Metabox API to pause showcase for a product if it is already initialized and playing.
@@ -1956,10 +1939,9 @@ declare class UnrealCommand extends CommandBase {
1956
1939
  * api.sendCommandToMetabox(new PauseShowcase());
1957
1940
  * };
1958
1941
  */
1959
- declare class PauseShowcase extends CommandBase {
1960
- constructor();
1942
+ export declare class PauseShowcase extends CommandBase {
1943
+ constructor();
1961
1944
  }
1962
-
1963
1945
  /**
1964
1946
  * Represents a command to stop Showcase for a product when it is already initialized, and you want to destroy it.
1965
1947
  * This class sends a command to the Metabox API to stop showcase for a product if it is already initialized.
@@ -1990,10 +1972,9 @@ declare class PauseShowcase extends CommandBase {
1990
1972
  * api.sendCommandToMetabox(new StopShowcase());
1991
1973
  * };
1992
1974
  */
1993
- declare class StopShowcase extends CommandBase {
1994
- constructor();
1975
+ export declare class StopShowcase extends CommandBase {
1976
+ constructor();
1995
1977
  }
1996
-
1997
1978
  /**
1998
1979
  * Image format.
1999
1980
  * This type represents the allowed image formats.
@@ -2048,13 +2029,12 @@ type MimeType = 'image/png' | 'image/jpeg' | 'image/webp';
2048
2029
  * @param {MimeType} mimeType - The output format.
2049
2030
  * @param {{ x: number; y: number }} [size] - Optional size in pixels.
2050
2031
  */
2051
- declare class GetScreenshot extends CommandBase {
2052
- constructor(mimeType: MimeType, size?: {
2053
- x: number;
2054
- y: number;
2055
- });
2032
+ export declare class GetScreenshot extends CommandBase {
2033
+ constructor(mimeType: MimeType, size?: {
2034
+ x: number;
2035
+ y: number;
2036
+ });
2056
2037
  }
2057
-
2058
2038
  /**
2059
2039
  * Represents a command to set a product by its ID.
2060
2040
  * This action sends a message to the Metabox API to set a product using the provided product ID.
@@ -2091,10 +2071,9 @@ declare class GetScreenshot extends CommandBase {
2091
2071
  *
2092
2072
  * @param {string} productId - The product ID.
2093
2073
  */
2094
- declare class SetProduct extends CommandBase {
2095
- constructor(productId: string);
2074
+ export declare class SetProduct extends CommandBase {
2075
+ constructor(productId: string);
2096
2076
  }
2097
-
2098
2077
  /**
2099
2078
  * Represents a command to set a material by its slot ID and Material ID.
2100
2079
  * To listen for changes after sending this command, listen to the 'configuratorDataUpdated' event.
@@ -2131,10 +2110,9 @@ declare class SetProduct extends CommandBase {
2131
2110
  * @param {string} slotId - The slot ID.
2132
2111
  * @param {string} materialId - The material ID.
2133
2112
  */
2134
- declare class SetProductMaterial extends CommandBase {
2135
- constructor(slotId: string, materialId: string);
2113
+ export declare class SetProductMaterial extends CommandBase {
2114
+ constructor(slotId: string, materialId: string);
2136
2115
  }
2137
-
2138
2116
  /**
2139
2117
  * Represents a command to set the environment by its ID.
2140
2118
  * To listen for changes after sending this command, listen to the 'configuratorDataUpdated' event.
@@ -2165,10 +2143,9 @@ declare class SetProductMaterial extends CommandBase {
2165
2143
  *
2166
2144
  * @param {string} environmentId - The environment ID.
2167
2145
  */
2168
- declare class SetEnvironment extends CommandBase {
2169
- constructor(environmentId: string);
2146
+ export declare class SetEnvironment extends CommandBase {
2147
+ constructor(environmentId: string);
2170
2148
  }
2171
-
2172
2149
  /**
2173
2150
  * Represents a command to set an environment material by its slot ID and Material ID.
2174
2151
  * To listen for changes after sending this command, listen to the 'configuratorDataUpdated' event.
@@ -2204,10 +2181,9 @@ declare class SetEnvironment extends CommandBase {
2204
2181
  * @param {string} slotId - The slot ID.
2205
2182
  * @param {string} materialId - The material ID.
2206
2183
  */
2207
- declare class SetEnvironmentMaterial extends CommandBase {
2208
- constructor(slotId: string, materialId: string);
2184
+ export declare class SetEnvironmentMaterial extends CommandBase {
2185
+ constructor(slotId: string, materialId: string);
2209
2186
  }
2210
-
2211
2187
  /**
2212
2188
  * A single material command accepted inside a {@link SetMaterials} batch.
2213
2189
  *
@@ -2262,10 +2238,9 @@ type MaterialCommand = SetProductMaterial | SetEnvironmentMaterial;
2262
2238
  *
2263
2239
  * @param {MaterialCommand[]} commands - The material commands to apply, in order.
2264
2240
  */
2265
- declare class SetMaterials extends CommandBase {
2266
- constructor(commands: MaterialCommand[]);
2241
+ export declare class SetMaterials extends CommandBase {
2242
+ constructor(commands: MaterialCommand[]);
2267
2243
  }
2268
-
2269
2244
  /**
2270
2245
  * Represents a command to toggle the embedded Metabox menu.
2271
2246
  * This command can only be used when using the metabox menu.
@@ -2291,10 +2266,9 @@ declare class SetMaterials extends CommandBase {
2291
2266
  *
2292
2267
  * @param {boolean} visible - A flag indicating whether the embedded menu should be visible.
2293
2268
  */
2294
- declare class ShowEmbeddedMenu extends CommandBase {
2295
- constructor(visible: boolean);
2269
+ export declare class ShowEmbeddedMenu extends CommandBase {
2270
+ constructor(visible: boolean);
2296
2271
  }
2297
-
2298
2272
  /**
2299
2273
  * Represents a command to toggle the Unreal Overlay Interface Menu.
2300
2274
  * This action sends a message to the Metabox API to toggle the visibility of the Unreal overlay UI.
@@ -2320,10 +2294,9 @@ declare class ShowEmbeddedMenu extends CommandBase {
2320
2294
  *
2321
2295
  * @param {boolean} visible - A flag indicating whether the Unreal overlay UI should be visible.
2322
2296
  */
2323
- declare class ShowOverlayInterface extends CommandBase {
2324
- constructor(visible: boolean);
2297
+ export declare class ShowOverlayInterface extends CommandBase {
2298
+ constructor(visible: boolean);
2325
2299
  }
2326
-
2327
2300
  /**
2328
2301
  * Represents a command to show measurement for a product when it is already loaded.
2329
2302
  * This class sends a command to the Metabox API to show measurement for a product if it is already initialized.
@@ -2345,10 +2318,9 @@ declare class ShowOverlayInterface extends CommandBase {
2345
2318
  * api.sendCommandToMetabox(new ShowMeasurement());
2346
2319
  * };
2347
2320
  */
2348
- declare class ShowMeasurement extends CommandBase {
2349
- constructor();
2321
+ export declare class ShowMeasurement extends CommandBase {
2322
+ constructor();
2350
2323
  }
2351
-
2352
2324
  /**
2353
2325
  * Represents a command to hide measurement for a product when it is already loaded.
2354
2326
  * This class sends a command to the Metabox API to hide measurement for a product if it is already initialized.
@@ -2370,10 +2342,9 @@ declare class ShowMeasurement extends CommandBase {
2370
2342
  * api.sendCommandToMetabox(new HideMeasurement());
2371
2343
  * };
2372
2344
  */
2373
- declare class HideMeasurement extends CommandBase {
2374
- constructor();
2345
+ export declare class HideMeasurement extends CommandBase {
2346
+ constructor();
2375
2347
  }
2376
-
2377
2348
  /**
2378
2349
  * Represents a command to resume the pixel streaming session.
2379
2350
  * This class sends a message to the Metabox API to resume a paused or disconnected stream.
@@ -2395,10 +2366,9 @@ declare class HideMeasurement extends CommandBase {
2395
2366
  * api.sendCommandToMetabox(new ResumeStream());
2396
2367
  * };
2397
2368
  */
2398
- declare class ResumeStream extends CommandBase {
2399
- constructor();
2369
+ export declare class ResumeStream extends CommandBase {
2370
+ constructor();
2400
2371
  }
2401
-
2402
2372
  /**
2403
2373
  * Represents a command to stop the pixel streaming session.
2404
2374
  * This class sends a message to the Metabox API to stop the active stream and release its resources.
@@ -2421,10 +2391,9 @@ declare class ResumeStream extends CommandBase {
2421
2391
  * api.sendCommandToMetabox(new StopStream());
2422
2392
  * };
2423
2393
  */
2424
- declare class StopStream extends CommandBase {
2425
- constructor();
2394
+ export declare class StopStream extends CommandBase {
2395
+ constructor();
2426
2396
  }
2427
-
2428
2397
  /**
2429
2398
  * Represents a command to reset the user inactivity (AFK) timer.
2430
2399
  * This class sends a message to the Metabox API to restart the inactivity countdown,
@@ -2454,9 +2423,7 @@ declare class StopStream extends CommandBase {
2454
2423
  * });
2455
2424
  * };
2456
2425
  */
2457
- declare class ResetUserInactivityTimer extends CommandBase {
2458
- constructor();
2426
+ export declare class ResetUserInactivityTimer extends CommandBase {
2427
+ constructor();
2459
2428
  }
2460
-
2461
- export { AppLoaded, AppLoaded_V3, ApplyZoom, BasicRouteUrl, CommandBase, Communicator, EventDispatcher, GetCallToActionInformation, GetCamera, GetPdf, GetScreenshot, HideMeasurement, InitShowcase, Metabox, MetaboxBasicConfiguratorActions, MetaboxConfig, MetaboxDomain, MetaboxHost, MetaboxHost_V3, Metabox_V3, PauseShowcase, PlayShowcase, ResetCamera, ResetConfiguration, ResetUserInactivityTimer, ResumeStream, SetCamera, SetEnvironment, SetEnvironmentMaterial, SetMaterials, SetProduct, SetProductMaterial, ShowEmbeddedMenu, ShowMeasurement, ShowOverlayInterface, StopShowcase, StopStream, UnrealCommand, VERSION, fromCommunicatorEvent, getUrlParams, integrateMetabox, prepareIframeSrc, saveImage, setUrlParams };
2462
- export type { CameraCommandPayload, CommunicatorConnection, ConfiguratorEnvelope, Cta, CtaStatus, EcomConfigurator, Environment, FromMetaBoxAPIEnvelope, FromMetaBoxApiEvents, FromMetaBoxMessage, FromMetaboxMessagePayloads, FromMetaboxTarget, IntegrateMetaboxConfig, Listener, MCAppLoaded, Material, MaterialCommand, MaterialCommandEnvelope, MetaBoxApiEnvelope, MetaProperty, MetaboxCommandConfig, MetaboxEnvironment, MimeType, PdfStatus, Product, SelectedIds, ShowCaseStatus, Showcase, Slot, Thumbnail, Timecode, ToMetaBoxActions, ToMetaBoxMessage, ToMetaBoxMessageEnvelope, ToMetaboxMessagePayload, ToMetaboxMessagePayloads, ToMetaboxTarget, UniversalConfigurator, UniversalConfiguratorEnvironment, UniversalConfiguratorProduct, VideoResolution, VideoStats };
2429
+ export type { ConfiguratorEnvelope, Cta, CtaStatus, EcomConfigurator, Environment, FromMetaBoxAPIEnvelope, FromMetaBoxApiEvents, FromMetaBoxMessage, FromMetaboxMessagePayloads, FromMetaboxTarget, IntegrateMetaboxConfig, MCAppLoaded, Material, MaterialCommand, MetaBoxApiEnvelope, MetaProperty, MetaboxCommandConfig, MetaboxEnvironment, MimeType, PdfStatus, Product, SelectedIds, ShowCaseStatus, Showcase, Slot, Thumbnail, Timecode, UniversalConfigurator, UniversalConfiguratorEnvironment, UniversalConfiguratorProduct, VideoResolution, VideoStats };