Package-level declarations

Types

Link copied to clipboard

Defines events for background web platform features.

Link copied to clipboard
@Serializable
data class BackgroundServiceEvent(val timestamp: TimeSinceEpoch, val origin: String, val serviceWorkerRegistrationId: RegistrationID, val service: ServiceName, val eventName: String, val instanceId: String, val eventMetadata: List<EventMetadata>, val storageKey: String)

(undocumented in the protocol definition)

Link copied to clipboard
@Serializable
data class ClearEventsRequest(val service: ServiceName)

Request object containing input parameters for the BackgroundServiceDomain.clearEvents command.

Link copied to clipboard
@Serializable
object ClearEventsResponse

A dummy response object for the BackgroundServiceDomain.clearEvents command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class EventMetadata(val key: String, val value: String)

A key-value pair for additional event information to pass along.

Link copied to clipboard
@Serializable
enum ServiceName : Enum<ServiceName>

The Background Service that will be associated with the commands/events. Every Background Service operates independently, but they share the same API.

Link copied to clipboard
@Serializable
data class SetRecordingRequest(val shouldRecord: Boolean, val service: ServiceName)

Request object containing input parameters for the BackgroundServiceDomain.setRecording command.

Link copied to clipboard
@Serializable
object SetRecordingResponse

A dummy response object for the BackgroundServiceDomain.setRecording command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class StartObservingRequest(val service: ServiceName)

Request object containing input parameters for the BackgroundServiceDomain.startObserving command.

Link copied to clipboard
@Serializable
object StartObservingResponse

A dummy response object for the BackgroundServiceDomain.startObserving command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class StopObservingRequest(val service: ServiceName)

Request object containing input parameters for the BackgroundServiceDomain.stopObserving command.

Link copied to clipboard
@Serializable
object StopObservingResponse

A dummy response object for the BackgroundServiceDomain.stopObserving command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.