Report
The ScaleBun.report namespace — 5 members.
Report generation and export namespace.
import ScaleBun from '@scalebun/react-native';
ScaleBun.report.<method>(…);Members#
| Member | Signature |
|---|---|
export | export(presetOrOptions?: ExportPresetName | SimplifiedExportOptions): Promise<ExportResult> |
setPrivacy | setPrivacy(config: PrivacyConfig): void |
setBranding | setBranding(config: BrandingConfig): void |
getPrivacy | getPrivacy(): PrivacyConfig |
getBranding | getBranding(): BrandingConfig |
Reference#
export#
ScaleBun.report.export(presetOrOptions?: ExportPresetName | SimplifiedExportOptions): Promise<ExportResult>Trigger a report export on the desktop application.
setPrivacy#
ScaleBun.report.setPrivacy(config: PrivacyConfig): voidSet SDK-wide privacy settings for report generation.
setBranding#
ScaleBun.report.setBranding(config: BrandingConfig): voidSet branding for exported reports.
getPrivacy#
ScaleBun.report.getPrivacy(): PrivacyConfigGet current privacy config.
getBranding#
ScaleBun.report.getBranding(): BrandingConfigGet 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#
init(), then setPrivacy(), then setBranding(), then export()
Privacy first, because it is the one whose absence has consequences.
Read back what you set
getPrivacy()andgetBranding()return the active configuration. Use them to assert your setup in a test rather than assuming the setters took effect.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.
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.