Package com.orange.webcom.sdk

Exposes the main public API of the Webcom SDK.

Types

AuthDetails
Link copied to clipboard
class AuthDetails @JvmOverloads constructor(id: String, password: String?, displayName: String?, profile: Any?)

Represents authentication details, needed by the Webcom.addIdentity method to create a new account.

AuthenticationOptions
Link copied to clipboard
data class AuthenticationOptions @JvmOverloads constructor(baseUrl: String?, storage: String?, initialState: String?)
AuthOptions
Link copied to clipboard
class AuthOptions

Represents a set of options for authentication, which can be passed to some methods such as Webcom.authWithOAuth.

Callback
Link copied to clipboard
interface Callback

Generic callback

Canceled
Link copied to clipboard
data class Canceled : Notification.ControlNotification, Notifiable

Generic event to be notified when a subscription is canceled, that is deliberately stopped.

Config
Link copied to clipboard
object Config
JSONValue
Link copied to clipboard
interface JSONValue
This interface provides convenient methods to browse a JSON value (typically returned by the underlying Javascript engine).
MessageDetails
Link copied to clipboard
class MessageDetails(template: String?, sender: String?, locale: Locale?)

Represents the settings of a message to send to the user, needed by the Webcom.sendOtp method.

Notifiable
Link copied to clipboard
interface Notifiable

Represents an event that can be notified, ie received by a callback function as a Notification object.

Notification
Link copied to clipboard
interface Notification<out T : Notifiable>

Base interface for passing an event of type T to a callback function.

OnAuth
Link copied to clipboard
interface OnAuth : Callback
Authentication callback for authInternally, addIdentity, ...
OnAuthExtended
Link copied to clipboard
interface OnAuthExtended : OnAuth
OnAuthWithOAuth
Link copied to clipboard
interface OnAuthWithOAuth : OnAuth
OAuth authentication callback for authWithOAuth and authWithOAuth.
OnCompletableQuery
Link copied to clipboard
interface OnCompletableQuery : OnQueryBase
OnComplete
Link copied to clipboard
interface OnComplete : Callback
Completion callback for set(), update(), push() or remove().
OnDisconnect
Link copied to clipboard
class OnDisconnect
OnQuery
Link copied to clipboard
interface OnQuery : OnQueryBase

Query callback for on(), com.orange.webcom.sdk.Query.once, off()

OnQueryBase
Link copied to clipboard
interface OnQueryBase : Callback
OnValue
Link copied to clipboard
interface OnValue : Callback

Asynchronous callback wrapper for some methods of the Webcom API. This wrapper provides a callback method that is passed a JSONValue instance.

Query
Link copied to clipboard
open class Query
ServerlessDbOptions
Link copied to clipboard
data class ServerlessDbOptions @JvmOverloads constructor(baseUrl: String?, offlineData: String?, persist: Boolean?, connect: Boolean?, completeSubscriptionOnCancelation: Boolean?, websocket: ServerlessDbOptions.Companion.WebSocketOptions?, statPeriodMs: Long?)
Subscription
Link copied to clipboard
interface Subscription

Represents a subscription to some event type.

TransactionCallback
Link copied to clipboard
interface TransactionCallback : Callback
VerificationData
Link copied to clipboard
class VerificationData

Encapsulates all information pieces to verify a newly created identity. The pieces of information depends on the authentication method associated to the identity to verify.

Webcom
Link copied to clipboard
class Webcom : Query

A Webcom object is the entry point to the Webcom Datasync and Authentication services.

WebcomAbstractService
Link copied to clipboard
abstract class WebcomAbstractService

Base class for the Webcom services such as AuthenticationService or DatasyncService.

WebcomApp
Link copied to clipboard
data class WebcomApp @JvmOverloads constructor(appId: String, platform: URL?)
WebcomApplication
Link copied to clipboard
class WebcomApplication

Represents a Webcom application.

WebcomConfiguration
Link copied to clipboard
data class WebcomConfiguration @JvmOverloads constructor(identifier: String, platform: URL?, offlineCache: String?, startOnline: Boolean, websocketProtocol: WebcomConfiguration.WebsocketProtocol, pingDelayMs: Int?, pongDelayMs: Int?)

Represents the settings of a WebcomApplication instance.

WebcomDoneCallback
Link copied to clipboard
typealias WebcomDoneCallback = (WebcomResult<Unit>) -> Unit

Shortcut type for callbacks that return nothing and that may fail.

WebcomError
Link copied to clipboard
class WebcomError @JvmOverloads constructor(errorCode: String, message: String?, cause: Throwable?)
WebcomException
Link copied to clipboard
class WebcomException(fromError: WebcomError?) : Exception
WebcomOptions
Link copied to clipboard
data class WebcomOptions @JvmOverloads constructor(Authentication: AuthenticationOptions?, ServerlessDb: ServerlessDbOptions?)
WebcomResult
Link copied to clipboard
sealed class WebcomResult<out T>

Wraps the result of a computation of type T.

WebcomResultCallback
Link copied to clipboard
typealias WebcomResultCallback<T> = (WebcomResult<T>) -> Unit

Shortcut type for callbacks that return an object of a given type and that may fail.

WebcomRuntimeException
Link copied to clipboard
class WebcomRuntimeException(message: String?) : RuntimeException

Functions

toOnCompletableQuery
Link copied to clipboard
fun OnQueryBase.toOnCompletableQuery(): OnCompletableQuery

Properties

description
Link copied to clipboard
val Callback.description: String