@botonic/plugin-flow-builder 0.56.0-alpha.0 → 0.57.0-rslib-esm.1

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 (733) hide show
  1. package/README.md +1 -1
  2. package/lib/{cjs/action → action}/ai-agent-from-user-input.d.ts +2 -2
  3. package/lib/{cjs/action → action}/ai-agent-from-user-input.js +9 -6
  4. package/lib/action/ai-agent-from-user-input.js.map +1 -0
  5. package/lib/{esm/action → action}/context.d.ts +2 -2
  6. package/lib/action/context.js +20 -0
  7. package/lib/action/context.js.map +1 -0
  8. package/lib/{cjs/action → action}/fallback.d.ts +2 -2
  9. package/lib/{cjs/action → action}/fallback.js +16 -11
  10. package/lib/action/fallback.js.map +1 -0
  11. package/lib/action/first-interaction.d.ts +3 -0
  12. package/lib/{cjs/action → action}/first-interaction.js +39 -27
  13. package/lib/action/first-interaction.js.map +1 -0
  14. package/lib/{cjs/action → action}/get-contents.d.ts +1 -1
  15. package/lib/action/get-contents.js +56 -0
  16. package/lib/action/get-contents.js.map +1 -0
  17. package/lib/{esm/action → action}/index.d.ts +1 -1
  18. package/lib/{esm/action → action}/index.js +68 -32
  19. package/lib/action/index.js.map +1 -0
  20. package/lib/action/payload.d.ts +3 -0
  21. package/lib/{cjs/action → action}/payload.js +27 -23
  22. package/lib/action/payload.js.map +1 -0
  23. package/lib/{cjs/api.d.ts → api.d.ts} +2 -2
  24. package/lib/{esm/api.js → api.js} +55 -44
  25. package/lib/api.js.map +1 -0
  26. package/lib/constants.js +17 -0
  27. package/lib/constants.js.map +1 -0
  28. package/lib/{esm/content-fields → content-fields}/content-fields-base.d.ts +2 -2
  29. package/lib/content-fields/content-fields-base.js +78 -0
  30. package/lib/content-fields/content-fields-base.js.map +1 -0
  31. package/lib/{esm/content-fields → content-fields}/custom-conditional/custom-conditional-v2-evaluators.d.ts +1 -1
  32. package/lib/content-fields/custom-conditional/custom-conditional-v2-evaluators.js +73 -0
  33. package/lib/content-fields/custom-conditional/custom-conditional-v2-evaluators.js.map +1 -0
  34. package/lib/{esm/content-fields → content-fields}/custom-conditional/custom-conditional-v2-resolver.d.ts +1 -1
  35. package/lib/{cjs/content-fields → content-fields}/custom-conditional/custom-conditional-v2-resolver.js +15 -15
  36. package/lib/content-fields/custom-conditional/custom-conditional-v2-resolver.js.map +1 -0
  37. package/lib/{cjs/content-fields → content-fields}/custom-conditional/flow-custom-condition-v2.d.ts +3 -3
  38. package/lib/content-fields/custom-conditional/flow-custom-condition-v2.js +94 -0
  39. package/lib/content-fields/custom-conditional/flow-custom-condition-v2.js.map +1 -0
  40. package/lib/{esm/content-fields → content-fields}/flow-ai-agent-base.d.ts +4 -4
  41. package/lib/content-fields/flow-ai-agent-base.js +100 -0
  42. package/lib/content-fields/flow-ai-agent-base.js.map +1 -0
  43. package/lib/{esm/content-fields → content-fields}/flow-ai-agent-router.d.ts +5 -5
  44. package/lib/{esm/content-fields → content-fields}/flow-ai-agent-router.js +57 -46
  45. package/lib/content-fields/flow-ai-agent-router.js.map +1 -0
  46. package/lib/{cjs/content-fields → content-fields}/flow-ai-agent.d.ts +4 -4
  47. package/lib/{cjs/content-fields → content-fields}/flow-ai-agent.js +33 -22
  48. package/lib/content-fields/flow-ai-agent.js.map +1 -0
  49. package/lib/{esm/content-fields → content-fields}/flow-bot-action.d.ts +3 -3
  50. package/lib/{esm/content-fields → content-fields}/flow-bot-action.js +23 -15
  51. package/lib/content-fields/flow-bot-action.js.map +1 -0
  52. package/lib/{esm/content-fields → content-fields}/flow-button.d.ts +5 -5
  53. package/lib/{esm/content-fields → content-fields}/flow-button.js +48 -29
  54. package/lib/content-fields/flow-button.js.map +1 -0
  55. package/lib/{cjs/content-fields → content-fields}/flow-capture-user-input.d.ts +2 -2
  56. package/lib/content-fields/flow-capture-user-input.js +46 -0
  57. package/lib/content-fields/flow-capture-user-input.js.map +1 -0
  58. package/lib/{esm/content-fields → content-fields}/flow-carousel.d.ts +4 -4
  59. package/lib/content-fields/flow-carousel.js +193 -0
  60. package/lib/content-fields/flow-carousel.js.map +1 -0
  61. package/lib/{esm/content-fields → content-fields}/flow-channel-conditional.d.ts +3 -3
  62. package/lib/{esm/content-fields → content-fields}/flow-channel-conditional.js +26 -22
  63. package/lib/content-fields/flow-channel-conditional.js.map +1 -0
  64. package/lib/{cjs/content-fields → content-fields}/flow-country-conditional.d.ts +3 -3
  65. package/lib/{esm/content-fields → content-fields}/flow-country-conditional.js +26 -21
  66. package/lib/content-fields/flow-country-conditional.js.map +1 -0
  67. package/lib/{cjs/content-fields → content-fields}/flow-custom-conditional.d.ts +4 -4
  68. package/lib/{esm/content-fields → content-fields}/flow-custom-conditional.js +31 -33
  69. package/lib/content-fields/flow-custom-conditional.js.map +1 -0
  70. package/lib/{cjs/content-fields → content-fields}/flow-element.d.ts +4 -4
  71. package/lib/content-fields/flow-element.js +67 -0
  72. package/lib/content-fields/flow-element.js.map +1 -0
  73. package/lib/{esm/content-fields → content-fields}/flow-go-to-flow.d.ts +3 -3
  74. package/lib/{esm/content-fields → content-fields}/flow-go-to-flow.js +25 -20
  75. package/lib/content-fields/flow-go-to-flow.js.map +1 -0
  76. package/lib/{cjs/content-fields → content-fields}/flow-handoff.d.ts +3 -3
  77. package/lib/{cjs/content-fields → content-fields}/flow-handoff.js +30 -19
  78. package/lib/content-fields/flow-handoff.js.map +1 -0
  79. package/lib/{cjs/content-fields → content-fields}/flow-image.d.ts +2 -2
  80. package/lib/content-fields/flow-image.js +42 -0
  81. package/lib/content-fields/flow-image.js.map +1 -0
  82. package/lib/{cjs/content-fields → content-fields}/flow-queue-status-conditional.d.ts +3 -3
  83. package/lib/{cjs/content-fields → content-fields}/flow-queue-status-conditional.js +45 -40
  84. package/lib/content-fields/flow-queue-status-conditional.js.map +1 -0
  85. package/lib/{esm/content-fields → content-fields}/flow-rating.d.ts +3 -3
  86. package/lib/content-fields/flow-rating.js +88 -0
  87. package/lib/content-fields/flow-rating.js.map +1 -0
  88. package/lib/{cjs/content-fields → content-fields}/flow-text.d.ts +4 -4
  89. package/lib/content-fields/flow-text.js +82 -0
  90. package/lib/content-fields/flow-text.js.map +1 -0
  91. package/lib/{esm/content-fields → content-fields}/flow-video.d.ts +2 -2
  92. package/lib/content-fields/flow-video.js +42 -0
  93. package/lib/content-fields/flow-video.js.map +1 -0
  94. package/lib/{esm/content-fields → content-fields}/flow-webview.d.ts +2 -2
  95. package/lib/{cjs/content-fields → content-fields}/flow-webview.js +31 -28
  96. package/lib/content-fields/flow-webview.js.map +1 -0
  97. package/lib/{esm/content-fields → content-fields}/flow-whatsapp-cta-url-button.d.ts +3 -3
  98. package/lib/content-fields/flow-whatsapp-cta-url-button.js +131 -0
  99. package/lib/content-fields/flow-whatsapp-cta-url-button.js.map +1 -0
  100. package/lib/{esm/content-fields → content-fields}/flow-whatsapp-request-contact-info.d.ts +3 -4
  101. package/lib/content-fields/flow-whatsapp-request-contact-info.js +51 -0
  102. package/lib/content-fields/flow-whatsapp-request-contact-info.js.map +1 -0
  103. package/lib/{cjs/content-fields → content-fields}/flow-whatsapp-template.d.ts +2 -2
  104. package/lib/{esm/content-fields → content-fields}/flow-whatsapp-template.js +119 -102
  105. package/lib/content-fields/flow-whatsapp-template.js.map +1 -0
  106. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/ai-agent-router.d.ts +3 -3
  107. package/lib/content-fields/hubtype-fields/ai-agent-router.js +4 -0
  108. package/lib/content-fields/hubtype-fields/ai-agent-router.js.map +1 -0
  109. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/ai-agent.d.ts +2 -2
  110. package/lib/content-fields/hubtype-fields/ai-agent.js +4 -0
  111. package/lib/content-fields/hubtype-fields/ai-agent.js.map +1 -0
  112. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/bot-action.d.ts +2 -2
  113. package/lib/content-fields/hubtype-fields/bot-action.js +4 -0
  114. package/lib/content-fields/hubtype-fields/bot-action.js.map +1 -0
  115. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/button.d.ts +1 -1
  116. package/lib/content-fields/hubtype-fields/button.js +4 -0
  117. package/lib/content-fields/hubtype-fields/button.js.map +1 -0
  118. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/capture-user-input.d.ts +2 -2
  119. package/lib/content-fields/hubtype-fields/capture-user-input.js +12 -0
  120. package/lib/content-fields/hubtype-fields/capture-user-input.js.map +1 -0
  121. package/lib/{esm/content-fields → content-fields}/hubtype-fields/carousel.d.ts +3 -3
  122. package/lib/content-fields/hubtype-fields/carousel.js +4 -0
  123. package/lib/content-fields/hubtype-fields/carousel.js.map +1 -0
  124. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/channel-conditional.d.ts +3 -3
  125. package/lib/content-fields/hubtype-fields/channel-conditional.js +4 -0
  126. package/lib/content-fields/hubtype-fields/channel-conditional.js.map +1 -0
  127. package/lib/{esm/content-fields → content-fields}/hubtype-fields/common.d.ts +2 -2
  128. package/lib/content-fields/hubtype-fields/common.js +4 -0
  129. package/lib/content-fields/hubtype-fields/common.js.map +1 -0
  130. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/country-conditional.d.ts +3 -3
  131. package/lib/content-fields/hubtype-fields/country-conditional.js +4 -0
  132. package/lib/content-fields/hubtype-fields/country-conditional.js.map +1 -0
  133. package/lib/{esm/content-fields → content-fields}/hubtype-fields/custom-conditional-v2.d.ts +2 -2
  134. package/lib/{esm/content-fields → content-fields}/hubtype-fields/custom-conditional-v2.js +15 -15
  135. package/lib/content-fields/hubtype-fields/custom-conditional-v2.js.map +1 -0
  136. package/lib/{esm/content-fields → content-fields}/hubtype-fields/custom-conditional.d.ts +3 -3
  137. package/lib/content-fields/hubtype-fields/custom-conditional.js +4 -0
  138. package/lib/content-fields/hubtype-fields/custom-conditional.js.map +1 -0
  139. package/lib/{esm/content-fields → content-fields}/hubtype-fields/fallback.d.ts +2 -2
  140. package/lib/content-fields/hubtype-fields/fallback.js +4 -0
  141. package/lib/content-fields/hubtype-fields/fallback.js.map +1 -0
  142. package/lib/{esm/content-fields → content-fields}/hubtype-fields/function.d.ts +2 -2
  143. package/lib/content-fields/hubtype-fields/function.js +11 -0
  144. package/lib/content-fields/hubtype-fields/function.js.map +1 -0
  145. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/go-to-flow.d.ts +2 -2
  146. package/lib/content-fields/hubtype-fields/go-to-flow.js +4 -0
  147. package/lib/content-fields/hubtype-fields/go-to-flow.js.map +1 -0
  148. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/handoff.d.ts +2 -2
  149. package/lib/content-fields/hubtype-fields/handoff.js +4 -0
  150. package/lib/content-fields/hubtype-fields/handoff.js.map +1 -0
  151. package/lib/{esm/content-fields → content-fields}/hubtype-fields/image.d.ts +2 -2
  152. package/lib/content-fields/hubtype-fields/image.js +4 -0
  153. package/lib/content-fields/hubtype-fields/image.js.map +1 -0
  154. package/lib/content-fields/hubtype-fields/index.d.ts +27 -0
  155. package/lib/content-fields/hubtype-fields/index.js +57 -0
  156. package/lib/content-fields/hubtype-fields/index.js.map +1 -0
  157. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/keyword.d.ts +2 -2
  158. package/lib/content-fields/hubtype-fields/keyword.js +4 -0
  159. package/lib/content-fields/hubtype-fields/keyword.js.map +1 -0
  160. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/node-types.js +12 -12
  161. package/lib/content-fields/hubtype-fields/node-types.js.map +1 -0
  162. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/nodes.d.ts +23 -23
  163. package/lib/content-fields/hubtype-fields/nodes.js +4 -0
  164. package/lib/content-fields/hubtype-fields/nodes.js.map +1 -0
  165. package/lib/{esm/content-fields → content-fields}/hubtype-fields/payload.d.ts +1 -1
  166. package/lib/content-fields/hubtype-fields/payload.js +4 -0
  167. package/lib/content-fields/hubtype-fields/payload.js.map +1 -0
  168. package/lib/{esm/content-fields → content-fields}/hubtype-fields/queue-status-conditional.d.ts +3 -3
  169. package/lib/content-fields/hubtype-fields/queue-status-conditional.js +4 -0
  170. package/lib/content-fields/hubtype-fields/queue-status-conditional.js.map +1 -0
  171. package/lib/{esm/content-fields → content-fields}/hubtype-fields/rating.d.ts +2 -2
  172. package/lib/content-fields/hubtype-fields/rating.js +9 -0
  173. package/lib/content-fields/hubtype-fields/rating.js.map +1 -0
  174. package/lib/{esm/content-fields → content-fields}/hubtype-fields/smart-intent.d.ts +2 -2
  175. package/lib/content-fields/hubtype-fields/smart-intent.js +4 -0
  176. package/lib/content-fields/hubtype-fields/smart-intent.js.map +1 -0
  177. package/lib/{esm/content-fields → content-fields}/hubtype-fields/text.d.ts +3 -3
  178. package/lib/content-fields/hubtype-fields/text.js +4 -0
  179. package/lib/content-fields/hubtype-fields/text.js.map +1 -0
  180. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/url.d.ts +1 -1
  181. package/lib/content-fields/hubtype-fields/url.js +4 -0
  182. package/lib/content-fields/hubtype-fields/url.js.map +1 -0
  183. package/lib/{esm/content-fields → content-fields}/hubtype-fields/video.d.ts +2 -2
  184. package/lib/content-fields/hubtype-fields/video.js +4 -0
  185. package/lib/content-fields/hubtype-fields/video.js.map +1 -0
  186. package/lib/{esm/content-fields → content-fields}/hubtype-fields/webview.d.ts +2 -2
  187. package/lib/content-fields/hubtype-fields/webview.js +4 -0
  188. package/lib/content-fields/hubtype-fields/webview.js.map +1 -0
  189. package/lib/{esm/content-fields → content-fields}/hubtype-fields/whatsapp-button-list.d.ts +2 -2
  190. package/lib/content-fields/hubtype-fields/whatsapp-button-list.js +4 -0
  191. package/lib/content-fields/hubtype-fields/whatsapp-button-list.js.map +1 -0
  192. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/whatsapp-cta-url-button.d.ts +3 -3
  193. package/lib/content-fields/hubtype-fields/whatsapp-cta-url-button.js +4 -0
  194. package/lib/content-fields/hubtype-fields/whatsapp-cta-url-button.js.map +1 -0
  195. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/whatsapp-request-contact-info.d.ts +2 -2
  196. package/lib/content-fields/hubtype-fields/whatsapp-request-contact-info.js +4 -0
  197. package/lib/content-fields/hubtype-fields/whatsapp-request-contact-info.js.map +1 -0
  198. package/lib/{cjs/content-fields → content-fields}/hubtype-fields/whatsapp-template.d.ts +3 -3
  199. package/lib/content-fields/hubtype-fields/whatsapp-template.js +9 -0
  200. package/lib/content-fields/hubtype-fields/whatsapp-template.js.map +1 -0
  201. package/lib/content-fields/index.d.ts +25 -0
  202. package/lib/content-fields/index.js +73 -0
  203. package/lib/content-fields/index.js.map +1 -0
  204. package/lib/{cjs/content-fields → content-fields}/whatsapp-button-list/flow-whatsapp-button-list-row.d.ts +3 -3
  205. package/lib/{esm/content-fields → content-fields}/whatsapp-button-list/flow-whatsapp-button-list-row.js +16 -14
  206. package/lib/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -0
  207. package/lib/{cjs/content-fields → content-fields}/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +4 -4
  208. package/lib/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +41 -0
  209. package/lib/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -0
  210. package/lib/{esm/content-fields → content-fields}/whatsapp-button-list/flow-whatsapp-button-list.d.ts +4 -4
  211. package/lib/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +66 -0
  212. package/lib/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -0
  213. package/lib/{esm/content-fields → content-fields}/whatsapp-button-list/index.d.ts +3 -3
  214. package/lib/content-fields/whatsapp-button-list/index.js +12 -0
  215. package/lib/content-fields/whatsapp-button-list/index.js.map +1 -0
  216. package/lib/{cjs/filters → filters}/index.d.ts +2 -2
  217. package/lib/filters/index.js +16 -0
  218. package/lib/filters/index.js.map +1 -0
  219. package/lib/{cjs/flow-factory.d.ts → flow-factory.d.ts} +3 -3
  220. package/lib/flow-factory.js +75 -0
  221. package/lib/flow-factory.js.map +1 -0
  222. package/lib/{esm/functions → functions}/index.d.ts +1 -1
  223. package/lib/{cjs/functions → functions}/index.js +25 -19
  224. package/lib/functions/index.js.map +1 -0
  225. package/lib/{cjs/index.d.ts → index.d.ts} +12 -12
  226. package/lib/{esm/index.js → index.js} +94 -77
  227. package/lib/index.js.map +1 -0
  228. package/lib/services/hubtype-queues-api.js +26 -0
  229. package/lib/services/hubtype-queues-api.js.map +1 -0
  230. package/lib/structured-output/flow-builder-content.js +16 -0
  231. package/lib/structured-output/flow-builder-content.js.map +1 -0
  232. package/lib/{cjs/tracking.d.ts → tracking.d.ts} +2 -2
  233. package/lib/{cjs/tracking.js → tracking.js} +27 -21
  234. package/lib/tracking.js.map +1 -0
  235. package/lib/{esm/types.d.ts → types.d.ts} +5 -5
  236. package/lib/types.js +14 -0
  237. package/lib/types.js.map +1 -0
  238. package/lib/{esm/user-input → user-input}/capture-user-input-api.d.ts +2 -2
  239. package/lib/{cjs/user-input → user-input}/capture-user-input-api.js +44 -33
  240. package/lib/user-input/capture-user-input-api.js.map +1 -0
  241. package/lib/{esm/user-input → user-input}/index.d.ts +2 -2
  242. package/lib/user-input/index.js +46 -0
  243. package/lib/user-input/index.js.map +1 -0
  244. package/lib/{esm/user-input → user-input}/keyword.d.ts +2 -2
  245. package/lib/{esm/user-input → user-input}/keyword.js +31 -26
  246. package/lib/user-input/keyword.js.map +1 -0
  247. package/lib/{cjs/user-input → user-input}/smart-intent.d.ts +2 -2
  248. package/lib/{cjs/user-input → user-input}/smart-intent.js +36 -32
  249. package/lib/user-input/smart-intent.js.map +1 -0
  250. package/lib/{cjs/utils → utils}/ai-agent.d.ts +3 -3
  251. package/lib/utils/ai-agent.js +33 -0
  252. package/lib/utils/ai-agent.js.map +1 -0
  253. package/lib/{cjs/utils → utils}/authentication.js +10 -7
  254. package/lib/utils/authentication.js.map +1 -0
  255. package/lib/{cjs/utils → utils}/flow-locale.js +14 -18
  256. package/lib/utils/flow-locale.js.map +1 -0
  257. package/lib/{cjs/utils → utils}/get-flow-builder-plugin.d.ts +1 -1
  258. package/lib/{cjs/utils → utils}/get-flow-builder-plugin.js +4 -4
  259. package/lib/utils/get-flow-builder-plugin.js.map +1 -0
  260. package/lib/{cjs/utils → utils}/hubtype-assistant-content.d.ts +1 -2
  261. package/lib/{cjs/utils → utils}/hubtype-assistant-content.js +57 -54
  262. package/lib/utils/hubtype-assistant-content.js.map +1 -0
  263. package/lib/utils/input.js +37 -0
  264. package/lib/utils/input.js.map +1 -0
  265. package/lib/{cjs/webview → webview}/contents-context.d.ts +1 -1
  266. package/lib/webview/contents-context.js +14 -0
  267. package/lib/webview/contents-context.js.map +1 -0
  268. package/lib/webview/index.d.ts +3 -0
  269. package/lib/webview/index.js +11 -0
  270. package/lib/webview/index.js.map +1 -0
  271. package/lib/{esm/webview → webview}/types.d.ts +1 -1
  272. package/lib/webview/types.js +9 -0
  273. package/lib/webview/types.js.map +1 -0
  274. package/lib/{cjs/webview → webview}/use-webview-contents.d.ts +1 -1
  275. package/lib/webview/use-webview-contents.js +90 -0
  276. package/lib/webview/use-webview-contents.js.map +1 -0
  277. package/package.json +10 -8
  278. package/src/content-fields/flow-ai-agent-base.tsx +0 -11
  279. package/src/content-fields/flow-whatsapp-request-contact-info.tsx +1 -17
  280. package/src/content-fields/index.ts +2 -2
  281. package/src/index.ts +5 -5
  282. package/src/types.ts +6 -6
  283. package/src/utils/hubtype-assistant-content.ts +0 -14
  284. package/lib/cjs/action/ai-agent-from-user-input.js.map +0 -1
  285. package/lib/cjs/action/context.d.ts +0 -11
  286. package/lib/cjs/action/context.js +0 -17
  287. package/lib/cjs/action/context.js.map +0 -1
  288. package/lib/cjs/action/fallback.js.map +0 -1
  289. package/lib/cjs/action/first-interaction.d.ts +0 -3
  290. package/lib/cjs/action/first-interaction.js.map +0 -1
  291. package/lib/cjs/action/get-contents.js +0 -39
  292. package/lib/cjs/action/get-contents.js.map +0 -1
  293. package/lib/cjs/action/index.d.ts +0 -25
  294. package/lib/cjs/action/index.js +0 -90
  295. package/lib/cjs/action/index.js.map +0 -1
  296. package/lib/cjs/action/payload.d.ts +0 -3
  297. package/lib/cjs/action/payload.js.map +0 -1
  298. package/lib/cjs/api.js +0 -205
  299. package/lib/cjs/api.js.map +0 -1
  300. package/lib/cjs/constants.js +0 -19
  301. package/lib/cjs/constants.js.map +0 -1
  302. package/lib/cjs/content-fields/content-fields-base.d.ts +0 -20
  303. package/lib/cjs/content-fields/content-fields-base.js +0 -74
  304. package/lib/cjs/content-fields/content-fields-base.js.map +0 -1
  305. package/lib/cjs/content-fields/custom-conditional/custom-conditional-v2-evaluators.d.ts +0 -15
  306. package/lib/cjs/content-fields/custom-conditional/custom-conditional-v2-evaluators.js +0 -71
  307. package/lib/cjs/content-fields/custom-conditional/custom-conditional-v2-evaluators.js.map +0 -1
  308. package/lib/cjs/content-fields/custom-conditional/custom-conditional-v2-resolver.d.ts +0 -9
  309. package/lib/cjs/content-fields/custom-conditional/custom-conditional-v2-resolver.js.map +0 -1
  310. package/lib/cjs/content-fields/custom-conditional/flow-custom-condition-v2.js +0 -79
  311. package/lib/cjs/content-fields/custom-conditional/flow-custom-condition-v2.js.map +0 -1
  312. package/lib/cjs/content-fields/flow-ai-agent-base.d.ts +0 -25
  313. package/lib/cjs/content-fields/flow-ai-agent-base.js +0 -97
  314. package/lib/cjs/content-fields/flow-ai-agent-base.js.map +0 -1
  315. package/lib/cjs/content-fields/flow-ai-agent-router.d.ts +0 -21
  316. package/lib/cjs/content-fields/flow-ai-agent-router.js +0 -125
  317. package/lib/cjs/content-fields/flow-ai-agent-router.js.map +0 -1
  318. package/lib/cjs/content-fields/flow-ai-agent.js.map +0 -1
  319. package/lib/cjs/content-fields/flow-bot-action.d.ts +0 -14
  320. package/lib/cjs/content-fields/flow-bot-action.js +0 -45
  321. package/lib/cjs/content-fields/flow-bot-action.js.map +0 -1
  322. package/lib/cjs/content-fields/flow-button.d.ts +0 -31
  323. package/lib/cjs/content-fields/flow-button.js +0 -86
  324. package/lib/cjs/content-fields/flow-button.js.map +0 -1
  325. package/lib/cjs/content-fields/flow-capture-user-input.js +0 -45
  326. package/lib/cjs/content-fields/flow-capture-user-input.js.map +0 -1
  327. package/lib/cjs/content-fields/flow-carousel.d.ts +0 -22
  328. package/lib/cjs/content-fields/flow-carousel.js +0 -152
  329. package/lib/cjs/content-fields/flow-carousel.js.map +0 -1
  330. package/lib/cjs/content-fields/flow-channel-conditional.d.ts +0 -14
  331. package/lib/cjs/content-fields/flow-channel-conditional.js +0 -57
  332. package/lib/cjs/content-fields/flow-channel-conditional.js.map +0 -1
  333. package/lib/cjs/content-fields/flow-country-conditional.js +0 -59
  334. package/lib/cjs/content-fields/flow-country-conditional.js.map +0 -1
  335. package/lib/cjs/content-fields/flow-custom-conditional.js +0 -89
  336. package/lib/cjs/content-fields/flow-custom-conditional.js.map +0 -1
  337. package/lib/cjs/content-fields/flow-element.js +0 -50
  338. package/lib/cjs/content-fields/flow-element.js.map +0 -1
  339. package/lib/cjs/content-fields/flow-go-to-flow.d.ts +0 -13
  340. package/lib/cjs/content-fields/flow-go-to-flow.js +0 -51
  341. package/lib/cjs/content-fields/flow-go-to-flow.js.map +0 -1
  342. package/lib/cjs/content-fields/flow-handoff.js.map +0 -1
  343. package/lib/cjs/content-fields/flow-image.js +0 -33
  344. package/lib/cjs/content-fields/flow-image.js.map +0 -1
  345. package/lib/cjs/content-fields/flow-queue-status-conditional.js.map +0 -1
  346. package/lib/cjs/content-fields/flow-rating.d.ts +0 -15
  347. package/lib/cjs/content-fields/flow-rating.js +0 -66
  348. package/lib/cjs/content-fields/flow-rating.js.map +0 -1
  349. package/lib/cjs/content-fields/flow-text.js +0 -60
  350. package/lib/cjs/content-fields/flow-text.js.map +0 -1
  351. package/lib/cjs/content-fields/flow-video.d.ts +0 -10
  352. package/lib/cjs/content-fields/flow-video.js +0 -33
  353. package/lib/cjs/content-fields/flow-video.js.map +0 -1
  354. package/lib/cjs/content-fields/flow-webview.d.ts +0 -16
  355. package/lib/cjs/content-fields/flow-webview.js.map +0 -1
  356. package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.d.ts +0 -21
  357. package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.js +0 -92
  358. package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.js.map +0 -1
  359. package/lib/cjs/content-fields/flow-whatsapp-request-contact-info.d.ts +0 -11
  360. package/lib/cjs/content-fields/flow-whatsapp-request-contact-info.js +0 -45
  361. package/lib/cjs/content-fields/flow-whatsapp-request-contact-info.js.map +0 -1
  362. package/lib/cjs/content-fields/flow-whatsapp-template.js +0 -264
  363. package/lib/cjs/content-fields/flow-whatsapp-template.js.map +0 -1
  364. package/lib/cjs/content-fields/hubtype-fields/ai-agent-router.js +0 -3
  365. package/lib/cjs/content-fields/hubtype-fields/ai-agent-router.js.map +0 -1
  366. package/lib/cjs/content-fields/hubtype-fields/ai-agent.js +0 -3
  367. package/lib/cjs/content-fields/hubtype-fields/ai-agent.js.map +0 -1
  368. package/lib/cjs/content-fields/hubtype-fields/bot-action.js +0 -3
  369. package/lib/cjs/content-fields/hubtype-fields/bot-action.js.map +0 -1
  370. package/lib/cjs/content-fields/hubtype-fields/button.js +0 -3
  371. package/lib/cjs/content-fields/hubtype-fields/button.js.map +0 -1
  372. package/lib/cjs/content-fields/hubtype-fields/capture-user-input.js +0 -12
  373. package/lib/cjs/content-fields/hubtype-fields/capture-user-input.js.map +0 -1
  374. package/lib/cjs/content-fields/hubtype-fields/carousel.d.ts +0 -17
  375. package/lib/cjs/content-fields/hubtype-fields/carousel.js +0 -3
  376. package/lib/cjs/content-fields/hubtype-fields/carousel.js.map +0 -1
  377. package/lib/cjs/content-fields/hubtype-fields/channel-conditional.js +0 -3
  378. package/lib/cjs/content-fields/hubtype-fields/channel-conditional.js.map +0 -1
  379. package/lib/cjs/content-fields/hubtype-fields/common.d.ts +0 -83
  380. package/lib/cjs/content-fields/hubtype-fields/common.js +0 -3
  381. package/lib/cjs/content-fields/hubtype-fields/common.js.map +0 -1
  382. package/lib/cjs/content-fields/hubtype-fields/country-conditional.js +0 -3
  383. package/lib/cjs/content-fields/hubtype-fields/country-conditional.js.map +0 -1
  384. package/lib/cjs/content-fields/hubtype-fields/custom-conditional-v2.d.ts +0 -56
  385. package/lib/cjs/content-fields/hubtype-fields/custom-conditional-v2.js +0 -36
  386. package/lib/cjs/content-fields/hubtype-fields/custom-conditional-v2.js.map +0 -1
  387. package/lib/cjs/content-fields/hubtype-fields/custom-conditional.d.ts +0 -11
  388. package/lib/cjs/content-fields/hubtype-fields/custom-conditional.js +0 -3
  389. package/lib/cjs/content-fields/hubtype-fields/custom-conditional.js.map +0 -1
  390. package/lib/cjs/content-fields/hubtype-fields/fallback.d.ts +0 -9
  391. package/lib/cjs/content-fields/hubtype-fields/fallback.js +0 -3
  392. package/lib/cjs/content-fields/hubtype-fields/fallback.js.map +0 -1
  393. package/lib/cjs/content-fields/hubtype-fields/function.d.ts +0 -30
  394. package/lib/cjs/content-fields/hubtype-fields/function.js +0 -11
  395. package/lib/cjs/content-fields/hubtype-fields/function.js.map +0 -1
  396. package/lib/cjs/content-fields/hubtype-fields/go-to-flow.js +0 -3
  397. package/lib/cjs/content-fields/hubtype-fields/go-to-flow.js.map +0 -1
  398. package/lib/cjs/content-fields/hubtype-fields/handoff.js +0 -3
  399. package/lib/cjs/content-fields/hubtype-fields/handoff.js.map +0 -1
  400. package/lib/cjs/content-fields/hubtype-fields/image.d.ts +0 -8
  401. package/lib/cjs/content-fields/hubtype-fields/image.js +0 -3
  402. package/lib/cjs/content-fields/hubtype-fields/image.js.map +0 -1
  403. package/lib/cjs/content-fields/hubtype-fields/index.d.ts +0 -27
  404. package/lib/cjs/content-fields/hubtype-fields/index.js +0 -31
  405. package/lib/cjs/content-fields/hubtype-fields/index.js.map +0 -1
  406. package/lib/cjs/content-fields/hubtype-fields/keyword.js +0 -3
  407. package/lib/cjs/content-fields/hubtype-fields/keyword.js.map +0 -1
  408. package/lib/cjs/content-fields/hubtype-fields/node-types.js.map +0 -1
  409. package/lib/cjs/content-fields/hubtype-fields/nodes.js +0 -3
  410. package/lib/cjs/content-fields/hubtype-fields/nodes.js.map +0 -1
  411. package/lib/cjs/content-fields/hubtype-fields/payload.d.ts +0 -8
  412. package/lib/cjs/content-fields/hubtype-fields/payload.js +0 -3
  413. package/lib/cjs/content-fields/hubtype-fields/payload.js.map +0 -1
  414. package/lib/cjs/content-fields/hubtype-fields/queue-status-conditional.d.ts +0 -25
  415. package/lib/cjs/content-fields/hubtype-fields/queue-status-conditional.js +0 -3
  416. package/lib/cjs/content-fields/hubtype-fields/queue-status-conditional.js.map +0 -1
  417. package/lib/cjs/content-fields/hubtype-fields/rating.d.ts +0 -23
  418. package/lib/cjs/content-fields/hubtype-fields/rating.js +0 -9
  419. package/lib/cjs/content-fields/hubtype-fields/rating.js.map +0 -1
  420. package/lib/cjs/content-fields/hubtype-fields/smart-intent.d.ts +0 -12
  421. package/lib/cjs/content-fields/hubtype-fields/smart-intent.js +0 -3
  422. package/lib/cjs/content-fields/hubtype-fields/smart-intent.js.map +0 -1
  423. package/lib/cjs/content-fields/hubtype-fields/text.d.ts +0 -11
  424. package/lib/cjs/content-fields/hubtype-fields/text.js +0 -3
  425. package/lib/cjs/content-fields/hubtype-fields/text.js.map +0 -1
  426. package/lib/cjs/content-fields/hubtype-fields/url.js +0 -3
  427. package/lib/cjs/content-fields/hubtype-fields/url.js.map +0 -1
  428. package/lib/cjs/content-fields/hubtype-fields/video.d.ts +0 -8
  429. package/lib/cjs/content-fields/hubtype-fields/video.js +0 -3
  430. package/lib/cjs/content-fields/hubtype-fields/video.js.map +0 -1
  431. package/lib/cjs/content-fields/hubtype-fields/webview.d.ts +0 -17
  432. package/lib/cjs/content-fields/hubtype-fields/webview.js +0 -3
  433. package/lib/cjs/content-fields/hubtype-fields/webview.js.map +0 -1
  434. package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.d.ts +0 -21
  435. package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.js +0 -3
  436. package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.js.map +0 -1
  437. package/lib/cjs/content-fields/hubtype-fields/whatsapp-cta-url-button.js +0 -3
  438. package/lib/cjs/content-fields/hubtype-fields/whatsapp-cta-url-button.js.map +0 -1
  439. package/lib/cjs/content-fields/hubtype-fields/whatsapp-request-contact-info.js +0 -3
  440. package/lib/cjs/content-fields/hubtype-fields/whatsapp-request-contact-info.js.map +0 -1
  441. package/lib/cjs/content-fields/hubtype-fields/whatsapp-template.js +0 -9
  442. package/lib/cjs/content-fields/hubtype-fields/whatsapp-template.js.map +0 -1
  443. package/lib/cjs/content-fields/index.d.ts +0 -25
  444. package/lib/cjs/content-fields/index.js +0 -52
  445. package/lib/cjs/content-fields/index.js.map +0 -1
  446. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +0 -41
  447. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +0 -1
  448. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +0 -36
  449. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +0 -1
  450. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +0 -14
  451. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +0 -46
  452. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +0 -1
  453. package/lib/cjs/content-fields/whatsapp-button-list/index.d.ts +0 -3
  454. package/lib/cjs/content-fields/whatsapp-button-list/index.js +0 -10
  455. package/lib/cjs/content-fields/whatsapp-button-list/index.js.map +0 -1
  456. package/lib/cjs/filters/index.js +0 -17
  457. package/lib/cjs/filters/index.js.map +0 -1
  458. package/lib/cjs/flow-factory.js +0 -69
  459. package/lib/cjs/flow-factory.js.map +0 -1
  460. package/lib/cjs/functions/index.d.ts +0 -11
  461. package/lib/cjs/functions/index.js.map +0 -1
  462. package/lib/cjs/index.js +0 -178
  463. package/lib/cjs/index.js.map +0 -1
  464. package/lib/cjs/services/hubtype-queues-api.js +0 -26
  465. package/lib/cjs/services/hubtype-queues-api.js.map +0 -1
  466. package/lib/cjs/structured-output/flow-builder-content.js +0 -15
  467. package/lib/cjs/structured-output/flow-builder-content.js.map +0 -1
  468. package/lib/cjs/tracking.js.map +0 -1
  469. package/lib/cjs/types.d.ts +0 -62
  470. package/lib/cjs/types.js +0 -14
  471. package/lib/cjs/types.js.map +0 -1
  472. package/lib/cjs/user-input/capture-user-input-api.d.ts +0 -21
  473. package/lib/cjs/user-input/capture-user-input-api.js.map +0 -1
  474. package/lib/cjs/user-input/index.d.ts +0 -4
  475. package/lib/cjs/user-input/index.js +0 -37
  476. package/lib/cjs/user-input/index.js.map +0 -1
  477. package/lib/cjs/user-input/keyword.d.ts +0 -27
  478. package/lib/cjs/user-input/keyword.js +0 -84
  479. package/lib/cjs/user-input/keyword.js.map +0 -1
  480. package/lib/cjs/user-input/smart-intent.js.map +0 -1
  481. package/lib/cjs/utils/ai-agent.js +0 -28
  482. package/lib/cjs/utils/ai-agent.js.map +0 -1
  483. package/lib/cjs/utils/authentication.js.map +0 -1
  484. package/lib/cjs/utils/flow-locale.js.map +0 -1
  485. package/lib/cjs/utils/get-flow-builder-plugin.js.map +0 -1
  486. package/lib/cjs/utils/hubtype-assistant-content.js.map +0 -1
  487. package/lib/cjs/utils/input.js +0 -35
  488. package/lib/cjs/utils/input.js.map +0 -1
  489. package/lib/cjs/webview/contents-context.js +0 -12
  490. package/lib/cjs/webview/contents-context.js.map +0 -1
  491. package/lib/cjs/webview/index.d.ts +0 -3
  492. package/lib/cjs/webview/index.js +0 -10
  493. package/lib/cjs/webview/index.js.map +0 -1
  494. package/lib/cjs/webview/types.d.ts +0 -47
  495. package/lib/cjs/webview/types.js +0 -9
  496. package/lib/cjs/webview/types.js.map +0 -1
  497. package/lib/cjs/webview/use-webview-contents.js +0 -83
  498. package/lib/cjs/webview/use-webview-contents.js.map +0 -1
  499. package/lib/esm/action/ai-agent-from-user-input.d.ts +0 -3
  500. package/lib/esm/action/ai-agent-from-user-input.js +0 -32
  501. package/lib/esm/action/ai-agent-from-user-input.js.map +0 -1
  502. package/lib/esm/action/context.js +0 -17
  503. package/lib/esm/action/context.js.map +0 -1
  504. package/lib/esm/action/fallback.d.ts +0 -3
  505. package/lib/esm/action/fallback.js +0 -36
  506. package/lib/esm/action/fallback.js.map +0 -1
  507. package/lib/esm/action/first-interaction.d.ts +0 -3
  508. package/lib/esm/action/first-interaction.js +0 -88
  509. package/lib/esm/action/first-interaction.js.map +0 -1
  510. package/lib/esm/action/get-contents.d.ts +0 -3
  511. package/lib/esm/action/get-contents.js +0 -39
  512. package/lib/esm/action/get-contents.js.map +0 -1
  513. package/lib/esm/action/index.js.map +0 -1
  514. package/lib/esm/action/payload.d.ts +0 -3
  515. package/lib/esm/action/payload.js +0 -74
  516. package/lib/esm/action/payload.js.map +0 -1
  517. package/lib/esm/api.d.ts +0 -40
  518. package/lib/esm/api.js.map +0 -1
  519. package/lib/esm/constants.d.ts +0 -13
  520. package/lib/esm/constants.js +0 -19
  521. package/lib/esm/constants.js.map +0 -1
  522. package/lib/esm/content-fields/content-fields-base.js +0 -74
  523. package/lib/esm/content-fields/content-fields-base.js.map +0 -1
  524. package/lib/esm/content-fields/custom-conditional/custom-conditional-v2-evaluators.js +0 -71
  525. package/lib/esm/content-fields/custom-conditional/custom-conditional-v2-evaluators.js.map +0 -1
  526. package/lib/esm/content-fields/custom-conditional/custom-conditional-v2-resolver.js +0 -58
  527. package/lib/esm/content-fields/custom-conditional/custom-conditional-v2-resolver.js.map +0 -1
  528. package/lib/esm/content-fields/custom-conditional/flow-custom-condition-v2.d.ts +0 -17
  529. package/lib/esm/content-fields/custom-conditional/flow-custom-condition-v2.js +0 -79
  530. package/lib/esm/content-fields/custom-conditional/flow-custom-condition-v2.js.map +0 -1
  531. package/lib/esm/content-fields/flow-ai-agent-base.js +0 -97
  532. package/lib/esm/content-fields/flow-ai-agent-base.js.map +0 -1
  533. package/lib/esm/content-fields/flow-ai-agent-router.js.map +0 -1
  534. package/lib/esm/content-fields/flow-ai-agent.d.ts +0 -17
  535. package/lib/esm/content-fields/flow-ai-agent.js +0 -64
  536. package/lib/esm/content-fields/flow-ai-agent.js.map +0 -1
  537. package/lib/esm/content-fields/flow-bot-action.js.map +0 -1
  538. package/lib/esm/content-fields/flow-button.js.map +0 -1
  539. package/lib/esm/content-fields/flow-capture-user-input.d.ts +0 -14
  540. package/lib/esm/content-fields/flow-capture-user-input.js +0 -45
  541. package/lib/esm/content-fields/flow-capture-user-input.js.map +0 -1
  542. package/lib/esm/content-fields/flow-carousel.js +0 -152
  543. package/lib/esm/content-fields/flow-carousel.js.map +0 -1
  544. package/lib/esm/content-fields/flow-channel-conditional.js.map +0 -1
  545. package/lib/esm/content-fields/flow-country-conditional.d.ts +0 -13
  546. package/lib/esm/content-fields/flow-country-conditional.js.map +0 -1
  547. package/lib/esm/content-fields/flow-custom-conditional.d.ts +0 -17
  548. package/lib/esm/content-fields/flow-custom-conditional.js.map +0 -1
  549. package/lib/esm/content-fields/flow-element.d.ts +0 -22
  550. package/lib/esm/content-fields/flow-element.js +0 -50
  551. package/lib/esm/content-fields/flow-element.js.map +0 -1
  552. package/lib/esm/content-fields/flow-go-to-flow.js.map +0 -1
  553. package/lib/esm/content-fields/flow-handoff.d.ts +0 -17
  554. package/lib/esm/content-fields/flow-handoff.js +0 -68
  555. package/lib/esm/content-fields/flow-handoff.js.map +0 -1
  556. package/lib/esm/content-fields/flow-image.d.ts +0 -10
  557. package/lib/esm/content-fields/flow-image.js +0 -33
  558. package/lib/esm/content-fields/flow-image.js.map +0 -1
  559. package/lib/esm/content-fields/flow-queue-status-conditional.d.ts +0 -30
  560. package/lib/esm/content-fields/flow-queue-status-conditional.js +0 -95
  561. package/lib/esm/content-fields/flow-queue-status-conditional.js.map +0 -1
  562. package/lib/esm/content-fields/flow-rating.js +0 -66
  563. package/lib/esm/content-fields/flow-rating.js.map +0 -1
  564. package/lib/esm/content-fields/flow-text.d.ts +0 -15
  565. package/lib/esm/content-fields/flow-text.js +0 -60
  566. package/lib/esm/content-fields/flow-text.js.map +0 -1
  567. package/lib/esm/content-fields/flow-video.js +0 -33
  568. package/lib/esm/content-fields/flow-video.js.map +0 -1
  569. package/lib/esm/content-fields/flow-webview.js +0 -78
  570. package/lib/esm/content-fields/flow-webview.js.map +0 -1
  571. package/lib/esm/content-fields/flow-whatsapp-cta-url-button.js +0 -92
  572. package/lib/esm/content-fields/flow-whatsapp-cta-url-button.js.map +0 -1
  573. package/lib/esm/content-fields/flow-whatsapp-request-contact-info.js +0 -45
  574. package/lib/esm/content-fields/flow-whatsapp-request-contact-info.js.map +0 -1
  575. package/lib/esm/content-fields/flow-whatsapp-template.d.ts +0 -37
  576. package/lib/esm/content-fields/flow-whatsapp-template.js.map +0 -1
  577. package/lib/esm/content-fields/hubtype-fields/ai-agent-router.d.ts +0 -21
  578. package/lib/esm/content-fields/hubtype-fields/ai-agent-router.js +0 -3
  579. package/lib/esm/content-fields/hubtype-fields/ai-agent-router.js.map +0 -1
  580. package/lib/esm/content-fields/hubtype-fields/ai-agent.d.ts +0 -25
  581. package/lib/esm/content-fields/hubtype-fields/ai-agent.js +0 -3
  582. package/lib/esm/content-fields/hubtype-fields/ai-agent.js.map +0 -1
  583. package/lib/esm/content-fields/hubtype-fields/bot-action.d.ts +0 -10
  584. package/lib/esm/content-fields/hubtype-fields/bot-action.js +0 -3
  585. package/lib/esm/content-fields/hubtype-fields/bot-action.js.map +0 -1
  586. package/lib/esm/content-fields/hubtype-fields/button.d.ts +0 -8
  587. package/lib/esm/content-fields/hubtype-fields/button.js +0 -3
  588. package/lib/esm/content-fields/hubtype-fields/button.js.map +0 -1
  589. package/lib/esm/content-fields/hubtype-fields/capture-user-input.d.ts +0 -19
  590. package/lib/esm/content-fields/hubtype-fields/capture-user-input.js +0 -12
  591. package/lib/esm/content-fields/hubtype-fields/capture-user-input.js.map +0 -1
  592. package/lib/esm/content-fields/hubtype-fields/carousel.js +0 -3
  593. package/lib/esm/content-fields/hubtype-fields/carousel.js.map +0 -1
  594. package/lib/esm/content-fields/hubtype-fields/channel-conditional.d.ts +0 -10
  595. package/lib/esm/content-fields/hubtype-fields/channel-conditional.js +0 -3
  596. package/lib/esm/content-fields/hubtype-fields/channel-conditional.js.map +0 -1
  597. package/lib/esm/content-fields/hubtype-fields/common.js +0 -3
  598. package/lib/esm/content-fields/hubtype-fields/common.js.map +0 -1
  599. package/lib/esm/content-fields/hubtype-fields/country-conditional.d.ts +0 -10
  600. package/lib/esm/content-fields/hubtype-fields/country-conditional.js +0 -3
  601. package/lib/esm/content-fields/hubtype-fields/country-conditional.js.map +0 -1
  602. package/lib/esm/content-fields/hubtype-fields/custom-conditional-v2.js.map +0 -1
  603. package/lib/esm/content-fields/hubtype-fields/custom-conditional.js +0 -3
  604. package/lib/esm/content-fields/hubtype-fields/custom-conditional.js.map +0 -1
  605. package/lib/esm/content-fields/hubtype-fields/fallback.js +0 -3
  606. package/lib/esm/content-fields/hubtype-fields/fallback.js.map +0 -1
  607. package/lib/esm/content-fields/hubtype-fields/function.js +0 -11
  608. package/lib/esm/content-fields/hubtype-fields/function.js.map +0 -1
  609. package/lib/esm/content-fields/hubtype-fields/go-to-flow.d.ts +0 -9
  610. package/lib/esm/content-fields/hubtype-fields/go-to-flow.js +0 -3
  611. package/lib/esm/content-fields/hubtype-fields/go-to-flow.js.map +0 -1
  612. package/lib/esm/content-fields/hubtype-fields/handoff.d.ts +0 -11
  613. package/lib/esm/content-fields/hubtype-fields/handoff.js +0 -3
  614. package/lib/esm/content-fields/hubtype-fields/handoff.js.map +0 -1
  615. package/lib/esm/content-fields/hubtype-fields/image.js +0 -3
  616. package/lib/esm/content-fields/hubtype-fields/image.js.map +0 -1
  617. package/lib/esm/content-fields/hubtype-fields/index.d.ts +0 -27
  618. package/lib/esm/content-fields/hubtype-fields/index.js +0 -31
  619. package/lib/esm/content-fields/hubtype-fields/index.js.map +0 -1
  620. package/lib/esm/content-fields/hubtype-fields/keyword.d.ts +0 -9
  621. package/lib/esm/content-fields/hubtype-fields/keyword.js +0 -3
  622. package/lib/esm/content-fields/hubtype-fields/keyword.js.map +0 -1
  623. package/lib/esm/content-fields/hubtype-fields/node-types.d.ts +0 -31
  624. package/lib/esm/content-fields/hubtype-fields/node-types.js +0 -38
  625. package/lib/esm/content-fields/hubtype-fields/node-types.js.map +0 -1
  626. package/lib/esm/content-fields/hubtype-fields/nodes.d.ts +0 -26
  627. package/lib/esm/content-fields/hubtype-fields/nodes.js +0 -3
  628. package/lib/esm/content-fields/hubtype-fields/nodes.js.map +0 -1
  629. package/lib/esm/content-fields/hubtype-fields/payload.js +0 -3
  630. package/lib/esm/content-fields/hubtype-fields/payload.js.map +0 -1
  631. package/lib/esm/content-fields/hubtype-fields/queue-status-conditional.js +0 -3
  632. package/lib/esm/content-fields/hubtype-fields/queue-status-conditional.js.map +0 -1
  633. package/lib/esm/content-fields/hubtype-fields/rating.js +0 -9
  634. package/lib/esm/content-fields/hubtype-fields/rating.js.map +0 -1
  635. package/lib/esm/content-fields/hubtype-fields/smart-intent.js +0 -3
  636. package/lib/esm/content-fields/hubtype-fields/smart-intent.js.map +0 -1
  637. package/lib/esm/content-fields/hubtype-fields/text.js +0 -3
  638. package/lib/esm/content-fields/hubtype-fields/text.js.map +0 -1
  639. package/lib/esm/content-fields/hubtype-fields/url.d.ts +0 -8
  640. package/lib/esm/content-fields/hubtype-fields/url.js +0 -3
  641. package/lib/esm/content-fields/hubtype-fields/url.js.map +0 -1
  642. package/lib/esm/content-fields/hubtype-fields/video.js +0 -3
  643. package/lib/esm/content-fields/hubtype-fields/video.js.map +0 -1
  644. package/lib/esm/content-fields/hubtype-fields/webview.js +0 -3
  645. package/lib/esm/content-fields/hubtype-fields/webview.js.map +0 -1
  646. package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.js +0 -3
  647. package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.js.map +0 -1
  648. package/lib/esm/content-fields/hubtype-fields/whatsapp-cta-url-button.d.ts +0 -17
  649. package/lib/esm/content-fields/hubtype-fields/whatsapp-cta-url-button.js +0 -3
  650. package/lib/esm/content-fields/hubtype-fields/whatsapp-cta-url-button.js.map +0 -1
  651. package/lib/esm/content-fields/hubtype-fields/whatsapp-request-contact-info.d.ts +0 -8
  652. package/lib/esm/content-fields/hubtype-fields/whatsapp-request-contact-info.js +0 -3
  653. package/lib/esm/content-fields/hubtype-fields/whatsapp-request-contact-info.js.map +0 -1
  654. package/lib/esm/content-fields/hubtype-fields/whatsapp-template.d.ts +0 -96
  655. package/lib/esm/content-fields/hubtype-fields/whatsapp-template.js +0 -9
  656. package/lib/esm/content-fields/hubtype-fields/whatsapp-template.js.map +0 -1
  657. package/lib/esm/content-fields/index.d.ts +0 -25
  658. package/lib/esm/content-fields/index.js +0 -52
  659. package/lib/esm/content-fields/index.js.map +0 -1
  660. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.d.ts +0 -14
  661. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +0 -1
  662. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +0 -13
  663. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +0 -36
  664. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +0 -1
  665. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +0 -46
  666. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +0 -1
  667. package/lib/esm/content-fields/whatsapp-button-list/index.js +0 -10
  668. package/lib/esm/content-fields/whatsapp-button-list/index.js.map +0 -1
  669. package/lib/esm/filters/index.d.ts +0 -12
  670. package/lib/esm/filters/index.js +0 -17
  671. package/lib/esm/filters/index.js.map +0 -1
  672. package/lib/esm/flow-factory.d.ts +0 -12
  673. package/lib/esm/flow-factory.js +0 -69
  674. package/lib/esm/flow-factory.js.map +0 -1
  675. package/lib/esm/functions/index.js +0 -49
  676. package/lib/esm/functions/index.js.map +0 -1
  677. package/lib/esm/index.d.ts +0 -45
  678. package/lib/esm/index.js.map +0 -1
  679. package/lib/esm/services/hubtype-queues-api.d.ts +0 -14
  680. package/lib/esm/services/hubtype-queues-api.js +0 -26
  681. package/lib/esm/services/hubtype-queues-api.js.map +0 -1
  682. package/lib/esm/structured-output/flow-builder-content.d.ts +0 -13
  683. package/lib/esm/structured-output/flow-builder-content.js +0 -15
  684. package/lib/esm/structured-output/flow-builder-content.js.map +0 -1
  685. package/lib/esm/tracking.d.ts +0 -16
  686. package/lib/esm/tracking.js +0 -71
  687. package/lib/esm/tracking.js.map +0 -1
  688. package/lib/esm/types.js +0 -14
  689. package/lib/esm/types.js.map +0 -1
  690. package/lib/esm/user-input/capture-user-input-api.js +0 -88
  691. package/lib/esm/user-input/capture-user-input-api.js.map +0 -1
  692. package/lib/esm/user-input/index.js +0 -37
  693. package/lib/esm/user-input/index.js.map +0 -1
  694. package/lib/esm/user-input/keyword.js.map +0 -1
  695. package/lib/esm/user-input/smart-intent.d.ts +0 -24
  696. package/lib/esm/user-input/smart-intent.js +0 -89
  697. package/lib/esm/user-input/smart-intent.js.map +0 -1
  698. package/lib/esm/utils/ai-agent.d.ts +0 -11
  699. package/lib/esm/utils/ai-agent.js +0 -28
  700. package/lib/esm/utils/ai-agent.js.map +0 -1
  701. package/lib/esm/utils/authentication.d.ts +0 -2
  702. package/lib/esm/utils/authentication.js +0 -21
  703. package/lib/esm/utils/authentication.js.map +0 -1
  704. package/lib/esm/utils/flow-locale.d.ts +0 -22
  705. package/lib/esm/utils/flow-locale.js +0 -79
  706. package/lib/esm/utils/flow-locale.js.map +0 -1
  707. package/lib/esm/utils/get-flow-builder-plugin.d.ts +0 -3
  708. package/lib/esm/utils/get-flow-builder-plugin.js +0 -16
  709. package/lib/esm/utils/get-flow-builder-plugin.js.map +0 -1
  710. package/lib/esm/utils/hubtype-assistant-content.d.ts +0 -13
  711. package/lib/esm/utils/hubtype-assistant-content.js +0 -184
  712. package/lib/esm/utils/hubtype-assistant-content.js.map +0 -1
  713. package/lib/esm/utils/input.d.ts +0 -6
  714. package/lib/esm/utils/input.js +0 -35
  715. package/lib/esm/utils/input.js.map +0 -1
  716. package/lib/esm/webview/contents-context.d.ts +0 -2
  717. package/lib/esm/webview/contents-context.js +0 -12
  718. package/lib/esm/webview/contents-context.js.map +0 -1
  719. package/lib/esm/webview/index.d.ts +0 -3
  720. package/lib/esm/webview/index.js +0 -10
  721. package/lib/esm/webview/index.js.map +0 -1
  722. package/lib/esm/webview/types.js +0 -9
  723. package/lib/esm/webview/types.js.map +0 -1
  724. package/lib/esm/webview/use-webview-contents.d.ts +0 -2
  725. package/lib/esm/webview/use-webview-contents.js +0 -83
  726. package/lib/esm/webview/use-webview-contents.js.map +0 -1
  727. /package/lib/{cjs/constants.d.ts → constants.d.ts} +0 -0
  728. /package/lib/{cjs/content-fields → content-fields}/hubtype-fields/node-types.d.ts +0 -0
  729. /package/lib/{cjs/services → services}/hubtype-queues-api.d.ts +0 -0
  730. /package/lib/{cjs/structured-output → structured-output}/flow-builder-content.d.ts +0 -0
  731. /package/lib/{cjs/utils → utils}/authentication.d.ts +0 -0
  732. /package/lib/{cjs/utils → utils}/flow-locale.d.ts +0 -0
  733. /package/lib/{cjs/utils → utils}/input.d.ts +0 -0
