import { UserLoginInput, UpdateEnvResponse } from '@skava/graphql-bindings';
import { UnknownObj, CommonResponse, RecursiveOptional } from 'src/typings';
import { UserResponse, ListResponse, AddToBagResponse, CartProduct } from '@skava/graphql-bindings';
declare const isExpired: (data: UpdateEnvResponse) => boolean;
declare function checkIsSessionExpired(data: UpdateEnvResponse): void;
/**
* @todo needs to be handled better in login, unsafe setting on false logins
*/
declare function fromCookieWithDomainToCookieWithNoDomain(cookieLine?: string): string;
declare function mapCookiesOnResponse(response: UnknownObj & {
cookies?: string[];
}): any;
declare function clearApolloCache(client: any): void;
declare function isSafeLoginResponse(response: CommonResponse): boolean;
declare function fromResponseToLoginToast(response: CommonResponse): string;
declare function keep(obj: Object, list: Array<String>): {};
declare function createRecentlyViewedList(): void;
/**
* @todo reuse @@perf @@haircut
* @todo some responses don't map to this...
*/
declare function toStatus(response: RecursiveOptional<CommonResponse>): string;
/**
* @note - putting these out of the container out of the trycatch deopt
* is faster but will remove access to `this` if you need it
*/
declare const toListResponse: (listResponse: ListResponse) => ListResponse;
declare const toBagResponse: (bagResponse: AddToBagResponse) => AddToBagResponse;
declare const toSyncListResponse: (response: ListResponse) => ListResponse;
declare const toUserProfileResponse: (response: UserResponse) => UserResponse;
declare const isEmptyListItems: (response: any) => boolean;
/**
* @todo this looks like wrong response typing.....
*/
declare const toSaveForLaterResponse: (response: CartProduct) => CartProduct | {
saveForLaterItems: (string | number | boolean | symbol | import("@skava/persistence/dist/deps/stringify").SerializableObj | import("@skava/persistence/dist/deps/stringify").FrozenSerializableObj)[] | import("@skava/persistence/dist/deps/stringify").FrozenSerializableArray;
};
/**
* @todo this looks like wrong response typing.....
*/
declare const toFavoritesResponse: (response: CartProduct) => CartProduct | {
favorites: (string | number | boolean | symbol | import("@skava/persistence/dist/deps/stringify").SerializableObj | import("@skava/persistence/dist/deps/stringify").FrozenSerializableObj)[] | import("@skava/persistence/dist/deps/stringify").FrozenSerializableArray;
};
declare const isLoginSuccess: (response: any) => boolean;
declare const isRegisterSuccess: (response: any) => boolean;
declare const clearCookies: () => void;
export declare type InconsistencyInputArgType = UserLoginInput & {
/**
* @deprecated only use userName
*/
username?: string;
};
declare function coerceInconsistency(data: InconsistencyInputArgType): {
userName?: string;
password?: string;
authToken?: string;
provider?: string;
/**
* @deprecated only use userName
*/
username?: string;
};
declare function checkSessionExpiredOnMyAccount(response: UpdateEnvResponse): void;
export { toStatus, coerceInconsistency, isExpired, checkIsSessionExpired, fromCookieWithDomainToCookieWithNoDomain, mapCookiesOnResponse, clearApolloCache, isSafeLoginResponse, fromResponseToLoginToast, keep, createRecentlyViewedList, toListResponse, toBagResponse, toSyncListResponse, toUserProfileResponse, isEmptyListItems, toSaveForLaterResponse, toFavoritesResponse, isLoginSuccess, isRegisterSuccess, clearCookies, checkSessionExpiredOnMyAccount, };