uStoreProvider api store - XMPieLab/uStore-NG GitHub Wiki

Functions

getCurrentStore() β‡’ Promise.<StoreModel>

Gets the store to which the user is currently logged in. The store unique ID and the currently logged-in user are identified by the provided security token.

getCurrentUser() β‡’ Promise.<UserModel>

Gets the currently logged-in user, who is identified by the provided security token.

updateUserPreferences(value) β‡’ Promise.<boolean>

Update or create preferences for user that is currentlly logged-in to the store.

getCultures() β‡’ Promise.<Array.<CultureModel>>

Gets the cultures of the store.

getCurrencies() β‡’ Promise.<CurrencyModelArray>

Gets the currencies of the store.

getCartItemsCount() β‡’ Promise.<CartIndicatorModel>

Gets the information about the cart items count.

renewToken() β‡’ Promise.<SecurityTokenModel>

Renews the user session.

loginBySSOToken(Token) β‡’ Promise.<SecurityTokenModel>

Logs the user into the store using temporary SSO token.

Typedefs

CultureModelArray : Array.<CultureModel>

A list of the store's cultures

CurrencyModelArray : Array.<CurrencyModel>

A list of the store's currencies

GUID : string

globally unique identifier

StoreSeoConfigurationModel : Object

Provides information about the SEO configuration of a store.

StoreModel : Object

Provides information about a store.

UserRolesModel : Object

Provides information about a user's role in a store.

UserGroupModel : Object

Provides information about a user group.

CustomUserPropertyModel : Object

Provides information about a custom user property.

UserModel : Object

Provides information about a user.

CultureModel : Object

Provides information about a culture.

CurrencyModel : Object

Provides information about a currency.

CartIndicatorModel : Object

Provides information about the cart items count.

SecurityTokenModel : Object

Provides information about a security token (a unique and non-guessable value) that is used for user authentication.

SeoTitleTagType : enum

The types of title tags.

Kind: global enum
Properties

Name Type Default Description
NotIncluded number 1 Do not add tag to titles of webpages.
Suffix number 2 Add tag as the suffix to the webpage title.
Prefix number 3 Add tag as the prefix to the webpage title.

TaxFormatType : enum

Defines whether the tax appears as part of the price.

Kind: global enum
Properties

Name Type Default Description
Exclude number 1 Price does not include tax.
Include number 2 Price includes tax.
Custom number 3 Custom tax format built using the following placeholders: {Price}, {Tax} and {PriceIncludingTax}.
E.g. "{Price} + {Tax} VAT = {PriceIncludingTax}"

StoreType : enum

Store types.

Kind: global enum
Properties

Name Type Default Description
B2B number 1 Business to business store.
B2C number 2 Business to customer store.
uStoreConnect number 3 In this store type uStore integrates with external e-commerce systems.
uStoreConnectEnterprise number 4 In this store type uStore integrates with external e-commerce systems with extended functionality.

GenderType : enum

Gender options.

Kind: global enum
Properties

Name Type Default Description
Male number 1 Male.
Female number 2 Female.

getCurrentStore() β‡’ Promise.<StoreModel>

Gets the store to which the user is currently logged in. The store unique ID and the currently logged-in user are identified by the provided security token.

Kind: global function
Returns: Promise.<StoreModel> - Returns information about a store to which the user currently logged in.

getCurrentUser() β‡’ Promise.<UserModel>

Gets the currently logged-in user, who is identified by the provided security token.

Kind: global function
Returns: Promise.<UserModel> - Returns information about a user that is currently logged-in to the store

updateUserPreferences(value) β‡’ Promise.<boolean>

Update or create preferences for user that is currentlly logged-in to the store.

Kind: global function
Returns: Promise.<boolean> - Returns information about a user that is currently logged-in to the store.

Param Type Description
value string The string value.

getCultures() β‡’ Promise.<Array.<CultureModel>>

Gets the cultures of the store.

Kind: global function
Returns: Promise.<Array.<CultureModel>> - Returns a list of the store's cultures.

getCurrencies() β‡’ Promise.<CurrencyModelArray>

Gets the currencies of the store.

Kind: global function
Returns: Promise.<CurrencyModelArray> - Returns a list of the store's currencies.

getCartItemsCount() β‡’ Promise.<CartIndicatorModel>

Gets the information about the cart items count.

Kind: global function
Returns: Promise.<CartIndicatorModel> - Returns the information about the cart items count.

renewToken() β‡’ Promise.<SecurityTokenModel>

Renews the user session.

Kind: global function
Returns: Promise.<SecurityTokenModel> - Returns information about a security token.

loginBySSOToken(Token) β‡’ Promise.<SecurityTokenModel>

Logs the user into the store using temporary SSO token.

Kind: global function
Returns: Promise.<SecurityTokenModel> - Returns information about a security token.

Param Type Description
Token string The SSO token

