@3dsource/metabox-front-api 3.0.32-dev.0 → 3.0.33

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-dev.0";
103
-
99
+ export declare const BasicRouteUrl = "metabox-configurator/basic";
100
+ export declare const VERSION = "3.0.33";
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-dev.0";
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,16 @@ 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;
432
428
  }
433
-
434
429
  /**
435
430
  * Represents an ecom configurator object with all necessary information about cta.
436
431
  *
@@ -447,14 +442,14 @@ interface ToMetaBoxMessage {
447
442
  * configuration data when CTA is triggered.
448
443
  */
449
444
  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';
445
+ /** The unique ecom configurator identifier. */
446
+ id: string;
447
+ /** The created data of ecom configurator. */
448
+ createdAt: string;
449
+ /** A reference to the Call To Action Information. */
450
+ cta?: Cta;
451
+ /** Represents object typename for the ecom configurator. */
452
+ __typename: 'Configurator';
458
453
  }
459
454
  /**
460
455
  * Represents the call-to-action information for an ecom configurator.
@@ -473,16 +468,15 @@ interface EcomConfigurator {
473
468
  * the config JSON to the callback URL. The backend returns `{ redirectUrl }`.
474
469
  */
475
470
  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';
471
+ /** The indicator of whether the call-to-action is enabled or not. */
472
+ enabled: boolean;
473
+ /** Label of button for call-to-action. */
474
+ label: string;
475
+ /** Callback URL using for sent configurator selected information to this url and redirected to the url after get response. */
476
+ callbackUrl: string;
477
+ /** Represents object typename for the CTA object. */
478
+ __typename: 'Cta';
484
479
  }
485
-
486
480
  /**
487
481
  * Represents a basic configurator object with its configuration, selected materials,
488
482
  * product identifier, and associated environment with its materials.
@@ -503,26 +497,26 @@ interface Cta {
503
497
  * (scene materials). Rebuild affected UI sections on each update.
504
498
  */
505
499
  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;
500
+ /**
501
+ * A reference to the universal configurator.
502
+ */
503
+ configurator: UniversalConfigurator;
504
+ /**
505
+ * The unique product identifier.
506
+ */
507
+ productId: string;
508
+ /**
509
+ * A record mapping product material selections.
510
+ */
511
+ productMaterialsIds: SelectedIds;
512
+ /**
513
+ * The unique environment identifier.
514
+ */
515
+ environmentId: string;
516
+ /**
517
+ * A record mapping environment material selections.
518
+ */
519
+ environmentMaterialsIds: SelectedIds;
526
520
  }
527
521
  /**
528
522
  * Represents the universal configurator with its basic properties and components.
@@ -542,22 +536,22 @@ interface ConfiguratorEnvelope {
542
536
  * product listing, each product's `slots` for material options, and `environments` for scene switching.
543
537
  */
544
538
  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';
539
+ /** Unique identifier for the configurator. */
540
+ id: string;
541
+ /** The name of the configurator. */
542
+ name: string;
543
+ /** Label for the product collection. */
544
+ productCollectionLabel: string;
545
+ /** A list of products for the configurator. */
546
+ products: UniversalConfiguratorProduct[];
547
+ /** A list of available environments. */
548
+ environments: UniversalConfiguratorEnvironment[];
549
+ /** Indicates if the configurator is active. */
550
+ isActive: boolean;
551
+ /** Indicates if the cta in ecom configurator is enabled or not. */
552
+ ctaEnabled: boolean;
553
+ /** Represents object typename for the configurator. */
554
+ __typename: 'UniversalConfigurator';
561
555
  }
562
556
  /**
563
557
  * Represents a product within the universal configurator.
@@ -575,16 +569,16 @@ interface UniversalConfigurator {
575
569
  * Sort by `position` if rendering a product list to match the order configured in MetaBox admin.
576
570
  */
577
571
  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';
572
+ /** The product's unique identifier. */
573
+ productId: string;
574
+ /** Position index of the product. */
575
+ position: number;
576
+ /** Display label for the product. */
577
+ label: string;
578
+ /** The detailed product information. */
579
+ product: Product;
580
+ /** Represents object typename for the product. */
581
+ __typename: 'UniversalConfiguratorProduct';
588
582
  }
589
583
  /**
590
584
  * Represents product details including visual assets and configuration.
@@ -600,22 +594,22 @@ interface UniversalConfiguratorProduct {
600
594
  * (ERP, PIM, Shopify, etc.). The product represents the underlying 3D asset rendered in the Unreal viewport.
601
595
  */
602
596
  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';
597
+ /** The title of the product. */
598
+ title: string;
599
+ /** List of thumbnails for the product. */
600
+ thumbnailList: Thumbnail[];
601
+ /** Available slots for the product. */
602
+ slots: Slot[];
603
+ /** List of metaProperties for the product (optional). */
604
+ metaProperties: MetaProperty[];
605
+ /** Unique identifier for the product. */
606
+ id: string;
607
+ /** Unique external id for the product. */
608
+ externalId: string;
609
+ /** Showcase details for the product. */
610
+ showcase?: Showcase;
611
+ /** Represents object typename for the product. */
612
+ __typename: 'Product';
619
613
  }
620
614
  /**
621
615
  * Represents a thumbnail image entity with dimensions and URL path.
@@ -632,14 +626,14 @@ interface Product {
632
626
  * Implement lazy loading for grids with many options. Consider preloading thumbnails for the currently visible category.
633
627
  */
634
628
  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';
629
+ /** Width of the thumbnail. */
630
+ width: number;
631
+ /** Height of the thumbnail. */
632
+ height: number;
633
+ /** URL path to the thumbnail image. */
634
+ urlPath: string;
635
+ /** Represents object typename (as a string, flexible type). */
636
+ __typename: 'Thumbnail';
643
637
  }
644
638
  /**
645
639
  * Represents a slot within a product that may allow material customization.
@@ -658,14 +652,14 @@ interface Thumbnail {
658
652
  * for that specific surface.
659
653
  */
660
654
  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';
