@bubblelab/bubble-core 0.1.9 → 0.1.11

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 (355) hide show
  1. package/dist/bubble-bundle.d.ts +633 -1658
  2. package/dist/bubble-factory.d.ts.map +1 -1
  3. package/dist/bubble-factory.js +165 -43
  4. package/dist/bubble-factory.js.map +1 -1
  5. package/dist/bubble-flow/bubble-flow-class.d.ts +22 -1
  6. package/dist/bubble-flow/bubble-flow-class.d.ts.map +1 -1
  7. package/dist/bubble-flow/bubble-flow-class.js +36 -0
  8. package/dist/bubble-flow/bubble-flow-class.js.map +1 -1
  9. package/dist/bubble-flow/sample/data-analyst-flow.d.ts +1 -1
  10. package/dist/bubble-flow/sample/data-analyst-flow.d.ts.map +1 -1
  11. package/dist/bubble-flow/sample/error-ts.d.ts +1 -1
  12. package/dist/bubble-flow/sample/error-ts.d.ts.map +1 -1
  13. package/dist/bubble-flow/sample/sanitytest.d.ts +1 -1
  14. package/dist/bubble-flow/sample/sanitytest.d.ts.map +1 -1
  15. package/dist/bubble-flow/sample/simple-webhook-2.d.ts +1 -1
  16. package/dist/bubble-flow/sample/simple-webhook-2.d.ts.map +1 -1
  17. package/dist/bubble-flow/sample/simple-webhook.d.ts +1 -1
  18. package/dist/bubble-flow/sample/simple-webhook.d.ts.map +1 -1
  19. package/dist/bubble-flow/sample/simplified-data-analysis.flow.d.ts +1 -1
  20. package/dist/bubble-flow/sample/simplified-data-analysis.flow.d.ts.map +1 -1
  21. package/dist/bubble-flow/sample/simplified-data-analysis.flow.js +6 -3
  22. package/dist/bubble-flow/sample/simplified-data-analysis.flow.js.map +1 -1
  23. package/dist/bubble-flow/sample/slack-v0.1.d.ts +1 -1
  24. package/dist/bubble-flow/sample/slack-v0.1.d.ts.map +1 -1
  25. package/dist/bubble-flow/sample/slackagenttest.d.ts +1 -1
  26. package/dist/bubble-flow/sample/slackagenttest.d.ts.map +1 -1
  27. package/dist/bubbles/service-bubble/agi-inc.d.ts +1121 -0
  28. package/dist/bubbles/service-bubble/agi-inc.d.ts.map +1 -0
  29. package/dist/bubbles/service-bubble/agi-inc.js +730 -0
  30. package/dist/bubbles/service-bubble/agi-inc.js.map +1 -0
  31. package/dist/bubbles/service-bubble/ai-agent.d.ts +297 -85
  32. package/dist/bubbles/service-bubble/ai-agent.d.ts.map +1 -1
  33. package/dist/bubbles/service-bubble/ai-agent.js +535 -399
  34. package/dist/bubbles/service-bubble/ai-agent.js.map +1 -1
  35. package/dist/bubbles/service-bubble/airtable.d.ts +1753 -0
  36. package/dist/bubbles/service-bubble/airtable.d.ts.map +1 -0
  37. package/dist/bubbles/service-bubble/airtable.js +1173 -0
  38. package/dist/bubbles/service-bubble/airtable.js.map +1 -0
  39. package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.d.ts +240 -0
  40. package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.d.ts.map +1 -0
  41. package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.js +119 -0
  42. package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.js.map +1 -0
  43. package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts +38 -38
  44. package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts +56 -56
  45. package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.d.ts +137 -0
  46. package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.d.ts.map +1 -0
  47. package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.js +81 -0
  48. package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.js.map +1 -0
  49. package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts +27 -27
  50. package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts +38 -38
  51. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts +488 -0
  52. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts.map +1 -0
  53. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.js +463 -0
  54. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.js.map +1 -0
  55. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts +262 -0
  56. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts.map +1 -0
  57. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.js +291 -0
  58. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.js.map +1 -0
  59. package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts +184 -0
  60. package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts.map +1 -0
  61. package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.js +145 -0
  62. package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.js.map +1 -0
  63. package/dist/bubbles/service-bubble/apify/actors/youtube-transcript-scraper.d.ts +52 -0
  64. package/dist/bubbles/service-bubble/apify/actors/youtube-transcript-scraper.d.ts.map +1 -0
  65. package/dist/bubbles/service-bubble/apify/actors/youtube-transcript-scraper.js +29 -0
  66. package/dist/bubbles/service-bubble/apify/actors/youtube-transcript-scraper.js.map +1 -0
  67. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts +1483 -123
  68. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts.map +1 -1
  69. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.js +48 -0
  70. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.js.map +1 -1
  71. package/dist/bubbles/service-bubble/apify/apify.d.ts +156 -11
  72. package/dist/bubbles/service-bubble/apify/apify.d.ts.map +1 -1
  73. package/dist/bubbles/service-bubble/apify/apify.js +205 -32
  74. package/dist/bubbles/service-bubble/apify/apify.js.map +1 -1
  75. package/dist/bubbles/service-bubble/apify/index.d.ts +2 -0
  76. package/dist/bubbles/service-bubble/apify/index.d.ts.map +1 -1
  77. package/dist/bubbles/service-bubble/apify/index.js +3 -0
  78. package/dist/bubbles/service-bubble/apify/index.js.map +1 -1
  79. package/dist/bubbles/service-bubble/apify/types.js +1 -2
  80. package/dist/bubbles/service-bubble/apify/types.js.map +1 -1
  81. package/dist/bubbles/service-bubble/eleven-labs.d.ts +421 -0
  82. package/dist/bubbles/service-bubble/eleven-labs.d.ts.map +1 -0
  83. package/dist/bubbles/service-bubble/eleven-labs.js +479 -0
  84. package/dist/bubbles/service-bubble/eleven-labs.js.map +1 -0
  85. package/dist/bubbles/service-bubble/firecrawl.d.ts +37748 -0
  86. package/dist/bubbles/service-bubble/firecrawl.d.ts.map +1 -0
  87. package/dist/bubbles/service-bubble/firecrawl.js +1489 -0
  88. package/dist/bubbles/service-bubble/firecrawl.js.map +1 -0
  89. package/dist/bubbles/service-bubble/followupboss.d.ts +6822 -0
  90. package/dist/bubbles/service-bubble/followupboss.d.ts.map +1 -0
  91. package/dist/bubbles/service-bubble/followupboss.js +1394 -0
  92. package/dist/bubbles/service-bubble/followupboss.js.map +1 -0
  93. package/dist/bubbles/service-bubble/github.d.ts +2399 -0
  94. package/dist/bubbles/service-bubble/github.d.ts.map +1 -0
  95. package/dist/bubbles/service-bubble/github.js +1052 -0
  96. package/dist/bubbles/service-bubble/github.js.map +1 -0
  97. package/dist/bubbles/service-bubble/gmail.d.ts +726 -232
  98. package/dist/bubbles/service-bubble/gmail.d.ts.map +1 -1
  99. package/dist/bubbles/service-bubble/gmail.js +435 -7
  100. package/dist/bubbles/service-bubble/gmail.js.map +1 -1
  101. package/dist/bubbles/service-bubble/google-calendar.d.ts +8 -8
  102. package/dist/bubbles/service-bubble/google-drive.d.ts +270 -40
  103. package/dist/bubbles/service-bubble/google-drive.d.ts.map +1 -1
  104. package/dist/bubbles/service-bubble/google-drive.js +100 -78
  105. package/dist/bubbles/service-bubble/google-drive.js.map +1 -1
  106. package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts +943 -0
  107. package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts.map +1 -0
  108. package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.d.ts +31 -0
  109. package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.d.ts.map +1 -0
  110. package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.js +184 -0
  111. package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.js.map +1 -0
  112. package/dist/bubbles/service-bubble/google-sheets/google-sheets.js +401 -0
  113. package/dist/bubbles/service-bubble/google-sheets/google-sheets.js.map +1 -0
  114. package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.d.ts +1024 -0
  115. package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.d.ts.map +1 -0
  116. package/dist/bubbles/service-bubble/{google-sheets.js → google-sheets/google-sheets.schema.js} +45 -409
  117. package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.js.map +1 -0
  118. package/dist/bubbles/service-bubble/google-sheets/google-sheets.utils.d.ts +38 -0
  119. package/dist/bubbles/service-bubble/google-sheets/google-sheets.utils.d.ts.map +1 -0
  120. package/dist/bubbles/service-bubble/google-sheets/google-sheets.utils.js +183 -0
  121. package/dist/bubbles/service-bubble/google-sheets/google-sheets.utils.js.map +1 -0
  122. package/dist/bubbles/service-bubble/google-sheets/index.d.ts +4 -0
  123. package/dist/bubbles/service-bubble/google-sheets/index.d.ts.map +1 -0
  124. package/dist/bubbles/service-bubble/google-sheets/index.js +4 -0
  125. package/dist/bubbles/service-bubble/google-sheets/index.js.map +1 -0
  126. package/dist/bubbles/service-bubble/hello-world.js +2 -2
  127. package/dist/bubbles/service-bubble/hello-world.js.map +1 -1
  128. package/dist/bubbles/service-bubble/http.d.ts +6 -6
  129. package/dist/bubbles/service-bubble/http.d.ts.map +1 -1
  130. package/dist/bubbles/service-bubble/http.js +7 -1
  131. package/dist/bubbles/service-bubble/http.js.map +1 -1
  132. package/dist/bubbles/service-bubble/insforge-db.d.ts +140 -0
  133. package/dist/bubbles/service-bubble/insforge-db.d.ts.map +1 -0
  134. package/dist/bubbles/service-bubble/insforge-db.js +260 -0
  135. package/dist/bubbles/service-bubble/insforge-db.js.map +1 -0
  136. package/dist/bubbles/service-bubble/notion/index.d.ts +3 -0
  137. package/dist/bubbles/service-bubble/notion/index.d.ts.map +1 -0
  138. package/dist/bubbles/service-bubble/notion/index.js +3 -0
  139. package/dist/bubbles/service-bubble/notion/index.js.map +1 -0
  140. package/dist/bubbles/service-bubble/notion/notion.d.ts +35405 -0
  141. package/dist/bubbles/service-bubble/notion/notion.d.ts.map +1 -0
  142. package/dist/bubbles/service-bubble/notion/notion.js +1492 -0
  143. package/dist/bubbles/service-bubble/notion/notion.js.map +1 -0
  144. package/dist/bubbles/service-bubble/notion/property-schemas.d.ts +1148 -0
  145. package/dist/bubbles/service-bubble/notion/property-schemas.d.ts.map +1 -0
  146. package/dist/bubbles/service-bubble/notion/property-schemas.js +341 -0
  147. package/dist/bubbles/service-bubble/notion/property-schemas.js.map +1 -0
  148. package/dist/bubbles/service-bubble/postgresql.d.ts +8 -8
  149. package/dist/bubbles/service-bubble/resend.d.ts +30 -9
  150. package/dist/bubbles/service-bubble/resend.d.ts.map +1 -1
  151. package/dist/bubbles/service-bubble/resend.js +133 -2
  152. package/dist/bubbles/service-bubble/resend.js.map +1 -1
  153. package/dist/bubbles/service-bubble/slack.d.ts +525 -525
  154. package/dist/bubbles/service-bubble/slack.d.ts.map +1 -1
  155. package/dist/bubbles/service-bubble/slack.js +2 -2
  156. package/dist/bubbles/service-bubble/slack.js.map +1 -1
  157. package/dist/bubbles/service-bubble/storage.d.ts +21 -17
  158. package/dist/bubbles/service-bubble/storage.d.ts.map +1 -1
  159. package/dist/bubbles/service-bubble/storage.js +59 -7
  160. package/dist/bubbles/service-bubble/storage.js.map +1 -1
  161. package/dist/bubbles/service-bubble/telegram.d.ts +7742 -0
  162. package/dist/bubbles/service-bubble/telegram.d.ts.map +1 -0
  163. package/dist/bubbles/service-bubble/telegram.js +1132 -0
  164. package/dist/bubbles/service-bubble/telegram.js.map +1 -0
  165. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +60 -4
  166. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts.map +1 -1
  167. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.js +12 -0
  168. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.js.map +1 -1
  169. package/dist/bubbles/tool-bubble/chart-js-tool.d.ts +4 -4
  170. package/dist/bubbles/tool-bubble/code-edit-tool.d.ts +188 -0
  171. package/dist/bubbles/tool-bubble/code-edit-tool.d.ts.map +1 -0
  172. package/dist/bubbles/tool-bubble/code-edit-tool.js +321 -0
  173. package/dist/bubbles/tool-bubble/code-edit-tool.js.map +1 -0
  174. package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts +8 -4
  175. package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts.map +1 -1
  176. package/dist/bubbles/tool-bubble/get-bubble-details-tool.js +132 -19
  177. package/dist/bubbles/tool-bubble/get-bubble-details-tool.js.map +1 -1
  178. package/dist/bubbles/tool-bubble/google-maps-tool.d.ts +455 -0
  179. package/dist/bubbles/tool-bubble/google-maps-tool.d.ts.map +1 -0
  180. package/dist/bubbles/tool-bubble/google-maps-tool.js +205 -0
  181. package/dist/bubbles/tool-bubble/google-maps-tool.js.map +1 -0
  182. package/dist/bubbles/tool-bubble/instagram-tool.d.ts +90 -90
  183. package/dist/bubbles/tool-bubble/instagram-tool.d.ts.map +1 -1
  184. package/dist/bubbles/tool-bubble/instagram-tool.js +2 -2
  185. package/dist/bubbles/tool-bubble/instagram-tool.js.map +1 -1
  186. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +808 -431
  187. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts.map +1 -1
  188. package/dist/bubbles/tool-bubble/linkedin-tool.js +232 -12
  189. package/dist/bubbles/tool-bubble/linkedin-tool.js.map +1 -1
  190. package/dist/bubbles/tool-bubble/list-bubbles-tool.d.ts +4 -4
  191. package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +21 -16
  192. package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts.map +1 -1
  193. package/dist/bubbles/tool-bubble/reddit-scrape-tool.js +97 -22
  194. package/dist/bubbles/tool-bubble/reddit-scrape-tool.js.map +1 -1
  195. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +17 -16
  196. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts.map +1 -1
  197. package/dist/bubbles/tool-bubble/research-agent-tool.js +27 -17
  198. package/dist/bubbles/tool-bubble/research-agent-tool.js.map +1 -1
  199. package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +4 -4
  200. package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +485 -0
  201. package/dist/bubbles/tool-bubble/tiktok-tool.d.ts.map +1 -0
  202. package/dist/bubbles/tool-bubble/tiktok-tool.js +226 -0
  203. package/dist/bubbles/tool-bubble/tiktok-tool.js.map +1 -0
  204. package/dist/bubbles/tool-bubble/twitter-tool.d.ts +947 -0
  205. package/dist/bubbles/tool-bubble/twitter-tool.d.ts.map +1 -0
  206. package/dist/bubbles/tool-bubble/twitter-tool.js +494 -0
  207. package/dist/bubbles/tool-bubble/twitter-tool.js.map +1 -0
  208. package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +32 -26
  209. package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts.map +1 -1
  210. package/dist/bubbles/tool-bubble/web-crawl-tool.js +58 -59
  211. package/dist/bubbles/tool-bubble/web-crawl-tool.js.map +1 -1
  212. package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +4 -4
  213. package/dist/bubbles/tool-bubble/web-extract-tool.d.ts.map +1 -1
  214. package/dist/bubbles/tool-bubble/web-extract-tool.js +17 -17
  215. package/dist/bubbles/tool-bubble/web-extract-tool.js.map +1 -1
  216. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +23 -115
  217. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts.map +1 -1
  218. package/dist/bubbles/tool-bubble/web-scrape-tool.js +51 -72
  219. package/dist/bubbles/tool-bubble/web-scrape-tool.js.map +1 -1
  220. package/dist/bubbles/tool-bubble/web-search-tool.d.ts +18 -6
  221. package/dist/bubbles/tool-bubble/web-search-tool.d.ts.map +1 -1
  222. package/dist/bubbles/tool-bubble/web-search-tool.js +46 -32
  223. package/dist/bubbles/tool-bubble/web-search-tool.js.map +1 -1
  224. package/dist/bubbles/tool-bubble/youtube-tool.d.ts +394 -0
  225. package/dist/bubbles/tool-bubble/youtube-tool.d.ts.map +1 -0
  226. package/dist/bubbles/tool-bubble/youtube-tool.js +352 -0
  227. package/dist/bubbles/tool-bubble/youtube-tool.js.map +1 -0
  228. package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +78 -78
  229. package/dist/bubbles/workflow-bubble/generate-document.workflow.js +1 -1
  230. package/dist/bubbles/workflow-bubble/parse-document.workflow.d.ts +62 -62
  231. package/dist/bubbles/workflow-bubble/parse-document.workflow.js +1 -1
  232. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +80 -80
  233. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts.map +1 -1
  234. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.js +4 -4
  235. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.js.map +1 -1
  236. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +52 -52
  237. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts.map +1 -1
  238. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.js +2 -2
  239. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.js.map +1 -1
  240. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +32 -32
  241. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts.map +1 -1
  242. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.js +6 -6
  243. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.js.map +1 -1
  244. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +46 -46
  245. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts.map +1 -1
  246. package/dist/bubbles/workflow-bubble/slack-formatter-agent.js +24 -4
  247. package/dist/bubbles/workflow-bubble/slack-formatter-agent.js.map +1 -1
  248. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts +27 -27
  249. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts.map +1 -1
  250. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.js +8 -8
  251. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.js.map +1 -1
  252. package/dist/bubbles.json +251 -88
  253. package/dist/index.d.ts +27 -6
  254. package/dist/index.d.ts.map +1 -1
  255. package/dist/index.js +18 -4
  256. package/dist/index.js.map +1 -1
  257. package/dist/logging/BubbleLogger.d.ts +45 -16
  258. package/dist/logging/BubbleLogger.d.ts.map +1 -1
  259. package/dist/logging/BubbleLogger.js +197 -89
  260. package/dist/logging/BubbleLogger.js.map +1 -1
  261. package/dist/logging/StreamingBubbleLogger.d.ts +13 -1
  262. package/dist/logging/StreamingBubbleLogger.d.ts.map +1 -1
  263. package/dist/logging/StreamingBubbleLogger.js +56 -13
  264. package/dist/logging/StreamingBubbleLogger.js.map +1 -1
  265. package/dist/logging/WebhookStreamLogger.d.ts +66 -0
  266. package/dist/logging/WebhookStreamLogger.d.ts.map +1 -0
  267. package/dist/logging/WebhookStreamLogger.js +291 -0
  268. package/dist/logging/WebhookStreamLogger.js.map +1 -0
  269. package/dist/types/available-tools.d.ts +1 -1
  270. package/dist/types/available-tools.d.ts.map +1 -1
  271. package/dist/types/available-tools.js +1 -0
  272. package/dist/types/available-tools.js.map +1 -1
  273. package/dist/types/base-bubble-class.d.ts +7 -5
  274. package/dist/types/base-bubble-class.d.ts.map +1 -1
  275. package/dist/types/base-bubble-class.js +63 -40
  276. package/dist/types/base-bubble-class.js.map +1 -1
  277. package/dist/types/bubble.d.ts +3 -10
  278. package/dist/types/bubble.d.ts.map +1 -1
  279. package/dist/types/bubble.js +1 -1
  280. package/dist/types/bubble.js.map +1 -1
  281. package/dist/types/service-bubble-class.d.ts +2 -2
  282. package/dist/types/service-bubble-class.d.ts.map +1 -1
  283. package/dist/types/service-bubble-class.js +2 -2
  284. package/dist/types/service-bubble-class.js.map +1 -1
  285. package/dist/types/tool-bubble-class.d.ts +2 -2
  286. package/dist/types/tool-bubble-class.d.ts.map +1 -1
  287. package/dist/types/tool-bubble-class.js +2 -4
  288. package/dist/types/tool-bubble-class.js.map +1 -1
  289. package/dist/types/workflow-bubble-class.d.ts +2 -2
  290. package/dist/types/workflow-bubble-class.d.ts.map +1 -1
  291. package/dist/types/workflow-bubble-class.js +2 -2
  292. package/dist/types/workflow-bubble-class.js.map +1 -1
  293. package/dist/utils/agent-formatter.d.ts +14 -2
  294. package/dist/utils/agent-formatter.d.ts.map +1 -1
  295. package/dist/utils/agent-formatter.js +176 -28
  296. package/dist/utils/agent-formatter.js.map +1 -1
  297. package/dist/utils/bubbleflow-validation.d.ts +7 -0
  298. package/dist/utils/bubbleflow-validation.d.ts.map +1 -1
  299. package/dist/utils/bubbleflow-validation.js +257 -35
  300. package/dist/utils/bubbleflow-validation.js.map +1 -1
  301. package/dist/utils/error-sanitizer.d.ts +12 -0
  302. package/dist/utils/error-sanitizer.d.ts.map +1 -0
  303. package/dist/utils/error-sanitizer.js +77 -0
  304. package/dist/utils/error-sanitizer.js.map +1 -0
  305. package/dist/utils/json-parsing.d.ts.map +1 -1
  306. package/dist/utils/json-parsing.js +146 -0
  307. package/dist/utils/json-parsing.js.map +1 -1
  308. package/dist/utils/safe-gemini-chat.d.ts +31 -0
  309. package/dist/utils/safe-gemini-chat.d.ts.map +1 -0
  310. package/dist/utils/safe-gemini-chat.js +93 -0
  311. package/dist/utils/safe-gemini-chat.js.map +1 -0
  312. package/dist/utils/schema-comparison.d.ts +92 -0
  313. package/dist/utils/schema-comparison.d.ts.map +1 -0
  314. package/dist/utils/schema-comparison.js +716 -0
  315. package/dist/utils/schema-comparison.js.map +1 -0
  316. package/dist/utils/zod-schema.d.ts +24 -0
  317. package/dist/utils/zod-schema.d.ts.map +1 -0
  318. package/dist/utils/zod-schema.js +56 -0
  319. package/dist/utils/zod-schema.js.map +1 -0
  320. package/package.json +7 -6
  321. package/dist/bubble-trigger/index.d.ts +0 -2
  322. package/dist/bubble-trigger/index.d.ts.map +0 -1
  323. package/dist/bubble-trigger/index.js +0 -2
  324. package/dist/bubble-trigger/index.js.map +0 -1
  325. package/dist/bubble-trigger/types.d.ts +0 -87
  326. package/dist/bubble-trigger/types.d.ts.map +0 -1
  327. package/dist/bubble-trigger/types.js +0 -14
  328. package/dist/bubble-trigger/types.js.map +0 -1
  329. package/dist/bubbles/service-bubble/apify/api-scraper.schema.d.ts +0 -370
  330. package/dist/bubbles/service-bubble/apify/api-scraper.schema.d.ts.map +0 -1
  331. package/dist/bubbles/service-bubble/apify/api-scraper.schema.js +0 -14
  332. package/dist/bubbles/service-bubble/apify/api-scraper.schema.js.map +0 -1
  333. package/dist/bubbles/service-bubble/apify.d.ts +0 -136
  334. package/dist/bubbles/service-bubble/apify.d.ts.map +0 -1
  335. package/dist/bubbles/service-bubble/apify.js +0 -282
  336. package/dist/bubbles/service-bubble/apify.js.map +0 -1
  337. package/dist/bubbles/service-bubble/google-sheets.d.ts +0 -1811
  338. package/dist/bubbles/service-bubble/google-sheets.d.ts.map +0 -1
  339. package/dist/bubbles/service-bubble/google-sheets.js.map +0 -1
  340. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts +0 -114
  341. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts.map +0 -1
  342. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js +0 -782
  343. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js.map +0 -1
  344. package/dist/types/ai-models.d.ts +0 -4
  345. package/dist/types/ai-models.d.ts.map +0 -1
  346. package/dist/types/ai-models.js +0 -20
  347. package/dist/types/ai-models.js.map +0 -1
  348. package/dist/types/api-scraper.schema.d.ts +0 -453
  349. package/dist/types/api-scraper.schema.d.ts.map +0 -1
  350. package/dist/types/api-scraper.schema.js +0 -160
  351. package/dist/types/api-scraper.schema.js.map +0 -1
  352. package/dist/utils/param-helper.d.ts +0 -2
  353. package/dist/utils/param-helper.d.ts.map +0 -1
  354. package/dist/utils/param-helper.js +0 -5
  355. package/dist/utils/param-helper.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-tool.d.ts","sourceRoot":"","sources":["../../../src/bubbles/tool-bubble/twitter-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAK5E,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBrB,CAAC;AAEH,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCtB,CAAC;AAEH,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0D3B,CAAC;AAEH,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAA2B;IACvD,MAAM,CAAC,QAAQ,CAAC,gBAAgB,6FAC4D;IAC5F,MAAM,CAAC,QAAQ,CAAC,eAAe,2uFA4D7B;IACF,MAAM,CAAC,QAAQ,CAAC,KAAK,aAAa;IAClC,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;gBAG5B,MAAM,GAAE,sBAIP,EACD,OAAO,CAAC,EAAE,aAAa;IAKnB,aAAa,IAAI,OAAO,CAAC,iBAAiB,CAAC;IA4DjD;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAYzB;;OAEG;YACW,mBAAmB;IAuBjC;;OAEG;YACW,YAAY;IAqB1B;;OAEG;YACW,eAAe;IAoB7B;;;OAGG;YACW,uBAAuB;IAwDrC;;;OAGG;YACW,qBAAqB;IA4DnC;;;OAGG;YACW,mBAAmB;IAwDjC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,eAAe;CAyExB"}
