@botonic/plugin-flow-builder 0.44.2 → 0.45.0-alpha.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.
Files changed (327) hide show
  1. package/lib/cjs/action/ai-agent.d.ts +2 -2
  2. package/lib/cjs/action/ai-agent.js.map +1 -1
  3. package/lib/cjs/action/fallback.d.ts +2 -2
  4. package/lib/cjs/action/fallback.js.map +1 -1
  5. package/lib/cjs/action/first-interaction.d.ts +2 -2
  6. package/lib/cjs/action/first-interaction.js +1 -1
  7. package/lib/cjs/action/first-interaction.js.map +1 -1
  8. package/lib/cjs/action/index.d.ts +4 -4
  9. package/lib/cjs/action/index.js.map +1 -1
  10. package/lib/cjs/action/knowledge-bases.d.ts +2 -2
  11. package/lib/cjs/action/payload.d.ts +2 -2
  12. package/lib/cjs/action/payload.js.map +1 -1
  13. package/lib/cjs/api.d.ts +3 -3
  14. package/lib/cjs/api.js +10 -5
  15. package/lib/cjs/api.js.map +1 -1
  16. package/lib/cjs/content-fields/content-fields-base.d.ts +2 -2
  17. package/lib/cjs/content-fields/flow-ai-agent.d.ts +3 -3
  18. package/lib/cjs/content-fields/flow-ai-agent.js.map +1 -1
  19. package/lib/cjs/content-fields/flow-bot-action.d.ts +3 -3
  20. package/lib/cjs/content-fields/flow-bot-action.js.map +1 -1
  21. package/lib/cjs/content-fields/flow-button.d.ts +4 -4
  22. package/lib/cjs/content-fields/flow-button.js +5 -5
  23. package/lib/cjs/content-fields/flow-button.js.map +1 -1
  24. package/lib/cjs/content-fields/flow-capture-user-input.d.ts +2 -2
  25. package/lib/cjs/content-fields/flow-carousel.d.ts +4 -4
  26. package/lib/cjs/content-fields/flow-carousel.js +1 -1
  27. package/lib/cjs/content-fields/flow-carousel.js.map +1 -1
  28. package/lib/cjs/content-fields/flow-channel-conditional.d.ts +3 -3
  29. package/lib/cjs/content-fields/flow-channel-conditional.js.map +1 -1
  30. package/lib/cjs/content-fields/flow-country-conditional.d.ts +3 -3
  31. package/lib/cjs/content-fields/flow-country-conditional.js.map +1 -1
  32. package/lib/cjs/content-fields/flow-custom-conditional.d.ts +3 -3
  33. package/lib/cjs/content-fields/flow-custom-conditional.js.map +1 -1
  34. package/lib/cjs/content-fields/flow-element.d.ts +4 -4
  35. package/lib/cjs/content-fields/flow-element.js +3 -3
  36. package/lib/cjs/content-fields/flow-element.js.map +1 -1
  37. package/lib/cjs/content-fields/flow-go-to-flow.d.ts +3 -3
  38. package/lib/cjs/content-fields/flow-go-to-flow.js.map +1 -1
  39. package/lib/cjs/content-fields/flow-handoff.d.ts +3 -3
  40. package/lib/cjs/content-fields/flow-handoff.js +2 -2
  41. package/lib/cjs/content-fields/flow-handoff.js.map +1 -1
  42. package/lib/cjs/content-fields/flow-image.d.ts +2 -2
  43. package/lib/cjs/content-fields/flow-image.js +1 -1
  44. package/lib/cjs/content-fields/flow-image.js.map +1 -1
  45. package/lib/cjs/content-fields/flow-knowledge-base.d.ts +2 -2
  46. package/lib/cjs/content-fields/flow-knowledge-base.js.map +1 -1
  47. package/lib/cjs/content-fields/flow-queue-status-conditional.d.ts +3 -3
  48. package/lib/cjs/content-fields/flow-queue-status-conditional.js.map +1 -1
  49. package/lib/cjs/content-fields/flow-rating.d.ts +2 -2
  50. package/lib/cjs/content-fields/flow-rating.js +3 -3
  51. package/lib/cjs/content-fields/flow-rating.js.map +1 -1
  52. package/lib/cjs/content-fields/flow-text.d.ts +4 -4
  53. package/lib/cjs/content-fields/flow-text.js +1 -1
  54. package/lib/cjs/content-fields/flow-text.js.map +1 -1
  55. package/lib/cjs/content-fields/flow-video.d.ts +2 -2
  56. package/lib/cjs/content-fields/flow-video.js +1 -1
  57. package/lib/cjs/content-fields/flow-video.js.map +1 -1
  58. package/lib/cjs/content-fields/flow-webview.d.ts +2 -2
  59. package/lib/cjs/content-fields/flow-webview.js.map +1 -1
  60. package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.d.ts +3 -3
  61. package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.js +10 -6
  62. package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.js.map +1 -1
  63. package/lib/cjs/content-fields/flow-whatsapp-template.d.ts +2 -2
  64. package/lib/cjs/content-fields/flow-whatsapp-template.js.map +1 -1
  65. package/lib/cjs/content-fields/hubtype-fields/ai-agent.d.ts +2 -2
  66. package/lib/cjs/content-fields/hubtype-fields/bot-action.d.ts +2 -2
  67. package/lib/cjs/content-fields/hubtype-fields/button.d.ts +1 -1
  68. package/lib/cjs/content-fields/hubtype-fields/capture-user-input.d.ts +2 -2
  69. package/lib/cjs/content-fields/hubtype-fields/carousel.d.ts +3 -3
  70. package/lib/cjs/content-fields/hubtype-fields/channel-conditional.d.ts +3 -3
  71. package/lib/cjs/content-fields/hubtype-fields/common.d.ts +2 -2
  72. package/lib/cjs/content-fields/hubtype-fields/country-conditional.d.ts +3 -3
  73. package/lib/cjs/content-fields/hubtype-fields/custom-conditional.d.ts +3 -3
  74. package/lib/cjs/content-fields/hubtype-fields/fallback.d.ts +2 -2
  75. package/lib/cjs/content-fields/hubtype-fields/function.d.ts +2 -2
  76. package/lib/cjs/content-fields/hubtype-fields/go-to-flow.d.ts +2 -2
  77. package/lib/cjs/content-fields/hubtype-fields/handoff.d.ts +2 -2
  78. package/lib/cjs/content-fields/hubtype-fields/image.d.ts +2 -2
  79. package/lib/cjs/content-fields/hubtype-fields/keyword.d.ts +2 -2
  80. package/lib/cjs/content-fields/hubtype-fields/knowledge-base.d.ts +2 -2
  81. package/lib/cjs/content-fields/hubtype-fields/nodes.d.ts +21 -21
  82. package/lib/cjs/content-fields/hubtype-fields/payload.d.ts +1 -1
  83. package/lib/cjs/content-fields/hubtype-fields/queue-status-conditional.d.ts +3 -3
  84. package/lib/cjs/content-fields/hubtype-fields/rating.d.ts +2 -2
  85. package/lib/cjs/content-fields/hubtype-fields/smart-intent.d.ts +2 -2
  86. package/lib/cjs/content-fields/hubtype-fields/text.d.ts +3 -3
  87. package/lib/cjs/content-fields/hubtype-fields/url.d.ts +1 -1
  88. package/lib/cjs/content-fields/hubtype-fields/video.d.ts +2 -2
  89. package/lib/cjs/content-fields/hubtype-fields/webview.d.ts +2 -2
  90. package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.d.ts +2 -2
  91. package/lib/cjs/content-fields/hubtype-fields/whatsapp-cta-url-button.d.ts +4 -4
  92. package/lib/cjs/content-fields/hubtype-fields/whatsapp-template.d.ts +4 -4
  93. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.d.ts +3 -3
  94. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +2 -2
  95. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -1
  96. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +3 -3
  97. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +3 -2
  98. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -1
  99. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +3 -3
  100. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +3 -2
  101. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -1
  102. package/lib/cjs/filters/index.d.ts +3 -3
  103. package/lib/cjs/flow-factory.d.ts +4 -4
  104. package/lib/cjs/functions/index.d.ts +2 -2
  105. package/lib/cjs/helpers.d.ts +2 -2
  106. package/lib/cjs/index.d.ts +5 -5
  107. package/lib/cjs/index.js +1 -1
  108. package/lib/cjs/index.js.map +1 -1
  109. package/lib/cjs/tracking.d.ts +3 -3
  110. package/lib/cjs/tracking.js.map +1 -1
  111. package/lib/cjs/types.d.ts +3 -3
  112. package/lib/cjs/user-input/capture-user-input-api.d.ts +3 -3
  113. package/lib/cjs/user-input/capture-user-input-api.js +1 -4
  114. package/lib/cjs/user-input/capture-user-input-api.js.map +1 -1
  115. package/lib/cjs/user-input/index.d.ts +3 -3
  116. package/lib/cjs/user-input/index.js.map +1 -1
  117. package/lib/cjs/user-input/keyword.d.ts +3 -3
  118. package/lib/cjs/user-input/keyword.js.map +1 -1
  119. package/lib/cjs/user-input/smart-intent.d.ts +3 -3
  120. package/lib/cjs/user-input/smart-intent.js +6 -3
  121. package/lib/cjs/user-input/smart-intent.js.map +1 -1
  122. package/lib/cjs/utils.d.ts +2 -2
  123. package/lib/cjs/utils.js.map +1 -1
  124. package/lib/cjs/webview/contents-context.d.ts +1 -1
  125. package/lib/cjs/webview/types.d.ts +1 -1
  126. package/lib/cjs/webview/use-webview-contents.d.ts +1 -1
  127. package/lib/esm/action/ai-agent.d.ts +2 -2
  128. package/lib/esm/action/ai-agent.js.map +1 -1
  129. package/lib/esm/action/fallback.d.ts +2 -2
  130. package/lib/esm/action/fallback.js.map +1 -1
  131. package/lib/esm/action/first-interaction.d.ts +2 -2
  132. package/lib/esm/action/first-interaction.js +1 -1
  133. package/lib/esm/action/first-interaction.js.map +1 -1
  134. package/lib/esm/action/index.d.ts +4 -4
  135. package/lib/esm/action/index.js.map +1 -1
  136. package/lib/esm/action/knowledge-bases.d.ts +2 -2
  137. package/lib/esm/action/payload.d.ts +2 -2
  138. package/lib/esm/action/payload.js.map +1 -1
  139. package/lib/esm/api.d.ts +3 -3
  140. package/lib/esm/api.js +10 -5
  141. package/lib/esm/api.js.map +1 -1
  142. package/lib/esm/content-fields/content-fields-base.d.ts +2 -2
  143. package/lib/esm/content-fields/flow-ai-agent.d.ts +3 -3
  144. package/lib/esm/content-fields/flow-ai-agent.js.map +1 -1
  145. package/lib/esm/content-fields/flow-bot-action.d.ts +3 -3
  146. package/lib/esm/content-fields/flow-bot-action.js.map +1 -1
  147. package/lib/esm/content-fields/flow-button.d.ts +4 -4
  148. package/lib/esm/content-fields/flow-button.js +5 -5
  149. package/lib/esm/content-fields/flow-button.js.map +1 -1
  150. package/lib/esm/content-fields/flow-capture-user-input.d.ts +2 -2
  151. package/lib/esm/content-fields/flow-carousel.d.ts +4 -4
  152. package/lib/esm/content-fields/flow-carousel.js +1 -1
  153. package/lib/esm/content-fields/flow-carousel.js.map +1 -1
  154. package/lib/esm/content-fields/flow-channel-conditional.d.ts +3 -3
  155. package/lib/esm/content-fields/flow-channel-conditional.js.map +1 -1
  156. package/lib/esm/content-fields/flow-country-conditional.d.ts +3 -3
  157. package/lib/esm/content-fields/flow-country-conditional.js.map +1 -1
  158. package/lib/esm/content-fields/flow-custom-conditional.d.ts +3 -3
  159. package/lib/esm/content-fields/flow-custom-conditional.js.map +1 -1
  160. package/lib/esm/content-fields/flow-element.d.ts +4 -4
  161. package/lib/esm/content-fields/flow-element.js +3 -3
  162. package/lib/esm/content-fields/flow-element.js.map +1 -1
  163. package/lib/esm/content-fields/flow-go-to-flow.d.ts +3 -3
  164. package/lib/esm/content-fields/flow-go-to-flow.js.map +1 -1
  165. package/lib/esm/content-fields/flow-handoff.d.ts +3 -3
  166. package/lib/esm/content-fields/flow-handoff.js +2 -2
  167. package/lib/esm/content-fields/flow-handoff.js.map +1 -1
  168. package/lib/esm/content-fields/flow-image.d.ts +2 -2
  169. package/lib/esm/content-fields/flow-image.js +1 -1
  170. package/lib/esm/content-fields/flow-image.js.map +1 -1
  171. package/lib/esm/content-fields/flow-knowledge-base.d.ts +2 -2
  172. package/lib/esm/content-fields/flow-knowledge-base.js.map +1 -1
  173. package/lib/esm/content-fields/flow-queue-status-conditional.d.ts +3 -3
  174. package/lib/esm/content-fields/flow-queue-status-conditional.js.map +1 -1
  175. package/lib/esm/content-fields/flow-rating.d.ts +2 -2
  176. package/lib/esm/content-fields/flow-rating.js +3 -3
  177. package/lib/esm/content-fields/flow-rating.js.map +1 -1
  178. package/lib/esm/content-fields/flow-text.d.ts +4 -4
  179. package/lib/esm/content-fields/flow-text.js +1 -1
  180. package/lib/esm/content-fields/flow-text.js.map +1 -1
  181. package/lib/esm/content-fields/flow-video.d.ts +2 -2
  182. package/lib/esm/content-fields/flow-video.js +1 -1
  183. package/lib/esm/content-fields/flow-video.js.map +1 -1
  184. package/lib/esm/content-fields/flow-webview.d.ts +2 -2
  185. package/lib/esm/content-fields/flow-webview.js.map +1 -1
  186. package/lib/esm/content-fields/flow-whatsapp-cta-url-button.d.ts +3 -3
  187. package/lib/esm/content-fields/flow-whatsapp-cta-url-button.js +10 -6
  188. package/lib/esm/content-fields/flow-whatsapp-cta-url-button.js.map +1 -1
  189. package/lib/esm/content-fields/flow-whatsapp-template.d.ts +2 -2
  190. package/lib/esm/content-fields/flow-whatsapp-template.js.map +1 -1
  191. package/lib/esm/content-fields/hubtype-fields/ai-agent.d.ts +2 -2
  192. package/lib/esm/content-fields/hubtype-fields/bot-action.d.ts +2 -2
  193. package/lib/esm/content-fields/hubtype-fields/button.d.ts +1 -1
  194. package/lib/esm/content-fields/hubtype-fields/capture-user-input.d.ts +2 -2
  195. package/lib/esm/content-fields/hubtype-fields/carousel.d.ts +3 -3
  196. package/lib/esm/content-fields/hubtype-fields/channel-conditional.d.ts +3 -3
  197. package/lib/esm/content-fields/hubtype-fields/common.d.ts +2 -2
  198. package/lib/esm/content-fields/hubtype-fields/country-conditional.d.ts +3 -3
  199. package/lib/esm/content-fields/hubtype-fields/custom-conditional.d.ts +3 -3
  200. package/lib/esm/content-fields/hubtype-fields/fallback.d.ts +2 -2
  201. package/lib/esm/content-fields/hubtype-fields/function.d.ts +2 -2
  202. package/lib/esm/content-fields/hubtype-fields/go-to-flow.d.ts +2 -2
  203. package/lib/esm/content-fields/hubtype-fields/handoff.d.ts +2 -2
  204. package/lib/esm/content-fields/hubtype-fields/image.d.ts +2 -2
  205. package/lib/esm/content-fields/hubtype-fields/keyword.d.ts +2 -2
  206. package/lib/esm/content-fields/hubtype-fields/knowledge-base.d.ts +2 -2
  207. package/lib/esm/content-fields/hubtype-fields/nodes.d.ts +21 -21
  208. package/lib/esm/content-fields/hubtype-fields/payload.d.ts +1 -1
  209. package/lib/esm/content-fields/hubtype-fields/queue-status-conditional.d.ts +3 -3
  210. package/lib/esm/content-fields/hubtype-fields/rating.d.ts +2 -2
  211. package/lib/esm/content-fields/hubtype-fields/smart-intent.d.ts +2 -2
  212. package/lib/esm/content-fields/hubtype-fields/text.d.ts +3 -3
  213. package/lib/esm/content-fields/hubtype-fields/url.d.ts +1 -1
  214. package/lib/esm/content-fields/hubtype-fields/video.d.ts +2 -2
  215. package/lib/esm/content-fields/hubtype-fields/webview.d.ts +2 -2
  216. package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.d.ts +2 -2
  217. package/lib/esm/content-fields/hubtype-fields/whatsapp-cta-url-button.d.ts +4 -4
  218. package/lib/esm/content-fields/hubtype-fields/whatsapp-template.d.ts +4 -4
  219. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.d.ts +3 -3
  220. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +2 -2
  221. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -1
  222. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +3 -3
  223. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +3 -2
  224. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -1
  225. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +3 -3
  226. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +3 -2
  227. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -1
  228. package/lib/esm/filters/index.d.ts +3 -3
  229. package/lib/esm/flow-factory.d.ts +4 -4
  230. package/lib/esm/functions/index.d.ts +2 -2
  231. package/lib/esm/helpers.d.ts +2 -2
  232. package/lib/esm/index.d.ts +5 -5
  233. package/lib/esm/index.js +1 -1
  234. package/lib/esm/index.js.map +1 -1
  235. package/lib/esm/tracking.d.ts +3 -3
  236. package/lib/esm/tracking.js.map +1 -1
  237. package/lib/esm/types.d.ts +3 -3
  238. package/lib/esm/user-input/capture-user-input-api.d.ts +3 -3
  239. package/lib/esm/user-input/capture-user-input-api.js +1 -4
  240. package/lib/esm/user-input/capture-user-input-api.js.map +1 -1
  241. package/lib/esm/user-input/index.d.ts +3 -3
  242. package/lib/esm/user-input/index.js.map +1 -1
  243. package/lib/esm/user-input/keyword.d.ts +3 -3
  244. package/lib/esm/user-input/keyword.js.map +1 -1
  245. package/lib/esm/user-input/smart-intent.d.ts +3 -3
  246. package/lib/esm/user-input/smart-intent.js +6 -3
  247. package/lib/esm/user-input/smart-intent.js.map +1 -1
  248. package/lib/esm/utils.d.ts +2 -2
  249. package/lib/esm/utils.js.map +1 -1
  250. package/lib/esm/webview/contents-context.d.ts +1 -1
  251. package/lib/esm/webview/types.d.ts +1 -1
  252. package/lib/esm/webview/use-webview-contents.d.ts +1 -1
  253. package/package.json +5 -8
  254. package/src/action/ai-agent.ts +7 -7
  255. package/src/action/fallback.ts +5 -5
  256. package/src/action/first-interaction.ts +5 -5
  257. package/src/action/index.tsx +6 -6
  258. package/src/action/knowledge-bases.ts +7 -7
  259. package/src/action/payload.ts +4 -4
  260. package/src/api.ts +31 -21
  261. package/src/content-fields/content-fields-base.ts +2 -2
  262. package/src/content-fields/flow-ai-agent.tsx +6 -3
  263. package/src/content-fields/flow-bot-action.tsx +4 -4
  264. package/src/content-fields/flow-button.tsx +14 -12
  265. package/src/content-fields/flow-capture-user-input.tsx +2 -2
  266. package/src/content-fields/flow-carousel.tsx +6 -7
  267. package/src/content-fields/flow-channel-conditional.tsx +4 -4
  268. package/src/content-fields/flow-country-conditional.tsx +4 -4
  269. package/src/content-fields/flow-custom-conditional.tsx +4 -4
  270. package/src/content-fields/flow-element.tsx +16 -7
  271. package/src/content-fields/flow-go-to-flow.tsx +4 -4
  272. package/src/content-fields/flow-handoff.tsx +11 -5
  273. package/src/content-fields/flow-image.tsx +3 -4
  274. package/src/content-fields/flow-knowledge-base.tsx +2 -4
  275. package/src/content-fields/flow-queue-status-conditional.tsx +4 -5
  276. package/src/content-fields/flow-rating.tsx +5 -5
  277. package/src/content-fields/flow-text.tsx +5 -6
  278. package/src/content-fields/flow-video.tsx +3 -4
  279. package/src/content-fields/flow-webview.tsx +3 -3
  280. package/src/content-fields/flow-whatsapp-cta-url-button.tsx +25 -22
  281. package/src/content-fields/flow-whatsapp-template.tsx +10 -11
  282. package/src/content-fields/hubtype-fields/ai-agent.ts +2 -2
  283. package/src/content-fields/hubtype-fields/bot-action.ts +2 -2
  284. package/src/content-fields/hubtype-fields/button.ts +1 -1
  285. package/src/content-fields/hubtype-fields/capture-user-input.ts +2 -2
  286. package/src/content-fields/hubtype-fields/carousel.ts +3 -3
  287. package/src/content-fields/hubtype-fields/channel-conditional.ts +3 -3
  288. package/src/content-fields/hubtype-fields/common.ts +5 -2
  289. package/src/content-fields/hubtype-fields/country-conditional.ts +3 -3
  290. package/src/content-fields/hubtype-fields/custom-conditional.ts +3 -3
  291. package/src/content-fields/hubtype-fields/fallback.ts +2 -2
  292. package/src/content-fields/hubtype-fields/function.ts +2 -2
  293. package/src/content-fields/hubtype-fields/go-to-flow.ts +2 -2
  294. package/src/content-fields/hubtype-fields/handoff.ts +2 -2
  295. package/src/content-fields/hubtype-fields/image.ts +2 -2
  296. package/src/content-fields/hubtype-fields/keyword.ts +2 -2
  297. package/src/content-fields/hubtype-fields/knowledge-base.ts +2 -2
  298. package/src/content-fields/hubtype-fields/nodes.ts +21 -21
  299. package/src/content-fields/hubtype-fields/payload.ts +1 -1
  300. package/src/content-fields/hubtype-fields/queue-status-conditional.ts +3 -3
  301. package/src/content-fields/hubtype-fields/rating.ts +2 -2
  302. package/src/content-fields/hubtype-fields/smart-intent.ts +2 -2
  303. package/src/content-fields/hubtype-fields/text.ts +3 -3
  304. package/src/content-fields/hubtype-fields/url.ts +1 -1
  305. package/src/content-fields/hubtype-fields/video.ts +2 -2
  306. package/src/content-fields/hubtype-fields/webview.ts +2 -2
  307. package/src/content-fields/hubtype-fields/whatsapp-button-list.ts +2 -2
  308. package/src/content-fields/hubtype-fields/whatsapp-cta-url-button.ts +4 -4
  309. package/src/content-fields/hubtype-fields/whatsapp-template.ts +4 -4
  310. package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.tsx +11 -5
  311. package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.tsx +10 -5
  312. package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list.tsx +14 -9
  313. package/src/filters/index.ts +3 -3
  314. package/src/flow-factory.ts +5 -5
  315. package/src/functions/index.ts +2 -2
  316. package/src/helpers.ts +2 -2
  317. package/src/index.ts +19 -19
  318. package/src/tracking.ts +5 -5
  319. package/src/types.ts +7 -7
  320. package/src/user-input/capture-user-input-api.ts +5 -9
  321. package/src/user-input/index.ts +6 -3
  322. package/src/user-input/keyword.ts +4 -4
  323. package/src/user-input/smart-intent.ts +14 -8
  324. package/src/utils.ts +3 -3
  325. package/src/webview/contents-context.ts +1 -1
  326. package/src/webview/types.ts +1 -1
  327. package/src/webview/use-webview-contents.ts +6 -6
