@kameleoon/javascript-sdk-core
Version:
Kameleoon JS SDK Core
23 lines (22 loc) • 1.11 kB
TypeScript
import { KameleoonResponseType, RequestType } from './requester';
import { SimulateRequestDataType } from './types';
/**
* KameleoonUtils - a class containing static Kameleoon helper methods
* */
export declare class KameleoonUtils {
/**
* @method simulateSuccessRequest - a method to simulate a successful request based on request type, primarily used for `IExternalRequester` implementations
*
* @param {RequestType} requestType - request type
* @param {SimulateRequestDataType[RequestType]} data - simulate data type for request
* */
static simulateSuccessRequest<T extends RequestType>(requestType: T, data: SimulateRequestDataType[T]): Promise<KameleoonResponseType>;
/**
* @method getCookieValue - a method to get a cookie value by key from a cookie string, primarily used for `IExternalVisitorCodeManager` implementations
*
* @param {string} cookie - cookie string
* @param {string} key - cookie key
* @returns {string | null} cookie value or null if not found
* */
static getCookieValue(cookie: string, key: string): string | null;
}