@botpress/webchat 2.1.3 → 2.1.5

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