package/src/index.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  INPUT,
3
- Plugin,
4
- PluginPreRequest,
3
+ type Plugin,
4
+ type PluginPreRequest,
5
5
  PROVIDER,
6
- ResolvedPlugins,
7
- Session,
6
+ type ResolvedPlugins,
7
+ type Session,
8
8
  } from '@botonic/core'
9
- import { ActionRequest } from '@botonic/react'
9
+ import type { ActionRequest } from '@botonic/react'
10
10
  import { v7 as uuidv7 } from 'uuid'
11
11
 
12
12
  import { FlowBuilderApi } from './api'
@@ -16,28 +16,28 @@ import {
16
16
  SEPARATOR,
17
17
  SOURCE_INFO_SEPARATOR,
18
18
  } from './constants'
19
- import { FlowContent } from './content-fields'
19
+ import type { FlowContent } from './content-fields'
20
20
  import {
21
- HtBotActionNode,
22
- HtFlowBuilderData,
23
- HtNodeWithContent,
21
+ type HtBotActionNode,
22
+ type HtFlowBuilderData,
23
+ type HtNodeWithContent,
24
24
  HtNodeWithContentType,
25
25
  } from './content-fields/hubtype-fields'
26
26
  import { FlowFactory } from './flow-factory'
27
27
  import { CustomFunction, DEFAULT_FUNCTION_NAMES } from './functions'
