ExposedApi.Internal.SdkConnector

Embedding API Reference / Modules / exposed-api / <internal> / SdkConnector

Class: SdkConnector

exposed-api.<internal>.SdkConnector

Table of contents

Constructors

Accessors

Methods

Constructors

constructor

new SdkConnector(sdkWrapper, store, analytics, embeddingCallbacks, eventEmitter, intl, libs): SdkConnector

Parameters

Name
Type

sdkWrapper

store

analytics

embeddingCallbacks

eventEmitter

intl

libs

Returns

SdkConnector

Accessors

configuratorApi

get configuratorApi(): Promise<default>

Returns

Promise<default>


configuratorConnector

get configuratorConnector(): Promise<SdkConnectorConfigurator>

Returns

Promise<SdkConnectorConfigurator>


hasPlanner

get hasPlanner(): boolean

Returns

boolean


isE2E

get isE2E(): boolean

Returns

boolean


plannerApi

get plannerApi(): Promise<default>

Returns

Promise<default>


plannerConnector

get plannerConnector(): Promise<SdkConnectorPlanner>

Returns

Promise<SdkConnectorPlanner>


viewerApi

get viewerApi(): Promise<default>

Returns

Promise<default>


viewerConnector

get viewerConnector(): Promise<SdkConnectorViewer>

Returns

Promise<SdkConnectorViewer>

Methods

addUiCallback

addUiCallback(listener): void

Parameters

Name
Type

listener

Returns

void

Deprecated

use .configuratorConnector.then((connector) => connector.addUiCallback(listener))


canvasElementReady

canvasElementReady(element): void

Parameters

Name
Type

element

HTMLElement

Returns

void


createExposedApi

createExposedApi(module, mainMessageHandler, eventEmitter): Promise<void>

Parameters

Name
Type

module

mainMessageHandler

eventEmitter

Returns

Promise<void>


getRapiAccess

getRapiAccess(): Promise<default>

Returns

Promise<default>


getStorage

getStorage(): Nullable<default>

Returns

Nullable<default>


getTenant

getTenant(): Promise<RapiTenant>

Returns

Promise<RapiTenant>


giveGaConsent

giveGaConsent(): void

Returns

void


goBack

goBack(): Promise<void>

Returns

Promise<void>


hasActivePackage

hasActivePackage(): Promise<boolean>

Returns

Promise<boolean>


initCanvasElement

initCanvasElement(module): Promise<void>

Parameters

Name
Type

module

Returns

Promise<void>


initConfigurator

initConfigurator(): Promise<void>

Returns

Promise<void>


initialized

initialized(): void

Returns

void


isCorrectConfiguratorDomain

isCorrectConfiguratorDomain(configuratorId): Promise<boolean>

Parameters

Name
Type

configuratorId

string

Returns

Promise<boolean>


isIdAGlb

isIdAGlb(id): Promise<boolean>

Parameters

Name
Type

id

string

Returns

Promise<boolean>


loadComponent

loadComponent(componentId, initData?): Promise<Nullable<LoadResponse>>

Parameters

Name
Type

componentId

string

initData?

Returns

Promise<Nullable<LoadResponse>>


loadConfigurableItem

loadConfigurableItem(configurableItemId, initData?): Promise<Nullable<LoadResponse>>

Parameters

Name
Type

configurableItemId

string

initData?

Returns

Promise<Nullable<LoadResponse>>


loadConfiguration

loadConfiguration(configurationId, initData?): Promise<Nullable<LoadResponse>>

Parameters

Name
Type

configurationId

string

initData?

Returns

Promise<Nullable<LoadResponse>>


loadConfigurationString

loadConfigurationString(configurationString, initData?): Promise<Nullable<LoadResponse>>

Parameters

Name
Type

configurationString

string

initData?

Returns

Promise<Nullable<LoadResponse>>


loadObject

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

Load a object which can be one of the following:

  • Component (use your component id and prefix it with 'component@', e.g. component@demoCatalogId:externalMeshes)

  • Plan

  • Static item (e.g. GLB)

  • Configurable Item

  • Configuration

Parameters

Name
Type

id

string

Returns

Promise<Nullable<LoadResponse>>


loadPlan

loadPlan(id, options?): Promise<{ objectRuntimeId: Nullable<number> ; plan: Nullable<void> }>

Parameters

Name
Type

id

options

Object

options.doNotFinishLoading?

boolean

options.isObjectId?

boolean

Returns

Promise<{ objectRuntimeId: Nullable<number> ; plan: Nullable<void> }>


loadSelectedPlanObject

loadSelectedPlanObject(shouldStartConfigure?): Promise<void>

Parameters

Name
Type
Default value

shouldStartConfigure

boolean

true

Returns

Promise<void>


loadStaticItem

loadStaticItem(id): Promise<null>

Parameters

Name
Type

id

Returns

Promise<null>


preparePerspectiveImage

preparePerspectiveImage(): Promise<Base64Image>

Returns

Promise<Base64Image>


removeUiCallback

removeUiCallback(listener): void

Parameters

Name
Type

listener

Returns

void

Deprecated

use configuratorConnector.then((connector) => connector.removeUiCallback(listener))


saveConfigToIdb

saveConfigToIdb(): Promise<void>

Returns

Promise<void>


saveCurrentConfiguration

saveCurrentConfiguration(): Promise<RapiConfigurationEnhanced>

Returns

Promise<RapiConfigurationEnhanced>


saveCurrentObject

saveCurrentObject(): Promise<RapiConfigurationEnhanced | RapiPlanSnapshotGetData | RapiPlan>

Returns

Promise<RapiConfigurationEnhanced | RapiPlanSnapshotGetData | RapiPlan>


setParameter

setParameter(parameter, value, isRaw?): Promise<void>

Parameters

Name
Type
Default value

parameter

KernelParameter

undefined

value

string

undefined

isRaw

boolean

false

Returns

Promise<void>


waitForLoad

waitForLoad(): Promise<Nullable<LoadResponse>>

Returns

Promise<Nullable<LoadResponse>>

Last updated