Interface: MountPayload
Configuration for mounting a Mimeeq component.
This interface defines the parameters needed to initialize and mount a Mimeeq component into the DOM. It establishes the connection to API endpoints, identifies the customer account, and specifies where the component should be rendered.
The mount payload is used with the mount
method to create a foundation for rendering
specific embed types through the returned MountRoot object.
Properties
appUrl?
optional
appUrl:string
Base URL for the application.
Used primarily for AR experiences to provide a return path. This should be the URL to the main application hosting the embed.
baseURL
baseURL:
string
Base URL for API requests.
This specifies the endpoint for all API communications from the component. It should point to the Mimeeq API gateway or a compatible proxy.
CDNPath
CDNPath:
string
Path to the CDN for static assets.
This URL is used to load images, 3D models, and other static resources required by the component. It should point to the customer's asset bucket.
customerId
customerId:
string
Identifier for the customer account.
This specifies which customer's products and configurations will be available in the mounted component. Each customer has their own isolated data and settings.
node
node:
HTMLElement
DOM element where the component should be mounted.
This is the container element in which the Mimeeq component will be rendered. It should be a valid DOM element with sufficient size to display the component.
onEventDispatch()?
optional
onEventDispatch: (eventPayload
) =>Promisable
<void
>
Callback function for handling events from the component.
This function is called whenever a significant event occurs within the component, such as navigation changes, configuration updates, or user actions.
Parameters
eventPayload
Returns
Promisable
<void
>
preloadedCustomerData?
optional
preloadedCustomerData:CustomerMetadata
Preloaded customer data for faster initialization.
When provided, the component will use this data instead of fetching customer information from the API. This can reduce initialization time when customer data is already available.
uid
uid:
string
Unique identifier for this component instance.
This ID is used to identify a specific component instance and is typically the shortcode for the embed. It should be unique across all embeds on the page.