28
28
  import {
29
- AiAgentFunction,
30
- BotonicPluginFlowBuilderOptions,
31
- ContentFilter,
29
+ type AiAgentFunction,
30
+ type BotonicPluginFlowBuilderOptions,
31
+ type ContentFilter,
32
32
  FlowBuilderJSONVersion,
33
- InShadowingConfig,
34
- KnowledgeBaseFunction,
35
- PayloadParamsBase,
36
- RatingSubmittedInfo,
37
- TrackEventFunction,
33
+ type InShadowingConfig,
34
+ type KnowledgeBaseFunction,
35
+ type PayloadParamsBase,
36
+ type RatingSubmittedInfo,
37
+ type TrackEventFunction,
38
38
  } from './types'
39
39
  import { getNextPayloadByUserInput } from './user-input'
40
- import { SmartIntentsInferenceConfig } from './user-input/smart-intent'
40
+ import type { SmartIntentsInferenceConfig } from './user-input/smart-intent'
41
41
  import { inputHasTextData, resolveGetAccessToken } from './utils'
42
42
 
43
43
  // TODO: Create a proper service to wrap all calls and allow api versioning
@@ -228,7 +228,7 @@ export default class BotonicPluginFlowBuilder implements Plugin {
228
228
  }
229
229
 
230
230
  // TODO: prevent infinite recursive calls
