@omniconvert/server-side-testing-sdk
Version: 
TypeScript SDK for server-side A/B testing and experimentation
71 lines • 2.27 kB
TypeScript
import { DeviceType, UtmParams } from '../types';
/**
 * Session parameters for user context
 * Contains information about the user's session that persists across page loads
 */
export declare class SessionParams {
    static readonly UNDEFINED = "undefined";
    static readonly DEVICE_TYPE_DESKTOP: DeviceType;
    static readonly DEVICE_TYPE_MOBILE: DeviceType;
    static readonly DEVICE_TYPE_TABLET: DeviceType;
    private referrerUrl;
    private referrerDomain;
    private referrerType;
    private landingUrl;
    private utmSource;
    private utmTerm;
    private utmCampaign;
    private utmContent;
    private utmMedium;
    private consent;
    private deviceType;
    private ga4TrackingId;
    private ga4SessionId;
    getReferrerUrl(): string;
    getReferrerDomain(): string;
    getReferrerType(): string;
    getLandingUrl(): string;
    getUtmSource(): string;
    getUtmTerm(): string;
    getUtmCampaign(): string;
    getUtmContent(): string;
    getUtmMedium(): string;
    getConsent(): string;
    getDeviceType(): DeviceType;
    getGa4TrackingId(): string;
    getGa4SessionId(): string;
    setReferrerUrl(referrerUrl: string): this;
    setReferrerDomain(referrerDomain: string): this;
    setReferrerType(referrerType: string): this;
    setLandingUrl(landingUrl: string): this;
    setUtmSource(utmSource: string): this;
    setUtmTerm(utmTerm: string): this;
    setUtmCampaign(utmCampaign: string): this;
    setUtmContent(utmContent: string): this;
    setUtmMedium(utmMedium: string): this;
    setConsent(consent: string): this;
    setDeviceType(deviceType: DeviceType): this;
    setGa4TrackingId(ga4TrackingId: string): this;
    setGa4SessionId(ga4SessionId: string): this;
    /**
     * Set UTM parameters from object
     */
    setUtmParams(utmParams: UtmParams): this;
    /**
     * Get UTM parameters as object
     */
    getUtmParams(): UtmParams;
    /**
     * Convert to plain object for serialization
     */
    toObject(): Record<string, string>;
    /**
     * Create from plain object (for deserialization)
     */
    static fromObject(obj: Record<string, string>): SessionParams;
    /**
     * Convert to JSON
     */
    toJSON(): Record<string, string>;
}
//# sourceMappingURL=SessionParams.d.ts.map