Summary
The ahize/olark wrapper covers basic box visibility and a subset of api.visitor.update* setters, but is missing the entire api.chat.* surface (operator messaging + notifications), group routing, visitor detail retrieval, locale switching, and every documented event hook.
Gaps found
Missing API surface
Events not bridged
Config options not exposed
Deprecations in our current code
Intentionally out of scope
- Operator-panel / dashboard APIs.
- PowerUps configuration: no public JS-API surface documented at olark.com/api beyond what's already covered.
- Speculative methods not present in current docs:
api.box.hideAfterUpdate, api.box.maximize, api.box.conceal, api.box.reveal, api.box.isExpanded, api.box.setColors, api.box.setCustomCSS, api.box.theme, api.box.autotrigger, api.box.onTargeted, api.chat.onTargeted, api.visitor.updateContactInfo, api.visitor.updateAttributes, api.visitor.updateOperatorGroup — confirmed not present in current public docs.
Sources
Summary
The
ahize/olarkwrapper covers basic box visibility and a subset ofapi.visitor.update*setters, but is missing the entireapi.chat.*surface (operator messaging + notifications), group routing, visitor detail retrieval, locale switching, and every documented event hook.Gaps found
Missing API surface
api.visitor.getDetails(callback)— primary way to read back visitor identity (emailAddress, fullName, phonenumber, organization, geo, browser, customfields, conversation metrics). Wrapper'sgetIdentity()only returns locally-stored values and never reconciles with Olark's resolved details. — https://www.olark.com/api/api_visitor_getdetailsapi.chat.sendMessageToVisitor({ body })— programmatic operator-style message into the chat stream. — https://www.olark.com/apiapi.chat.sendNotificationToVisitor({ body })— system/notification message to visitor. — https://www.olark.com/apiapi.chat.sendNotificationToOperator({ body })— surface client-side context to the operator console. — https://www.olark.com/apiapi.chat.setOperatorGroup({ group })— group routing; required for any multi-team Olark account. — https://www.olark.com/api/api_chat_setoperatorgroupapi.chat.updateVisitorNickname({ snippet, hideDefault })— operator-side label for the visitor. — https://www.olark.com/apiapi.chat.updateVisitorStatus({ snippet })— operator-side status badge. — https://www.olark.com/apiapi.box.setLocale(locale)— dynamic language switching; pairs with the wrapper'spageView({ locale })which is currently a no-op. — https://www.olark.com/apiEvents not bridged
api.box.onShow— https://www.olark.com/apiapi.box.onHide— https://www.olark.com/apiapi.box.onExpand— https://www.olark.com/apiapi.box.onShrink— https://www.olark.com/apiapi.chat.onReady— https://www.olark.com/apiapi.chat.onBeginConversation— https://www.olark.com/apiapi.chat.onMessageToVisitor— https://www.olark.com/apiapi.chat.onMessageToOperator— https://www.olark.com/apiapi.chat.onCommandFromOperator— https://www.olark.com/apiapi.chat.onOfflineMessageToOperator— https://www.olark.com/apiapi.chat.onOperatorsAvailable— https://www.olark.com/apiapi.chat.onOperatorsAway— https://www.olark.com/apiConfig options not exposed
OlarkLoadOptionsonly acceptssiteId; nogroupfield that would callapi.chat.setOperatorGroupafteronReady. — https://www.olark.com/api/api_chat_setoperatorgrouplocaleload option; would map toapi.box.setLocale. — https://www.olark.com/apiDeprecations in our current code
track(event, metadata)writes{ [event]: metadata }viaapi.visitor.updateCustomFields, which Olark treats as a single named custom field per event name (later events with the same name overwrite). This isn't an event bus and silently drops repeated events; should either be documented as "writes a custom field" or routed throughapi.chat.sendNotificationToOperatorfor true event semantics. — https://www.olark.com/apishutdown()callsapi.visitor.updateCustomFields({})to "clear" identity, but Olark's documented API has no clear/reset semantics for custom fields — passing{}is a no-op, not a reset. — https://www.olark.com/api/api_visitor_updatecustomfieldsOlarkFnis typed as(method: string, ...args: unknown[]) => void, butapi.visitor.getDetailsand theon*callbacks make Olark's real signature(method, callbackOrPayload?) => voidwith a meaningful return path via callback — current type prevents wiring those without a cast.Intentionally out of scope
api.box.hideAfterUpdate,api.box.maximize,api.box.conceal,api.box.reveal,api.box.isExpanded,api.box.setColors,api.box.setCustomCSS,api.box.theme,api.box.autotrigger,api.box.onTargeted,api.chat.onTargeted,api.visitor.updateContactInfo,api.visitor.updateAttributes,api.visitor.updateOperatorGroup— confirmed not present in current public docs.Sources