@hellotext/hellotext 2.3.7 → 2.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/hellotext.js +1 -1
- package/index.d.ts +48 -15
- package/lib/controllers/message_controller.cjs +19 -0
- package/lib/controllers/message_controller.js +19 -0
- package/lib/core/event.cjs +1 -1
- package/lib/core/event.js +1 -1
- package/lib/hellotext.cjs +9 -3
- package/lib/hellotext.js +10 -6
- package/lib/models/business.cjs +69 -0
- package/lib/models/business.js +80 -0
- package/package.json +1 -1
- package/src/controllers/message_controller.js +20 -0
- package/src/core/event.js +1 -0
- package/src/hellotext.js +10 -3
- package/src/models/business.js +74 -0
package/README.md
CHANGED
|
@@ -105,6 +105,7 @@ Hellotext.removeEventListener(eventName, callback)
|
|
|
105
105
|
- `forms:collected` This event is fired when forms are collected. The callback will receive the array of forms collected.
|
|
106
106
|
- `form:completed` This event is fired when a form has been completed. A form is completed when the user fills all required inputs and verifies their OTP(One-Time Password). The callback will receive the form object that was completed, alongside the data the user filled in the form.
|
|
107
107
|
- View Webchat events [here](/docs/webchat.md#events)
|
|
108
|
+
- `cart.added` This event is fired when a customer adds a product to their cart from a Webchat message.
|
|
108
109
|
|
|
109
110
|
### Configuration
|
|
110
111
|
|
|
@@ -121,4 +122,4 @@ Hellotext.initialize('HELLOTEXT_BUSINESS_ID', configurationOptions)
|
|
|
121
122
|
| session | A valid Hellotext session which was stored previously. When not set, Hellotext attempts to retrieve the stored value from `document.cookie` when available, otherwise it creates a new session. | String | null |
|
|
122
123
|
| autoGenerateSession | Whether the library should automatically generate a session when no session is found in the query or the cookies | Boolean | true |
|
|
123
124
|
| forms | An object that controls how Hellotext should control the forms on the page. See [Forms](/docs/forms.md) documentation for more information. | Object | { autoMount: true, successMessage: true } |
|
|
124
|
-
| webchat | An object that
|
|
125
|
+
| webchat | An object that overrides the dashboard webchat configuration, or `false` to disable automatic webchat mounting. See [Webchat](/docs/webchat.md). | Object \| false | Dashboard webchat when configured |
|