import { NativeModule } from "expo"; import { ExpoWechatModuleEvents, ShareScene, AuthByQROptions, ShareImageOptions, ShareMusicOptions, ShareVideoOptions, ShareWebpageOptions, ShareMiniProgramOptions, LaunchMiniProgramOptions, LogLevel, PayOptions } from "./ExpoWechat.types"; declare class ExpoWechatModule extends NativeModule { /** * 是否已经成功调用registerApp方法。 */ isRegistered: boolean; isWXAppInstalled(): Promise; getApiVersion(): Promise; getWXAppInstallUrl(): Promise; /** * 打开微信App。返回打开结果。 */ openWXApp(): Promise; /** * 初始化微信SDK。返回初始化结果。 * @param appId 微信App ID * @param universalLink 通用链接地址 */ registerApp(appId: string, universalLink: string): Promise; /** * 启动微信日志。尽量只在调试时使用,上线后不用调用这个方法。 * @param level 日志等级。 */ startLogByLevel(level: LogLevel): Promise; /** * 启动微信自检流程,打印自检日志。iOS Only */ checkUniversalLinkReady(): Promise; /** * 发送微信授权登录请求。返回**发送**结果,注意是发送结果不是授权结果,授权结果要从事件中获取。 * @param scope 微信scope字段。 * @param state 微信state字段。 */ sendAuthRequest(scope: "snsapi_userinfo" | Omit, state: string): Promise; /** * 发送微信扫码登录请求。返回微信登录二维码。 * @param options 微信扫码登录参数。 */ sendAuthByQRRequest(options: AuthByQROptions): Promise; /** * 分享文字到微信。返回分享结果。 * @param text 要分享的文字内容。 * @param scene 分享目标场景。 */ shareText(text: string, scene: ShareScene): Promise; /** * 分享图片到微信。返回分享结果。 */ shareImage(options: ShareImageOptions): Promise; /** * 分享文件到微信。返回分享结果。 * @param base64OrFileUri 文件内容,可以是本地文件URI,或者base64编码的文件数据。 * @param title 文件标题。 * @param scene 要分享的目标场景。 */ shareFile(base64OrFileUri: string, title: string, scene: ShareScene): Promise; /** * 分享音乐到微信。返回分享结果。 */ shareMusic(options: ShareMusicOptions): Promise; /** * 分享视频到微信。返回分享结果。 */ shareVideo(options: ShareVideoOptions): Promise; /** * 分享网页到微信。返回分享结果。 */ shareWebpage(options: ShareWebpageOptions): Promise; /** * 分享小程序到微信。返回分享结果。 */ shareMiniProgram(options: ShareMiniProgramOptions): Promise; /** * 打开微信小程序。返回打开结果。 */ launchMiniProgram(options: LaunchMiniProgramOptions): Promise; /** * 打开微信客服聊天。 */ openWeChatCustomerServiceChat(cropId: string, url: string): Promise; /** * 发送订阅消息。 * @param scene 场景 * @param templateId 模板ID * @param reserved 保留字段 */ sendSubscribeMessage(scene: number, templateId: string, reserved: string): Promise; /** * 微信支付 */ pay(options: PayOptions): Promise; /** * 打开微信WebView。返回打开结果。 * @param url 要打开的URL。 */ openWebView(url: string): Promise; } declare const _default: ExpoWechatModule; export default _default; //# sourceMappingURL=ExpoWechatModule.d.ts.map