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
| Param | Type | Description |
|---|---|---|
| options | Object | |
| options.axios | Object | Configured axios instance (with interceptors) |
| options.hosts | Object | Object with host URLs: business, contacts, user, history, file, task, notifications, documents, chat |
| [options.onNotify] | function | Callback for UI notifications: (message, color) => void |
| [options.onError] | function | Callback for error logging: (error, context) => void |
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
Kind: global function