ScaleBun
Skip to article

Report

react-nativeDeveloperv0.1.0-alpha.4

The ScaleBun.report namespace — 5 members.

Updated Reviewed

Report generation and export namespace.

TypeScript
import ScaleBun from '@scalebun/react-native';
ScaleBun.report.<method>(…);

Members#

MemberSignature
exportexport(presetOrOptions?: ExportPresetName | SimplifiedExportOptions): Promise<ExportResult>
setPrivacysetPrivacy(config: PrivacyConfig): void
setBrandingsetBranding(config: BrandingConfig): void
getPrivacygetPrivacy(): PrivacyConfig
getBrandinggetBranding(): BrandingConfig

Reference#

export#

TypeScript
ScaleBun.report.export(presetOrOptions?: ExportPresetName | SimplifiedExportOptions): Promise<ExportResult>

Trigger a report export on the desktop application.

setPrivacy#

TypeScript
ScaleBun.report.setPrivacy(config: PrivacyConfig): void

Set SDK-wide privacy settings for report generation.

setBranding#

TypeScript
ScaleBun.report.setBranding(config: BrandingConfig): void

Set branding for exported reports.

getPrivacy#

TypeScript
ScaleBun.report.getPrivacy(): PrivacyConfig

Get current privacy config.

getBranding#

TypeScript
ScaleBun.report.getBranding(): BrandingConfig

Get current branding config.

Notes#

report generates an export of diagnostic data from the device, with privacy and branding configuration applied. export() is the action; the four get/set members configure what it produces.

export() returns a promise, unlike most of the facade — it is doing real work and you should await it and handle rejection rather than firing it and moving on.

Set privacy before you export, every time#

setPrivacy governs what the export is allowed to contain. It is configuration on the instance, not a parameter to export(), which means an export inherits whatever privacy config was last set — including none, if you never set it.

Ordering#

  1. init(), then setPrivacy(), then setBranding(), then export()

    Privacy first, because it is the one whose absence has consequences.

  2. Read back what you set

    getPrivacy() and getBranding() return the active configuration. Use them to assert your setup in a test rather than assuming the setters took effect.

  3. Await the export and handle failure

    It returns a promise. A rejection here is a real error you should surface, not swallow — unlike the fire-and-forget members elsewhere in the facade.

  4. Use a preset unless you need otherwise

    export() accepts a preset name or a full options object. The preset is the reviewed configuration; a hand-built options object is yours to get right.

Limits and edge cases#

  • Presets and options are alternatives, not merged — passing options replaces the preset entirely.

  • Branding is presentation only. It has no bearing on what data is included; that is privacy config.

  • The export reflects the device it ran on and the data available at that moment.

  • export() can reject — network, permissions, or nothing to export. Handle it.

Report · API reference · React Native SDK · ScaleBun