@botpress/webchat 1.2.0 → 1.3.1

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 (72) hide show
  1. package/dist/adapters/index.d.ts +4 -0
  2. package/dist/adapters/messaging-to-target.d.ts +151 -0
  3. package/dist/adapters/target.d.ts +77 -0
  4. package/dist/adapters/webchat-to-target.d.ts +126 -0
  5. package/dist/client/MessagingClient/client.d.ts +7 -4
  6. package/dist/client/PushpinClient/index.d.ts +4 -2
  7. package/dist/client/PushpinClient/inner-client/index.d.ts +2 -0
  8. package/dist/client/types.d.ts +4 -1
  9. package/dist/components/Avatar.d.ts +2 -3
  10. package/dist/components/Block.d.ts +3 -2
  11. package/dist/components/CloseWindow.d.ts +5 -0
  12. package/dist/components/Composer.d.ts +1 -1
  13. package/dist/components/renderers/Audio.d.ts +1 -1
  14. package/dist/components/renderers/Carousel.d.ts +1 -1
  15. package/dist/components/renderers/File.d.ts +1 -1
  16. package/dist/components/renderers/Image.d.ts +1 -1
  17. package/dist/components/renderers/Location.d.ts +1 -1
  18. package/dist/components/renderers/Video.d.ts +1 -1
  19. package/dist/contexts/WebchatContext.d.ts +3 -3
  20. package/dist/gen/client/api.d.ts +349 -31
  21. package/dist/gen/client/client.d.ts +21 -17
  22. package/dist/gen/client/errors.d.ts +9 -2
  23. package/dist/gen/models/index.d.ts +186 -23
  24. package/dist/gen/models/message.j.d.ts +107 -5
  25. package/dist/gen/models/message.t.d.ts +49 -0
  26. package/dist/gen/models/message.z.d.ts +79 -12
  27. package/dist/gen/models/user.j.d.ts +0 -3
  28. package/dist/gen/models/user.t.d.ts +0 -1
  29. package/dist/gen/models/user.z.d.ts +0 -3
  30. package/dist/gen/signals/index.d.ts +218 -23
  31. package/dist/gen/signals/messageCreatedSignal.j.d.ts +107 -5
  32. package/dist/gen/signals/messageCreatedSignal.t.d.ts +49 -0
  33. package/dist/gen/signals/messageCreatedSignal.z.d.ts +111 -18
  34. package/dist/get-client.d.ts +8 -0
  35. package/dist/hooks/useClient.d.ts +2 -2
  36. package/dist/hooks/useWebchatStore.d.ts +3 -0
  37. package/dist/index.d.ts +3 -4
  38. package/dist/index.js +33301 -40913
  39. package/dist/index.umd.cjs +96 -125
  40. package/dist/providers/WebchatProvider.d.ts +4 -3
  41. package/dist/schemas/configuration.d.ts +117 -0
  42. package/dist/schemas/index.d.ts +2 -0
  43. package/dist/schemas/init.d.ts +7650 -0
  44. package/dist/schemas/theme.d.ts +231 -232
  45. package/dist/types/block-type.d.ts +3 -6
  46. package/dist/types/configuration.d.ts +4 -16
  47. package/dist/types/index.d.ts +2 -0
  48. package/dist/types/init.d.ts +7 -0
  49. package/dist/types/theme.d.ts +7 -0
  50. package/dist/utils/index.d.ts +0 -2
  51. package/openapi.ts +40 -0
  52. package/package.json +15 -38
  53. package/dist/App.d.ts +0 -11
  54. package/dist/components/dev-tools/DevTools.d.ts +0 -1
  55. package/dist/components/dev-tools/configuration.d.ts +0 -2
  56. package/dist/components/dev-tools/helpers.d.ts +0 -5
  57. package/dist/main.d.ts +0 -0
  58. package/dist/options.d.ts +0 -11
  59. package/dist/themes/base.d.ts +0 -3
  60. package/dist/themes/baseColors.d.ts +0 -736
  61. package/dist/themes/dawn.d.ts +0 -4
  62. package/dist/themes/eggplant.d.ts +0 -4
  63. package/dist/themes/index.d.ts +0 -3
  64. package/dist/themes/prism.d.ts +0 -4
  65. package/dist/themes/themeBuilder.d.ts +0 -27
  66. package/dist/twind.config.d.ts +0 -9
  67. package/dist/twind.d.ts +0 -16
  68. package/dist/utils/mergeThemes.d.ts +0 -2
  69. package/dist/utils/withBaseTheme.d.ts +0 -384
  70. package/openapi/index.ts +0 -31
  71. package/openapi/package.json +0 -5
  72. package/openapi/readme.md +0 -1
