Home > @vsf-enterprise/sapcc-api

sapcc-api package

Classes

Class Description
ConcurrentCallbacksReducer This helper can accept multiple concurrent callbacks. Only the first one will be executed. The remaining ones will wait for the first one to finish and return its result. It allows us not to do the same thing more than once (e.g. in case of multiple concurrent requests such as refreshing access tokens).

Enumerations

Enumeration Description
API_FIELDS
ProductReferenceTypeEnum Available types of product references.

Functions

Function Description
createRequestFields(options)
createRequestOptions({ context, props })
createRequestOptionsWithFormUrlEncoded({ context, props })
createRequestOptionsWithJsonHeader({ context, props })

Interfaces

Interface Description
AddGuestEmailToCartProps
AddToCartProps Definition of the parameter structure for addToCart.
AddVoucherAndGetNewCartVersionProps Definition of composed params for applying coupon to the cart and getting a new version of it.
AddVoucherToCartProps Definition of the parameter structure for addVoucherToCart.
BaseProps
ChangePasswordProps Properties passed to changePassword API function.
ComposedCartEntryFields Definition of composed fields for cart get, add and update methods.
Context Global context of the application which includes runtime integration context.
CreateAddressProps Properties for creating a user address.
CreateCartAddressProps Definition of the parameter structure for creating cart delivery address.
CreateCartPaymentDetailsProps Definition of the parameter structure for createCartPaymentDetails.
CreateCartProps Definition of the parameter structure used to create a cart.
CreateProductReviewProps Properties for adding product review.
DeleteCartProps
DeleteFromCartProps Definition of the parameter structure to delete entry from the cart.
Endpoints Definition of all API-client methods available in context (opens new window).
GetAddressProps Properties for getting one address from users addresses.
GetAllCartsProps Definition of the parameter structure to load user carts.
GetBaseStoreProps Definition of the parameter structure for getBaseStore.
GetCartDeliveryModesProps
GetCartProps Definition of the parameter structure to load the cart.
GetCategoryProps Properties for retrieving categories.
GetConstentTemplateListProps Properties passed to Consent Api GetConsentTemplates function.
GetConstentTemplateProps Properties passed to Consent Api GetConsent function.
GetCountriesProps Properties for getting countries supported by the store.
GetCountryRegionsProps Properties for getting country regions supported by the store.
GetPaymentDetailsListProps Properties for getting payment details list of user.
GetProductReferencesProps Properties passed to getProductReferences API function.
GetProductReviewsProps Properties for getting product reviews.
GetProductSearchPageDataProps Definition of parameters you can use to fetch data from the getProductSearchPageData api-client method.
GetSopPaymentRequestProps An object containing necessary props for creating a request for a payment.
GetSopPaymentResponseProps An object containing necessary props for getting a response from SAP about the payment data.
GetUserOrderHistoryProps An object containing necessary props for getting current users order history.
GetUserOrdersProps An object containing necessary props for getting order detail.
GiveConstentProps Properties passed to Consent Api DoGiveConsent function.
MiddlewareApiConfig Settings for requests sent to OCC API.
MiddlewareConfig Settings to be provided in the middleware.config.js file.
MiddlewareOAuthConfig Settings for requests sent to authorization server.
MiddlewareStoreConfig Single SAP Store configuration.
MockPSPProps Structure of properties for mock payment service provider.
OAuthToken Response from authorization server when user or application is authorized.
OAuthUserAuthenticationProps Required props for user authorization.
OAuthUserTokenResponse
PaymentEntry An object containing payment details.
PlaceOrderProps An object containing necessary props for creating a new order.
ProductGetProps Properties passed to searchProduct API function.
ProductSearchPageData Definition of structure for response from getProductSearchPageData api-client method.
ProductSearchProps Properties passed to searchProduct API function.
RemoveCartAddressProps Definition of the parameter structure for removing cart delivery address.
RemoveConsentProps Properties passed to Consent Api RemoveConsent function.
RemovePaymentDetailsProps Properties for removing payment details of user.
ReplaceCartAddressProps Definition of the parameter structure for replacing cart delivery address.
ReplaceCartDeliveryModeProps
ReplaceCartPaymentDetailsProps Definition of the parameter structure for replaceCartPaymentDetails.
RequiredOrderEntryProductProps A subset of OrderEntry product properties which have to be passed with certain cart requests (e.g addToCart).
RequiredOrderEntryProps A subset of OrderEntry properties which have to be passed with certain cart requests (e.g addToCart).
RestoreCartProps Definition of the parameter structure to restore a cart.
SaveCartProps
SearchSuggestionsProps Properties passed to getSuggestiion API function.
UpdateAddressProps
UpdateCartProps Definition of the parameter structure for updateCart.
UpdatePaymentDetailsProps Properties for updating payment details of user.
UpdateUserProps Properties passed to updateUser API function.
UserSignUpProps

Variables

Variable Description
ALLOWED_GUEST_ORDER_FIELDS A variable holding a list of order fields that can be fetched for anonymous users.
ANONYMOUS_USER
AUTH_APPLICATION_TOKEN_COOKIE_NAME_SET
AUTH_USER_COOKIE_NAME
AUTH_USER_TOKEN_COOKIE_NAME_SET
AUTH_USER_TOKEN_COOKIE_NAME
AUTHENTICATED_USER
AXIOS_RETRIES_LEFT_HEADER_NAME
CART_WISHLIST
getUserIdFromRequest
USER_COOKIE_NAME

Type Aliases

Type Alias Description
ApiClientSettings Merged settings from middleware.config.js and index.server.ts client config.
Category
CategoryFilter
ContextualizedEndpoints All available API Endpoints without first argument - context, because this prop is set automatically.
LineItem
MiddlewareCookieOptions Object allowing to overwrite options of auth cookies (e.g. vsf-sap-token customer token cookie).
SapccIntegrationContext Runtime integration context, which includes API client instance, settings, and endpoints that will be passed via middleware server.
ShippingMethod