@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
@@ -41,6 +41,7 @@ export interface GetMessageResponse {
41
41
  */
42
42
  className?: string;
43
43
  type: "audio";
44
+ [k: string]: any;
44
45
  } | {
45
46
  title: string;
46
47
  subtitle?: string;
@@ -49,12 +50,14 @@ export interface GetMessageResponse {
49
50
  action: "postback" | "url" | "say";
50
51
  label: string;
51
52
  value: string;
53
+ [k: string]: any;
52
54
  }[];
53
55
  type: "card";
54
56
  /**
55
57
  * CSS className to apply to the message
56
58
  */
57
59
  className?: string;
60
+ [k: string]: any;
58
61
  } | {
59
62
  items: {
60
63
  title: string;
@@ -64,22 +67,26 @@ export interface GetMessageResponse {
64
67
  action: "postback" | "url" | "say";
65
68
  label: string;
66
69
  value: string;
70
+ [k: string]: any;
67
71
  }[];
68
72
  /**
69
73
  * CSS className to apply to the message
70
74
  */
71
75
  className?: string;
76
+ [k: string]: any;
72
77
  }[];
73
78
  /**
74
79
  * CSS className to apply to the message
75
80
  */
76
81
  className?: string;
77
82
  type: "carousel";
83
+ [k: string]: any;
78
84
  } | {
79
85
  text: string;
80
86
  options: {
81
87
  label: string;
82
88
  value: string;
89
+ [k: string]: any;
83
90
  }[];
84
91
  /**
85
92
  * CSS className to apply to the message
@@ -87,17 +94,20 @@ export interface GetMessageResponse {
87
94
  className?: string;
88
95
  type: "choice";
89
96
  disableFreeText?: boolean;
97
+ [k: string]: any;
90
98
  } | {
91
99
  text: string;
92
100
  options: {
93
101
  label: string;
94
102
  value: string;
103
+ [k: string]: any;
95
104
  }[];
96
105
  /**
97
106
  * CSS className to apply to the message
98
107
  */
99
108
  className?: string;
100
109
  type: "dropdown";
110
+ [k: string]: any;
101
111
  } | {
102
112
  fileUrl: string;
103
113
  title?: string;
@@ -106,6 +116,7 @@ export interface GetMessageResponse {
106
116
  */
107
117
  className?: string;
108
118
  type: "file";
119
+ [k: string]: any;
109
120
  } | {
110
121
  imageUrl: string;
111
122
  /**
@@ -113,6 +124,7 @@ export interface GetMessageResponse {
113
124
  */
114
125
  className?: string;
115
126
  type: "image";
127
+ [k: string]: any;
116
128
  } | {
117
129
  latitude: number;
118
130
  longitude: number;
@@ -123,6 +135,7 @@ export interface GetMessageResponse {
123
135
  */
124
136
  className?: string;
125
137
  type: "location";
138
+ [k: string]: any;
126
139
  } | {
127
140
  markdown: string;
128
141
  /**
@@ -130,6 +143,7 @@ export interface GetMessageResponse {
130
143
  */
131
144
  className?: string;
132
145
  type: "markdown";
146
+ [k: string]: any;
133
147
  } | {
134
148
  text: string;
135
149
  /**
@@ -137,6 +151,7 @@ export interface GetMessageResponse {
137
151
  */
138
152
  className?: string;
139
153
  type: "text";
154
+ [k: string]: any;
140
155
  } | {
141
156
  videoUrl: string;
142
157
  /**
@@ -144,6 +159,7 @@ export interface GetMessageResponse {
144
159
  */
145
160
  className?: string;
146
161
  type: "video";
162
+ [k: string]: any;
147
163
  };
148
164
  /**
149
165
  * ID of the [User](#schema_user)
@@ -39,6 +39,7 @@ export interface ListConversationMessagesResponse {
39
39
  */
40
40
  className?: string;
41
41
  type: "audio";
42
+ [k: string]: any;
42
43
  } | {
43
44
  title: string;
44
45
  subtitle?: string;
@@ -47,12 +48,14 @@ export interface ListConversationMessagesResponse {
47
48
  action: "postback" | "url" | "say";
48
49
  label: string;
49
50
  value: string;
51
+ [k: string]: any;
50
52
  }[];
51
53
  type: "card";
52
54
  /**
53
55
  * CSS className to apply to the message
54
56
  */
55
57
  className?: string;
58
+ [k: string]: any;
56
59
  } | {
57
60
  items: {
58
61
  title: string;
@@ -62,22 +65,26 @@ export interface ListConversationMessagesResponse {
62
65
  action: "postback" | "url" | "say";
63
66
  label: string;
64
67
  value: string;
68
+ [k: string]: any;
65
69
  }[];
66
70
  /**
67
71
  * CSS className to apply to the message
68
72
  */
69
73
  className?: string;
74
+ [k: string]: any;
70
75
  }[];
71
76
  /**
72
77
  * CSS className to apply to the message
73
78
  */
74
79
  className?: string;
75
80
  type: "carousel";
81
+ [k: string]: any;
76
82
  } | {
77
83
  text: string;
78
84
  options: {
79
85
  label: string;
80
86
  value: string;
87
+ [k: string]: any;
81
88
  }[];
82
89
  /**
83
90
  * CSS className to apply to the message
@@ -85,17 +92,20 @@ export interface ListConversationMessagesResponse {
85
92
  className?: string;
86
93
  type: "choice";
87
94
  disableFreeText?: boolean;
95
+ [k: string]: any;
88
96
  } | {
89
97
  text: string;
90
98
  options: {
91
99
  label: string;
92
100
  value: string;
101
+ [k: string]: any;
93
102
  }[];
94
103
  /**
95
104
  * CSS className to apply to the message
96
105
  */
97
106
  className?: string;
98
107
  type: "dropdown";
108
+ [k: string]: any;
99
109
  } | {
100
110
  fileUrl: string;
101
111
  title?: string;
@@ -104,6 +114,7 @@ export interface ListConversationMessagesResponse {
104
114
  */
105
115
  className?: string;
106
116
  type: "file";
117
+ [k: string]: any;
107
118
  } | {
108
119
  imageUrl: string;
109
120
  /**
@@ -111,6 +122,7 @@ export interface ListConversationMessagesResponse {
111
122
  */
112
123
  className?: string;
113
124
  type: "image";
125
+ [k: string]: any;
114
126
  } | {
115
127
  latitude: number;
116
128
  longitude: number;
@@ -121,6 +133,7 @@ export interface ListConversationMessagesResponse {
121
133
  */
122
134
  className?: string;
123
135
  type: "location";
136
+ [k: string]: any;
124
137
  } | {
125
138
  markdown: string;
126
139
  /**
@@ -128,6 +141,7 @@ export interface ListConversationMessagesResponse {
128
141
  */
129
142
  className?: string;
130
143
  type: "markdown";
144
+ [k: string]: any;
131
145
  } | {
132
146
  text: string;
133
147
  /**
@@ -135,6 +149,7 @@ export interface ListConversationMessagesResponse {
135
149
  */
136
150
  className?: string;
137
151
  type: "text";
152
+ [k: string]: any;
138
153
  } | {
139
154
  videoUrl: string;
140
155
  /**
@@ -142,6 +157,7 @@ export interface ListConversationMessagesResponse {
142
157
  */
143
158
  className?: string;
144
159
  type: "video";
160
+ [k: string]: any;
145
161
  };
146
162
  /**
147
163
  * ID of the [User](#schema_user)
@@ -1,24 +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
- event: {
12
- type: string;
13
- additionalProperties: {};
14
- };
15
- };
16
- required: string[];
17
- additionalProperties: boolean;
18
- };
19
- };
20
- required: string[];
21
- additionalProperties: boolean;
22
- $schema: string;
23
- };
24
- export default _default;
1
+ import type { JSONSchema7 } from 'json-schema';
2
+ declare const schema: JSONSchema7;
3
+ export default schema;
@@ -1,8 +1,3 @@
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 Custom {
7
2
  type: "custom";
8
3
  data: {
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  declare const _default: z.ZodObject<{
3
3
  type: z.ZodLiteral<"custom">;
4
4
  data: z.ZodObject<{
5
- event: z.ZodRecord<z.ZodString, z.ZodAny>;
5
+ event: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodAny, z.ZodNull]>>;
6
6
  }, "strip", z.ZodTypeAny, {
7
7
  event: Record<string, any>;
8
8
  }, {