UNPKG

dop-sdk

Version:

Mini App SDK for JavaScript by VTB

23 lines (22 loc) 804 B
import { CookieInfo } from '../types/cookie-info'; import { MiniAppError } from '../types/error-types'; /** * Interfaces to retrieve Cookies from Host app */ export interface CookieProvider { /** * Fetches all cookies from host app. * @returns List of Cookies with name and value details */ getAllCookies(): Promise<[CookieInfo] | MiniAppError>; /** * Fetches the cookies for the provided name list * @returns List of Cookies with name and value details */ getCookies(cookieNameList: string[]): Promise<[CookieInfo] | MiniAppError>; } /** @internal */ export declare class CookieManager implements CookieProvider { getAllCookies(): Promise<[CookieInfo] | MiniAppError>; getCookies(cookieNameList: string[]): Promise<[CookieInfo] | MiniAppError>; }