@botpress/webchat 1.2.0 → 1.3.0

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.
Files changed (64) hide show
  1. package/dist/client/MessagingClient/client.d.ts +7 -4
  2. package/dist/client/PushpinClient/index.d.ts +4 -2
  3. package/dist/client/PushpinClient/inner-client/index.d.ts +2 -0
  4. package/dist/client/types.d.ts +4 -1
  5. package/dist/components/Avatar.d.ts +2 -3
  6. package/dist/components/Block.d.ts +3 -2
  7. package/dist/components/CloseWindow.d.ts +5 -0
  8. package/dist/components/Composer.d.ts +1 -1
  9. package/dist/components/renderers/Audio.d.ts +1 -1
  10. package/dist/components/renderers/Carousel.d.ts +1 -1
  11. package/dist/components/renderers/File.d.ts +1 -1
  12. package/dist/components/renderers/Image.d.ts +1 -1
  13. package/dist/components/renderers/Location.d.ts +1 -1
  14. package/dist/components/renderers/Video.d.ts +1 -1
  15. package/dist/contexts/WebchatContext.d.ts +3 -3
  16. package/dist/gen/client/api.d.ts +330 -12
  17. package/dist/gen/client/client.d.ts +5 -1
  18. package/dist/gen/client/errors.d.ts +9 -2
  19. package/dist/gen/models/index.d.ts +186 -23
  20. package/dist/gen/models/message.j.d.ts +107 -5
  21. package/dist/gen/models/message.t.d.ts +49 -0
  22. package/dist/gen/models/message.z.d.ts +79 -12
  23. package/dist/gen/models/user.j.d.ts +0 -3
  24. package/dist/gen/models/user.t.d.ts +0 -1
  25. package/dist/gen/models/user.z.d.ts +0 -3
  26. package/dist/gen/signals/index.d.ts +218 -23
  27. package/dist/gen/signals/messageCreatedSignal.j.d.ts +107 -5
  28. package/dist/gen/signals/messageCreatedSignal.t.d.ts +49 -0
  29. package/dist/gen/signals/messageCreatedSignal.z.d.ts +111 -18
  30. package/dist/get-client.d.ts +8 -0
  31. package/dist/hooks/useClient.d.ts +2 -2
  32. package/dist/hooks/useWebchatStore.d.ts +3 -0
  33. package/dist/index.d.ts +3 -4
  34. package/dist/index.js +33089 -40901
  35. package/dist/index.umd.cjs +96 -125
  36. package/dist/providers/WebchatProvider.d.ts +4 -3
  37. package/dist/schemas/configuration.d.ts +117 -0
  38. package/dist/schemas/index.d.ts +2 -0
  39. package/dist/schemas/init.d.ts +3844 -0
  40. package/dist/schemas/theme.d.ts +231 -232
  41. package/dist/types/block-type.d.ts +3 -6
  42. package/dist/types/configuration.d.ts +4 -16
  43. package/dist/types/index.d.ts +2 -0
  44. package/dist/types/init.d.ts +6 -0
  45. package/dist/types/theme.d.ts +7 -0
  46. package/dist/utils/index.d.ts +0 -2
  47. package/package.json +11 -37
  48. package/dist/App.d.ts +0 -11
  49. package/dist/components/dev-tools/DevTools.d.ts +0 -1
  50. package/dist/components/dev-tools/configuration.d.ts +0 -2
  51. package/dist/components/dev-tools/helpers.d.ts +0 -5
  52. package/dist/main.d.ts +0 -0
  53. package/dist/options.d.ts +0 -11
  54. package/dist/themes/base.d.ts +0 -3
  55. package/dist/themes/baseColors.d.ts +0 -736
  56. package/dist/themes/dawn.d.ts +0 -4
  57. package/dist/themes/eggplant.d.ts +0 -4
  58. package/dist/themes/index.d.ts +0 -3
  59. package/dist/themes/prism.d.ts +0 -4
  60. package/dist/themes/themeBuilder.d.ts +0 -27
  61. package/dist/twind.config.d.ts +0 -9
  62. package/dist/twind.d.ts +0 -16
  63. package/dist/utils/mergeThemes.d.ts +0 -2
  64. package/dist/utils/withBaseTheme.d.ts +0 -384