655
+ /** Unique identifier for the slot. */
656
+ id: string;
657
+ /** Display a label for the slot. */
658
+ label: string;
659
+ /** A list of enabled materials for the slot. */
660
+ enabledMaterials: Material[];
661
+ /** Represents object typename for the slot. */
662
+ __typename: 'Slot';
669
663
  }
670
664
  /**
671
665
  * Represents a metaProperty within a product that may allow business logic customization.
@@ -682,16 +676,16 @@ interface Slot {
682
676
  * display purposes — tooltips, pricing, lead times, availability badges. These are set by content teams in MetaBox admin.
683
677
  */
684
678
  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';
679
+ /** Unique identifier for the metaProperty. */
680
+ id: string;
681
+ /** Display the name for the metaProperty. */
682
+ name: string;
683
+ /** Value for the metaProperty. */
684
+ value: string;
685
+ /** Type for the metaProperty. */
686
+ type: string;
687
+ /** Represents object typename for the metaProperty. */
688
+ __typename: 'MetaProperty';
695
689
  }
696
690
  /**
697
691
  * Represents a material that can be applied to a product slot.
@@ -710,16 +704,16 @@ interface MetaProperty {
710
704
  * Pass material.id to SetProductMaterial or SetEnvironmentMaterial.
711
705
  */
712
706
  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';
707
+ /** Unique identifier for the material. */
708
+ id: string;
709
+ /** Title or name of the material. */
710
+ title: string;
711
+ /** Unique external id for the material. */
712
+ externalId: string;
713
+ /** List of thumbnails for the material. */
714
+ thumbnailList: Thumbnail[];
715
+ /** Represents object typename for the material. */
716
+ __typename: 'Material';
723
717
  }
724
718
  /**
725
719
  * Details showcase the presentation of a product.
@@ -737,12 +731,12 @@ interface Material {
737
731
  * via showcaseStatusChanged.
738
732
  */
739
733
  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';
734
+ /** A list of low-bandwidth versions for the showcase (optional). */
735
+ lowBandwidth?: (Timecode | null)[] | null;
736
+ /** Duration for the showcase (optional). */
737
+ duration?: number;
738
+ /** Represents object typename for the showcase. */
739
+ __typename: 'Showcase';
746
740
  }
747
741
  /**
748
742
  * Represents a low-bandwidth entity used in showcases in LBM mode.
@@ -759,27 +753,27 @@ interface Showcase {
759
753
  * Combine with showcaseStatusChanged to build full media player controls for product demo presentations.
760
754
  */
761
755
  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';
756
+ /** Time marker for the entity. */
757
+ time: number;
758
+ /** Duration of the entity display. */
759
+ duration: number;
760
+ /** Represents object typename (as a string, flexible type). */
761
+ __typename: 'Timecode';
768
762
  }
769
763
  /**
770
764
  * Represents the environment settings for a universal configurator.
771
765
  */
772
766
  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';
767
+ /** Unique identifier for the environment. */
768
+ environmentId: string;
769
+ /** Position index of the environment. */
770
+ position: number;
771
+ /** Display label for the environment. */
772
+ label: string;
773
+ /** Detailed environment configuration. */
774
+ environment: Environment;
775
+ /** Represents object typename for the environment. */
776
+ __typename: 'UniversalConfiguratorEnvironment';
783
777
  }
784
778
  /**
785
779
  * Represents an environment with associated media and configuration.
@@ -796,22 +790,22 @@ interface UniversalConfiguratorEnvironment {
796
790
  * Check udsEnabled to know if time-of-day controls are available. Iterate a slot array to build environment material pickers.
797
791
  */
798
792
  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[];
793
+ /** Unique identifier for the environment. */
794
+ id: string;
795
+ /** Title or name of the environment. */
796
+ title: string;
797
+ /** Flag indicating if UDS is enabled. */
798
+ udsEnabled: boolean;
799
+ /** The north yaw of the sun in the environment. */
800
+ sunNorthYaw: number;
801
+ /** The UDS hour setting for the environment. */
802
+ udsHour: number;
803
+ /** Represents object typename for the environment. */
804
+ __typename: 'Environment';
805
+ /** List of thumbnails for the environment (optional). */
806
+ thumbnailList: Thumbnail[];
807
+ /** List of slots for the environment (optional). */
808
+ slots: Slot[];
815
809
  }
816
810
  /**
817
811
  * Defines the structure for a mapping of selected materials.
@@ -858,8 +852,8 @@ type ShowCaseStatus = 'init' | 'play' | 'pause' | 'stop';
858
852
  * inform users about stream quality, or scale screenshot size requests proportionally.
859
853
  */
860
854
  interface VideoResolution {
861
- width: number | null;
862
- height: number | null;
855
+ width: number | null;
856
+ height: number | null;
863
857
  }
864
858
  /**
865
859
  * Video stream statistics reported by the Metabox player.
@@ -877,26 +871,25 @@ interface VideoResolution {
877
871
  * Subscribe via `api.addEventListener('videoStatsUpdated', (stats: VideoStats) => {...})`.
878
872
  */
879
873
  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;
874
+ /** Video encoder quantization parameter (lower = better quality). */
875
+ qp?: number;
876
+ /** Current bitrate in bits per second. */
877
+ bitrate?: number;
878
+ /** Decoded frames per second. */
879
+ framesPerSecond?: number;
880
+ /** Inter-arrival jitter in seconds. */
881
+ jitter?: number;
882
+ /** Current round-trip time in seconds. */
883
+ rtt?: number;
884
+ /** The total number of frames successfully decoded. */
885
+ framesDecoded?: number;
886
+ /** The total number of frames dropped. */
887
+ framesDropped?: number;
888
+ /** Total number of frames received. */
889
+ framesReceived?: number;
890
+ /** Total number of packets lost. */
891
+ packetsLost?: number;
898
892
  }
899
-
900
893
  /**
901
894
  * Lifecycle of a {@link GetPdf} render.
902
895
  *
@@ -961,76 +954,81 @@ type CtaStatus = 'started' | 'ready' | 'failed';
961
954
  * viewportReady→boolean, showcaseStatusChanged→ShowCaseStatus.
962
955
  */
963
956
  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
