sws-micro-app-adapter-mobile
Version:
SWS移动端微应用适配器
75 lines (74 loc) • 1.67 kB
TypeScript
/**
* 调起客户端扫码界面进行扫码
*/
export declare const scanCode: () => Promise<unknown>;
export interface LocationRequestConfig {
/**
* 是否获取高精度坐标
*/
enableHighAccuracy?: boolean;
/**
* 超时时间,单位毫秒
*/
timeout?: number;
/**
* 缓存时间,单位毫秒
*/
maximumAge?: number;
}
export interface LocationPosition {
/**
* 纬度
*/
latitude: number;
/**
* 经度
*/
longitude: number;
}
/**
* 获取客户端的地理位置信息
* @param config
*/
export declare const getLocation: (config?: LocationRequestConfig) => Promise<LocationPosition>;
/**
* 获取客户端的语言
*/
export declare const getLocale: () => any;
/**
* 获取应用当前主题的主题色
*/
export declare const getPrimaryColor: () => string;
export declare enum ColorMode {
DARK = "dark",
LIGHT = "light"
}
/**
* 获取设备的颜色模式
*/
export declare const getColorMode: () => ColorMode;
/**
* 监听设备颜色模式的改变
*/
export declare const onColorModeChange: (callback: Function) => void;
/**
* 生物认证方式
*/
export declare enum BiometricAuthenticationMode {
/**
* 人脸识别
*/
FACIAL = "facial",
/**
* 指纹识别
*/
FINGER_PRINT = "fingerPrint"
}
/**
* 获取设备的生物认证方式
*/
export declare const getSupportBiometricAuthentication: () => Array<BiometricAuthenticationMode>;
/**
* 调用设备进行生物认证
*/
export declare const startBiometricAuthentication: (requestAuthModes?: Array<BiometricAuthenticationMode>) => Promise<void>;