UNPKG

@dutchfurniturefulfilment/skik-client

Version:

Javascript package for integrating a SKIK configurator inside web projects.

58 lines (32 loc) 2.95 kB
[![npm version](https://badge.fury.io/js/%40dutchfurniturefulfilment%2Fskik-client.svg)](https://badge.fury.io/js/%40dutchfurniturefulfilment%2Fskik-client) # SKIK Client - Documentation The skik-client JS package is used to integrate a SKIK closet system configurator into another web page. The configurator is externally hosted, and will be implemented through a dynamically created `<iframe>`. This package makes integration easy by providing an expressive interface to communicate with the application, and subscribe to events and changes to the user's configuration. _**Note:** The client package is currently in beta. Some method-names or -signatures might change slightly in the upcoming releases. We will ensure that any implementing parties are notified about such changes in advance._ ## Pages, besides the [Quick start guide](quick-start) ### Examples - [**Injecting product prices and displaying a total price**](examples/injecting-prices) Because of technical decisions, the SKIK Configurator system does not have any persisted internal price data storage. Also, the configurator currently does not itself implement a display of the total configuration price. This means that if you want to have a real-time display of prices some additional work is required from the side of the implementing party: - [**Storing configurations and retrieving product manifests**](examples/storing-configurations) The SKIK client instance provides the method `Client # getConfigurationHash()` to retrieve a unique string that identifies the current configuration. This string can - among other cases - be used for adding products to the shopping cart, or save a configuration as a user's favorite. ### API Docs #### Classes - [**`SKIKClient.static`**](api/static) The static interface of the package's default export. - [**`SKIKClient.Client`**](api/client) The Client class instance API. - [**`SKIKClient.EventSubscription`**](api/event-subscription) The subscription class that is returned from all [event subscribe calls](api/client#listening-for-events). #### Data interfaces - [**Event channels**](interfaces/event-channels) All event channels on `Client` instances that can be subscribed to, and their payload type signatures. ## Terminology ### Configuration hash A hash representing a saved, immutable SKIK closet configuration that can be identified by that hash at any time in the future. ### Client A SKIKClient class instance that handles construction, and then 2-way communication with an i-frame element serving the configurator application. ### Configurator The wardrobe configurator application that is served by the i-frame created by **client**. ### Host application The project that implements a SKIK configurator by the means of a SKIK client instantiation. ### Product manifest A list of product EAN codes associated with required quantities that composes to a certain SKIK Closet configuration.