Package-level declarations
Types
Link copied to clipboard
A page of the visitor's conversations.
Link copied to clipboard
data class DeviceRegistration(val token: String, val provider: PushProvider, val platform: String, val installId: String? = null, val locale: String? = null, val appVersion: String? = null, val osVersion: String? = null, val deviceModel: String? = null)
A device registered for pushes.
Link copied to clipboard
Reply to leads.
Link copied to clipboard
A page of timeline items.
Link copied to clipboard
Reply to the offline form.
Link copied to clipboard
Reply to reset.
Link copied to clipboard
data class RestoreResult(val visitorToken: String, val visitorId: String, val conversationId: String, val conversation: ConversationSummary? = null)
Reply to sessions/restore.
Link copied to clipboard
Reply to the HTTP send fallback.
Link copied to clipboard
Called as an upload body streams out: sent of total bytes (on an OkHttp thread).
Link copied to clipboard
open class WidgetApi(baseUrl: String, val siteId: String, val appKey: String, val userAgent: String, client: OkHttpClient? = null, val timeout: Duration = 20.seconds)
The visitor REST API (/widget/v1/sites/{siteId}/…) over OkHttp. Every call sends the app key and the user agent; token calls add x-visitor-token. Failures throw HatangException: gateway errors ({statusCode, name, message}) keep their name as HatangException.code and the HTTP status; transport failures are network_error. Open so tests can script it.