Objects

The shape of every object the SDK returns or delivers on an event.

NativeCommandResult

What every browser command resolves to. It tells you whether the call reached the app — not the outcome of the native action (that arrives on an event). The common case is triggered: true. Outside the app a command comes back with triggered: falsepending in a browser tab, skipped in a non-DOM environment.

PropertyTypeDescription
commandstringThe native command that was dispatched.
queuedbooleanWhether it was added to the queue.
triggeredbooleanWhether it was handed to the app. Branch on !triggered for a web fallback.
skippedbooleanWhether it was dropped without triggering.
pendingbooleanQueued, waiting for the app. A browser tab outside the app resolves here.
reasonstringWhy it was skipped or pending — e.g. waiting_for_agent, not_native.

BdkDeviceInfo

The device snapshot returned by bdk.ready() and bdk.getDeviceInfo(), and delivered on the deviceInfo event. Every field is null until the app reports it.

PropertyTypeDescription
playerIdstring | nullOneSignal player id for push.
pushTokenstring | nullDevice push token.
deviceModelstring | nullDevice model name.
deviceOSstring | nullOperating system.
deviceOSVersionstring | nullOS version.
deviceLanguagestring | nullDevice language.
deviceWidthstring | number | nullScreen width.
deviceHeightstring | number | nullScreen height.
versionNamestring | nullHost app version name.
versionCodestring | number | nullHost app version code.
biometricsAvailablebooleanWhether biometric login is available.
smartLoginAvailablebooleanWhether saved login is available.
cameraPermissionStatusstring | nullCamera permission state.
contactsPermissionStatusstring | nullContacts permission state.
audiorecordPermissionStatusstring | nullAudio-record permission state.
externalstoragePermissionStatusstring | nullStorage permission state.
locationPermissionStatusstring | nullLocation permission state.
idfastringiOS advertising id. iOS only.

MediaResult

Delivered by photoCaptured, photoSelected, audioRecorded, and screenshot. Use dataUri to preview inline and fileUrl to upload.

PropertyTypeDescription
fileUrlstring | nullHosted URL of the file — use to upload.
dataUristring | nullData URI — use to preview inline.
contentTypestring | nullThe file's MIME type.
dataThe raw file data from the device.

BiometricResult

Delivered on the biometricResult event after bdk.auth.authenticateBiometrics().

PropertyTypeDescription
statusstring"success" or "failed".
platformstring"ios" or "android".
dataThe raw native auth result.

SmartLoginCredentials

Delivered on the smartLoginCredentials event. If either field is null, nothing usable is saved — fall back to your login screen.

PropertyTypeDescription
emailstring | nullThe saved email.
passwordstring | nullThe saved password.

DeviceVariableResult

Delivered on the deviceVariable event after reading a cached value.

PropertyTypeDescription
namestringThe variable name.
dataThe stored value.

UrlParam

A query parameter you pass to bdk.navigation.openLink({ urlParams }).

PropertyTypeDescription
keystringThe parameter name.
valuestring | number | booleanThe parameter value.

BdkError

Thrown by a rejected command and passed to the onError config callback and the error event.

PropertyTypeDescription
codestringOne of BDK_NOT_NATIVE, BDK_NATIVE_UNAVAILABLE, BDK_UNSUPPORTED_VERSION, BDK_UNSUPPORTED_PLATFORM, BDK_LISTENER_ERROR, BDK_PROVIDER_ERROR, BDK_VALIDATION_ERROR.
messagestringA human-readable description.
detailsobjectExtra context about the error, when available.

Event payloads

A few events deliver raw native data rather than a fixed object. Here's what each one contains.

EventDelivers
contactsThe device address book — an array of contacts, each with a name, phone number(s), and email(s).
locationThe device location — latitude, longitude, and a resolved address.
barcodeScannedThe scanned code — its type (e.g. qr) and decoded content.
screenshotThe captured image, as a MediaResult.
menuClickedThe menu item the user tapped.
popupClosedWhich button dismissed the popup.
datePickedThe date/time the user selected.
optionPickedThe option the user chose.
purchaseSuccess / purchaseFailed / receiptReceived{ platform, data } — the store's raw purchase details; verify server-side.