@segment/analytics-next
Version:
Analytics Next (aka Analytics 2.0) is the latest version of Segment’s JavaScript SDK - enabling you to send your data to any tool without having to learn, test, or use a new API every time.
43 lines (38 loc) • 1.25 kB
text/typescript
// https://wicg.github.io/ua-client-hints/#dictdef-navigatoruabrandversion
export interface NavigatorUABrandVersion {
readonly brand: string
readonly version: string
}
// https://wicg.github.io/ua-client-hints/#dictdef-uadatavalues
export interface UADataValues {
readonly brands?: NavigatorUABrandVersion[]
readonly mobile?: boolean
readonly platform?: string
readonly architecture?: string
readonly bitness?: string
readonly model?: string
readonly platformVersion?: string
/** @deprecated in favour of fullVersionList */
readonly uaFullVersion?: string
readonly fullVersionList?: NavigatorUABrandVersion[]
readonly wow64?: boolean
}
// https://wicg.github.io/ua-client-hints/#dictdef-ualowentropyjson
export interface UALowEntropyJSON {
readonly brands: NavigatorUABrandVersion[]
readonly mobile: boolean
readonly platform: string
}
// https://wicg.github.io/ua-client-hints/#navigatoruadata
export interface NavigatorUAData extends UALowEntropyJSON {
getHighEntropyValues(hints: HighEntropyHint[]): Promise<UADataValues>
toJSON(): UALowEntropyJSON
}
export type HighEntropyHint =
| 'architecture'
| 'bitness'
| 'model'
| 'platformVersion'
| 'uaFullVersion'
| 'fullVersionList'
| 'wow64'