@botonic/shared 2.23.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.
- package/CHANGELOG.md +240 -0
- package/README.md +9 -0
- package/package.json +16 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -0
- package/src/lib/ai-agents-types.d.ts +69 -0
- package/src/lib/ai-agents-types.js +2 -0
- package/src/lib/ai-agents-types.js.map +1 -0
- package/src/lib/domain/botonic/exceptions.d.ts +7 -0
- package/src/lib/domain/botonic/exceptions.js +12 -0
- package/src/lib/domain/botonic/exceptions.js.map +1 -0
- package/src/lib/domain/botonic/index.d.ts +9 -0
- package/src/lib/domain/botonic/index.js +10 -0
- package/src/lib/domain/botonic/index.js.map +1 -0
- package/src/lib/domain/botonic/inputs.d.ts +48 -0
- package/src/lib/domain/botonic/inputs.js +60 -0
- package/src/lib/domain/botonic/inputs.js.map +1 -0
- package/src/lib/domain/botonic/legacy/index.d.ts +2 -0
- package/src/lib/domain/botonic/legacy/index.js +3 -0
- package/src/lib/domain/botonic/legacy/index.js.map +1 -0
- package/src/lib/domain/botonic/legacy/input-adapter.d.ts +25 -0
- package/src/lib/domain/botonic/legacy/input-adapter.js +203 -0
- package/src/lib/domain/botonic/legacy/input-adapter.js.map +1 -0
- package/src/lib/domain/botonic/legacy/types.d.ts +32 -0
- package/src/lib/domain/botonic/legacy/types.js +2 -0
- package/src/lib/domain/botonic/legacy/types.js.map +1 -0
- package/src/lib/domain/botonic/metadata.d.ts +36 -0
- package/src/lib/domain/botonic/metadata.js +2 -0
- package/src/lib/domain/botonic/metadata.js.map +1 -0
- package/src/lib/domain/botonic/outputs.d.ts +101 -0
- package/src/lib/domain/botonic/outputs.js +119 -0
- package/src/lib/domain/botonic/outputs.js.map +1 -0
- package/src/lib/domain/botonic/types.d.ts +109 -0
- package/src/lib/domain/botonic/types.js +119 -0
- package/src/lib/domain/botonic/types.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/index.d.ts +8 -0
- package/src/lib/domain/botonic/whatsapp-outputs/index.js +9 -0
- package/src/lib/domain/botonic/whatsapp-outputs/index.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-button-list/index.d.ts +17 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-button-list/index.js +10 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-button-list/index.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-button-list/types.d.ts +9 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-button-list/types.js +2 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-button-list/types.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-catalog/index.d.ts +12 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-catalog/index.js +8 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-catalog/index.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-cta-url-button/index.d.ts +30 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-cta-url-button/index.js +21 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-cta-url-button/index.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-media-carousel/index.d.ts +15 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-media-carousel/index.js +9 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-media-carousel/index.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-media-carousel/types.d.ts +15 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-media-carousel/types.js +2 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-media-carousel/types.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-product/index.d.ts +14 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-product/index.js +9 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-product/index.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-product-carousel/index.d.ts +19 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-product-carousel/index.js +9 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-product-carousel/index.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-product-list/index.d.ts +17 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-product-list/index.js +12 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-product-list/index.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-product-list/types.d.ts +13 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-product-list/types.js +7 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-product-list/types.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-template/index.d.ts +16 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-template/index.js +12 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-template/index.js.map +1 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-template/types.d.ts +104 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-template/types.js +106 -0
- package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-template/types.js.map +1 -0
- package/src/lib/domain/index.d.ts +3 -0
- package/src/lib/domain/index.js +7 -0
- package/src/lib/domain/index.js.map +1 -0
- package/src/lib/domain/server/bot-server-message.d.ts +65 -0
- package/src/lib/domain/server/bot-server-message.js +106 -0
- package/src/lib/domain/server/bot-server-message.js.map +1 -0
- package/src/lib/domain/server/botonic-context/botonic-context-input.d.ts +99 -0
- package/src/lib/domain/server/botonic-context/botonic-context-input.js +124 -0
- package/src/lib/domain/server/botonic-context/botonic-context-input.js.map +1 -0
- package/src/lib/domain/server/botonic-context/botonic-context-session.d.ts +146 -0
- package/src/lib/domain/server/botonic-context/botonic-context-session.js +209 -0
- package/src/lib/domain/server/botonic-context/botonic-context-session.js.map +1 -0
- package/src/lib/domain/server/botonic-context/botonic-context.d.ts +56 -0
- package/src/lib/domain/server/botonic-context/botonic-context.js +23 -0
- package/src/lib/domain/server/botonic-context/botonic-context.js.map +1 -0
- package/src/lib/domain/server/botonic-context/factory.d.ts +23 -0
- package/src/lib/domain/server/botonic-context/factory.js +31 -0
- package/src/lib/domain/server/botonic-context/factory.js.map +1 -0
- package/src/lib/domain/server/botonic-context/index.d.ts +5 -0
- package/src/lib/domain/server/botonic-context/index.js +6 -0
- package/src/lib/domain/server/botonic-context/index.js.map +1 -0
- package/src/lib/domain/server/botonic-context/types.d.ts +20 -0
- package/src/lib/domain/server/botonic-context/types.js +6 -0
- package/src/lib/domain/server/botonic-context/types.js.map +1 -0
- package/src/lib/domain/server/factory.d.ts +166 -0
- package/src/lib/domain/server/factory.js +166 -0
- package/src/lib/domain/server/factory.js.map +1 -0
- package/src/lib/domain/server/index.d.ts +3 -0
- package/src/lib/domain/server/index.js +4 -0
- package/src/lib/domain/server/index.js.map +1 -0
- package/src/lib/domain/utils.d.ts +5 -0
- package/src/lib/domain/utils.js +13 -0
- package/src/lib/domain/utils.js.map +1 -0
- package/src/lib/domain/webchat/factory.d.ts +81 -0
- package/src/lib/domain/webchat/factory.js +73 -0
- package/src/lib/domain/webchat/factory.js.map +1 -0
- package/src/lib/domain/webchat/index.d.ts +4 -0
- package/src/lib/domain/webchat/index.js +5 -0
- package/src/lib/domain/webchat/index.js.map +1 -0
- package/src/lib/domain/webchat/realtime/factory.d.ts +52 -0
- package/src/lib/domain/webchat/realtime/factory.js +66 -0
- package/src/lib/domain/webchat/realtime/factory.js.map +1 -0
- package/src/lib/domain/webchat/realtime/index.d.ts +2 -0
- package/src/lib/domain/webchat/realtime/index.js +3 -0
- package/src/lib/domain/webchat/realtime/index.js.map +1 -0
- package/src/lib/domain/webchat/realtime/realtime-response-message.d.ts +47 -0
- package/src/lib/domain/webchat/realtime/realtime-response-message.js +68 -0
- package/src/lib/domain/webchat/realtime/realtime-response-message.js.map +1 -0
- package/src/lib/domain/webchat/user/factory.d.ts +52 -0
- package/src/lib/domain/webchat/user/factory.js +59 -0
- package/src/lib/domain/webchat/user/factory.js.map +1 -0
- package/src/lib/domain/webchat/user/index.d.ts +2 -0
- package/src/lib/domain/webchat/user/index.js +3 -0
- package/src/lib/domain/webchat/user/index.js.map +1 -0
- package/src/lib/domain/webchat/user/user-input-message.d.ts +34 -0
- package/src/lib/domain/webchat/user/user-input-message.js +59 -0
- package/src/lib/domain/webchat/user/user-input-message.js.map +1 -0
- package/src/lib/domain/webchat/webchat-message.d.ts +55 -0
- package/src/lib/domain/webchat/webchat-message.js +69 -0
- package/src/lib/domain/webchat/webchat-message.js.map +1 -0
- package/src/lib/hubtype-analytics-types.d.ts +227 -0
- package/src/lib/hubtype-analytics-types.js +41 -0
- package/src/lib/hubtype-analytics-types.js.map +1 -0
- package/src/lib/index.d.ts +6 -0
- package/src/lib/index.js +13 -0
- package/src/lib/index.js.map +1 -0
- package/src/lib/services/webchat-api.d.ts +16 -0
- package/src/lib/services/webchat-api.js +2 -0
- package/src/lib/services/webchat-api.js.map +1 -0
- package/src/lib/shared-types.d.ts +28 -0
- package/src/lib/shared-types.js +32 -0
- package/src/lib/shared-types.js.map +1 -0
- package/src/lib/utils/index.d.ts +1 -0
- package/src/lib/utils/index.js +2 -0
- package/src/lib/utils/index.js.map +1 -0
- package/src/lib/utils/logging.d.ts +1 -0
- package/src/lib/utils/logging.js +22 -0
- package/src/lib/utils/logging.js.map +1 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
## 2.23.0 (2026-03-23)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 2.22.1 (2026-03-19)
|
|
6
|
+
|
|
7
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
8
|
+
|
|
9
|
+
## 2.22.0 (2026-03-16)
|
|
10
|
+
|
|
11
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
12
|
+
|
|
13
|
+
## 2.21.0 (2026-03-16)
|
|
14
|
+
|
|
15
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
16
|
+
|
|
17
|
+
## 2.20.0 (2026-03-13)
|
|
18
|
+
|
|
19
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
20
|
+
|
|
21
|
+
## 2.19.0 (2026-03-12)
|
|
22
|
+
|
|
23
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
24
|
+
|
|
25
|
+
## 2.18.0 (2026-03-04)
|
|
26
|
+
|
|
27
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
28
|
+
|
|
29
|
+
## 2.17.0 (2026-03-02)
|
|
30
|
+
|
|
31
|
+
### 🚀 Features
|
|
32
|
+
|
|
33
|
+
- botonic working with v2 input format ([#660](https://github.com/metis-ai/hubtype-product/pull/660))
|
|
34
|
+
|
|
35
|
+
### ❤️ Thank You
|
|
36
|
+
|
|
37
|
+
- Marc Rabat @vanbasten17
|
|
38
|
+
|
|
39
|
+
## 2.16.0 (2026-02-23)
|
|
40
|
+
|
|
41
|
+
### 🚀 Features
|
|
42
|
+
|
|
43
|
+
- add legacy input to v2 input adapter and missing defs ([#680](https://github.com/metis-ai/hubtype-product/pull/680))
|
|
44
|
+
- add BotonicContext (will substitute BotContext) ([#677](https://github.com/metis-ai/hubtype-product/pull/677))
|
|
45
|
+
|
|
46
|
+
### ❤️ Thank You
|
|
47
|
+
|
|
48
|
+
- Marc Rabat @vanbasten17
|
|
49
|
+
|
|
50
|
+
## 2.15.0 (2026-02-13)
|
|
51
|
+
|
|
52
|
+
### 🚀 Features
|
|
53
|
+
|
|
54
|
+
- update types for whatsapp template ([#658](https://github.com/metis-ai/hubtype-product/pull/658))
|
|
55
|
+
|
|
56
|
+
### ❤️ Thank You
|
|
57
|
+
|
|
58
|
+
- Oriol Raventós @Iru89
|
|
59
|
+
|
|
60
|
+
## 2.14.0 (2026-02-05)
|
|
61
|
+
|
|
62
|
+
### 🩹 Fixes
|
|
63
|
+
|
|
64
|
+
- **botonic:** align tsconfig outDir with Nx outputPath to fix TS6305 errors ([#594](https://github.com/metis-ai/hubtype-product/pull/594))
|
|
65
|
+
- reference as carousel instead of carrousel ([#542](https://github.com/metis-ai/hubtype-product/pull/542))
|
|
66
|
+
|
|
67
|
+
### ❤️ Thank You
|
|
68
|
+
|
|
69
|
+
- Marc Rabat @vanbasten17
|
|
70
|
+
|
|
71
|
+
## 2.13.4 (2026-02-02)
|
|
72
|
+
|
|
73
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
74
|
+
|
|
75
|
+
## 2.13.3 (2026-01-30)
|
|
76
|
+
|
|
77
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
78
|
+
|
|
79
|
+
## 2.13.2 (2026-01-30)
|
|
80
|
+
|
|
81
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
82
|
+
|
|
83
|
+
## 2.13.1 (2026-01-30)
|
|
84
|
+
|
|
85
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
86
|
+
|
|
87
|
+
## 2.13.0 (2026-01-29)
|
|
88
|
+
|
|
89
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
90
|
+
|
|
91
|
+
## 2.12.0 (2026-01-28)
|
|
92
|
+
|
|
93
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
94
|
+
|
|
95
|
+
## 2.11.5 (2026-01-28)
|
|
96
|
+
|
|
97
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
98
|
+
|
|
99
|
+
## 2.11.4 (2026-01-28)
|
|
100
|
+
|
|
101
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
102
|
+
|
|
103
|
+
## 2.11.3 (2026-01-28)
|
|
104
|
+
|
|
105
|
+
### 🩹 Fixes
|
|
106
|
+
|
|
107
|
+
- update entrypoints to use .js and .d.ts extensions for module and types ([#552](https://github.com/metis-ai/hubtype-product/pull/552))
|
|
108
|
+
|
|
109
|
+
### ❤️ Thank You
|
|
110
|
+
|
|
111
|
+
- David Hidalgo @Davidhidalgo
|
|
112
|
+
|
|
113
|
+
## 2.11.2 (2026-01-21)
|
|
114
|
+
|
|
115
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
116
|
+
|
|
117
|
+
## 2.11.1 (2026-01-21)
|
|
118
|
+
|
|
119
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
120
|
+
|
|
121
|
+
## 2.11.0 (2026-01-21)
|
|
122
|
+
|
|
123
|
+
### 🚀 Features
|
|
124
|
+
|
|
125
|
+
- use webview contents hook in botonic webviews package #BLT-2039 ([#510](https://github.com/metis-ai/hubtype-product/pull/510))
|
|
126
|
+
|
|
127
|
+
### ❤️ Thank You
|
|
128
|
+
|
|
129
|
+
- Marc Rabat @vanbasten17
|
|
130
|
+
|
|
131
|
+
## 2.10.1 (2026-01-19)
|
|
132
|
+
|
|
133
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
134
|
+
|
|
135
|
+
## 2.10.0 (2026-01-18)
|
|
136
|
+
|
|
137
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
138
|
+
|
|
139
|
+
## 2.9.1 (2026-01-17)
|
|
140
|
+
|
|
141
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
142
|
+
|
|
143
|
+
## 2.9.0 (2026-01-17)
|
|
144
|
+
|
|
145
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
146
|
+
|
|
147
|
+
## 2.8.1 (2026-01-16)
|
|
148
|
+
|
|
149
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
150
|
+
|
|
151
|
+
## 2.8.0 (2026-01-16)
|
|
152
|
+
|
|
153
|
+
### 🚀 Features
|
|
154
|
+
|
|
155
|
+
- bump version ([#521](https://github.com/metis-ai/hubtype-product/pull/521))
|
|
156
|
+
|
|
157
|
+
### ❤️ Thank You
|
|
158
|
+
|
|
159
|
+
- David Hidalgo @Davidhidalgo
|
|
160
|
+
|
|
161
|
+
## 2.7.1 (2026-01-16)
|
|
162
|
+
|
|
163
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
164
|
+
|
|
165
|
+
## 2.7.0 (2026-01-15)
|
|
166
|
+
|
|
167
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
168
|
+
|
|
169
|
+
## 2.6.0 (2025-12-09)
|
|
170
|
+
|
|
171
|
+
### 🚀 Features
|
|
172
|
+
|
|
173
|
+
- plugin-flow-builder enable SmartIntents and add tests ([#469](https://github.com/metis-ai/hubtype-product/pull/469))
|
|
174
|
+
|
|
175
|
+
### ❤️ Thank You
|
|
176
|
+
|
|
177
|
+
- Oriol Raventós @Iru89
|
|
178
|
+
|
|
179
|
+
## 2.5.0 (2025-12-09)
|
|
180
|
+
|
|
181
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
182
|
+
|
|
183
|
+
## 2.4.1 (2025-12-08)
|
|
184
|
+
|
|
185
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
186
|
+
|
|
187
|
+
## 2.4.0 (2025-12-05)
|
|
188
|
+
|
|
189
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
190
|
+
|
|
191
|
+
## 2.3.3 (2025-12-04)
|
|
192
|
+
|
|
193
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
194
|
+
|
|
195
|
+
## 2.3.2 (2025-12-04)
|
|
196
|
+
|
|
197
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
198
|
+
|
|
199
|
+
## 2.3.1 (2025-12-04)
|
|
200
|
+
|
|
201
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
202
|
+
|
|
203
|
+
## 2.3.0 (2025-12-04)
|
|
204
|
+
|
|
205
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
206
|
+
|
|
207
|
+
## 2.2.1 (2025-12-04)
|
|
208
|
+
|
|
209
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
|
210
|
+
|
|
211
|
+
## 2.2.0 (2025-12-04)
|
|
212
|
+
|
|
213
|
+
### 🚀 Features
|
|
214
|
+
|
|
215
|
+
- receiving unsent messages through pusher auth ([#453](https://github.com/metis-ai/hubtype-product/pull/453))
|
|
216
|
+
- add support for all whatsapp outputs in domain, factories and whatsapp flow content fields ([#434](https://github.com/metis-ai/hubtype-product/pull/434))
|
|
217
|
+
- implement locale detection and user data handling in webchat, refactor user-related methods for consistency #BLT-2045 ([#435](https://github.com/metis-ai/hubtype-product/pull/435))
|
|
218
|
+
- fine tuning botonic release #BLT-2010 ([#428](https://github.com/metis-ai/hubtype-product/pull/428))
|
|
219
|
+
|
|
220
|
+
### ❤️ Thank You
|
|
221
|
+
|
|
222
|
+
- David Hidalgo @Davidhidalgo
|
|
223
|
+
- Marc Rabat @vanbasten17
|
|
224
|
+
|
|
225
|
+
## 2.1.0 (2025-12-02)
|
|
226
|
+
|
|
227
|
+
### 🚀 Features
|
|
228
|
+
|
|
229
|
+
- add support for all whatsapp outputs in domain, factories and whatsapp flow content fields ([#434](https://github.com/metis-ai/hubtype-product/pull/434))
|
|
230
|
+
- implement locale detection and user data handling in webchat, refactor user-related methods for consistency #BLT-2045 ([#435](https://github.com/metis-ai/hubtype-product/pull/435))
|
|
231
|
+
- fine tuning botonic release #BLT-2010 ([#428](https://github.com/metis-ai/hubtype-product/pull/428))
|
|
232
|
+
|
|
233
|
+
### ❤️ Thank You
|
|
234
|
+
|
|
235
|
+
- David Hidalgo @Davidhidalgo
|
|
236
|
+
- Marc Rabat @vanbasten17
|
|
237
|
+
|
|
238
|
+
## 2.0.1-alpha.0 (2025-11-27)
|
|
239
|
+
|
|
240
|
+
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@botonic/shared",
|
|
3
|
+
"version": "2.23.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"module": "./src/index.js",
|
|
6
|
+
"types": "./src/index.d.ts",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"tslib": "^2.3.0",
|
|
9
|
+
"uuid": "^11.1.0",
|
|
10
|
+
"vite": "7.1.9"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"main": "./src/index.js"
|
|
16
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib';
|
package/src/index.js
ADDED
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/botonic/shared/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
interface BaseAiAgentMessage {
|
|
2
|
+
type: 'text' | 'textWithButtons' | 'carousel' | 'exit';
|
|
3
|
+
}
|
|
4
|
+
export interface Button {
|
|
5
|
+
text: string;
|
|
6
|
+
payload?: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TextMessage extends BaseAiAgentMessage {
|
|
10
|
+
type: 'text';
|
|
11
|
+
content: {
|
|
12
|
+
text: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface TextWithButtonsMessage extends BaseAiAgentMessage {
|
|
16
|
+
type: 'textWithButtons';
|
|
17
|
+
content: {
|
|
18
|
+
text: string;
|
|
19
|
+
buttons: Button[];
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
interface CarouselElement {
|
|
23
|
+
title: string;
|
|
24
|
+
subtitle: string;
|
|
25
|
+
image: string;
|
|
26
|
+
button: Button;
|
|
27
|
+
}
|
|
28
|
+
export interface CarouselMessage extends BaseAiAgentMessage {
|
|
29
|
+
type: 'carousel';
|
|
30
|
+
content: {
|
|
31
|
+
text?: string;
|
|
32
|
+
elements: CarouselElement[];
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface ExitMessage extends BaseAiAgentMessage {
|
|
36
|
+
type: 'exit';
|
|
37
|
+
}
|
|
38
|
+
export type OutputMessage = TextMessage | TextWithButtonsMessage | CarouselMessage | ExitMessage;
|
|
39
|
+
export type AgenticOutputMessage = Exclude<OutputMessage, ExitMessage>;
|
|
40
|
+
export interface ToolExecution {
|
|
41
|
+
toolName: string;
|
|
42
|
+
toolArguments: Record<string, any>;
|
|
43
|
+
knowledgebaseSourcesIds?: string[];
|
|
44
|
+
knowledgebaseChunksIds?: string[];
|
|
45
|
+
}
|
|
46
|
+
export interface RunResult {
|
|
47
|
+
messages: AgenticOutputMessage[];
|
|
48
|
+
toolsExecuted: ToolExecution[];
|
|
49
|
+
memoryLength: number;
|
|
50
|
+
exit: boolean;
|
|
51
|
+
error: boolean;
|
|
52
|
+
inputGuardrailsTriggered: string[];
|
|
53
|
+
outputGuardrailsTriggered: string[];
|
|
54
|
+
}
|
|
55
|
+
export type InferenceResponse = RunResult;
|
|
56
|
+
export interface GuardrailRule {
|
|
57
|
+
name: string;
|
|
58
|
+
description: string;
|
|
59
|
+
}
|
|
60
|
+
export interface AiAgentArgs {
|
|
61
|
+
name: string;
|
|
62
|
+
instructions: string;
|
|
63
|
+
activeTools?: {
|
|
64
|
+
name: string;
|
|
65
|
+
}[];
|
|
66
|
+
inputGuardrailRules?: GuardrailRule[];
|
|
67
|
+
sourceIds?: string[];
|
|
68
|
+
}
|
|
69
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-agents-types.js","sourceRoot":"","sources":["../../../../../../libs/botonic/shared/src/lib/ai-agents-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
class BotonicException extends Error {
|
|
2
|
+
constructor(message) {
|
|
3
|
+
super(message);
|
|
4
|
+
this.name = 'BotonicException';
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export class BotonicMissingAttachmentUrlOrContentException extends BotonicException {
|
|
8
|
+
constructor() {
|
|
9
|
+
super('Missing attachment_url or attachment_content');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=exceptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/exceptions.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAiB,SAAQ,KAAK;IAClC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAA;IAChC,CAAC;CACF;AAED,MAAM,OAAO,6CAA8C,SAAQ,gBAAgB;IACjF;QACE,KAAK,CAAC,8CAA8C,CAAC,CAAA;IACvD,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from '../server/botonic-context';
|
|
2
|
+
export * from '../server/botonic-context/botonic-context-input';
|
|
3
|
+
export * from '../server/botonic-context/botonic-context-session';
|
|
4
|
+
export * from './inputs';
|
|
5
|
+
export * from './legacy';
|
|
6
|
+
export * from './metadata';
|
|
7
|
+
export * from './outputs';
|
|
8
|
+
export * from './types';
|
|
9
|
+
export * from './whatsapp-outputs';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from '../server/botonic-context';
|
|
2
|
+
export * from '../server/botonic-context/botonic-context-input';
|
|
3
|
+
export * from '../server/botonic-context/botonic-context-session';
|
|
4
|
+
export * from './inputs';
|
|
5
|
+
export * from './legacy';
|
|
6
|
+
export * from './metadata';
|
|
7
|
+
export * from './outputs';
|
|
8
|
+
export * from './types';
|
|
9
|
+
export * from './whatsapp-outputs';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,iDAAiD,CAAA;AAC/D,cAAc,mDAAmD,CAAA;AACjE,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { BotonicAudioData, BotonicContactData, BotonicDocumentData, BotonicImageData, BotonicLocationData, BotonicPostbackData, BotonicTextData, BotonicTypingEventData, BotonicVideoData, MessageType } from './types';
|
|
2
|
+
export { MessageType };
|
|
3
|
+
export type InputMessageType = MessageType.Text | MessageType.Postback | MessageType.Audio | MessageType.Image | MessageType.Video | MessageType.Document | MessageType.Location | MessageType.Contact | MessageType.TypingEvent | MessageType.Contact;
|
|
4
|
+
export type InputMessageTypeMap = {
|
|
5
|
+
[MessageType.Text]: BotonicTextData;
|
|
6
|
+
[MessageType.Postback]: BotonicPostbackData;
|
|
7
|
+
[MessageType.Audio]: BotonicAudioData;
|
|
8
|
+
[MessageType.Image]: BotonicImageData;
|
|
9
|
+
[MessageType.Video]: BotonicVideoData;
|
|
10
|
+
[MessageType.Document]: BotonicDocumentData;
|
|
11
|
+
[MessageType.Location]: BotonicLocationData;
|
|
12
|
+
[MessageType.Contact]: BotonicContactData;
|
|
13
|
+
[MessageType.TypingEvent]: BotonicTypingEventData;
|
|
14
|
+
[MessageType.Contact]: BotonicContactData;
|
|
15
|
+
};
|
|
16
|
+
export declare abstract class BotonicInput<T extends keyof InputMessageTypeMap = keyof InputMessageTypeMap> {
|
|
17
|
+
readonly type: T;
|
|
18
|
+
readonly data: InputMessageTypeMap[T];
|
|
19
|
+
constructor(type: T, data: InputMessageTypeMap[T]);
|
|
20
|
+
}
|
|
21
|
+
export declare class BotonicInputText extends BotonicInput<MessageType.Text> {
|
|
22
|
+
constructor(data: BotonicTextData);
|
|
23
|
+
}
|
|
24
|
+
export declare class BotonicInputPostback extends BotonicInput<MessageType.Postback> {
|
|
25
|
+
constructor(data: BotonicPostbackData);
|
|
26
|
+
}
|
|
27
|
+
export declare class BotonicInputAudio extends BotonicInput<MessageType.Audio> {
|
|
28
|
+
constructor(data: BotonicAudioData);
|
|
29
|
+
}
|
|
30
|
+
export declare class BotonicInputImage extends BotonicInput<MessageType.Image> {
|
|
31
|
+
constructor(data: BotonicImageData);
|
|
32
|
+
}
|
|
33
|
+
export declare class BotonicInputVideo extends BotonicInput<MessageType.Video> {
|
|
34
|
+
constructor(data: BotonicVideoData);
|
|
35
|
+
}
|
|
36
|
+
export declare class BotonicInputDocument extends BotonicInput<MessageType.Document> {
|
|
37
|
+
constructor(data: BotonicDocumentData);
|
|
38
|
+
}
|
|
39
|
+
export declare class BotonicInputLocation extends BotonicInput<MessageType.Location> {
|
|
40
|
+
constructor(data: BotonicLocationData);
|
|
41
|
+
}
|
|
42
|
+
export declare class BotonicInputContact extends BotonicInput<MessageType.Contact> {
|
|
43
|
+
constructor(data: BotonicContactData);
|
|
44
|
+
}
|
|
45
|
+
export declare class BotonicInputTypingEvent extends BotonicInput<MessageType.TypingEvent> {
|
|
46
|
+
constructor(data: BotonicTypingEventData);
|
|
47
|
+
}
|
|
48
|
+
export type BotonicInputType = BotonicInputText | BotonicInputPostback | BotonicInputAudio | BotonicInputImage | BotonicInputVideo | BotonicInputDocument | BotonicInputLocation | BotonicInputContact | BotonicInputTypingEvent | BotonicInputContact;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { MessageType, } from './types';
|
|
2
|
+
// Re-export for convenience
|
|
3
|
+
export { MessageType };
|
|
4
|
+
// ============================================================================
|
|
5
|
+
// BOTONIC INPUT PROTOCOL (discriminated union with classes)
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// Base class for type safety using mapped types
|
|
8
|
+
export class BotonicInput {
|
|
9
|
+
constructor(type, data) {
|
|
10
|
+
this.type = type;
|
|
11
|
+
this.data = data;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
// Concrete implementations
|
|
15
|
+
export class BotonicInputText extends BotonicInput {
|
|
16
|
+
constructor(data) {
|
|
17
|
+
super(MessageType.Text, data);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export class BotonicInputPostback extends BotonicInput {
|
|
21
|
+
constructor(data) {
|
|
22
|
+
super(MessageType.Postback, data);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export class BotonicInputAudio extends BotonicInput {
|
|
26
|
+
constructor(data) {
|
|
27
|
+
super(MessageType.Audio, data);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export class BotonicInputImage extends BotonicInput {
|
|
31
|
+
constructor(data) {
|
|
32
|
+
super(MessageType.Image, data);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export class BotonicInputVideo extends BotonicInput {
|
|
36
|
+
constructor(data) {
|
|
37
|
+
super(MessageType.Video, data);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export class BotonicInputDocument extends BotonicInput {
|
|
41
|
+
constructor(data) {
|
|
42
|
+
super(MessageType.Document, data);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export class BotonicInputLocation extends BotonicInput {
|
|
46
|
+
constructor(data) {
|
|
47
|
+
super(MessageType.Location, data);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export class BotonicInputContact extends BotonicInput {
|
|
51
|
+
constructor(data) {
|
|
52
|
+
super(MessageType.Contact, data);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export class BotonicInputTypingEvent extends BotonicInput {
|
|
56
|
+
constructor(data) {
|
|
57
|
+
super(MessageType.TypingEvent, data);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=inputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputs.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,WAAW,GACZ,MAAM,SAAS,CAAA;AAEhB,4BAA4B;AAC5B,OAAO,EAAE,WAAW,EAAE,CAAA;AAqCtB,+EAA+E;AAC/E,4DAA4D;AAC5D,+EAA+E;AAE/E,gDAAgD;AAChD,MAAM,OAAgB,YAAY;IAGhC,YACkB,IAAO,EACP,IAA4B;QAD5B,SAAI,GAAJ,IAAI,CAAG;QACP,SAAI,GAAJ,IAAI,CAAwB;IAC3C,CAAC;CACL;AAED,2BAA2B;AAC3B,MAAM,OAAO,gBAAiB,SAAQ,YAA8B;IAClE,YAAY,IAAqB;QAC/B,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC/B,CAAC;CACF;AAED,MAAM,OAAO,oBAAqB,SAAQ,YAAkC;IAC1E,YAAY,IAAyB;QACnC,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;IACnC,CAAC;CACF;AAED,MAAM,OAAO,iBAAkB,SAAQ,YAA+B;IACpE,YAAY,IAAsB;QAChC,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IAChC,CAAC;CACF;AAED,MAAM,OAAO,iBAAkB,SAAQ,YAA+B;IACpE,YAAY,IAAsB;QAChC,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IAChC,CAAC;CACF;AAED,MAAM,OAAO,iBAAkB,SAAQ,YAA+B;IACpE,YAAY,IAAsB;QAChC,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IAChC,CAAC;CACF;AAED,MAAM,OAAO,oBAAqB,SAAQ,YAAkC;IAC1E,YAAY,IAAyB;QACnC,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;IACnC,CAAC;CACF;AAED,MAAM,OAAO,oBAAqB,SAAQ,YAAkC;IAC1E,YAAY,IAAyB;QACnC,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;IACnC,CAAC;CACF;AAED,MAAM,OAAO,mBAAoB,SAAQ,YAAiC;IACxE,YAAY,IAAwB;QAClC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;IAClC,CAAC;CACF;AAED,MAAM,OAAO,uBAAwB,SAAQ,YAAqC;IAChF,YAAY,IAA4B;QACtC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;IACtC,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/legacy/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapter: convert RequestInputLegacy (ImpMsg flat) → RequestInputV2 (v2 BotonicInput).
|
|
3
|
+
* normalizeToV2Input is used inside CoreBot.input(); not exported to handlers.
|
|
4
|
+
* Constructs inputs using BotonicInput* and *Data classes where supported.
|
|
5
|
+
* Aligns with RequestInputLegacy (legacy) vs RequestInputV2 (v2) format: flat fields → nested data,
|
|
6
|
+
* message_id → provider_id, attachment_data → attachment_content, empty strings → null where specified.
|
|
7
|
+
*/
|
|
8
|
+
import type { RequestInputV2 } from '../../server/botonic-context/botonic-context-input';
|
|
9
|
+
import { RequestInputLegacy } from './types';
|
|
10
|
+
/**
|
|
11
|
+
* Returns true if the payload looks like InputLegacy (flat data string, payload at top level)
|
|
12
|
+
* rather than Input (nested data object).
|
|
13
|
+
*/
|
|
14
|
+
export declare function isInputLegacy(payload: unknown): payload is RequestInputLegacy;
|
|
15
|
+
/**
|
|
16
|
+
* Converts InputLegacy to Input (v2) for the pipeline.
|
|
17
|
+
* Used at lambda handler level so CoreBot always receives Input.
|
|
18
|
+
*/
|
|
19
|
+
export declare function legacyInputToInput(legacy: RequestInputLegacy): RequestInputV2;
|
|
20
|
+
/**
|
|
21
|
+
* Normalizes request input to RequestInputV2.
|
|
22
|
+
* If legacy shape, converts with legacyInputToInput; otherwise returns as RequestInputV2.
|
|
23
|
+
* Used inside CoreBot.input(); not exposed to handlers.
|
|
24
|
+
*/
|
|
25
|
+
export declare function normalizeToV2Input(requestInput: RequestInputLegacy | RequestInputV2): RequestInputV2;
|