@askdialog/dialog-sdk 1.0.10 → 1.0.12
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 +8 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,8 +37,8 @@ const client = new Dialog({
|
|
|
37
37
|
apiKey: 'YOUR_API_KEY', // required
|
|
38
38
|
locale: 'TARGETED_LOCALE', // required
|
|
39
39
|
callbacks: {
|
|
40
|
-
addToCart: () => Promise<void>, // required
|
|
41
|
-
getProduct: () => Promise<Product>, // required
|
|
40
|
+
addToCart: async () => Promise<void>, // required
|
|
41
|
+
getProduct: async () => Promise<Product>, // required
|
|
42
42
|
},
|
|
43
43
|
});
|
|
44
44
|
```
|
|
@@ -48,7 +48,7 @@ The locale specifies the language you want to use.
|
|
|
48
48
|
The addToCart function is triggered when a user clicks the AddToCart button.
|
|
49
49
|
The getProduct function is used to display product information in the assistant.
|
|
50
50
|
|
|
51
|
-
When the client is instantiated, it will automatically insert
|
|
51
|
+
When the client is instantiated, it will automatically insert into the DOM the Dialog Assistant script, so you can interact with the assistant using `sendProductMessage` or `sendGenericMessage`.
|
|
52
52
|
|
|
53
53
|
### Getters
|
|
54
54
|
|
|
@@ -120,6 +120,7 @@ Example of expected result:
|
|
|
120
120
|
"inputPlaceholder": "Ask any question...",
|
|
121
121
|
"description": "Ask any question about this product"
|
|
122
122
|
}
|
|
123
|
+
*/
|
|
123
124
|
```
|
|
124
125
|
|
|
125
126
|
|
|
@@ -160,10 +161,10 @@ const client = new Dialog({
|
|
|
160
161
|
|
|
161
162
|
### Theming (Still in construction)
|
|
162
163
|
|
|
163
|
-
We are currently working on the theming part so you may find some issues. Contact us if you need more
|
|
164
|
+
We are currently working on the theming part so you may find some issues. Contact us if you need more customization.
|
|
164
165
|
|
|
165
166
|
|
|
166
|
-
⚠️ Title, description and content properties are used only to theme the
|
|
167
|
+
⚠️ Title, description and content properties are used only to theme the Vue component for the moment.
|
|
167
168
|
|
|
168
169
|
```typescript
|
|
169
170
|
const client = new Dialog({
|
|
@@ -180,11 +181,11 @@ const client = new Dialog({
|
|
|
180
181
|
fontSize?: string;
|
|
181
182
|
color?: string;
|
|
182
183
|
}
|
|
183
|
-
description?: {
|
|
184
|
+
description?: { // Used in Vue component only
|
|
184
185
|
fontSize?: string;
|
|
185
186
|
color?: string;
|
|
186
187
|
}
|
|
187
|
-
content?: {
|
|
188
|
+
content?: { // Used in Vue component only
|
|
188
189
|
fontSize?: string;
|
|
189
190
|
color?: string;
|
|
190
191
|
}
|