UNPKG

ggez-banking-sdk

Version:

A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.

41 lines (40 loc) 1.48 kB
import { DeviceType } from "../constant"; import { ClientHelper } from "./clientHelper"; import { DateTimeHelper } from "./dateTimeHelper"; class DeviceHelper { static getDeviceDetails = (asJson = false) => { const clientHelper = new ClientHelper(); const device = { type: DeviceType.Browser, brand: `${clientHelper.getBrowser()}-${clientHelper.getBrowserVersion()}`, os: clientHelper.getOS(), extended_info: { sim_info: null, culture_info: null, user_agent: clientHelper.getUserAgent(), fingerprint: "", cpu: clientHelper.getCPU(), system_language: clientHelper.getSystemLanguage(), }, }; const fullDevice = { ...device, application_version: "", serial_number: "", source_ip_address: "", geo_coordinates: "", installation_id: "", client_time_zone: DateTimeHelper.getClientTimeZone(), server_date: "", date_utc: DateTimeHelper.getDateUTC(), client_date: DateTimeHelper.getClientDate(), update_date_utc: DateTimeHelper.getDateUTC(), original_source_id: "", }; if (asJson) return JSON.stringify(fullDevice); return fullDevice; }; static getDeviceExtendedInfo = () => { }; } export { DeviceHelper };