Embedding API Reference / Modules / exposed-api / ExposedApi

# Class: ExposedApi

exposed-api.ExposedApi

# Table of contents

# Constructors

# Accessors

# Methods

# Constructors

# constructor

new ExposedApi(sdkConnector, messageHandler, sdk, exposedCallbacks, store, analytics, globalCallback): ExposedApi

# Parameters

Name Type
sdkConnector SdkConnector
messageHandler null | MessageHandler
sdk default | default | default
exposedCallbacks ExposedCallbacks
store Store<StoreState>
analytics Analytics
globalCallback GlobalCallback

# Returns

ExposedApi

# Defined in

src/configurator/embedding/exposed-api.ts:50 (opens new window)

# Accessors

# callbacks

get callbacks(): ExposedCallbacks

# Returns

ExposedCallbacks

# Defined in

src/configurator/embedding/exposed-api.ts:216 (opens new window)

# Methods

# giveGaConsent

giveGaConsent(): void

call this method if consent of Google Analytics is given later and not already in init-data on boot

# Returns

void

# Defined in

src/configurator/embedding/exposed-api.ts:338 (opens new window)


# insertObject

insertObject(id, position?, rotation?): Promise<void>

Insert an object into the current MOC/planner scene If no position or rotation is set then it will be placed automatically (without overlapping other objects) with rotation 0

# Parameters

Name Type Description
id string
position? Position3 as x (left/right), y (up/down) and z (front/back)
rotation? number in radians

# Returns

Promise<void>

# Defined in

src/configurator/embedding/exposed-api.ts:353 (opens new window)


# loadConfigurationString

loadConfigurationString(configurationString): Promise<Nullable<LoadResponse>>

call this method to load the configuration string you want into the 3d Scene

# Parameters

Name Type Description
configurationString string string of the configuration, starts with { and ends with }

# Returns

Promise<Nullable<LoadResponse>>

null if configuration can not be loaded

# Defined in

src/configurator/embedding/exposed-api.ts:236 (opens new window)


# loadObject

loadObject(id): Promise<Nullable<LoadResponse>>

call this method to load the object you want into the 3d Scene

# Parameters

Name Type Description
id string database ID of the object you want to load

# Returns

Promise<Nullable<LoadResponse>>

# Defined in

src/configurator/embedding/exposed-api.ts:224 (opens new window)


# pauseConfiguring

pauseConfiguring(): void

This method can be used to pause configuration If the configurator was called in view-only mode this method triggers the onBackToWebsite callback. To know when the view-only mode is activated see the description of the startConfiguring method

# Returns

void

# Defined in

src/configurator/embedding/exposed-api.ts:279 (opens new window)


# setActiveParameterGroup

setActiveParameterGroup(groupKey): void

Changes the currently selected parameter group to a parameter group containing the specified key.

# Parameters

Name Type Description
groupKey string parameterGroup key.

# Returns

void

# Defined in

src/configurator/embedding/exposed-api.ts:366 (opens new window)


# setPrice

setPrice(currencySymbol, price): void

set the price for the UI to show most likely needed when implementing your own price service

# Parameters

Name Type
currencySymbol string
price number

# Returns

void

# Defined in

src/configurator/embedding/exposed-api.ts:254 (opens new window)


# startConfiguring

startConfiguring(): void

This method can be used to start configuration when 3d scene is only initialized as viewer first, the configurator is automatically instantiated as viewer if the container where the configurator is placed is smaller than 1024px (this breakpoint could change in future) so do not rely on this exact pixel setting

# Returns

void

# Defined in

src/configurator/embedding/exposed-api.ts:268 (opens new window)


# triggerRequestPlan

triggerRequestPlan(): Promise<void>

call this method to trigger the onRequestPlan event from outside of the iframe. When this method is called the same process is kicked off as if the user would have clicked on request plan. Therefore you can just use the same callback to react on the response

# Returns

Promise<void>

# Defined in

src/configurator/embedding/exposed-api.ts:326 (opens new window)


# triggerRequestProduct

triggerRequestProduct(): Promise<void>

call this method to trigger the onRequestProduct event from outside of the iframe. When this method is called the same process is kicked off as if the user would have clicked on request product. Therefore you can just use the same callback to react on the response

# Returns

Promise<void>

# Defined in

src/configurator/embedding/exposed-api.ts:293 (opens new window)


# triggerSaveDraft

triggerSaveDraft(email?): Promise<void>

call this method to trigger the onSaveDraft event from outside of the iframe. When this method is called the same process is kicked off as if the user would have clicked on save draft in the bottom bar. Therefore you can just use the same callback to react on the response

# Parameters

Name Type Default value
email string ''

# Returns

Promise<void>

# Defined in

src/configurator/embedding/exposed-api.ts:309 (opens new window)