@@ -23,6 +23,10 @@ declare const _default: {
23
23
  type: string;
24
24
  minLength: number;
25
25
  };
26
+ className: {
27
+ type: string;
28
+ description: string;
29
+ };
26
30
  type: {
27
31
  type: string;
28
32
  const: string;
@@ -34,6 +38,7 @@ declare const _default: {
34
38
  items?: undefined;
35
39
  text?: undefined;
36
40
  options?: undefined;
41
+ disableFreeText?: undefined;
37
42
  fileUrl?: undefined;
38
43
  latitude?: undefined;
39
44
  longitude?: undefined;
@@ -52,11 +57,10 @@ declare const _default: {
52
57
  };
53
58
  subtitle: {
54
59
  type: string;
55
- minLength: number;
56
60
  };
57
61
  imageUrl: {
58
62
  type: string;
59
- minLength: number;
63
+ minLength?: undefined;
60
64
  };
61
65
  actions: {
62
66
  type: string;
@@ -84,10 +88,15 @@ declare const _default: {
84
88
  type: string;
85
89
  const: string;
86
90
  };
91
+ className: {
92
+ type: string;
93
+ description: string;
94
+ };
87
95
  audioUrl?: undefined;
88
96
  items?: undefined;
89
97
  text?: undefined;
90
98
  options?: undefined;
99
+ disableFreeText?: undefined;
91
100
  fileUrl?: undefined;
92
101
  latitude?: undefined;
93
102
  longitude?: undefined;
@@ -111,11 +120,9 @@ declare const _default: {
111
120
  };
112
121
  subtitle: {
113
122
  type: string;
114
- minLength: number;
115
123
  };
116
124
  imageUrl: {
117
125
  type: string;
118
- minLength: number;
119
126
  };
120
127
  actions: {
121
128
  type: string;
@@ -139,11 +146,19 @@ declare const _default: {
139
146
  additionalProperties: boolean;
140
147
  };
141
148
  };
149
+ className: {
150
+ type: string;
151
+ description: string;
152
+ };
142
153
  };
143
154
  required: string[];
144
155
  additionalProperties: boolean;
145
156
  };
146
157
  };