@@ -16,6 +16,10 @@ declare const _default: {
16
16
  type: string;
17
17
  minLength: number;
18
18
  };
19
+ className: {
20
+ type: string;
21
+ description: string;
22
+ };
19
23
  type: {
20
24
  type: string;
21
25
  const: string;
@@ -27,6 +31,7 @@ declare const _default: {
27
31
  items?: undefined;
28
32
  text?: undefined;
29
33
  options?: undefined;
34
+ disableFreeText?: undefined;
30
35
  fileUrl?: undefined;
31
36
  latitude?: undefined;
32
37
  longitude?: undefined;
@@ -45,11 +50,10 @@ declare const _default: {
45
50
  };
46
51
  subtitle: {
47
52
  type: string;
48
- minLength: number;
49
53
  };
50
54
  imageUrl: {
51
55
  type: string;
52
- minLength: number;
56
+ minLength?: undefined;
53
57
  };
54
58
  actions: {
55
59
  type: string;
@@ -77,10 +81,15 @@ declare const _default: {
77
81
  type: string;
78
82
  const: string;
79
83
  };
84
+ className: {
85
+ type: string;
86
+ description: string;
87
+ };
80
88
  audioUrl?: undefined;
81
89
  items?: undefined;
82
90
  text?: undefined;
83
91
  options?: undefined;
92
+ disableFreeText?: undefined;
84
93
  fileUrl?: undefined;
85
94
  latitude?: undefined;
86
95
  longitude?: undefined;
@@ -104,11 +113,9 @@ declare const _default: {
104
113
  };
105
114
  subtitle: {
106
115
  type: string;
107
- minLength: number;
108
116
  };
109
117
  imageUrl: {
110
118
  type: string;
111
- minLength: number;
112
119
  };
113
120
  actions: {
114
121
  type: string;
@@ -132,11 +139,19 @@ declare const _default: {
132
139
  additionalProperties: boolean;
133
140
  };
134
141
  };
142
+ className: {
143
+ type: string;
144
+ description: string;
145
+ };
135
146
  };
136
147
  required: string[];
137
148
  additionalProperties: boolean;
138
149
  };
139
150
  };
