Type aliases
Static AsyncCreated
AsyncCreated: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:58
Static AttributeDefinition
Attribute
Definition: { defaultValue?: PropertyValueDefinition ; description: L10nString ; id?: string ; key?: boolean ; localizable?: boolean ; mandatory?: boolean ; max?: number ; min?: number ; minLength?: number ; multiValueType?: boolean ; name: L10nString ; possibleValues?: Array < PropertyValueDefinition > ; regularExpression?: string ; scale?: number ; searchable?: boolean ; siteSpecific?: boolean ; system?: boolean ; type: string ; unit?: L10nString ; visible?: boolean }
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:268
Type declaration
Optional id?: string
Optional key?: boolean
Optional localizable?: boolean
Optional mandatory?: boolean
Optional max?: number
Optional min?: number
Optional minLength?: number
Optional multiValueType?: boolean
Optional regularExpression?: string
Optional scale?: number
Optional searchable?: boolean
Optional siteSpecific?: boolean
Optional system?: boolean
type: string
Optional visible?: boolean
Static BoolFilter
Bool
Filter: { filters?: Array < Filter > ; operator: string } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:159
Static BoolQuery
Bool
Query: { must?: Array < Query > ; mustNot?: Array < Query > ; should?: Array < Query > } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:221
Static ChangeControlled
ChangeControlled: { createdBy?: string ; creationDate?: any ; lastModifiedBy?: string ; modificationDate?: any } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:35
Static ChangeControlledDataType
ChangeControlledDataType: { createdBy?: string ; creationDate?: any ; lastModifiedBy?: string ; modificationDate?: any } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:74
Static ClosedObject
ClosedObject: {} & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:142
Static DateConditionalRequest
DateConditionalRequest: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:52
Static DateRangeFilter
DateRangeFilter: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:42
Static DatetimeRangeFilter
DatetimeRangeFilter: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:72
Static Error
Error: { detail?: string ; instance?: string ; title?: string ; type: string } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:81
Static ErrorResponse
ErrorResponse: { detail?: string ; instance?: string ; title?: string ; type: string } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:28
Static EtagConditionalRequest
EtagConditionalRequest: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:56
Static EtagResponse
EtagResponse: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:44
Static Filter
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:240
Static FilteredQuery
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:176
Static IntegerRangeFilter
IntegerRangeFilter: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:46
Static L10nString
L10nString: {} & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:265
Static LocalizedString
LocalizedString: {} & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:130
Static MatchAllQuery
MatchAllQuery: {} & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:173
Static Money
Money: { currencyMnemonic?: string ; value?: number } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:88
Static MoneyMnemonic
MoneyMnemonic: { currencyMnemonic?: string ; value?: number } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:260
Static NestedQuery
Nested
Query: { path: string ; query: Query ; scoreMode?: string } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:234
Static NoPropertiesAllowed
NoPropertiesAllowed: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:154
Static NumericRangeFilter
NumericRangeFilter: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:70
Static OffsetPaginated
OffsetPaginated: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:64
Static OpenObject
OpenObject: {} & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:145
Static PaginatedSearchResult
Paginated
SearchResult: { hits?: Array < object > ; limit: number ; offset: any ; query: Query ; sorts?: Array < Sort > ; total: any } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:133
Static PaginatedSearchResultBase
Paginated
SearchResultBase: { hits?: Array < object > ; limit: number ; offset: any ; query: Query ; sorts?: Array < Sort > ; total: any } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:164
Static PropertyDefinition
Property
Definition: { defaultValue?: PropertyValueDefinition ; description: L10nString ; id?: string ; key?: boolean ; localizable?: boolean ; mandatory?: boolean ; max?: number ; min?: number ; minLength?: number ; multiValueType?: boolean ; name: L10nString ; possibleValues?: Array < PropertyValueDefinition > ; regularExpression?: string ; scale?: number ; searchable?: boolean ; siteSpecific?: boolean ; system?: boolean ; type: string ; unit?: L10nString ; visible?: boolean } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:107
Static PropertyValueDefinition
Property
ValueDefinition: { description: L10nString ; displayValue: L10nString ; id: string ; position?: number ; value: string }
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:290
Type declaration
id: string
Optional position?: number
value: string
Static Query
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:185
Static QueryFilter
Query
Filter: { query: Query } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:181
Static QueryParamsLimit
QueryParamsLimit: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:148
Static QueryParamsOffset
QueryParamsOffset: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:150
Static Range2Filter
Range2Filter: { filterMode?: string ; fromField: string ; fromInclusive?: boolean ; fromValue?: any ; toField: string ; toInclusive?: boolean ; toValue?: any } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:211
Static RangeFilter
RangeFilter: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:66
Static RateLimited
RateLimited: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:60
Static RateLimited2
RateLimited2: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:62
Static RateLimited3
RateLimited3: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:48
Static RateLimited4
RateLimited4: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:68
Static RateLimited5
RateLimited5: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:54
Static SearchRequest
Search
Request: { limit?: number ; offset?: any ; query: Query ; sorts?: Array < Sort > } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:100
Static SearchRequestBase
Search
RequestBase: { limit?: number ; offset?: any ; query: Query ; sorts?: Array < Sort > } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:253
Static ShopperContext
ShopperContext: { assignmentQualifiers?: {} & {} ; customQualifiers?: {} & {} ; customerGroupIds?: Array < string > ; effectiveDateTime?: any ; sourceCode?: any } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:16
Static SimpleSearchResult
SimpleSearchResult: { hits?: Array < object > ; limit: number ; offset: any ; total: any } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:93
Static SimpleSearchResultBase
SimpleSearchResultBase: { hits?: Array < object > ; limit: number ; offset: any ; total: any } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:227
Static SiteSpecific
SiteSpecific: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:152
Static Sort
Sort: { field: string ; sortOrder?: string } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:248
Static SpecifiedPropertiesAllowed
SpecifiedPropertiesAllowed: {} & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:156
Static SyncCreated
SyncCreated: {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:50
Static TermFilter
TermFilter: { field: string ; operator: string ; values?: Array < any > } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:200
Static TermQuery
TermQuery: { fields: Array < string > ; operator: string ; values?: Array < any > } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:194
Static TextQuery
TextQuery: { fields: Array < string > ; searchPhrase: string } & {}
Defined in renderedTemplates/customer/shopperContext/shopperContext.ts:206
Shopper Context
The Shopper Context API enables developers to build highly contextualized shopping experiences for shoppers.
Example with shopper auth
API Version: 0.0.23import { Customer, ClientConfig, Customer, slasHelpers } from "commerce-sdk"; // or const { Customer, ClientConfig, Customer, slasHelpers } = require("commerce-sdk"); const clientConfig: ClientConfig = { parameters: { clientId: "XXXXXX", organizationId: "XXXX", shortCode: "XXX", siteId: "XX" } }; // must be registered in SLAS. On server, redirectURI is never called const redirectURI = "http://localhost:3000/callback"; const slasClient = new Customer.ShopperLogin(clientConfig); token = await slasHelpers.loginGuestUser(slasClient, { redirectURI }); clientConfig.headers['authorization'] = `Bearer ${token.access_token}`; const shopperContextClient = new Customer.ShopperContext(clientConfig);
Last Updated: