UNPKG

@kameleoon/javascript-sdk-core

Version:
32 lines (31 loc) 1.18 kB
import { VisitType } from '../requester'; import { DeviceDataType, DeviceType, IKameleoonData } from './types'; import { TrackingStatus } from '../types'; /** * @class * Device - a class for creating an instance for device of a certain type * */ export declare class Device implements IKameleoonData { status: TrackingStatus; private device; /** * @param {DeviceType} device - one of the available device types from `DeviceType` enum * */ constructor(device: DeviceType); get url(): string; get data(): DeviceDataType; /** * @private * @method _fromRaw - an internal method for creating a Device instance from raw data * @param {DeviceDataType} data - a raw data * @return {Device} a Device instance * */ static _fromRaw(data: DeviceDataType): Device; /** * @private * @method _fromVisit - an internal method for creating an instance of Device class from a visit * @param {VisitType} visit - a visit * @returns {Device | undefined} an instance of Device class or undefined if browser can not be found among visits * */ static _fromVisit(visit: VisitType): Device | undefined; }