@@ -1,16 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getConditionCustomResult = getConditionCustomResult;
4
- exports.findLastMatchingCondition = findLastMatchingCondition;
5
- exports.resolveWithDefaultTarget = resolveWithDefaultTarget;
6
- const hubtype_fields_1 = require("../hubtype-fields");
1
+ import { NumberConditionOperator, VariableFormat } from "../hubtype-fields/index.js";
2
+
3
+
4
+
7
5
  function getConditionCustomResult(condition, variableFormat) {
8
- switch (variableFormat) {
9
- case hubtype_fields_1.VariableFormat.String:
6
+ switch(variableFormat){
7
+ case VariableFormat.String:
10
8
  return String(condition.value);
11
- case hubtype_fields_1.VariableFormat.Number:
9
+ case VariableFormat.Number:
12
10
  return getNumberConditionCustomResult(condition);
13
- case hubtype_fields_1.VariableFormat.Boolean:
11
+ case VariableFormat.Boolean:
14
12
  // Only reached after evaluateBooleanCondition succeeds; today that is isTruthy → 'true'
15
13
  return 'true';
16
14
  default:
@@ -19,15 +17,14 @@ function getConditionCustomResult(condition, variableFormat) {
19
17
  }
20
18
  function getNumberConditionCustomResult(condition) {
21
19
  const numberCondition = condition;
22
- if (numberCondition.operator === hubtype_fields_1.NumberConditionOperator.Between ||
23
- numberCondition.operator === hubtype_fields_1.NumberConditionOperator.NotBetween) {
20
+ if (numberCondition.operator === NumberConditionOperator.Between || numberCondition.operator === NumberConditionOperator.NotBetween) {
24
21
  return `min: ${numberCondition.min} - max: ${numberCondition.max}`;
25
22
  }
26
23
  return String(numberCondition.value);
27
24
  }
28
25
  function findLastMatchingCondition(conditions, variable, variableFormat, evaluate) {
29
26
  let lastMatch;
30
- for (const condition of conditions) {
27
+ for (const condition of conditions){
31
28
  if (!evaluate(variable, condition)) {
32
29
  continue;
33
30
  }
@@ -37,7 +34,7 @@ function findLastMatchingCondition(conditions, variable, variableFormat, evaluat
37
34
  lastMatch = {
38
35
  customResult: getConditionCustomResult(condition, variableFormat),
39
36
  target: condition.target,
40
- operator: condition.operator,
37
+ operator: condition.operator
41
38
  };
42
39
  }
43
40
  return lastMatch;
@@ -52,7 +49,10 @@ function resolveWithDefaultTarget(match, defaultTarget, nodeCode, defaultCustomR
52
49
  return {
53
50
  customResult: defaultCustomResult,
54
51
  target: defaultTarget,
55
- operator: '',
52
+ operator: ''
56
53
  };
57
54
  }
55
+
56
+ export { findLastMatchingCondition, getConditionCustomResult, resolveWithDefaultTarget };
57
+
58
58
  //# sourceMappingURL=custom-conditional-v2-resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-fields/custom-conditional/custom-conditional-v2-resolver.js","sources":["../../../src/content-fields/custom-conditional/custom-conditional-v2-resolver.ts"],"sourcesContent":["import {\n type HtCondition,\n type HtNodeLink,\n type HtNumberCondition,\n type HtStringCondition,\n NumberConditionOperator,\n VariableFormat,\n} from '../hubtype-fields'\n\nexport type ConditionMatch = {\n customResult: string\n target: HtNodeLink\n operator: string\n}\n\nexport function getConditionCustomResult(\n condition: HtCondition,\n variableFormat: VariableFormat\n): string {\n switch (variableFormat) {\n case VariableFormat.String:\n return String((condition as HtStringCondition).value)\n case VariableFormat.Number:\n return getNumberConditionCustomResult(condition as HtNumberCondition)\n case VariableFormat.Boolean:\n // Only reached after evaluateBooleanCondition succeeds; today that is isTruthy → 'true'\n return 'true'\n default:\n throw new Error(`Invalid variable format ${variableFormat}`)\n }\n}\n\nfunction getNumberConditionCustomResult(condition: HtNumberCondition): string {\n const numberCondition = condition as HtNumberCondition\n if (\n numberCondition.operator === NumberConditionOperator.Between ||\n numberCondition.operator === NumberConditionOperator.NotBetween\n ) {\n return `min: ${numberCondition.min} - max: ${numberCondition.max}`\n }\n return String(numberCondition.value)\n}\n\nexport function findLastMatchingCondition<T extends HtCondition>(\n conditions: T[],\n variable: unknown,\n variableFormat: VariableFormat,\n evaluate: (variable: unknown, condition: T) => boolean\n): ConditionMatch | undefined {\n let lastMatch: ConditionMatch | undefined\n\n for (const condition of conditions) {\n if (!evaluate(variable, condition)) {\n continue\n }\n\n if (!condition.target) {\n continue\n }\n\n lastMatch = {\n customResult: getConditionCustomResult(condition, variableFormat),\n target: condition.target,\n operator: condition.operator,\n }\n }\n\n return lastMatch\n}\n\nexport function resolveWithDefaultTarget(\n match: ConditionMatch | undefined,\n defaultTarget: HtNodeLink,\n nodeCode: string,\n defaultCustomResult: string = 'default'\n): ConditionMatch {\n if (match) {\n return match\n }\n\n if (!defaultTarget) {\n throw new Error(\n `Default target not found for custom condition node ${nodeCode}`\n )\n }\n\n return {\n customResult: defaultCustomResult,\n target: defaultTarget,\n operator: '',\n }\n}\n"],"names":["NumberConditionOperator","VariableFormat","getConditionCustomResult","condition","variableFormat","String","getNumberConditionCustomResult","Error","numberCondition","findLastMatchingCondition","conditions","variable","evaluate","lastMatch","resolveWithDefaultTarget","match","defaultTarget","nodeCode","defaultCustomResult"],"mappings":";;;AAO0B;AAQnB,SAASE,wBAAwBA,CACtCC,SAAsB,EACtBC,cAA8B;IAE9B,OAAQA;QACN,KAAKH,qBAAqB;YACxB,OAAOI,OAAQF,UAAgC,KAAK;QACtD,KAAKF,qBAAqB;YACxB,OAAOK,8BAA8BA,CAACH;QACxC,KAAKF,sBAAsB;YACzB,wFAAwF;YACxF,OAAO;QACT;YACE,MAAM,IAAIM,MAAM,CAAC,wBAAwB,EAAEH,gBAAgB;IAC/D;AACF;AAEA,SAASE,8BAA8BA,CAACH,SAA4B;IAClE,MAAMK,kBAAkBL;IACxB,IACEK,gBAAgB,QAAQ,KAAKR,+BAA+B,IAC5DQ,gBAAgB,QAAQ,KAAKR,kCAAkC,EAC/D;QACA,OAAO,CAAC,KAAK,EAAEQ,gBAAgB,GAAG,CAAC,QAAQ,EAAEA,gBAAgB,GAAG,EAAE;IACpE;IACA,OAAOH,OAAOG,gBAAgB,KAAK;AACrC;AAEO,SAASC,yBAAyBA,CACvCC,UAAe,EACfC,QAAiB,EACjBP,cAA8B,EAC9BQ,QAAsD;IAEtD,IAAIC;IAEJ,KAAK,MAAMV,aAAaO,WAAY;QAClC,IAAI,CAACE,SAASD,UAAUR,YAAY;YAClC;QACF;QAEA,IAAI,CAACA,UAAU,MAAM,EAAE;YACrB;QACF;QAEAU,YAAY;YACV,cAAcX,wBAAwBA,CAACC,WAAWC;YAClD,QAAQD,UAAU,MAAM;YACxB,UAAUA,UAAU,QAAQ;QAC9B;IACF;IAEA,OAAOU;AACT;AAEO,SAASC,wBAAwBA,CACtCC,KAAiC,EACjCC,aAAyB,EACzBC,QAAgB,EAChBC,sBAA8B,SAAS;IAEvC,IAAIH,OAAO;QACT,OAAOA;IACT;IAEA,IAAI,CAACC,eAAe;QAClB,MAAM,IAAIT,MACR,CAAC,mDAAmD,EAAEU,UAAU;IAEpE;IAEA,OAAO;QACL,cAAcC;QACd,QAAQF;QACR,UAAU;IACZ;AACF"}
@@ -1,6 +1,6 @@
1
1
  import { type BotContext } from '@botonic/core';
2
- import { ContentFieldsBase } from '../content-fields-base';
3
- import { type HtCondition, type HtCustomConditionalV2Node, type HtNodeLink, VariableFormat } from '../hubtype-fields';
2
+ import { ContentFieldsBase } from '../content-fields-base.js';
3
+ import { type HtCondition, type HtCustomConditionalV2Node, type HtNodeLink, VariableFormat } from '../hubtype-fields/index.js';
4
4
  export declare class FlowCustomConditionalV2 extends ContentFieldsBase {
5
5
  variableFormat: VariableFormat;
6
6
  keyPath: string;
@@ -13,5 +13,5 @@ export declare class FlowCustomConditionalV2 extends ContentFieldsBase {
13
13
  private evaluateConditions;
14
14
  trackFlow(botContext: BotContext): Promise<void>;
15
15
  processContent(botContext: BotContext): Promise<void>;
16
- toBotonic(): import("react/jsx-runtime").JSX.Element;
16
+ toBotonic(): import("react").JSX.Element;
17
17
  }
@@ -0,0 +1,94 @@
1
+ import { Fragment, jsx } from "react/jsx-runtime";
2
+ import { EventAction } from "@botonic/core";
3
+ import { getCommonFlowContentEventArgsForContentId, trackEvent } from "../../tracking.js";
4
+ import { ContentFieldsBase } from "../content-fields-base.js";
5
+ import { VariableFormat } from "../hubtype-fields/index.js";
6
+ import { evaluateBooleanCondition, evaluateNumberCondition, evaluateStringCondition } from "./custom-conditional-v2-evaluators.js";
7
+ import { findLastMatchingCondition, resolveWithDefaultTarget } from "./custom-conditional-v2-resolver.js";
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+ class FlowCustomConditionalV2 extends ContentFieldsBase {
24
+ static fromHubtypeCMS(component, botContext) {
25
+ const newCustomConditionalV2 = new FlowCustomConditionalV2(component.id);
26
+ newCustomConditionalV2.code = component.code;
27
+ newCustomConditionalV2.variableFormat = component.content.type;
28
+ newCustomConditionalV2.keyPath = component.content.key_path;
29
+ newCustomConditionalV2.conditions = component.content.conditions;
30
+ newCustomConditionalV2.defaultTarget = component.content.default_target;
31
+ newCustomConditionalV2.setFollowUp(botContext);
32
+ return newCustomConditionalV2;
33
+ }
34
+ setFollowUp(botContext) {
35
+ const botVariable = this.getValueFromKeyPath(botContext, this.keyPath);
36
+ const resolved = this.evaluateConditions(botVariable);
37
+ this.customResult = resolved.customResult;
38
+ this.resolvedOperator = resolved.operator;
39
+ this.followUp = resolved.target;
40
+ }
41
+ evaluateConditions(botVariable) {
42
+ switch(this.variableFormat){
43
+ case VariableFormat.String:
44
+ {
45
+ const match = findLastMatchingCondition(this.conditions, botVariable, this.variableFormat, (variable, condition)=>evaluateStringCondition(variable, condition));
46
+ return resolveWithDefaultTarget(match, this.defaultTarget, this.code);
47
+ }
48
+ case VariableFormat.Number:
49
+ {
50
+ const match = findLastMatchingCondition(this.conditions, botVariable, this.variableFormat, (variable, condition)=>evaluateNumberCondition(variable, condition));
51
+ return resolveWithDefaultTarget(match, this.defaultTarget, this.code);
52
+ }
53
+ case VariableFormat.Boolean:
54
+ {
55
+ const match = findLastMatchingCondition(this.conditions, botVariable, this.variableFormat, (variable, condition)=>evaluateBooleanCondition(variable, condition));
56
+ return resolveWithDefaultTarget(match, this.defaultTarget, this.code, 'false');
57
+ }
58
+ default:
59
+ throw new Error(`Invalid variable format ${this.variableFormat} for custom condition node ${this.code}`);
60
+ }
61
+ }
62
+ async trackFlow(botContext) {
63
+ const { flowThreadId, flowId, flowName, flowNodeId, flowNodeContentId } = getCommonFlowContentEventArgsForContentId(botContext, this.id);
64
+ const eventCustomConditional = {
65
+ action: EventAction.ConditionalCustom,
66
+ flowThreadId,
67
+ flowId,
68
+ flowName,
69
+ flowNodeId,
70
+ flowNodeContentId,
71
+ flowNodeIsMeaningful: false,
72
+ conditionalVariable: this.customResult,
73
+ variableFormat: this.variableFormat,
74
+ operator: this.resolvedOperator
75
+ };
76
+ const { action, ...eventArgs } = eventCustomConditional;
77
+ await trackEvent(botContext, action, eventArgs);
78
+ }
79
+ async processContent(botContext) {
80
+ await this.filterContent(botContext, this);
81
+ await this.trackFlow(botContext);
82
+ return;
83
+ }
84
+ toBotonic() {
85
+ return /*#__PURE__*/ jsx(Fragment, {});
86
+ }
87
+ constructor(...args){
88
+ super(...args), this.customResult = '', this.resolvedOperator = '';
89
+ }
90
+ }
91
+
92
+ export { FlowCustomConditionalV2 };
93
+
94
+ //# sourceMappingURL=flow-custom-condition-v2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-fields/custom-conditional/flow-custom-condition-v2.js","sources":["../../../src/content-fields/custom-conditional/flow-custom-condition-v2.tsx"],"sourcesContent":["import {\n type BotContext,\n EventAction,\n type EventConditionalCustom,\n} from '@botonic/core'\nimport {\n getCommonFlowContentEventArgsForContentId,\n trackEvent,\n} from '../../tracking'\nimport { ContentFieldsBase } from '../content-fields-base'\nimport {\n type HtBooleanCondition,\n type HtCondition,\n type HtCustomConditionalV2Node,\n type HtNodeLink,\n type HtNumberCondition,\n type HtStringCondition,\n VariableFormat,\n} from '../hubtype-fields'\nimport {\n evaluateBooleanCondition,\n evaluateNumberCondition,\n evaluateStringCondition,\n} from './custom-conditional-v2-evaluators'\nimport {\n type ConditionMatch,\n findLastMatchingCondition,\n resolveWithDefaultTarget,\n} from './custom-conditional-v2-resolver'\n\nexport class FlowCustomConditionalV2 extends ContentFieldsBase {\n public variableFormat: VariableFormat\n public keyPath: string\n public conditions: HtCondition[]\n public defaultTarget: HtNodeLink\n public customResult = ''\n public resolvedOperator = ''\n\n static fromHubtypeCMS(\n component: HtCustomConditionalV2Node,\n botContext: BotContext\n ): FlowCustomConditionalV2 {\n const newCustomConditionalV2 = new FlowCustomConditionalV2(component.id)\n newCustomConditionalV2.code = component.code\n newCustomConditionalV2.variableFormat = component.content.type\n newCustomConditionalV2.keyPath = component.content.key_path\n newCustomConditionalV2.conditions = component.content.conditions\n newCustomConditionalV2.defaultTarget = component.content.default_target\n newCustomConditionalV2.setFollowUp(botContext)\n\n return newCustomConditionalV2\n }\n\n private setFollowUp(botContext: BotContext): void {\n const botVariable = this.getValueFromKeyPath(botContext, this.keyPath)\n const resolved = this.evaluateConditions(botVariable)\n\n this.customResult = resolved.customResult\n this.resolvedOperator = resolved.operator\n this.followUp = resolved.target\n }\n\n private evaluateConditions(botVariable: unknown): ConditionMatch {\n switch (this.variableFormat) {\n case VariableFormat.String: {\n const match = findLastMatchingCondition(\n this.conditions as HtStringCondition[],\n botVariable,\n this.variableFormat,\n (variable, condition) =>\n evaluateStringCondition(variable as string, condition)\n )\n return resolveWithDefaultTarget(match, this.defaultTarget, this.code)\n }\n case VariableFormat.Number: {\n const match = findLastMatchingCondition(\n this.conditions as HtNumberCondition[],\n botVariable,\n this.variableFormat,\n (variable, condition) =>\n evaluateNumberCondition(variable as number, condition)\n )\n return resolveWithDefaultTarget(match, this.defaultTarget, this.code)\n }\n case VariableFormat.Boolean: {\n const match = findLastMatchingCondition(\n this.conditions as HtBooleanCondition[],\n botVariable,\n this.variableFormat,\n (variable, condition) =>\n evaluateBooleanCondition(variable as boolean, condition)\n )\n return resolveWithDefaultTarget(\n match,\n this.defaultTarget,\n this.code,\n 'false'\n )\n }\n default:\n throw new Error(\n `Invalid variable format ${this.variableFormat} for custom condition node ${this.code}`\n )\n }\n }\n\n async trackFlow(botContext: BotContext): Promise<void> {\n const { flowThreadId, flowId, flowName, flowNodeId, flowNodeContentId } =\n getCommonFlowContentEventArgsForContentId(botContext, this.id)\n\n const eventCustomConditional: EventConditionalCustom = {\n action: EventAction.ConditionalCustom,\n flowThreadId,\n flowId,\n flowName,\n flowNodeId,\n flowNodeContentId,\n flowNodeIsMeaningful: false,\n conditionalVariable: this.customResult,\n variableFormat: this.variableFormat,\n operator: this.resolvedOperator,\n }\n const { action, ...eventArgs } = eventCustomConditional\n await trackEvent(botContext, action, eventArgs)\n }\n\n async processContent(botContext: BotContext): Promise<void> {\n await this.filterContent(botContext, this)\n await this.trackFlow(botContext)\n return\n }\n\n toBotonic() {\n return <></>\n }\n}\n"],"names":["EventAction","getCommonFlowContentEventArgsForContentId","trackEvent","ContentFieldsBase","VariableFormat","evaluateBooleanCondition","evaluateNumberCondition","evaluateStringCondition","findLastMatchingCondition","resolveWithDefaultTarget","FlowCustomConditionalV2","component","botContext","newCustomConditionalV2","botVariable","resolved","match","variable","condition","Error","flowThreadId","flowId","flowName","flowNodeId","flowNodeContentId","eventCustomConditional","action","eventArgs"],"mappings":"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"}
@@ -1,8 +1,8 @@
1
1
  import { type AgenticOutputMessage, type BotContext, type GuardrailRule, type HubtypeAssistantMessage, type InferenceResponse, VerbosityLevel } from '@botonic/core';
2
- import { type FlowBuilderContentMessage } from '../structured-output/flow-builder-content';
3
- import { ContentFieldsBase } from './content-fields-base';
4
- import type { HtInputGuardrailRule } from './hubtype-fields';
5
- import type { FlowContent } from './index';
2
+ import { type FlowBuilderContentMessage } from '../structured-output/flow-builder-content.js';
3
+ import { ContentFieldsBase } from './content-fields-base.js';
4
+ import type { HtInputGuardrailRule } from './hubtype-fields/index.js';
5
+ import type { FlowContent } from './index.js';
6
6
  export declare abstract class FlowAiAgentBase extends ContentFieldsBase {
7
7
  name: string;
8
8
  instructions: string;
@@ -0,0 +1,100 @@
1
+ import { Fragment, jsx } from "react/jsx-runtime";
2
+ import { OutputMessageType, VerbosityLevel } from "@botonic/core";
3
+ import { FlowBuilderOutputMessageType } from "../structured-output/flow-builder-content.js";
4
+ import { getFlowBuilderPlugin } from "../utils/get-flow-builder-plugin.js";
5
+ import { HubtypeAssistantContent } from "../utils/hubtype-assistant-content.js";
6
+ import { ContentFieldsBase } from "./content-fields-base.js";
7
+ import { FlowCarousel } from "./flow-carousel.js";
8
+ import { FlowText } from "./flow-text.js";
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+ class FlowAiAgentBase extends ContentFieldsBase {
27
+ async resolveAIAgentResponse(botContext, previousContents) {
28
+ const aiAgentResponse = await this.getAIAgentResponse(botContext, previousContents);
29
+ if (aiAgentResponse) {
30
+ this.aiAgentResponse = aiAgentResponse;
31
+ await this.trackAiAgentResponse(botContext);
32
+ this.messages = aiAgentResponse.messages;
33
+ }
34
+ return aiAgentResponse;
35
+ }
36
+ async trackFlow(_botContext) {
37
+ return;
38
+ }
39
+ async getFlowContentsByContentId(botContext, contentId) {
40
+ const flowBuilderPlugin = getFlowBuilderPlugin(botContext.plugins);
41
+ const cmsApi = flowBuilderPlugin.cmsApi;
42
+ const node = cmsApi.getNodeByContentID(contentId);
43
+ const flowContents = await flowBuilderPlugin.getContentsByNode(node);
44
+ return flowContents;
45
+ }
46
+ async messagesToBotonicJSXElements(botContext) {
47
+ for (const message of this.messages){
48
+ if (message.type === OutputMessageType.Text || message.type === OutputMessageType.TextWithButtons || message.type === OutputMessageType.BotExecutor) {
49
+ this.jsxElements.push(FlowText.fromAIAgent(this.id, message));
50
+ }
51
+ if (message.type === OutputMessageType.Carousel) {
52
+ this.jsxElements.push(FlowCarousel.fromAIAgent(this.id, message, botContext));
53
+ }
54
+ if (message.type === FlowBuilderOutputMessageType.FlowBuilderContent) {
55
+ const flowContents = await this.getFlowContentsByContentId(botContext, message.contentId);
56
+ for (const content of flowContents){
57
+ await content.processContent(botContext);
58
+ this.jsxElements.push(content.toBotonic(botContext));
59
+ }
60
+ }
61
+ }
62
+ return;
63
+ }
64
+ async processContent(botContext, previousContents) {
65
+ if (this.messages.length === 0) {
66
+ await this.resolveAIAgentResponse(botContext, previousContents);
67
+ }
68
+ if (this.jsxElements.length === 0) {
69
+ await this.filterContent(botContext, this);
70
+ await this.messagesToBotonicJSXElements(botContext);
71
+ }
72
+ return;
73
+ }
74
+ toBotonic() {
75
+ return /*#__PURE__*/ jsx(Fragment, {
76
+ children: this.jsxElements
77
+ });
78
+ }
79
+ getPreviousHubtypeContents(previousContents) {
80
+ return previousContents?.map((content)=>{
81
+ return {
82
+ role: 'assistant',
83
+ content: HubtypeAssistantContent.adapt(content)
84
+ };
85
+ }) || [];
86
+ }
87
+ getActiveInputGuardrailRules(inputGuardrailRules) {
88
+ return inputGuardrailRules?.filter((rule)=>rule.is_active)?.map((rule)=>({
89
+ name: rule.name,
90
+ description: rule.description
91
+ })) || [];
92
+ }
93
+ constructor(...args){
94
+ super(...args), this.name = '', this.instructions = '', this.model = '', this.verbosity = VerbosityLevel.Medium, this.inputGuardrailRules = [], this.messages = [], this.jsxElements = [];
95
+ }
96
+ }
97
+
98
+ export { FlowAiAgentBase };
99
+
100
+ //# sourceMappingURL=flow-ai-agent-base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-fields/flow-ai-agent-base.js","sources":["../../src/content-fields/flow-ai-agent-base.tsx"],"sourcesContent":["import {\n type AgenticOutputMessage,\n type BotContext,\n type GuardrailRule,\n type HubtypeAssistantMessage,\n type InferenceResponse,\n OutputMessageType,\n VerbosityLevel,\n} from '@botonic/core'\nimport {\n type FlowBuilderContentMessage,\n FlowBuilderOutputMessageType,\n} from '../structured-output/flow-builder-content'\nimport { getFlowBuilderPlugin } from '../utils/get-flow-builder-plugin'\nimport { HubtypeAssistantContent } from '../utils/hubtype-assistant-content'\nimport { ContentFieldsBase } from './content-fields-base'\nimport { FlowCarousel } from './flow-carousel'\nimport { FlowText } from './flow-text'\nimport type { HtInputGuardrailRule, HtNodeWithContent } from './hubtype-fields'\nimport type { FlowContent } from './index'\n\nexport abstract class FlowAiAgentBase extends ContentFieldsBase {\n public name: string = ''\n public instructions: string = ''\n public model: string = ''\n public verbosity: VerbosityLevel = VerbosityLevel.Medium\n public inputGuardrailRules: HtInputGuardrailRule[] = []\n\n public aiAgentResponse?: InferenceResponse<FlowBuilderContentMessage>\n public messages: AgenticOutputMessage<FlowBuilderContentMessage>[] = []\n public jsxElements: JSX.Element[] = []\n\n abstract getAIAgentResponse(\n botContext: BotContext,\n previousContents?: FlowContent[]\n ): Promise<InferenceResponse<FlowBuilderContentMessage> | undefined>\n\n abstract trackAiAgentResponse(botContext: BotContext): Promise<void>\n\n async resolveAIAgentResponse(\n botContext: BotContext,\n previousContents?: FlowContent[]\n ): Promise<InferenceResponse<FlowBuilderContentMessage> | undefined> {\n const aiAgentResponse = await this.getAIAgentResponse(\n botContext,\n previousContents\n )\n\n if (aiAgentResponse) {\n this.aiAgentResponse = aiAgentResponse\n await this.trackAiAgentResponse(botContext)\n this.messages = aiAgentResponse.messages\n }\n\n return aiAgentResponse\n }\n\n async trackFlow(_botContext: BotContext): Promise<void> {\n return\n }\n\n async getFlowContentsByContentId(\n botContext: BotContext,\n contentId: string\n ): Promise<FlowContent[]> {\n const flowBuilderPlugin = getFlowBuilderPlugin(botContext.plugins)\n const cmsApi = flowBuilderPlugin.cmsApi\n const node = cmsApi.getNodeByContentID(contentId)\n const flowContents = await flowBuilderPlugin.getContentsByNode(\n node as HtNodeWithContent\n )\n\n return flowContents\n }\n\n async messagesToBotonicJSXElements(botContext: BotContext): Promise<void> {\n for (const message of this.messages) {\n if (\n message.type === OutputMessageType.Text ||\n message.type === OutputMessageType.TextWithButtons ||\n message.type === OutputMessageType.BotExecutor\n ) {\n this.jsxElements.push(FlowText.fromAIAgent(this.id, message))\n }\n\n if (message.type === OutputMessageType.Carousel) {\n this.jsxElements.push(\n FlowCarousel.fromAIAgent(this.id, message, botContext)\n )\n }\n\n if (message.type === FlowBuilderOutputMessageType.FlowBuilderContent) {\n const flowContents = await this.getFlowContentsByContentId(\n botContext,\n message.contentId\n )\n for (const content of flowContents) {\n await content.processContent(botContext)\n this.jsxElements.push(content.toBotonic(botContext))\n }\n }\n }\n return\n }\n\n async processContent(\n botContext: BotContext,\n previousContents?: FlowContent[]\n ): Promise<void> {\n if (this.messages.length === 0) {\n await this.resolveAIAgentResponse(botContext, previousContents)\n }\n if (this.jsxElements.length === 0) {\n await this.filterContent(botContext, this as unknown as FlowContent)\n await this.messagesToBotonicJSXElements(botContext)\n }\n return\n }\n\n toBotonic(): JSX.Element {\n return <>{this.jsxElements}</>\n }\n\n protected getPreviousHubtypeContents(\n previousContents?: FlowContent[]\n ): HubtypeAssistantMessage[] {\n return (\n previousContents?.map(content => {\n return {\n role: 'assistant',\n content: HubtypeAssistantContent.adapt(content),\n }\n }) || []\n )\n }\n\n protected getActiveInputGuardrailRules(\n inputGuardrailRules: HtInputGuardrailRule[]\n ): GuardrailRule[] {\n return (\n inputGuardrailRules\n ?.filter(rule => rule.is_active)\n ?.map(rule => ({\n name: rule.name,\n description: rule.description,\n })) || []\n )\n }\n}\n"],"names":["OutputMessageType","VerbosityLevel","FlowBuilderOutputMessageType","getFlowBuilderPlugin","HubtypeAssistantContent","ContentFieldsBase","FlowCarousel","FlowText","FlowAiAgentBase","botContext","previousContents","aiAgentResponse","_botContext","contentId","flowBuilderPlugin","cmsApi","node","flowContents","message","content","inputGuardrailRules","rule"],"mappings":";;;;;;;;;;;;;;;;;;AAQsB;AAI4B;AACqB;AACK;AACnB;AACX;AACR;AAI/B,MAAeQ,eAAeA,SAASH,iBAAiBA;IAkB7D,MAAM,uBACJI,UAAsB,EACtBC,gBAAgC,EACmC;QACnE,MAAMC,kBAAkB,MAAM,IAAI,CAAC,kBAAkB,CACnDF,YACAC;QAGF,IAAIC,iBAAiB;YACnB,IAAI,CAAC,eAAe,GAAGA;YACvB,MAAM,IAAI,CAAC,oBAAoB,CAACF;YAChC,IAAI,CAAC,QAAQ,GAAGE,gBAAgB,QAAQ;QAC1C;QAEA,OAAOA;IACT;IAEA,MAAM,UAAUC,WAAuB,EAAiB;QACtD;IACF;IAEA,MAAM,2BACJH,UAAsB,EACtBI,SAAiB,EACO;QACxB,MAAMC,oBAAoBX,oBAAoBA,CAACM,WAAW,OAAO;QACjE,MAAMM,SAASD,kBAAkB,MAAM;QACvC,MAAME,OAAOD,OAAO,kBAAkB,CAACF;QACvC,MAAMI,eAAe,MAAMH,kBAAkB,iBAAiB,CAC5DE;QAGF,OAAOC;IACT;IAEA,MAAM,6BAA6BR,UAAsB,EAAiB;QACxE,KAAK,MAAMS,WAAW,IAAI,CAAC,QAAQ,CAAE;YACnC,IACEA,QAAQ,IAAI,KAAKlB,sBAAsB,IACvCkB,QAAQ,IAAI,KAAKlB,iCAAiC,IAClDkB,QAAQ,IAAI,KAAKlB,6BAA6B,EAC9C;gBACA,IAAI,CAAC,WAAW,CAAC,IAAI,CAACO,oBAAoB,CAAC,IAAI,CAAC,EAAE,EAAEW;YACtD;YAEA,IAAIA,QAAQ,IAAI,KAAKlB,0BAA0B,EAAE;gBAC/C,IAAI,CAAC,WAAW,CAAC,IAAI,CACnBM,wBAAwB,CAAC,IAAI,CAAC,EAAE,EAAEY,SAAST;YAE/C;YAEA,IAAIS,QAAQ,IAAI,KAAKhB,+CAA+C,EAAE;gBACpE,MAAMe,eAAe,MAAM,IAAI,CAAC,0BAA0B,CACxDR,YACAS,QAAQ,SAAS;gBAEnB,KAAK,MAAMC,WAAWF,aAAc;oBAClC,MAAME,QAAQ,cAAc,CAACV;oBAC7B,IAAI,CAAC,WAAW,CAAC,IAAI,CAACU,QAAQ,SAAS,CAACV;gBAC1C;YACF;QACF;QACA;IACF;IAEA,MAAM,eACJA,UAAsB,EACtBC,gBAAgC,EACjB;QACf,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,GAAG;YAC9B,MAAM,IAAI,CAAC,sBAAsB,CAACD,YAAYC;QAChD;QACA,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,GAAG;YACjC,MAAM,IAAI,CAAC,aAAa,CAACD,YAAY,IAAI;YACzC,MAAM,IAAI,CAAC,4BAA4B,CAACA;QAC1C;QACA;IACF;IAEA,YAAyB;QACvB,qBAAO;sBAAG,IAAI,CAAC,WAAW;;IAC5B;IAEU,2BACRC,gBAAgC,EACL;QAC3B,OACEA,kBAAkB,IAAIS,CAAAA;YACpB,OAAO;gBACL,MAAM;gBACN,SAASf,6BAA6B,CAACe;YACzC;QACF,MAAM,EAAE;IAEZ;IAEU,6BACRC,mBAA2C,EAC1B;QACjB,OACEA,qBACI,OAAOC,CAAAA,OAAQA,KAAK,SAAS,GAC7B,IAAIA,CAAAA,OAAS;gBACb,MAAMA,KAAK,IAAI;gBACf,aAAaA,KAAK,WAAW;YAC/B,OAAO,EAAE;IAEf;;QA9HK,qBACE,OAAe,SACf,eAAuB,SACvB,QAAgB,SAChB,YAA4BpB,qBAAqB,OACjD,sBAA8C,EAAE,OAGhD,WAA8D,EAAE,OAChE,cAA6B,EAAE;;AAsHxC"}
@@ -1,9 +1,9 @@
1
1
  import { type BotContext, type InferenceResponse } from '@botonic/core';
2
- import { type FlowBuilderContentMessage } from '../structured-output/flow-builder-content';
3
- import { FlowAiAgent } from './flow-ai-agent';
4
- import { FlowAiAgentBase } from './flow-ai-agent-base';
5
- import type { HtAiAgentRouterNode } from './hubtype-fields';
6
- import type { FlowContent } from './index';
2
+ import { type FlowBuilderContentMessage } from '../structured-output/flow-builder-content.js';
3
+ import { FlowAiAgent } from './flow-ai-agent.js';
4
+ import { FlowAiAgentBase } from './flow-ai-agent-base.js';
5
+ import type { HtAiAgentRouterNode } from './hubtype-fields/index.js';
6
+ import type { FlowContent } from './index.js';
7
7
  export interface AvailableSpecialists {
8
8
  agent: FlowAiAgent;
9
9
  description: string;
@@ -1,17 +1,23 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FlowAiAgentRouter = void 0;
4
- const core_1 = require("@botonic/core");
5
- const flow_builder_content_1 = require("../structured-output/flow-builder-content");
6
- const tracking_1 = require("../tracking");
7
- const get_flow_builder_plugin_1 = require("../utils/get-flow-builder-plugin");
8
- const flow_ai_agent_1 = require("./flow-ai-agent");
9
- const flow_ai_agent_base_1 = require("./flow-ai-agent-base");
10
- class FlowAiAgentRouter extends flow_ai_agent_base_1.FlowAiAgentBase {
11
- constructor() {
12
- super(...arguments);
13
- this.availableSpecialists = [];
14
- }
1
+ import { AiAgentType, EventAction } from "@botonic/core";
2
+ import { FlowBuilderContentSchema } from "../structured-output/flow-builder-content.js";
3
+ import { getCommonFlowContentEventArgsForContentId, trackEvent } from "../tracking.js";
4
+ import { getFlowBuilderPlugin } from "../utils/get-flow-builder-plugin.js";
5
+ import { FlowAiAgent } from "./flow-ai-agent.js";
6
+ import { FlowAiAgentBase } from "./flow-ai-agent-base.js";
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+ class FlowAiAgentRouter extends FlowAiAgentBase {
15
21
  static fromHubtypeCMS(component, botContext) {
16
22
  const newAiAgentRouter = new FlowAiAgentRouter(component.id);
17
23
  newAiAgentRouter.code = component.code;
@@ -19,24 +25,22 @@ class FlowAiAgentRouter extends flow_ai_agent_base_1.FlowAiAgentBase {
19
25
  newAiAgentRouter.instructions = newAiAgentRouter.replaceVariables(component.content.instructions, botContext);
20
26
  newAiAgentRouter.model = component.content.model;
21
27
  newAiAgentRouter.verbosity = component.content.verbosity;
22
- newAiAgentRouter.availableSpecialists =
23
- FlowAiAgentRouter.getAvailableSpecialistsFromHubtypeCMS(component, botContext);
24
- newAiAgentRouter.inputGuardrailRules =
25
- component.content.input_guardrail_rules || [];
28
+ newAiAgentRouter.availableSpecialists = FlowAiAgentRouter.getAvailableSpecialistsFromHubtypeCMS(component, botContext);
29
+ newAiAgentRouter.inputGuardrailRules = component.content.input_guardrail_rules || [];
26
30
  return newAiAgentRouter;
27
31
  }
28
32
  static getAvailableSpecialistsFromHubtypeCMS(component, botContext) {
29
- const flowBuilderPlugin = (0, get_flow_builder_plugin_1.getFlowBuilderPlugin)(botContext.plugins);
33
+ const flowBuilderPlugin = getFlowBuilderPlugin(botContext.plugins);
30
34
  const cmsApi = flowBuilderPlugin.cmsApi;
31
- return component.content.available_specialists.map((agentSlot, index) => {
35
+ return component.content.available_specialists.map((agentSlot, index)=>{
32
36
  const aiAgentSpecialistNode = cmsApi.getNodeById(agentSlot.target.id);
33
- const specialist = flow_ai_agent_1.FlowAiAgent.fromHubtypeCMS(aiAgentSpecialistNode, botContext);
37
+ const specialist = FlowAiAgent.fromHubtypeCMS(aiAgentSpecialistNode, botContext);
34
38
  const specialistName = FlowAiAgentRouter.specialistAgentBaseName(agentSlot.name, index);
35
39
  const specialistDescription = specialist.replaceVariables(agentSlot.description || `Transfer to ${specialistName}`, botContext);
36
40
  return {
37
41
  agent: specialist,
38
42
  description: specialistDescription,
39
- name: `transfer_to_${specialistName}`,
43
+ name: `transfer_to_${specialistName}`
40
44
  };
41
45
  });
42
46
  }
@@ -44,27 +48,29 @@ class FlowAiAgentRouter extends flow_ai_agent_base_1.FlowAiAgentBase {
44
48
  return name?.trim().toLowerCase().replace(/ /g, '_') || `ai_agent_${index}`;
45
49
  }
46
50
  async getAIAgentResponse(botContext, previousContents) {
47
- const flowBuilderPlugin = (0, get_flow_builder_plugin_1.getFlowBuilderPlugin)(botContext.plugins);
51
+ const flowBuilderPlugin = getFlowBuilderPlugin(botContext.plugins);
48
52
  const aiAgentResponse = await flowBuilderPlugin.getAiAgentResponse?.(botContext, {
49
- type: core_1.AiAgentType.Router,
53
+ type: AiAgentType.Router,
50
54
  name: this.name,
51
55
  instructions: this.instructions,
52
56
  model: this.model,
53
57
  verbosity: this.verbosity,
54
- specialists: this.availableSpecialists.map(({ agent, description, name }) => ({
55
- type: core_1.AiAgentType.Specialist,
56
- name,
57
- description,
58
- instructions: agent.instructions,
59
- model: agent.model,
60
- verbosity: agent.verbosity,
61
- activeTools: agent.activeTools ?? [],
62
- inputGuardrailRules: this.getActiveInputGuardrailRules(agent.inputGuardrailRules),
63
- sourceIds: agent.sources?.map(s => s.id) ?? [],
64
- })),
58
+ specialists: this.availableSpecialists.map(({ agent, description, name })=>({
59
+ type: AiAgentType.Specialist,
60
+ name,
61
+ description,
62
+ instructions: agent.instructions,
63
+ model: agent.model,
64
+ verbosity: agent.verbosity,
65
+ activeTools: agent.activeTools ?? [],
66
+ inputGuardrailRules: this.getActiveInputGuardrailRules(agent.inputGuardrailRules),
67
+ sourceIds: agent.sources?.map((s)=>s.id) ?? []
68
+ })),
65
69
  inputGuardrailRules: this.getActiveInputGuardrailRules(this.inputGuardrailRules),
66
- outputMessagesSchemas: [flow_builder_content_1.FlowBuilderContentSchema],
67
- previousHubtypeMessages: this.getPreviousHubtypeContents(previousContents),
70
+ outputMessagesSchemas: [
71
+ FlowBuilderContentSchema
72
+ ],
73
+ previousHubtypeMessages: this.getPreviousHubtypeContents(previousContents)
68
74
  });
69
75
  return aiAgentResponse;
70
76
  }
@@ -76,9 +82,9 @@ class FlowAiAgentRouter extends flow_ai_agent_base_1.FlowAiAgentBase {
76
82
  }
77
83
  }
78
84
  async trackAIAgentRouterEvent(botContext, isTransferredToSpecialist) {
79
- const { flowThreadId, flowId, flowName, flowNodeId } = (0, tracking_1.getCommonFlowContentEventArgsForContentId)(botContext, this.id);
85
+ const { flowThreadId, flowId, flowName, flowNodeId } = getCommonFlowContentEventArgsForContentId(botContext, this.id);
80
86
  const routerEvent = {
81
- action: core_1.EventAction.AiAgentRouter,
87
+ action: EventAction.AiAgentRouter,
82
88
  flowThreadId,
83
89
  flowId,
84
90
  flowName,
@@ -94,15 +100,15 @@ class FlowAiAgentRouter extends flow_ai_agent_base_1.FlowAiAgentBase {
94
100
  startingAgentName: this.aiAgentResponse?.startingAgentName || this.name,
95
101
  lastAgentName: this.aiAgentResponse?.lastAgentName || this.name,
96
102
  availableSpecialists: this.aiAgentResponse?.availableSpecialists ?? [],
97
- isTransferredToSpecialist,
103
+ isTransferredToSpecialist
98
104
  };
99
105
  const { action, ...routerEventArgs } = routerEvent;
100
- await (0, tracking_1.trackEvent)(botContext, action, routerEventArgs);
106
+ await trackEvent(botContext, action, routerEventArgs);
101
107
  }
102
108
  async trackAIAgentSpecialistEvent(botContext) {
103
- const { flowThreadId, flowId, flowName, flowNodeId } = (0, tracking_1.getCommonFlowContentEventArgsForContentId)(botContext, this.id);
109
+ const { flowThreadId, flowId, flowName, flowNodeId } = getCommonFlowContentEventArgsForContentId(botContext, this.id);
104
110
  const specialistEvent = {
105
- action: core_1.EventAction.AiAgent,
111
+ action: EventAction.AiAgent,
106
112
  flowThreadId,
107
113
  flowId,
108
114
  flowName,
@@ -115,11 +121,16 @@ class FlowAiAgentRouter extends flow_ai_agent_base_1.FlowAiAgentBase {
115
121
  exit: this.aiAgentResponse?.exit ?? true,
116
122
  error: this.aiAgentResponse?.error ?? false,
117
123
  inputGuardrailsTriggered: [],
118
- outputGuardrailsTriggered: this.aiAgentResponse?.outputGuardrailsTriggered ?? [],
124
+ outputGuardrailsTriggered: this.aiAgentResponse?.outputGuardrailsTriggered ?? []
119
125
  };
120
126
  const { action, ...specialistEventArgs } = specialistEvent;
121
- await (0, tracking_1.trackEvent)(botContext, action, specialistEventArgs);
127
+ await trackEvent(botContext, action, specialistEventArgs);
128
+ }
129
+ constructor(...args){
130
+ super(...args), this.availableSpecialists = [];
122
131
  }
123
132
  }
124
- exports.FlowAiAgentRouter = FlowAiAgentRouter;
133
+
134
+ export { FlowAiAgentRouter };
135
+
125
136
  //# sourceMappingURL=flow-ai-agent-router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-fields/flow-ai-agent-router.js","sources":["../../src/content-fields/flow-ai-agent-router.tsx"],"sourcesContent":["import {\n AiAgentType,\n type BotContext,\n EventAction,\n type EventAiAgent,\n type EventAiAgentRouter,\n type InferenceResponse,\n} from '@botonic/core'\nimport {\n type FlowBuilderContentMessage,\n FlowBuilderContentSchema,\n} from '../structured-output/flow-builder-content'\nimport {\n getCommonFlowContentEventArgsForContentId,\n trackEvent,\n} from '../tracking'\nimport { getFlowBuilderPlugin } from '../utils/get-flow-builder-plugin'\nimport { FlowAiAgent } from './flow-ai-agent'\nimport { FlowAiAgentBase } from './flow-ai-agent-base'\nimport type { HtAiAgentNode, HtAiAgentRouterNode } from './hubtype-fields'\nimport type { FlowContent } from './index'\n\nexport interface AvailableSpecialists {\n agent: FlowAiAgent\n description: string\n name: string\n}\n\nexport class FlowAiAgentRouter extends FlowAiAgentBase {\n public availableSpecialists: AvailableSpecialists[] = []\n\n static fromHubtypeCMS(\n component: HtAiAgentRouterNode,\n botContext: BotContext\n ): FlowAiAgentRouter {\n const newAiAgentRouter = new FlowAiAgentRouter(component.id)\n newAiAgentRouter.code = component.code\n newAiAgentRouter.name = component.content.name\n newAiAgentRouter.instructions = newAiAgentRouter.replaceVariables(\n component.content.instructions,\n botContext\n )\n newAiAgentRouter.model = component.content.model\n newAiAgentRouter.verbosity = component.content.verbosity\n newAiAgentRouter.availableSpecialists =\n FlowAiAgentRouter.getAvailableSpecialistsFromHubtypeCMS(\n component,\n botContext\n )\n newAiAgentRouter.inputGuardrailRules =\n component.content.input_guardrail_rules || []\n return newAiAgentRouter\n }\n\n private static getAvailableSpecialistsFromHubtypeCMS(\n component: HtAiAgentRouterNode,\n botContext: BotContext\n ): AvailableSpecialists[] {\n const flowBuilderPlugin = getFlowBuilderPlugin(botContext.plugins)\n const cmsApi = flowBuilderPlugin.cmsApi\n\n return component.content.available_specialists.map((agentSlot, index) => {\n const aiAgentSpecialistNode = cmsApi.getNodeById<HtAiAgentNode>(\n agentSlot.target.id\n )\n const specialist = FlowAiAgent.fromHubtypeCMS(\n aiAgentSpecialistNode,\n botContext\n )\n const specialistName = FlowAiAgentRouter.specialistAgentBaseName(\n agentSlot.name,\n index\n )\n const specialistDescription = specialist.replaceVariables(\n agentSlot.description || `Transfer to ${specialistName}`,\n botContext\n )\n\n return {\n agent: specialist,\n description: specialistDescription,\n name: `transfer_to_${specialistName}`,\n }\n })\n }\n\n private static specialistAgentBaseName(\n name: string | undefined,\n index: number\n ): string {\n return name?.trim().toLowerCase().replace(/ /g, '_') || `ai_agent_${index}`\n }\n\n async getAIAgentResponse(\n botContext: BotContext,\n previousContents?: FlowContent[]\n ): Promise<InferenceResponse<FlowBuilderContentMessage> | undefined> {\n const flowBuilderPlugin = getFlowBuilderPlugin(botContext.plugins)\n const aiAgentResponse = await flowBuilderPlugin.getAiAgentResponse?.(\n botContext,\n {\n type: AiAgentType.Router,\n name: this.name,\n instructions: this.instructions,\n model: this.model,\n verbosity: this.verbosity,\n specialists: this.availableSpecialists.map(\n ({ agent, description, name }) => ({\n type: AiAgentType.Specialist,\n name,\n description,\n instructions: agent.instructions,\n model: agent.model,\n verbosity: agent.verbosity,\n activeTools: agent.activeTools ?? [],\n inputGuardrailRules: this.getActiveInputGuardrailRules(\n agent.inputGuardrailRules\n ),\n sourceIds: agent.sources?.map(s => s.id) ?? [],\n })\n ),\n inputGuardrailRules: this.getActiveInputGuardrailRules(\n this.inputGuardrailRules\n ),\n outputMessagesSchemas: [FlowBuilderContentSchema],\n previousHubtypeMessages:\n this.getPreviousHubtypeContents(previousContents),\n }\n )\n\n return aiAgentResponse\n }\n\n async trackAiAgentResponse(botContext: BotContext) {\n const isTransferredToSpecialist =\n this.aiAgentResponse?.isTransferredToSpecialist ?? false\n\n await this.trackAIAgentRouterEvent(botContext, isTransferredToSpecialist)\n\n if (isTransferredToSpecialist) {\n await this.trackAIAgentSpecialistEvent(botContext)\n }\n }\n\n private async trackAIAgentRouterEvent(\n botContext: BotContext,\n isTransferredToSpecialist: boolean\n ) {\n const { flowThreadId, flowId, flowName, flowNodeId } =\n getCommonFlowContentEventArgsForContentId(botContext, this.id)\n\n const routerEvent: EventAiAgentRouter = {\n action: EventAction.AiAgentRouter,\n flowThreadId,\n flowId,\n flowName,\n flowNodeId,\n flowNodeContentId: this.name,\n flowNodeIsMeaningful: true,\n memoryLength: this.aiAgentResponse?.memoryLength ?? 0,\n inputMessageId: botContext.input.message_id!,\n exit: this.aiAgentResponse?.exit ?? true,\n error: this.aiAgentResponse?.error ?? false,\n inputGuardrailsTriggered:\n this.aiAgentResponse?.inputGuardrailsTriggered ?? [],\n outputGuardrailsTriggered:\n this.aiAgentResponse?.outputGuardrailsTriggered ?? [],\n startingAgentName: this.aiAgentResponse?.startingAgentName || this.name,\n lastAgentName: this.aiAgentResponse?.lastAgentName || this.name,\n availableSpecialists: this.aiAgentResponse?.availableSpecialists ?? [],\n isTransferredToSpecialist,\n }\n const { action, ...routerEventArgs } = routerEvent\n await trackEvent(botContext, action, routerEventArgs)\n }\n\n private async trackAIAgentSpecialistEvent(botContext: BotContext) {\n const { flowThreadId, flowId, flowName, flowNodeId } =\n getCommonFlowContentEventArgsForContentId(botContext, this.id)\n\n const specialistEvent: EventAiAgent = {\n action: EventAction.AiAgent,\n flowThreadId,\n flowId,\n flowName,\n flowNodeId,\n flowNodeContentId: this.aiAgentResponse?.lastAgentName ?? '',\n flowNodeIsMeaningful: true,\n toolsExecuted: this.aiAgentResponse?.toolsExecuted ?? [],\n memoryLength: this.aiAgentResponse?.memoryLength ?? 0,\n inputMessageId: botContext.input.message_id!,\n exit: this.aiAgentResponse?.exit ?? true,\n error: this.aiAgentResponse?.error ?? false,\n inputGuardrailsTriggered: [],\n outputGuardrailsTriggered:\n this.aiAgentResponse?.outputGuardrailsTriggered ?? [],\n }\n const { action, ...specialistEventArgs } = specialistEvent\n await trackEvent(botContext, action, specialistEventArgs)\n }\n}\n"],"names":["AiAgentType","EventAction","FlowBuilderContentSchema","getCommonFlowContentEventArgsForContentId","trackEvent","getFlowBuilderPlugin","FlowAiAgent","FlowAiAgentBase","FlowAiAgentRouter","component","botContext","newAiAgentRouter","flowBuilderPlugin","cmsApi","agentSlot","index","aiAgentSpecialistNode","specialist","specialistName","specialistDescription","name","previousContents","aiAgentResponse","agent","description","s","isTransferredToSpecialist","flowThreadId","flowId","flowName","flowNodeId","routerEvent","action","routerEventArgs","specialistEvent","specialistEventArgs"],"mappings":"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"}
@@ -1,8 +1,8 @@
1
1
  import { type BotContext, type InferenceResponse } from '@botonic/core';
2
- import { type FlowBuilderContentMessage } from '../structured-output/flow-builder-content';
3
- import { FlowAiAgentBase } from './flow-ai-agent-base';
4
- import type { HtAiAgentNode } from './hubtype-fields/ai-agent';
5
- import type { FlowContent } from './index';
2
+ import { type FlowBuilderContentMessage } from '../structured-output/flow-builder-content.js';
3
+ import { FlowAiAgentBase } from './flow-ai-agent-base.js';
4
+ import type { HtAiAgentNode } from './hubtype-fields/ai-agent.js';
5
+ import type { FlowContent } from './index.js';
6
6
  export declare class FlowAiAgent extends FlowAiAgentBase {
7
7
  activeTools?: {
8
8
  name: string;