@botpress/webchat 1.3.2 → 1.3.3

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 (36) hide show
  1. package/dist/adapters/messaging-to-target.d.ts +58 -26
  2. package/dist/adapters/target.d.ts +5 -0
  3. package/dist/adapters/webchat-to-target.d.ts +56 -32
  4. package/dist/client/MessagingClient/client.d.ts +1 -0
  5. package/dist/client/types.d.ts +1 -0
  6. package/dist/components/Block.d.ts +7 -5
  7. package/dist/contexts/WebchatContext.d.ts +3 -7
  8. package/dist/gen/client/api.d.ts +37 -10
  9. package/dist/gen/signals/{customSignal.t.d.ts → custom.t.d.ts} +1 -1
  10. package/dist/gen/signals/index.d.ts +16 -16
  11. package/dist/gen/signals/{messageCreatedSignal.t.d.ts → messageCreated.t.d.ts} +1 -1
  12. package/dist/gen/signals/{webchatConfigSignal.t.d.ts → webchatConfig.t.d.ts} +1 -1
  13. package/dist/gen/signals/{webchatVisibilitySignal.t.d.ts → webchatVisibility.t.d.ts} +1 -1
  14. package/dist/index.js +768 -734
  15. package/dist/index.umd.cjs +22 -22
  16. package/dist/types/block-type.d.ts +3 -3
  17. package/openapi.ts +4 -5
  18. package/package.json +2 -1
  19. package/dist/gen/models/conversation.j.d.ts +0 -20
  20. package/dist/gen/models/conversation.t.d.ts +0 -10
  21. package/dist/gen/models/conversation.z.d.ts +0 -15
  22. package/dist/gen/models/index.d.ts +0 -1014
  23. package/dist/gen/models/message.j.d.ts +0 -490
  24. package/dist/gen/models/message.t.d.ts +0 -122
  25. package/dist/gen/models/message.z.d.ts +0 -439
  26. package/dist/gen/models/user.j.d.ts +0 -26
  27. package/dist/gen/models/user.t.d.ts +0 -12
  28. package/dist/gen/models/user.z.d.ts +0 -21
  29. /package/dist/gen/signals/{customSignal.j.d.ts → custom.j.d.ts} +0 -0
  30. /package/dist/gen/signals/{customSignal.z.d.ts → custom.z.d.ts} +0 -0
  31. /package/dist/gen/signals/{messageCreatedSignal.j.d.ts → messageCreated.j.d.ts} +0 -0
  32. /package/dist/gen/signals/{messageCreatedSignal.z.d.ts → messageCreated.z.d.ts} +0 -0
  33. /package/dist/gen/signals/{webchatConfigSignal.j.d.ts → webchatConfig.j.d.ts} +0 -0
  34. /package/dist/gen/signals/{webchatConfigSignal.z.d.ts → webchatConfig.z.d.ts} +0 -0
  35. /package/dist/gen/signals/{webchatVisibilitySignal.j.d.ts → webchatVisibility.j.d.ts} +0 -0
  36. /package/dist/gen/signals/{webchatVisibilitySignal.z.d.ts → webchatVisibility.z.d.ts} +0 -0