CultureModelArray : Array.<CultureModel>

A list of the store's cultures

Kind: global typedef

CurrencyModelArray : Array.<CurrencyModel>

A list of the store's currencies

Kind: global typedef

GUID : string

globally unique identifier

Kind: global typedef

StoreSeoConfigurationModel : Object

Provides information about the SEO configuration of a store.

Kind: global typedef
Properties

Name Type Description
TitleTag string The tag that is added to the titles of all webpages of the store.
TitleTagType SeoTitleTagType The type of title tag.
Title string The title of a webpage.
Description string The description of a webpage.

StoreModel : Object

Provides information about a store.

Kind: global typedef
Properties

Name Type Description
ID GUID The unique ID of the store.
FriendlyID number The friendly ID of the store.
Name string The name of the store.
Description string The description of the store.
ExternalID string The ID of the store in an external application.
PrimaryCurrencyID GUID The unique ID of the primary currency in the store. The billing will always be performed using the primary currency. Secondary currencies are used for display only.
ShowCurrencyCode boolean Determines whether to show currency abbreviation.
RequireOrderApproval boolean Indicates if orders in the store should be approved prior to submission.
TaxFormatType TaxFormatType Defines whether the tax appears as part of the price in the store products.
TaxFormat string The tax display format built using the following placeholders: {Price}, {Tax} and {PriceIncludingTax}.
SeoConfiguration StoreSeoConfigurationModel The SEO configuration of the store.
StoreType StoreType The store type.

UserRolesModel : Object

Provides information about a user's role in a store.

Kind: global typedef
Properties

Name Type Description
Shopper boolean Indicates if the user has permission to purchase products in the store.
Approver boolean Indicated whether the user has permissions to approve or disapprove purchases in the store.

UserGroupModel : Object

Provides information about a user group.

Kind: global typedef
Properties

Name Type Description
Name string The name of the user group.

CustomUserPropertyModel : Object

Provides information about a custom user property.

Kind: global typedef
Properties

Name Type Description
ID number The ID of the custom user property.
Name string The name of the custom user property.
Value string The value of the custom user property.

UserModel : Object

Provides information about a user.

Kind: global typedef
Properties

Name Type Description
ID GUID The unique ID of the user.
FriendlyID number The friendly ID of the user.
FirstName string The user's first name.
LastName string The user's last name.
Email string The user's email address.
ExternalID string The ID of the user in an external application.
Roles UserRolesModel The user's role(s) in the store.
Groups Array.<UserGroupModel> The list of user groups to which the user belongs.
PhoneNumber string The user's phone number.
MobileNumber string The user's mobile number.
FaxNumber string The user's fax number.
CompanyName string The user's company name.
Department string The user's department.
JobTitle string The user's job title.
Gender GenderType The user's gender.
Birthday Date The user's birthday.
CustomProperties Array.<CustomUserPropertyModel> The user's custom properties.
IsAnonymous boolean Indicates whether the user is anonymous.
Preferences string User's preferences for UI based on the store.

CultureModel : Object

Provides information about a culture.

Kind: global typedef
Properties

Name Type Description
ID GUID The unique ID of the culture.
FriendlyID number The friendly ID of the culture.
Name string The name of the culture as written in the culture's language (e.g. "EspaΓ±ol").
LanguageCode string The language code according to the ISO 3166-1 standard (e.g. "en-US").
CountryCode string The country code according to the ISO 3166-1 standard (e.g. "US").
CurrencyFormat string The currency display format built using the following placeholders: {Amount} and {Symbol}. E.g.: "{Symbol}{Amount}" will be shown as $100 "{Amount}{Symbol}" will be shown as 100$
DecimalSeparator string The character used as the decimal separator in the prices. Usually it is a comma or a period.
DecimalPlaces number The number of decimal places in the price after the decimal separator. E.g.: $2.50 will be shown if the value is 2 and $2.5 will be shown if the value is 1.

CurrencyModel : Object

Provides information about a currency.

Kind: global typedef
Properties

Name Type Description
ID GUID The unique ID of the currency.
FriendlyID number The friendly ID of the currency.
Name string The name of the currency.
Symbol string The symbol of the currency.
Code string The currency code according to the ISO 4217 standard (e.g. "USD").
ConversionRate number The conversion rate from the store's primary currency to this currency. E.g. If the primary currency is USD, this currency is EUR and the conversion rate is 0.886285, then 1 USD = 0.886285 EUR.

CartIndicatorModel : Object

Provides information about the cart items count.

Kind: global typedef
Properties

Name Type Description
ItemsCount number The total number of items in the cart.

SecurityTokenModel : Object

Provides information about a security token (a unique and non-guessable value) that is used for user authentication.

Kind: global typedef
Properties

Name Type Description
Token string The security token.
⚠️ **GitHub.com Fallback** ⚠️