main.ts 1.06 KB
import { routerOption } from './view'

/*
 * @Author: yangming yangming@didihu.com.cn
 * @Date: 2023-12-12 14:35:34
 * @LastEditors: yangming yangming@didihu.com.cn
 * @LastEditTime: 2023-12-13 17:36:03
 * @FilePath: \glsx-tracker-javascript\src\types\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export type trackType = 'beacon' | 'image' | 'ajax' | 'fetch'
export type ClickOption = {
  [prop: string]: any
  open_all_click: false
}
export type ScrollOption = {
  [prop: string]: any
  delay_time: number
}
export type optonsDescriptor = {
  server_url: string
  router_type: routerOption
  track_type: trackType
  max_events_length: number
  max_track_times: number
  send_type: string
  callback_timeout: number
  queue_timeout: number
  datasend_timeout: number
  cache_uuid: boolean
  offline_send: boolean
  is_encryption: boolean
  clickview: ClickOption
  scrollview: ScrollOption
}
export type BaseOptions = Partial<optonsDescriptor>