Home > @vsf-enterprise/commercetools-api > Config

# Config interface

Integration configuration after initialization and merging defaults

Signature:

export interface Config<TCacheShape = any> 

# Properties

Property Type Description
acceptLanguage? string[] (Optional) An array of supported locales
api ApiConfig Credentials for requesting access tokens for guest, anonymous, and user sessions
channel string Default channel, used when request doesn't contain channel cookie
client? ApolloClient<TCacheShape> (Optional) Custom GraphQL client to be used instead of the default one. Use customOptions if you only want to override configuration passed to the ApolloClient
cookie_options? CookieOptionsList (Optional) Customizable cookie options.
cookies? CookiesConfig (Optional) Names of the cookies for user currency, country, locale, and store
countries? LocaleItem[] (Optional)
country? string (Optional) Default country, used when request doesn't contain store cookie
currencies? LocaleItem[] (Optional)
currency? string (Optional) Default currency, used when request doesn't contain store cookie
customOptions? ApolloClientOptions<TCacheShape> (Optional) Configuration passed to the ApolloClient during initialization. Use client if you want to use custom GraphQL client
customRetry? (options: { count: number; operation: Operation; error: any; }) => boolean (Optional) Handler for retrying failed requests
customToken? (options: { configuration: Config<TCacheShape>; isGuest: boolean; isServer: boolean; sdkAuth: SdkAuth; tokenProvider: TokenProvider; apolloReq: GraphQLRequest; currentToken: any; }) => any (Optional) Handler for providing custom access token to the request sent to commercetools
faceting Record<string, any>
forceToken? boolean (Optional)
handleIsGuest (context: any) => boolean Handler for checking if visitor is a guest, used in the isGuest API endpoint
handleIsLoggedIn (context: any) => boolean Handler for checking if visitor is logged in, used in the isLoggedIn API endpoint
handleIsTokenUserSession (token: Token) => boolean
inventoryMode? InventoryMode (Optional) Inventory mode used when creating a cart
languageMap? Record<string, any> (Optional) An object used to map a locale to the accepted languages
locale? string (Optional) Default locale, used when request doesn't contain store cookie
locales? LocaleItem[] (Optional)
sdkAuth? SdkAuth (Optional) SdkAuth instance
serverApi ServerApiConfiguration Credentials for requesting access token with elevated permissions that users should not have
store string Default store, used when request doesn't contain store cookie