- };
957
+ /**
958
+ * Dispatches every time the configurator data is updated.
959
+ * I.e., when the user changes the configuration. (Material, Product, Environment)
960
+ */
961
+ configuratorDataUpdated: ConfiguratorEnvelope;
962
+ /**
963
+ * Dispatches every time the ecom configurator data is updated (label, endpointUrl).
964
+ */
965
+ ecomConfiguratorDataUpdated: EcomConfigurator;
966
+ /**
967
+ * Dispatches every time when the Unreal Viewport is visible/hidden.
968
+ */
969
+ viewportReady: boolean;
970
+ /**
971
+ * Dispatches every time when while the configurator loads. Shows showcase status information on a scene.
972
+ */
973
+ showcaseStatusChanged: ShowCaseStatus;
974
+ /**
975
+ * Dispatches at the moment while the configurator loads. Shows status information.
976
+ */
977
+ statusMessageChanged: string | null;
978
+ /**
979
+ * Dispatches every time when Unreal is sending an ordered render with a new GetScreenshot() command.
980
+ */
981
+ screenshotReady: string | null;
982
+ /**
983
+ * Dispatches as a GetPdf() render starts, finishes or fails. The document is
984
+ * delivered by the browser download either way; this only reports progress.
985
+ */
986
+ pdfStatusChanged: PdfStatus;
987
+ /**
988
+ * Dispatches as a GetCallToActionInformation() workflow starts, completes or
989
+ * fails. MetaBox handles the redirect itself; this only reports progress.
990
+ */
991
+ ctaStatusChanged: CtaStatus;
992
+ /**
993
+ * Dispatches every time when Unreal is changing its video stream size.
994
+ */
995
+ videoResolutionChanged: VideoResolution;
996
+ /**
997
+ * Dispatches every time when the User sends get camera command new GetCamera() command.
998
+ */
999
+ getCameraResult: CameraCommandPayload;
1000
+ /**
1001
+ * @deprecated
1002
+ * Dispatches every time when the configurator connected/disconnected with Unreal Engine.
1003
+ */
1004
+ dataChannelConnected: boolean;
1005
+ /**
1006
+ * Dispatches periodically with aggregated video stream statistics.
1007
+ */
1008
+ videoStatsUpdated: VideoStats;
1009
+ /**
1010
+ * Dispatches when the loading progress or loader visibility changes.
1011
+ * `percents` is the smoothed progress value (0–100).
1012
+ * `loaderVisible` indicates whether the loading overlay is currently shown.
1013
+ */
1014
+ loadingStatusChanged: {
1015
+ percents: number;
1016
+ loaderVisible: boolean;
1017
+ };
1018
+ /**
1019
+ * Dispatches when user inactivity (AFK) is detected and the countdown to disconnect begins.
1020
+ * `remainingSecondsToDisconnect` counts down (e.g. 15, 14, 13…) until the session is terminated.
1021
+ * `countdownVisible` indicates whether the AFK countdown popup is currently shown.
1022
+ */
1023
+ userInactivityDetected: {
1024
+ remainingSecondsToDisconnect: number;
1025
+ countdownVisible: boolean;
1026
+ };
1027
+ /**
1028
+ * Dispatches when the configurator id does not exist or is not available.
1029
+ * Nothing will load; `configuratorDataUpdated` will not follow.
1030
+ */
1031
+ configuratorNotFound: true;
1034
1032
  }
1035
1033
  /**
1036
1034
  * Union of all event names received from MetaBox.
@@ -1066,9 +1064,9 @@ type FromMetaBoxApiEvents = keyof FromMetaboxMessagePayloads;
1066
1064
  * against this structure to diagnose malformed messages. The Communicator handles all wrapping/unwrapping.
1067
1065
  */
1068
1066
  interface MetaBoxApiEnvelope<T extends FromMetaBoxApiEvents> {
1069
- action: 'bridge';
1070
- eventType: T;
1071
- payload: FromMetaboxMessagePayloads[T];
1067
+ action: 'bridge';
1068
+ eventType: T;
1069
+ payload: FromMetaboxMessagePayloads[T];
1072
1070
  }
1073
1071
  /**
1074
1072
  * Identifies which side of the iframe boundary the Communicator is running on.
@@ -1092,21 +1090,19 @@ type MetaboxEnvironment = 'metabox' | 'host';
1092
1090
  * Used for signaling that the app is loaded and ready to open api.
1093
1091
  */
1094
1092
  interface MCAppLoaded {
1095
- action: typeof AppLoaded;
1096
- eventType?: unknown;
1097
- payload: {
1098
- appId: string;
1099
- version?: string;
1100
- };
1093
+ action: typeof AppLoaded;
1094
+ eventType?: unknown;
1095
+ payload: {
1096
+ appId: string;
1097
+ version?: string;
1098
+ };
1101
1099
  }
1102
1100
  /**
1103
1101
  * @internal
1104
1102
  * @hidden
1105
1103
  * This creates a union of all event envelopes defined in MetaBoxAPIPayloads.
1106
1104
  */
1107
- type FromMetaBoxAPIEnvelope = {
1108
- [K in keyof FromMetaboxMessagePayloads]: MetaBoxApiEnvelope<K>;
1109
- }[keyof FromMetaboxMessagePayloads] | MCAppLoaded;
1105
+ type FromMetaBoxAPIEnvelope = { [K in keyof FromMetaboxMessagePayloads]: MetaBoxApiEnvelope<K>; }[keyof FromMetaboxMessagePayloads] | MCAppLoaded;
1110
1106
  /**
1111
1107
  * @internal
1112
1108
  * @hidden
@@ -1129,11 +1125,10 @@ type FromMetaboxTarget = 'parent' | 'communicator';
1129
1125
  * Only reference if debugging raw postMessage traffic in browser devtools.
1130
1126
  */
1131
1127
  interface FromMetaBoxMessage {
1132
- host: typeof Metabox;
1133
- envelope: FromMetaBoxAPIEnvelope;
1134
- target: FromMetaboxTarget;
1128
+ host: typeof Metabox;
1129
+ envelope: FromMetaBoxAPIEnvelope;
1130
+ target: FromMetaboxTarget;
1135
1131
  }