151
+ className: {
152
+ type: string;
153
+ description: string;
154
+ };
140
155
  type: {
141
156
  type: string;
142
157
  const: string;
@@ -148,6 +163,7 @@ declare const _default: {
148
163
  actions?: undefined;
149
164
  text?: undefined;
150
165
  options?: undefined;
166
+ disableFreeText?: undefined;
151
167
  fileUrl?: undefined;
152
168
  latitude?: undefined;
153
169
  longitude?: undefined;
@@ -162,7 +178,7 @@ declare const _default: {
162
178
  properties: {
163
179
  text: {
164
180
  type: string;
165
- minLength: number;
181
+ minLength?: undefined;
166
182
  };
167
183
  options: {
168
184
  type: string;
@@ -182,10 +198,17 @@ declare const _default: {
182
198
  additionalProperties: boolean;
183
199
  };
184
200
  };
201
+ className: {
202
+ type: string;
203
+ description: string;
204
+ };
185
205
  type: {
186
206
  type: string;
187
207
  const: string;
188
208
  };
209
+ disableFreeText: {
210
+ type: string;
211
+ };
189
212
  audioUrl?: undefined;
190
213
  title?: undefined;
191
214
  subtitle?: undefined;
@@ -201,6 +224,55 @@ declare const _default: {
201
224
  };
202
225
  required: string[];
203
226
  additionalProperties: boolean;
227
+ } | {
228
+ type: string;
229
+ properties: {
230
+ text: {
231
+ type: string;
232
+ minLength?: undefined;
233
+ };
234
+ options: {
235
+ type: string;
236
+ items: {
237
+ type: string;
238
+ properties: {
239
+ label: {
240
+ type: string;
241
+ minLength: number;
242
+ };
243
+ value: {
244
+ type: string;
245
+ minLength: number;
246
+ };
247
+ };
248
+ required: string[];
249
+ additionalProperties: boolean;
250
+ };
251
+ };
252
+ className: {
253
+ type: string;
254
+ description: string;
255
+ };
256
+ type: {
257
+ type: string;
258
+ const: string;
259
+ };
260
+ audioUrl?: undefined;
261
+ title?: undefined;
262
+ subtitle?: undefined;
263
+ imageUrl?: undefined;
264
+ actions?: undefined;
265
+ items?: undefined;
266
+ disableFreeText?: undefined;
267
+ fileUrl?: undefined;
268
+ latitude?: undefined;
269
+ longitude?: undefined;
270
+ address?: undefined;
271
+ markdown?: undefined;
272
+ videoUrl?: undefined;
273
+ };
274
+ required: string[];
275
+ additionalProperties: boolean;
204
276
  } | {
205
277
  type: string;
206
278
  properties: {
@@ -212,6 +284,10 @@ declare const _default: {
212
284
  type: string;
213
285
  minLength: number;
214
286
  };
287
+ className: {
288
+ type: string;
289
+ description: string;
290
+ };
215
291
  type: {
216
292
  type: string;
217
293
  const: string;
@@ -223,6 +299,7 @@ declare const _default: {
223
299
  items?: undefined;
224
300
  text?: undefined;
225
301
  options?: undefined;
302
+ disableFreeText?: undefined;
226
303
  latitude?: undefined;
227
304
  longitude?: undefined;
228
305
  address?: undefined;
@@ -238,6 +315,10 @@ declare const _default: {
238
315
  type: string;
239
316
  minLength: number;
240
317
  };
318
+ className: {
319
+ type: string;
320
+ description: string;
321
+ };
241
322
  type: {
242
323
  type: string;
243
324
  const: string;
@@ -249,6 +330,7 @@ declare const _default: {
249
330
  items?: undefined;
250
331
  text?: undefined;
251
332
  options?: undefined;
333
+ disableFreeText?: undefined;
252
334
  fileUrl?: undefined;
253
335
  latitude?: undefined;
254
336
  longitude?: undefined;
@@ -274,6 +356,10 @@ declare const _default: {
274
356
  type: string;
275
357
  minLength?: undefined;
276
358
  };
359
+ className: {
360
+ type: string;
361
+ description: string;
362
+ };
277
363
  type: {
278
364
  type: string;
279
365
  const: string;
@@ -285,6 +371,7 @@ declare const _default: {
285
371
  items?: undefined;
286
372
  text?: undefined;
287
373
  options?: undefined;
374
+ disableFreeText?: undefined;
288
375
  fileUrl?: undefined;
289
376
  markdown?: undefined;
290
377
  videoUrl?: undefined;
@@ -298,6 +385,10 @@ declare const _default: {
298
385
  type: string;
299
386
  minLength: number;
300
387
  };
388
+ className: {
389
+ type: string;
390
+ description: string;
391
+ };
301
392
  type: {
302
393
  type: string;
303
394
  const: string;
@@ -310,6 +401,7 @@ declare const _default: {
310
401
  items?: undefined;
311
402
  text?: undefined;
312
403
  options?: undefined;
404
+ disableFreeText?: undefined;
313
405
  fileUrl?: undefined;
314
406
  latitude?: undefined;
315
407
  longitude?: undefined;
@@ -325,6 +417,10 @@ declare const _default: {
325
417
  type: string;
326
418
  minLength: number;
327
419
  };
420
+ className: {
421
+ type: string;
422
+ description: string;
423
+ };
328
424
  type: {
329
425
  type: string;
330
426
  const: string;
@@ -336,6 +432,7 @@ declare const _default: {
336
432
  actions?: undefined;
337
433
  items?: undefined;
338
434
  options?: undefined;
435
+ disableFreeText?: undefined;
339
436
  fileUrl?: undefined;
340
437
  latitude?: undefined;
341
438
  longitude?: undefined;
@@ -352,6 +449,10 @@ declare const _default: {
352
449
  type: string;
353
450
  minLength: number;
354
451
  };
452
+ className: {
453
+ type: string;
454
+ description: string;
455
+ };
355
456
  type: {
356
457
  type: string;
357
458
  const: string;
@@ -364,6 +465,7 @@ declare const _default: {
364
465
  items?: undefined;
365
466
  text?: undefined;
366
467
  options?: undefined;
468
+ disableFreeText?: undefined;
367
469
  fileUrl?: undefined;
368
470
  latitude?: undefined;
369
471
  longitude?: undefined;
@@ -8,6 +8,10 @@ export interface Message {
8
8
  createdAt: string;
9
9
  payload: {
10
10
  audioUrl: string;
11
+ /**
12
+ * CSS className to apply to the message
13
+ */
14
+ className?: string;
11
15
  type: "audio";
12
16
  } | {
13
17
  title: string;
@@ -19,6 +23,10 @@ export interface Message {
19
23
  value: string;
20
24
  }[];
21
25
  type: "card";
26
+ /**
27
+ * CSS className to apply to the message
28
+ */
29
+ className?: string;
22
30
  } | {
23
31
  items: {
24
32
  title: string;
@@ -29,7 +37,15 @@ export interface Message {
29
37
  label: string;
30
38
  value: string;
31
39
  }[];
40
+ /**
41
+ * CSS className to apply to the message
42
+ */
43
+ className?: string;
32
44
  }[];
45
+ /**
46
+ * CSS className to apply to the message
47
+ */
48
+ className?: string;
33
49
  type: "carousel";
34
50
  } | {
35
51
  text: string;
@@ -37,35 +53,68 @@ export interface Message {
37
53
  label: string;
38
54
  value: string;
39
55
  }[];
56
+ /**
57
+ * CSS className to apply to the message
58
+ */
59
+ className?: string;
40
60
  type: "choice";
61
+ disableFreeText?: boolean;
41
62
  } | {
42
63
  text: string;
43
64
  options: {
44
65
  label: string;
45
66
  value: string;
46
67
  }[];
68
+ /**
69
+ * CSS className to apply to the message
70
+ */
71
+ className?: string;
47
72
  type: "dropdown";
48
73
  } | {
49
74
  fileUrl: string;
50
75
  title?: string;
76
+ /**
77
+ * CSS className to apply to the message
78
+ */
79
+ className?: string;
51
80
  type: "file";
52
81
  } | {
53
82
  imageUrl: string;
83
+ /**
84
+ * CSS className to apply to the message
85
+ */
86
+ className?: string;
54
87
  type: "image";
55
88
  } | {
56
89
  latitude: number;
57
90
  longitude: number;
58
91
  address?: string;
59
92
  title?: string;
93
+ /**
94
+ * CSS className to apply to the message
95
+ */
96
+ className?: string;
60
97
  type: "location";
61
98
  } | {
62
99
  markdown: string;
100
+ /**
101
+ * CSS className to apply to the message
102
+ */
103
+ className?: string;
63
104
  type: "markdown";
64
105
  } | {
65
106
  text: string;
107
+ /**
108
+ * CSS className to apply to the message
109
+ */
110
+ className?: string;
66
111
  type: "text";
67
112
  } | {
68
113
  videoUrl: string;
114
+ /**
115
+ * CSS className to apply to the message
116
+ */
117
+ className?: string;
69
118
  type: "video";
70
119
  };
71
120
  userId: string;