Default constructor. Alwyas use getInstance() instead of default contructor to get an instance of the SDK.
DigitalCommerceProxyConfig Config to initialize this SDK.
The datasource connection used by this SDK.
Credentials to set in request header for API call to Secure Server. it can be "omit" | "same-origin" | "include" by default it will be "same-origin"
Private secureServerUrl
Private singleton instance of this SDK. There should always be only 1 instance.
getter method for namespace. Provides the salesforce org namespace
setter method for namespace. Set custom namespace
Proxy addToCart method calls Server SDK addToCart method with given input
Proxy method calls Server SDK submitOrder method with given input
Proxy authenticateUser method calls Server SDK signIn method with given input
Create a default AddToCartInput object.
Create a default AssetToBasketInput object.
Create a default AuthenticateUserInput object.
Create a default GetItemsInCartInput object.
Create a default GetOfferInput object.
Create a default createGetOffersInput object.
Create a default SaveCartInput object.
Create a default createSignOutUserInput object.
Create a default SubmitOrderInput object.
Create a default UpdateBillingDetailsInput object.
Create a default UpdateItemsInCartInput object.
Create a default ValidateOfferInput object.
ValidateOfferInput default ValidateOfferInput.
Fires an event to listeners.
Name of the event to fire.
Name of the event to fire.
Payload of the event to fire.
Gets the currency details from Server SDK
Proxy getFilteredOffersList method calls Server SDK getFilteredOffersList method with given input
Proxy getItemsInCart method calls Server SDK getItemsInCart method with given input
Proxy getFilteredOffersList method calls Server SDK getFilteredOffersList method with given input
Proxy getOffers method calls Server SDK getOffers method with given input
Proxy getPromotions method calls Server SDK getPromotions method with given input
Proxy getSelectedOffer method calls Server SDK getSelectedOffer method to get the configured offer bundle
Returns a API call response.
Registers a callback for an event
Name of the event to listen for.
Contains callback function.
Proxy saveCart method calls Server SDK saveCart method with given input
Proxy authenticateUser method calls Server SDK signIn method with given input
Proxy submitOrder method calls Server SDK submitOrder method with given input
Unregisters a callback for an event
Name of the event to unregister from.
Contains callback function.
Proxy updateBillingDetails method calls Server SDK updateBillingDetails method with given input
Proxy updateItemsInCart method calls Server SDK updateItemsInCart method with given input
Proxy validateOffer method calls Server SDK validateOffer method with given input
Returns the version number of SDK.
Returns SDK version number as string
Create a DigitalCommerceProxyConfig object that consists of a secureServerUrl and a DataSourceService.
Configuration object to instantiate SDK.
Adds all the enumerable string keyed function properties of a source
object to the sdk prototype.
.extend
should only be used to add new methods and it won't override the existing methods.
Note: If the property already exists, it will be not be added.
Custom functions which are being extended should have proper namespaces to avoid issues during upgrades. When Vlocity releases new changes it won't impact if unique namespaces are used.
Example: myCompanyOrFeatureMethodName
The object of functions
Get a singleton instance of this SDK.
SDK instance.
Adds all the enumerable string keyed function properties of a source object to the sdk prototype.
.override
method should only be used to override the existing methods and should only be used in rare cases.
Overriding the existing or default methods may cause unintended consequences and may also impact during upgrades.
Please be cautious while using this
The object of functions
Generated using TypeDoc
Digital Commerce Proxy SDK is to interact with Vlocity Digital Commerce SDK functionality hosted in node server.
The Digital Commerce Proxy SDK is a JavaScript library that act as Proxy between UI and Digital Commerce SDK hosted in server.
The Digital Commerce Proxy SDK contains all Input instance creation methods & invoke API methods. It will validate input before sending to Server SDK.
SDK can be shared by different applicationsuser interfaces. SDK, like any Vlocity SDK, can be extended and overrided to customized implementations.