import { Integration } from '@sentry/core'; import { MiniappClient } from './client'; import { MiniappOptions, ReportDialogOptions, SendFeedbackParams } from './types'; export { getDiagnostics } from './diagnostics'; /** * 构造一组**全新**的默认集成实例。 * * 必须每次 init 现造新实例:有全局副作用的集成会在实例上保存补丁与订阅状态。 * core 的 `setupOnce` 只负责进程级初始化;每个 client 的安装与回收由 `setup(client)` / * `client.registerCleanup()` 配对,不再修改 core 内部的全局门禁。 */ export declare function getDefaultIntegrations(options?: MiniappOptions): Integration[]; /** * @deprecated 直接复用本数组的实例,会在多次 init / 多 client 间共享 setupOnce 状态、互相踩补丁。 * 请改用 {@link getDefaultIntegrations}(每次返回全新实例)。导出仅为向后兼容保留。 * 静态快照不包含依赖运行时检测的小游戏默认集成,以免模块导入阶段提前缓存平台状态。 */ export declare const defaultIntegrations: Integration[]; /** * Initialize the Sentry Miniapp SDK * @param options Configuration options for the SDK */ export declare function init(options?: MiniappOptions): MiniappClient | undefined; /** * @deprecated Miniapp environment does not support Sentry's default HTML report dialog. * Please implement your own UI form to collect user feedback (name, email, comments) * and use `Sentry.captureFeedback()` to submit it to Sentry. * * 小程序环境不支持 Sentry 官方的 HTML 反馈弹窗。 * 请自行实现 UI 表单收集用户反馈,并调用 `Sentry.captureFeedback()` 进行上报。 */ export declare function showReportDialog(_options?: ReportDialogOptions): void; /** * Wrap a function to capture exceptions */ export declare function wrap any>(fn: T): T; /** * 设置用户对隐私协议的同意状态(配合 `init({ requireConsent: true })` 使用)。 * * - `setConsent(true)`:补发「同意前」缓冲的事件,并恢复正常上报。 * - `setConsent(false)`:重新闸断网络上报,后续事件继续进入本地缓冲。 * * 未开启 `requireConsent` 时调用本函数无门禁副作用(门禁本就放行)。 */ export declare function setConsent(granted: boolean): void; /** 读取当前同意状态(未开启 requireConsent 时恒为 true)。 */ export declare function getConsent(): boolean; /** * Capture feedback using the new feedback API. * 使用新的反馈 API 捕获反馈 * * @param params Feedback parameters * @returns Event ID */ export declare function captureFeedback(params: SendFeedbackParams): string; //# sourceMappingURL=sdk.d.ts.map