Objects

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

NativeCommandResult

What legacy dispatch-style browser commands resolve 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 the command was scheduled.
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.

Action results

What namespaced helpers such as bdk.media.pickPhotos and bdk.iap.products resolve to. On success ok is true and extra helper-specific fields may be present; on failure it is false with code and message — branch on !result.ok or isBdkError(result). Outside the app, Action-result helpers resolve ok: false with a code like common/feature_disabled or common/timeout (branch on !result.ok); legacy commands resolve triggered: false (branch on !result.triggered).

PropertyTypeDescription
okbooleantrue on success, false on failure.
actionstringThe helper that ran.
codestringError code when ok is false — e.g. common/feature_disabled.
messagestringHuman-readable error when ok is false.
recoverablebooleanWhether the failure is recoverable. Present when ok is false.
detailsobjectExtra error context, when available.
requestIdstringCorrelation id, when the call supplied or generated one.

BdkDeviceInfo

The device snapshot returned by bdk.ready() and bdk.getDeviceInfo(), and delivered on the deviceInfo event. Most fields are null until the app reports them; biometricsAvailable and smartLoginAvailable are required booleans, and idfa, appTrackingPermissionStatus, and viewType are optional (absent until reported, not null).

PropertyTypeDescription
playerIdstring | nullOneSignal player id for push.
pushTokenstring | nullDevice push token.
deviceModelstring | nullDevice model name.
deviceOSstring | nullOperating system.
deviceOSVersionstring | nullOS version.
bdkReleasestring | number | nullBDK runtime release.
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.
idfastring (optional)iOS advertising id. iOS only.
appTrackingPermissionStatusstring (optional)iOS App Tracking Transparency state. iOS only.
viewTypestring (optional)Host view type, when reported.

BdkCapabilities

Returned by bdk.capabilities.get(), and delivered on the capabilities event. null from get() means the snapshot is unknown — not that every feature is off.

PropertyTypeDescription
apinumberAPI version.
platformstring"ios" or "android".
appobjectHost app versionName and versionCode, when reported.
featuresobjectMap of feature id → entry. Ids include permissions, push.prompt, push.data, att, contacts.picker, contacts.book, badge, deeplink.scheme, media, share.files, share.inbound, auth.oauth, notifications.timesensitive, notifications.critical, health.read, nfc, iap, ui.datepicker.
features[id].enabledbooleanWhether this build has the feature on.
features[id].availablebooleanWhether the device can use it. Present when reported.
features[id].configobjectFeature-specific config, when reported.
features[id].detailsobjectExtra feature details, when reported.
gatingobject{ schema } when the app reports a gating schema.

MediaResult

Delivered by photoCaptured, photoSelected, and audioRecorded. 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.

BdkMediaItem

A JPEG from bdk.media.pickPhotos() or bdk.media.takePhoto(). Exactly one of base64 or fileUrl is set; the other is null.

PropertyTypeDescription
kindstring"image".
mimeTypestring"image/jpeg".
base64string | nullJPEG bytes as base64.
fileUrlstring | nullHosted file URL.
widthnumberPixel width.
heightnumberPixel height.
sizeBytesnumberFile size in bytes.
namestringFile name.

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, or null if the key was never stored.

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.

BdkContact

A contact from bdk.contacts.pick() or bdk.contacts.list().

PropertyTypeDescription
namestringDisplay name.
givenNamestringGiven name.
familyNamestringFamily name.
phonesarray{ type, label, number }.
emailsarray{ type, label, address }.

Permission entry

One value in the permissions map from bdk.permissions.status() and the permissions.changed event.

PropertyTypeDescription
statusstring"granted", "denied", "notDetermined", "limited", "provisional", "restricted", or "unsupported".
canPromptbooleanWhether the OS will still show a prompt.
detailobjectOptional { precision, scope, degraded }.

BdkDeepLinkRecord

Delivered on deeplink.received. URL form (form: "url") already navigated; path form (form: "path") is for in-page routing.

PropertyTypeDescription
formstring"url" or "path".
rawUrlstringThe raw incoming URI.
sourcestring"scheme".
coldStartbooleanWhether the app was launched by this link.
idstringRecord id — events and replay are deduped by this.
tsWhen the link was received.
targetUrlstringURL-form destination.
pathstringPath-form path.
queryobjectPath-form query.

BdkIapProduct

A store product from bdk.iap.products().

PropertyTypeDescription
idstringProduct id.
kindstring"consumable", "nonConsumable", "subscription", or "nonRenewingSubscription".
titlestringStore title.
descriptionstringStore description.
priceobject{ amount, currency, formatted }.
subscriptionobjectPresent on subscriptions: { groupId, period, plans }.
subscription.plansarrayEach plan has planId, offerId, and phases.
subscription.plans[].phasesarray{ type, price, period, cycles }. type is "trial", "intro", or "base".
rawRecord<string, unknown> (optional)Raw store payload.

