Alokai

ClientConfig

Base configuration shared by the API client, covering the endpoint URI, cookie naming, external checkout and per-request state.

interface ClientConfig {
	api: string;
	cookies: {
    cartCookieName: string;
    countryCookieName: string;
    currencyCookieName: string;
    customerCookieName: string;
    localeCookieName: string;
    storeCookieName: string;
  };
	externalCheckout: {
    cmsUrl: string;
    enable: boolean;
    stores: Record<string, {
      cmsUrl: string;
    }>;
    syncUrlPath: string;
  };
	state: ConfigState;
}

Properties

NameRequiredTypeDescription
apiRequiredstringURI the Apollo HTTP link connects to (the Magento GraphQL endpoint). ""
cookiesRequired{ cartCookieName: string; countryCookieName: string; currencyCookieName: string; customerCookieName: string; localeCookieName: string; storeCookieName: string; }Names of the cookies used to persist per-request state.
externalCheckoutRequired{ cmsUrl: string; enable: boolean; stores: Record<string, { cmsUrl: string; }>; syncUrlPath: string; }Configuration for redirecting the cart to an external checkout.
stateRequiredConfigStatePer-request state accessors and mutators.

Referenced Types

On this page