@memberjunction/actions-bizapps-social 2.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +4 -0
- package/CHANGELOG.md +16 -0
- package/README.md +375 -0
- package/dist/base/base-social.action.d.ts +137 -0
- package/dist/base/base-social.action.d.ts.map +1 -0
- package/dist/base/base-social.action.js +176 -0
- package/dist/base/base-social.action.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/buffer/actions/create-post.action.d.ts +20 -0
- package/dist/providers/buffer/actions/create-post.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/create-post.action.js +195 -0
- package/dist/providers/buffer/actions/create-post.action.js.map +1 -0
- package/dist/providers/buffer/actions/delete-post.action.d.ts +20 -0
- package/dist/providers/buffer/actions/delete-post.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/delete-post.action.js +119 -0
- package/dist/providers/buffer/actions/delete-post.action.js.map +1 -0
- package/dist/providers/buffer/actions/get-analytics.action.d.ts +28 -0
- package/dist/providers/buffer/actions/get-analytics.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/get-analytics.action.js +143 -0
- package/dist/providers/buffer/actions/get-analytics.action.js.map +1 -0
- package/dist/providers/buffer/actions/get-pending-posts.action.d.ts +24 -0
- package/dist/providers/buffer/actions/get-pending-posts.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/get-pending-posts.action.js +161 -0
- package/dist/providers/buffer/actions/get-pending-posts.action.js.map +1 -0
- package/dist/providers/buffer/actions/get-profiles.action.d.ts +24 -0
- package/dist/providers/buffer/actions/get-profiles.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/get-profiles.action.js +128 -0
- package/dist/providers/buffer/actions/get-profiles.action.js.map +1 -0
- package/dist/providers/buffer/actions/get-sent-posts.action.d.ts +32 -0
- package/dist/providers/buffer/actions/get-sent-posts.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/get-sent-posts.action.js +187 -0
- package/dist/providers/buffer/actions/get-sent-posts.action.js.map +1 -0
- package/dist/providers/buffer/actions/index.d.ts +9 -0
- package/dist/providers/buffer/actions/index.d.ts.map +1 -0
- package/dist/providers/buffer/actions/index.js +25 -0
- package/dist/providers/buffer/actions/index.js.map +1 -0
- package/dist/providers/buffer/actions/reorder-queue.action.d.ts +20 -0
- package/dist/providers/buffer/actions/reorder-queue.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/reorder-queue.action.js +138 -0
- package/dist/providers/buffer/actions/reorder-queue.action.js.map +1 -0
- package/dist/providers/buffer/actions/search-posts.action.d.ts +28 -0
- package/dist/providers/buffer/actions/search-posts.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/search-posts.action.js +249 -0
- package/dist/providers/buffer/actions/search-posts.action.js.map +1 -0
- package/dist/providers/buffer/buffer-base.action.d.ts +95 -0
- package/dist/providers/buffer/buffer-base.action.d.ts.map +1 -0
- package/dist/providers/buffer/buffer-base.action.js +419 -0
- package/dist/providers/buffer/buffer-base.action.js.map +1 -0
- package/dist/providers/buffer/index.d.ts +3 -0
- package/dist/providers/buffer/index.d.ts.map +1 -0
- package/dist/providers/buffer/index.js +19 -0
- package/dist/providers/buffer/index.js.map +1 -0
- package/dist/providers/facebook/actions/boost-post.action.d.ts +45 -0
- package/dist/providers/facebook/actions/boost-post.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/boost-post.action.js +340 -0
- package/dist/providers/facebook/actions/boost-post.action.js.map +1 -0
- package/dist/providers/facebook/actions/create-album.action.d.ts +33 -0
- package/dist/providers/facebook/actions/create-album.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/create-album.action.js +285 -0
- package/dist/providers/facebook/actions/create-album.action.js.map +1 -0
- package/dist/providers/facebook/actions/create-post.action.d.ts +21 -0
- package/dist/providers/facebook/actions/create-post.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/create-post.action.js +223 -0
- package/dist/providers/facebook/actions/create-post.action.js.map +1 -0
- package/dist/providers/facebook/actions/get-page-insights.action.d.ts +37 -0
- package/dist/providers/facebook/actions/get-page-insights.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/get-page-insights.action.js +359 -0
- package/dist/providers/facebook/actions/get-page-insights.action.js.map +1 -0
- package/dist/providers/facebook/actions/get-page-posts.action.d.ts +29 -0
- package/dist/providers/facebook/actions/get-page-posts.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/get-page-posts.action.js +216 -0
- package/dist/providers/facebook/actions/get-page-posts.action.js.map +1 -0
- package/dist/providers/facebook/actions/get-post-insights.action.d.ts +33 -0
- package/dist/providers/facebook/actions/get-post-insights.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/get-post-insights.action.js +287 -0
- package/dist/providers/facebook/actions/get-post-insights.action.js.map +1 -0
- package/dist/providers/facebook/actions/index.d.ts +10 -0
- package/dist/providers/facebook/actions/index.d.ts.map +1 -0
- package/dist/providers/facebook/actions/index.js +26 -0
- package/dist/providers/facebook/actions/index.js.map +1 -0
- package/dist/providers/facebook/actions/respond-to-comments.action.d.ts +41 -0
- package/dist/providers/facebook/actions/respond-to-comments.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/respond-to-comments.action.js +328 -0
- package/dist/providers/facebook/actions/respond-to-comments.action.js.map +1 -0
- package/dist/providers/facebook/actions/schedule-post.action.d.ts +29 -0
- package/dist/providers/facebook/actions/schedule-post.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/schedule-post.action.js +289 -0
- package/dist/providers/facebook/actions/schedule-post.action.js.map +1 -0
- package/dist/providers/facebook/actions/search-posts.action.d.ts +54 -0
- package/dist/providers/facebook/actions/search-posts.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/search-posts.action.js +396 -0
- package/dist/providers/facebook/actions/search-posts.action.js.map +1 -0
- package/dist/providers/facebook/facebook-base.action.d.ts +230 -0
- package/dist/providers/facebook/facebook-base.action.d.ts.map +1 -0
- package/dist/providers/facebook/facebook-base.action.js +566 -0
- package/dist/providers/facebook/facebook-base.action.js.map +1 -0
- package/dist/providers/facebook/index.d.ts +3 -0
- package/dist/providers/facebook/index.d.ts.map +1 -0
- package/dist/providers/facebook/index.js +19 -0
- package/dist/providers/facebook/index.js.map +1 -0
- package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.d.ts +24 -0
- package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.js +266 -0
- package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/create-scheduled-post.action.d.ts +25 -0
- package/dist/providers/hootsuite/actions/create-scheduled-post.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/create-scheduled-post.action.js +202 -0
- package/dist/providers/hootsuite/actions/create-scheduled-post.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/delete-scheduled-post.action.d.ts +20 -0
- package/dist/providers/hootsuite/actions/delete-scheduled-post.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/delete-scheduled-post.action.js +172 -0
- package/dist/providers/hootsuite/actions/delete-scheduled-post.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/get-analytics.action.d.ts +52 -0
- package/dist/providers/hootsuite/actions/get-analytics.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/get-analytics.action.js +265 -0
- package/dist/providers/hootsuite/actions/get-analytics.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/get-scheduled-posts.action.d.ts +37 -0
- package/dist/providers/hootsuite/actions/get-scheduled-posts.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/get-scheduled-posts.action.js +208 -0
- package/dist/providers/hootsuite/actions/get-scheduled-posts.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/get-social-profiles.action.d.ts +36 -0
- package/dist/providers/hootsuite/actions/get-social-profiles.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/get-social-profiles.action.js +212 -0
- package/dist/providers/hootsuite/actions/get-social-profiles.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/search-posts.action.d.ts +53 -0
- package/dist/providers/hootsuite/actions/search-posts.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/search-posts.action.js +353 -0
- package/dist/providers/hootsuite/actions/search-posts.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/update-scheduled-post.action.d.ts +20 -0
- package/dist/providers/hootsuite/actions/update-scheduled-post.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/update-scheduled-post.action.js +217 -0
- package/dist/providers/hootsuite/actions/update-scheduled-post.action.js.map +1 -0
- package/dist/providers/hootsuite/hootsuite-base.action.d.ts +101 -0
- package/dist/providers/hootsuite/hootsuite-base.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/hootsuite-base.action.js +274 -0
- package/dist/providers/hootsuite/hootsuite-base.action.js.map +1 -0
- package/dist/providers/hootsuite/index.d.ts +10 -0
- package/dist/providers/hootsuite/index.d.ts.map +1 -0
- package/dist/providers/hootsuite/index.js +28 -0
- package/dist/providers/hootsuite/index.js.map +1 -0
- package/dist/providers/instagram/actions/create-post.action.d.ts +30 -0
- package/dist/providers/instagram/actions/create-post.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/create-post.action.js +269 -0
- package/dist/providers/instagram/actions/create-post.action.js.map +1 -0
- package/dist/providers/instagram/actions/create-story.action.d.ts +43 -0
- package/dist/providers/instagram/actions/create-story.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/create-story.action.js +365 -0
- package/dist/providers/instagram/actions/create-story.action.js.map +1 -0
- package/dist/providers/instagram/actions/get-account-insights.action.d.ts +50 -0
- package/dist/providers/instagram/actions/get-account-insights.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/get-account-insights.action.js +390 -0
- package/dist/providers/instagram/actions/get-account-insights.action.js.map +1 -0
- package/dist/providers/instagram/actions/get-business-posts.action.d.ts +30 -0
- package/dist/providers/instagram/actions/get-business-posts.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/get-business-posts.action.js +246 -0
- package/dist/providers/instagram/actions/get-business-posts.action.js.map +1 -0
- package/dist/providers/instagram/actions/get-comments.action.d.ts +41 -0
- package/dist/providers/instagram/actions/get-comments.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/get-comments.action.js +337 -0
- package/dist/providers/instagram/actions/get-comments.action.js.map +1 -0
- package/dist/providers/instagram/actions/get-post-insights.action.d.ts +42 -0
- package/dist/providers/instagram/actions/get-post-insights.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/get-post-insights.action.js +271 -0
- package/dist/providers/instagram/actions/get-post-insights.action.js.map +1 -0
- package/dist/providers/instagram/actions/index.d.ts +9 -0
- package/dist/providers/instagram/actions/index.d.ts.map +1 -0
- package/dist/providers/instagram/actions/index.js +26 -0
- package/dist/providers/instagram/actions/index.js.map +1 -0
- package/dist/providers/instagram/actions/schedule-post.action.d.ts +34 -0
- package/dist/providers/instagram/actions/schedule-post.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/schedule-post.action.js +234 -0
- package/dist/providers/instagram/actions/schedule-post.action.js.map +1 -0
- package/dist/providers/instagram/actions/search-posts.action.d.ts +56 -0
- package/dist/providers/instagram/actions/search-posts.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/search-posts.action.js +479 -0
- package/dist/providers/instagram/actions/search-posts.action.js.map +1 -0
- package/dist/providers/instagram/index.d.ts +3 -0
- package/dist/providers/instagram/index.d.ts.map +1 -0
- package/dist/providers/instagram/index.js +20 -0
- package/dist/providers/instagram/index.js.map +1 -0
- package/dist/providers/instagram/instagram-base.action.d.ts +76 -0
- package/dist/providers/instagram/instagram-base.action.d.ts.map +1 -0
- package/dist/providers/instagram/instagram-base.action.js +362 -0
- package/dist/providers/instagram/instagram-base.action.js.map +1 -0
- package/dist/providers/linkedin/actions/create-article.action.d.ts +28 -0
- package/dist/providers/linkedin/actions/create-article.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/create-article.action.js +275 -0
- package/dist/providers/linkedin/actions/create-article.action.js.map +1 -0
- package/dist/providers/linkedin/actions/create-post.action.d.ts +20 -0
- package/dist/providers/linkedin/actions/create-post.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/create-post.action.js +188 -0
- package/dist/providers/linkedin/actions/create-post.action.js.map +1 -0
- package/dist/providers/linkedin/actions/get-followers.action.d.ts +29 -0
- package/dist/providers/linkedin/actions/get-followers.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/get-followers.action.js +222 -0
- package/dist/providers/linkedin/actions/get-followers.action.js.map +1 -0
- package/dist/providers/linkedin/actions/get-organization-posts.action.d.ts +24 -0
- package/dist/providers/linkedin/actions/get-organization-posts.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/get-organization-posts.action.js +163 -0
- package/dist/providers/linkedin/actions/get-organization-posts.action.js.map +1 -0
- package/dist/providers/linkedin/actions/get-personal-posts.action.d.ts +25 -0
- package/dist/providers/linkedin/actions/get-personal-posts.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/get-personal-posts.action.js +156 -0
- package/dist/providers/linkedin/actions/get-personal-posts.action.js.map +1 -0
- package/dist/providers/linkedin/actions/get-post-analytics.action.d.ts +28 -0
- package/dist/providers/linkedin/actions/get-post-analytics.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/get-post-analytics.action.js +200 -0
- package/dist/providers/linkedin/actions/get-post-analytics.action.js.map +1 -0
- package/dist/providers/linkedin/actions/index.d.ts +9 -0
- package/dist/providers/linkedin/actions/index.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/index.js +25 -0
- package/dist/providers/linkedin/actions/index.js.map +1 -0
- package/dist/providers/linkedin/actions/schedule-post.action.d.ts +22 -0
- package/dist/providers/linkedin/actions/schedule-post.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/schedule-post.action.js +205 -0
- package/dist/providers/linkedin/actions/schedule-post.action.js.map +1 -0
- package/dist/providers/linkedin/actions/search-posts.action.d.ts +41 -0
- package/dist/providers/linkedin/actions/search-posts.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/search-posts.action.js +292 -0
- package/dist/providers/linkedin/actions/search-posts.action.js.map +1 -0
- package/dist/providers/linkedin/index.d.ts +3 -0
- package/dist/providers/linkedin/index.d.ts.map +1 -0
- package/dist/providers/linkedin/index.js +19 -0
- package/dist/providers/linkedin/index.js.map +1 -0
- package/dist/providers/linkedin/linkedin-base.action.d.ts +166 -0
- package/dist/providers/linkedin/linkedin-base.action.d.ts.map +1 -0
- package/dist/providers/linkedin/linkedin-base.action.js +346 -0
- package/dist/providers/linkedin/linkedin-base.action.js.map +1 -0
- package/dist/providers/tiktok/actions/create-video-post.action.d.ts +21 -0
- package/dist/providers/tiktok/actions/create-video-post.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/create-video-post.action.js +226 -0
- package/dist/providers/tiktok/actions/create-video-post.action.js.map +1 -0
- package/dist/providers/tiktok/actions/get-account-analytics.action.d.ts +32 -0
- package/dist/providers/tiktok/actions/get-account-analytics.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/get-account-analytics.action.js +242 -0
- package/dist/providers/tiktok/actions/get-account-analytics.action.js.map +1 -0
- package/dist/providers/tiktok/actions/get-comments.action.d.ts +44 -0
- package/dist/providers/tiktok/actions/get-comments.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/get-comments.action.js +290 -0
- package/dist/providers/tiktok/actions/get-comments.action.js.map +1 -0
- package/dist/providers/tiktok/actions/get-trending-hashtags.action.d.ts +48 -0
- package/dist/providers/tiktok/actions/get-trending-hashtags.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/get-trending-hashtags.action.js +309 -0
- package/dist/providers/tiktok/actions/get-trending-hashtags.action.js.map +1 -0
- package/dist/providers/tiktok/actions/get-user-videos.action.d.ts +20 -0
- package/dist/providers/tiktok/actions/get-user-videos.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/get-user-videos.action.js +131 -0
- package/dist/providers/tiktok/actions/get-user-videos.action.js.map +1 -0
- package/dist/providers/tiktok/actions/get-video-analytics.action.d.ts +28 -0
- package/dist/providers/tiktok/actions/get-video-analytics.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/get-video-analytics.action.js +198 -0
- package/dist/providers/tiktok/actions/get-video-analytics.action.js.map +1 -0
- package/dist/providers/tiktok/actions/index.d.ts +8 -0
- package/dist/providers/tiktok/actions/index.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/index.js +25 -0
- package/dist/providers/tiktok/actions/index.js.map +1 -0
- package/dist/providers/tiktok/actions/search-videos.action.d.ts +89 -0
- package/dist/providers/tiktok/actions/search-videos.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/search-videos.action.js +653 -0
- package/dist/providers/tiktok/actions/search-videos.action.js.map +1 -0
- package/dist/providers/tiktok/index.d.ts +3 -0
- package/dist/providers/tiktok/index.d.ts.map +1 -0
- package/dist/providers/tiktok/index.js +20 -0
- package/dist/providers/tiktok/index.js.map +1 -0
- package/dist/providers/tiktok/tiktok-base.action.d.ts +87 -0
- package/dist/providers/tiktok/tiktok-base.action.d.ts.map +1 -0
- package/dist/providers/tiktok/tiktok-base.action.js +294 -0
- package/dist/providers/tiktok/tiktok-base.action.js.map +1 -0
- package/dist/providers/twitter/actions/create-thread.action.d.ts +28 -0
- package/dist/providers/twitter/actions/create-thread.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/create-thread.action.js +217 -0
- package/dist/providers/twitter/actions/create-thread.action.js.map +1 -0
- package/dist/providers/twitter/actions/create-tweet.action.d.ts +24 -0
- package/dist/providers/twitter/actions/create-tweet.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/create-tweet.action.js +199 -0
- package/dist/providers/twitter/actions/create-tweet.action.js.map +1 -0
- package/dist/providers/twitter/actions/delete-tweet.action.d.ts +24 -0
- package/dist/providers/twitter/actions/delete-tweet.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/delete-tweet.action.js +158 -0
- package/dist/providers/twitter/actions/delete-tweet.action.js.map +1 -0
- package/dist/providers/twitter/actions/get-analytics.action.d.ts +44 -0
- package/dist/providers/twitter/actions/get-analytics.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/get-analytics.action.js +399 -0
- package/dist/providers/twitter/actions/get-analytics.action.js.map +1 -0
- package/dist/providers/twitter/actions/get-mentions.action.d.ts +24 -0
- package/dist/providers/twitter/actions/get-mentions.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/get-mentions.action.js +229 -0
- package/dist/providers/twitter/actions/get-mentions.action.js.map +1 -0
- package/dist/providers/twitter/actions/get-timeline.action.d.ts +24 -0
- package/dist/providers/twitter/actions/get-timeline.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/get-timeline.action.js +249 -0
- package/dist/providers/twitter/actions/get-timeline.action.js.map +1 -0
- package/dist/providers/twitter/actions/index.d.ts +14 -0
- package/dist/providers/twitter/actions/index.d.ts.map +1 -0
- package/dist/providers/twitter/actions/index.js +30 -0
- package/dist/providers/twitter/actions/index.js.map +1 -0
- package/dist/providers/twitter/actions/schedule-tweet.action.d.ts +30 -0
- package/dist/providers/twitter/actions/schedule-tweet.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/schedule-tweet.action.js +250 -0
- package/dist/providers/twitter/actions/schedule-tweet.action.js.map +1 -0
- package/dist/providers/twitter/actions/search-tweets.action.d.ts +41 -0
- package/dist/providers/twitter/actions/search-tweets.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/search-tweets.action.js +559 -0
- package/dist/providers/twitter/actions/search-tweets.action.js.map +1 -0
- package/dist/providers/twitter/index.d.ts +8 -0
- package/dist/providers/twitter/index.d.ts.map +1 -0
- package/dist/providers/twitter/index.js +24 -0
- package/dist/providers/twitter/index.js.map +1 -0
- package/dist/providers/twitter/twitter-base.action.d.ts +185 -0
- package/dist/providers/twitter/twitter-base.action.d.ts.map +1 -0
- package/dist/providers/twitter/twitter-base.action.js +484 -0
- package/dist/providers/twitter/twitter-base.action.js.map +1 -0
- package/dist/providers/youtube/actions/create-playlist.action.d.ts +28 -0
- package/dist/providers/youtube/actions/create-playlist.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/create-playlist.action.js +235 -0
- package/dist/providers/youtube/actions/create-playlist.action.js.map +1 -0
- package/dist/providers/youtube/actions/get-channel-analytics.action.d.ts +60 -0
- package/dist/providers/youtube/actions/get-channel-analytics.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/get-channel-analytics.action.js +429 -0
- package/dist/providers/youtube/actions/get-channel-analytics.action.js.map +1 -0
- package/dist/providers/youtube/actions/get-channel-videos.action.d.ts +28 -0
- package/dist/providers/youtube/actions/get-channel-videos.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/get-channel-videos.action.js +263 -0
- package/dist/providers/youtube/actions/get-channel-videos.action.js.map +1 -0
- package/dist/providers/youtube/actions/get-comments.action.d.ts +40 -0
- package/dist/providers/youtube/actions/get-comments.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/get-comments.action.js +381 -0
- package/dist/providers/youtube/actions/get-comments.action.js.map +1 -0
- package/dist/providers/youtube/actions/get-video-analytics.action.d.ts +48 -0
- package/dist/providers/youtube/actions/get-video-analytics.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/get-video-analytics.action.js +280 -0
- package/dist/providers/youtube/actions/get-video-analytics.action.js.map +1 -0
- package/dist/providers/youtube/actions/index.d.ts +10 -0
- package/dist/providers/youtube/actions/index.d.ts.map +1 -0
- package/dist/providers/youtube/actions/index.js +26 -0
- package/dist/providers/youtube/actions/index.js.map +1 -0
- package/dist/providers/youtube/actions/schedule-video.action.d.ts +24 -0
- package/dist/providers/youtube/actions/schedule-video.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/schedule-video.action.js +225 -0
- package/dist/providers/youtube/actions/schedule-video.action.js.map +1 -0
- package/dist/providers/youtube/actions/search-videos.action.d.ts +40 -0
- package/dist/providers/youtube/actions/search-videos.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/search-videos.action.js +483 -0
- package/dist/providers/youtube/actions/search-videos.action.js.map +1 -0
- package/dist/providers/youtube/actions/update-video-metadata.action.d.ts +32 -0
- package/dist/providers/youtube/actions/update-video-metadata.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/update-video-metadata.action.js +298 -0
- package/dist/providers/youtube/actions/update-video-metadata.action.js.map +1 -0
- package/dist/providers/youtube/actions/upload-video.action.d.ts +28 -0
- package/dist/providers/youtube/actions/upload-video.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/upload-video.action.js +266 -0
- package/dist/providers/youtube/actions/upload-video.action.js.map +1 -0
- package/dist/providers/youtube/index.d.ts +3 -0
- package/dist/providers/youtube/index.d.ts.map +1 -0
- package/dist/providers/youtube/index.js +19 -0
- package/dist/providers/youtube/index.js.map +1 -0
- package/dist/providers/youtube/youtube-base.action.d.ts +83 -0
- package/dist/providers/youtube/youtube-base.action.d.ts.map +1 -0
- package/dist/providers/youtube/youtube-base.action.js +319 -0
- package/dist/providers/youtube/youtube-base.action.js.map +1 -0
- package/package.json +42 -0
- package/social_actions_summary.md +439 -0
- package/src/base/base-social.action.ts +270 -0
- package/src/index.ts +26 -0
- package/src/providers/buffer/actions/create-post.action.ts +205 -0
- package/src/providers/buffer/actions/delete-post.action.ts +116 -0
- package/src/providers/buffer/actions/get-analytics.action.ts +146 -0
- package/src/providers/buffer/actions/get-pending-posts.action.ts +161 -0
- package/src/providers/buffer/actions/get-profiles.action.ts +126 -0
- package/src/providers/buffer/actions/get-sent-posts.action.ts +189 -0
- package/src/providers/buffer/actions/index.ts +8 -0
- package/src/providers/buffer/actions/reorder-queue.action.ts +141 -0
- package/src/providers/buffer/actions/search-posts.action.ts +262 -0
- package/src/providers/buffer/buffer-base.action.ts +490 -0
- package/src/providers/buffer/index.ts +2 -0
- package/src/providers/facebook/actions/boost-post.action.ts +412 -0
- package/src/providers/facebook/actions/create-album.action.ts +335 -0
- package/src/providers/facebook/actions/create-post.action.ts +243 -0
- package/src/providers/facebook/actions/get-page-insights.action.ts +427 -0
- package/src/providers/facebook/actions/get-page-posts.action.ts +241 -0
- package/src/providers/facebook/actions/get-post-insights.action.ts +338 -0
- package/src/providers/facebook/actions/index.ts +9 -0
- package/src/providers/facebook/actions/respond-to-comments.action.ts +372 -0
- package/src/providers/facebook/actions/schedule-post.action.ts +310 -0
- package/src/providers/facebook/actions/search-posts.action.ts +449 -0
- package/src/providers/facebook/facebook-base.action.ts +750 -0
- package/src/providers/facebook/index.ts +2 -0
- package/src/providers/hootsuite/actions/bulk-schedule-posts.action.ts +293 -0
- package/src/providers/hootsuite/actions/create-scheduled-post.action.ts +206 -0
- package/src/providers/hootsuite/actions/delete-scheduled-post.action.ts +173 -0
- package/src/providers/hootsuite/actions/get-analytics.action.ts +281 -0
- package/src/providers/hootsuite/actions/get-scheduled-posts.action.ts +220 -0
- package/src/providers/hootsuite/actions/get-social-profiles.action.ts +220 -0
- package/src/providers/hootsuite/actions/search-posts.action.ts +395 -0
- package/src/providers/hootsuite/actions/update-scheduled-post.action.ts +222 -0
- package/src/providers/hootsuite/hootsuite-base.action.ts +346 -0
- package/src/providers/hootsuite/index.ts +12 -0
- package/src/providers/instagram/README.md +129 -0
- package/src/providers/instagram/actions/create-post.action.ts +329 -0
- package/src/providers/instagram/actions/create-story.action.ts +415 -0
- package/src/providers/instagram/actions/get-account-insights.action.ts +449 -0
- package/src/providers/instagram/actions/get-business-posts.action.ts +281 -0
- package/src/providers/instagram/actions/get-comments.action.ts +395 -0
- package/src/providers/instagram/actions/get-post-insights.action.ts +302 -0
- package/src/providers/instagram/actions/index.ts +9 -0
- package/src/providers/instagram/actions/schedule-post.action.ts +248 -0
- package/src/providers/instagram/actions/search-posts.action.ts +569 -0
- package/src/providers/instagram/index.ts +3 -0
- package/src/providers/instagram/instagram-base.action.ts +430 -0
- package/src/providers/linkedin/actions/create-article.action.ts +301 -0
- package/src/providers/linkedin/actions/create-post.action.ts +190 -0
- package/src/providers/linkedin/actions/get-followers.action.ts +226 -0
- package/src/providers/linkedin/actions/get-organization-posts.action.ts +164 -0
- package/src/providers/linkedin/actions/get-personal-posts.action.ts +158 -0
- package/src/providers/linkedin/actions/get-post-analytics.action.ts +205 -0
- package/src/providers/linkedin/actions/index.ts +8 -0
- package/src/providers/linkedin/actions/schedule-post.action.ts +206 -0
- package/src/providers/linkedin/actions/search-posts.action.ts +323 -0
- package/src/providers/linkedin/index.ts +2 -0
- package/src/providers/linkedin/linkedin-base.action.ts +481 -0
- package/src/providers/tiktok/actions/create-video-post.action.ts +234 -0
- package/src/providers/tiktok/actions/get-account-analytics.action.ts +255 -0
- package/src/providers/tiktok/actions/get-comments.action.ts +332 -0
- package/src/providers/tiktok/actions/get-trending-hashtags.action.ts +341 -0
- package/src/providers/tiktok/actions/get-user-videos.action.ts +136 -0
- package/src/providers/tiktok/actions/get-video-analytics.action.ts +218 -0
- package/src/providers/tiktok/actions/index.ts +8 -0
- package/src/providers/tiktok/actions/search-videos.action.ts +717 -0
- package/src/providers/tiktok/index.ts +3 -0
- package/src/providers/tiktok/tiktok-base.action.ts +356 -0
- package/src/providers/twitter/README.md +207 -0
- package/src/providers/twitter/actions/create-thread.action.ts +227 -0
- package/src/providers/twitter/actions/create-tweet.action.ts +204 -0
- package/src/providers/twitter/actions/delete-tweet.action.ts +153 -0
- package/src/providers/twitter/actions/get-analytics.action.ts +440 -0
- package/src/providers/twitter/actions/get-mentions.action.ts +233 -0
- package/src/providers/twitter/actions/get-timeline.action.ts +248 -0
- package/src/providers/twitter/actions/index.ts +14 -0
- package/src/providers/twitter/actions/schedule-tweet.action.ts +259 -0
- package/src/providers/twitter/actions/search-tweets.action.ts +588 -0
- package/src/providers/twitter/index.ts +8 -0
- package/src/providers/twitter/twitter-base.action.ts +629 -0
- package/src/providers/youtube/actions/create-playlist.action.ts +256 -0
- package/src/providers/youtube/actions/get-channel-analytics.action.ts +502 -0
- package/src/providers/youtube/actions/get-channel-videos.action.ts +286 -0
- package/src/providers/youtube/actions/get-comments.action.ts +411 -0
- package/src/providers/youtube/actions/get-video-analytics.action.ts +298 -0
- package/src/providers/youtube/actions/index.ts +9 -0
- package/src/providers/youtube/actions/schedule-video.action.ts +246 -0
- package/src/providers/youtube/actions/search-videos.action.ts +530 -0
- package/src/providers/youtube/actions/update-video-metadata.action.ts +321 -0
- package/src/providers/youtube/actions/upload-video.action.ts +288 -0
- package/src/providers/youtube/index.ts +2 -0
- package/src/providers/youtube/youtube-base.action.ts +373 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { TwitterBaseAction, Tweet, TwitterSearchParams } from '../twitter-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { LogStatus, LogError } from '@memberjunction/core';
|
|
5
|
+
import { SocialPost, SearchParams } from '../../../base/base-social.action';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Action to search for tweets on Twitter/X with advanced operators and historical data
|
|
9
|
+
*/
|
|
10
|
+
@RegisterClass(TwitterBaseAction, 'TwitterSearchTweetsAction')
|
|
11
|
+
export class TwitterSearchTweetsAction extends TwitterBaseAction {
|
|
12
|
+
/**
|
|
13
|
+
* Search for tweets on Twitter
|
|
14
|
+
*/
|
|
15
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
16
|
+
const { Params, ContextUser } = params;
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
// Initialize OAuth
|
|
20
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
21
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
22
|
+
throw new Error('Failed to initialize OAuth connection');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Extract parameters
|
|
26
|
+
const query = this.getParamValue(Params, 'Query');
|
|
27
|
+
const hashtags = this.getParamValue(Params, 'Hashtags');
|
|
28
|
+
const fromUser = this.getParamValue(Params, 'FromUser');
|
|
29
|
+
const toUser = this.getParamValue(Params, 'ToUser');
|
|
30
|
+
const mentionUser = this.getParamValue(Params, 'MentionUser');
|
|
31
|
+
const startDate = this.getParamValue(Params, 'StartDate');
|
|
32
|
+
const endDate = this.getParamValue(Params, 'EndDate');
|
|
33
|
+
const language = this.getParamValue(Params, 'Language');
|
|
34
|
+
const hasMedia = this.getParamValue(Params, 'HasMedia');
|
|
35
|
+
const hasLinks = this.getParamValue(Params, 'HasLinks');
|
|
36
|
+
const isRetweet = this.getParamValue(Params, 'IsRetweet');
|
|
37
|
+
const isReply = this.getParamValue(Params, 'IsReply');
|
|
38
|
+
const isQuote = this.getParamValue(Params, 'IsQuote');
|
|
39
|
+
const isVerified = this.getParamValue(Params, 'IsVerified');
|
|
40
|
+
const minLikes = this.getParamValue(Params, 'MinLikes');
|
|
41
|
+
const minRetweets = this.getParamValue(Params, 'MinRetweets');
|
|
42
|
+
const minReplies = this.getParamValue(Params, 'MinReplies');
|
|
43
|
+
const place = this.getParamValue(Params, 'Place');
|
|
44
|
+
const maxResults = this.getParamValue(Params, 'MaxResults') || 100;
|
|
45
|
+
const sortOrder = this.getParamValue(Params, 'SortOrder') || 'recency';
|
|
46
|
+
|
|
47
|
+
// Build search query with advanced operators
|
|
48
|
+
const searchQuery = this.buildAdvancedSearchQuery({
|
|
49
|
+
query,
|
|
50
|
+
hashtags,
|
|
51
|
+
fromUser,
|
|
52
|
+
toUser,
|
|
53
|
+
mentionUser,
|
|
54
|
+
language,
|
|
55
|
+
hasMedia,
|
|
56
|
+
hasLinks,
|
|
57
|
+
isRetweet,
|
|
58
|
+
isReply,
|
|
59
|
+
isQuote,
|
|
60
|
+
isVerified,
|
|
61
|
+
minLikes,
|
|
62
|
+
minRetweets,
|
|
63
|
+
minReplies,
|
|
64
|
+
place
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// Validate query
|
|
68
|
+
if (!searchQuery.trim()) {
|
|
69
|
+
throw new Error('At least one search parameter must be provided');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Twitter search query length limit
|
|
73
|
+
if (searchQuery.length > 512) {
|
|
74
|
+
throw new Error(`Search query exceeds Twitter's 512 character limit (current: ${searchQuery.length} characters)`);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Build search parameters
|
|
78
|
+
const searchParams: TwitterSearchParams = {
|
|
79
|
+
query: searchQuery,
|
|
80
|
+
max_results: Math.min(maxResults, 100), // API limit per request
|
|
81
|
+
sort_order: sortOrder as 'recency' | 'relevancy'
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// Add date filters
|
|
85
|
+
if (startDate) {
|
|
86
|
+
searchParams.start_time = this.formatTwitterDate(startDate);
|
|
87
|
+
}
|
|
88
|
+
if (endDate) {
|
|
89
|
+
searchParams.end_time = this.formatTwitterDate(endDate);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Perform search
|
|
93
|
+
LogStatus(`Searching tweets with query: ${searchQuery.substring(0, 100)}${searchQuery.length > 100 ? '...' : ''}`);
|
|
94
|
+
const tweets = await this.searchTweetsInternal(searchParams, maxResults);
|
|
95
|
+
|
|
96
|
+
// Convert to normalized format
|
|
97
|
+
const normalizedPosts: SocialPost[] = tweets.map(tweet => this.normalizePost(tweet));
|
|
98
|
+
|
|
99
|
+
// Analyze search results
|
|
100
|
+
const analysis = this.analyzeSearchResults(tweets, normalizedPosts);
|
|
101
|
+
|
|
102
|
+
// Update output parameters
|
|
103
|
+
const outputParams = [...Params];
|
|
104
|
+
const postsParam = outputParams.find(p => p.Name === 'Posts');
|
|
105
|
+
if (postsParam) postsParam.Value = normalizedPosts;
|
|
106
|
+
const tweetsParam = outputParams.find(p => p.Name === 'Tweets');
|
|
107
|
+
if (tweetsParam) tweetsParam.Value = tweets;
|
|
108
|
+
const analysisParam = outputParams.find(p => p.Name === 'Analysis');
|
|
109
|
+
if (analysisParam) analysisParam.Value = analysis;
|
|
110
|
+
const actualQueryParam = outputParams.find(p => p.Name === 'ActualQuery');
|
|
111
|
+
if (actualQueryParam) actualQueryParam.Value = searchQuery;
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
Success: true,
|
|
115
|
+
ResultCode: 'SUCCESS',
|
|
116
|
+
Message: `Successfully found ${normalizedPosts.length} tweets matching search criteria`,
|
|
117
|
+
Params: outputParams
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
} catch (error) {
|
|
121
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
122
|
+
|
|
123
|
+
return {
|
|
124
|
+
Success: false,
|
|
125
|
+
ResultCode: this.getErrorCode(error),
|
|
126
|
+
Message: `Failed to search tweets: ${errorMessage}`,
|
|
127
|
+
Params
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Build advanced search query with Twitter operators
|
|
134
|
+
*/
|
|
135
|
+
private buildAdvancedSearchQuery(params: any): string {
|
|
136
|
+
const parts: string[] = [];
|
|
137
|
+
|
|
138
|
+
// Basic query
|
|
139
|
+
if (params.query) {
|
|
140
|
+
parts.push(params.query);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Hashtags
|
|
144
|
+
if (params.hashtags && Array.isArray(params.hashtags) && params.hashtags.length > 0) {
|
|
145
|
+
const hashtagQuery = params.hashtags
|
|
146
|
+
.map((tag: string) => tag.startsWith('#') ? tag : `#${tag}`)
|
|
147
|
+
.join(' OR ');
|
|
148
|
+
parts.push(`(${hashtagQuery})`);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// User filters
|
|
152
|
+
if (params.fromUser) {
|
|
153
|
+
parts.push(`from:${params.fromUser}`);
|
|
154
|
+
}
|
|
155
|
+
if (params.toUser) {
|
|
156
|
+
parts.push(`to:${params.toUser}`);
|
|
157
|
+
}
|
|
158
|
+
if (params.mentionUser) {
|
|
159
|
+
parts.push(`@${params.mentionUser}`);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Language filter
|
|
163
|
+
if (params.language) {
|
|
164
|
+
parts.push(`lang:${params.language}`);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Media and link filters
|
|
168
|
+
if (params.hasMedia === true) {
|
|
169
|
+
parts.push('has:media');
|
|
170
|
+
} else if (params.hasMedia === false) {
|
|
171
|
+
parts.push('-has:media');
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (params.hasLinks === true) {
|
|
175
|
+
parts.push('has:links');
|
|
176
|
+
} else if (params.hasLinks === false) {
|
|
177
|
+
parts.push('-has:links');
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Tweet type filters
|
|
181
|
+
if (params.isRetweet === true) {
|
|
182
|
+
parts.push('is:retweet');
|
|
183
|
+
} else if (params.isRetweet === false) {
|
|
184
|
+
parts.push('-is:retweet');
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (params.isReply === true) {
|
|
188
|
+
parts.push('is:reply');
|
|
189
|
+
} else if (params.isReply === false) {
|
|
190
|
+
parts.push('-is:reply');
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (params.isQuote === true) {
|
|
194
|
+
parts.push('is:quote');
|
|
195
|
+
} else if (params.isQuote === false) {
|
|
196
|
+
parts.push('-is:quote');
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Verified filter
|
|
200
|
+
if (params.isVerified === true) {
|
|
201
|
+
parts.push('is:verified');
|
|
202
|
+
} else if (params.isVerified === false) {
|
|
203
|
+
parts.push('-is:verified');
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Engagement filters (Note: These require Academic Research access)
|
|
207
|
+
if (params.minLikes && params.minLikes > 0) {
|
|
208
|
+
parts.push(`min_faves:${params.minLikes}`);
|
|
209
|
+
}
|
|
210
|
+
if (params.minRetweets && params.minRetweets > 0) {
|
|
211
|
+
parts.push(`min_retweets:${params.minRetweets}`);
|
|
212
|
+
}
|
|
213
|
+
if (params.minReplies && params.minReplies > 0) {
|
|
214
|
+
parts.push(`min_replies:${params.minReplies}`);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Place filter
|
|
218
|
+
if (params.place) {
|
|
219
|
+
parts.push(`place:"${params.place}"`);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return parts.join(' ');
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Internal method to search tweets with pagination
|
|
227
|
+
*/
|
|
228
|
+
private async searchTweetsInternal(searchParams: TwitterSearchParams, maxResults: number): Promise<Tweet[]> {
|
|
229
|
+
const tweets: Tweet[] = [];
|
|
230
|
+
let nextToken: string | undefined;
|
|
231
|
+
|
|
232
|
+
const queryParams: Record<string, any> = {
|
|
233
|
+
'query': searchParams.query,
|
|
234
|
+
'tweet.fields': 'id,text,created_at,author_id,conversation_id,public_metrics,attachments,entities,referenced_tweets,lang,possibly_sensitive',
|
|
235
|
+
'user.fields': 'id,name,username,profile_image_url,description,created_at,verified',
|
|
236
|
+
'media.fields': 'url,preview_image_url,type,width,height',
|
|
237
|
+
'expansions': 'author_id,attachments.media_keys,referenced_tweets.id,referenced_tweets.id.author_id',
|
|
238
|
+
'max_results': searchParams.max_results,
|
|
239
|
+
'sort_order': searchParams.sort_order
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
// Add time filters
|
|
243
|
+
if (searchParams.start_time) {
|
|
244
|
+
queryParams['start_time'] = searchParams.start_time;
|
|
245
|
+
}
|
|
246
|
+
if (searchParams.end_time) {
|
|
247
|
+
queryParams['end_time'] = searchParams.end_time;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
while (tweets.length < maxResults) {
|
|
251
|
+
if (nextToken) {
|
|
252
|
+
queryParams['next_token'] = nextToken;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
try {
|
|
256
|
+
const response = await this.axiosInstance.get('/tweets/search/recent', {
|
|
257
|
+
params: queryParams
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
if (response.data.data && Array.isArray(response.data.data)) {
|
|
261
|
+
tweets.push(...response.data.data);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Check if we've reached the desired number of results
|
|
265
|
+
if (tweets.length >= maxResults) {
|
|
266
|
+
return tweets.slice(0, maxResults);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// Check for more pages
|
|
270
|
+
nextToken = response.data.meta?.next_token;
|
|
271
|
+
if (!nextToken) {
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
} catch (error) {
|
|
276
|
+
// If we get a 400 error, it might be due to unsupported operators
|
|
277
|
+
if ((error as any).response?.status === 400) {
|
|
278
|
+
const errorDetail = (error as any).response?.data?.detail || '';
|
|
279
|
+
if (errorDetail.includes('min_faves') || errorDetail.includes('min_retweets') || errorDetail.includes('min_replies')) {
|
|
280
|
+
LogStatus('Note: Engagement filters (min_likes, min_retweets, min_replies) require Academic Research access');
|
|
281
|
+
// Retry without engagement filters
|
|
282
|
+
const cleanedQuery = searchParams.query
|
|
283
|
+
.replace(/min_faves:\d+\s*/g, '')
|
|
284
|
+
.replace(/min_retweets:\d+\s*/g, '')
|
|
285
|
+
.replace(/min_replies:\d+\s*/g, '')
|
|
286
|
+
.trim();
|
|
287
|
+
|
|
288
|
+
if (cleanedQuery !== searchParams.query) {
|
|
289
|
+
queryParams['query'] = cleanedQuery;
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
throw error;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
return tweets;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Implement searchPosts for base class
|
|
303
|
+
*/
|
|
304
|
+
protected async searchPosts(params: SearchParams): Promise<SocialPost[]> {
|
|
305
|
+
const searchParams: TwitterSearchParams = {
|
|
306
|
+
query: this.buildSearchQuery(params),
|
|
307
|
+
max_results: params.limit || 100
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
if (params.startDate) {
|
|
311
|
+
searchParams.start_time = this.formatTwitterDate(params.startDate);
|
|
312
|
+
}
|
|
313
|
+
if (params.endDate) {
|
|
314
|
+
searchParams.end_time = this.formatTwitterDate(params.endDate);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
const tweets = await this.searchTweetsInternal(searchParams, params.limit || 100);
|
|
318
|
+
return tweets.map(tweet => this.normalizePost(tweet));
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Analyze search results
|
|
323
|
+
*/
|
|
324
|
+
private analyzeSearchResults(tweets: Tweet[], normalizedPosts: SocialPost[]): any {
|
|
325
|
+
const analysis = {
|
|
326
|
+
totalResults: tweets.length,
|
|
327
|
+
dateRange: {
|
|
328
|
+
earliest: null as string | null,
|
|
329
|
+
latest: null as string | null
|
|
330
|
+
},
|
|
331
|
+
languages: {} as Record<string, number>,
|
|
332
|
+
tweetTypes: {
|
|
333
|
+
original: 0,
|
|
334
|
+
replies: 0,
|
|
335
|
+
retweets: 0,
|
|
336
|
+
quotes: 0
|
|
337
|
+
},
|
|
338
|
+
topHashtags: [] as Array<{ tag: string; count: number }>,
|
|
339
|
+
topMentions: [] as Array<{ username: string; count: number }>,
|
|
340
|
+
engagementStats: {
|
|
341
|
+
totalLikes: 0,
|
|
342
|
+
totalRetweets: 0,
|
|
343
|
+
totalReplies: 0,
|
|
344
|
+
totalQuotes: 0,
|
|
345
|
+
averageEngagement: 0
|
|
346
|
+
},
|
|
347
|
+
topEngagedTweets: [] as any[]
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
// Track hashtags and mentions
|
|
351
|
+
const hashtagCounts = new Map<string, number>();
|
|
352
|
+
const mentionCounts = new Map<string, number>();
|
|
353
|
+
|
|
354
|
+
tweets.forEach((tweet, index) => {
|
|
355
|
+
// Date range
|
|
356
|
+
const createdAt = tweet.created_at;
|
|
357
|
+
if (!analysis.dateRange.earliest || createdAt < analysis.dateRange.earliest) {
|
|
358
|
+
analysis.dateRange.earliest = createdAt;
|
|
359
|
+
}
|
|
360
|
+
if (!analysis.dateRange.latest || createdAt > analysis.dateRange.latest) {
|
|
361
|
+
analysis.dateRange.latest = createdAt;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// Language
|
|
365
|
+
const lang = (tweet as any).lang || 'unknown';
|
|
366
|
+
analysis.languages[lang] = (analysis.languages[lang] || 0) + 1;
|
|
367
|
+
|
|
368
|
+
// Tweet types
|
|
369
|
+
if (tweet.referenced_tweets) {
|
|
370
|
+
const types = tweet.referenced_tweets.map(ref => ref.type);
|
|
371
|
+
if (types.includes('replied_to')) analysis.tweetTypes.replies++;
|
|
372
|
+
else if (types.includes('retweeted')) analysis.tweetTypes.retweets++;
|
|
373
|
+
else if (types.includes('quoted')) analysis.tweetTypes.quotes++;
|
|
374
|
+
} else {
|
|
375
|
+
analysis.tweetTypes.original++;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// Hashtags
|
|
379
|
+
if (tweet.entities?.hashtags) {
|
|
380
|
+
tweet.entities.hashtags.forEach(hashtag => {
|
|
381
|
+
const tag = hashtag.tag.toLowerCase();
|
|
382
|
+
hashtagCounts.set(tag, (hashtagCounts.get(tag) || 0) + 1);
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// Mentions
|
|
387
|
+
if (tweet.entities?.mentions) {
|
|
388
|
+
tweet.entities.mentions.forEach(mention => {
|
|
389
|
+
const username = mention.username.toLowerCase();
|
|
390
|
+
mentionCounts.set(username, (mentionCounts.get(username) || 0) + 1);
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// Engagement stats
|
|
395
|
+
if (tweet.public_metrics) {
|
|
396
|
+
analysis.engagementStats.totalLikes += tweet.public_metrics.like_count || 0;
|
|
397
|
+
analysis.engagementStats.totalRetweets += tweet.public_metrics.retweet_count || 0;
|
|
398
|
+
analysis.engagementStats.totalReplies += tweet.public_metrics.reply_count || 0;
|
|
399
|
+
analysis.engagementStats.totalQuotes += tweet.public_metrics.quote_count || 0;
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
// Calculate average engagement
|
|
404
|
+
if (tweets.length > 0) {
|
|
405
|
+
const totalEngagement =
|
|
406
|
+
analysis.engagementStats.totalLikes +
|
|
407
|
+
analysis.engagementStats.totalRetweets +
|
|
408
|
+
analysis.engagementStats.totalReplies +
|
|
409
|
+
analysis.engagementStats.totalQuotes;
|
|
410
|
+
analysis.engagementStats.averageEngagement = Math.round(totalEngagement / tweets.length);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// Top hashtags
|
|
414
|
+
analysis.topHashtags = Array.from(hashtagCounts.entries())
|
|
415
|
+
.sort((a, b) => b[1] - a[1])
|
|
416
|
+
.slice(0, 10)
|
|
417
|
+
.map(([tag, count]) => ({ tag, count }));
|
|
418
|
+
|
|
419
|
+
// Top mentions
|
|
420
|
+
analysis.topMentions = Array.from(mentionCounts.entries())
|
|
421
|
+
.sort((a, b) => b[1] - a[1])
|
|
422
|
+
.slice(0, 10)
|
|
423
|
+
.map(([username, count]) => ({ username, count }));
|
|
424
|
+
|
|
425
|
+
// Top engaged tweets
|
|
426
|
+
analysis.topEngagedTweets = normalizedPosts
|
|
427
|
+
.filter(post => post.analytics)
|
|
428
|
+
.sort((a, b) => (b.analytics?.engagements || 0) - (a.analytics?.engagements || 0))
|
|
429
|
+
.slice(0, 5)
|
|
430
|
+
.map(post => ({
|
|
431
|
+
id: post.id,
|
|
432
|
+
content: post.content.substring(0, 100) + (post.content.length > 100 ? '...' : ''),
|
|
433
|
+
engagement: post.analytics?.engagements,
|
|
434
|
+
metrics: post.analytics
|
|
435
|
+
}));
|
|
436
|
+
|
|
437
|
+
return analysis;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Get error code based on error type
|
|
442
|
+
*/
|
|
443
|
+
private getErrorCode(error: any): string {
|
|
444
|
+
if (error instanceof Error) {
|
|
445
|
+
if (error.message.includes('Rate Limit')) return 'RATE_LIMIT';
|
|
446
|
+
if (error.message.includes('Unauthorized')) return 'INVALID_TOKEN';
|
|
447
|
+
if (error.message.includes('character limit')) return 'QUERY_TOO_LONG';
|
|
448
|
+
if (error.message.includes('Academic Research')) return 'INSUFFICIENT_ACCESS';
|
|
449
|
+
}
|
|
450
|
+
return 'ERROR';
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Define the parameters this action expects
|
|
455
|
+
*/
|
|
456
|
+
public get Params(): ActionParam[] {
|
|
457
|
+
return [
|
|
458
|
+
...this.commonSocialParams,
|
|
459
|
+
{
|
|
460
|
+
Name: 'Query',
|
|
461
|
+
Type: 'Input',
|
|
462
|
+
Value: null
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
Name: 'Hashtags',
|
|
466
|
+
Type: 'Input',
|
|
467
|
+
Value: null
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
Name: 'FromUser',
|
|
471
|
+
Type: 'Input',
|
|
472
|
+
Value: null
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
Name: 'ToUser',
|
|
476
|
+
Type: 'Input',
|
|
477
|
+
Value: null
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
Name: 'MentionUser',
|
|
481
|
+
Type: 'Input',
|
|
482
|
+
Value: null
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
Name: 'StartDate',
|
|
486
|
+
Type: 'Input',
|
|
487
|
+
Value: null
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
Name: 'EndDate',
|
|
491
|
+
Type: 'Input',
|
|
492
|
+
Value: null
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
Name: 'Language',
|
|
496
|
+
Type: 'Input',
|
|
497
|
+
Value: null
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
Name: 'HasMedia',
|
|
501
|
+
Type: 'Input',
|
|
502
|
+
Value: null
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
Name: 'HasLinks',
|
|
506
|
+
Type: 'Input',
|
|
507
|
+
Value: null
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
Name: 'IsRetweet',
|
|
511
|
+
Type: 'Input',
|
|
512
|
+
Value: null
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
Name: 'IsReply',
|
|
516
|
+
Type: 'Input',
|
|
517
|
+
Value: null
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
Name: 'IsQuote',
|
|
521
|
+
Type: 'Input',
|
|
522
|
+
Value: null
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
Name: 'IsVerified',
|
|
526
|
+
Type: 'Input',
|
|
527
|
+
Value: null
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
Name: 'MinLikes',
|
|
531
|
+
Type: 'Input',
|
|
532
|
+
Value: null
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
Name: 'MinRetweets',
|
|
536
|
+
Type: 'Input',
|
|
537
|
+
Value: null
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
Name: 'MinReplies',
|
|
541
|
+
Type: 'Input',
|
|
542
|
+
Value: null
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
Name: 'Place',
|
|
546
|
+
Type: 'Input',
|
|
547
|
+
Value: null
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
Name: 'MaxResults',
|
|
551
|
+
Type: 'Input',
|
|
552
|
+
Value: 100
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
Name: 'SortOrder',
|
|
556
|
+
Type: 'Input',
|
|
557
|
+
Value: 'recency' // 'recency' or 'relevancy'
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
Name: 'Posts',
|
|
561
|
+
Type: 'Output',
|
|
562
|
+
Value: null
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
Name: 'Tweets',
|
|
566
|
+
Type: 'Output',
|
|
567
|
+
Value: null
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
Name: 'Analysis',
|
|
571
|
+
Type: 'Output',
|
|
572
|
+
Value: null
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
Name: 'ActualQuery',
|
|
576
|
+
Type: 'Output',
|
|
577
|
+
Value: null
|
|
578
|
+
}
|
|
579
|
+
];
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Get action description
|
|
584
|
+
*/
|
|
585
|
+
public get Description(): string {
|
|
586
|
+
return 'Searches for tweets on Twitter/X using advanced operators and filters, with comprehensive analysis of results including historical data';
|
|
587
|
+
}
|
|
588
|
+
}
|