Skip to content

config

Functions

init(options)

Initialize the API client with dependencies from the host application. Must be called before any service method is used.

getAxios()

Returns the configured axios instance

getHost()

Returns host URL by key

notify()

Trigger a UI notification via the host callback

logError()

Log an error via the host callback

init(options)

Initialize the API client with dependencies from the host application. Must be called before any service method is used.

Kind: global function

ParamTypeDescription
optionsObject
options.axiosObjectConfigured axios instance (with interceptors)
options.hostsObjectObject with host URLs: business, contacts, user, history, file, task, notifications, documents, chat
[options.onNotify]functionCallback for UI notifications: (message, color) => void
[options.onError]functionCallback for error logging: (error, context) => void

getAxios()

Returns the configured axios instance

Kind: global function

getHost()

Returns host URL by key

Kind: global function

notify()

Trigger a UI notification via the host callback

Kind: global function

logError()

Log an error via the host callback

Kind: global function