XuqmGroup-RNSDK/packages/common/src/index.ts

81 行
2.5 KiB
TypeScript

export { XuqmSDK } from './sdk'
export type { XuqmInitOptions, XuqmConfig, XuqmLoginOptions, XuqmUserInfo } from './config'
export { getConfig, isInitialized, getUserId, getUserInfo } from './config'
export { awaitInitialization } from './sdk'
export { apiRequest, configureHttp } from './http'
export { decryptConfigFile, decryptXuqmFile, hmacSha256Base64Url, sha256Hex } from './crypto'
export type { DecryptedConfig, XuqmEncryptedFileMagic } from './crypto'
export { DEFAULT_TENANT_PLATFORM_URL, DEFAULT_IM_WS_URL } from './constants'
export { getDeviceId, getDeviceInfo, detectPushVendor } from './device'
export type { DeviceInfo, PushVendor } from './device'
export { expirationStatus, formatDateTime, millisecondsUntil, toTimestamp } from './date'
export type { DateInput, ExpirationStatus } from './date'
export {
deleteFile,
downloadFileToPath,
ensureDirectory,
fileExists,
getFileDirectories,
inferMimeType,
openLocalFile,
readFileAsBase64,
registerAndroidDownloadedFile,
resolveAvailableFilePath,
writeBase64File,
} from './file'
export type { FileConflictPolicy, FileDownloadTask, FileTransferProgress } from './file'
export {
fileExtension,
fileNameFromUrl,
parseContentDispositionFileName,
sanitizeFileName,
} from './fileName'
export { downloadBytes, downloadText, DownloadError } from './download'
export type { DownloadOptions, DownloadProgress } from './download'
export {
compareVersions,
compatibleMajorRange,
isVersionUpgrade,
normalizeVersion,
satisfiesVersion,
} from './version'
export { ScaledImage } from './components/ScaledImage'
2026-05-07 19:39:41 +08:00
export {
XWebViewControl,
getXWebViewConfig,
openXWebView,
setXWebViewController,
setXWebViewNavigationRef,
setXWebViewScanQRCodeHandler,
processJSBridgeMessage,
2026-05-07 19:39:41 +08:00
} from './xwebview/XWebViewBridge'
export type { XWebViewNavigationRef, ScanQRCodeHandler } from './xwebview/XWebViewBridge'
2026-05-07 19:39:41 +08:00
export type {
XWebViewClickMenu,
XWebViewConfig,
XWebViewControllerAPI,
XWebViewDownloadDecision,
XWebViewDownloadDestination,
2026-05-07 19:39:41 +08:00
XWebViewDownloadProgress,
XWebViewDownloadRequest,
XWebViewDownloadResult,
XWebViewMessageEvent,
XWebViewPermissionRequest,
} from './xwebview/types'
// api/ 子模块
export {
RequestError,
setGlobalApiErrorHandler,
useRequest,
useApi,
usePageApi,
ValidationError,
} from './api'
export type { RequestOptions as UseRequestOptions, ApiMethod } from './api'
export type { PageOptions } from './api'
export type { AxiosRequestConfig } from 'axios'
// ui/ 子模块
export { showToast, showAlert, showConfirm, configureToast } from './ui'