Storefront
StorefrontApi
Methods
addCartLines()
Parameters
Parameter | Type |
---|---|
lines | OptimisticCartLine [] |
Returns
Promise
<Cart
>
authorize()
Returns
Promise
<void
>
createAddress()
Parameters
Parameter | Type |
---|---|
args | object |
args.address | MailingAddress |
args.defaultAddress | boolean |
Returns
Promise
<Customer
>
createCart()
Parameters
Parameter | Type |
---|---|
args | object |
args.discountCodes | string [] |
args.lines | object [] |
Returns
Promise
<undefined
| Cart
>
deleteAddress()
Parameters
Parameter | Type |
---|---|
args | object |
args.addressId | string |
Returns
Promise
<Customer
>
getCart()
Returns
Promise
<Cart
>
getCategories()
Parameters
Parameter | Type |
---|---|
params | object |
params.endCursor ? | string |
params.first ? | number |
params.last ? | number |
params.startCursor ? | string |
Returns
Promise
<CategoriesQuery
>
getCategory()
Parameters
Parameter | Type |
---|---|
params | object |
params.endCursor ? | string |
params.first ? | number |
params.handle | string |
params.last ? | number |
params.startCursor ? | string |
Returns
Promise
<undefined
| CategoryQuery
>
getCategoryTree()
Returns
Promise
<CategoryTree
>
getCustomerDetails()
Returns
Promise
<null
| Customer
>
getCustomerOrder()
Parameters
Parameter | Type |
---|---|
args | object |
args.orderId | string |
Returns
Promise
<undefined
| Order
>
getCustomerOrders()
Parameters
Parameter | Type |
---|---|
args | object |
args.endCursor ? | string |
args.first ? | number |
args.last ? | number |
args.startCursor ? | string |
Returns
Promise
<CustomerOrdersQuery
>
getProduct()
Parameters
Parameter | Type |
---|---|
params | object |
params.handle | string |
params.selectedOptions | SelectedOption [] |
Returns
Promise
<undefined
| Product
>
getRecommendedProducts()
Parameters
Parameter | Type |
---|---|
params | object |
params.product ? | string |
Returns
Promise
<RecommendedProductsQuery
>
getShop()
Returns
Promise
<Shop
>
getSitemap()
Returns
Promise
<SitemapQuery
>
getUser()
Returns
null
| User
loginUsernamePassword()
Parameters
Parameter | Type |
---|---|
__namedParameters | object |
__namedParameters.password | string |
__namedParameters.username | string |
Returns
Promise
<string
>
predictiveSearch()
Parameters
Parameter | Type |
---|---|
params | object |
params.limit | number |
params.limitScope | string |
params.searchTerm | string |
params.types | ( | "ARTICLE" | "COLLECTION" | "PAGE" | "PRODUCT" | "QUERY" )[] |
Returns
Promise
<PredictiveSearchQuery
>
removeCartLines()
Parameters
Parameter | Type |
---|---|
lineIds | string [] |
Returns
Promise
<Cart
>
search()
Parameters
Parameter | Type |
---|---|
params | object |
params.endCursor ? | string |
params.first ? | number |
params.last ? | number |
params.query ? | string |
params.startCursor ? | string |
Returns
Promise
<SearchQuery
>
updateAddress()
Parameters
Parameter | Type |
---|---|
args | object |
args.address | MailingAddress |
args.addressId | string |
args.defaultAddress | boolean |
Returns
Promise
<Customer
>
updateBuyerIdentity()
Parameters
Parameter | Type |
---|---|
params | CartBuyerIdentity |
Returns
Promise
<Cart
>
updateCartLines()
Parameters
Parameter | Type |
---|---|
lines | CartLine [] |
Returns
Promise
<Cart
>
updateCustomer()
Parameters
Parameter | Type |
---|---|
customer | CustomerUpdateInput |
Returns
Promise
<Customer
>
updateDiscountCodes()
Parameters
Parameter | Type |
---|---|
discountCodes | string [] |
Returns
Promise
<Cart
>
PredictiveSearchQuery
Type declaration
Name | Type |
---|---|
predictiveSearch | object |
predictiveSearch.articles | Pick <Article , "id" | "title" | "handle" | "trackingParameters" > & object [] |
predictiveSearch.collections | Pick <Category , "id" | "title" | "handle" | "trackingParameters" > & object [] |
predictiveSearch.pages | Pick <Page , "id" | "title" | "handle" | "trackingParameters" >[] |
predictiveSearch.products | Product [] |
predictiveSearch.queries | Pick <SearchQuerySuggestion , "text" | "styledText" | "trackingParameters" >[] |
SearchQuery
Type declaration
Name | Type |
---|---|
articles | object |
articles.nodes | Pick <Article , "handle" | "id" | "title" | "trackingParameters" >[] |
pages | object |
pages.nodes | Pick <Page , "handle" | "id" | "title" | "trackingParameters" >[] |
products | object |
products.nodes | Product [] |
products.pageInfo | Pick <PageInfo , | "total" | "hasNextPage" | "hasPreviousPage" | "startCursor" | "endCursor" > |
SearchQuerySuggestion
A search query suggestion.
Type declaration
Name | Type |
---|---|
styledText | string |
text | string |
trackingParameters | string |
SitemapQuery
Type declaration
Name | Type |
---|---|
collections | object |
collections.nodes | Pick <Category , "updatedAt" | "handle" | "onlineStoreUrl" >[] |
pages | object |
pages.nodes | Pick <Page , "updatedAt" | "handle" | "onlineStoreUrl" >[] |
products | object |
products.nodes | Pick <Product , "updatedAt" | "handle" | "onlineStoreUrl" | "title" > & object [] |