1136
-
1137
1132
  /**
1138
1133
  * Base class for commands sent to the Metabox API.
1139
1134
  *
@@ -1152,11 +1147,10 @@ interface FromMetaBoxMessage {
1152
1147
  * @internal
1153
1148
  * @hidden
1154
1149
  */
1155
- declare class CommandBase {
1156
- /** The message envelope populated by subclass constructors and sent via {@link Communicator.sendCommandToMetabox}. */
1157
- data: ToMetaBoxMessageEnvelope;
1150
+ export declare class CommandBase {
1151
+ /** The message envelope populated by subclass constructors and sent via {@link Communicator.sendCommandToMetabox}. */
1152
+ data: ToMetaBoxMessageEnvelope;
1158
1153
  }
1159
-
1160
1154
  /**
1161
1155
  * Represents a callback listener for specific message types.
1162
1156
  * Used internally by EventDispatcher to store event listeners.
@@ -1175,11 +1169,11 @@ declare class CommandBase {
1175
1169
  *
1176
1170
  * @public
1177
1171
  */
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;
1172
+ export interface Listener {
1173
+ /** The message type this listener is registered for */
1174
+ messageType: string;
1175
+ /** The callback function to execute when a message of the specified type is received */
1176
+ callback: (data: unknown) => void;
1183
1177
  }
1184
1178
  /**
1185
1179
  * EventDispatcher is a class that manages event listeners and dispatches events to them.
@@ -1195,39 +1189,38 @@ interface Listener {
1195
1189
  * Do not reference or extend EventDispatcher in application code. Use only the Communicator interface methods.
1196
1190
  * If debugging communication failures, check browser console for postMessage errors related to this layer.
1197
1191
  */
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;
1192
+ export declare class EventDispatcher {
1193
+ /**
1194
+ * Storage for callback listeners by message type.
1195
+ */
1196
+ listeners: Listener[];
1197
+ /**
1198
+ * Removes all registered listeners. Subclasses override this to perform additional cleanup.
1199
+ * @param key - Instance key (used by subclass overrides for registry cleanup).
1200
+ */
1201
+ destroy(key: string): void;
1202
+ /**
1203
+ * Adds an event listener for receiving specific types of messages.
1204
+ *
1205
+ * @param {string} messageType - The message type to listen for.
1206
+ * @param callback - The callback function to execute when a message is received.
1207
+ */
1208
+ addEventListener(messageType: string, callback: (data: unknown) => void): this;
1209
+ /**
1210
+ * Dispatches an event to all listeners of a specific message type.
1211
+ *
1212
+ * @param {string} messageType - The message type.
1213
+ * @param data - The data associated with the event.
1214
+ */
1215
+ dispatchEvent(messageType: string, data: unknown): this;
1216
+ /**
1217
+ * Removes an event listener for a specific type of message.
1218
+ *
1219
+ * @param {string} messageType - The message type.
1220
+ * @param callback - The callback function to remove.
1221
+ */
1222
+ removeEventListener(messageType: string, callback: (data: unknown) => void): this;
1229
1223
  }
1230
-
1231
1224
  /**
1232
1225
  * What `integrateMetabox` knows about the iframe it created and the origin it
1233
1226
  * pointed that iframe at. Lets the Communicator check who is talking to it and
@@ -1235,11 +1228,11 @@ declare class EventDispatcher {
1235
1228
  *
1236
1229
  * @internal
1237
1230
  */
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;
1231
+ export interface CommunicatorConnection {
1232
+ /** The embedded iframe, when we created it ourselves. */
1233
+ iframe: HTMLIFrameElement | null;
1234
+ /** Origin of the configurator document, or `null` when it is not known yet. */
1235
+ origin: string | null;
1243
1236
  }
1244
1237
  /**
1245
1238
  * Handles messaging between the host page and embedded Metabox content.
@@ -1260,125 +1253,124 @@ interface CommunicatorConnection {
1260
1253
  *
1261
1254
  * @internal Use {@link Communicator.createInstance} or the {@link integrateMetabox} helper to instantiate.
1262
1255
  */
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;
1256
+ export declare class Communicator extends EventDispatcher {
1257
+ /**
1258
+ * Singleton reference to the current communicator instance.
1259
+ */
1260
+ static instance: Communicator | null;
1261
+ /**
1262
+ * Bound handler for incoming postMessage events.
1263
+ */
1264
+ private binder;
1265
+ /** Which side of the iframe boundary this instance runs on — see `acceptsMessageFrom`. */
1266
+ private readonly environment;
1267
+ /** The iframe we drive, when the integration created it. */
1268
+ private readonly iframe;
1269
+ /** Pinned configurator origin; `null` until we learn it. */
1270
+ private readonly targetOrigin;
1271
+ /** Keeps the "rejected an inbound message" warning to one per instance. */
1272
+ private senderRejectionReported;
1273
+ /** Keeps the "unknown configurator origin" warning to one per instance. */
1274
+ private wildcardTargetReported;
1275
+ /** Keeps the "our iframe left the document" warning to one per instance. */
1276
+ private staleFrameReported;
1277
+ /**
1278
+ * Constructs a Communicator, replacing any existing instance, and begins listening for messages.
1279
+ * @internal
1280
+ */
1281
+ constructor(data: MCAppLoaded['payload'], environment: MetaboxEnvironment, config?: Partial<MetaboxCommandConfig>, connection?: CommunicatorConnection);
1282
+ /**
1283
+ * Listens for Metabox to signal readiness, then initializes communicator.
1284
+ * @param apiReadyCallback - Called with the new Communicator once the Metabox is loaded.
1285
+ * @param {MetaboxEnvironment} environment - The environment in which the Communicator is running.
1286
+ * @param {MetaboxCommandConfig} config - optional initial config: standalone - if true - disable metabox custom template and all logic
1287
+ * @param {CommunicatorConnection} connection - the iframe and origin `integrateMetabox`
1288
+ * built, so the handshake can be attributed and later messages addressed precisely.
1289
+ * Omitted by hand-rolled embeds, which are then identified through the
1290
+ * `embeddedContent` id and the handshake's own origin.
1291
+ * @returns A cancel function that removes the handshake `message` listener.
1292
+ * `integrateMetabox` (the public entry point) calls this automatically when
1293
+ * a new integration supersedes a still-pending one, so direct internal
1294
+ * callers only need it for explicit early teardown. Idempotent.
1295
+ */
1296
+ static createInstance(apiReadyCallback: (api: Communicator) => void, environment: MetaboxEnvironment, config?: Partial<MetaboxCommandConfig>, connection?: CommunicatorConnection): () => void;
1297
+ /**
1298
+ * The origin to address the configurator by, decided once from the handshake.
1299
+ *
1300
+ * Prefers what `integrateMetabox` computed from the iframe URL, but yields to
1301
+ * the origin the handshake actually came from when the two disagree: a redirect
1302
+ * (a `config.domain` override pointing at a host that 30x's elsewhere) would
1303
+ * otherwise pin an origin nothing answers on, and every command would be
1304
+ * dropped silently. The sender already passed the window gate, so this cannot
1305
+ * be steered by an unrelated page.
1306
+ */
1307
+ private static resolveHandshakeOrigin;
1308
+ /**
1309
+ * Cleans up resources and stops listening for messages.
1310
+ */
1311
+ destroy(key: string): void;
1312
+ /** Destroys all active Communicator instances and clears the internal registry. */
1313
+ static clearAll(): void;
1314
+ /**
1315
+ * Retrieves a registered Communicator instance by its key.
1316
+ * @param key - The composite key (`version_environment_appId`) identifying the instance.
1317
+ */
1318
+ static getCommunicator(key: string): {
1319
+ instance: Communicator;
1320
+ } | undefined;
1321
+ /**
1322
+ * Posts a command to the Metabox iframe.
1323
+ * @param command - An action command containing data to send.
1324
+ */
1325
+ sendCommandToMetabox<T extends CommandBase>(command: T): void;
1326
+ /**
1327
+ * A superseding `integrateMetabox` call removes the iframe this handle was
1328
+ * built for. Commands then fall through to whatever now holds the contract id,
1329
+ * addressed by the origin pinned for the *old* integration — so if the new one
1330
+ * points at a different origin, the browser drops them without a word. The
1331
+ * handle is stale at that point and should be replaced by the one from the new
1332
+ * integration; say so rather than letting it fail quietly.
1333
+ */
1334
+ private reportStaleFrame;
1335
+ /**
1336
+ * `targetOrigin` for the iframe. The very first command is `metaboxConfig`,
1337
+ * which carries `hostUrl: location.href` — on a shop page that routinely holds
1338
+ * order ids and session parameters — so it must not be broadcast to whatever
1339
+ * document currently occupies the frame.
1340
+ *
1341
+ * Falls back to a wildcard rather than refusing to send: this leg carries
1342
+ * commands, and a configurator that silently stops responding on a customer
1343
+ * site is worse than the status quo. The fallback is reported once so it does
1344
+ * not pass unnoticed.
1345
+ */
1346
+ private resolveTarget;
1347
+ /**
1348
+ * Registers an event listener for messages dispatched by the Metabox.
1349
+ * @param messageType - The event name to listen for (e.g. `'configuratorDataUpdated'`).
1350
+ * @param callback - Handler invoked with the typed payload when the event fires.
1351
+ * @override
1352
+ */
1353
+ addEventListener<T extends FromMetaBoxApiEvents>(messageType: T, callback: (data: FromMetaboxMessagePayloads[T]) => void): this;
1354
+ /**
1355
+ * Dispatches a typed event to all registered listeners.
1356
+ * @param messageType - The event name to dispatch.
1357
+ * @param data - The payload to pass to each listener.
1358
+ * @override
1359
+ */
1360
+ dispatchEvent<T extends FromMetaBoxApiEvents>(messageType: T, data: FromMetaboxMessagePayloads[T]): this;
1361
+ /**
1362
+ * Removes a previously registered event listener.
1363
+ * @param messageType - The event name the listener was registered for.
1364
+ * @param callback - The same function reference that was passed to {@link addEventListener}.
1365
+ * @override
1366
+ */
1367
+ removeEventListener<T extends FromMetaBoxApiEvents>(messageType: T, callback: (data: FromMetaboxMessagePayloads[T]) => void): this;
1368
+ /**
1369
+ * Filters and dispatches incoming messages from the Metabox.
1370
+ * @param {MessageEvent} event - The postMessage event received on a window.
1371
+ */
1372
+ private handleMessageReceived;
1380
1373
  }
1381
-
1382
1374
  /**
1383
1375
  * Integrates the Metabox Basic Configurator into the page by injecting an iframe and
1384
1376
  * initializing a Communicator instance for host-to-iframe messaging.
@@ -1453,8 +1445,7 @@ declare class Communicator extends EventDispatcher {
1453
1445
  * },
1454
1446
  * );
1455
1447
  */
1456
- declare function integrateMetabox(configuratorId: string, containerId: string, apiReadyCallback: (api: Communicator) => void, config?: IntegrateMetaboxConfig): () => void;
1457
-
1448
+ export declare function integrateMetabox(configuratorId: string, containerId: string, apiReadyCallback: (api: Communicator) => void, config?: IntegrateMetaboxConfig): () => void;
1458
1449
  /**
1459
1450
  * Saves an image by triggering a download.
1460
1451
  *
@@ -1484,8 +1475,7 @@ declare function integrateMetabox(configuratorId: string, containerId: string, a
1484
1475
  * @param {string} imageUrl - The URL of the image to save.
1485
1476
  * @param {string} filename - The name of the file to save.
1486
1477
  */
1487
- declare function saveImage(imageUrl: string, filename: string): void;
1488
-
1478
+ export declare function saveImage(imageUrl: string, filename: string): void;
1489
1479
  /**
1490
1480
  * Sets the URL parameters based on the provided state.
1491
1481
  *
@@ -1495,7 +1485,7 @@ declare function saveImage(imageUrl: string, filename: string): void;
1495
1485
  *
1496
1486
  * @param {Record<string, string>} state - An object containing key-value pairs to set as URL parameters.
1497
1487
  */
1498
- declare function setUrlParams(state: Record<string, string>): void;
1488
+ export declare function setUrlParams(state: Record<string, string>): void;
1499
1489
  /**
1500
1490
  * Retrieves the URL parameters as an object.
1501
1491
  *
@@ -1506,8 +1496,7 @@ declare function setUrlParams(state: Record<string, string>): void;
1506
1496
  *
1507
1497
  * @returns An object containing the URL parameters.
1508
1498
  */
1509
- declare function getUrlParams(): Record<string, string>;
1510
-
1499
+ export declare function getUrlParams(): Record<string, string>;
1511
1500
  /**
1512
1501
  * Constructs the iframe source URL for the Metabox Basic Configurator.
1513
1502
  *
@@ -1530,8 +1519,7 @@ declare function getUrlParams(): Record<string, string>;
1530
1519
  * @param {string} configuratorId - An string identifier for the configurator.
1531
1520
  * @param {IntegrateMetaboxConfig} config - An object containing the configuration options.
1532
1521
  */
1533
- declare const prepareIframeSrc: (configuratorId: string, config?: IntegrateMetaboxConfig) => string;
1534
-
1522
+ export declare const prepareIframeSrc: (configuratorId: string, config?: IntegrateMetaboxConfig) => string;
1535
1523
  /**
1536
1524
  * Wrapper helper function to use with RxJS the same way as `fromEvent`, to listen to events from the Communicator.
1537
1525
  *
@@ -1552,8 +1540,7 @@ declare const prepareIframeSrc: (configuratorId: string, config?: IntegrateMetab
1552
1540
  * @returns An Observable that emits the typed payload each time the event fires.
1553
1541
  * @internal
1554
1542
  */
1555
- declare function fromCommunicatorEvent<T extends FromMetaBoxApiEvents>(target: Communicator, eventName: T): Observable<FromMetaboxMessagePayloads[T]>;
1556
-
1543
+ export declare function fromCommunicatorEvent<T extends FromMetaBoxApiEvents>(target: Communicator, eventName: T): Observable<FromMetaboxMessagePayloads[T]>;
1557
1544
  /**
1558
1545
  * Represents a command to send Metabox Config to Metabox Basic Configurator.
1559
1546
  *
@@ -1576,10 +1563,9 @@ declare function fromCommunicatorEvent<T extends FromMetaBoxApiEvents>(target: C
1576
1563
  * @param {string} appId - The unique identifier for the Communicator Instance
1577
1564
  * @param {MetaboxCommandConfig} config - optional initial config: standalone - if true - disable metabox custom template and all logic
1578
1565
  */
1579
- declare class MetaboxConfig extends CommandBase {
1580
- constructor(appId: string, config: MetaboxCommandConfig);
1566
+ export declare class MetaboxConfig extends CommandBase {
1567
+ constructor(appId: string, config: MetaboxCommandConfig);
1581
1568
  }
1582
-
1583
1569
  /**
1584
1570
  * Represents a command to get a PDF from Metabox Basic Configurator.
1585
1571
  * This class sends a message to the Metabox API to generate a PDF based on the current configuration.
@@ -1626,10 +1612,9 @@ declare class MetaboxConfig extends CommandBase {
1626
1612
  * api.sendCommandToMetabox(new GetPdf());
1627
1613
  * };
1628
1614
  */
1629
- declare class GetPdf extends CommandBase {
1630
- constructor();
1615
+ export declare class GetPdf extends CommandBase {
1616
+ constructor();
1631
1617
  }
1632
-
1633
1618
  /**
1634
1619
  * Represents a command to get a Call To Action Information from Metabox Basic Configurator.
1635
1620
  * This class sends a message to the Metabox API to generate Call To Action information based on the current
@@ -1671,10 +1656,9 @@ declare class GetPdf extends CommandBase {
1671
1656
  * api.sendCommandToMetabox(new GetCallToActionInformation());
1672
1657
  * };
1673
1658
  */
1674
- declare class GetCallToActionInformation extends CommandBase {
1675
- constructor();
1659
+ export declare class GetCallToActionInformation extends CommandBase {
1660
+ constructor();
1676
1661
  }
1677
-
1678
1662
  /**
1679
1663
  * Represents a command to get the camera configuration from Unreal.
1680
1664
  * This class sends a message to the Metabox API to get the camera from a scene.
@@ -1705,10 +1689,9 @@ declare class GetCallToActionInformation extends CommandBase {
1705
1689
  * api.sendCommandToMetabox(new GetCamera());
1706
1690
  * };
1707
1691
  */
1708
- declare class GetCamera extends CommandBase {
1709
- constructor();
1692
+ export declare class GetCamera extends CommandBase {
1693
+ constructor();
1710
1694
  }
1711
-
1712
1695
  /**
1713
1696
  * Represents a command to set the camera configuration.
1714
1697
  * This class sends a message to the Metabox API to set the camera on a scene.
@@ -1750,10 +1733,9 @@ declare class GetCamera extends CommandBase {
1750
1733
  *
1751
1734
  * @param {CameraCommandPayload} camera - The camera configuration.
1752
1735
  */
1753
- declare class SetCamera extends CommandBase {
1754
- constructor(camera: CameraCommandPayload);
1736
+ export declare class SetCamera extends CommandBase {
1737
+ constructor(camera: CameraCommandPayload);
1755
1738
  }
1756
-
1757
1739
  /**
1758
1740
  * Represents a command to reset the camera to its initial position.
1759
1741
  * This class sends a message to the Metabox API to reset the camera on a scene.
@@ -1775,10 +1757,9 @@ declare class SetCamera extends CommandBase {
1775
1757
  * api.sendCommandToMetabox(new ResetCamera());
1776
1758
  * };
1777
1759
  */
1778
- declare class ResetCamera extends CommandBase {
1779
- constructor();
1760
+ export declare class ResetCamera extends CommandBase {
1761
+ constructor();
1780
1762
  }
1781
-
1782
1763
  /**
1783
1764
  * Represents a command to reset the configurator state to its defaults.
1784
1765
  * This class sends a message to the Metabox API to restore product, materials,
@@ -1815,10 +1796,9 @@ declare class ResetCamera extends CommandBase {
1815
1796
  * api.sendCommandToMetabox(new ResetConfiguration());
1816
1797
  * };
1817
1798
  */
1818
- declare class ResetConfiguration extends CommandBase {
1819
- constructor();
1799
+ export declare class ResetConfiguration extends CommandBase {
1800
+ constructor();
1820
1801
  }
1821
-
1822
1802
  /**
1823
1803
  * Represents a command to apply zoom and change the camera zoom on a scene.
1824
1804
  * This class sends a command to the Metabox API to change zoom on a scene.
@@ -1844,10 +1824,9 @@ declare class ResetConfiguration extends CommandBase {
1844
1824
  *
1845
1825
  * @param {number} zoom - The zoom value to apply.
1846
1826
  */
1847
- declare class ApplyZoom extends CommandBase {
1848
- constructor(zoom: number);
1827
+ export declare class ApplyZoom extends CommandBase {
1828
+ constructor(zoom: number);
1849
1829
  }
1850
-
1851
1830
  /**
1852
1831
  * @remarks
1853
1832
  * Represents a command to initialize Showcase for a product scene and start a sequence for the product.
@@ -1879,10 +1858,9 @@ declare class ApplyZoom extends CommandBase {
1879
1858
  * api.sendCommandToMetabox(new InitShowcase());
1880
1859
  * };
1881
1860
  */
1882
- declare class InitShowcase extends CommandBase {
1883
- constructor();
1861
+ export declare class InitShowcase extends CommandBase {
1862
+ constructor();
1884
1863
  }
1885
-
1886
1864
  /**
1887
1865
  * Represents a command to play Showcase for a product when it is already initialized and paused.
1888
1866
  * This class sends a command to the Metabox API to play showcase for a product if it is already initialized and paused.
@@ -1912,10 +1890,9 @@ declare class InitShowcase extends CommandBase {
1912
1890
  * api.sendCommandToMetabox(new PlayShowcase());
1913
1891
  * };
1914
1892
  */
1915
- declare class PlayShowcase extends CommandBase {
1916
- constructor();
1893
+ export declare class PlayShowcase extends CommandBase {
1894
+ constructor();
1917
1895
  }
1918
-
1919
1896
  /**
1920
1897
  * @internal
1921
1898
  * @hidden
@@ -1923,10 +1900,9 @@ declare class PlayShowcase extends CommandBase {
1923
1900
  *
1924
1901
  * @param {Object} payload - An raw command that will be sent into MetaBox Unreal Application.
1925
1902
  */
1926
- declare class UnrealCommand extends CommandBase {
1927
- constructor(payload: object);
1903
+ export declare class UnrealCommand extends CommandBase {
1904
+ constructor(payload: object);
1928
1905
  }
1929
-
1930
1906
  /**
1931
1907
  * Represents a command to pause Showcase for a product when it is already initialized and playing.
1932
1908
  * This class sends a command to the Metabox API to pause showcase for a product if it is already initialized and playing.
@@ -1956,10 +1932,9 @@ declare class UnrealCommand extends CommandBase {
1956
1932
  * api.sendCommandToMetabox(new PauseShowcase());
1957
1933
  * };
1958
1934
  */
1959
- declare class PauseShowcase extends CommandBase {
1960
- constructor();
1935
+ export declare class PauseShowcase extends CommandBase {
1936
+ constructor();
1961
1937
  }
1962
-
1963
1938
  /**
1964
1939
  * Represents a command to stop Showcase for a product when it is already initialized, and you want to destroy it.
1965
1940
  * This class sends a command to the Metabox API to stop showcase for a product if it is already initialized.
@@ -1990,10 +1965,9 @@ declare class PauseShowcase extends CommandBase {
1990
1965
  * api.sendCommandToMetabox(new StopShowcase());
1991
1966
  * };
1992
1967
  */
1993
- declare class StopShowcase extends CommandBase {
1994
- constructor();
1968
+ export declare class StopShowcase extends CommandBase {
1969
+ constructor();
1995
1970
  }
1996
-
1997
1971
  /**
1998
1972
  * Image format.
1999
1973
  * This type represents the allowed image formats.
@@ -2048,13 +2022,12 @@ type MimeType = 'image/png' | 'image/jpeg' | 'image/webp';
2048
2022
  * @param {MimeType} mimeType - The output format.
2049
2023
  * @param {{ x: number; y: number }} [size] - Optional size in pixels.
2050
2024
  */
2051
- declare class GetScreenshot extends CommandBase {
2052
- constructor(mimeType: MimeType, size?: {
2053
- x: number;
2054
- y: number;
2055
- });
2025
+ export declare class GetScreenshot extends CommandBase {
2026
+ constructor(mimeType: MimeType, size?: {
2027
+ x: number;
2028
+ y: number;
2029
+ });
2056
2030
  }
2057
-
2058
2031
  /**
2059
2032
  * Represents a command to set a product by its ID.
2060
2033
  * This action sends a message to the Metabox API to set a product using the provided product ID.
@@ -2091,10 +2064,9 @@ declare class GetScreenshot extends CommandBase {
2091
2064
  *
2092
2065
  * @param {string} productId - The product ID.
2093
2066
  */
2094
- declare class SetProduct extends CommandBase {
2095
- constructor(productId: string);
2067
+ export declare class SetProduct extends CommandBase {
2068
+ constructor(productId: string);
2096
2069
  }
2097
-
2098
2070
  /**
2099
2071
  * Represents a command to set a material by its slot ID and Material ID.
2100
2072
  * To listen for changes after sending this command, listen to the 'configuratorDataUpdated' event.
@@ -2131,10 +2103,9 @@ declare class SetProduct extends CommandBase {
2131
2103
  * @param {string} slotId - The slot ID.
2132
2104
  * @param {string} materialId - The material ID.
2133
2105
  */
2134
- declare class SetProductMaterial extends CommandBase {
2135
- constructor(slotId: string, materialId: string);
2106
+ export declare class SetProductMaterial extends CommandBase {
2107
+ constructor(slotId: string, materialId: string);
2136
2108
  }
2137
-
2138
2109
  /**
2139
2110
  * Represents a command to set the environment by its ID.
2140
2111
  * To listen for changes after sending this command, listen to the 'configuratorDataUpdated' event.
@@ -2165,10 +2136,9 @@ declare class SetProductMaterial extends CommandBase {
2165
2136
  *
2166
2137
  * @param {string} environmentId - The environment ID.
2167
2138
  */
2168
- declare class SetEnvironment extends CommandBase {
2169
- constructor(environmentId: string);
2139
+ export declare class SetEnvironment extends CommandBase {
2140
+ constructor(environmentId: string);
2170
2141
  }
2171
-
2172
2142
  /**
2173
2143
  * Represents a command to set an environment material by its slot ID and Material ID.
2174
2144
  * To listen for changes after sending this command, listen to the 'configuratorDataUpdated' event.
@@ -2204,10 +2174,9 @@ declare class SetEnvironment extends CommandBase {
2204
2174
  * @param {string} slotId - The slot ID.
2205
2175
  * @param {string} materialId - The material ID.
2206
2176
  */
2207
- declare class SetEnvironmentMaterial extends CommandBase {
2208
- constructor(slotId: string, materialId: string);
2177
+ export declare class SetEnvironmentMaterial extends CommandBase {
2178
+ constructor(slotId: string, materialId: string);
2209
2179
  }
2210
-
2211
2180
  /**
2212
2181
  * A single material command accepted inside a {@link SetMaterials} batch.
2213
2182
  *
@@ -2262,10 +2231,9 @@ type MaterialCommand = SetProductMaterial | SetEnvironmentMaterial;
2262
2231
  *
2263
2232
  * @param {MaterialCommand[]} commands - The material commands to apply, in order.
2264
2233
  */
2265
- declare class SetMaterials extends CommandBase {
2266
- constructor(commands: MaterialCommand[]);
2234
+ export declare class SetMaterials extends CommandBase {
2235
+ constructor(commands: MaterialCommand[]);
2267
2236
  }
2268
-
2269
2237
  /**
2270
2238
  * Represents a command to toggle the embedded Metabox menu.
2271
2239
  * This command can only be used when using the metabox menu.
@@ -2291,10 +2259,9 @@ declare class SetMaterials extends CommandBase {
2291
2259
  *
2292
2260
  * @param {boolean} visible - A flag indicating whether the embedded menu should be visible.
2293
2261
  */
2294
- declare class ShowEmbeddedMenu extends CommandBase {
2295
- constructor(visible: boolean);
2262
+ export declare class ShowEmbeddedMenu extends CommandBase {
2263
+ constructor(visible: boolean);
2296
2264
  }
2297
-
2298
2265
  /**
2299
2266
  * Represents a command to toggle the Unreal Overlay Interface Menu.
2300
2267
  * This action sends a message to the Metabox API to toggle the visibility of the Unreal overlay UI.
@@ -2320,10 +2287,9 @@ declare class ShowEmbeddedMenu extends CommandBase {
2320
2287
  *
2321
2288
  * @param {boolean} visible - A flag indicating whether the Unreal overlay UI should be visible.
2322
2289
  */
2323
- declare class ShowOverlayInterface extends CommandBase {
2324
- constructor(visible: boolean);
2290
+ export declare class ShowOverlayInterface extends CommandBase {
2291
+ constructor(visible: boolean);
2325
2292
  }
2326
-
2327
2293
  /**
2328
2294
  * Represents a command to show measurement for a product when it is already loaded.
2329
2295
  * This class sends a command to the Metabox API to show measurement for a product if it is already initialized.
@@ -2345,10 +2311,9 @@ declare class ShowOverlayInterface extends CommandBase {
2345
2311
  * api.sendCommandToMetabox(new ShowMeasurement());
2346
2312
  * };
2347
2313
  */
2348
- declare class ShowMeasurement extends CommandBase {
2349
- constructor();
2314
+ export declare class ShowMeasurement extends CommandBase {
2315
+ constructor();
2350
2316
  }
2351
-
2352
2317
  /**
2353
2318
  * Represents a command to hide measurement for a product when it is already loaded.
2354
2319
  * This class sends a command to the Metabox API to hide measurement for a product if it is already initialized.
@@ -2370,10 +2335,9 @@ declare class ShowMeasurement extends CommandBase {
2370
2335
  * api.sendCommandToMetabox(new HideMeasurement());
2371
2336
  * };
2372
2337
  */
2373
- declare class HideMeasurement extends CommandBase {
2374
- constructor();
2338
+ export declare class HideMeasurement extends CommandBase {
2339
+ constructor();
2375
2340
  }
2376
-
2377
2341
  /**
2378
2342
  * Represents a command to resume the pixel streaming session.
2379
2343
  * This class sends a message to the Metabox API to resume a paused or disconnected stream.
@@ -2395,10 +2359,9 @@ declare class HideMeasurement extends CommandBase {
2395
2359
  * api.sendCommandToMetabox(new ResumeStream());
2396
2360
  * };
2397
2361
  */
2398
- declare class ResumeStream extends CommandBase {
2399
- constructor();
2362
+ export declare class ResumeStream extends CommandBase {
2363
+ constructor();
2400
2364
  }
2401
-
2402
2365
  /**
2403
2366
  * Represents a command to stop the pixel streaming session.
2404
2367
  * This class sends a message to the Metabox API to stop the active stream and release its resources.
@@ -2421,10 +2384,9 @@ declare class ResumeStream extends CommandBase {
2421
2384
  * api.sendCommandToMetabox(new StopStream());
2422
2385
  * };
2423
2386
  */
2424
- declare class StopStream extends CommandBase {
2425
- constructor();
2387
+ export declare class StopStream extends CommandBase {
2388
+ constructor();
2426
2389
  }
2427
-
2428
2390
  /**
2429
2391
  * Represents a command to reset the user inactivity (AFK) timer.
2430
2392
  * This class sends a message to the Metabox API to restart the inactivity countdown,
@@ -2454,9 +2416,7 @@ declare class StopStream extends CommandBase {
2454
2416
  * });
2455
2417
  * };
2456
2418
  */
2457
- declare class ResetUserInactivityTimer extends CommandBase {
2458
- constructor();
2419
+ export declare class ResetUserInactivityTimer extends CommandBase {
2420
+ constructor();
2459
2421
  }
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 };
2422
+ 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 };