231
- if (content && content.followUp) {
231
+ if (content?.followUp) {
232
232
  return this.getContentsById(content.followUp.id, contents)
233
233
  } else if (node.follow_up) {
234
234
  console.log('FOLLOWUP FROM NODE-------> OLD SYSTEM')
package/src/tracking.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { EventAction, EventFlow } from '@botonic/core'
2
- import { ActionRequest } from '@botonic/react'
1
+ import { EventAction, type EventFlow } from '@botonic/core'
2
+ import type { ActionRequest } from '@botonic/react'
3
3
  import { v7 as uuidv7 } from 'uuid'
4
4
 
5
- import { FlowBuilderApi } from './api'
6
- import { FlowContent } from './content-fields'
5
+ import type { FlowBuilderApi } from './api'
6
+ import type { FlowContent } from './content-fields'
7
7
  import {
8
- HtNodeWithContent,
8
+ type HtNodeWithContent,
9
9
  HtNodeWithContentType,
10
10
  } from './content-fields/hubtype-fields'
11
11
  import { getFlowBuilderPlugin } from './helpers'
package/src/types.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  AiAgentArgs,
3
- BotContext,
3
+ type BotContext,
4
4
  GuardrailRule,
5
- InferenceResponse,
6
- KnowledgeBasesResponse,
7
- PluginPreRequest,
8
- ResolvedPlugins,
5
+ type InferenceResponse,
6
+ type KnowledgeBasesResponse,
7
+ type PluginPreRequest,
8
+ type ResolvedPlugins,
9
9
  } from '@botonic/core'
10
10
 
11
- import { FlowContent } from './content-fields'
12
- import {
11
+ import type { FlowContent } from './content-fields'
12
+ import type {
13
13
  HtFlowBuilderData,
14
14
  HtRatingButton,
15
15
  } from './content-fields/hubtype-fields'
@@ -1,14 +1,13 @@
1
- import { EventAction, EventCaptureUserInput } from '@botonic/core'
2
- import { ActionRequest } from '@botonic/react'
1
+ import { EventAction, type EventCaptureUserInput } from '@botonic/core'
2
+ import type { ActionRequest } from '@botonic/react'
3
3
  import axios from 'axios'
4
4
 
5
- import { FlowBuilderApi } from '../api'
5
+ import type { FlowBuilderApi } from '../api'
6
6
  import { FlowCaptureUserInput } from '../content-fields'
7
7
  import {
8
8
  HtAiValidationType,
9
- HtCaptureUserInputNode,
9
+ type HtCaptureUserInputNode,
10
10
  } from '../content-fields/hubtype-fields'
11
- import { getFlowBuilderPlugin } from '../helpers'
12
11
  import {
13
12
  getCommonFlowContentEventArgsForContentId,
14
13
  trackEvent,
@@ -84,13 +83,10 @@ export class CaptureUserInputApi {
84
83
  captureUserInputNode.content.ai_validation_instructions,
85
84
  user_input: this.request.input.data,
86
85
  }
87
- const pluginFlowBuilder = getFlowBuilderPlugin(this.request.plugins)
88
- const token = pluginFlowBuilder.getAccessToken(this.request.session)
89
-
90
86
  const config = {
91
87
  headers: {
92
88
  'Content-Type': 'application/json',
93
- Authorization: `Bearer ${token}`,
89
+ Authorization: `Bearer ${this.request.session._access_token}`,
94
90
  },
95
91
  }
96
92
 
@@ -1,6 +1,6 @@
1
- import { ActionRequest } from '@botonic/react'
1
+ import type { ActionRequest } from '@botonic/react'
2
2
 
3
- import { FlowBuilderApi } from '../api'
3
+ import type { FlowBuilderApi } from '../api'
4
4
  import {
5
5
  inputHasTextData,
6
6
  isKeywordsAllowed,
@@ -8,7 +8,10 @@ import {
8
8
  } from '../utils'
9
9
  import { CaptureUserInputApi } from './capture-user-input-api'
10
10
  import { KeywordMatcher } from './keyword'
11
- import { SmartIntentsApi, SmartIntentsInferenceConfig } from './smart-intent'
11
+ import {
12
+ SmartIntentsApi,
13
+ type SmartIntentsInferenceConfig,
14
+ } from './smart-intent'
12
15
 
13
16
  export async function getNextPayloadByUserInput(
14
17
  cmsApi: FlowBuilderApi,
@@ -1,9 +1,9 @@
1
- import { EventAction, EventKeyword, NluType } from '@botonic/core'
2
- import { ActionRequest } from '@botonic/react'
1
+ import { EventAction, type EventKeyword, NluType } from '@botonic/core'
2
+ import type { ActionRequest } from '@botonic/react'
3
3
 
4
- import { FlowBuilderApi } from '../api'
4
+ import type { FlowBuilderApi } from '../api'
5
5
  import { REG_EXP_PATTERN } from '../constants'
6
- import {
6
+ import type {
7
7
  HtKeywordNode,
8
8
  HtNodeWithContent,
9
9
  } from '../content-fields/hubtype-fields'
@@ -1,15 +1,15 @@
1
- import { EventAction, EventIntentSmart, NluType } from '@botonic/core'
2
- import { ActionRequest } from '@botonic/react'
1
+ import { EventAction, type EventIntentSmart, NluType } from '@botonic/core'
2
+ import type { ActionRequest } from '@botonic/react'
3
3
  import axios from 'axios'
4
4
 
5
- import { FlowBuilderApi } from '../api'
6
- import { HtSmartIntentNode } from '../content-fields/hubtype-fields/smart-intent'
5
+ import type { FlowBuilderApi } from '../api'
6
+ import type { HtSmartIntentNode } from '../content-fields/hubtype-fields/smart-intent'
7
7
  import { getFlowBuilderPlugin } from '../helpers'
8
8
  import {
9
9
  getCommonFlowContentEventArgsForContentId,
10
10
  trackEvent,
11
11
  } from '../tracking'
12
- import { SmartIntentResponse } from '../types'
12
+ import type { SmartIntentResponse } from '../types'
13
13
 
14
14
  export interface SmartIntentsInferenceParams {
15
15
  bot_id: string
@@ -32,9 +32,13 @@ export class SmartIntentsApi {
32
32
  ) {}
33
33
 
34
34
  async getNodeByInput(): Promise<HtSmartIntentNode | undefined> {
35
- if (!this.currentRequest.input.data) return undefined
35
+ if (!this.currentRequest.input.data) {
36
+ return undefined
37
+ }
36
38
  const smartIntentNodes = this.cmsApi.getSmartIntentNodes()
37
- if (!smartIntentNodes.length) return undefined
39
+ if (!smartIntentNodes.length) {
40
+ return undefined
41
+ }
38
42
 
39
43
  const params = {
40
44
  bot_id: this.currentRequest.session.bot.id,
@@ -89,7 +93,9 @@ export class SmartIntentsApi {
89
93
  }
90
94
 
91
95
  private resolveUseLatest(): boolean {
92
- if (this.currentRequest.session.is_test_integration) return false
96
+ if (this.currentRequest.session.is_test_integration) {
97
+ return false
98
+ }
93
99
  return this.smartIntentsConfig.useLatest
94
100
  }
95
101
 
package/src/utils.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { INPUT, Input, Session } from '@botonic/core'
2
- import { ActionRequest } from '@botonic/react'
1
+ import { INPUT, type Input, type Session } from '@botonic/core'
2
+ import type { ActionRequest } from '@botonic/react'
3
3
 
4
4
  import { getFlowBuilderPlugin } from './helpers'
5
- import { InShadowingConfig, ProcessEnvNodeEnvs } from './types'
5
+ import { type InShadowingConfig, ProcessEnvNodeEnvs } from './types'
6
6
 
7
7
  function getAccessTokenFromSession(session: Session): string {
8
8
  if (!session._access_token) {
@@ -1,6 +1,6 @@
1
1
  import { createContext } from 'react'
2
2
 
3
- import { MapContentsType, WebviewContentsContextType } from './types'
3
+ import type { MapContentsType, WebviewContentsContextType } from './types'
4
4
 
5
5
  export const createWebviewContentsContext = <T extends MapContentsType>() =>
6
6
  createContext<WebviewContentsContextType<T>>({
@@ -1,4 +1,4 @@
1
- import { FlowBuilderJSONVersion } from '../types'
1
+ import type { FlowBuilderJSONVersion } from '../types'
2
2
 
3
3
  export enum WebviewContentType {
4
4
  TEXT = 'webview-text',
@@ -4,13 +4,13 @@ import { useEffect, useState } from 'react'
4
4
  import { FLOW_BUILDER_API_URL_PROD } from '../constants'
5
5
  import { FlowBuilderJSONVersion } from '../types'
6
6
  import {
7
- MapContentsType,
8
- UseWebviewContents,
9
- UseWebviewContentsProps,
10
- WebviewContentsResponse,
7
+ type MapContentsType,
8
+ type UseWebviewContents,
9
+ type UseWebviewContentsProps,
10
+ type WebviewContentsResponse,
11
11
  WebviewContentType,
12
- WebviewImageContent,
13
- WebviewTextContent,
12
+ type WebviewImageContent,
13
+ type WebviewTextContent,
14
14
  } from './types'
15
15
 
16
16
  export function useWebviewContents<T extends MapContentsType>({