@mentra/bluetooth-sdk 3.1.0-dev.7 → 3.1.0-dev.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -34
- package/android/src/main/java/com/mentra/bluetoothsdk/Bridge.kt +0 -5
- package/android/src/main/java/com/mentra/bluetoothsdk/DeviceManager.kt +13 -8
- package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedChangelogCatalog.kt +7 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedReleaseMetadata.kt +5 -5
- package/android/src/main/java/com/mentra/bluetoothsdk/MentraBluetoothSdk.kt +15 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/ReleaseChangelog.kt +61 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraLive.kt +81 -69
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraLivePairingAdvertisement.kt +54 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/ReleaseChangelogTest.kt +13 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/MentraLivePairingAdvertisementParserTest.kt +133 -0
- package/build/BluetoothSdk.types.d.ts +26 -5
- package/build/BluetoothSdk.types.d.ts.map +1 -1
- package/build/BluetoothSdk.types.js.map +1 -1
- package/build/changelogs.d.ts +7 -0
- package/build/changelogs.d.ts.map +1 -0
- package/build/changelogs.js +44 -0
- package/build/changelogs.js.map +1 -0
- package/build/generated/changelogCatalog.d.ts +6 -0
- package/build/generated/changelogCatalog.d.ts.map +1 -0
- package/build/generated/changelogCatalog.js +8 -0
- package/build/generated/changelogCatalog.js.map +1 -0
- package/build/generated/releaseMetadata.js +5 -5
- package/build/generated/releaseMetadata.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +14 -0
- package/build/index.js.map +1 -1
- package/build/ota-transport/index.d.ts +67 -0
- package/build/ota-transport/index.d.ts.map +1 -0
- package/build/ota-transport/index.js +58 -0
- package/build/ota-transport/index.js.map +1 -0
- package/ios/Source/BluetoothSdkDefaults.swift +1 -1
- package/ios/Source/Bridge.swift +1 -6
- package/ios/Source/DeviceManager.swift +13 -8
- package/ios/Source/GeneratedChangelogCatalog.swift +6 -0
- package/ios/Source/GeneratedReleaseMetadata.swift +5 -5
- package/ios/Source/MentraBluetoothSDK.swift +17 -0
- package/ios/Source/ReleaseChangelog.swift +65 -0
- package/ios/Source/sgcs/MentraLive.swift +93 -80
- package/ios/Source/sgcs/MentraLivePairingAdvertisement.swift +64 -0
- package/ios/Tests/MentraLivePairingAdvertisementTests.swift +160 -0
- package/ios/Tests/ReleaseChangelogTests.swift +13 -0
- package/package.json +6 -1
- package/scripts/public-ota-api.test.mjs +37 -0
- package/src/BluetoothSdk.types.ts +28 -5
- package/src/changelogs.ts +44 -0
- package/src/generated/changelogCatalog.ts +9 -0
- package/src/generated/releaseMetadata.ts +5 -5
- package/src/index.ts +24 -0
- package/src/ota-transport/index.ts +116 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BluetoothSdk.types.js","sourceRoot":"","sources":["../src/BluetoothSdk.types.ts"],"names":[],"mappings":"AAwCA,MAAM,CAAC,MAAM,wCAAwC,GAAG,KAAK,CAAA;AAwB7D,MAAM,UAAU,kCAAkC,CAChD,MAA+B;IAE/B,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW,CAAA;AACrC,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,MAA+B;IAC5E,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW,IAAI,MAAM,CAAC,WAAW,CAAA;AAC3D,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,MAA+B;IAC3E,OAAO,MAAM,CAAC,KAAK,KAAK,UAAU,IAAI,MAAM,CAAC,KAAK,KAAK,YAAY,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,CAAA;AACnG,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,UAAU,EAAE,EAAC,KAAK,EAAE,cAAc,EAAC;QACnC,OAAO,EAAE,EAAC,KAAK,EAAE,UAAU,EAAC;QAC5B,6BAA6B,EAAE,wCAAwC;QACvE,IAAI,EAAE,EAAC,KAAK,EAAE,cAAc,EAAC;KAC9B,CAAA;AACH,CAAC;AA2BD,MAAM,UAAU,qBAAqB,CAAC,MAAkB;IACtD,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW,CAAA;AACrC,CAAC;AAoBD,MAAM,UAAU,sBAAsB,CAAC,MAAqB;IAC1D,OAAO,MAAM,CAAC,KAAK,KAAK,SAAS,CAAA;AACnC,CAAC;AAmXD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,EAAE,EAAE,mBAAmB;IACvB,EAAE,EAAE,mBAAmB;IACvB,UAAU,EAAE,aAAa;IACzB,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,mBAAmB;CACf,CAAA;AAWV,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAA;AAChC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;AACjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAA","sourcesContent":["// Bluetooth SDK Event Types\nexport type GlassesNotReadyEvent = {\n type: \"glasses_not_ready\"\n message: string\n}\n\n// NOTE: unlike most events below, the native module does NOT include a `type`\n// field on the button_press payload 闂?it sends only {buttonId, pressType,\n// timestamp} (see BluetoothSdkModule on both iOS and Android). Consumers must\n// filter on `pressType` / the \"button_press\" listener name, never `event.type`.\nexport type ButtonPressEvent = {\n buttonId: string\n pressType: \"long\" | \"short\"\n timestamp: number\n}\n\nexport type TouchEvent = {\n type: \"touch_event\"\n deviceModel: DeviceModel\n gestureName: string\n timestamp: number\n}\n\nexport type AccelEvent = {\n type: \"accel_event\"\n x: number\n y: number\n z: number\n timestamp: number\n}\n\nexport type HeadUpEvent = {\n up: boolean\n}\n\nexport type VoiceActivityDetectionStatusEvent = {\n type: \"voice_activity_detection_status\"\n voiceActivityDetectionEnabled: boolean\n}\n\nexport const DEFAULT_VOICE_ACTIVITY_DETECTION_ENABLED = false\n\nexport type SpeakingStatusEvent = {\n type: \"speaking_status\"\n speaking: boolean\n timestamp: number\n}\n\nexport type BatteryStatusEvent = {\n type: \"battery_status\"\n level: number\n charging: boolean\n timestamp: number\n}\n\nexport type GlassesConnectionStatus =\n | {state: \"disconnected\"}\n | {state: \"scanning\"}\n | {state: \"connecting\"}\n | {state: \"bonding\"}\n | {state: \"connected\"; fullyBooted: boolean}\n\nexport type ConnectedGlassesConnectionStatus = Extract<GlassesConnectionStatus, {state: \"connected\"}>\n\nexport function isConnectedGlassesConnectionStatus(\n status: GlassesConnectionStatus,\n): status is ConnectedGlassesConnectionStatus {\n return status.state === \"connected\"\n}\n\nexport function isReadyGlassesConnectionStatus(status: GlassesConnectionStatus): boolean {\n return status.state === \"connected\" && status.fullyBooted\n}\n\nexport function isBusyGlassesConnectionStatus(status: GlassesConnectionStatus): boolean {\n return status.state === \"scanning\" || status.state === \"connecting\" || status.state === \"bonding\"\n}\n\nexport function createDisconnectedGlassesStatus(): Partial<GlassesStatus> {\n return {\n connection: {state: \"disconnected\"},\n hotspot: {state: \"disabled\"},\n voiceActivityDetectionEnabled: DEFAULT_VOICE_ACTIVITY_DETECTION_ENABLED,\n wifi: {state: \"disconnected\"},\n }\n}\n\n/** K900 `sr_getvol` response (Mentra Live glasses media step volume 0闂?5). */\nexport type GlassesMediaVolumeGetResult = {\n level: number\n statusCode: number\n}\n\n/** K900 `sr_vol` acknowledgment. */\nexport type GlassesMediaVolumeSetResult = {\n statusCode: number\n}\n\nexport type LocalTranscriptionEvent = {\n text: string\n isFinal?: boolean\n transcribeLanguage?: string\n}\n\nexport type LogEvent = {\n message: string\n}\n\nexport type WifiStatus = {state: \"disconnected\"} | {state: \"connected\"; ssid: string; localIp?: string}\n\nexport type ConnectedWifiStatus = Extract<WifiStatus, {state: \"connected\"}>\n\nexport function isConnectedWifiStatus(status: WifiStatus): status is ConnectedWifiStatus {\n return status.state === \"connected\"\n}\n\nexport type WifiStatusChangeEvent = WifiStatus & {\n type: \"wifi_status_change\"\n /**\n * Glasses-reported provisioning failure reason when THIS event is the verdict of a\n * failed connect attempt; absent on routine link-state updates. An attempt property,\n * not a link property 闂?which is why it lives on the event, not on WifiStatus:\n * \"connect_timeout\" arrives on a disconnected status (never associated), while\n * \"connected_to_other_network\" arrives on a *connected* status (the attempt failed\n * and the glasses ended up on / fell back to a different SSID than requested).\n * Requires ASG client v40+ 闂?older glasses never send it.\n */\n error?: string\n}\n\nexport type HotspotStatus = {state: \"disabled\"} | {state: \"enabled\"; ssid: string; password: string; localIp: string}\n\nexport type EnabledHotspotStatus = Extract<HotspotStatus, {state: \"enabled\"}>\n\nexport function isEnabledHotspotStatus(status: HotspotStatus): status is EnabledHotspotStatus {\n return status.state === \"enabled\"\n}\n\nexport type HotspotStatusChangeEvent = HotspotStatus & {\n type: \"hotspot_status_change\"\n}\n\nexport type HotspotErrorEvent = {\n type: \"hotspot_error\"\n errorMessage: string\n timestamp: number\n}\n\nexport type VersionInfoResult = {\n androidVersion: string\n firmwareVersion: string\n besFirmwareVersion: string\n mtkFirmwareVersion: string\n buildNumber: string\n systemTimeMs?: number\n otaVersionUrl: string\n appVersion: string\n /** Phone-served hotspot OTA protocol version; 0 means unsupported/legacy glasses. */\n hotspotOtaVersion: number\n}\n\nexport type VersionInfoEvent = VersionInfoResult & {\n type: \"version_info\"\n}\n\nexport type WifiScanResultEvent = {\n type: \"wifi_scan_result\"\n networks: WifiSearchResult[]\n scanComplete?: boolean\n}\n\nexport type PhotoResponseEvent =\n | {\n type: \"photo_response\"\n state: \"success\"\n requestId: string\n uploadUrl: string\n photoUrl?: string\n statusUrl?: string\n contentType?: string\n fileSizeBytes?: number\n timestamp: number\n }\n | {\n type: \"photo_response\"\n state: \"error\"\n requestId: string\n timestamp: number\n errorCode?: string\n errorMessage: string\n }\n\nexport type PhotoSuccessResponseEvent = Extract<PhotoResponseEvent, {state: \"success\"}>\n\nexport type PhotoStatusState =\n | \"accepted\"\n | \"queued\"\n | \"configuring\"\n | \"capturing\"\n | \"captured\"\n | \"compressing\"\n | \"ble_fallback_compression\"\n | \"uploading\"\n | \"uploaded\"\n | \"ready_for_transfer\"\n | \"transferring\"\n | \"failed\"\n\nexport type PhotoResolvedConfig = {\n format?: \"jpeg\" | string\n width?: number\n height?: number\n quality?: number\n requestedSize?: PhotoSize | string\n source?: \"sdk\" | \"button\" | string\n transferMethod?: \"webhook\" | \"ble\" | \"local\" | string\n compression?: PhotoCompression | string\n saveToGallery?: boolean\n exposureTimeNs?: number\n iso?: number\n}\n\nexport type PhotoFpsRange = {\n min?: number\n max?: number\n}\n\nexport type PhotoRequestedCaptureConfig = {\n manual?: boolean\n exposureTimeNs?: number\n iso?: number\n frameDurationNs?: number\n aeMode?: number\n aeLock?: boolean\n aeExposureCompensation?: number\n aeTargetFpsRange?: PhotoFpsRange\n noiseReductionMode?: number\n edgeMode?: number\n afMode?: number\n zsl?: boolean\n}\n\nexport type PhotoMeteredPreview = {\n exposureTimeNs?: number\n iso?: number\n totalLightProxy?: number\n}\n\nexport type PhotoCaptureMetadata = {\n manual?: boolean\n exposureTimeNs?: number\n iso?: number\n frameDurationNs?: number\n aeMode?: number\n aeState?: number\n aeStateName?: string\n noiseReductionMode?: number\n edgeMode?: number\n zsl?: boolean\n sensorTimestampNs?: number\n totalLightProxy?: number\n mfnrLikely?: boolean\n mfnrApplied?: boolean\n width?: number\n height?: number\n noiseReductionWarning?: \"not_implemented\" | string\n ispDigitalGainWarning?: \"not_implemented\" | string\n ispAnalogGainWarning?: \"not_implemented\" | string\n [key: string]: unknown\n}\n\nexport type PhotoStatusEvent = {\n type: \"photo_status\"\n requestId: string\n status: PhotoStatusState | string\n timestamp: number\n resolvedConfig?: PhotoResolvedConfig\n requestedCaptureConfig?: PhotoRequestedCaptureConfig\n meteredPreview?: PhotoMeteredPreview\n captureMetadata?: PhotoCaptureMetadata\n errorCode?: string\n errorMessage?: string\n}\n\nexport type CameraStatusEvent = {\n type: \"camera_status\"\n requestId: string\n state: \"warming\" | \"ready\" | \"stopped\" | \"error\" | string\n timestamp: number\n errorCode?: string\n errorMessage?: string\n}\n\nexport type VideoRecordingStatusEvent = {\n type: \"video_recording_status\"\n requestId?: string\n success: boolean\n status: VideoRecordingStatusState\n details?: string | null\n timestamp: number\n data?: {\n recording?: boolean\n duration_ms?: number\n duration_formatted?: string\n [key: string]: unknown\n }\n}\n\nexport type VideoRecordingStatusState =\n | \"recording_started\"\n | \"recording_status\"\n | \"already_recording\"\n | \"recording_stopped\"\n | \"not_recording\"\n | \"request_id_mismatch\"\n | \"service_unavailable\"\n | \"json_error\"\n | \"battery_low\"\n | \"camera_busy\"\n | \"storage_unavailable\"\n | \"integrity_failed\"\n | \"error\"\n\nexport type VideoRecordingStartedStatusEvent = Omit<VideoRecordingStatusEvent, \"success\" | \"status\"> & {\n success: true\n status: \"recording_started\"\n}\n\nexport type VideoRecordingStoppedStatusEvent = Omit<VideoRecordingStatusEvent, \"success\" | \"status\"> & {\n success: true\n status: \"recording_stopped\"\n}\n\nexport type VideoRecordingSuccessStatusEvent = VideoRecordingStartedStatusEvent | VideoRecordingStoppedStatusEvent\n\nexport type MediaUploadSuccessEvent = {\n type: \"media_success\"\n requestId: string\n mediaUrl: string\n mediaType: number\n timestamp: number\n}\n\nexport type MediaUploadErrorEvent = {\n type: \"media_error\"\n requestId: string\n errorMessage: string\n mediaType: number\n timestamp: number\n}\n\nexport type MediaUploadEvent = MediaUploadSuccessEvent | MediaUploadErrorEvent\n\nexport type GalleryStatusEvent = {\n type: \"gallery_status\"\n photos: number\n videos: number\n total: number\n totalSize?: number\n hasContent: boolean\n cameraBusy: boolean\n cameraBusyReason?: \"video\" | \"stream\" | (string & {})\n}\n\nexport type CompatibleGlassesSearchStopEvent = {\n type: \"compatible_glasses_search_stop\"\n deviceModel: DeviceModel\n}\n\nexport type HeartbeatSentEvent = {\n type: \"heartbeat_sent\"\n heartbeat_sent: {\n timestamp: number\n }\n}\n\nexport type HeartbeatReceivedEvent = {\n type: \"heartbeat_received\"\n heartbeat_received: {\n timestamp: number\n }\n}\n\nexport type SwipeVolumeStatusEvent = {\n type: \"swipe_volume_status\"\n enabled: boolean\n timestamp: number\n}\n\nexport type SwitchStatusEvent = {\n type: \"switch_status\"\n switchType?: number\n switchValue?: number\n timestamp: number\n}\n\nexport type RgbLedControlResponseEvent =\n | {\n type: \"rgb_led_control_response\"\n state: \"success\"\n requestId: string\n }\n | {\n type: \"rgb_led_control_response\"\n state: \"error\"\n requestId: string\n errorCode: string\n }\n\nexport type RgbLedControlSuccessResponseEvent = Extract<RgbLedControlResponseEvent, {state: \"success\"}>\n\nexport type SettingsAckStatus = \"applied\" | \"ready\" | \"error\" | \"failed\" | \"failure\" | \"rejected\"\n\nexport type SettingsAckSetting =\n | \"gallery_mode\"\n | \"button_photo\"\n | \"button_video_recording\"\n | \"button_max_recording_time\"\n | \"camera_fov\"\n | \"camera_fov_override\"\n | \"camera_tuning\"\n\nexport type SettingsAckEvent = {\n type: \"settings_ack\"\n requestId: string\n setting: SettingsAckSetting\n status: SettingsAckStatus\n timestamp: number\n fov?: number\n roiPosition?: CameraRoiPositionValue\n hardwareApplied?: boolean\n leaseId?: string\n active?: boolean\n size?: ButtonPhotoSize | string\n width?: number\n height?: number\n fps?: number\n enabled?: boolean\n minutes?: number\n /** ANR enabled flag; present when setting === \"camera_tuning\" */\n anr?: boolean\n /** Stock-gain flag; present when setting === \"camera_tuning\" */\n gain?: boolean\n errorCode?: string\n errorMessage?: string\n}\n\nexport type SettingsAckSuccessStatus = Exclude<SettingsAckStatus, \"error\" | \"failed\" | \"failure\" | \"rejected\">\n\nexport type SettingsAckSuccessEvent = Omit<SettingsAckEvent, \"status\"> & {\n status: SettingsAckSuccessStatus\n}\n\nexport type RgbLedAction = \"on\" | \"off\"\nexport type RgbLedColor = \"red\" | \"green\" | \"blue\" | \"orange\" | \"white\"\nexport type PhotoSize = \"low\" | \"medium\" | \"high\" | \"max\"\nexport type PhotoMode = \"photo\" | \"text\"\nexport type PhotoTransferMethod = \"auto\" | \"direct\" | \"ble\"\nexport type ButtonPhotoSize = \"low\" | \"medium\" | \"high\" | \"max\"\n\n/**\n * @deprecated Sticky action-button photo presets via {@link BluetoothSdkPublicModule.setPhotoCaptureDefaults}\n * are deprecated. Prefer per-request {@link BluetoothSdkPublicModule.requestPhoto} options\n * (e.g. `mode: \"text\"` for text sensor size/crop, or explicit `aeExposureDivisor`) instead of\n * persisting button-photo tuning on the glasses.\n */\nexport type PhotoCaptureDefaults = {\n size?: PhotoSize\n /** ZSL preview buffering for physical camera-button photos. */\n zsl?: boolean\n /** MFNR still capture for physical camera-button photos. */\n mfnr?: boolean\n noiseReduction?: boolean\n edgeEnhancement?: boolean\n ispDigitalGain?: number\n ispAnalogGain?: string\n aeExposureDivisor?: number\n isoCap?: number\n compress?: PhotoCompression\n sound?: boolean\n /** When true, clears stored NR/edge/ISP presets on the glasses before applying other fields. */\n resetCaptureTuning?: boolean\n}\nexport type PhotoCompression = \"none\" | \"medium\" | \"heavy\"\n\nexport type VideoRecordingDefaults = {\n width: number\n height: number\n fps: number\n}\n\n/**\n * Optional per-recording video settings for {@link startVideoRecording}. When\n * omitted, the glasses fall back to their saved video recording defaults. Any\n * field left undefined is omitted from the BLE command (glasses default applies).\n */\nexport interface VideoRecordingSettings {\n width?: number\n height?: number\n fps?: number\n /**\n * Optional auto-stop timer in minutes, sent on `start_video_recording`.\n * `0` (the default) means record until stopped or interrupted\n * (battery/storage/thermal/error).\n */\n maxRecordingTimeMinutes?: number\n}\nexport const DeviceModels = {\n Simulated: \"Simulated Glasses\",\n G1: \"Even Realities G1\",\n G2: \"Even Realities G2\",\n MentraLive: \"Mentra Live\",\n MentraNex: \"Mentra Display\",\n Mach1: \"Mentra Mach1\",\n Z100: \"Vuzix Z100\",\n Frame: \"Brilliant Frame\",\n Nimo: \"NIMO\",\n Ar99: \"AR99\",\n R1: \"Even Realities R1\",\n} as const\n\nexport type DeviceModel = (typeof DeviceModels)[keyof typeof DeviceModels]\nexport type ObservableStoreCategory = \"glasses\" | \"bluetooth\" | \"core\"\n\nexport type DashboardMenuItem = {\n title: string\n packageName: string\n values?: Record<string, unknown>\n}\n\nexport const CAMERA_FOV_MIN = 62\nexport const CAMERA_FOV_MAX = 118\nexport const CAMERA_FOV_DEFAULT = CAMERA_FOV_MAX\n\nexport type CameraRoiPosition = \"center\" | \"bottom\" | \"top\"\nexport type CameraRoiPositionValue = 0 | 1 | 2\nexport type CameraFovPreset = \"narrow\" | \"standard\" | \"wide\"\n\nexport type CameraFovRequest =\n | {\n fov: number\n roiPosition?: CameraRoiPosition\n }\n | {\n preset: CameraFovPreset\n }\n\nexport type CameraFovResult = {\n requestId: string\n fov: number\n roiPosition: CameraRoiPosition\n timestamp: number\n}\n\nexport type CameraFovOverrideRequest = CameraFovRequest & {\n /** Phone-owned lease used to make delayed releases safe. */\n leaseId: string\n /** Safety TTL; refresh the same lease/configuration to extend without a HAL restart. */\n ttlMs?: number\n}\n\nexport type CameraFovSetting = {\n fov: number\n roiPosition: CameraRoiPositionValue\n}\n\ntype NativeCameraFovSetting = {\n fov: number\n roi_position: CameraRoiPositionValue\n}\n\nexport type MicPreference = \"auto\" | \"phone\" | \"glasses\" | \"bluetooth\"\nexport type MicMode = \"phone\" | \"glasses\" | \"bluetoothClassic\" | \"bluetooth\"\n\nexport type PhotoRequestParams = {\n requestId?: string\n appId?: string\n size: PhotoSize\n mode?: PhotoMode\n /** `direct` disables BLE fallback; `ble` skips direct upload and forces phone-relayed transfer. */\n transferMethod?: PhotoTransferMethod\n webhookUrl: string | null\n authToken: string | null\n compress: PhotoCompression\n save?: boolean\n sound: boolean\n exposureTimeNs?: number | null\n /** Sensor ISO for this capture only. Only used when exposureTimeNs enables manual exposure. */\n iso?: number | null\n /** After AE convergence, divide metered exposure by this factor (scan mode). */\n aeExposureDivisor?: number\n /** Cap ISO after AE metering (scan mode). */\n isoCap?: number\n /** Requested on wire; glasses may log not_implemented. */\n noiseReduction?: boolean\n edgeEnhancement?: boolean\n /** ZSL buffering. Forced off for manual/scan stills because fixed sensor controls take priority. */\n zsl?: boolean\n /** MFNR still capture. Forced off for manual/scan stills because fixed sensor controls take priority. */\n mfnr?: boolean\n ispDigitalGain?: number\n ispAnalogGain?: string\n}\n\nexport type WarmUpCameraParams = {\n /** Supply this when the owner needs to call stopCameraWarmUp during teardown. */\n requestId?: string\n size: PhotoSize\n mode?: PhotoMode\n exposureTimeNs?: number | null\n /** Ready-state hold; defaults to 15 seconds and is capped at 60 seconds by ASG. */\n durationMs?: number\n /** ZSL preview buffering for the warm-up session. */\n zsl?: boolean\n /** MFNR still capture for the warm-up session. */\n mfnr?: boolean\n}\n\nexport type StreamVideoConfig = {\n width?: number\n height?: number\n bitrate?: number\n fps?: number\n}\n\nexport type StreamAudioConfig = {\n bitrate?: number\n sampleRate?: number\n echoCancellation?: boolean\n noiseSuppression?: boolean\n}\n\nexport type StreamStartRequest = {\n type?: \"start_stream\"\n streamUrl: string\n streamId?: string\n sound?: boolean\n video?: StreamVideoConfig\n audio?: StreamAudioConfig\n}\n\nexport type StreamKeepAliveRequest = {\n type?: \"keep_stream_alive\"\n streamId: string\n ackId: string\n}\n\nexport type PairFailureEvent = {\n type: \"pair_failure\"\n error: string\n}\n\nexport type PairingInfoEvent = {\n had_previous_bond: boolean\n /** 16-char uppercase hex transfer id when secure pairing is active. */\n transfer_id?: string\n pairing_code?: string\n classic_bond_ready?: boolean\n secure_pairing_capable?: boolean\n protocol_version?: number\n /** Credential binding mode negotiated for this transfer, when reported by the glasses. */\n binding?: \"ctkd\" | \"temporal\" | \"none\" | string\n}\n\nexport type EnteringPairingModeEvent = {\n window_ms: number\n reason?: string\n txn?: number\n}\n\nexport type OwnerReplacedEvent = {\n reason: string\n}\n\nexport type AudioPairingNeededEvent = {\n type: \"audio_pairing_needed\"\n deviceName: string\n}\n\nexport type AudioConnectedEvent = {\n type: \"audio_connected\"\n deviceName: string\n}\n\nexport type AudioDisconnectedEvent = {\n type: \"audio_disconnected\"\n}\n\nexport type SaveSettingEvent = {\n type: \"save_setting\"\n key: string\n value: any\n}\n\nexport type WsTextEvent = {\n type: \"ws_text\"\n text: string\n}\n\nexport type WsBinEvent = {\n type: \"ws_bin\"\n base64: string\n}\n\nexport type MicPcmEvent = {\n type: \"mic_pcm\"\n pcm: ArrayBuffer\n sampleRate: 16000\n bitsPerSample: 16\n channels: 1\n encoding: \"pcm_s16le\"\n voiceActivityDetectionEnabled: boolean\n}\n\nexport type MicLc3Event = {\n type: \"mic_lc3\"\n lc3: ArrayBuffer\n sampleRate: 16000\n channels: 1\n encoding: \"lc3\"\n frameDurationMs: 10\n frameSizeBytes: number\n bitrate: number\n packetizedFromGlasses: boolean\n voiceActivityDetectionEnabled: boolean\n}\n\n/** Native glasses-microphone diagnostics emitted when the SDK detects a transport or decode issue. */\nexport type MicHealthEvent = {\n type: \"mic_health\"\n reason: \"sequence_gap\" | \"decode_failure\"\n sequenceGapEvents: number\n decodeFailures: number\n lastLc3ReceivedAt?: number\n lastPcmProducedAt?: number\n timestamp: number\n}\n\nexport type StreamStatusLifecycleState = \"initializing\" | \"streaming\" | \"stopping\" | \"stopped\"\nexport type StreamStatusReconnectState = \"reconnecting\" | \"reconnected\" | \"reconnect_failed\"\nexport type StreamStatusState = StreamStatusLifecycleState | StreamStatusReconnectState | \"error\"\n\n/** Effective stream settings reported by the glasses after defaults and clamps. */\nexport type StreamResolvedConfig = {\n transport?: \"rtmp\" | \"srt\" | \"whip\"\n video?: {\n /** Encoded output width sent to the stream endpoint. */\n width: number\n /** Encoded output height sent to the stream endpoint. */\n height: number\n /** Native camera buffer width selected before crop/downscale. */\n captureWidth?: number\n /** Native camera buffer height selected before crop/downscale. */\n captureHeight?: number\n /** Encoded video bitrate in bits per second. */\n bitrate: number\n /** Resolved capture/encode frame rate. */\n fps: number\n }\n audio?: {\n /** Encoded audio bitrate in bits per second. */\n bitrate?: number\n /** Audio sample rate in Hz. */\n sampleRate?: number\n echoCancellation?: boolean\n noiseSuppression?: boolean\n }\n}\n\n/** Live encoder and device telemetry emitted periodically by supported glasses firmware. */\nexport type StreamLiveStats = {\n /** Current encoded video bitrate in bits per second. */\n bitrate?: number\n /** Current encode frame rate. */\n fps?: number\n droppedFrames?: number\n /** Seconds since the stream started. */\n duration?: number\n /** Device temperature in 闂佺娅i悡? if the hardware reports it. */\n temperatureC?: number\n}\n\ntype StreamStatusCommon = {\n type: \"stream_status\"\n streamId?: string\n timestamp?: number\n resolvedConfig?: StreamResolvedConfig\n stats?: StreamLiveStats\n}\n\nexport type StreamStatusEvent =\n | (StreamStatusCommon & {\n kind: \"lifecycle\"\n status: StreamStatusLifecycleState\n })\n | (StreamStatusCommon & {\n kind: \"reconnect\"\n status: \"reconnecting\"\n attempt: number\n maxAttempts: number\n reason: string\n })\n | (StreamStatusCommon & {\n kind: \"reconnect\"\n status: \"reconnected\"\n attempt: number\n })\n | (StreamStatusCommon & {\n kind: \"reconnect\"\n status: \"reconnect_failed\"\n maxAttempts: number\n })\n | (StreamStatusCommon & {\n kind: \"error\"\n status: \"error\"\n errorDetails: string\n })\n | (StreamStatusCommon & {\n kind: \"snapshot\"\n status: \"streaming\" | \"reconnecting\" | \"stopped\"\n streaming: boolean\n reconnecting: boolean\n attempt?: number\n })\n\nexport type KeepAliveAckEvent = {\n type: \"keep_alive_ack\"\n streamId: string\n ackId: string\n timestamp?: number\n}\n\nexport type MtkUpdateCompleteEvent = {\n type: \"mtk_update_complete\"\n message: string\n timestamp: number\n}\n\n/**\n * The glasses process restarted while the BES kept the BLE link alive (its `sid`\n * changed, or first appeared after an update from a pre-sid build). There is no\n * physical disconnect for this — treat it as the logical reconnect edge.\n */\nexport type GlassesSessionChangedEvent = {\n type: \"glasses_session_changed\"\n previous_sid: string\n sid: string\n}\n\n/** @deprecated Glasses no longer emit ota_progress; use {@link OtaStatusEvent} and status-store mapping. */\nexport type OtaProgressEvent = {\n type: \"ota_progress\"\n stage?: OtaStage\n status?: OtaProgressStatus\n progress?: number\n bytes_downloaded?: number\n total_bytes?: number\n current_update?: string\n error_message?: string\n}\n\nexport type OtaStartAckEvent = {\n type: \"ota_start_ack\"\n timestamp: number\n}\nexport type OtaStatusEvent = {\n type: \"ota_status\"\n session_id: string\n total_steps: number\n current_step: number\n step_type: \"apk\" | \"mtk\" | \"bes\"\n phase: \"download\" | \"install\"\n step_percent: number\n overall_percent: number\n status: \"in_progress\" | \"step_complete\" | \"complete\" | \"failed\" | \"idle\"\n error_message?: string\n}\n\nexport type OtaQueryResult = OtaStatusEvent\n\n/** Nex BLE protobuf trace (NexEventUtils); payload matches native Map keys. */\nexport type BleCommandTraceEvent = {\n command: string\n commandText: string\n timestamp: number\n}\n\nexport type MiniappSelectedEvent = {\n type: \"miniapp_selected\"\n packageName: string\n}\n\n// Union type of all native/internal Bluetooth SDK events.\nexport type BluetoothSdkInternalEvent = Parameters<BluetoothSdkModuleEvents[keyof BluetoothSdkModuleEvents]>[0]\n\nexport type BluetoothSdkModuleEvents = {\n glasses_status: (changed: Partial<GlassesStatus>) => void\n bluetooth_status: (changed: Partial<BluetoothStatus>) => void\n log: (event: LogEvent) => void\n device_discovered: (device: Device) => void\n default_device_changed: (event: {device?: Device}) => void\n // Individual event handlers\n glasses_not_ready: (event: GlassesNotReadyEvent) => void\n button_press: (event: ButtonPressEvent) => void\n touch_event: (event: TouchEvent) => void\n accel_event: (event: AccelEvent) => void\n head_up: (event: HeadUpEvent) => void\n voice_activity_detection_status: (event: VoiceActivityDetectionStatusEvent) => void\n speaking_status: (event: SpeakingStatusEvent) => void\n battery_status: (event: BatteryStatusEvent) => void\n local_transcription: (event: LocalTranscriptionEvent) => void\n phone_notification: (event: PhoneNotificationEvent) => void\n phone_notification_dismissed: (event: PhoneNotificationDismissedEvent) => void\n wifi_status_change: (event: WifiStatusChangeEvent) => void\n wifi_scan_result: (event: WifiScanResultEvent) => void\n hotspot_status_change: (event: HotspotStatusChangeEvent) => void\n hotspot_error: (event: HotspotErrorEvent) => void\n photo_response: (event: PhotoResponseEvent) => void\n photo_status: (event: PhotoStatusEvent) => void\n camera_status: (event: CameraStatusEvent) => void\n video_recording_status: (event: VideoRecordingStatusEvent) => void\n media_success: (event: MediaUploadSuccessEvent) => void\n media_error: (event: MediaUploadErrorEvent) => void\n gallery_status: (event: GalleryStatusEvent) => void\n compatible_glasses_search_stop: (event: CompatibleGlassesSearchStopEvent) => void\n heartbeat_sent: (event: HeartbeatSentEvent) => void\n heartbeat_received: (event: HeartbeatReceivedEvent) => void\n swipe_volume_status: (event: SwipeVolumeStatusEvent) => void\n switch_status: (event: SwitchStatusEvent) => void\n rgb_led_control_response: (event: RgbLedControlResponseEvent) => void\n settings_ack: (event: SettingsAckEvent) => void\n pair_failure: (event: PairFailureEvent) => void\n pairing_info: (event: PairingInfoEvent) => void\n entering_pairing_mode: (event: EnteringPairingModeEvent) => void\n owner_replaced: (event: OwnerReplacedEvent) => void\n audio_pairing_needed: (event: AudioPairingNeededEvent) => void\n audio_connected: (event: AudioConnectedEvent) => void\n audio_disconnected: (event: AudioDisconnectedEvent) => void\n save_setting: (event: SaveSettingEvent) => void\n ws_text: (event: WsTextEvent) => void\n ws_bin: (event: WsBinEvent) => void\n mic_pcm: (event: MicPcmEvent) => void\n mic_lc3: (event: MicLc3Event) => void\n mic_health: (event: MicHealthEvent) => void\n stream_status: (event: StreamStatusEvent) => void\n keep_alive_ack: (event: KeepAliveAckEvent) => void\n mtk_update_complete: (event: MtkUpdateCompleteEvent) => void\n glasses_session_changed: (event: GlassesSessionChangedEvent) => void\n ota_start_ack: (event: OtaStartAckEvent) => void\n ota_status: (event: OtaStatusEvent) => void\n ar99_ota_status: (event: Ar99OtaStatusEvent) => void\n version_info: (event: VersionInfoEvent) => void\n send_command_to_ble: (event: BleCommandTraceEvent) => void\n receive_command_from_ble: (event: BleCommandTraceEvent) => void\n miniapp_selected: (event: MiniappSelectedEvent) => void\n extraction_progress: (event: ExtractionProgressEvent) => void\n}\n\nexport interface ExtractionProgressEvent {\n percentage: number\n bytesRead: number\n totalBytes: number\n}\n\nexport interface Ar99OtaStatusEvent {\n type: \"ar99_ota_status\"\n phase: string\n progress: number\n offset: number\n total: number\n errorMessage?: string\n error_message?: string\n}\n\nexport interface PhoneNotificationEvent {\n notificationId: string\n app: string\n title: string\n content: string\n priority: string\n timestamp: number\n packageName: string\n}\n\nexport interface PhoneNotificationDismissedEvent {\n notificationId: string\n notificationKey: string\n packageName: string\n timestamp: number\n}\n\nexport type PublicGlassesStatus = Omit<\n GlassesStatus,\n \"otaUpdateAvailable\" | \"otaProgress\" | \"otaInProgress\" | \"otaVersionUrl\"\n>\n\nexport type PublicBluetoothStatus = Pick<\n BluetoothStatus,\n | \"searching\"\n | \"searchingController\"\n | \"systemMicUnavailable\"\n | \"micRanking\"\n | \"currentMic\"\n | \"searchResults\"\n | \"wifiScanResults\"\n | \"lastLog\"\n | \"otherBtConnected\"\n | \"galleryModeEnabled\"\n>\n\nexport type BluetoothSdkEventMap = {\n log: LogEvent\n device_discovered: Device\n default_device_changed: {device?: Device}\n glasses_not_ready: GlassesNotReadyEvent\n button_press: ButtonPressEvent\n touch_event: TouchEvent\n accel_event: AccelEvent\n head_up: HeadUpEvent\n voice_activity_detection_status: VoiceActivityDetectionStatusEvent\n speaking_status: SpeakingStatusEvent\n battery_status: BatteryStatusEvent\n local_transcription: LocalTranscriptionEvent\n wifi_status_change: WifiStatusChangeEvent\n wifi_scan_result: WifiScanResultEvent\n hotspot_status_change: HotspotStatusChangeEvent\n hotspot_error: HotspotErrorEvent\n photo_response: PhotoResponseEvent\n photo_status: PhotoStatusEvent\n camera_status: CameraStatusEvent\n video_recording_status: VideoRecordingStatusEvent\n media_success: MediaUploadSuccessEvent\n media_error: MediaUploadErrorEvent\n gallery_status: GalleryStatusEvent\n compatible_glasses_search_stop: CompatibleGlassesSearchStopEvent\n swipe_volume_status: SwipeVolumeStatusEvent\n switch_status: SwitchStatusEvent\n rgb_led_control_response: RgbLedControlResponseEvent\n settings_ack: SettingsAckEvent\n pair_failure: PairFailureEvent\n pairing_info: PairingInfoEvent\n entering_pairing_mode: EnteringPairingModeEvent\n owner_replaced: OwnerReplacedEvent\n audio_pairing_needed: AudioPairingNeededEvent\n audio_connected: AudioConnectedEvent\n audio_disconnected: AudioDisconnectedEvent\n mic_pcm: MicPcmEvent\n mic_lc3: MicLc3Event\n mic_health: MicHealthEvent\n stream_status: StreamStatusEvent\n ota_start_ack: OtaStartAckEvent\n ota_status: OtaStatusEvent\n ar99_ota_status: Ar99OtaStatusEvent\n version_info: VersionInfoEvent\n extraction_progress: ExtractionProgressEvent\n}\n\nexport type BluetoothSdkEventName = keyof BluetoothSdkEventMap\n\nexport type BluetoothSdkEventListener<EventName extends BluetoothSdkEventName> = (\n event: BluetoothSdkEventMap[EventName],\n) => void\n\nexport type BluetoothSdkSubscription = {\n remove(): void\n}\n\nexport type BluetoothSdkEvent = BluetoothSdkEventMap[BluetoothSdkEventName]\n\nexport interface BluetoothSdkPublicModule {\n addListener<EventName extends BluetoothSdkEventName>(\n eventName: EventName,\n listener: BluetoothSdkEventListener<EventName>,\n ): BluetoothSdkSubscription\n\n getDefaultDevice(): Promise<Device | null>\n setDefaultDevice(device: Device | null): Promise<void>\n clearDefaultDevice(): Promise<void>\n\n startScan(model: DeviceModel): Promise<void>\n stopScan(): Promise<void>\n scan(options: ScanOptions): Promise<Device[]>\n scan(model: DeviceModel, options?: ScanModelOptions): Promise<Device[]>\n connect(device: Device, options?: ConnectOptions): Promise<void>\n connectDefault(options?: ConnectOptions): Promise<void>\n cancelConnectionAttempt(): Promise<void>\n disconnect(): Promise<void>\n forget(): Promise<void>\n\n displayText(text: string, x?: number, y?: number, size?: number): Promise<void>\n clearDisplay(): Promise<void>\n showDashboard(): Promise<void>\n setDashboardPosition(height: number, depth: number): Promise<void>\n setHeadUpAngle(angleDegrees: number): Promise<void>\n setImuEnabled(enabled: boolean): Promise<void>\n setScreenDisabled(disabled: boolean): Promise<void>\n\n requestWifiScan(): Promise<WifiSearchResult[]>\n sendWifiCredentials(ssid: string, password: string): Promise<WifiStatusChangeEvent>\n forgetWifiNetwork(ssid: string): Promise<WifiStatusChangeEvent>\n setHotspotState(enabled: boolean): Promise<HotspotStatusChangeEvent>\n /** Enable or disable Wi-Fi ADB on Mentra Live (no-op on other devices). */\n setWifiAdbState(enabled: boolean): Promise<void>\n\n setGalleryModeEnabled(enabled: boolean): Promise<SettingsAckSuccessEvent>\n setVoiceActivityDetectionEnabled(enabled: boolean): Promise<void>\n setLoudnessGateEnabled(enabled: boolean): Promise<void>\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop, or explicit per-shot\n * fields). Still functional until removed in a future release.\n */\n setPhotoCaptureDefaults(settings: PhotoCaptureDefaults): Promise<SettingsAckSuccessEvent>\n setVideoRecordingDefaults(settings: VideoRecordingDefaults): Promise<SettingsAckSuccessEvent>\n setMaxVideoRecordingDuration(minutes: number): Promise<SettingsAckSuccessEvent>\n setCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n /** One-way FOV command for legacy ASG clients that do not send settings acknowledgements. */\n setLegacyCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n setCameraFovOverride(request: CameraFovOverrideRequest): Promise<CameraFovResult>\n releaseCameraFovOverride(leaseId: string): Promise<SettingsAckSuccessEvent>\n /**\n * Configure camera HAL tuning (ANR / gain) on Mentra Live glasses.\n *\n * The phone sends a {@code camera_tuning_config} BLE command; the glasses relay it as a\n * {@code camconfig} broadcast to the camera HAL so parameters take effect without a reboot.\n *\n * **Scan-mode convention**: call with `(false, false)` when activating scan mode to disable ANR\n * and pixsmart gain for sharper text/barcode captures. Call with `(true, true)` to restore\n * defaults when exiting scan mode.\n *\n * @param anrOn `true` = ANR enabled (default), `false` = ANR disabled\n * @param gainOn `true` = stock gain params (default), `false` = pixsmart gain-off params\n */\n setCameraTuningConfig(anrOn: boolean, gainOn: boolean): Promise<SettingsAckSuccessEvent>\n queryGalleryStatus(): Promise<GalleryStatusEvent>\n requestPhoto(params: PhotoRequestParams): Promise<PhotoSuccessResponseEvent>\n warmUpCamera(params: WarmUpCameraParams): Promise<CameraStatusEvent>\n /** Release one request-owned warm-up. Opening requests reject with camera_warm_up_cancelled. */\n stopCameraWarmUp(requestId: string): Promise<void>\n startVideoRecording(\n requestId: string,\n save: boolean,\n sound: boolean,\n settings?: VideoRecordingSettings,\n ): Promise<VideoRecordingStartedStatusEvent>\n /**\n * Stop the active recording. When {@link webhookUrl} is provided, the glasses\n * upload the recorded video to it (multipart) using {@link authToken}. These\n * are supplied at stop time (not start) so the token is fresh when the upload\n * runs 闂?a recording can last arbitrarily long. An empty/omitted webhook keeps\n * the video on device (no upload).\n */\n stopVideoRecording(\n requestId: string,\n webhookUrl?: string,\n authToken?: string,\n ): Promise<VideoRecordingStoppedStatusEvent>\n /** Query the glasses for the current recording state and elapsed duration. */\n queryVideoRecordingStatus(requestId: string): Promise<VideoRecordingStatusEvent>\n\n startStream(params: StreamStartRequest): Promise<StreamStatusEvent>\n stopStream(): Promise<StreamStatusEvent>\n\n setMicState(enabled: boolean, useGlassesMic?: boolean, sendTranscript?: boolean, sendLc3Data?: boolean): Promise<void>\n setPreferredMic(preferredMic: MicPreference): Promise<void>\n setOwnAppAudioPlaying(playing: boolean): Promise<void>\n getGlassesMediaVolume(): Promise<GlassesMediaVolumeGetResult>\n setGlassesMediaVolume(level: number): Promise<GlassesMediaVolumeSetResult>\n\n rgbLedControl(\n requestId: string,\n packageName: string | null,\n action: RgbLedAction,\n color: RgbLedColor | null,\n onDurationMs: number,\n offDurationMs: number,\n count: number,\n ): Promise<RgbLedControlSuccessResponseEvent>\n\n requestVersionInfo(): Promise<VersionInfoResult>\n /**\n * Select the OTA manifest used by subsequent update checks and installs.\n * The URL may point at Mentra's hosted manifest or any customer-controlled HTTP(S) server.\n */\n setOtaVersionUrl(otaVersionUrl: string): void\n /** Return the configured or release-embedded OTA manifest URL. Rejects when a source build is unconfigured. */\n getOtaVersionUrl(): string\n /** Fetch the configured OTA manifest and return whether any ASG/BES/MTK update is available. */\n checkForOtaUpdate(): Promise<boolean>\n /** Start OTA from the configured or explicitly supplied manifest URL. */\n startOtaUpdate(otaVersionUrl?: string | null): Promise<OtaStartAckEvent>\n startAr99OtaFromFile(path: string): Promise<boolean>\n cancelAr99Ota(): Promise<void>\n sendAr99FactoryReset(): Promise<void>\n buildAr99OtaSignature(\n secret: string,\n appName: string,\n currentVersion: string,\n serialNumber: string,\n nonce: string,\n ): string\n\n // // stt commands (MOVE TO CRUST)\n // setSttModelDetails(path: string, languageCode: string): Promise<void>\n // getSttModelPath(): Promise<string>\n // checkSttModelAvailable(): Promise<boolean>\n // validateSttModel(path: string): Promise<boolean>\n // extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>\n\n // // tts commands (MOVE TO CRUST)\n // setTtsModelDetails(path: string, languageCode: string): Promise<void>\n // getTtsModelPath(): Promise<string>\n // getTtsModelLanguage(): Promise<string>\n // checkTtsModelAvailable(): Promise<boolean>\n // validateTtsModel(path: string): Promise<boolean>\n // generateTtsAudio(text: string, path: string, outputPath: string, speakerId: number, speed: number): Promise<boolean>\n\n // STT Commands (TODO: MOVE TO CRUST)\n setSttModelDetails(path: string, languageCode: string): Promise<void>\n getSttModelPath(): Promise<string>\n checkSttModelAvailable(): Promise<boolean>\n validateSttModel(path: string): Promise<boolean>\n extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>\n restartTranscriber(): Promise<void>\n\n // TTS Commands (TODO: MOVE TO CRUST)\n setTtsModelDetails(path: string, languageCode: string): Promise<void>\n getTtsModelPath(): Promise<string>\n getTtsModelLanguage(): Promise<string>\n checkTtsModelAvailable(): Promise<boolean>\n validateTtsModel(path: string): Promise<boolean>\n generateTtsAudio(\n text: string,\n modelPath: string,\n outputPath: string,\n speakerId: number,\n speed: number,\n ): Promise<boolean>\n}\n\n// OTA update status types\nexport type OtaStage = \"download\" | \"install\"\nexport type OtaProgressStatus = \"STARTED\" | \"PROGRESS\" | \"FINISHED\" | \"FAILED\"\n\nexport interface OtaStatus {\n sessionId: string\n totalSteps: number\n currentStep: number\n stepType: \"apk\" | \"mtk\" | \"bes\"\n phase: \"download\" | \"install\"\n stepPercent: number\n overallPercent: number\n status: \"in_progress\" | \"step_complete\" | \"complete\" | \"failed\" | \"idle\"\n error?: string\n}\n\nexport interface OtaUpdateInfo {\n available: boolean\n versionCode: number\n versionName: string\n updates: string[] // [\"apk\", \"mtk\", \"bes\"]\n totalSize: number\n cacheReady?: boolean\n /** Exact BES target selected from the OTA manifest, when a BES step is pending. */\n besVersion?: string\n /** True when the APK step installs an older build than the glasses currently run (exact-pin manifests only). */\n isDowngrade?: boolean\n}\n\nexport interface OtaProgress {\n stage: OtaStage\n status: OtaProgressStatus\n progress: number\n bytesDownloaded: number\n totalBytes: number\n currentUpdate: string\n errorMessage?: string\n}\n\nexport interface GlassesStatus {\n // state:\n connection: GlassesConnectionStatus\n micEnabled: boolean\n voiceActivityDetectionEnabled: boolean\n bluetoothClassicConnected: boolean\n signalStrength: number\n /** Milliseconds since epoch when signalStrength was last refreshed by the phone BLE stack. */\n signalStrengthUpdatedAt: number\n // device info\n deviceModel: string\n androidVersion: string\n firmwareVersion: string\n besFirmwareVersion: string\n mtkFirmwareVersion: string\n bluetoothMacAddress: string\n wifiMacAddress: string\n leftMacAddress: string\n rightMacAddress: string\n buildNumber: string\n /** Glasses System.currentTimeMillis() from last version_info (clock skew detection). */\n systemTimeMs?: number\n otaVersionUrl: string\n appVersion: string\n /** Phone-served hotspot OTA protocol version; 0 means unsupported/legacy glasses. */\n hotspotOtaVersion: number\n bluetoothName: string\n serialNumber: string\n style: string\n color: string\n // wifi info\n wifi: WifiStatus\n // battery info\n batteryLevel: number\n charging: boolean\n caseBatteryLevel: number\n caseCharging: boolean\n caseOpen: boolean\n caseRemoved: boolean\n // hotspot info\n hotspot: HotspotStatus\n // OTA update info\n otaUpdateAvailable: OtaUpdateInfo | null\n otaProgress: OtaProgress | null\n otaInProgress: boolean\n // ring info\n controllerConnected: boolean\n controllerFullyBooted: boolean\n controllerMacAddress: string\n controllerBatteryLevel: number\n controllerSignalStrength: number\n}\n\nexport interface CoreDashboardMenuItem {\n name: string\n packageName: string\n running: boolean\n}\n\nexport interface CalendarEvent {\n title: string\n location?: string\n time: string\n endDate: number\n}\n\nexport interface CoreSettings {\n menu_apps: CoreDashboardMenuItem[]\n calendar_events: CalendarEvent[]\n}\n\nexport interface Device {\n /**\n * Stable app-facing key for this scan result, within the limits of the\n * platform identifier available to the SDK. Do not parse this value; use the\n * typed model, name, address, projectName, and rssi fields instead.\n */\n id: string\n model: DeviceModel\n name: string\n /** Platform address/identifier when available: Android Bluetooth address, iOS CoreBluetooth identifier. */\n address?: string\n /** Optional AR99 project discriminator. Supported value: AR99. */\n projectName?: string\n /**\n * Optional scan signal strength. It may be undefined at first discovery and\n * appear in a later scan update when the platform reports RSSI metadata.\n */\n rssi?: number\n /** Mentra Live: unit is currently in pairing mode (adv flag). */\n pairingMode?: boolean\n /** Mentra Live: four-character hex spoken pairing code when available. */\n pairingCode?: string\n /** Mentra Live: advertisement carries the secure-pairing capability trailer. */\n securePairingCapable?: boolean\n}\n\nexport interface ConnectOptions {\n saveAsDefault?: boolean\n cancelExistingConnectionAttempt?: boolean\n}\n\nexport type ScanResultsCallback = (devices: Device[]) => void\n\nexport interface ScanOptions {\n model: DeviceModel\n /** Defaults to 15000. */\n timeoutMs?: number\n /** Alias for `timeoutMs`, useful when mirroring native examples. */\n timeout?: number\n /** Called every time the discovered device list changes during the scan. */\n onResults?: ScanResultsCallback\n}\n\nexport type ScanModelOptions = Omit<ScanOptions, \"model\">\n\nexport interface WifiSearchResult {\n ssid: string\n requiresPassword: boolean\n signalStrength: number\n /** Frequency in MHz (from glasses scan). 5 GHz band is typically 5170闂?825. Omitted if unknown. */\n frequency?: number\n}\n\nexport interface BluetoothStatus {\n // state:\n searching: boolean\n searchingController: boolean\n default_wearable?: DeviceModel | \"\"\n pending_wearable?: DeviceModel | \"\"\n device_name?: string\n device_address?: string\n default_controller?: DeviceModel | \"\"\n pending_controller?: DeviceModel | \"\"\n controller_device_name?: string\n controller_address?: string\n systemMicUnavailable: boolean\n micRanking: MicMode[]\n currentMic: MicMode | \"\" | null\n /**\n * Nearby glasses in stable discovery order.\n * Existing entries keep their array position as details refresh; new glasses append at the end,\n * and removals should not reorder remaining entries.\n */\n searchResults: Device[]\n wifiScanResults: WifiSearchResult[]\n lastLog: string[]\n otherBtConnected: boolean\n // desired settings the SDK sends to compatible connected glasses:\n galleryModeEnabled: boolean\n}\n\nexport type BluetoothSettingsUpdate = Partial<{\n auth_email: string\n core_token: string\n sensing_enabled: boolean\n power_saving_mode: boolean\n lc3_frame_size: number\n preferred_mic: MicPreference\n screen_disabled: boolean\n contextual_dashboard: boolean\n head_up_angle: number\n imu_enabled: boolean\n brightness: number\n auto_brightness: boolean\n dashboard_height: number\n dashboard_depth: number\n menu_apps: DashboardMenuItem[] | CoreDashboardMenuItem[] | Array<Record<string, unknown>> | null\n calendar_events: CalendarEvent[]\n metric_system: boolean\n twelve_hour_time: boolean\n gallery_mode: boolean\n voice_activity_detection_enabled: boolean\n loudness_gate_enabled: boolean\n button_photo_size: ButtonPhotoSize\n button_video_settings: {width: number; height: number; fps: number}\n button_video_width: number\n button_video_height: number\n button_video_fps: number\n button_max_recording_time: number\n camera_fov: NativeCameraFovSetting\n should_send_pcm: boolean\n should_send_lc3: boolean\n should_send_transcript: boolean\n offline_mode: boolean\n local_stt_fallback_active: boolean\n pending_wearable: DeviceModel | \"\"\n default_wearable: DeviceModel | \"\"\n device_name: string\n device_address: string\n default_controller: DeviceModel | \"\"\n pending_controller: DeviceModel | \"\"\n controller_device_name: string\n controller_address: string\n}>\n"]}
|
|
1
|
+
{"version":3,"file":"BluetoothSdk.types.js","sourceRoot":"","sources":["../src/BluetoothSdk.types.ts"],"names":[],"mappings":"AAwCA,MAAM,CAAC,MAAM,wCAAwC,GAAG,KAAK,CAAA;AAwB7D,MAAM,UAAU,kCAAkC,CAChD,MAA+B;IAE/B,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW,CAAA;AACrC,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,MAA+B;IAC5E,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW,IAAI,MAAM,CAAC,WAAW,CAAA;AAC3D,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,MAA+B;IAC3E,OAAO,MAAM,CAAC,KAAK,KAAK,UAAU,IAAI,MAAM,CAAC,KAAK,KAAK,YAAY,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,CAAA;AACnG,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,UAAU,EAAE,EAAC,KAAK,EAAE,cAAc,EAAC;QACnC,OAAO,EAAE,EAAC,KAAK,EAAE,UAAU,EAAC;QAC5B,6BAA6B,EAAE,wCAAwC;QACvE,IAAI,EAAE,EAAC,KAAK,EAAE,cAAc,EAAC;KAC9B,CAAA;AACH,CAAC;AA2BD,MAAM,UAAU,qBAAqB,CAAC,MAAkB;IACtD,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW,CAAA;AACrC,CAAC;AAoBD,MAAM,UAAU,sBAAsB,CAAC,MAAqB;IAC1D,OAAO,MAAM,CAAC,KAAK,KAAK,SAAS,CAAA;AACnC,CAAC;AAmXD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,EAAE,EAAE,mBAAmB;IACvB,EAAE,EAAE,mBAAmB;IACvB,UAAU,EAAE,aAAa;IACzB,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,mBAAmB;CACf,CAAA;AAWV,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAA;AAChC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;AACjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAA","sourcesContent":["// Bluetooth SDK Event Types\nexport type GlassesNotReadyEvent = {\n type: \"glasses_not_ready\"\n message: string\n}\n\n// NOTE: unlike most events below, the native module does NOT include a `type`\n// field on the button_press payload 闂?it sends only {buttonId, pressType,\n// timestamp} (see BluetoothSdkModule on both iOS and Android). Consumers must\n// filter on `pressType` / the \"button_press\" listener name, never `event.type`.\nexport type ButtonPressEvent = {\n buttonId: string\n pressType: \"long\" | \"short\"\n timestamp: number\n}\n\nexport type TouchEvent = {\n type: \"touch_event\"\n deviceModel: DeviceModel\n gestureName: string\n timestamp: number\n}\n\nexport type AccelEvent = {\n type: \"accel_event\"\n x: number\n y: number\n z: number\n timestamp: number\n}\n\nexport type HeadUpEvent = {\n up: boolean\n}\n\nexport type VoiceActivityDetectionStatusEvent = {\n type: \"voice_activity_detection_status\"\n voiceActivityDetectionEnabled: boolean\n}\n\nexport const DEFAULT_VOICE_ACTIVITY_DETECTION_ENABLED = false\n\nexport type SpeakingStatusEvent = {\n type: \"speaking_status\"\n speaking: boolean\n timestamp: number\n}\n\nexport type BatteryStatusEvent = {\n type: \"battery_status\"\n level: number\n charging: boolean\n timestamp: number\n}\n\nexport type GlassesConnectionStatus =\n | {state: \"disconnected\"}\n | {state: \"scanning\"}\n | {state: \"connecting\"}\n | {state: \"bonding\"}\n | {state: \"connected\"; fullyBooted: boolean}\n\nexport type ConnectedGlassesConnectionStatus = Extract<GlassesConnectionStatus, {state: \"connected\"}>\n\nexport function isConnectedGlassesConnectionStatus(\n status: GlassesConnectionStatus,\n): status is ConnectedGlassesConnectionStatus {\n return status.state === \"connected\"\n}\n\nexport function isReadyGlassesConnectionStatus(status: GlassesConnectionStatus): boolean {\n return status.state === \"connected\" && status.fullyBooted\n}\n\nexport function isBusyGlassesConnectionStatus(status: GlassesConnectionStatus): boolean {\n return status.state === \"scanning\" || status.state === \"connecting\" || status.state === \"bonding\"\n}\n\nexport function createDisconnectedGlassesStatus(): Partial<GlassesStatus> {\n return {\n connection: {state: \"disconnected\"},\n hotspot: {state: \"disabled\"},\n voiceActivityDetectionEnabled: DEFAULT_VOICE_ACTIVITY_DETECTION_ENABLED,\n wifi: {state: \"disconnected\"},\n }\n}\n\n/** K900 `sr_getvol` response (Mentra Live glasses media step volume 0闂?5). */\nexport type GlassesMediaVolumeGetResult = {\n level: number\n statusCode: number\n}\n\n/** K900 `sr_vol` acknowledgment. */\nexport type GlassesMediaVolumeSetResult = {\n statusCode: number\n}\n\nexport type LocalTranscriptionEvent = {\n text: string\n isFinal?: boolean\n transcribeLanguage?: string\n}\n\nexport type LogEvent = {\n message: string\n}\n\nexport type WifiStatus = {state: \"disconnected\"} | {state: \"connected\"; ssid: string; localIp?: string}\n\nexport type ConnectedWifiStatus = Extract<WifiStatus, {state: \"connected\"}>\n\nexport function isConnectedWifiStatus(status: WifiStatus): status is ConnectedWifiStatus {\n return status.state === \"connected\"\n}\n\nexport type WifiStatusChangeEvent = WifiStatus & {\n type: \"wifi_status_change\"\n /**\n * Glasses-reported provisioning failure reason when THIS event is the verdict of a\n * failed connect attempt; absent on routine link-state updates. An attempt property,\n * not a link property 闂?which is why it lives on the event, not on WifiStatus:\n * \"connect_timeout\" arrives on a disconnected status (never associated), while\n * \"connected_to_other_network\" arrives on a *connected* status (the attempt failed\n * and the glasses ended up on / fell back to a different SSID than requested).\n * Requires ASG client v40+ 闂?older glasses never send it.\n */\n error?: string\n}\n\nexport type HotspotStatus = {state: \"disabled\"} | {state: \"enabled\"; ssid: string; password: string; localIp: string}\n\nexport type EnabledHotspotStatus = Extract<HotspotStatus, {state: \"enabled\"}>\n\nexport function isEnabledHotspotStatus(status: HotspotStatus): status is EnabledHotspotStatus {\n return status.state === \"enabled\"\n}\n\nexport type HotspotStatusChangeEvent = HotspotStatus & {\n type: \"hotspot_status_change\"\n}\n\nexport type HotspotErrorEvent = {\n type: \"hotspot_error\"\n errorMessage: string\n timestamp: number\n}\n\nexport type VersionInfoResult = {\n androidVersion: string\n firmwareVersion: string\n besFirmwareVersion: string\n mtkFirmwareVersion: string\n buildNumber: string\n systemTimeMs?: number\n otaVersionUrl: string\n appVersion: string\n /** Phone-served hotspot OTA protocol version; 0 means unsupported/legacy glasses. */\n hotspotOtaVersion: number\n}\n\nexport type VersionInfoEvent = VersionInfoResult & {\n type: \"version_info\"\n}\n\nexport type WifiScanResultEvent = {\n type: \"wifi_scan_result\"\n networks: WifiSearchResult[]\n scanComplete?: boolean\n}\n\nexport type PhotoResponseEvent =\n | {\n type: \"photo_response\"\n state: \"success\"\n requestId: string\n uploadUrl: string\n photoUrl?: string\n statusUrl?: string\n contentType?: string\n fileSizeBytes?: number\n timestamp: number\n }\n | {\n type: \"photo_response\"\n state: \"error\"\n requestId: string\n timestamp: number\n errorCode?: string\n errorMessage: string\n }\n\nexport type PhotoSuccessResponseEvent = Extract<PhotoResponseEvent, {state: \"success\"}>\n\nexport type PhotoStatusState =\n | \"accepted\"\n | \"queued\"\n | \"configuring\"\n | \"capturing\"\n | \"captured\"\n | \"compressing\"\n | \"ble_fallback_compression\"\n | \"uploading\"\n | \"uploaded\"\n | \"ready_for_transfer\"\n | \"transferring\"\n | \"failed\"\n\nexport type PhotoResolvedConfig = {\n format?: \"jpeg\" | string\n width?: number\n height?: number\n quality?: number\n requestedSize?: PhotoSize | string\n source?: \"sdk\" | \"button\" | string\n transferMethod?: \"webhook\" | \"ble\" | \"local\" | string\n compression?: PhotoCompression | string\n saveToGallery?: boolean\n exposureTimeNs?: number\n iso?: number\n}\n\nexport type PhotoFpsRange = {\n min?: number\n max?: number\n}\n\nexport type PhotoRequestedCaptureConfig = {\n manual?: boolean\n exposureTimeNs?: number\n iso?: number\n frameDurationNs?: number\n aeMode?: number\n aeLock?: boolean\n aeExposureCompensation?: number\n aeTargetFpsRange?: PhotoFpsRange\n noiseReductionMode?: number\n edgeMode?: number\n afMode?: number\n zsl?: boolean\n}\n\nexport type PhotoMeteredPreview = {\n exposureTimeNs?: number\n iso?: number\n totalLightProxy?: number\n}\n\nexport type PhotoCaptureMetadata = {\n manual?: boolean\n exposureTimeNs?: number\n iso?: number\n frameDurationNs?: number\n aeMode?: number\n aeState?: number\n aeStateName?: string\n noiseReductionMode?: number\n edgeMode?: number\n zsl?: boolean\n sensorTimestampNs?: number\n totalLightProxy?: number\n mfnrLikely?: boolean\n mfnrApplied?: boolean\n width?: number\n height?: number\n noiseReductionWarning?: \"not_implemented\" | string\n ispDigitalGainWarning?: \"not_implemented\" | string\n ispAnalogGainWarning?: \"not_implemented\" | string\n [key: string]: unknown\n}\n\nexport type PhotoStatusEvent = {\n type: \"photo_status\"\n requestId: string\n status: PhotoStatusState | string\n timestamp: number\n resolvedConfig?: PhotoResolvedConfig\n requestedCaptureConfig?: PhotoRequestedCaptureConfig\n meteredPreview?: PhotoMeteredPreview\n captureMetadata?: PhotoCaptureMetadata\n errorCode?: string\n errorMessage?: string\n}\n\nexport type CameraStatusEvent = {\n type: \"camera_status\"\n requestId: string\n state: \"warming\" | \"ready\" | \"stopped\" | \"error\" | string\n timestamp: number\n errorCode?: string\n errorMessage?: string\n}\n\nexport type VideoRecordingStatusEvent = {\n type: \"video_recording_status\"\n requestId?: string\n success: boolean\n status: VideoRecordingStatusState\n details?: string | null\n timestamp: number\n data?: {\n recording?: boolean\n duration_ms?: number\n duration_formatted?: string\n [key: string]: unknown\n }\n}\n\nexport type VideoRecordingStatusState =\n | \"recording_started\"\n | \"recording_status\"\n | \"already_recording\"\n | \"recording_stopped\"\n | \"not_recording\"\n | \"request_id_mismatch\"\n | \"service_unavailable\"\n | \"json_error\"\n | \"battery_low\"\n | \"camera_busy\"\n | \"storage_unavailable\"\n | \"integrity_failed\"\n | \"error\"\n\nexport type VideoRecordingStartedStatusEvent = Omit<VideoRecordingStatusEvent, \"success\" | \"status\"> & {\n success: true\n status: \"recording_started\"\n}\n\nexport type VideoRecordingStoppedStatusEvent = Omit<VideoRecordingStatusEvent, \"success\" | \"status\"> & {\n success: true\n status: \"recording_stopped\"\n}\n\nexport type VideoRecordingSuccessStatusEvent = VideoRecordingStartedStatusEvent | VideoRecordingStoppedStatusEvent\n\nexport type MediaUploadSuccessEvent = {\n type: \"media_success\"\n requestId: string\n mediaUrl: string\n mediaType: number\n timestamp: number\n}\n\nexport type MediaUploadErrorEvent = {\n type: \"media_error\"\n requestId: string\n errorMessage: string\n mediaType: number\n timestamp: number\n}\n\nexport type MediaUploadEvent = MediaUploadSuccessEvent | MediaUploadErrorEvent\n\nexport type GalleryStatusEvent = {\n type: \"gallery_status\"\n photos: number\n videos: number\n total: number\n totalSize?: number\n hasContent: boolean\n cameraBusy: boolean\n cameraBusyReason?: \"video\" | \"stream\" | (string & {})\n}\n\nexport type CompatibleGlassesSearchStopEvent = {\n type: \"compatible_glasses_search_stop\"\n deviceModel: DeviceModel\n}\n\nexport type HeartbeatSentEvent = {\n type: \"heartbeat_sent\"\n heartbeat_sent: {\n timestamp: number\n }\n}\n\nexport type HeartbeatReceivedEvent = {\n type: \"heartbeat_received\"\n heartbeat_received: {\n timestamp: number\n }\n}\n\nexport type SwipeVolumeStatusEvent = {\n type: \"swipe_volume_status\"\n enabled: boolean\n timestamp: number\n}\n\nexport type SwitchStatusEvent = {\n type: \"switch_status\"\n switchType?: number\n switchValue?: number\n timestamp: number\n}\n\nexport type RgbLedControlResponseEvent =\n | {\n type: \"rgb_led_control_response\"\n state: \"success\"\n requestId: string\n }\n | {\n type: \"rgb_led_control_response\"\n state: \"error\"\n requestId: string\n errorCode: string\n }\n\nexport type RgbLedControlSuccessResponseEvent = Extract<RgbLedControlResponseEvent, {state: \"success\"}>\n\nexport type SettingsAckStatus = \"applied\" | \"ready\" | \"error\" | \"failed\" | \"failure\" | \"rejected\"\n\nexport type SettingsAckSetting =\n | \"gallery_mode\"\n | \"button_photo\"\n | \"button_video_recording\"\n | \"button_max_recording_time\"\n | \"camera_fov\"\n | \"camera_fov_override\"\n | \"camera_tuning\"\n\nexport type SettingsAckEvent = {\n type: \"settings_ack\"\n requestId: string\n setting: SettingsAckSetting\n status: SettingsAckStatus\n timestamp: number\n fov?: number\n roiPosition?: CameraRoiPositionValue\n hardwareApplied?: boolean\n leaseId?: string\n active?: boolean\n size?: ButtonPhotoSize | string\n width?: number\n height?: number\n fps?: number\n enabled?: boolean\n minutes?: number\n /** ANR enabled flag; present when setting === \"camera_tuning\" */\n anr?: boolean\n /** Stock-gain flag; present when setting === \"camera_tuning\" */\n gain?: boolean\n errorCode?: string\n errorMessage?: string\n}\n\nexport type SettingsAckSuccessStatus = Exclude<SettingsAckStatus, \"error\" | \"failed\" | \"failure\" | \"rejected\">\n\nexport type SettingsAckSuccessEvent = Omit<SettingsAckEvent, \"status\"> & {\n status: SettingsAckSuccessStatus\n}\n\nexport type RgbLedAction = \"on\" | \"off\"\nexport type RgbLedColor = \"red\" | \"green\" | \"blue\" | \"orange\" | \"white\"\nexport type PhotoSize = \"low\" | \"medium\" | \"high\" | \"max\"\nexport type PhotoMode = \"photo\" | \"text\"\nexport type PhotoTransferMethod = \"auto\" | \"direct\" | \"ble\"\nexport type ButtonPhotoSize = \"low\" | \"medium\" | \"high\" | \"max\"\n\n/**\n * @deprecated Sticky action-button photo presets via {@link BluetoothSdkPublicModule.setPhotoCaptureDefaults}\n * are deprecated. Prefer per-request {@link BluetoothSdkPublicModule.requestPhoto} options\n * (e.g. `mode: \"text\"` for text sensor size/crop, or explicit `aeExposureDivisor`) instead of\n * persisting button-photo tuning on the glasses.\n */\nexport type PhotoCaptureDefaults = {\n size?: PhotoSize\n /** ZSL preview buffering for physical camera-button photos. */\n zsl?: boolean\n /** MFNR still capture for physical camera-button photos. */\n mfnr?: boolean\n noiseReduction?: boolean\n edgeEnhancement?: boolean\n ispDigitalGain?: number\n ispAnalogGain?: string\n aeExposureDivisor?: number\n isoCap?: number\n compress?: PhotoCompression\n sound?: boolean\n /** When true, clears stored NR/edge/ISP presets on the glasses before applying other fields. */\n resetCaptureTuning?: boolean\n}\nexport type PhotoCompression = \"none\" | \"medium\" | \"heavy\"\n\nexport type VideoRecordingDefaults = {\n width: number\n height: number\n fps: number\n}\n\n/**\n * Optional per-recording video settings for {@link startVideoRecording}. When\n * omitted, the glasses fall back to their saved video recording defaults. Any\n * field left undefined is omitted from the BLE command (glasses default applies).\n */\nexport interface VideoRecordingSettings {\n width?: number\n height?: number\n fps?: number\n /**\n * Optional auto-stop timer in minutes, sent on `start_video_recording`.\n * `0` (the default) means record until stopped or interrupted\n * (battery/storage/thermal/error).\n */\n maxRecordingTimeMinutes?: number\n}\nexport const DeviceModels = {\n Simulated: \"Simulated Glasses\",\n G1: \"Even Realities G1\",\n G2: \"Even Realities G2\",\n MentraLive: \"Mentra Live\",\n MentraNex: \"Mentra Display\",\n Mach1: \"Mentra Mach1\",\n Z100: \"Vuzix Z100\",\n Frame: \"Brilliant Frame\",\n Nimo: \"NIMO\",\n Ar99: \"AR99\",\n R1: \"Even Realities R1\",\n} as const\n\nexport type DeviceModel = (typeof DeviceModels)[keyof typeof DeviceModels]\nexport type ObservableStoreCategory = \"glasses\" | \"bluetooth\" | \"core\"\n\nexport type DashboardMenuItem = {\n title: string\n packageName: string\n values?: Record<string, unknown>\n}\n\nexport const CAMERA_FOV_MIN = 62\nexport const CAMERA_FOV_MAX = 118\nexport const CAMERA_FOV_DEFAULT = CAMERA_FOV_MAX\n\nexport type CameraRoiPosition = \"center\" | \"bottom\" | \"top\"\nexport type CameraRoiPositionValue = 0 | 1 | 2\nexport type CameraFovPreset = \"narrow\" | \"standard\" | \"wide\"\n\nexport type CameraFovRequest =\n | {\n fov: number\n roiPosition?: CameraRoiPosition\n }\n | {\n preset: CameraFovPreset\n }\n\nexport type CameraFovResult = {\n requestId: string\n fov: number\n roiPosition: CameraRoiPosition\n timestamp: number\n}\n\nexport type CameraFovOverrideRequest = CameraFovRequest & {\n /** Phone-owned lease used to make delayed releases safe. */\n leaseId: string\n /** Safety TTL; refresh the same lease/configuration to extend without a HAL restart. */\n ttlMs?: number\n}\n\nexport type CameraFovSetting = {\n fov: number\n roiPosition: CameraRoiPositionValue\n}\n\ntype NativeCameraFovSetting = {\n fov: number\n roi_position: CameraRoiPositionValue\n}\n\nexport type MicPreference = \"auto\" | \"phone\" | \"glasses\" | \"bluetooth\"\nexport type MicMode = \"phone\" | \"glasses\" | \"bluetoothClassic\" | \"bluetooth\"\n\nexport type PhotoRequestParams = {\n requestId?: string\n appId?: string\n size: PhotoSize\n mode?: PhotoMode\n /** `direct` disables BLE fallback; `ble` skips direct upload and forces phone-relayed transfer. */\n transferMethod?: PhotoTransferMethod\n webhookUrl: string | null\n authToken: string | null\n compress: PhotoCompression\n save?: boolean\n sound: boolean\n exposureTimeNs?: number | null\n /** Sensor ISO for this capture only. Only used when exposureTimeNs enables manual exposure. */\n iso?: number | null\n /** After AE convergence, divide metered exposure by this factor (scan mode). */\n aeExposureDivisor?: number\n /** Cap ISO after AE metering (scan mode). */\n isoCap?: number\n /** Requested on wire; glasses may log not_implemented. */\n noiseReduction?: boolean\n edgeEnhancement?: boolean\n /** ZSL buffering. Forced off for manual/scan stills because fixed sensor controls take priority. */\n zsl?: boolean\n /** MFNR still capture. Forced off for manual/scan stills because fixed sensor controls take priority. */\n mfnr?: boolean\n ispDigitalGain?: number\n ispAnalogGain?: string\n}\n\nexport type WarmUpCameraParams = {\n /** Supply this when the owner needs to call stopCameraWarmUp during teardown. */\n requestId?: string\n size: PhotoSize\n mode?: PhotoMode\n exposureTimeNs?: number | null\n /** Ready-state hold; defaults to 15 seconds and is capped at 60 seconds by ASG. */\n durationMs?: number\n /** ZSL preview buffering for the warm-up session. */\n zsl?: boolean\n /** MFNR still capture for the warm-up session. */\n mfnr?: boolean\n}\n\nexport type StreamVideoConfig = {\n width?: number\n height?: number\n bitrate?: number\n fps?: number\n}\n\nexport type StreamAudioConfig = {\n bitrate?: number\n sampleRate?: number\n echoCancellation?: boolean\n noiseSuppression?: boolean\n}\n\nexport type StreamStartRequest = {\n type?: \"start_stream\"\n streamUrl: string\n streamId?: string\n sound?: boolean\n video?: StreamVideoConfig\n audio?: StreamAudioConfig\n}\n\nexport type StreamKeepAliveRequest = {\n type?: \"keep_stream_alive\"\n streamId: string\n ackId: string\n}\n\nexport type PairFailureEvent = {\n type: \"pair_failure\"\n error: string\n}\n\nexport type PairingInfoEvent = {\n had_previous_bond: boolean\n pairing_code?: string\n classic_bond_ready?: boolean\n secure_pairing_capable?: boolean\n protocol_version?: number\n}\n\nexport type EnteringPairingModeEvent = {\n window_ms: number\n reason?: string\n}\n\nexport type OwnerReplacedEvent = {\n reason: string\n}\n\nexport type AudioPairingNeededEvent = {\n type: \"audio_pairing_needed\"\n deviceName: string\n}\n\nexport type AudioConnectedEvent = {\n type: \"audio_connected\"\n deviceName: string\n}\n\nexport type AudioDisconnectedEvent = {\n type: \"audio_disconnected\"\n}\n\nexport type SaveSettingEvent = {\n type: \"save_setting\"\n key: string\n value: any\n}\n\nexport type WsTextEvent = {\n type: \"ws_text\"\n text: string\n}\n\nexport type WsBinEvent = {\n type: \"ws_bin\"\n base64: string\n}\n\nexport type MicPcmEvent = {\n type: \"mic_pcm\"\n pcm: ArrayBuffer\n sampleRate: 16000\n bitsPerSample: 16\n channels: 1\n encoding: \"pcm_s16le\"\n voiceActivityDetectionEnabled: boolean\n}\n\nexport type MicLc3Event = {\n type: \"mic_lc3\"\n lc3: ArrayBuffer\n sampleRate: 16000\n channels: 1\n encoding: \"lc3\"\n frameDurationMs: 10\n frameSizeBytes: number\n bitrate: number\n packetizedFromGlasses: boolean\n voiceActivityDetectionEnabled: boolean\n}\n\n/** Native glasses-microphone diagnostics emitted when the SDK detects a transport or decode issue. */\nexport type MicHealthEvent = {\n type: \"mic_health\"\n reason: \"sequence_gap\" | \"decode_failure\"\n sequenceGapEvents: number\n decodeFailures: number\n lastLc3ReceivedAt?: number\n lastPcmProducedAt?: number\n timestamp: number\n}\n\nexport type StreamStatusLifecycleState = \"initializing\" | \"streaming\" | \"stopping\" | \"stopped\"\nexport type StreamStatusReconnectState = \"reconnecting\" | \"reconnected\" | \"reconnect_failed\"\nexport type StreamStatusState = StreamStatusLifecycleState | StreamStatusReconnectState | \"error\"\n\n/** Effective stream settings reported by the glasses after defaults and clamps. */\nexport type StreamResolvedConfig = {\n transport?: \"rtmp\" | \"srt\" | \"whip\"\n video?: {\n /** Encoded output width sent to the stream endpoint. */\n width: number\n /** Encoded output height sent to the stream endpoint. */\n height: number\n /** Native camera buffer width selected before crop/downscale. */\n captureWidth?: number\n /** Native camera buffer height selected before crop/downscale. */\n captureHeight?: number\n /** Encoded video bitrate in bits per second. */\n bitrate: number\n /** Resolved capture/encode frame rate. */\n fps: number\n }\n audio?: {\n /** Encoded audio bitrate in bits per second. */\n bitrate?: number\n /** Audio sample rate in Hz. */\n sampleRate?: number\n echoCancellation?: boolean\n noiseSuppression?: boolean\n }\n}\n\n/** Live encoder and device telemetry emitted periodically by supported glasses firmware. */\nexport type StreamLiveStats = {\n /** Current encoded video bitrate in bits per second. */\n bitrate?: number\n /** Current encode frame rate. */\n fps?: number\n droppedFrames?: number\n /** Seconds since the stream started. */\n duration?: number\n /** Device temperature in 闂佺娅i悡? if the hardware reports it. */\n temperatureC?: number\n}\n\ntype StreamStatusCommon = {\n type: \"stream_status\"\n streamId?: string\n timestamp?: number\n resolvedConfig?: StreamResolvedConfig\n stats?: StreamLiveStats\n}\n\nexport type StreamStatusEvent =\n | (StreamStatusCommon & {\n kind: \"lifecycle\"\n status: StreamStatusLifecycleState\n })\n | (StreamStatusCommon & {\n kind: \"reconnect\"\n status: \"reconnecting\"\n attempt: number\n maxAttempts: number\n reason: string\n })\n | (StreamStatusCommon & {\n kind: \"reconnect\"\n status: \"reconnected\"\n attempt: number\n })\n | (StreamStatusCommon & {\n kind: \"reconnect\"\n status: \"reconnect_failed\"\n maxAttempts: number\n })\n | (StreamStatusCommon & {\n kind: \"error\"\n status: \"error\"\n errorDetails: string\n })\n | (StreamStatusCommon & {\n kind: \"snapshot\"\n status: \"streaming\" | \"reconnecting\" | \"stopped\"\n streaming: boolean\n reconnecting: boolean\n attempt?: number\n })\n\nexport type KeepAliveAckEvent = {\n type: \"keep_alive_ack\"\n streamId: string\n ackId: string\n timestamp?: number\n}\n\nexport type MtkUpdateCompleteEvent = {\n type: \"mtk_update_complete\"\n message: string\n timestamp: number\n}\n\n/**\n * The glasses process restarted while the BES kept the BLE link alive (its `sid`\n * changed, or first appeared after an update from a pre-sid build). There is no\n * physical disconnect for this — treat it as the logical reconnect edge.\n */\nexport type GlassesSessionChangedEvent = {\n type: \"glasses_session_changed\"\n previous_sid: string\n sid: string\n}\n\n/** @deprecated Glasses no longer emit ota_progress; use {@link OtaStatusEvent} and status-store mapping. */\nexport type OtaProgressEvent = {\n type: \"ota_progress\"\n stage?: OtaStage\n status?: OtaProgressStatus\n progress?: number\n bytes_downloaded?: number\n total_bytes?: number\n current_update?: string\n error_message?: string\n}\n\nexport type OtaStartAckEvent = {\n type: \"ota_start_ack\"\n timestamp: number\n}\nexport type OtaStatusEvent = {\n type: \"ota_status\"\n session_id: string\n total_steps: number\n current_step: number\n step_type: \"apk\" | \"mtk\" | \"bes\"\n phase: \"download\" | \"install\"\n step_percent: number\n overall_percent: number\n status: \"in_progress\" | \"step_complete\" | \"complete\" | \"failed\" | \"idle\"\n error_message?: string\n}\n\nexport type OtaQueryResult = OtaStatusEvent\n\n/** Nex BLE protobuf trace (NexEventUtils); payload matches native Map keys. */\nexport type BleCommandTraceEvent = {\n command: string\n commandText: string\n timestamp: number\n}\n\nexport type MiniappSelectedEvent = {\n type: \"miniapp_selected\"\n packageName: string\n}\n\n// Union type of all native/internal Bluetooth SDK events.\nexport type BluetoothSdkInternalEvent = Parameters<BluetoothSdkModuleEvents[keyof BluetoothSdkModuleEvents]>[0]\n\nexport type BluetoothSdkModuleEvents = {\n glasses_status: (changed: Partial<GlassesStatus>) => void\n bluetooth_status: (changed: Partial<BluetoothStatus>) => void\n log: (event: LogEvent) => void\n device_discovered: (device: Device) => void\n default_device_changed: (event: {device?: Device}) => void\n // Individual event handlers\n glasses_not_ready: (event: GlassesNotReadyEvent) => void\n button_press: (event: ButtonPressEvent) => void\n touch_event: (event: TouchEvent) => void\n accel_event: (event: AccelEvent) => void\n head_up: (event: HeadUpEvent) => void\n voice_activity_detection_status: (event: VoiceActivityDetectionStatusEvent) => void\n speaking_status: (event: SpeakingStatusEvent) => void\n battery_status: (event: BatteryStatusEvent) => void\n local_transcription: (event: LocalTranscriptionEvent) => void\n phone_notification: (event: PhoneNotificationEvent) => void\n phone_notification_dismissed: (event: PhoneNotificationDismissedEvent) => void\n wifi_status_change: (event: WifiStatusChangeEvent) => void\n wifi_scan_result: (event: WifiScanResultEvent) => void\n hotspot_status_change: (event: HotspotStatusChangeEvent) => void\n hotspot_error: (event: HotspotErrorEvent) => void\n photo_response: (event: PhotoResponseEvent) => void\n photo_status: (event: PhotoStatusEvent) => void\n camera_status: (event: CameraStatusEvent) => void\n video_recording_status: (event: VideoRecordingStatusEvent) => void\n media_success: (event: MediaUploadSuccessEvent) => void\n media_error: (event: MediaUploadErrorEvent) => void\n gallery_status: (event: GalleryStatusEvent) => void\n compatible_glasses_search_stop: (event: CompatibleGlassesSearchStopEvent) => void\n heartbeat_sent: (event: HeartbeatSentEvent) => void\n heartbeat_received: (event: HeartbeatReceivedEvent) => void\n swipe_volume_status: (event: SwipeVolumeStatusEvent) => void\n switch_status: (event: SwitchStatusEvent) => void\n rgb_led_control_response: (event: RgbLedControlResponseEvent) => void\n settings_ack: (event: SettingsAckEvent) => void\n pair_failure: (event: PairFailureEvent) => void\n pairing_info: (event: PairingInfoEvent) => void\n entering_pairing_mode: (event: EnteringPairingModeEvent) => void\n owner_replaced: (event: OwnerReplacedEvent) => void\n audio_pairing_needed: (event: AudioPairingNeededEvent) => void\n audio_connected: (event: AudioConnectedEvent) => void\n audio_disconnected: (event: AudioDisconnectedEvent) => void\n save_setting: (event: SaveSettingEvent) => void\n ws_text: (event: WsTextEvent) => void\n ws_bin: (event: WsBinEvent) => void\n mic_pcm: (event: MicPcmEvent) => void\n mic_lc3: (event: MicLc3Event) => void\n mic_health: (event: MicHealthEvent) => void\n stream_status: (event: StreamStatusEvent) => void\n keep_alive_ack: (event: KeepAliveAckEvent) => void\n mtk_update_complete: (event: MtkUpdateCompleteEvent) => void\n glasses_session_changed: (event: GlassesSessionChangedEvent) => void\n ota_start_ack: (event: OtaStartAckEvent) => void\n ota_status: (event: OtaStatusEvent) => void\n ar99_ota_status: (event: Ar99OtaStatusEvent) => void\n version_info: (event: VersionInfoEvent) => void\n send_command_to_ble: (event: BleCommandTraceEvent) => void\n receive_command_from_ble: (event: BleCommandTraceEvent) => void\n miniapp_selected: (event: MiniappSelectedEvent) => void\n extraction_progress: (event: ExtractionProgressEvent) => void\n}\n\nexport interface ExtractionProgressEvent {\n percentage: number\n bytesRead: number\n totalBytes: number\n}\n\nexport interface Ar99OtaStatusEvent {\n type: \"ar99_ota_status\"\n phase: string\n progress: number\n offset: number\n total: number\n errorMessage?: string\n error_message?: string\n}\n\nexport interface PhoneNotificationEvent {\n notificationId: string\n app: string\n title: string\n content: string\n priority: string\n timestamp: number\n packageName: string\n}\n\nexport interface PhoneNotificationDismissedEvent {\n notificationId: string\n notificationKey: string\n packageName: string\n timestamp: number\n}\n\nexport type PublicGlassesStatus = Omit<\n GlassesStatus,\n \"otaUpdateAvailable\" | \"otaProgress\" | \"otaInProgress\" | \"otaVersionUrl\"\n>\n\nexport type PublicBluetoothStatus = Pick<\n BluetoothStatus,\n | \"searching\"\n | \"searchingController\"\n | \"systemMicUnavailable\"\n | \"micRanking\"\n | \"currentMic\"\n | \"searchResults\"\n | \"wifiScanResults\"\n | \"lastLog\"\n | \"otherBtConnected\"\n | \"galleryModeEnabled\"\n>\n\nexport type BluetoothSdkEventMap = {\n log: LogEvent\n device_discovered: Device\n default_device_changed: {device?: Device}\n glasses_not_ready: GlassesNotReadyEvent\n button_press: ButtonPressEvent\n touch_event: TouchEvent\n accel_event: AccelEvent\n head_up: HeadUpEvent\n voice_activity_detection_status: VoiceActivityDetectionStatusEvent\n speaking_status: SpeakingStatusEvent\n battery_status: BatteryStatusEvent\n local_transcription: LocalTranscriptionEvent\n wifi_status_change: WifiStatusChangeEvent\n wifi_scan_result: WifiScanResultEvent\n hotspot_status_change: HotspotStatusChangeEvent\n hotspot_error: HotspotErrorEvent\n photo_response: PhotoResponseEvent\n photo_status: PhotoStatusEvent\n camera_status: CameraStatusEvent\n video_recording_status: VideoRecordingStatusEvent\n media_success: MediaUploadSuccessEvent\n media_error: MediaUploadErrorEvent\n gallery_status: GalleryStatusEvent\n compatible_glasses_search_stop: CompatibleGlassesSearchStopEvent\n swipe_volume_status: SwipeVolumeStatusEvent\n switch_status: SwitchStatusEvent\n rgb_led_control_response: RgbLedControlResponseEvent\n settings_ack: SettingsAckEvent\n pair_failure: PairFailureEvent\n pairing_info: PairingInfoEvent\n entering_pairing_mode: EnteringPairingModeEvent\n owner_replaced: OwnerReplacedEvent\n audio_pairing_needed: AudioPairingNeededEvent\n audio_connected: AudioConnectedEvent\n audio_disconnected: AudioDisconnectedEvent\n mic_pcm: MicPcmEvent\n mic_lc3: MicLc3Event\n mic_health: MicHealthEvent\n stream_status: StreamStatusEvent\n /** Mentra Live MTK updater completed and the glasses are about to restart. */\n mtk_update_complete: MtkUpdateCompleteEvent\n /** The ASG process restarted while the BES kept the BLE connection alive. */\n glasses_session_changed: GlassesSessionChangedEvent\n ota_start_ack: OtaStartAckEvent\n ota_status: OtaStatusEvent\n ar99_ota_status: Ar99OtaStatusEvent\n version_info: VersionInfoEvent\n extraction_progress: ExtractionProgressEvent\n}\n\nexport type BluetoothSdkEventName = keyof BluetoothSdkEventMap\n\nexport type BluetoothSdkEventListener<EventName extends BluetoothSdkEventName> = (\n event: BluetoothSdkEventMap[EventName],\n) => void\n\nexport type BluetoothSdkSubscription = {\n remove(): void\n}\n\nexport type BluetoothSdkEvent = BluetoothSdkEventMap[BluetoothSdkEventName]\n\nexport interface BluetoothSdkPublicModule {\n addListener<EventName extends BluetoothSdkEventName>(\n eventName: EventName,\n listener: BluetoothSdkEventListener<EventName>,\n ): BluetoothSdkSubscription\n\n /** Read an immutable snapshot of the current glasses state. */\n getGlassesStatus(): Promise<PublicGlassesStatus>\n /** Read an immutable snapshot of the phone Bluetooth adapter state. */\n getBluetoothStatus(): Promise<PublicBluetoothStatus>\n /** Observe immutable glasses-state patches. Returns an unsubscribe function. */\n subscribeGlassesStatus(listener: (changed: Partial<PublicGlassesStatus>) => void): () => void\n /** Observe immutable Bluetooth-state patches. Returns an unsubscribe function. */\n subscribeBluetoothStatus(listener: (changed: Partial<PublicBluetoothStatus>) => void): () => void\n\n getDefaultDevice(): Promise<Device | null>\n setDefaultDevice(device: Device | null): Promise<void>\n clearDefaultDevice(): Promise<void>\n\n startScan(model: DeviceModel): Promise<void>\n stopScan(): Promise<void>\n scan(options: ScanOptions): Promise<Device[]>\n scan(model: DeviceModel, options?: ScanModelOptions): Promise<Device[]>\n connect(device: Device, options?: ConnectOptions): Promise<void>\n connectDefault(options?: ConnectOptions): Promise<void>\n cancelConnectionAttempt(): Promise<void>\n disconnect(): Promise<void>\n forget(): Promise<void>\n\n displayText(text: string, x?: number, y?: number, size?: number): Promise<void>\n clearDisplay(): Promise<void>\n showDashboard(): Promise<void>\n setDashboardPosition(height: number, depth: number): Promise<void>\n setHeadUpAngle(angleDegrees: number): Promise<void>\n setImuEnabled(enabled: boolean): Promise<void>\n setScreenDisabled(disabled: boolean): Promise<void>\n /** Keep legacy Mentra Live OTA sessions awake. Modern sessions normally do not require this. */\n ping(): Promise<void>\n\n requestWifiScan(): Promise<WifiSearchResult[]>\n sendWifiCredentials(ssid: string, password: string): Promise<WifiStatusChangeEvent>\n forgetWifiNetwork(ssid: string): Promise<WifiStatusChangeEvent>\n setHotspotState(enabled: boolean): Promise<HotspotStatusChangeEvent>\n /** Set the glasses clock from the phone after an OTA clock-skew failure. */\n setSystemTime(timestampMs: number): Promise<void>\n /** Enable or disable Wi-Fi ADB on Mentra Live (no-op on other devices). */\n setWifiAdbState(enabled: boolean): Promise<void>\n\n setGalleryModeEnabled(enabled: boolean): Promise<SettingsAckSuccessEvent>\n setVoiceActivityDetectionEnabled(enabled: boolean): Promise<void>\n setLoudnessGateEnabled(enabled: boolean): Promise<void>\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop, or explicit per-shot\n * fields). Still functional until removed in a future release.\n */\n setPhotoCaptureDefaults(settings: PhotoCaptureDefaults): Promise<SettingsAckSuccessEvent>\n setVideoRecordingDefaults(settings: VideoRecordingDefaults): Promise<SettingsAckSuccessEvent>\n setMaxVideoRecordingDuration(minutes: number): Promise<SettingsAckSuccessEvent>\n setCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n /** One-way FOV command for legacy ASG clients that do not send settings acknowledgements. */\n setLegacyCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n setCameraFovOverride(request: CameraFovOverrideRequest): Promise<CameraFovResult>\n releaseCameraFovOverride(leaseId: string): Promise<SettingsAckSuccessEvent>\n /**\n * Configure camera HAL tuning (ANR / gain) on Mentra Live glasses.\n *\n * The phone sends a {@code camera_tuning_config} BLE command; the glasses relay it as a\n * {@code camconfig} broadcast to the camera HAL so parameters take effect without a reboot.\n *\n * **Scan-mode convention**: call with `(false, false)` when activating scan mode to disable ANR\n * and pixsmart gain for sharper text/barcode captures. Call with `(true, true)` to restore\n * defaults when exiting scan mode.\n *\n * @param anrOn `true` = ANR enabled (default), `false` = ANR disabled\n * @param gainOn `true` = stock gain params (default), `false` = pixsmart gain-off params\n */\n setCameraTuningConfig(anrOn: boolean, gainOn: boolean): Promise<SettingsAckSuccessEvent>\n queryGalleryStatus(): Promise<GalleryStatusEvent>\n requestPhoto(params: PhotoRequestParams): Promise<PhotoSuccessResponseEvent>\n warmUpCamera(params: WarmUpCameraParams): Promise<CameraStatusEvent>\n /** Release one request-owned warm-up. Opening requests reject with camera_warm_up_cancelled. */\n stopCameraWarmUp(requestId: string): Promise<void>\n startVideoRecording(\n requestId: string,\n save: boolean,\n sound: boolean,\n settings?: VideoRecordingSettings,\n ): Promise<VideoRecordingStartedStatusEvent>\n /**\n * Stop the active recording. When {@link webhookUrl} is provided, the glasses\n * upload the recorded video to it (multipart) using {@link authToken}. These\n * are supplied at stop time (not start) so the token is fresh when the upload\n * runs 闂?a recording can last arbitrarily long. An empty/omitted webhook keeps\n * the video on device (no upload).\n */\n stopVideoRecording(\n requestId: string,\n webhookUrl?: string,\n authToken?: string,\n ): Promise<VideoRecordingStoppedStatusEvent>\n /** Query the glasses for the current recording state and elapsed duration. */\n queryVideoRecordingStatus(requestId: string): Promise<VideoRecordingStatusEvent>\n\n startStream(params: StreamStartRequest): Promise<StreamStatusEvent>\n stopStream(): Promise<StreamStatusEvent>\n\n setMicState(enabled: boolean, useGlassesMic?: boolean, sendTranscript?: boolean, sendLc3Data?: boolean): Promise<void>\n setPreferredMic(preferredMic: MicPreference): Promise<void>\n setOwnAppAudioPlaying(playing: boolean): Promise<void>\n getGlassesMediaVolume(): Promise<GlassesMediaVolumeGetResult>\n setGlassesMediaVolume(level: number): Promise<GlassesMediaVolumeSetResult>\n\n rgbLedControl(\n requestId: string,\n packageName: string | null,\n action: RgbLedAction,\n color: RgbLedColor | null,\n onDurationMs: number,\n offDurationMs: number,\n count: number,\n ): Promise<RgbLedControlSuccessResponseEvent>\n\n requestVersionInfo(): Promise<VersionInfoResult>\n /**\n * Select the OTA manifest used by subsequent update checks and installs.\n * The URL may point at Mentra's hosted manifest or any customer-controlled HTTP(S) server.\n */\n setOtaVersionUrl(otaVersionUrl: string): void\n /** Return the configured or release-embedded OTA manifest URL. Rejects when a source build is unconfigured. */\n getOtaVersionUrl(): string\n /** Fetch the configured OTA manifest and return whether any ASG/BES/MTK update is available. */\n checkForOtaUpdate(): Promise<boolean>\n /** Return bundled release changelogs crossed between two coordinated product versions, newest first. */\n getReleaseChangelogs(fromVersion?: string | null, toVersion?: string | null): ReleaseChangelog[]\n /** Start OTA from the configured or explicitly supplied manifest URL. */\n startOtaUpdate(otaVersionUrl?: string | null): Promise<OtaStartAckEvent>\n /** Query the active OTA session and return the correlated status response. */\n queryOtaStatus(): Promise<OtaQueryResult>\n startAr99OtaFromFile(path: string): Promise<boolean>\n cancelAr99Ota(): Promise<void>\n sendAr99FactoryReset(): Promise<void>\n buildAr99OtaSignature(\n secret: string,\n appName: string,\n currentVersion: string,\n serialNumber: string,\n nonce: string,\n ): string\n\n // // stt commands (MOVE TO CRUST)\n // setSttModelDetails(path: string, languageCode: string): Promise<void>\n // getSttModelPath(): Promise<string>\n // checkSttModelAvailable(): Promise<boolean>\n // validateSttModel(path: string): Promise<boolean>\n // extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>\n\n // // tts commands (MOVE TO CRUST)\n // setTtsModelDetails(path: string, languageCode: string): Promise<void>\n // getTtsModelPath(): Promise<string>\n // getTtsModelLanguage(): Promise<string>\n // checkTtsModelAvailable(): Promise<boolean>\n // validateTtsModel(path: string): Promise<boolean>\n // generateTtsAudio(text: string, path: string, outputPath: string, speakerId: number, speed: number): Promise<boolean>\n\n // STT Commands (TODO: MOVE TO CRUST)\n setSttModelDetails(path: string, languageCode: string): Promise<void>\n getSttModelPath(): Promise<string>\n checkSttModelAvailable(): Promise<boolean>\n validateSttModel(path: string): Promise<boolean>\n extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>\n restartTranscriber(): Promise<void>\n\n // TTS Commands (TODO: MOVE TO CRUST)\n setTtsModelDetails(path: string, languageCode: string): Promise<void>\n getTtsModelPath(): Promise<string>\n getTtsModelLanguage(): Promise<string>\n checkTtsModelAvailable(): Promise<boolean>\n validateTtsModel(path: string): Promise<boolean>\n generateTtsAudio(\n text: string,\n modelPath: string,\n outputPath: string,\n speakerId: number,\n speed: number,\n ): Promise<boolean>\n}\n\n// OTA update status types\nexport type OtaStage = \"download\" | \"install\"\nexport type OtaProgressStatus = \"STARTED\" | \"PROGRESS\" | \"FINISHED\" | \"FAILED\"\n\nexport interface OtaStatus {\n sessionId: string\n totalSteps: number\n currentStep: number\n stepType: \"apk\" | \"mtk\" | \"bes\"\n phase: \"download\" | \"install\"\n stepPercent: number\n overallPercent: number\n status: \"in_progress\" | \"step_complete\" | \"complete\" | \"failed\" | \"idle\"\n error?: string\n}\n\nexport interface OtaUpdateInfo {\n available: boolean\n versionCode: number\n versionName: string\n updates: string[] // [\"apk\", \"mtk\", \"bes\"]\n totalSize: number\n cacheReady?: boolean\n /** Exact BES target selected from the OTA manifest, when a BES step is pending. */\n besVersion?: string\n /** True when the APK step installs an older build than the glasses currently run (exact-pin manifests only). */\n isDowngrade?: boolean\n}\n\nexport interface ReleaseChangelog {\n /** Base production version, for example `3.1.0`. */\n version: string\n /** Markdown body authored in `/changelogs/<version>.md`. */\n markdown: string\n}\n\nexport interface OtaProgress {\n stage: OtaStage\n status: OtaProgressStatus\n progress: number\n bytesDownloaded: number\n totalBytes: number\n currentUpdate: string\n errorMessage?: string\n}\n\nexport interface GlassesStatus {\n // state:\n connection: GlassesConnectionStatus\n micEnabled: boolean\n voiceActivityDetectionEnabled: boolean\n bluetoothClassicConnected: boolean\n signalStrength: number\n /** Milliseconds since epoch when signalStrength was last refreshed by the phone BLE stack. */\n signalStrengthUpdatedAt: number\n // device info\n deviceModel: string\n androidVersion: string\n firmwareVersion: string\n besFirmwareVersion: string\n mtkFirmwareVersion: string\n bluetoothMacAddress: string\n wifiMacAddress: string\n leftMacAddress: string\n rightMacAddress: string\n buildNumber: string\n /** Glasses System.currentTimeMillis() from last version_info (clock skew detection). */\n systemTimeMs?: number\n otaVersionUrl: string\n appVersion: string\n /** Phone-served hotspot OTA protocol version; 0 means unsupported/legacy glasses. */\n hotspotOtaVersion: number\n bluetoothName: string\n serialNumber: string\n style: string\n color: string\n // wifi info\n wifi: WifiStatus\n // battery info\n batteryLevel: number\n charging: boolean\n caseBatteryLevel: number\n caseCharging: boolean\n caseOpen: boolean\n caseRemoved: boolean\n // hotspot info\n hotspot: HotspotStatus\n // OTA update info\n otaUpdateAvailable: OtaUpdateInfo | null\n otaProgress: OtaProgress | null\n otaInProgress: boolean\n // ring info\n controllerConnected: boolean\n controllerFullyBooted: boolean\n controllerMacAddress: string\n controllerBatteryLevel: number\n controllerSignalStrength: number\n}\n\nexport interface CoreDashboardMenuItem {\n name: string\n packageName: string\n running: boolean\n}\n\nexport interface CalendarEvent {\n title: string\n location?: string\n time: string\n endDate: number\n}\n\nexport interface CoreSettings {\n menu_apps: CoreDashboardMenuItem[]\n calendar_events: CalendarEvent[]\n}\n\nexport interface Device {\n /**\n * Stable app-facing key for this scan result, within the limits of the\n * platform identifier available to the SDK. Do not parse this value; use the\n * typed model, name, address, projectName, and rssi fields instead.\n */\n id: string\n model: DeviceModel\n name: string\n /** Platform address/identifier when available: Android Bluetooth address, iOS CoreBluetooth identifier. */\n address?: string\n /** Optional AR99 project discriminator. Supported value: AR99. */\n projectName?: string\n /**\n * Optional scan signal strength. It may be undefined at first discovery and\n * appear in a later scan update when the platform reports RSSI metadata.\n */\n rssi?: number\n /** Mentra Live: unit is currently in pairing mode (adv flag). */\n pairingMode?: boolean\n /** Mentra Live: four-character hex spoken pairing code when available. */\n pairingCode?: string\n /** Mentra Live: advertisement carries the secure-pairing capability trailer. */\n securePairingCapable?: boolean\n}\n\nexport interface ConnectOptions {\n saveAsDefault?: boolean\n cancelExistingConnectionAttempt?: boolean\n}\n\nexport type ScanResultsCallback = (devices: Device[]) => void\n\nexport interface ScanOptions {\n model: DeviceModel\n /** Defaults to 15000. */\n timeoutMs?: number\n /** Alias for `timeoutMs`, useful when mirroring native examples. */\n timeout?: number\n /** Called every time the discovered device list changes during the scan. */\n onResults?: ScanResultsCallback\n}\n\nexport type ScanModelOptions = Omit<ScanOptions, \"model\">\n\nexport interface WifiSearchResult {\n ssid: string\n requiresPassword: boolean\n signalStrength: number\n /** Frequency in MHz (from glasses scan). 5 GHz band is typically 5170闂?825. Omitted if unknown. */\n frequency?: number\n}\n\nexport interface BluetoothStatus {\n // state:\n searching: boolean\n searchingController: boolean\n default_wearable?: DeviceModel | \"\"\n pending_wearable?: DeviceModel | \"\"\n device_name?: string\n device_address?: string\n default_controller?: DeviceModel | \"\"\n pending_controller?: DeviceModel | \"\"\n controller_device_name?: string\n controller_address?: string\n systemMicUnavailable: boolean\n micRanking: MicMode[]\n currentMic: MicMode | \"\" | null\n /**\n * Nearby glasses in stable discovery order.\n * Existing entries keep their array position as details refresh; new glasses append at the end,\n * and removals should not reorder remaining entries.\n */\n searchResults: Device[]\n wifiScanResults: WifiSearchResult[]\n lastLog: string[]\n otherBtConnected: boolean\n // desired settings the SDK sends to compatible connected glasses:\n galleryModeEnabled: boolean\n}\n\nexport type BluetoothSettingsUpdate = Partial<{\n auth_email: string\n core_token: string\n sensing_enabled: boolean\n power_saving_mode: boolean\n lc3_frame_size: number\n preferred_mic: MicPreference\n screen_disabled: boolean\n contextual_dashboard: boolean\n head_up_angle: number\n imu_enabled: boolean\n brightness: number\n auto_brightness: boolean\n dashboard_height: number\n dashboard_depth: number\n menu_apps: DashboardMenuItem[] | CoreDashboardMenuItem[] | Array<Record<string, unknown>> | null\n calendar_events: CalendarEvent[]\n metric_system: boolean\n twelve_hour_time: boolean\n gallery_mode: boolean\n voice_activity_detection_enabled: boolean\n loudness_gate_enabled: boolean\n button_photo_size: ButtonPhotoSize\n button_video_settings: {width: number; height: number; fps: number}\n button_video_width: number\n button_video_height: number\n button_video_fps: number\n button_max_recording_time: number\n camera_fov: NativeCameraFovSetting\n should_send_pcm: boolean\n should_send_lc3: boolean\n should_send_transcript: boolean\n offline_mode: boolean\n local_stt_fallback_active: boolean\n pending_wearable: DeviceModel | \"\"\n default_wearable: DeviceModel | \"\"\n device_name: string\n device_address: string\n default_controller: DeviceModel | \"\"\n pending_controller: DeviceModel | \"\"\n controller_device_name: string\n controller_address: string\n}>\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReleaseChangelog } from "./BluetoothSdk.types";
|
|
2
|
+
/**
|
|
3
|
+
* Return authored release notes crossed between two product versions, newest first.
|
|
4
|
+
* The target release is always included, including transitions within one base train.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getReleaseChangelogs(fromVersion?: string | null, toVersion?: string | null): ReleaseChangelog[];
|
|
7
|
+
//# sourceMappingURL=changelogs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelogs.d.ts","sourceRoot":"","sources":["../src/changelogs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAA;AAqB1D;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,gBAAgB,EAAE,CAkB/G"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { GENERATED_RELEASE_CHANGELOGS } from "./generated/changelogCatalog";
|
|
2
|
+
import { BLUETOOTH_SDK_RELEASE_METADATA } from "./generated/releaseMetadata";
|
|
3
|
+
const BASE_VERSION_PATTERN = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:[-+].*)?$/;
|
|
4
|
+
function baseVersion(version, label) {
|
|
5
|
+
const match = BASE_VERSION_PATTERN.exec(version.trim());
|
|
6
|
+
if (!match)
|
|
7
|
+
throw new Error(`${label} must be a semantic version such as 3.1.0, 3.1.0-dev.4, or 3.1.0-beta.2`);
|
|
8
|
+
return `${match[1]}.${match[2]}.${match[3]}`;
|
|
9
|
+
}
|
|
10
|
+
function compareVersions(left, right) {
|
|
11
|
+
const a = left.split(".").map(Number);
|
|
12
|
+
const b = right.split(".").map(Number);
|
|
13
|
+
for (let index = 0; index < 3; index += 1) {
|
|
14
|
+
if (a[index] !== b[index])
|
|
15
|
+
return a[index] - b[index];
|
|
16
|
+
}
|
|
17
|
+
return 0;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Return authored release notes crossed between two product versions, newest first.
|
|
21
|
+
* The target release is always included, including transitions within one base train.
|
|
22
|
+
*/
|
|
23
|
+
export function getReleaseChangelogs(fromVersion, toVersion) {
|
|
24
|
+
const fallbackTarget = BLUETOOTH_SDK_RELEASE_METADATA.familyBaseVersion ?? GENERATED_RELEASE_CHANGELOGS[0]?.version;
|
|
25
|
+
if (!fallbackTarget && !toVersion)
|
|
26
|
+
return [];
|
|
27
|
+
const target = baseVersion(toVersion ?? fallbackTarget, "toVersion");
|
|
28
|
+
if (!GENERATED_RELEASE_CHANGELOGS.some(({ version }) => version === target)) {
|
|
29
|
+
throw new Error(`No changelog is bundled for target version ${target}`);
|
|
30
|
+
}
|
|
31
|
+
if (!fromVersion) {
|
|
32
|
+
return GENERATED_RELEASE_CHANGELOGS.filter(({ version }) => version === target).map((entry) => ({ ...entry }));
|
|
33
|
+
}
|
|
34
|
+
const source = baseVersion(fromVersion, "fromVersion");
|
|
35
|
+
const direction = compareVersions(target, source);
|
|
36
|
+
return GENERATED_RELEASE_CHANGELOGS.filter(({ version }) => {
|
|
37
|
+
if (direction === 0)
|
|
38
|
+
return version === target;
|
|
39
|
+
if (direction > 0)
|
|
40
|
+
return compareVersions(version, source) > 0 && compareVersions(version, target) <= 0;
|
|
41
|
+
return compareVersions(version, source) < 0 && compareVersions(version, target) >= 0;
|
|
42
|
+
}).map((entry) => ({ ...entry }));
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=changelogs.js.map
|
|
@@ -0,0 +1 @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,GAAG,KAAK,EAAC,CAAC,CAAC,CAAA;AACjC,CAAC","sourcesContent":["import type {ReleaseChangelog} from \"./BluetoothSdk.types\"\nimport {GENERATED_RELEASE_CHANGELOGS} from \"./generated/changelogCatalog\"\nimport {BLUETOOTH_SDK_RELEASE_METADATA} from \"./generated/releaseMetadata\"\n\nconst BASE_VERSION_PATTERN = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:[-+].*)?$/\n\nfunction baseVersion(version: string, label: string): string {\n const match = BASE_VERSION_PATTERN.exec(version.trim())\n if (!match) throw new Error(`${label} must be a semantic version such as 3.1.0, 3.1.0-dev.4, or 3.1.0-beta.2`)\n return `${match[1]}.${match[2]}.${match[3]}`\n}\n\nfunction compareVersions(left: string, right: string): number {\n const a = left.split(\".\").map(Number)\n const b = right.split(\".\").map(Number)\n for (let index = 0; index < 3; index += 1) {\n if (a[index] !== b[index]) return a[index] - b[index]\n }\n return 0\n}\n\n/**\n * Return authored release notes crossed between two product versions, newest first.\n * The target release is always included, including transitions within one base train.\n */\nexport function getReleaseChangelogs(fromVersion?: string | null, toVersion?: string | null): ReleaseChangelog[] {\n const fallbackTarget = BLUETOOTH_SDK_RELEASE_METADATA.familyBaseVersion ?? GENERATED_RELEASE_CHANGELOGS[0]?.version\n if (!fallbackTarget && !toVersion) return []\n const target = baseVersion(toVersion ?? fallbackTarget, \"toVersion\")\n if (!GENERATED_RELEASE_CHANGELOGS.some(({version}) => version === target)) {\n throw new Error(`No changelog is bundled for target version ${target}`)\n }\n if (!fromVersion) {\n return GENERATED_RELEASE_CHANGELOGS.filter(({version}) => version === target).map((entry) => ({...entry}))\n }\n\n const source = baseVersion(fromVersion, \"fromVersion\")\n const direction = compareVersions(target, source)\n return GENERATED_RELEASE_CHANGELOGS.filter(({version}) => {\n if (direction === 0) return version === target\n if (direction > 0) return compareVersions(version, source) > 0 && compareVersions(version, target) <= 0\n return compareVersions(version, source) < 0 && compareVersions(version, target) >= 0\n }).map((entry) => ({...entry}))\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Generated from /changelogs. Do not edit directly. */
|
|
2
|
+
export declare const GENERATED_RELEASE_CHANGELOGS: readonly [{
|
|
3
|
+
readonly version: "3.1.0";
|
|
4
|
+
readonly markdown: "Software updates are more reliable, with clearer progress and recovery when the glasses restart.\n\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.";
|
|
5
|
+
}];
|
|
6
|
+
//# sourceMappingURL=changelogCatalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelogCatalog.d.ts","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,eAAO,MAAM,4BAA4B;;;EAOxC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Generated from /changelogs. Do not edit directly. */
|
|
2
|
+
export const GENERATED_RELEASE_CHANGELOGS = Object.freeze([
|
|
3
|
+
{
|
|
4
|
+
"version": "3.1.0",
|
|
5
|
+
"markdown": "Software updates are more reliable, with clearer progress and recovery when the glasses restart.\n\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic."
|
|
6
|
+
}
|
|
7
|
+
]);
|
|
8
|
+
//# sourceMappingURL=changelogCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelogCatalog.js","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CACzD;IACE;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,+cAA+c;KAC5d;CACO,CACT,CAAA","sourcesContent":["/** Generated from /changelogs. Do not edit directly. */\nexport const GENERATED_RELEASE_CHANGELOGS = Object.freeze(\n[\n {\n \"version\": \"3.1.0\",\n \"markdown\": \"Software updates are more reliable, with clearer progress and recovery when the glasses restart.\\n\\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\"\n }\n] as const,\n)\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const BLUETOOTH_SDK_RELEASE_METADATA = Object.freeze({
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"familyBaseVersion": "3.1.0",
|
|
4
|
-
"releaseIdentity": "3.1.0-dev.
|
|
5
|
-
"releaseSetId": "mentra-3.1.0-dev.
|
|
6
|
-
"sourceCommit": "
|
|
7
|
-
"otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-v3.1.0
|
|
8
|
-
"otaManifestSha256": "
|
|
4
|
+
"releaseIdentity": "3.1.0-dev.71",
|
|
5
|
+
"releaseSetId": "mentra-3.1.0-dev.71",
|
|
6
|
+
"sourceCommit": "314b41c83242c63409504b8ca733d74f022eb7d5",
|
|
7
|
+
"otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.1.0/mentra-live-ota-3.1.0-dev.71.json",
|
|
8
|
+
"otaManifestSha256": "71904f40a2b648de0d626d05249be71baf8faffc27ad0bcb120d61001ed7d735"
|
|
9
9
|
});
|
|
10
10
|
//# sourceMappingURL=releaseMetadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,cAAc;IACjC,cAAc,EAAE,qBAAqB;IACrC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,uHAAuH;IACzI,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface BluetoothSdkReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.1.0\",\n \"releaseIdentity\": \"3.1.0-dev.71\",\n \"releaseSetId\": \"mentra-3.1.0-dev.71\",\n \"sourceCommit\": \"314b41c83242c63409504b8ca733d74f022eb7d5\",\n \"otaManifestUrl\": \"https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.1.0/mentra-live-ota-3.1.0-dev.71.json\",\n \"otaManifestSha256\": \"71904f40a2b648de0d626d05249be71baf8faffc27ad0bcb120d61001ed7d735\"\n})\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import type { BluetoothSdkPublicModule } from "./BluetoothSdk.types";
|
|
|
2
2
|
export declare const BluetoothSdk: BluetoothSdkPublicModule;
|
|
3
3
|
export default BluetoothSdk;
|
|
4
4
|
export { CAMERA_FOV_DEFAULT, CAMERA_FOV_MAX, CAMERA_FOV_MIN, DeviceModels, isBusyGlassesConnectionStatus, isConnectedGlassesConnectionStatus, isConnectedWifiStatus, isEnabledHotspotStatus, isReadyGlassesConnectionStatus, } from "./BluetoothSdk.types";
|
|
5
|
-
export type { AccelEvent, Ar99OtaStatusEvent, AudioConnectedEvent, AudioDisconnectedEvent, AudioPairingNeededEvent, BatteryStatusEvent, BluetoothSdkEvent, BluetoothSdkEventListener, BluetoothSdkEventMap, BluetoothSdkEventName, BluetoothSdkPublicModule as BluetoothSdkModule, BluetoothSdkSubscription, ButtonPhotoSize, PhotoCaptureDefaults, ButtonPressEvent, CameraFovPreset, CameraFovRequest, CameraFovResult, CameraRoiPosition, CompatibleGlassesSearchStopEvent, ConnectOptions, ConnectedGlassesConnectionStatus, ConnectedWifiStatus, Device, DeviceModel, EnabledHotspotStatus, GalleryStatusEvent, GlassesConnectionStatus, GlassesMediaVolumeGetResult, GlassesMediaVolumeSetResult, GlassesNotReadyEvent, HeadUpEvent, HotspotErrorEvent, HotspotStatus, HotspotStatusChangeEvent, KeepAliveAckEvent, LocalTranscriptionEvent, LogEvent, MicLc3Event, MicHealthEvent, MicMode, MicPcmEvent, MicPreference, OtaStartAckEvent, OtaProgress, OtaProgressStatus, OtaStage, OtaStatus, OtaStatusEvent, OtaQueryResult, OtaUpdateInfo, PairFailureEvent, PairingInfoEvent, EnteringPairingModeEvent, OwnerReplacedEvent, PhotoCaptureMetadata, PhotoResolvedConfig, PhotoCompression, PhotoFpsRange, PhotoMeteredPreview, PhotoMode, PhotoTransferMethod, PhotoResponseEvent, PhotoRequestedCaptureConfig, PhotoRequestParams, PhotoSize, PhotoStatusEvent, PhotoStatusState, PhotoSuccessResponseEvent, RgbLedAction, RgbLedColor, RgbLedControlResponseEvent, RgbLedControlSuccessResponseEvent, ScanModelOptions, ScanOptions, ScanResultsCallback, SpeakingStatusEvent, SettingsAckEvent, SettingsAckSetting, SettingsAckSuccessEvent, SettingsAckSuccessStatus, SettingsAckStatus, StreamAudioConfig, StreamResolvedConfig, StreamStartRequest, StreamStatusEvent, StreamStatusLifecycleState, StreamStatusReconnectState, StreamStatusState, StreamVideoConfig, SwipeVolumeStatusEvent, SwitchStatusEvent, TouchEvent, VideoRecordingDefaults, VideoRecordingStartedStatusEvent, VideoRecordingStatusEvent, VideoRecordingStatusState, VideoRecordingStoppedStatusEvent, VideoRecordingSuccessStatusEvent, VersionInfoEvent, VersionInfoResult, WifiScanResultEvent, VoiceActivityDetectionStatusEvent, WifiSearchResult, WifiStatus, WifiStatusChangeEvent, } from "./BluetoothSdk.types";
|
|
5
|
+
export type { AccelEvent, Ar99OtaStatusEvent, AudioConnectedEvent, AudioDisconnectedEvent, AudioPairingNeededEvent, BatteryStatusEvent, BluetoothSdkEvent, BluetoothSdkEventListener, BluetoothSdkEventMap, BluetoothSdkEventName, BluetoothSdkPublicModule as BluetoothSdkModule, BluetoothSdkSubscription, ButtonPhotoSize, PhotoCaptureDefaults, ButtonPressEvent, CameraFovPreset, CameraFovRequest, CameraFovResult, CameraRoiPosition, CompatibleGlassesSearchStopEvent, ConnectOptions, ConnectedGlassesConnectionStatus, ConnectedWifiStatus, Device, DeviceModel, EnabledHotspotStatus, GalleryStatusEvent, GlassesConnectionStatus, GlassesMediaVolumeGetResult, GlassesMediaVolumeSetResult, GlassesNotReadyEvent, HeadUpEvent, HotspotErrorEvent, HotspotStatus, HotspotStatusChangeEvent, GlassesSessionChangedEvent, KeepAliveAckEvent, LocalTranscriptionEvent, LogEvent, MicLc3Event, MicHealthEvent, MicMode, MicPcmEvent, MicPreference, OtaStartAckEvent, OtaProgress, OtaProgressStatus, OtaStage, OtaStatus, OtaStatusEvent, OtaQueryResult, OtaUpdateInfo, ReleaseChangelog, MtkUpdateCompleteEvent, PairFailureEvent, PairingInfoEvent, EnteringPairingModeEvent, OwnerReplacedEvent, PhotoCaptureMetadata, PhotoResolvedConfig, PhotoCompression, PhotoFpsRange, PhotoMeteredPreview, PhotoMode, PublicBluetoothStatus, PublicGlassesStatus, PhotoTransferMethod, PhotoResponseEvent, PhotoRequestedCaptureConfig, PhotoRequestParams, PhotoSize, PhotoStatusEvent, PhotoStatusState, PhotoSuccessResponseEvent, RgbLedAction, RgbLedColor, RgbLedControlResponseEvent, RgbLedControlSuccessResponseEvent, ScanModelOptions, ScanOptions, ScanResultsCallback, SpeakingStatusEvent, SettingsAckEvent, SettingsAckSetting, SettingsAckSuccessEvent, SettingsAckSuccessStatus, SettingsAckStatus, StreamAudioConfig, StreamResolvedConfig, StreamStartRequest, StreamStatusEvent, StreamStatusLifecycleState, StreamStatusReconnectState, StreamStatusState, StreamVideoConfig, SwipeVolumeStatusEvent, SwitchStatusEvent, TouchEvent, VideoRecordingDefaults, VideoRecordingStartedStatusEvent, VideoRecordingStatusEvent, VideoRecordingStatusState, VideoRecordingStoppedStatusEvent, VideoRecordingSuccessStatusEvent, VersionInfoEvent, VersionInfoResult, WifiScanResultEvent, VoiceActivityDetectionStatusEvent, WifiSearchResult, WifiStatus, WifiStatusChangeEvent, } from "./BluetoothSdk.types";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,wBAAwB,EAIzB,MAAM,sBAAsB,CAAA;AA8E7B,eAAO,MAAM,YAAY,EAAE,wBA+FzB,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB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EACpB,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,sBAAsB,EACtB,gCAAgC,EAChC,yBAAyB,EACzB,yBAAyB,EACzB,gCAAgC,EAChC,gCAAgC,EAChC,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,iCAAiC,EACjC,gBAAgB,EAChB,UAAU,EACV,qBAAqB,GACtB,MAAM,sBAAsB,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import PrivateBluetoothSdkModule from "./_private/BluetoothSdkModule";
|
|
2
|
+
import { getReleaseChangelogs } from "./changelogs";
|
|
2
3
|
const PUBLIC_EVENT_NAMES = new Set([
|
|
3
4
|
"log",
|
|
4
5
|
"device_discovered",
|
|
@@ -39,6 +40,8 @@ const PUBLIC_EVENT_NAMES = new Set([
|
|
|
39
40
|
"mic_lc3",
|
|
40
41
|
"mic_health",
|
|
41
42
|
"stream_status",
|
|
43
|
+
"mtk_update_complete",
|
|
44
|
+
"glasses_session_changed",
|
|
42
45
|
"ota_start_ack",
|
|
43
46
|
"ota_status",
|
|
44
47
|
"ar99_ota_status",
|
|
@@ -54,6 +57,9 @@ const addListener = (eventName, listener) => {
|
|
|
54
57
|
const startOtaUpdate = (otaVersionUrl) => {
|
|
55
58
|
return PrivateBluetoothSdkModule.startOtaUpdate(otaVersionUrl);
|
|
56
59
|
};
|
|
60
|
+
const queryOtaStatus = () => {
|
|
61
|
+
return PrivateBluetoothSdkModule.sendOtaQueryStatus();
|
|
62
|
+
};
|
|
57
63
|
const bindPublicMethod = (name) => {
|
|
58
64
|
const method = PrivateBluetoothSdkModule[name];
|
|
59
65
|
if (typeof method === "function") {
|
|
@@ -65,6 +71,10 @@ const bindPublicMethod = (name) => {
|
|
|
65
71
|
};
|
|
66
72
|
export const BluetoothSdk = Object.freeze({
|
|
67
73
|
addListener,
|
|
74
|
+
getGlassesStatus: bindPublicMethod("getGlassesStatus"),
|
|
75
|
+
getBluetoothStatus: bindPublicMethod("getBluetoothStatus"),
|
|
76
|
+
subscribeGlassesStatus: (listener) => PrivateBluetoothSdkModule.onGlassesStatus(listener),
|
|
77
|
+
subscribeBluetoothStatus: (listener) => PrivateBluetoothSdkModule.onBluetoothStatus(listener),
|
|
68
78
|
getDefaultDevice: bindPublicMethod("getDefaultDevice"),
|
|
69
79
|
setDefaultDevice: bindPublicMethod("setDefaultDevice"),
|
|
70
80
|
clearDefaultDevice: bindPublicMethod("clearDefaultDevice"),
|
|
@@ -83,10 +93,12 @@ export const BluetoothSdk = Object.freeze({
|
|
|
83
93
|
setHeadUpAngle: bindPublicMethod("setHeadUpAngle"),
|
|
84
94
|
setImuEnabled: bindPublicMethod("setImuEnabled"),
|
|
85
95
|
setScreenDisabled: bindPublicMethod("setScreenDisabled"),
|
|
96
|
+
ping: bindPublicMethod("ping"),
|
|
86
97
|
requestWifiScan: bindPublicMethod("requestWifiScan"),
|
|
87
98
|
sendWifiCredentials: bindPublicMethod("sendWifiCredentials"),
|
|
88
99
|
forgetWifiNetwork: bindPublicMethod("forgetWifiNetwork"),
|
|
89
100
|
setHotspotState: bindPublicMethod("setHotspotState"),
|
|
101
|
+
setSystemTime: bindPublicMethod("setSystemTime"),
|
|
90
102
|
setWifiAdbState: bindPublicMethod("setWifiAdbState"),
|
|
91
103
|
setGalleryModeEnabled: bindPublicMethod("setGalleryModeEnabled"),
|
|
92
104
|
setVoiceActivityDetectionEnabled: bindPublicMethod("setVoiceActivityDetectionEnabled"),
|
|
@@ -129,7 +141,9 @@ export const BluetoothSdk = Object.freeze({
|
|
|
129
141
|
setOtaVersionUrl: bindPublicMethod("setOtaVersionUrl"),
|
|
130
142
|
getOtaVersionUrl: bindPublicMethod("getOtaVersionUrl"),
|
|
131
143
|
checkForOtaUpdate: bindPublicMethod("checkForOtaUpdate"),
|
|
144
|
+
getReleaseChangelogs,
|
|
132
145
|
startOtaUpdate,
|
|
146
|
+
queryOtaStatus,
|
|
133
147
|
startAr99OtaFromFile: bindPublicMethod("startAr99OtaFromFile"),
|
|
134
148
|
cancelAr99Ota: bindPublicMethod("cancelAr99Ota"),
|
|
135
149
|
sendAr99FactoryReset: bindPublicMethod("sendAr99FactoryReset"),
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,MAAM,+BAA+B,CAAA;AAQrE,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAwB;IACxD,KAAK;IACL,mBAAmB;IACnB,wBAAwB;IACxB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,aAAa;IACb,SAAS;IACT,iCAAiC;IACjC,iBAAiB;IACjB,gBAAgB;IAChB,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,uBAAuB;IACvB,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,gCAAgC;IAChC,qBAAqB;IACrB,eAAe;IACf,0BAA0B;IAC1B,cAAc;IACd,cAAc;IACd,cAAc;IACd,uBAAuB;IACvB,gBAAgB;IAChB,sBAAsB;IACtB,iBAAiB;IACjB,oBAAoB;IACpB,SAAS;IACT,SAAS;IACT,YAAY;IACZ,eAAe;IACf,eAAe;IACf,YAAY;IACZ,iBAAiB;IACjB,cAAc;IACd,qBAAqB;CACtB,CAAC,CAAA;AAEF,MAAM,WAAW,GAA4C,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE;IACnF,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,mCAAmC,SAAS,sDAAsD,CAAC,CAAA;IACrH,CAAC;IACD,OAAO,yBAAyB,CAAC,WAAW,CAA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AAgB,CAAC,uBAAuB,CAAC;IAChE,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAAC;IAChD,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,mBAAmB,EAAE,gBAAgB,CAAC,qBAAqB,CAAC;IAC5D,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;CACvD,CAAC,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA","sourcesContent":["import PrivateBluetoothSdkModule from \"./_private/BluetoothSdkModule\"\nimport type {\n BluetoothSdkEventListener,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule,\n VideoRecordingDefaults,\n} from \"./BluetoothSdk.types\"\n\nconst PUBLIC_EVENT_NAMES = new Set<BluetoothSdkEventName>([\n \"log\",\n \"device_discovered\",\n \"default_device_changed\",\n \"glasses_not_ready\",\n \"button_press\",\n \"touch_event\",\n \"accel_event\",\n \"head_up\",\n \"voice_activity_detection_status\",\n \"speaking_status\",\n \"battery_status\",\n \"local_transcription\",\n \"wifi_status_change\",\n \"wifi_scan_result\",\n \"hotspot_status_change\",\n \"hotspot_error\",\n \"photo_response\",\n \"photo_status\",\n \"camera_status\",\n \"video_recording_status\",\n \"media_success\",\n \"media_error\",\n \"gallery_status\",\n \"compatible_glasses_search_stop\",\n \"swipe_volume_status\",\n \"switch_status\",\n \"rgb_led_control_response\",\n \"settings_ack\",\n \"pair_failure\",\n \"pairing_info\",\n \"entering_pairing_mode\",\n \"owner_replaced\",\n \"audio_pairing_needed\",\n \"audio_connected\",\n \"audio_disconnected\",\n \"mic_pcm\",\n \"mic_lc3\",\n \"mic_health\",\n \"stream_status\",\n \"ota_start_ack\",\n \"ota_status\",\n \"ar99_ota_status\",\n \"version_info\",\n \"extraction_progress\",\n])\n\nconst addListener: BluetoothSdkPublicModule[\"addListener\"] = (eventName, listener) => {\n if (!PUBLIC_EVENT_NAMES.has(eventName)) {\n throw new Error(`Unsupported BluetoothSdk event \"${eventName}\". Use @mentra/bluetooth-sdk/react for status state.`)\n }\n return PrivateBluetoothSdkModule.addListener(eventName, listener as BluetoothSdkEventListener<BluetoothSdkEventName>)\n}\n\nconst startOtaUpdate: BluetoothSdkPublicModule[\"startOtaUpdate\"] = (otaVersionUrl) => {\n return PrivateBluetoothSdkModule.startOtaUpdate(otaVersionUrl)\n}\n\nconst bindPublicMethod = <K extends keyof BluetoothSdkPublicModule>(name: K): BluetoothSdkPublicModule[K] => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>)[name]\n if (typeof method === \"function\") {\n return method.bind(PrivateBluetoothSdkModule) as BluetoothSdkPublicModule[K]\n }\n\n return (async () => {\n throw new Error(`BluetoothSdk.${String(name)} is not available in this native build. Rebuild the app.`)\n }) as unknown as BluetoothSdkPublicModule[K]\n}\n\nexport const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({\n addListener,\n getDefaultDevice: bindPublicMethod(\"getDefaultDevice\"),\n setDefaultDevice: bindPublicMethod(\"setDefaultDevice\"),\n clearDefaultDevice: bindPublicMethod(\"clearDefaultDevice\"),\n startScan: bindPublicMethod(\"startScan\"),\n stopScan: bindPublicMethod(\"stopScan\"),\n scan: bindPublicMethod(\"scan\") as BluetoothSdkPublicModule[\"scan\"],\n connect: bindPublicMethod(\"connect\"),\n connectDefault: bindPublicMethod(\"connectDefault\"),\n cancelConnectionAttempt: bindPublicMethod(\"cancelConnectionAttempt\"),\n disconnect: bindPublicMethod(\"disconnect\"),\n forget: bindPublicMethod(\"forget\"),\n displayText: bindPublicMethod(\"displayText\"),\n clearDisplay: bindPublicMethod(\"clearDisplay\"),\n showDashboard: bindPublicMethod(\"showDashboard\"),\n setDashboardPosition: bindPublicMethod(\"setDashboardPosition\"),\n setHeadUpAngle: bindPublicMethod(\"setHeadUpAngle\"),\n setImuEnabled: bindPublicMethod(\"setImuEnabled\"),\n setScreenDisabled: bindPublicMethod(\"setScreenDisabled\"),\n requestWifiScan: bindPublicMethod(\"requestWifiScan\"),\n sendWifiCredentials: bindPublicMethod(\"sendWifiCredentials\"),\n forgetWifiNetwork: bindPublicMethod(\"forgetWifiNetwork\"),\n setHotspotState: bindPublicMethod(\"setHotspotState\"),\n setWifiAdbState: bindPublicMethod(\"setWifiAdbState\"),\n setGalleryModeEnabled: bindPublicMethod(\"setGalleryModeEnabled\"),\n setVoiceActivityDetectionEnabled: bindPublicMethod(\"setVoiceActivityDetectionEnabled\"),\n setLoudnessGateEnabled: bindPublicMethod(\"setLoudnessGateEnabled\"),\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop, or explicit per-shot\n * fields). Still functional until removed in a future release.\n */\n setPhotoCaptureDefaults: bindPublicMethod(\"setPhotoCaptureDefaults\"),\n setVideoRecordingDefaults: ({width, height, fps}: VideoRecordingDefaults) => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>).setVideoRecordingDefaults\n if (typeof method !== \"function\") {\n return Promise.reject(\n new Error(\"BluetoothSdk.setVideoRecordingDefaults is not available in this native build. Rebuild the app.\"),\n )\n }\n return PrivateBluetoothSdkModule.setVideoRecordingDefaults(width, height, fps)\n },\n setMaxVideoRecordingDuration: bindPublicMethod(\"setMaxVideoRecordingDuration\"),\n setCameraFov: bindPublicMethod(\"setCameraFov\"),\n setLegacyCameraFov: bindPublicMethod(\"setLegacyCameraFov\"),\n setCameraFovOverride: bindPublicMethod(\"setCameraFovOverride\"),\n releaseCameraFovOverride: bindPublicMethod(\"releaseCameraFovOverride\"),\n setCameraTuningConfig: bindPublicMethod(\"setCameraTuningConfig\"),\n queryGalleryStatus: bindPublicMethod(\"queryGalleryStatus\"),\n requestPhoto: bindPublicMethod(\"requestPhoto\"),\n warmUpCamera: bindPublicMethod(\"warmUpCamera\"),\n stopCameraWarmUp: bindPublicMethod(\"stopCameraWarmUp\"),\n startVideoRecording: bindPublicMethod(\"startVideoRecording\"),\n stopVideoRecording: bindPublicMethod(\"stopVideoRecording\"),\n queryVideoRecordingStatus: bindPublicMethod(\"queryVideoRecordingStatus\"),\n startStream: bindPublicMethod(\"startStream\"),\n stopStream: bindPublicMethod(\"stopStream\"),\n setMicState: bindPublicMethod(\"setMicState\"),\n setPreferredMic: bindPublicMethod(\"setPreferredMic\"),\n setOwnAppAudioPlaying: bindPublicMethod(\"setOwnAppAudioPlaying\"),\n getGlassesMediaVolume: bindPublicMethod(\"getGlassesMediaVolume\"),\n setGlassesMediaVolume: bindPublicMethod(\"setGlassesMediaVolume\"),\n rgbLedControl: bindPublicMethod(\"rgbLedControl\"),\n requestVersionInfo: bindPublicMethod(\"requestVersionInfo\"),\n setOtaVersionUrl: bindPublicMethod(\"setOtaVersionUrl\"),\n getOtaVersionUrl: bindPublicMethod(\"getOtaVersionUrl\"),\n checkForOtaUpdate: bindPublicMethod(\"checkForOtaUpdate\"),\n startOtaUpdate,\n startAr99OtaFromFile: bindPublicMethod(\"startAr99OtaFromFile\"),\n cancelAr99Ota: bindPublicMethod(\"cancelAr99Ota\"),\n sendAr99FactoryReset: bindPublicMethod(\"sendAr99FactoryReset\"),\n buildAr99OtaSignature: bindPublicMethod(\"buildAr99OtaSignature\"),\n setSttModelDetails: bindPublicMethod(\"setSttModelDetails\"),\n getSttModelPath: bindPublicMethod(\"getSttModelPath\"),\n checkSttModelAvailable: bindPublicMethod(\"checkSttModelAvailable\"),\n validateSttModel: bindPublicMethod(\"validateSttModel\"),\n extractTarBz2: bindPublicMethod(\"extractTarBz2\"),\n restartTranscriber: bindPublicMethod(\"restartTranscriber\"),\n setTtsModelDetails: bindPublicMethod(\"setTtsModelDetails\"),\n getTtsModelPath: bindPublicMethod(\"getTtsModelPath\"),\n getTtsModelLanguage: bindPublicMethod(\"getTtsModelLanguage\"),\n checkTtsModelAvailable: bindPublicMethod(\"checkTtsModelAvailable\"),\n validateTtsModel: bindPublicMethod(\"validateTtsModel\"),\n generateTtsAudio: bindPublicMethod(\"generateTtsAudio\"),\n})\n\nexport default BluetoothSdk\n\nexport {\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n DeviceModels,\n isBusyGlassesConnectionStatus,\n isConnectedGlassesConnectionStatus,\n isConnectedWifiStatus,\n isEnabledHotspotStatus,\n isReadyGlassesConnectionStatus,\n} from \"./BluetoothSdk.types\"\n\nexport type {\n AccelEvent,\n Ar99OtaStatusEvent,\n AudioConnectedEvent,\n AudioDisconnectedEvent,\n AudioPairingNeededEvent,\n BatteryStatusEvent,\n BluetoothSdkEvent,\n BluetoothSdkEventListener,\n BluetoothSdkEventMap,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule as BluetoothSdkModule,\n BluetoothSdkSubscription,\n ButtonPhotoSize,\n PhotoCaptureDefaults,\n ButtonPressEvent,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovResult,\n CameraRoiPosition,\n CompatibleGlassesSearchStopEvent,\n ConnectOptions,\n ConnectedGlassesConnectionStatus,\n ConnectedWifiStatus,\n Device,\n DeviceModel,\n EnabledHotspotStatus,\n GalleryStatusEvent,\n GlassesConnectionStatus,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesNotReadyEvent,\n HeadUpEvent,\n HotspotErrorEvent,\n HotspotStatus,\n HotspotStatusChangeEvent,\n KeepAliveAckEvent,\n LocalTranscriptionEvent,\n LogEvent,\n MicLc3Event,\n MicHealthEvent,\n MicMode,\n MicPcmEvent,\n MicPreference,\n OtaStartAckEvent,\n OtaProgress,\n OtaProgressStatus,\n OtaStage,\n OtaStatus,\n OtaStatusEvent,\n OtaQueryResult,\n OtaUpdateInfo,\n PairFailureEvent,\n PairingInfoEvent,\n EnteringPairingModeEvent,\n OwnerReplacedEvent,\n PhotoCaptureMetadata,\n PhotoResolvedConfig,\n PhotoCompression,\n PhotoFpsRange,\n PhotoMeteredPreview,\n PhotoMode,\n PhotoTransferMethod,\n PhotoResponseEvent,\n PhotoRequestedCaptureConfig,\n PhotoRequestParams,\n PhotoSize,\n PhotoStatusEvent,\n PhotoStatusState,\n PhotoSuccessResponseEvent,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlResponseEvent,\n RgbLedControlSuccessResponseEvent,\n ScanModelOptions,\n ScanOptions,\n ScanResultsCallback,\n SpeakingStatusEvent,\n SettingsAckEvent,\n SettingsAckSetting,\n SettingsAckSuccessEvent,\n SettingsAckSuccessStatus,\n SettingsAckStatus,\n StreamAudioConfig,\n StreamResolvedConfig,\n StreamStartRequest,\n StreamStatusEvent,\n StreamStatusLifecycleState,\n StreamStatusReconnectState,\n StreamStatusState,\n StreamVideoConfig,\n SwipeVolumeStatusEvent,\n SwitchStatusEvent,\n TouchEvent,\n VideoRecordingDefaults,\n VideoRecordingStartedStatusEvent,\n VideoRecordingStatusEvent,\n VideoRecordingStatusState,\n VideoRecordingStoppedStatusEvent,\n VideoRecordingSuccessStatusEvent,\n VersionInfoEvent,\n VersionInfoResult,\n WifiScanResultEvent,\n VoiceActivityDetectionStatusEvent,\n WifiSearchResult,\n WifiStatus,\n WifiStatusChangeEvent,\n} from \"./BluetoothSdk.types\"\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,MAAM,+BAA+B,CAAA;AASrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAA;AAEjD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAwB;IACxD,KAAK;IACL,mBAAmB;IACnB,wBAAwB;IACxB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,aAAa;IACb,SAAS;IACT,iCAAiC;IACjC,iBAAiB;IACjB,gBAAgB;IAChB,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,uBAAuB;IACvB,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,gCAAgC;IAChC,qBAAqB;IACrB,eAAe;IACf,0BAA0B;IAC1B,cAAc;IACd,cAAc;IACd,cAAc;IACd,uBAAuB;IACvB,gBAAgB;IAChB,sBAAsB;IACtB,iBAAiB;IACjB,oBAAoB;IACpB,SAAS;IACT,SAAS;IACT,YAAY;IACZ,eAAe;IACf,qBAAqB;IACrB,yBAAyB;IACzB,eAAe;IACf,YAAY;IACZ,iBAAiB;IACjB,cAAc;IACd,qBAAqB;CACtB,CAAC,CAAA;AAEF,MAAM,WAAW,GAA4C,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE;IACnF,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,mCAAmC,SAAS,sDAAsD,CAAC,CAAA;IACrH,CAAC;IACD,OAAO,yBAAyB,CAAC,WAAW,CAAC,SAAS,EAAE,QAA4D,CAAC,CAAA;AACvH,CAAC,CAAA;AAED,MAAM,cAAc,GAA+C,CAAC,aAAa,EAAE,EAAE;IACnF,OAAO,yBAAyB,CAAC,cAAc,CAAC,aAAa,CAAC,CAAA;AAChE,CAAC,CAAA;AAED,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AAC,kBAAkB,CAAC;IACtD,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,iBAAiB,EAAE,gBAAgB,CAAC,mBAAmB,CAAC;IACxD,oBAAoB;IACpB,cAAc;IACd,cAAc;IACd,oBAAoB,EAAE,gBAAgB,CAAC,sBAAsB,CAAC;IAC9D,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAAC;IAChD,oBAAoB,EAAE,gBAAgB,CAAC,sBAAsB,CAAC;IAC9D,qBAAqB,EAAE,gBAAgB,CAAC,uBAAuB,CAAC;IAChE,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAAC;IAChD,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,mBAAmB,EAAE,gBAAgB,CAAC,qBAAqB,CAAC;IAC5D,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;CACvD,CAAC,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA","sourcesContent":["import PrivateBluetoothSdkModule from \"./_private/BluetoothSdkModule\"\nimport type {\n BluetoothSdkEventListener,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule,\n PublicBluetoothStatus,\n PublicGlassesStatus,\n VideoRecordingDefaults,\n} from \"./BluetoothSdk.types\"\nimport {getReleaseChangelogs} from \"./changelogs\"\n\nconst PUBLIC_EVENT_NAMES = new Set<BluetoothSdkEventName>([\n \"log\",\n \"device_discovered\",\n \"default_device_changed\",\n \"glasses_not_ready\",\n \"button_press\",\n \"touch_event\",\n \"accel_event\",\n \"head_up\",\n \"voice_activity_detection_status\",\n \"speaking_status\",\n \"battery_status\",\n \"local_transcription\",\n \"wifi_status_change\",\n \"wifi_scan_result\",\n \"hotspot_status_change\",\n \"hotspot_error\",\n \"photo_response\",\n \"photo_status\",\n \"camera_status\",\n \"video_recording_status\",\n \"media_success\",\n \"media_error\",\n \"gallery_status\",\n \"compatible_glasses_search_stop\",\n \"swipe_volume_status\",\n \"switch_status\",\n \"rgb_led_control_response\",\n \"settings_ack\",\n \"pair_failure\",\n \"pairing_info\",\n \"entering_pairing_mode\",\n \"owner_replaced\",\n \"audio_pairing_needed\",\n \"audio_connected\",\n \"audio_disconnected\",\n \"mic_pcm\",\n \"mic_lc3\",\n \"mic_health\",\n \"stream_status\",\n \"mtk_update_complete\",\n \"glasses_session_changed\",\n \"ota_start_ack\",\n \"ota_status\",\n \"ar99_ota_status\",\n \"version_info\",\n \"extraction_progress\",\n])\n\nconst addListener: BluetoothSdkPublicModule[\"addListener\"] = (eventName, listener) => {\n if (!PUBLIC_EVENT_NAMES.has(eventName)) {\n throw new Error(`Unsupported BluetoothSdk event \"${eventName}\". Use @mentra/bluetooth-sdk/react for status state.`)\n }\n return PrivateBluetoothSdkModule.addListener(eventName, listener as BluetoothSdkEventListener<BluetoothSdkEventName>)\n}\n\nconst startOtaUpdate: BluetoothSdkPublicModule[\"startOtaUpdate\"] = (otaVersionUrl) => {\n return PrivateBluetoothSdkModule.startOtaUpdate(otaVersionUrl)\n}\n\nconst queryOtaStatus: BluetoothSdkPublicModule[\"queryOtaStatus\"] = () => {\n return PrivateBluetoothSdkModule.sendOtaQueryStatus()\n}\n\nconst bindPublicMethod = <K extends keyof BluetoothSdkPublicModule>(name: K): BluetoothSdkPublicModule[K] => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>)[name]\n if (typeof method === \"function\") {\n return method.bind(PrivateBluetoothSdkModule) as BluetoothSdkPublicModule[K]\n }\n\n return (async () => {\n throw new Error(`BluetoothSdk.${String(name)} is not available in this native build. Rebuild the app.`)\n }) as unknown as BluetoothSdkPublicModule[K]\n}\n\nexport const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({\n addListener,\n getGlassesStatus: bindPublicMethod(\"getGlassesStatus\"),\n getBluetoothStatus: bindPublicMethod(\"getBluetoothStatus\"),\n subscribeGlassesStatus: (listener: (changed: Partial<PublicGlassesStatus>) => void) =>\n PrivateBluetoothSdkModule.onGlassesStatus(listener),\n subscribeBluetoothStatus: (listener: (changed: Partial<PublicBluetoothStatus>) => void) =>\n PrivateBluetoothSdkModule.onBluetoothStatus(listener),\n getDefaultDevice: bindPublicMethod(\"getDefaultDevice\"),\n setDefaultDevice: bindPublicMethod(\"setDefaultDevice\"),\n clearDefaultDevice: bindPublicMethod(\"clearDefaultDevice\"),\n startScan: bindPublicMethod(\"startScan\"),\n stopScan: bindPublicMethod(\"stopScan\"),\n scan: bindPublicMethod(\"scan\") as BluetoothSdkPublicModule[\"scan\"],\n connect: bindPublicMethod(\"connect\"),\n connectDefault: bindPublicMethod(\"connectDefault\"),\n cancelConnectionAttempt: bindPublicMethod(\"cancelConnectionAttempt\"),\n disconnect: bindPublicMethod(\"disconnect\"),\n forget: bindPublicMethod(\"forget\"),\n displayText: bindPublicMethod(\"displayText\"),\n clearDisplay: bindPublicMethod(\"clearDisplay\"),\n showDashboard: bindPublicMethod(\"showDashboard\"),\n setDashboardPosition: bindPublicMethod(\"setDashboardPosition\"),\n setHeadUpAngle: bindPublicMethod(\"setHeadUpAngle\"),\n setImuEnabled: bindPublicMethod(\"setImuEnabled\"),\n setScreenDisabled: bindPublicMethod(\"setScreenDisabled\"),\n ping: bindPublicMethod(\"ping\"),\n requestWifiScan: bindPublicMethod(\"requestWifiScan\"),\n sendWifiCredentials: bindPublicMethod(\"sendWifiCredentials\"),\n forgetWifiNetwork: bindPublicMethod(\"forgetWifiNetwork\"),\n setHotspotState: bindPublicMethod(\"setHotspotState\"),\n setSystemTime: bindPublicMethod(\"setSystemTime\"),\n setWifiAdbState: bindPublicMethod(\"setWifiAdbState\"),\n setGalleryModeEnabled: bindPublicMethod(\"setGalleryModeEnabled\"),\n setVoiceActivityDetectionEnabled: bindPublicMethod(\"setVoiceActivityDetectionEnabled\"),\n setLoudnessGateEnabled: bindPublicMethod(\"setLoudnessGateEnabled\"),\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop, or explicit per-shot\n * fields). Still functional until removed in a future release.\n */\n setPhotoCaptureDefaults: bindPublicMethod(\"setPhotoCaptureDefaults\"),\n setVideoRecordingDefaults: ({width, height, fps}: VideoRecordingDefaults) => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>).setVideoRecordingDefaults\n if (typeof method !== \"function\") {\n return Promise.reject(\n new Error(\"BluetoothSdk.setVideoRecordingDefaults is not available in this native build. Rebuild the app.\"),\n )\n }\n return PrivateBluetoothSdkModule.setVideoRecordingDefaults(width, height, fps)\n },\n setMaxVideoRecordingDuration: bindPublicMethod(\"setMaxVideoRecordingDuration\"),\n setCameraFov: bindPublicMethod(\"setCameraFov\"),\n setLegacyCameraFov: bindPublicMethod(\"setLegacyCameraFov\"),\n setCameraFovOverride: bindPublicMethod(\"setCameraFovOverride\"),\n releaseCameraFovOverride: bindPublicMethod(\"releaseCameraFovOverride\"),\n setCameraTuningConfig: bindPublicMethod(\"setCameraTuningConfig\"),\n queryGalleryStatus: bindPublicMethod(\"queryGalleryStatus\"),\n requestPhoto: bindPublicMethod(\"requestPhoto\"),\n warmUpCamera: bindPublicMethod(\"warmUpCamera\"),\n stopCameraWarmUp: bindPublicMethod(\"stopCameraWarmUp\"),\n startVideoRecording: bindPublicMethod(\"startVideoRecording\"),\n stopVideoRecording: bindPublicMethod(\"stopVideoRecording\"),\n queryVideoRecordingStatus: bindPublicMethod(\"queryVideoRecordingStatus\"),\n startStream: bindPublicMethod(\"startStream\"),\n stopStream: bindPublicMethod(\"stopStream\"),\n setMicState: bindPublicMethod(\"setMicState\"),\n setPreferredMic: bindPublicMethod(\"setPreferredMic\"),\n setOwnAppAudioPlaying: bindPublicMethod(\"setOwnAppAudioPlaying\"),\n getGlassesMediaVolume: bindPublicMethod(\"getGlassesMediaVolume\"),\n setGlassesMediaVolume: bindPublicMethod(\"setGlassesMediaVolume\"),\n rgbLedControl: bindPublicMethod(\"rgbLedControl\"),\n requestVersionInfo: bindPublicMethod(\"requestVersionInfo\"),\n setOtaVersionUrl: bindPublicMethod(\"setOtaVersionUrl\"),\n getOtaVersionUrl: bindPublicMethod(\"getOtaVersionUrl\"),\n checkForOtaUpdate: bindPublicMethod(\"checkForOtaUpdate\"),\n getReleaseChangelogs,\n startOtaUpdate,\n queryOtaStatus,\n startAr99OtaFromFile: bindPublicMethod(\"startAr99OtaFromFile\"),\n cancelAr99Ota: bindPublicMethod(\"cancelAr99Ota\"),\n sendAr99FactoryReset: bindPublicMethod(\"sendAr99FactoryReset\"),\n buildAr99OtaSignature: bindPublicMethod(\"buildAr99OtaSignature\"),\n setSttModelDetails: bindPublicMethod(\"setSttModelDetails\"),\n getSttModelPath: bindPublicMethod(\"getSttModelPath\"),\n checkSttModelAvailable: bindPublicMethod(\"checkSttModelAvailable\"),\n validateSttModel: bindPublicMethod(\"validateSttModel\"),\n extractTarBz2: bindPublicMethod(\"extractTarBz2\"),\n restartTranscriber: bindPublicMethod(\"restartTranscriber\"),\n setTtsModelDetails: bindPublicMethod(\"setTtsModelDetails\"),\n getTtsModelPath: bindPublicMethod(\"getTtsModelPath\"),\n getTtsModelLanguage: bindPublicMethod(\"getTtsModelLanguage\"),\n checkTtsModelAvailable: bindPublicMethod(\"checkTtsModelAvailable\"),\n validateTtsModel: bindPublicMethod(\"validateTtsModel\"),\n generateTtsAudio: bindPublicMethod(\"generateTtsAudio\"),\n})\n\nexport default BluetoothSdk\n\nexport {\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n DeviceModels,\n isBusyGlassesConnectionStatus,\n isConnectedGlassesConnectionStatus,\n isConnectedWifiStatus,\n isEnabledHotspotStatus,\n isReadyGlassesConnectionStatus,\n} from \"./BluetoothSdk.types\"\n\nexport type {\n AccelEvent,\n Ar99OtaStatusEvent,\n AudioConnectedEvent,\n AudioDisconnectedEvent,\n AudioPairingNeededEvent,\n BatteryStatusEvent,\n BluetoothSdkEvent,\n BluetoothSdkEventListener,\n BluetoothSdkEventMap,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule as BluetoothSdkModule,\n BluetoothSdkSubscription,\n ButtonPhotoSize,\n PhotoCaptureDefaults,\n ButtonPressEvent,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovResult,\n CameraRoiPosition,\n CompatibleGlassesSearchStopEvent,\n ConnectOptions,\n ConnectedGlassesConnectionStatus,\n ConnectedWifiStatus,\n Device,\n DeviceModel,\n EnabledHotspotStatus,\n GalleryStatusEvent,\n GlassesConnectionStatus,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesNotReadyEvent,\n HeadUpEvent,\n HotspotErrorEvent,\n HotspotStatus,\n HotspotStatusChangeEvent,\n GlassesSessionChangedEvent,\n KeepAliveAckEvent,\n LocalTranscriptionEvent,\n LogEvent,\n MicLc3Event,\n MicHealthEvent,\n MicMode,\n MicPcmEvent,\n MicPreference,\n OtaStartAckEvent,\n OtaProgress,\n OtaProgressStatus,\n OtaStage,\n OtaStatus,\n OtaStatusEvent,\n OtaQueryResult,\n OtaUpdateInfo,\n ReleaseChangelog,\n MtkUpdateCompleteEvent,\n PairFailureEvent,\n PairingInfoEvent,\n EnteringPairingModeEvent,\n OwnerReplacedEvent,\n PhotoCaptureMetadata,\n PhotoResolvedConfig,\n PhotoCompression,\n PhotoFpsRange,\n PhotoMeteredPreview,\n PhotoMode,\n PublicBluetoothStatus,\n PublicGlassesStatus,\n PhotoTransferMethod,\n PhotoResponseEvent,\n PhotoRequestedCaptureConfig,\n PhotoRequestParams,\n PhotoSize,\n PhotoStatusEvent,\n PhotoStatusState,\n PhotoSuccessResponseEvent,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlResponseEvent,\n RgbLedControlSuccessResponseEvent,\n ScanModelOptions,\n ScanOptions,\n ScanResultsCallback,\n SpeakingStatusEvent,\n SettingsAckEvent,\n SettingsAckSetting,\n SettingsAckSuccessEvent,\n SettingsAckSuccessStatus,\n SettingsAckStatus,\n StreamAudioConfig,\n StreamResolvedConfig,\n StreamStartRequest,\n StreamStatusEvent,\n StreamStatusLifecycleState,\n StreamStatusReconnectState,\n StreamStatusState,\n StreamVideoConfig,\n SwipeVolumeStatusEvent,\n SwitchStatusEvent,\n TouchEvent,\n VideoRecordingDefaults,\n VideoRecordingStartedStatusEvent,\n VideoRecordingStatusEvent,\n VideoRecordingStatusState,\n VideoRecordingStoppedStatusEvent,\n VideoRecordingSuccessStatusEvent,\n VersionInfoEvent,\n VersionInfoResult,\n WifiScanResultEvent,\n VoiceActivityDetectionStatusEvent,\n WifiSearchResult,\n WifiStatus,\n WifiStatusChangeEvent,\n} from \"./BluetoothSdk.types\"\n"]}
|