import { IEvaEndpointStorage } from '@springtree/eva-sdk-core-service'; import { EvaStorage } from '@springtree/eva-sdk-core-storage'; /** * The storage keys used in this application * * @export * @interface IEvaStateStorage * @extends {IEvaEndpointStorage} */ export interface IEvaStateStorage extends IEvaEndpointStorage { /** * The current EVA endpoint url in use for all service calls * * @type {string} */ evaEndpointUrl: string; /** * The current user token in use for all service calls. * If omitted the backend will assume a default anonymous identity. * * @type {string} */ evaUserToken: string; /** * The current anonymous user application token * * @type {string} */ evaApplicationToken: string; /** * Currently selected Organization unit by ID * * @type {string} */ evaRequestedOrganizationUnitID: number; /** * Currently selected Organization unit by query * * @type {string} */ evaRequestedOrganizationUnitQuery: { Name: string; BackendID: string; }; /** * Preserved organization unit data from using the useSwitchOrganizationUnit hook */ evaOrganizationUnitData: TOrganizationUnitSwitchData; } export type TOrganizationUnitSwitchData = { [OrganizationUnitID: number]: IOrganizationUnitData; }; export interface IOrganizationUnitData { applicationToken?: string; authenticationToken?: string; shoppingCart?: EVA.Core.GetShoppingCart; orderDetails?: EVA.Core.GetOrder; } /** * Helper method for safely parsing JSON strings from storage * * @template T * @param {string} val * @param {T} [defaultValue] * @returns {(T|undefined)} */ export declare const safeParseInt: (val: string, defaultValue?: number) => number | undefined; /** * Helper method for safely parsing JSON strings from storage * * @template T * @param {string} val * @param {T} [defaultValue] * @returns {(T|undefined)} */ export declare const safeParseJson: >(val: string, defaultValue?: T) => T | undefined; declare const storage: EvaStorage; export default storage; //# sourceMappingURL=storage.d.ts.map