@@ -1,490 +0,0 @@
1
- declare const _default: {
2
- type: string;
3
- properties: {
4
- id: {
5
- type: string;
6
- };
7
- createdAt: {
8
- type: string;
9
- format: string;
10
- };
11
- payload: {
12
- anyOf: ({
13
- type: string;
14
- properties: {
15
- audioUrl: {
16
- type: string;
17
- minLength: number;
18
- };
19
- className: {
20
- type: string;
21
- description: string;
22
- };
23
- type: {
24
- type: string;
25
- const: string;
26
- };
27
- title?: undefined;
28
- subtitle?: undefined;
29
- imageUrl?: undefined;
30
- actions?: undefined;
31
- items?: undefined;
32
- text?: undefined;
33
- options?: undefined;
34
- disableFreeText?: undefined;
35
- fileUrl?: undefined;
36
- latitude?: undefined;
37
- longitude?: undefined;
38
- address?: undefined;
39
- markdown?: undefined;
40
- videoUrl?: undefined;
41
- };
42
- required: string[];
43
- additionalProperties: boolean;
44
- } | {
45
- type: string;
46
- properties: {
47
- title: {
48
- type: string;
49
- minLength: number;
50
- };
51
- subtitle: {
52
- type: string;
53
- };
54
- imageUrl: {
55
- type: string;
56
- minLength?: undefined;
57
- };
58
- actions: {
59
- type: string;
60
- items: {
61
- type: string;
62
- properties: {
63
- action: {
64
- type: string;
65
- enum: string[];
66
- };
67
- label: {
68
- type: string;
69
- minLength: number;
70
- };
71
- value: {
72
- type: string;
73
- minLength: number;
74
- };
75
- };
76
- required: string[];
77
- additionalProperties: boolean;
78
- };
79
- };
80
- type: {
81
- type: string;
82
- const: string;
83
- };
84
- className: {
85
- type: string;
86
- description: string;
87
- };
88
- audioUrl?: undefined;
89
- items?: undefined;
90
- text?: undefined;
91
- options?: undefined;
92
- disableFreeText?: undefined;
93
- fileUrl?: undefined;
94
- latitude?: undefined;
95
- longitude?: undefined;
96
- address?: undefined;
97
- markdown?: undefined;
98
- videoUrl?: undefined;
99
- };
100
- required: string[];
101
- additionalProperties: boolean;
102
- } | {
103
- type: string;
104
- properties: {
105
- items: {
106
- type: string;
107
- items: {
108
- type: string;
109
- properties: {
110
- title: {
111
- type: string;
112
- minLength: number;
113
- };
114
- subtitle: {
115
- type: string;
116
- };
117
- imageUrl: {
118
- type: string;
119
- };
120
- actions: {
121
- type: string;
122
- items: {
123
- type: string;
124
- properties: {
125
- action: {
126
- type: string;
127
- enum: string[];
128
- };
129
- label: {
130
- type: string;
131
- minLength: number;
132
- };
133
- value: {
134
- type: string;
135
- minLength: number;
136
- };
137
- };
138
- required: string[];
139
- additionalProperties: boolean;
140
- };
141
- };
142
- className: {
143
- type: string;
144
- description: string;
145
- };
146
- };
147
- required: string[];
148
- additionalProperties: boolean;
149
- };
150
- };
151
- className: {
152
- type: string;
153
- description: string;
154
- };
155
- type: {
156
- type: string;
157
- const: string;
158
- };
159
- audioUrl?: undefined;
160
- title?: undefined;
161
- subtitle?: undefined;
162
- imageUrl?: undefined;
163
- actions?: undefined;
164
- text?: undefined;
165
- options?: undefined;
166
- disableFreeText?: undefined;
167
- fileUrl?: undefined;
168
- latitude?: undefined;
169
- longitude?: undefined;
170
- address?: undefined;
171
- markdown?: undefined;
172
- videoUrl?: undefined;
173
- };
174
- required: string[];
175
- additionalProperties: boolean;
176
- } | {
177
- type: string;
178
- properties: {
179
- text: {
180
- type: string;
181
- minLength?: undefined;
182
- };
183
- options: {
184
- type: string;
185
- items: {
186
- type: string;
187
- properties: {
188
- label: {
189
- type: string;
190
- minLength: number;
191
- };
192
- value: {
193
- type: string;
194
- minLength: number;
195
- };
196
- };
197
- required: string[];
198
- additionalProperties: boolean;
199
- };
200
- };
201
- className: {
202
- type: string;
203
- description: string;
204
- };
205
- type: {
206
- type: string;
207
- const: string;
208
- };
209
- disableFreeText: {
210
- type: string;
211
- };
212
- audioUrl?: undefined;
213
- title?: undefined;
214
- subtitle?: undefined;
215
- imageUrl?: undefined;
216
- actions?: undefined;
217
- items?: undefined;
218
- fileUrl?: undefined;
219
- latitude?: undefined;
220
- longitude?: undefined;
221
- address?: undefined;
222
- markdown?: undefined;
223
- videoUrl?: undefined;
224
- };
225
- required: string[];
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;
276
- } | {
277
- type: string;
278
- properties: {
279
- fileUrl: {
280
- type: string;
281
- minLength: number;
282
- };
283
- title: {
284
- type: string;
285
- minLength: number;
286
- };
287
- className: {
288
- type: string;
289
- description: string;
290
- };
291
- type: {
292
- type: string;
293
- const: string;
294
- };
295
- audioUrl?: undefined;
296
- subtitle?: undefined;
297
- imageUrl?: undefined;
298
- actions?: undefined;
299
- items?: undefined;
300
- text?: undefined;
301
- options?: undefined;
302
- disableFreeText?: undefined;
303
- latitude?: undefined;
304
- longitude?: undefined;
305
- address?: undefined;
306
- markdown?: undefined;
307
- videoUrl?: undefined;
308
- };
309
- required: string[];
310
- additionalProperties: boolean;
311
- } | {
312
- type: string;
313
- properties: {
314
- imageUrl: {
315
- type: string;
316
- minLength: number;
317
- };
318
- className: {
319
- type: string;
320
- description: string;
321
- };
322
- type: {
323
- type: string;
324
- const: string;
325
- };
326
- audioUrl?: undefined;
327
- title?: undefined;
328
- subtitle?: undefined;
329
- actions?: undefined;
330
- items?: undefined;
331
- text?: undefined;
332
- options?: undefined;
333
- disableFreeText?: undefined;
334
- fileUrl?: undefined;
335
- latitude?: undefined;
336
- longitude?: undefined;
337
- address?: undefined;
338
- markdown?: undefined;
339
- videoUrl?: undefined;
340
- };
341
- required: string[];
342
- additionalProperties: boolean;
343
- } | {
344
- type: string;
345
- properties: {
346
- latitude: {
347
- type: string;
348
- };
349
- longitude: {
350
- type: string;
351
- };
352
- address: {
353
- type: string;
354
- };
355
- title: {
356
- type: string;
357
- minLength?: undefined;
358
- };
359
- className: {
360
- type: string;
361
- description: string;
362
- };
363
- type: {
364
- type: string;
365
- const: string;
366
- };
367
- audioUrl?: undefined;
368
- subtitle?: undefined;
369
- imageUrl?: undefined;
370
- actions?: undefined;
371
- items?: undefined;
372
- text?: undefined;
373
- options?: undefined;
374
- disableFreeText?: undefined;
375
- fileUrl?: undefined;
376
- markdown?: undefined;
377
- videoUrl?: undefined;
378
- };
379
- required: string[];
380
- additionalProperties: boolean;
381
- } | {
382
- type: string;
383
- properties: {
384
- markdown: {
385
- type: string;
386
- minLength: number;
387
- };
388
- className: {
389
- type: string;
390
- description: string;
391
- };
392
- type: {
393
- type: string;
394
- const: string;
395
- };
396
- audioUrl?: undefined;
397
- title?: undefined;
398
- subtitle?: undefined;
399
- imageUrl?: undefined;
400
- actions?: undefined;
401
- items?: undefined;
402
- text?: undefined;
403
- options?: undefined;
404
- disableFreeText?: undefined;
405
- fileUrl?: undefined;
406
- latitude?: undefined;
407
- longitude?: undefined;
408
- address?: undefined;
409
- videoUrl?: undefined;
410
- };
411
- required: string[];
412
- additionalProperties: boolean;
413
- } | {
414
- type: string;
415
- properties: {
416
- text: {
417
- type: string;
418
- minLength: number;
419
- };
420
- className: {
421
- type: string;
422
- description: string;
423
- };
424
- type: {
425
- type: string;
426
- const: string;
427
- };
428
- audioUrl?: undefined;
429
- title?: undefined;
430
- subtitle?: undefined;
431
- imageUrl?: undefined;
432
- actions?: undefined;
433
- items?: undefined;
434
- options?: undefined;
435
- disableFreeText?: undefined;
436
- fileUrl?: undefined;
437
- latitude?: undefined;
438
- longitude?: undefined;
439
- address?: undefined;
440
- markdown?: undefined;
441
- videoUrl?: undefined;
442
- };
443
- required: string[];
444
- additionalProperties: boolean;
445
- } | {
446
- type: string;
447
- properties: {
448
- videoUrl: {
449
- type: string;
450
- minLength: number;
451
- };
452
- className: {
453
- type: string;
454
- description: string;
455
- };
456
- type: {
457
- type: string;
458
- const: string;
459
- };
460
- audioUrl?: undefined;
461
- title?: undefined;
462
- subtitle?: undefined;
463
- imageUrl?: undefined;
464
- actions?: undefined;
465
- items?: undefined;
466
- text?: undefined;
467
- options?: undefined;
468
- disableFreeText?: undefined;
469
- fileUrl?: undefined;
470
- latitude?: undefined;
471
- longitude?: undefined;
472
- address?: undefined;
473
- markdown?: undefined;
474
- };
475
- required: string[];
476
- additionalProperties: boolean;
477
- })[];
478
- };
479
- userId: {
480
- type: string;
481
- };
482
- conversationId: {
483
- type: string;
484
- };
485
- };
486
- required: string[];
487
- additionalProperties: boolean;
488
- $schema: string;
489
- };
490
- export default _default;
@@ -1,122 +0,0 @@
1
- /**
2
- * This file was automatically generated by json-schema-to-typescript.
3
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4
- * and run json-schema-to-typescript to regenerate this file.
5
- */
6
- export interface Message {
7
- id: string;
8
- createdAt: string;
9
- payload: {
10
- audioUrl: string;
11
- /**
12
- * CSS className to apply to the message
13
- */
14
- className?: string;
15
- type: "audio";
16
- } | {
17
- title: string;
18
- subtitle?: string;
19
- imageUrl?: string;
20
- actions: {
21
- action: "postback" | "url" | "say";
22
- label: string;
23
- value: string;
24
- }[];
25
- type: "card";
26
- /**
27
- * CSS className to apply to the message
28
- */
29
- className?: string;
30
- } | {
31
- items: {
32
- title: string;
33
- subtitle?: string;
34
- imageUrl?: string;
35
- actions: {
36
- action: "postback" | "url" | "say";
37
- label: string;
38
- value: string;
39
- }[];
40
- /**
41
- * CSS className to apply to the message
42
- */
43
- className?: string;
44
- }[];
45
- /**
46
- * CSS className to apply to the message
47
- */
48
- className?: string;
49
- type: "carousel";
50
- } | {
51
- text: string;
52
- options: {
53
- label: string;
54
- value: string;
55
- }[];
56
- /**
57
- * CSS className to apply to the message
58
- */
59
- className?: string;
60
- type: "choice";
61
- disableFreeText?: boolean;
62
- } | {
63
- text: string;
64
- options: {
65
- label: string;
66
- value: string;
67
- }[];
68
- /**
69
- * CSS className to apply to the message
70
- */
71
- className?: string;
72
- type: "dropdown";
73
- } | {
74
- fileUrl: string;
75
- title?: string;
76
- /**
77
- * CSS className to apply to the message
78
- */
79
- className?: string;
80
- type: "file";
81
- } | {
82
- imageUrl: string;
83
- /**
84
- * CSS className to apply to the message
85
- */
86
- className?: string;
87
- type: "image";
88
- } | {
89
- latitude: number;
90
- longitude: number;
91
- address?: string;
92
- title?: string;
93
- /**
94
- * CSS className to apply to the message
95
- */
96
- className?: string;
97
- type: "location";
98
- } | {
99
- markdown: string;
100
- /**
101
- * CSS className to apply to the message
102
- */
103
- className?: string;
104
- type: "markdown";
105
- } | {
106
- text: string;
107
- /**
108
- * CSS className to apply to the message
109
- */
110
- className?: string;
111
- type: "text";
112
- } | {
113
- videoUrl: string;
114
- /**
115
- * CSS className to apply to the message
116
- */
117
- className?: string;
118
- type: "video";
119
- };
120
- userId: string;
121
- conversationId: string;
122
- }