> For the complete documentation index, see [llms.txt](https://docs.roomle.com/rubens/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roomle.com/rubens/rubens-products/rubens-products-reference/classes/exposed_callbacks.exposedcallbacks.md).

# ExposedCallbacks.ExposedCallbacks

[Embedding API Reference](/rubens/rubens-products/rubens-products-reference.md) / [Modules](/rubens/rubens-products/rubens-products-reference/modules.md) / [exposed-callbacks](/rubens/rubens-products/rubens-products-reference/modules/exposed_callbacks.md) / ExposedCallbacks

## Class: ExposedCallbacks

[exposed-callbacks](/rubens/rubens-products/rubens-products-reference/modules/exposed_callbacks.md).ExposedCallbacks

### Table of contents

#### Constructors

* [constructor](#constructor)

#### Properties

* [onButtonClicked](#onbuttonclicked)
* [onShowCustomView](#onshowcustomview)

#### Methods

* [onBackToWebsite](#onbacktowebsite)
* [onCollapseDrawer](#oncollapsedrawer)
* [onExpandDrawer](#onexpanddrawer)
* [onHideCustomView](#onhidecustomview)
* [onHidePopUp](#onhidepopup)
* [onPartListUpdate](#onpartlistupdate)
* [onPlanElementAdded](#onplanelementadded)
* [onPlanElementChanged](#onplanelementchanged)
* [onPlanElementMoved](#onplanelementmoved)
* [onPlanElementRemoved](#onplanelementremoved)
* [onPlanUpdate](#onplanupdate)
* [onRequestPlan](#onrequestplan)
* [onRequestProduct](#onrequestproduct)
* [onResize](#onresize)
* [onSaveDraft](#onsavedraft)
* [onShowPopUp](#onshowpopup)
* [onSidebarEvent](#onsidebarevent)
* [onTooltipClose](#ontooltipclose)
* [onUseFullPage](#onusefullpage)

### Constructors

#### constructor

• **new ExposedCallbacks**(): [`ExposedCallbacks`](/rubens/rubens-products/rubens-products-reference/classes/exposed_callbacks.exposedcallbacks.md)

**Returns**

[`ExposedCallbacks`](/rubens/rubens-products/rubens-products-reference/classes/exposed_callbacks.exposedcallbacks.md)

### Properties

#### onButtonClicked

• **onButtonClicked**: \<K>(`name`: `K`, `args?`: [`ButtonCallbackPayloads`](/rubens/rubens-products/rubens-products-reference/modules/types.md#buttoncallbackpayloads)\[`K`]) => `boolean` | `void` | `Promise`<`boolean`>

Gets called when a button in the UI is clicked

**Type declaration**

▸ <`K`>(`name`, `args?`): `boolean` | `void` | `Promise`<`boolean`>

**Type parameters**

| Name | Type                                                                                              |
| ---- | ------------------------------------------------------------------------------------------------- |
| `K`  | extends [`UI_BUTTON`](/rubens/rubens-products/rubens-products-reference/enums/types.ui_button.md) |

**Parameters**

| Name    | Type                                                                                                                        | Description                                                                                                                                                                          |
| ------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `name`  | `K`                                                                                                                         |                                                                                                                                                                                      |
| `args?` | [`ButtonCallbackPayloads`](/rubens/rubens-products/rubens-products-reference/modules/types.md#buttoncallbackpayloads)\[`K`] | Optional arguments specific to the button that was clicked. This parameter is an object where each key is a UI\_BUTTON and the value is the corresponding arguments for that button. |

**Returns**

`boolean` | `void` | `Promise`<`boolean`>

***

#### onShowCustomView

• **onShowCustomView**: (...`__namedParameters`: [`CustomViewCallbackInfo`](/rubens/rubens-products/rubens-products-reference/modules/types.md#customviewcallbackinfo)) => [`Nullable`](/rubens/rubens-products/rubens-products-reference/modules/exposed_api._internal_.md#nullable)<`boolean`> | `Promise`<[`Nullable`](/rubens/rubens-products/rubens-products-reference/modules/exposed_api._internal_.md#nullable)<`boolean`>>

**Type declaration**

▸ (`...«destructured»`): [`Nullable`](/rubens/rubens-products/rubens-products-reference/modules/exposed_api._internal_.md#nullable)<`boolean`> | `Promise`<[`Nullable`](/rubens/rubens-products/rubens-products-reference/modules/exposed_api._internal_.md#nullable)<`boolean`>>

**Parameters**

| Name                | Type                                                                                                                  |
| ------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `...«destructured»` | [`CustomViewCallbackInfo`](/rubens/rubens-products/rubens-products-reference/modules/types.md#customviewcallbackinfo) |

**Returns**

[`Nullable`](/rubens/rubens-products/rubens-products-reference/modules/exposed_api._internal_.md#nullable)<`boolean`> | `Promise`<[`Nullable`](/rubens/rubens-products/rubens-products-reference/modules/exposed_api._internal_.md#nullable)<`boolean`>>

### Methods

#### onBackToWebsite

▸ **onBackToWebsite**(): `void`

Gets called when the configuring is paused and the user leaves fullscreen configurator mode

**Returns**

`void`

***

#### onCollapseDrawer

▸ **onCollapseDrawer**(`_wasChangeBetweenDesktopAndMobile`): `void`

**Parameters**

| Name                                | Type      |
| ----------------------------------- | --------- |
| `_wasChangeBetweenDesktopAndMobile` | `boolean` |

**Returns**

`void`

***

#### onExpandDrawer

▸ **onExpandDrawer**(`_wasChangeBetweenDesktopAndMobile`): `void`

**Parameters**

| Name                                | Type      |
| ----------------------------------- | --------- |
| `_wasChangeBetweenDesktopAndMobile` | `boolean` |

**Returns**

`void`

***

#### onHideCustomView

▸ **onHideCustomView**(`...«destructured»`): `void`

**Parameters**

| Name                | Type                                                                                                                  |
| ------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `...«destructured»` | [`CustomViewCallbackInfo`](/rubens/rubens-products/rubens-products-reference/modules/types.md#customviewcallbackinfo) |

**Returns**

`void`

***

#### onHidePopUp

▸ **onHidePopUp**(): `void`

**Returns**

`void`

***

#### onPartListUpdate

▸ **onPartListUpdate**(`partList`, `hash`): `void`

fullList fullList (needed for price calculation) of the current configuration

**Parameters**

| Name       | Type             | Description                                  |
| ---------- | ---------------- | -------------------------------------------- |
| `partList` | `KernelPartList` | the part list with all details, grouped, etc |
| `hash`     | `string`         | -                                            |

**Returns**

`void`

***

#### onPlanElementAdded

▸ **onPlanElementAdded**(`addedObject`): `void`

Called when an element is added to the plan, not called when wall or construction element added

**Parameters**

| Name          | Type           |
| ------------- | -------------- |
| `addedObject` | `UiPlanObject` |

**Returns**

`void`

***

#### onPlanElementChanged

▸ **onPlanElementChanged**(`changedObject`): `void`

Called when an element is changed in the plan, not called when wall or construction element changed

**Parameters**

| Name            | Type           |
| --------------- | -------------- |
| `changedObject` | `UiPlanObject` |

**Returns**

`void`

***

#### onPlanElementMoved

▸ **onPlanElementMoved**(`changedObject`): `void`

Called when an element is moved in the plan, not called when wall or construction element is moved

**Parameters**

| Name            | Type           |
| --------------- | -------------- |
| `changedObject` | `UiPlanObject` |

**Returns**

`void`

***

#### onPlanElementRemoved

▸ **onPlanElementRemoved**(`removedObject`): `void`

Called when an element is removed from the plan, not called when wall or construction element removed

**Parameters**

| Name            | Type           |
| --------------- | -------------- |
| `removedObject` | `UiPlanObject` |

**Returns**

`void`

***

#### onPlanUpdate

▸ **onPlanUpdate**(`objects`): `void`

Gets called if a plan object gets added, changed or removed and returns all objects of the plan

**Parameters**

| Name      | Type              | Description             |
| --------- | ----------------- | ----------------------- |
| `objects` | `UiPlanObject`\[] | all objects in the plan |

**Returns**

`void`

***

#### onRequestPlan

▸ **onRequestPlan**(`planId`, `image`, `items`, `plan`): `void`

**Parameters**

| Name     | Type          |
| -------- | ------------- |
| `planId` | `string`      |
| `image`  | `Base64Image` |
| `items`  | `any`\[]      |
| `plan`   | `any`         |

**Returns**

`void`

***

#### onRequestProduct

▸ **onRequestProduct**(`configurationId`, `image`, `partList`, `price`, `labels`, `configuration`): `void`

Returns all necessary params when 'Request Product'/'Checkout' button has pressed

**Parameters**

| Name              | Type                                                                                                 | Description                                                                              |
| ----------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `configurationId` | `string`                                                                                             | id of the current configuration                                                          |
| `image`           | `Base64Image`                                                                                        | image of the current configuration                                                       |
| `partList`        | `KernelPartList`                                                                                     | the part list with all details, grouped, etc                                             |
| `price`           | [`Price`](/rubens/rubens-products/rubens-products-reference/interfaces/exposed_callbacks.price.md)   | price of the current configuration, either set via setPrice or from Roomle price service |
| `labels`          | [`Labels`](/rubens/rubens-products/rubens-products-reference/interfaces/exposed_callbacks.labels.md) | the label of the catalog and the furniture system                                        |
| `configuration`   | `RapiConfigurationEnhanced` \| `ExternalConfiguration`                                               | the data returned from the Roomle backend                                                |

**Returns**

`void`

***

#### onResize

▸ **onResize**(`isDesktop`): `void`

**Parameters**

| Name        | Type      |
| ----------- | --------- |
| `isDesktop` | `boolean` |

**Returns**

`void`

***

#### onSaveDraft

▸ **onSaveDraft**(`id`, `image`, `url`, `data`): `void`

called when triggerSaveDraft called

**Parameters**

| Name    | Type                                                                                                                                | Description                                                                                             |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `id`    | `string`                                                                                                                            | configuration id or plan id                                                                             |
| `image` | `string`                                                                                                                            | image of the current configuration                                                                      |
| `url`   | `string`                                                                                                                            | generated url from save draft                                                                           |
| `data`  | [`SaveDraftPayload`](/rubens/rubens-products/rubens-products-reference/interfaces/exposed_callbacks._internal_.savedraftpayload.md) | object contains { type: 'plan' \| 'configuration', payload: configuration object or plan snapshot data} |

**Returns**

`void`

***

#### onShowPopUp

▸ **onShowPopUp**(): `void`

**Returns**

`void`

***

#### onSidebarEvent

▸ **onSidebarEvent**(`...«destructured»`): `void`

**Parameters**

| Name                | Type                       |
| ------------------- | -------------------------- |
| `...«destructured»` | `SidebarEventCallbackInfo` |

**Returns**

`void`

***

#### onTooltipClose

▸ **onTooltipClose**(`tooltipName`): `void`

Gets triggered if a tooltip gets closed by controls button

**Parameters**

| Name          | Type     |
| ------------- | -------- |
| `tooltipName` | `string` |

**Returns**

`void`

***

#### onUseFullPage

▸ **onUseFullPage**(): `void`

**Returns**

`void`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.roomle.com/rubens/rubens-products/rubens-products-reference/classes/exposed_callbacks.exposedcallbacks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