158
+ className: {
159
+ type: string;
160
+ description: string;
161
+ };
147
162
  type: {
148
163
  type: string;
149
164
  const: string;
@@ -155,6 +170,7 @@ declare const _default: {
155
170
  actions?: undefined;
156
171
  text?: undefined;
157
172
  options?: undefined;
173
+ disableFreeText?: undefined;
158
174
  fileUrl?: undefined;
159
175
  latitude?: undefined;
160
176
  longitude?: undefined;
@@ -169,7 +185,7 @@ declare const _default: {
169
185
  properties: {
170
186
  text: {
171
187
  type: string;
172
- minLength: number;
188
+ minLength?: undefined;
173
189
  };
174
190
  options: {
175
191
  type: string;
@@ -189,10 +205,17 @@ declare const _default: {
189
205
  additionalProperties: boolean;
190
206
  };
191
207
  };
208
+ className: {
209
+ type: string;
210
+ description: string;
211
+ };
192
212
  type: {
193
213
  type: string;
194
214
  const: string;
195
215
  };
216
+ disableFreeText: {
217
+ type: string;
218
+ };
196
219
  audioUrl?: undefined;
197
220
  title?: undefined;
198
221
  subtitle?: undefined;
@@ -208,6 +231,55 @@ declare const _default: {
208
231
  };
209
232
  required: string[];
210
233
  additionalProperties: boolean;
234
+ } | {
235
+ type: string;
236
+ properties: {
237
+ text: {
238
+ type: string;
239
+ minLength?: undefined;
240
+ };
241
+ options: {
242
+ type: string;
243
+ items: {
244
+ type: string;
245
+ properties: {
246
+ label: {
247
+ type: string;
248
+ minLength: number;
249
+ };
250
+ value: {
251
+ type: string;
252
+ minLength: number;
253
+ };
254
+ };
255
+ required: string[];
256
+ additionalProperties: boolean;
257
+ };
258
+ };
259
+ className: {
260
+ type: string;
261
+ description: string;
262
+ };
263
+ type: {
264
+ type: string;
265
+ const: string;
266
+ };
267
+ audioUrl?: undefined;
268
+ title?: undefined;
269
+ subtitle?: undefined;
270
+ imageUrl?: undefined;
271
+ actions?: undefined;
272
+ items?: undefined;
273
+ disableFreeText?: undefined;
274
+ fileUrl?: undefined;
275
+ latitude?: undefined;
276
+ longitude?: undefined;
277
+ address?: undefined;
278
+ markdown?: undefined;
279
+ videoUrl?: undefined;
280
+ };
281
+ required: string[];
282
+ additionalProperties: boolean;
211
283
  } | {
212
284
  type: string;
213
285
  properties: {
@@ -219,6 +291,10 @@ declare const _default: {
219
291
  type: string;
220
292
  minLength: number;
221
293
  };
294
+ className: {
295
+ type: string;
296
+ description: string;
297
+ };
222
298
  type: {
223
299
  type: string;
224
300
  const: string;
@@ -230,6 +306,7 @@ declare const _default: {
230
306
  items?: undefined;
231
307
  text?: undefined;
232
308
  options?: undefined;
309
+ disableFreeText?: undefined;
233
310
  latitude?: undefined;
234
311
  longitude?: undefined;
235
312
  address?: undefined;
@@ -245,6 +322,10 @@ declare const _default: {
245
322
  type: string;
246
323
  minLength: number;
247
324
  };
325
+ className: {
326
+ type: string;
327
+ description: string;
328
+ };
248
329
  type: {
249
330
  type: string;
250
331
  const: string;
@@ -256,6 +337,7 @@ declare const _default: {
256
337
  items?: undefined;
257
338
  text?: undefined;
258
339
  options?: undefined;
340
+ disableFreeText?: undefined;
259
341
  fileUrl?: undefined;
260
342
  latitude?: undefined;
261
343
  longitude?: undefined;
@@ -281,6 +363,10 @@ declare const _default: {
281
363
  type: string;
282
364
  minLength?: undefined;
283
365
  };
366
+ className: {
367
+ type: string;
368
+ description: string;
369
+ };
284
370
  type: {
285
371
  type: string;
286
372
  const: string;
@@ -292,6 +378,7 @@ declare const _default: {
292
378
  items?: undefined;
293
379
  text?: undefined;
294
380
  options?: undefined;
381
+ disableFreeText?: undefined;
295
382
  fileUrl?: undefined;
296
383
  markdown?: undefined;
297
384
  videoUrl?: undefined;
@@ -305,6 +392,10 @@ declare const _default: {
305
392
  type: string;
306
393
  minLength: number;
307
394
  };
395
+ className: {
396
+ type: string;
397
+ description: string;
398
+ };
308
399
  type: {
309
400
  type: string;
310
401
  const: string;
@@ -317,6 +408,7 @@ declare const _default: {
317
408
  items?: undefined;
318
409
  text?: undefined;
319
410
  options?: undefined;
411
+ disableFreeText?: undefined;
320
412
  fileUrl?: undefined;
321
413
  latitude?: undefined;
322
414
  longitude?: undefined;
@@ -332,6 +424,10 @@ declare const _default: {
332
424
  type: string;
333
425
  minLength: number;
334
426
  };
427
+ className: {
428
+ type: string;
429
+ description: string;
430
+ };
335
431
  type: {
336
432
  type: string;
337
433
  const: string;
@@ -343,6 +439,7 @@ declare const _default: {
343
439
  actions?: undefined;
344
440
  items?: undefined;
345
441
  options?: undefined;
442
+ disableFreeText?: undefined;
346
443
  fileUrl?: undefined;
347
444
  latitude?: undefined;
348
445
  longitude?: undefined;
@@ -359,6 +456,10 @@ declare const _default: {
359
456
  type: string;
360
457
  minLength: number;
361
458
  };
459
+ className: {
460
+ type: string;
461
+ description: string;
462
+ };
362
463
  type: {
363
464
  type: string;
364
465
  const: string;
@@ -371,6 +472,7 @@ declare const _default: {
371
472
  items?: undefined;
372
473
  text?: undefined;
373
474
  options?: undefined;
475
+ disableFreeText?: undefined;
374
476
  fileUrl?: undefined;
375
477
  latitude?: undefined;
376
478
  longitude?: undefined;
@@ -10,6 +10,10 @@ export interface MessageCreatedSignal {
10
10
  createdAt: string;
11
11
  payload: {
12
12
  audioUrl: string;
13
+ /**
14
+ * CSS className to apply to the message
15
+ */
16
+ className?: string;
13
17
  type: "audio";
14
18
  } | {
15
19
  title: string;
@@ -21,6 +25,10 @@ export interface MessageCreatedSignal {
21
25
  value: string;
22
26
  }[];
23
27
  type: "card";
28
+ /**
29
+ * CSS className to apply to the message
30
+ */
31
+ className?: string;
24
32
  } | {
25
33
  items: {
26
34
  title: string;
@@ -31,7 +39,15 @@ export interface MessageCreatedSignal {
31
39
  label: string;
32
40
  value: string;
33
41
  }[];
42
+ /**
43
+ * CSS className to apply to the message
44
+ */
45
+ className?: string;
34
46
  }[];
47
+ /**
48
+ * CSS className to apply to the message
49
+ */
50
+ className?: string;
35
51
  type: "carousel";
36
52
  } | {
37
53
  text: string;
@@ -39,35 +55,68 @@ export interface MessageCreatedSignal {
39
55
  label: string;
40
56
  value: string;
41
57
  }[];
58
+ /**
59
+ * CSS className to apply to the message
60
+ */
61
+ className?: string;
42
62
  type: "choice";
63
+ disableFreeText?: boolean;
43
64
  } | {
44
65
  text: string;
45
66
  options: {
46
67
  label: string;
47
68
  value: string;
48
69
  }[];
70
+ /**
71
+ * CSS className to apply to the message
72
+ */
73
+ className?: string;
49
74
  type: "dropdown";
50
75
  } | {
51
76
  fileUrl: string;
52
77
  title?: string;
78
+ /**
79
+ * CSS className to apply to the message
80
+ */
81
+ className?: string;
53
82
  type: "file";
54
83
  } | {
55
84
  imageUrl: string;
85
+ /**
86
+ * CSS className to apply to the message
87
+ */
88
+ className?: string;
56
89
  type: "image";
57
90
  } | {
58
91
  latitude: number;
59
92
  longitude: number;
60
93
  address?: string;
61
94
  title?: string;
95
+ /**
96
+ * CSS className to apply to the message
97
+ */
98
+ className?: string;
62
99
  type: "location";
63
100
  } | {
64
101
  markdown: string;
102
+ /**
103
+ * CSS className to apply to the message
104
+ */
105
+ className?: string;
65
106
  type: "markdown";
66
107
  } | {
67
108
  text: string;
109
+ /**
110
+ * CSS className to apply to the message
111
+ */
112
+ className?: string;
68
113
  type: "text";
69
114
  } | {
70
115
  videoUrl: string;
116
+ /**
117
+ * CSS className to apply to the message
118
+ */
119
+ className?: string;
71
120
  type: "video";
72
121
  };
73
122
  userId: string;