@@ -0,0 +1,494 @@
1
+ import { z } from 'zod';
2
+ import { ToolBubble } from '../../types/tool-bubble-class.js';
3
+ import { CredentialType } from '@bubblelab/shared-schemas';
4
+ import { ApifyBubble } from '../service-bubble/apify/apify.js';
5
+ // Unified Twitter data types
6
+ const TwitterUserSchema = z.object({
7
+ id: z.string().nullable().describe('User ID'),
8
+ name: z.string().nullable().describe('User display name'),
9
+ userName: z.string().nullable().describe('User handle (username)'),
10
+ description: z.string().nullable().describe('User bio'),
11
+ isVerified: z.boolean().nullable().describe('Whether user is verified'),
12
+ isBlueVerified: z
13
+ .boolean()
14
+ .nullable()
15
+ .describe('Whether user has Twitter Blue'),
16
+ profilePicture: z.string().nullable().describe('Profile picture URL'),
17
+ followers: z.number().nullable().describe('Number of followers'),
18
+ following: z.number().nullable().describe('Number of following'),
19
+ tweetsCount: z.number().nullable().describe('Total number of tweets'),
20
+ url: z.string().nullable().describe('Profile URL'),
21
+ createdAt: z.string().nullable().describe('Account creation date'),
22
+ });
23
+ const TwitterTweetSchema = z.object({
24
+ id: z.string().nullable().describe('Tweet ID'),
25
+ url: z.string().nullable().describe('Tweet URL'),
26
+ text: z.string().nullable().describe('Tweet text content'),
27
+ author: TwitterUserSchema.nullable().describe('Tweet author information'),
28
+ createdAt: z.string().nullable().describe('Tweet creation date (ISO format)'),
29
+ stats: z
30
+ .object({
31
+ retweetCount: z.number().nullable(),
32
+ replyCount: z.number().nullable(),
33
+ likeCount: z.number().nullable(),
34
+ quoteCount: z.number().nullable(),
35
+ viewCount: z.number().nullable(),
36
+ bookmarkCount: z.number().nullable(),
37
+ })
38
+ .nullable()
39
+ .describe('Tweet engagement statistics'),
40
+ lang: z.string().nullable().describe('Tweet language code'),
41
+ media: z
42
+ .array(z.object({
43
+ type: z.string().nullable(),
44
+ url: z.string().nullable(),
45
+ width: z.number().nullable(),
46
+ height: z.number().nullable(),
47
+ duration: z.number().nullable(),
48
+ }))
49
+ .nullable()
50
+ .describe('Media attachments'),
51
+ entities: z
52
+ .object({
53
+ hashtags: z.array(z.string()).nullable(),
54
+ urls: z.array(z.string()).nullable(),
55
+ mentions: z.array(z.string()).nullable(),
56
+ })
57
+ .nullable()
58
+ .describe('Tweet entities'),
59
+ isRetweet: z.boolean().nullable(),
60
+ isQuote: z.boolean().nullable(),
61
+ isReply: z.boolean().nullable(),
62
+ });
63
+ const TwitterToolParamsSchema = z.object({
64
+ operation: z
65
+ .enum(['scrapeProfile', 'search', 'scrapeUrl'])
66
+ .describe('Operation to perform: scrapeProfile (get tweets from user handles), search (search tweets by query), scrapeUrl (scrape specific Twitter URLs)'),
67
+ // === scrapeProfile operation ===
68
+ twitterHandles: z
69
+ .array(z.string())
70
+ .optional()
71
+ .describe('[scrapeProfile] Twitter handles/usernames to scrape (without @). Example: ["elonmusk", "OpenAI"]'),
72
+ // === search operation ===
73
+ searchTerms: z
74
+ .array(z.string())
75
+ .optional()
76
+ .describe('[search] Search queries. Supports advanced search syntax: https://github.com/igorbrigadir/twitter-advanced-search. Example: ["AI news", "#machinelearning"]'),
77
+ // === scrapeUrl operation ===
78
+ startUrls: z
79
+ .array(z.string())
80
+ .optional()
81
+ .describe('[scrapeUrl] Direct Twitter URLs to scrape. Supports Tweet, Profile, Search, or List URLs. Example: ["https://twitter.com/elonmusk/status/123456"]'),
82
+ // === Common options ===
83
+ maxItems: z
84
+ .number()
85
+ .min(1)
86
+ .max(1000)
87
+ .default(20)
88
+ .optional()
89
+ .describe('Maximum number of tweets to return (default: 20, max: 1000)'),
90
+ sort: z
91
+ .enum(['Top', 'Latest'])
92
+ .optional()
93
+ .describe('[search only] Sort results by "Top" (most relevant) or "Latest" (most recent)'),
94
+ tweetLanguage: z
95
+ .string()
96
+ .optional()
97
+ .describe('Filter tweets by language using ISO 639-1 code (e.g., "en" for English, "es" for Spanish)'),
98
+ credentials: z
99
+ .record(z.nativeEnum(CredentialType), z.string())
100
+ .optional()
101
+ .describe('Required credentials (auto-injected)'),
102
+ });
103
+ const TwitterToolResultSchema = z.object({
104
+ operation: z
105
+ .enum(['scrapeProfile', 'search', 'scrapeUrl'])
106
+ .describe('Operation that was performed'),
107
+ tweets: z.array(TwitterTweetSchema).describe('Array of scraped tweets'),
108
+ totalTweets: z.number().describe('Total number of tweets scraped'),
109
+ success: z.boolean().describe('Whether the operation was successful'),
110
+ error: z.string().describe('Error message if operation failed'),
111
+ });
112
+ /**
113
+ * Generic Twitter/X scraping tool with unified interface
114
+ *
115
+ * This tool abstracts away the underlying scraping service (currently Apify)
116
+ * and provides a simple, opinionated interface for Twitter data extraction.
117
+ *
118
+ * Supports three operations:
119
+ * - scrapeProfile: Scrape user profiles and their tweets
120
+ * - search: Search for tweets by keywords or hashtags
121
+ * - scrapeUrl: Scrape specific Twitter URLs (tweets, profiles, searches, lists)
122
+ *
123
+ * Future versions can add support for other services (BrightData, custom scrapers)
124
+ * while maintaining the same interface.
125
+ */
126
+ export class TwitterTool extends ToolBubble {
127
+ static bubbleName = 'twitter-tool';
128
+ static schema = TwitterToolParamsSchema;
129
+ static resultSchema = TwitterToolResultSchema;
130
+ static shortDescription = 'Scrape Twitter/X profiles, tweets, and search results with a simple, unified interface.';
131
+ static longDescription = `
132
+ Universal Twitter/X scraping tool that provides a simple, opinionated interface for extracting Twitter data.
133
+
134
+ **OPERATIONS:**
135
+ 1. **scrapeProfile**: Scrape user profiles and their tweets
136
+ - Get tweets from specific user handles
137
+ - Track influencer or brand accounts
138
+ - Monitor user activity and engagement
139
+
140
+ 2. **search**: Search for tweets by keywords or hashtags
141
+ - Find tweets by search terms or hashtags
142
+ - Monitor brand mentions and campaigns
143
+ - Research trending topics and conversations
144
+ - Supports advanced search syntax (see Twitter advanced search)
145
+
146
+ 3. **scrapeUrl**: Scrape specific Twitter URLs
147
+ - Scrape individual tweets, profiles, search results, or lists
148
+ - Extract data from specific Twitter URLs
149
+ - Useful for targeted data collection
150
+
151
+ **WHEN TO USE THIS TOOL:**
152
+ - **Any Twitter scraping task** - profiles, tweets, searches, engagement data
153
+ - **Social media research** - influencer analysis, competitor monitoring
154
+ - **Content gathering** - tweets, replies, retweets, engagement metrics
155
+ - **Market research** - brand mentions, user sentiment on Twitter
156
+ - **Trend analysis** - hashtag tracking, viral content discovery
157
+ - **Real-time monitoring** - track conversations and mentions
158
+
159
+ **DO NOT USE research-agent-tool or web-scrape-tool for Twitter** - This tool is specifically optimized for Twitter and provides:
160
+ - Unified data format across all Twitter sources
161
+ - Automatic service selection and optimization
162
+ - Rate limiting and reliability handling
163
+ - Clean, structured data ready for analysis
164
+
165
+ **Simple Interface:**
166
+ Just specify the operation and provide Twitter handles, search terms, or URLs to get back clean, structured data.
167
+ The tool automatically handles:
168
+ - Handle normalization (accepts handles with or without @)
169
+ - Service selection (currently Apify, future: multiple sources)
170
+ - Data transformation to unified format
171
+ - Error handling and retries
172
+
173
+ **What you get:**
174
+ - Tweets with text, engagement stats, timestamps
175
+ - Author information (for scrapeProfile operation)
176
+ - Hashtags, mentions, and URLs
177
+ - Media attachments
178
+ - Language and metadata
179
+
180
+ **Use cases:**
181
+ - Influencer analysis and discovery
182
+ - Brand monitoring and sentiment analysis
183
+ - Competitor research on Twitter
184
+ - Content strategy and trend analysis
185
+ - Market research through Twitter data
186
+ - Campaign performance tracking
187
+ - Hashtag research and optimization
188
+ - Real-time event monitoring
189
+
190
+ The tool uses best-available services behind the scenes while maintaining a consistent, simple interface.
191
+ `;
192
+ static alias = 'twitter';
193
+ static type = 'tool';
194
+ constructor(params = {
195
+ operation: 'scrapeProfile',
196
+ twitterHandles: ['elonmusk'],
197
+ maxItems: 20,
198
+ }, context) {
199
+ super(params, context);
200
+ }
201
+ async performAction() {
202
+ const credentials = this.params?.credentials;
203
+ if (!credentials || !credentials[CredentialType.APIFY_CRED]) {
204
+ return this.createErrorResult('Twitter scraping requires authentication. Please configure APIFY_CRED.');
205
+ }
206
+ try {
207
+ const { operation } = this.params;
208
+ // Validate required fields based on operation
209
+ if (operation === 'scrapeProfile' &&
210
+ (!this.params.twitterHandles || this.params.twitterHandles.length === 0)) {
211
+ return this.createErrorResult('twitterHandles array is required for scrapeProfile operation');
212
+ }
213
+ if (operation === 'search' &&
214
+ (!this.params.searchTerms || this.params.searchTerms.length === 0)) {
215
+ return this.createErrorResult('searchTerms array is required for search operation');
216
+ }
217
+ if (operation === 'scrapeUrl' &&
218
+ (!this.params.startUrls || this.params.startUrls.length === 0)) {
219
+ return this.createErrorResult('startUrls array is required for scrapeUrl operation');
220
+ }
221
+ const result = await (async () => {
222
+ switch (operation) {
223
+ case 'scrapeProfile':
224
+ return await this.handleScrapeProfile(this.params);
225
+ case 'search':
226
+ return await this.handleSearch(this.params);
227
+ case 'scrapeUrl':
228
+ return await this.handleScrapeUrl(this.params);
229
+ default:
230
+ throw new Error(`Unsupported operation: ${operation}`);
231
+ }
232
+ })();
233
+ return result;
234
+ }
235
+ catch (error) {
236
+ return this.createErrorResult(error instanceof Error ? error.message : 'Unknown error occurred');
237
+ }
238
+ }
239
+ /**
240
+ * Create an error result
241
+ */
242
+ createErrorResult(errorMessage) {
243
+ const { operation } = this.params;
244
+ return {
245
+ operation: operation || 'scrapeProfile',
246
+ tweets: [],
247
+ totalTweets: 0,
248
+ success: false,
249
+ error: errorMessage,
250
+ };
251
+ }
252
+ /**
253
+ * Handle scrapeProfile operation
254
+ */
255
+ async handleScrapeProfile(params) {
256
+ // Normalize handles (remove @ if present)
257
+ const normalizedHandles = this.normalizeHandles(params.twitterHandles);
258
+ // Use Apify service to scrape profiles
259
+ const result = await this.scrapeWithApifyProfiles(normalizedHandles, params.maxItems || 20, params.tweetLanguage, params.credentials);
260
+ return {
261
+ operation: 'scrapeProfile',
262
+ tweets: result.tweets,
263
+ totalTweets: result.totalTweets,
264
+ success: result.success,
265
+ error: result.error,
266
+ };
267
+ }
268
+ /**
269
+ * Handle search operation
270
+ */
271
+ async handleSearch(params) {
272
+ // Use Apify service to search tweets
273
+ const result = await this.scrapeWithApifySearch(params.searchTerms, params.maxItems || 20, params.sort, params.tweetLanguage, params.credentials);
274
+ return {
275
+ operation: 'search',
276
+ tweets: result.tweets,
277
+ totalTweets: result.totalTweets,
278
+ success: result.success,
279
+ error: result.error,
280
+ };
281
+ }
282
+ /**
283
+ * Handle scrapeUrl operation
284
+ */
285
+ async handleScrapeUrl(params) {
286
+ // Use Apify service to scrape URLs
287
+ const result = await this.scrapeWithApifyUrls(params.startUrls, params.maxItems || 20, params.tweetLanguage, params.credentials);
288
+ return {
289
+ operation: 'scrapeUrl',
290
+ tweets: result.tweets,
291
+ totalTweets: result.totalTweets,
292
+ success: result.success,
293
+ error: result.error,
294
+ };
295
+ }
296
+ /**
297
+ * Scrape profiles using Apify service
298
+ * This is the current implementation - future versions could add other services
299
+ */
300
+ async scrapeWithApifyProfiles(handles, maxItems, tweetLanguage, credentials) {
301
+ const input = {
302
+ twitterHandles: handles,
303
+ maxItems,
304
+ };
305
+ if (tweetLanguage) {
306
+ input.tweetLanguage = tweetLanguage;
307
+ }
308
+ const tweetProfileScraper = new ApifyBubble({
309
+ actorId: 'apidojo/tweet-scraper',
310
+ input,
311
+ waitForFinish: true,
312
+ timeout: 180000, // 3 minutes
313
+ credentials,
314
+ }, this.context, 'tweetProfileScraper');
315
+ const apifyResult = await tweetProfileScraper.action();
316
+ if (!apifyResult.data.success) {
317
+ return {
318
+ tweets: [],
319
+ totalTweets: 0,
320
+ success: false,
321
+ error: apifyResult.data.error ||
322
+ 'Failed to scrape Twitter profiles. Please try again.',
323
+ };
324
+ }
325
+ const items = apifyResult.data.items || [];
326
+ const tweets = this.transformTweets(items);
327
+ return {
328
+ tweets,
329
+ totalTweets: tweets.length,
330
+ success: true,
331
+ error: '',
332
+ };
333
+ }
334
+ /**
335
+ * Search tweets using Apify service
336
+ * This is the current implementation - future versions could add other services
337
+ */
338
+ async scrapeWithApifySearch(searchTerms, maxItems, sort, tweetLanguage, credentials) {
339
+ const input = {
340
+ searchTerms,
341
+ maxItems,
342
+ };
343
+ if (sort) {
344
+ input.sort = sort;
345
+ }
346
+ if (tweetLanguage) {
347
+ input.tweetLanguage = tweetLanguage;
348
+ }
349
+ const tweetSearcher = new ApifyBubble({
350
+ actorId: 'apidojo/tweet-scraper',
351
+ input,
352
+ waitForFinish: true,
353
+ timeout: 180000, // 3 minutes
354
+ credentials,
355
+ }, this.context, 'tweetSearcher');
356
+ const apifyResult = await tweetSearcher.action();
357
+ if (!apifyResult.data.success) {
358
+ return {
359
+ tweets: [],
360
+ totalTweets: 0,
361
+ success: false,
362
+ error: apifyResult.data.error ||
363
+ 'Failed to search Twitter. Please try again.',
364
+ };
365
+ }
366
+ const items = apifyResult.data.items || [];
367
+ const tweets = this.transformTweets(items);
368
+ return {
369
+ tweets,
370
+ totalTweets: tweets.length,
371
+ success: true,
372
+ error: '',
373
+ };
374
+ }
375
+ /**
376
+ * Scrape URLs using Apify service
377
+ * This is the current implementation - future versions could add other services
378
+ */
379
+ async scrapeWithApifyUrls(urls, maxItems, tweetLanguage, credentials) {
380
+ const input = {
381
+ startUrls: urls,
382
+ maxItems,
383
+ };
384
+ if (tweetLanguage) {
385
+ input.tweetLanguage = tweetLanguage;
386
+ }
387
+ const tweetUrlScraper = new ApifyBubble({
388
+ actorId: 'apidojo/tweet-scraper',
389
+ input,
390
+ waitForFinish: true,
391
+ timeout: 180000, // 3 minutes
392
+ credentials,
393
+ }, this.context, 'tweetUrlScraper');
394
+ const apifyResult = await tweetUrlScraper.action();
395
+ if (!apifyResult.data.success) {
396
+ return {
397
+ tweets: [],
398
+ totalTweets: 0,
399
+ success: false,
400
+ error: apifyResult.data.error ||
401
+ 'Failed to scrape Twitter URLs. Please try again.',
402
+ };
403
+ }
404
+ const items = apifyResult.data.items || [];
405
+ const tweets = this.transformTweets(items);
406
+ return {
407
+ tweets,
408
+ totalTweets: tweets.length,
409
+ success: true,
410
+ error: '',
411
+ };
412
+ }
413
+ /**
414
+ * Normalize Twitter handles (remove @ if present)
415
+ */
416
+ normalizeHandles(handles) {
417
+ return handles.map((handle) => {
418
+ // Remove @ if present
419
+ return handle.startsWith('@') ? handle.slice(1) : handle;
420
+ });
421
+ }
422
+ transformTweets(items) {
423
+ return items.map((item) => ({
424
+ id: item.id || null,
425
+ url: item.url || null,
426
+ text: item.text || null,
427
+ author: item.author
428
+ ? {
429
+ id: item.author.id || null,
430
+ name: item.author.name || null,
431
+ userName: item.author.userName || null,
432
+ description: item.author.description || null,
433
+ isVerified: item.author.isVerified || null,
434
+ isBlueVerified: item.author.isBlueVerified || null,
435
+ profilePicture: item.author.profilePicture || null,
436
+ followers: item.author.followers || null,
437
+ following: item.author.following || null,
438
+ tweetsCount: item.author.tweetsCount || null,
439
+ url: item.author.url || null,
440
+ createdAt: item.author.createdAt || null,
441
+ }
442
+ : null,
443
+ createdAt: item.createdAt || null,
444
+ stats: {
445
+ retweetCount: item.retweetCount || null,
446
+ replyCount: item.replyCount || null,
447
+ likeCount: item.likeCount || null,
448
+ quoteCount: item.quoteCount || null,
449
+ viewCount: item.viewCount || null,
450
+ bookmarkCount: item.bookmarkCount || null,
451
+ },
452
+ lang: item.lang || null,
453
+ media: item.media
454
+ ? item.media.map((m) => {
455
+ if (typeof m === 'string') {
456
+ return {
457
+ type: null,
458
+ url: m,
459
+ width: null,
460
+ height: null,
461
+ duration: null,
462
+ };
463
+ }
464
+ return {
465
+ type: m.type || null,
466
+ url: m.url || null,
467
+ width: m.width || null,
468
+ height: m.height || null,
469
+ duration: m.duration || null,
470
+ };
471
+ })
472
+ : null,
473
+ entities: item.entities
474
+ ? {
475
+ hashtags: item.entities.hashtags
476
+ ? item.entities.hashtags.map((h) => h.text || '').filter((t) => t)
477
+ : null,
478
+ urls: item.entities.urls
479
+ ? item.entities.urls.map((u) => u.url || '').filter((u) => u)
480
+ : null,
481
+ mentions: item.entities.userMentions
482
+ ? item.entities.userMentions
483
+ .map((m) => m.screenName || '')
484
+ .filter((m) => m)
485
+ : null,
486
+ }
487
+ : null,
488
+ isRetweet: item.isRetweet || null,
489
+ isQuote: item.isQuote || null,
490
+ isReply: item.isReply || null,
491
+ }));
492
+ }
493
+ }
494
+ //# sourceMappingURL=twitter-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-tool.js","sourceRoot":"","sources":["../../../src/bubbles/tool-bubble/twitter-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAmB,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAG/D,6BAA6B;AAC7B,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,Q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