Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Settings

Settings for the EVA Redux SDK

export

Hierarchy

  • Settings

Index

Properties

Optional afterFetch

afterFetch: undefined | ((params: { chainContext?: undefined | string; requestPayload: any | undefined; responseError?: any; responsePayload: any | undefined; serviceContext: string; serviceName: string; status: number; url: string }) => void)

Callback done after each fetch call

appName

appName: string = "UNKNOWN"

The app name used for calls from this SDK. Used for the Eva-User-Agent header field value

memberof

Settings

appVersion

appVersion: string = "0.0.0"

The app version used for calls from this SDK. Used for the Eva-User-Agent header field value

memberof

Settings

Optional backendIdMode

backendIdMode: undefined | string

Can be used to set the EVA-IDs-Mode header which can be used to let the EVA backend to use external identifiers instead of EVA identifiers for things like products. Is usually set using the service settings but can be overridden per call using this setting

Optional backendIdSystemID

backendIdSystemID: undefined | string

Used to populate the EVA-IDs-BackendSystemID header which can be sent along with the EVA-IDs-Mode header to enable response metadata to help with mapping identifiers between EVA and an external system

Optional beforeFetch

beforeFetch: undefined | ((params: { chainContext?: undefined | string; requestPayload: any; serviceContext: string; serviceName: string; url: string }) => void)

Callback done before each fetch call

cartChangeLoginOrderLineAge

cartChangeLoginOrderLineAge: number = 300000

Cart changes post-login filter out older order lines. This ensure we do not get changes from an anonymous cart being claimed. Newer lines can include welcome gift for instance. Default allowed age is 300000ms (5 minutes)

changeCallback

changeCallback: (changedSetting: ISettingsChange) => void

The callback variant for the change stream

memberof

Settings

Type declaration

changes$

changes$: Subject<ISettingsChange> = new Subject()

The settings change stream Not all settings are emitted. Only the following:

  • language
  • defaultToken
  • userToken
memberof

Settings

clientName

clientName: string = pkg.name

The client name used for calls from this SDK. Used for the ClientName header field value

memberof

Settings

clientVersion

clientVersion: string = pkg.version

The client version used for calls from this SDK. Used for the ClientVersion header field value

memberof

Settings

Optional communicatorEndPointURL

communicatorEndPointURL: undefined | string

The EVA communicator backend end point URL that will be used for signalr

memberof

Settings

Optional currentStationID

currentStationID: undefined | number

Can be used by clients to set the current station ID header value This should always reflect the ID from the station of the ListStationsForOrganization response

defaultCallUserType

defaultCallUserType: TDefaultCallUserType

Whether this is an employee app or not, we will use to determine whether to add an extra property to some services

see

https://eva2015.atlassian.net/browse/OPTR-6866

memberof

Settings

defaultProductProperties

defaultProductProperties: string[] = ['backend_id','barcodes','clothing_primary_color','clothing_size','configurable_properties','currency_id','custom_id','display_price','display_value','is_sellable','logical_level','primary_image.blob','product_description','product_id','product_media','product_name','product_requirements','product_status','product_types','recommended_retail_price','short_product_description','unstackable',]

The default included product properties for services such as:

  • Core.GetOrder
  • Core.GetShoppingCart
  • Core.SearchProducts
  • Core.GetProducts
  • Core.GetBundleProductDetails
  • Core.ListProductBundles

This is not an exhaustive list. In a service request these can be either called IncludedFields or ProductProperties.

disableSentinelParseCode

disableSentinelParseCode: boolean = false

By default the sentinel will handle parseBarcode calls when it is available. Use this setting to disable that behavior. You can always use sentinel.performance.parseBarcode(..) manually

enableDiscountTierSorting

enableDiscountTierSorting: boolean = false

Enables sorting of discount tiers on from value before calculating tier change

memberof

Settings

enableGetShoppingCartProductAvailabilityIndication

enableGetShoppingCartProductAvailabilityIndication: boolean = false

Optional chain to fetch availability indication for the products in the cart

enableLogging

enableLogging: boolean = false

Enabled debug logging for the SDK

memberof

Settings

endPointURL

endPointURL: string

The EVA backend end point URL that will be used for all requests

memberof

Settings

placeholderStacking

placeholderStacking: boolean = true

Add product to order placeholder are stacked by default Meaning that if the product is already in the cart no placeholder will be added

memberof

Settings

preserveLastKnownSentinel

preserveLastKnownSentinel: boolean = false

This setting can be used to keep using the last known sentinel endpoint when the application configuration has none defined Useful for debugging and fixed store deployments

Optional requestedOrganizationUnitID

requestedOrganizationUnitID: undefined | number

Can be used to set the EVA-Requested-OrganizationUnitID header. This is used to select a specific organization unit when making calls without a specific user token by ID.

Optional requestedOrganizationUnitQuery

requestedOrganizationUnitQuery: undefined | { BackendID: string; Name: string }

Can be used to set the EVA-Requested-OrganizationUnit-Query header. This is used to select a specific organization unit when making calls without a specific user token using an exact match query on name and backend id.

Optional theSentinelEndPointURL

theSentinelEndPointURL: undefined | string

The EVA Sentinel backend end point URL that will be used for on premise features

memberof

Settings

