export interface SystemInfo {
    os: 'Web' | 'Android' | 'iOS'; // 客户端操作系统
    version: string; // 客户端版本号
    versionCode: string; // 客户端版本代码
    statusBarHeight: number; // 状态栏高度
}

/**
 * 分享消息对象
 * https://www.html5plus.org/doc/zh_cn/share.html#plus.share.ShareMessage
 */
export interface ShareMessage {
    type: string;
    content: string;
    thumbs: string[];
    pictures: string[];
    media: string;
    href: string;
    title: string;
    geo: GeoPosition;
    extra: ShareMessageExtra;
    miniProgram: WeixinMiniProgramOptions;
    interface: string;
}

/**
 * 位置信息（将废弃）
 * https://www.html5plus.org/doc/zh_cn/share.html#plus.share.GeoPosition
 */
export interface GeoPosition {
    latitude: number;
    longitude: number;
}

/**
 * 保存分享消息扩展信息
 * https://www.html5plus.org/doc/zh_cn/share.html#plus.share.ShareMessageExtra
 */
export interface ShareMessageExtra {
    scene: string;
}

/**
 * 打开微信小程序的信息
 * https://www.html5plus.org/doc/zh_cn/share.html#plus.share.WeixinMiniProgramOptions
 */
export interface WeixinMiniProgramOptions {
    id: string;
    path: string;
    type: number;
    webUrl: string;
}

/**
 * http 请求配置项
 */
export interface HttpRequestConfig {
    url: string | URL;
    method?: string;
    responseType?: XMLHttpRequestResponseType;
    header?: { [key: string]: string };
}

export interface Download {
    id: string;
    url: string;
    state: number;
    filename: string;
    downloadedSize: number;
    totalSize: number;
}