KioskOpsSdk

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Debug overlay for development diagnostics.

Link copied to clipboard

Device group provider for fleet segmentation.

Link copied to clipboard

Remote configuration manager for config versioning and A/B testing.

Link copied to clipboard

Functions

Link copied to clipboard

Schedules periodic heartbeat work. The worker intentionally does NOT upload data; it only maintains local observability.

Link copied to clipboard

Observe configuration changes as a kotlinx.coroutines.flow.Flow.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun enqueue(type: String, payloadJson: String, userId: String? = null): Boolean

Backwards-compatible enqueue API.

Link copied to clipboard
fun enqueueBlocking(type: String, payloadJson: String, userId: String? = null): CompletableFuture<Boolean>

Java-friendly wrapper for enqueue. Returns a java.util.concurrent.CompletableFuture that completes on a background thread.

Link copied to clipboard
suspend fun enqueueDetailed(type: String, payloadJson: String, stableEventId: String? = null, idempotencyKeyOverride: String? = null, userId: String? = null): EnqueueResult

Enqueue an event through the v0.5.0 pipeline:

Link copied to clipboard
fun enqueueDetailedBlocking(type: String, payloadJson: String, stableEventId: String? = null, idempotencyKeyOverride: String? = null, userId: String? = null): CompletableFuture<EnqueueResult>

Java-friendly wrapper for enqueueDetailed.

Link copied to clipboard
suspend fun exportDiagnostics(): File

Threading: Main-safe. File IO dispatched internally.

Link copied to clipboard
suspend fun exportSignedAuditRange(fromTs: Long, toTs: Long): File

Export a range of signed audit events to a file.

Link copied to clipboard
fun getAbTestVariant(experimentId: String, variants: List<String>): String

Get A/B test variant for an experiment.

Link copied to clipboard

Get statistics about the persistent audit trail.

Link copied to clipboard

Get available config versions for rollback.

Link copied to clipboard

Get remaining remote diagnostics triggers allowed today.

Link copied to clipboard

Returns a structured health snapshot of the SDK.

Link copied to clipboard
Link copied to clipboard
fun healthStatusFlow(intervalMs: Long = 10000): Flow<HealthCheckResult>

Observe SDK health status as a kotlinx.coroutines.flow.Flow.

Link copied to clipboard
suspend fun heartbeat(reason: String = "periodic")

Maximalist heartbeat:

Link copied to clipboard

Java-friendly wrapper for heartbeat.

Link copied to clipboard
Link copied to clipboard
suspend fun processRemoteDiagnosticsTrigger(triggerId: String, metadata: Map<String, String> = emptyMap()): TriggerResult

Process a remote diagnostics trigger request.

Link copied to clipboard

Returns lightweight metadata for quarantined events (no payload). Useful for support dashboards and diagnostics.

Link copied to clipboard
suspend fun queueDepth(): Long

Threading: Main-safe.

Link copied to clipboard

Java-friendly wrapper for queueDepth.

Link copied to clipboard
fun queueDepthFlow(intervalMs: Long = 5000): Flow<Long>

Observe queue depth as a Room-reactive kotlinx.coroutines.flow.Flow.

Link copied to clipboard
suspend fun rollbackConfig(targetVersion: Long): ConfigRollbackResult

Rollback to a previous configuration version.

Link copied to clipboard

Set a custom anomaly detector implementation.

Link copied to clipboard

Set the authorization callback for data rights operations.

Link copied to clipboard
Link copied to clipboard

Set a listener for non-fatal SDK operational errors.

Link copied to clipboard
fun setPiiDetector(detector: PiiDetector?)

Set a custom PII detector implementation.

Link copied to clipboard
suspend fun shutdown()

Gracefully shut down the SDK.

Link copied to clipboard

Opt-in network sync.

Link copied to clipboard
Link copied to clipboard
suspend fun uploadDiagnosticsNow(metadata: Map<String, String> = emptyMap()): Boolean

Host-controlled diagnostics upload.

Link copied to clipboard
suspend fun verifyAuditIntegrity(fromTs: Long? = null, toTs: Long? = null): ChainVerificationResult

Verify the integrity of the persistent audit trail.