Accessors

applicationToken

  • get applicationToken(): string
  • set applicationToken(token: string): void
  • Getter method for the applicationToken

    memberof

    Settings

    Returns string

  • Sets the user token and emits the changed value

    memberof

    Settings

    Parameters

    • token: string

    Returns void

currentOrderId

  • get currentOrderId(): number
  • set currentOrderId(orderId: number): void
  • Getter method for the applicationToken

    memberof

    Settings

    Returns number

  • Sets the user token and emits the changed value

    memberof

    Settings

    Parameters

    • orderId: number

    Returns void

defaultToken

  • get defaultToken(): string
  • set defaultToken(token: string): void
  • Getter method for the defaultToken

    memberof

    Settings

    Returns string

  • Sets the user token and emits the changed value

    memberof

    Settings

    Parameters

    • token: string

    Returns void

language

  • get language(): string
  • set language(newLanguage: string): void
  • Getter method for the language

    memberof

    Settings

    Returns string

  • Sets the language and emits the changed value

    memberof

    Settings

    Parameters

    • newLanguage: string

    Returns void

sentinelEndPointUrl

  • get sentinelEndPointUrl(): string | undefined
  • set sentinelEndPointUrl(newEndpointUrl: string | undefined): void
  • Getter method for the sentinel endpoint

    memberof

    Settings

    Returns string | undefined

  • Sets the sentinel endpoint and emits the changed value

    memberof

    Settings

    Parameters

    • newEndpointUrl: string | undefined

    Returns void

userToken

  • get userToken(): string
  • set userToken(token: string): void
  • Getter method for the userToken

    memberof

    Settings

    Returns string

  • Sets the user token and emits the changed value

    memberof

    Settings

    Parameters

    • token: string

    Returns void

Methods

getSavedState

  • Retrieves a previously stored state

    memberof

    Settings

    Parameters

    • userId: number

      The users identifier

    Returns ISavedState

purgeAllSavedStates

  • purgeAllSavedStates(): void

purgeSavedState

  • purgeSavedState(userId: number): void
  • Removes any save state for a user

    memberof

    Settings

    Parameters

    • userId: number

    Returns void

saveState

  • saveState(userId: number, state: IRootState): void
  • Saves a users state in memory for reuse

    memberof

    Settings

    Parameters

    • userId: number
    • state: IRootState

      The state to preserve

    Returns void

Object literals

currentOrderOptions

currentOrderOptions: object

The additional request options for the getOrder state. Defaults are set to retrieve the most logical data needed during the checkout. Shipping methods, payment methods, etc.

IncludeAvailablePaymentMethods

IncludeAvailablePaymentMethods: true = true

IncludeAvailableRefundPaymentMethods

IncludeAvailableRefundPaymentMethods: true = true

IncludeAvailableShippingMethods

IncludeAvailableShippingMethods: true = true

IncludeCheckoutOptions

IncludeCheckoutOptions: true = true

IncludeGiftWrapping

IncludeGiftWrapping: true = true

IncludePaymentTransactionActions

IncludePaymentTransactionActions: true = true

IncludePickProductOptions

IncludePickProductOptions: false = false

IncludePrefigureDiscounts

IncludePrefigureDiscounts: false = false

IncludeProductRequirements

IncludeProductRequirements: true = true

IncludeValidateShipment

IncludeValidateShipment: true = true

ProductProperties

ProductProperties: string[] = this.defaultProductProperties

RequiredFor

RequiredFor: 7 = 7

productSearchOptions

productSearchOptions: object

The additional request options for the searchProducts state. Defaults are to enable retrieving of availability and discounts

IncludePrefigureDiscounts

IncludePrefigureDiscounts: true = true

AvailabilityOptions

AvailabilityOptions: object

ProductAvailabilityDetails

ProductAvailabilityDetails: {}

Type declaration

QuantityAvailable

QuantityAvailable: true = true

Bundles

Bundles: object

IncludeBundleInformation

IncludeBundleInformation: false = false

Delivery

Delivery: object

AvailabilityDate

AvailabilityDate: true = true

Pickup

Pickup: object

AvailabilityDate

AvailabilityDate: false = false

shoppingCartOptions

shoppingCartOptions: object

The additional request options for the getShoppingCart state. Defaults are set to retrieve the most logical data needed before entering the checkout. Discounts, product requirements, etc.

IncludeAvailablePaymentMethods

IncludeAvailablePaymentMethods: false = false

IncludeAvailableRefundPaymentMethods

IncludeAvailableRefundPaymentMethods: false = false

IncludeAvailableShippingMethods

IncludeAvailableShippingMethods: false = false

IncludeCheckoutOptions

IncludeCheckoutOptions: true = true

IncludeGiftWrapping

IncludeGiftWrapping: true = true

IncludePaymentTransactionActions

IncludePaymentTransactionActions: false = false

IncludePickProductOptions

IncludePickProductOptions: true = true

IncludePrefigureDiscounts

IncludePrefigureDiscounts: true = true

IncludeProductRequirements

IncludeProductRequirements: true = true

IncludeValidateShipment

IncludeValidateShipment: false = false

ProductProperties

ProductProperties: string[] = this.defaultProductProperties

RequiredFor

RequiredFor: 7 = 7