UNPKG

@benshi.ai/js-sdk

Version:

Benshi SDK

273 lines (259 loc) 5.39 kB
/** * This module was automatically generated by `ts-interface-builder` */ import * as t from "ts-interface-checker"; // tslint:disable:object-literal-key-quotes export const GlobalTypes = t.enumtype({ "NavigationTypes": 0, "ECommerceTypes": 1, }); export const BsBrowserOptions = t.iface([], { "logScroll": "boolean", "logPage": "boolean", "logUrlChanges": "boolean", "flushOnLeave": "boolean", }); export const BsLogOptions = t.iface([], { "flushInterval": "number", "flushMaxRetries": "number", "baseUrl": "string", "ingestPath": "string", "nudgeFetchPath": "string", "cacheEventsInLocalstorage": "boolean", "cacheEventsKey": "string", "debug": "boolean", }); export const BatteryStatus = t.iface([], { "charging": "boolean", "chargingTime": "number", "dischargingTime": "number", "level": "number", }); export const EventContext = t.iface([], { "browser": t.opt(t.iface([], { "user_agent": "string", "languages": t.array("string"), "online": "boolean", "battery": t.opt("BatteryStatus"), })), }); export const EventTeaser = t.union(t.iface([], { "name": t.opt("string"), "type": "NavigationTypes", "props": t.union("PageProperties", "AppProperties", "IdentifyProperties", "MediaProperties", "SearchProperties", "PushNotificationProperties"), }), t.iface([], { "name": t.opt("string"), "type": "ECommerceTypes", "props": t.union("ItemProperties", "ListProperties", "CheckoutProperties", "RateProperties"), }), t.iface([], { "name": t.opt("string"), "type": "ELearningTypes", "props": t.union("ContentListProperties", "ModuleProperties", "QuestionProperties", "TestProperties"), }), t.iface([], { "name": t.opt("string"), "type": "ReferenceGuideTypes", "props": "InteractProperties", })); export const EventCommon = t.iface([], { "u_id": "string", "d_id": "string", "os": "string", "sdk": "string", "ol": "boolean", "ts": "string", "up": t.opt("number"), "dn": t.opt("number"), }); export const Event = t.intersection("EventTeaser", "EventCommon"); export const QueueItem = t.iface([], { "uuid": "string", "event": "Event", "time": "number", "retries": "number", "lastRetry": t.opt("number"), }); export const NotificationDispatcher = t.iface([], { "show": t.func("any", t.param("title", "string"), t.param("body", "string"), t.param("id", "number")), }); export const NetworkProxy = t.iface([], { "get": t.func("Object", t.param("url", "string")), }); export const CurrencyCode = t.enumtype({ "AED": "AED", "AFN": "AFN", "ALL": "ALL", "AMD": "AMD", "ANG": "ANG", "AOA": "AOA", "ARS": "ARS", "AUD": "AUD", "AWG": "AWG", "AZN": "AZN", "BAM": "BAM", "BBD": "BBD", "BDT": "BDT", "BGN": "BGN", "BHD": "BHD", "BIF": "BIF", "BMD": "BMD", "BND": "BND", "BOB": "BOB", "BRL": "BRL", "BSD": "BSD", "BTN": "BTN", "BWP": "BWP", "BYR": "BYR", "BZD": "BZD", "CAD": "CAD", "CDF": "CDF", "CHF": "CHF", "CLP": "CLP", "CNY": "CNY", "COP": "COP", "CRC": "CRC", "CUC": "CUC", "CUP": "CUP", "CVE": "CVE", "CZK": "CZK", "DJF": "DJF", "DKK": "DKK", "DOP": "DOP", "DZD": "DZD", "EGP": "EGP", "ERN": "ERN", "ETB": "ETB", "EUR": "EUR", "FJD": "FJD", "FKP": "FKP", "GBP": "GBP", "GEL": "GEL", "GGP": "GGP", "GHS": "GHS", "GIP": "GIP", "GMD": "GMD", "GNF": "GNF", "GTQ": "GTQ", "GYD": "GYD", "HKD": "HKD", "HNL": "HNL", "HRK": "HRK", "HTG": "HTG", "HUF": "HUF", "IDR": "IDR", "ILS": "ILS", "IMP": "IMP", "INR": "INR", "IQD": "IQD", "IRR": "IRR", "ISK": "ISK", "JEP": "JEP", "JMD": "JMD", "JOD": "JOD", "JPY": "JPY", "KES": "KES", "KGS": "KGS", "KHR": "KHR", "KMF": "KMF", "KPW": "KPW", "KRW": "KRW", "KWD": "KWD", "KYD": "KYD", "KZT": "KZT", "LAK": "LAK", "LBP": "LBP", "LKR": "LKR", "LRD": "LRD", "LSL": "LSL", "LYD": "LYD", "MAD": "MAD", "MDL": "MDL", "MGA": "MGA", "MKD": "MKD", "MMK": "MMK", "MNT": "MNT", "MOP": "MOP", "MRO": "MRO", "MUR": "MUR", "MVR": "MVR", "MWK": "MWK", "MXN": "MXN", "MYR": "MYR", "MZN": "MZN", "NAD": "NAD", "NGN": "NGN", "NIO": "NIO", "NOK": "NOK", "NPR": "NPR", "NZD": "NZD", "OMR": "OMR", "PAB": "PAB", "PEN": "PEN", "PGK": "PGK", "PHP": "PHP", "PKR": "PKR", "PLN": "PLN", "PYG": "PYG", "QAR": "QAR", "RON": "RON", "RSD": "RSD", "RUB": "RUB", "RWF": "RWF", "SAR": "SAR", "SBD": "SBD", "SCR": "SCR", "SDG": "SDG", "SEK": "SEK", "SGD": "SGD", "SHP": "SHP", "SLL": "SLL", "SOS": "SOS", "SPL": "SPL", "SRD": "SRD", "STD": "STD", "SVC": "SVC", "SYP": "SYP", "SZL": "SZL", "THB": "THB", "TJS": "TJS", "TMT": "TMT", "TND": "TND", "TOP": "TOP", "TRY": "TRY", "TTD": "TTD", "TVD": "TVD", "TWD": "TWD", "TZS": "TZS", "UAH": "UAH", "UGX": "UGX", "USD": "USD", "UYU": "UYU", "UZS": "UZS", "VEF": "VEF", "VND": "VND", "VUV": "VUV", "WST": "WST", "XAF": "XAF", "XCD": "XCD", "XDR": "XDR", "XOF": "XOF", "XPF": "XPF", "YER": "YER", "ZAR": "ZAR", "ZMW": "ZMW", "ZWD": "ZWD", }); const exportedTypeSuite: t.ITypeSuite = { GlobalTypes, BsBrowserOptions, BsLogOptions, BatteryStatus, EventContext, EventTeaser, EventCommon, Event, QueueItem, NotificationDispatcher, NetworkProxy, CurrencyCode, }; export default exportedTypeSuite;