UNPKG

@klevu/core

Version:

Typescript SDK that simplifies development on Klevu backend. Klevu provides advanced AI-powered search and discovery solutions for online retailers.

33 lines (32 loc) 987 B
export declare const USER_IPV4_STORAGE_KEY = "klevu-user-v4-id"; export declare const USER_IPV6_STORAGE_KEY = "klevu-user-v6-id"; export declare const USER_IP_EXPIRY_STORAGE_KEY = "klevu-user-v4-v6-expiry"; export declare const USER_UUID_STORAGE_KEY = "klevu-user-uuid"; export declare class KlevuIpResolver { timer: null | ReturnType<typeof setTimeout>; static default: KlevuIpResolver | undefined; expiry?: string | null; ipv4?: string | null; ipv6?: string | null; uuid?: string | null; constructor(); static init(): void; static getDefault(): KlevuIpResolver; hasIPInfoExpired(): boolean; generateIPData(): Promise<void>; setExpiryTimer(): void; getIPData: () => Promise<{ uuid: string; ipv4: string; ipv6: string; }>; getUserData(): { ipv4?: undefined; ipv6?: undefined; uuid?: undefined; } | { ipv4: string; ipv6: string; uuid: string; }; }