BdkIapEntitlement

A current entitlement from bdk.iap.entitlements() or bdk.iap.restore().

PropertyTypeDescription
productIdstringProduct id.
kindstringProduct kind.
statestring"active", "gracePeriod", "billingRetry", "revoked", or "expired".
expiresAtstring | nullExpiry, when the store reports one.
willRenewbooleanWhether the subscription will renew.
planIdstring | nullCurrent plan id, when present.
latestTransactionIdstringLatest transaction id, when present.
purchaseTokenstring | nullStore purchase token, when present.
acknowledgedbooleanWhether the purchase is acknowledged.

IAP purchase completed

Delivered on iap.purchaseCompleted. pending is not a final grant — keep listening.

PropertyTypeDescription
platformstring"ios" or "android".
requestIdstring | nullCorrelation id.
okbooleanWhether the purchase succeeded.
statestring"purchased", "pending", "cancelled", or "failed".
codestring | nullError code when the purchase failed.
transactionobjectStore transaction, when present.

BdkInboundShare

Inbound content from the OS share sheet, on share.received and from bdk.share.getPending(). File bytes and local paths are never included.

PropertyTypeDescription
shareIdstringShare id.
receivedAtWhen the share arrived.
sourcestring"ios-extension" or "android-intent".
statusstring"pending", "complete", "partial", or "failed".
itemsarrayText, URL, or file items. File items have kind (image, video, or file), name, mime, sizeBytes, and upload.
items[].upload.statusstring"pending", "uploading", "uploaded", "failed", "rejected", or "skipped".
items[].upload.httpStatusHTTP status, when present.
items[].upload.responseUpload response, when present.
items[].upload.errorUpload error, when present.

BdkShareItem

One item passed to bdk.share.send(). Mix types freely in a single call.

PropertyTypeDescription
typestring"text", "url", "file", "image", "video", or "audio".
textstringThe text to share. Text items only.
urlstringThe link, or the remote file to fetch and share.
filenamestringOptional name for the shared file.

BdkPushDataMessage

One retained background data message from bdk.push.getDataMessages(); live arrivals carry the same fields on push.dataReceived.

PropertyTypeDescription
idstringMessage id.
receivedAtnumberWhen the device received it.
appStatestring"foreground", "background", or "cold".
dataobjectThe message's data payload.
deliveredboolean (optional)Whether delivery to a page was attempted.

Health results

Returned by bdk.health.status() and bdk.health.aggregate(). Type ids are steps, distance, activeCalories, heartRate, restingHeartRate, weight, height, bloodOxygen, sleep, and workouts.

Status from bdk.health.status():

PropertyTypeDescription
availablebooleanWhether health data is available on this device.
platformstring"ios" or "android".
typesobjectMap of type id → { status, requested }.
types[id].statusstring"granted", "notGranted", or "unknown".
types[id].requestedWhether this type has been requested.
reasonstringWhy health is unavailable, when present: device_unsupported, provider_missing, or provider_update_required.

Aggregate from bdk.health.aggregate():

PropertyTypeDescription
typestringThe health data type id the buckets belong to.
unitstringAggregate unit.
statstring"sum" or "avg".
intervalstring"total", "hour", "day", or "month".
bucketsarrayAggregated buckets. Use these instead of summing raw samples.

NFC tag

Returned by bdk.nfc.read() and bdk.nfc.getLaunchTag(), and as tag on nfc.launchTag. id is null on iOS and a lowercase hex string on Android.

PropertyTypeDescription
idstring | nullTag id.
ndefobjectNDEF message: writable, capacityBytes, records.
ndef.recordsarrayNDEF records.

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).
locationA "latitude,longitude" string, or an object with optional latitude, longitude, and data.
barcodeScannedThe scanned code — its type (e.g. qr) and decoded content.
screenshotThe captured image, as a data URI (string).
menuClickedThe menu item the user tapped.
popupClosedWhich button dismissed the popup.
datePickedThe date/time the user selected.
purchaseSuccess / purchaseFailed / receiptReceived{ platform, data } — the store's raw purchase details; verify server-side.
permissions.changed{ changed, previous, permissions }permissions is a map of permission entries. Fires when a tracked permission changes, not on the first snapshot.
att.changed{ status, idfa }status is granted, denied, restricted, or notDetermined.
auth.completed{ mode, provider, handoff }.
auth.cancelled{ mode, provider, reason }mode is auto or explicit; reason is dismissed, provider_denied, or timeout.
push.dataReceived{ id, receivedAt, appState, data }appState is foreground, background, or cold.
share.uploadProgress{ shareId, itemIndex, bytesSent, totalBytes, progress }.
nfc.launchTag{ url, tag }tag is an NFC tag.
iap.transactionUpdated{ reason, transaction }reason is renewal, revoked, or external.