@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,449 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { FacebookBaseAction, FacebookPost } from '../facebook-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { SocialPost, SearchParams, SocialMediaErrorCode } from '../../../base/base-social.action';
|
|
5
|
+
import { LogStatus, LogError } from '@memberjunction/core';
|
|
6
|
+
import axios from 'axios';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Searches for historical posts on Facebook pages.
|
|
10
|
+
* Provides powerful search capabilities including date ranges, keywords, and content types.
|
|
11
|
+
*/
|
|
12
|
+
@RegisterClass(FacebookBaseAction, 'FacebookSearchPostsAction')
|
|
13
|
+
export class FacebookSearchPostsAction extends FacebookBaseAction {
|
|
14
|
+
/**
|
|
15
|
+
* Get action description
|
|
16
|
+
*/
|
|
17
|
+
public get Description(): string {
|
|
18
|
+
return 'Searches for historical posts on Facebook pages with filters for date ranges, keywords, hashtags, and content types';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Define the parameters for this action
|
|
23
|
+
*/
|
|
24
|
+
public get Params(): ActionParam[] {
|
|
25
|
+
return [
|
|
26
|
+
...this.commonSocialParams,
|
|
27
|
+
{
|
|
28
|
+
Name: 'PageIDs',
|
|
29
|
+
Type: 'Input',
|
|
30
|
+
Value: null,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
Name: 'Query',
|
|
34
|
+
Type: 'Input',
|
|
35
|
+
Value: null,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
Name: 'Hashtags',
|
|
39
|
+
Type: 'Input',
|
|
40
|
+
Value: null,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
Name: 'StartDate',
|
|
44
|
+
Type: 'Input',
|
|
45
|
+
Value: null,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
Name: 'EndDate',
|
|
49
|
+
Type: 'Input',
|
|
50
|
+
Value: null,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
Name: 'PostTypes',
|
|
54
|
+
Type: 'Input',
|
|
55
|
+
Value: null,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
Name: 'MinEngagements',
|
|
59
|
+
Type: 'Input',
|
|
60
|
+
Value: null,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
Name: 'IncludeMetrics',
|
|
64
|
+
Type: 'Input',
|
|
65
|
+
Value: true,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
Name: 'Limit',
|
|
69
|
+
Type: 'Input',
|
|
70
|
+
Value: 100,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
Name: 'SortBy',
|
|
74
|
+
Type: 'Input',
|
|
75
|
+
Value: 'created_time',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
Name: 'SortOrder',
|
|
79
|
+
Type: 'Input',
|
|
80
|
+
Value: 'DESC',
|
|
81
|
+
}
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Execute the action
|
|
87
|
+
*/
|
|
88
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
89
|
+
const { Params, ContextUser } = params;
|
|
90
|
+
|
|
91
|
+
try {
|
|
92
|
+
// Validate required parameters
|
|
93
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
94
|
+
|
|
95
|
+
if (!companyIntegrationId) {
|
|
96
|
+
return {
|
|
97
|
+
Success: false,
|
|
98
|
+
Message: 'CompanyIntegrationID is required',
|
|
99
|
+
ResultCode: 'INVALID_TOKEN'
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Initialize OAuth
|
|
104
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
105
|
+
return {
|
|
106
|
+
Success: false,
|
|
107
|
+
Message: 'Failed to initialize Facebook OAuth connection',
|
|
108
|
+
ResultCode: 'INVALID_TOKEN'
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Get parameters
|
|
113
|
+
const pageIds = this.getParamValue(Params, 'PageIDs') as string[];
|
|
114
|
+
const query = this.getParamValue(Params, 'Query') as string;
|
|
115
|
+
const hashtags = this.getParamValue(Params, 'Hashtags') as string[];
|
|
116
|
+
const startDate = this.getParamValue(Params, 'StartDate') as string;
|
|
117
|
+
const endDate = this.getParamValue(Params, 'EndDate') as string;
|
|
118
|
+
const postTypes = this.getParamValue(Params, 'PostTypes') as string[];
|
|
119
|
+
const minEngagements = this.getParamValue(Params, 'MinEngagements') as number;
|
|
120
|
+
const includeMetrics = this.getParamValue(Params, 'IncludeMetrics') !== false;
|
|
121
|
+
const limit = this.getParamValue(Params, 'Limit') as number || 100;
|
|
122
|
+
const sortBy = this.getParamValue(Params, 'SortBy') as string || 'created_time';
|
|
123
|
+
const sortOrder = this.getParamValue(Params, 'SortOrder') as string || 'DESC';
|
|
124
|
+
|
|
125
|
+
// Build search parameters
|
|
126
|
+
const searchParams: SearchParams = {
|
|
127
|
+
query,
|
|
128
|
+
hashtags,
|
|
129
|
+
startDate: startDate ? new Date(startDate) : undefined,
|
|
130
|
+
endDate: endDate ? new Date(endDate) : undefined,
|
|
131
|
+
limit
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
LogStatus('Starting Facebook post search...');
|
|
135
|
+
|
|
136
|
+
// Get pages to search
|
|
137
|
+
let pagesToSearch = pageIds;
|
|
138
|
+
if (!pagesToSearch || pagesToSearch.length === 0) {
|
|
139
|
+
// Get all accessible pages
|
|
140
|
+
const userPages = await this.getUserPages();
|
|
141
|
+
pagesToSearch = userPages.map(p => p.id);
|
|
142
|
+
LogStatus(`Searching across ${pagesToSearch.length} accessible pages`);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Search posts from each page
|
|
146
|
+
const allPosts: FacebookPost[] = [];
|
|
147
|
+
for (const pageId of pagesToSearch) {
|
|
148
|
+
try {
|
|
149
|
+
const posts = await this.searchPagePosts(
|
|
150
|
+
pageId,
|
|
151
|
+
searchParams,
|
|
152
|
+
postTypes,
|
|
153
|
+
includeMetrics
|
|
154
|
+
);
|
|
155
|
+
allPosts.push(...posts);
|
|
156
|
+
LogStatus(`Found ${posts.length} posts from page ${pageId}`);
|
|
157
|
+
} catch (error) {
|
|
158
|
+
LogError(`Failed to search page ${pageId}: ${error}`);
|
|
159
|
+
// Continue with other pages
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Filter by minimum engagements if specified
|
|
164
|
+
let filteredPosts = allPosts;
|
|
165
|
+
if (minEngagements && minEngagements > 0) {
|
|
166
|
+
filteredPosts = allPosts.filter(post => {
|
|
167
|
+
const engagements = this.calculateEngagements(post);
|
|
168
|
+
return engagements >= minEngagements;
|
|
169
|
+
});
|
|
170
|
+
LogStatus(`Filtered to ${filteredPosts.length} posts with at least ${minEngagements} engagements`);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Sort posts
|
|
174
|
+
const sortedPosts = this.sortPosts(filteredPosts, sortBy, sortOrder);
|
|
175
|
+
|
|
176
|
+
// Limit results
|
|
177
|
+
const limitedPosts = sortedPosts.slice(0, limit);
|
|
178
|
+
|
|
179
|
+
// Normalize posts to common format
|
|
180
|
+
const normalizedPosts = limitedPosts.map(post => this.normalizePost(post));
|
|
181
|
+
|
|
182
|
+
// Calculate search summary
|
|
183
|
+
const summary = this.calculateSearchSummary(normalizedPosts, searchParams);
|
|
184
|
+
|
|
185
|
+
LogStatus(`Search completed. Found ${normalizedPosts.length} matching posts`);
|
|
186
|
+
|
|
187
|
+
// Update output parameters
|
|
188
|
+
const outputParams = [...Params];
|
|
189
|
+
// TODO: Set output parameters based on result
|
|
190
|
+
|
|
191
|
+
return {
|
|
192
|
+
Success: true,
|
|
193
|
+
Message: `Found ${normalizedPosts.length} posts matching search criteria`,
|
|
194
|
+
ResultCode: 'SUCCESS',
|
|
195
|
+
Params: outputParams
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
} catch (error) {
|
|
199
|
+
LogError(`Failed to search Facebook posts: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
200
|
+
|
|
201
|
+
if (this.isAuthError(error)) {
|
|
202
|
+
return this.handleOAuthError(error);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return {
|
|
206
|
+
Success: false,
|
|
207
|
+
Message: error instanceof Error ? error.message : 'Unknown error occurred',
|
|
208
|
+
ResultCode: 'ERROR'
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Search posts from a specific page
|
|
215
|
+
*/
|
|
216
|
+
private async searchPagePosts(
|
|
217
|
+
pageId: string,
|
|
218
|
+
searchParams: SearchParams,
|
|
219
|
+
postTypes: string[] | null,
|
|
220
|
+
includeMetrics: boolean
|
|
221
|
+
): Promise<FacebookPost[]> {
|
|
222
|
+
const pageToken = await this.getPageAccessToken(pageId);
|
|
223
|
+
|
|
224
|
+
// Build fields parameter
|
|
225
|
+
const fields = includeMetrics
|
|
226
|
+
? this.getPostFields()
|
|
227
|
+
: 'id,message,created_time,updated_time,from,story,permalink_url,attachments';
|
|
228
|
+
|
|
229
|
+
// Build API parameters
|
|
230
|
+
const apiParams: any = {
|
|
231
|
+
access_token: pageToken,
|
|
232
|
+
fields,
|
|
233
|
+
limit: 100 // Get max per request, we'll filter later
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
// Add date range
|
|
237
|
+
if (searchParams.startDate) {
|
|
238
|
+
apiParams.since = Math.floor(searchParams.startDate.getTime() / 1000);
|
|
239
|
+
}
|
|
240
|
+
if (searchParams.endDate) {
|
|
241
|
+
apiParams.until = Math.floor(searchParams.endDate.getTime() / 1000);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Get all posts in date range
|
|
245
|
+
const allPosts = await this.getPaginatedResults<FacebookPost>(
|
|
246
|
+
`${this.apiBaseUrl}/${pageId}/posts`,
|
|
247
|
+
apiParams,
|
|
248
|
+
searchParams.limit ? searchParams.limit * 2 : undefined // Get extra to account for filtering
|
|
249
|
+
);
|
|
250
|
+
|
|
251
|
+
// Filter posts based on search criteria
|
|
252
|
+
let filteredPosts = allPosts;
|
|
253
|
+
|
|
254
|
+
// Filter by content/query
|
|
255
|
+
if (searchParams.query) {
|
|
256
|
+
const queryLower = searchParams.query.toLowerCase();
|
|
257
|
+
filteredPosts = filteredPosts.filter(post => {
|
|
258
|
+
const message = (post.message || '').toLowerCase();
|
|
259
|
+
const story = (post.story || '').toLowerCase();
|
|
260
|
+
return message.includes(queryLower) || story.includes(queryLower);
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Filter by hashtags
|
|
265
|
+
if (searchParams.hashtags && searchParams.hashtags.length > 0) {
|
|
266
|
+
const hashtagsToFind = searchParams.hashtags.map(tag =>
|
|
267
|
+
tag.startsWith('#') ? tag.toLowerCase() : `#${tag}`.toLowerCase()
|
|
268
|
+
);
|
|
269
|
+
|
|
270
|
+
filteredPosts = filteredPosts.filter(post => {
|
|
271
|
+
const content = (post.message || '').toLowerCase();
|
|
272
|
+
return hashtagsToFind.some(hashtag => content.includes(hashtag));
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Filter by post types
|
|
277
|
+
if (postTypes && postTypes.length > 0) {
|
|
278
|
+
filteredPosts = filteredPosts.filter(post => {
|
|
279
|
+
const postType = this.getPostType(post);
|
|
280
|
+
return postTypes.includes(postType);
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
return filteredPosts;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Implement the abstract searchPosts method
|
|
289
|
+
*/
|
|
290
|
+
protected async searchPosts(params: SearchParams): Promise<SocialPost[]> {
|
|
291
|
+
// This is called by the base class, but we implement our own search logic
|
|
292
|
+
// in RunAction, so we'll just throw an error here
|
|
293
|
+
throw new Error('Use FacebookSearchPostsAction.RunAction instead');
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Get post type from Facebook post
|
|
298
|
+
*/
|
|
299
|
+
private getPostType(post: FacebookPost): string {
|
|
300
|
+
if (post.attachments?.data?.[0]?.type) {
|
|
301
|
+
return post.attachments.data[0].type.toLowerCase();
|
|
302
|
+
}
|
|
303
|
+
return 'status';
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Calculate total engagements for a post
|
|
308
|
+
*/
|
|
309
|
+
private calculateEngagements(post: FacebookPost): number {
|
|
310
|
+
const reactions = post.reactions?.summary?.total_count || 0;
|
|
311
|
+
const comments = post.comments?.summary?.total_count || 0;
|
|
312
|
+
const shares = post.shares?.count || 0;
|
|
313
|
+
|
|
314
|
+
return reactions + comments + shares;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Sort posts by specified criteria
|
|
319
|
+
*/
|
|
320
|
+
private sortPosts(posts: FacebookPost[], sortBy: string, sortOrder: string): FacebookPost[] {
|
|
321
|
+
const sorted = [...posts].sort((a, b) => {
|
|
322
|
+
let aValue: number;
|
|
323
|
+
let bValue: number;
|
|
324
|
+
|
|
325
|
+
switch (sortBy) {
|
|
326
|
+
case 'engagement':
|
|
327
|
+
aValue = this.calculateEngagements(a);
|
|
328
|
+
bValue = this.calculateEngagements(b);
|
|
329
|
+
break;
|
|
330
|
+
case 'reach':
|
|
331
|
+
aValue = this.getPostReach(a);
|
|
332
|
+
bValue = this.getPostReach(b);
|
|
333
|
+
break;
|
|
334
|
+
case 'created_time':
|
|
335
|
+
default:
|
|
336
|
+
aValue = new Date(a.created_time).getTime();
|
|
337
|
+
bValue = new Date(b.created_time).getTime();
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
return sortOrder === 'DESC' ? bValue - aValue : aValue - bValue;
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
return sorted;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Get post reach from insights
|
|
349
|
+
*/
|
|
350
|
+
private getPostReach(post: FacebookPost): number {
|
|
351
|
+
if (post.insights?.data) {
|
|
352
|
+
const reachInsight = post.insights.data.find(i =>
|
|
353
|
+
i.name === 'post_impressions_unique' || i.name === 'post_reach'
|
|
354
|
+
);
|
|
355
|
+
return reachInsight?.values?.[0]?.value || 0;
|
|
356
|
+
}
|
|
357
|
+
return 0;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Calculate search summary statistics
|
|
362
|
+
*/
|
|
363
|
+
private calculateSearchSummary(posts: SocialPost[], searchParams: SearchParams): any {
|
|
364
|
+
if (posts.length === 0) {
|
|
365
|
+
return {
|
|
366
|
+
totalPosts: 0,
|
|
367
|
+
dateRange: null,
|
|
368
|
+
topHashtags: [],
|
|
369
|
+
postTypes: {},
|
|
370
|
+
engagementStats: null
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// Date range
|
|
375
|
+
const dates = posts.map(p => p.publishedAt.getTime());
|
|
376
|
+
const dateRange = {
|
|
377
|
+
earliest: new Date(Math.min(...dates)),
|
|
378
|
+
latest: new Date(Math.max(...dates))
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
// Extract hashtags
|
|
382
|
+
const hashtagCounts: Record<string, number> = {};
|
|
383
|
+
posts.forEach(post => {
|
|
384
|
+
const hashtags = post.content.match(/#\w+/g) || [];
|
|
385
|
+
hashtags.forEach(tag => {
|
|
386
|
+
hashtagCounts[tag] = (hashtagCounts[tag] || 0) + 1;
|
|
387
|
+
});
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
// Top hashtags
|
|
391
|
+
const topHashtags = Object.entries(hashtagCounts)
|
|
392
|
+
.sort(([, a], [, b]) => b - a)
|
|
393
|
+
.slice(0, 10)
|
|
394
|
+
.map(([tag, count]) => ({ tag, count }));
|
|
395
|
+
|
|
396
|
+
// Post types
|
|
397
|
+
const postTypes: Record<string, number> = {};
|
|
398
|
+
posts.forEach(post => {
|
|
399
|
+
const type = post.platformSpecificData.postType || 'status';
|
|
400
|
+
postTypes[type] = (postTypes[type] || 0) + 1;
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
// Engagement statistics
|
|
404
|
+
const engagements = posts.map(p => p.analytics?.engagements || 0);
|
|
405
|
+
const totalEngagements = engagements.reduce((sum, e) => sum + e, 0);
|
|
406
|
+
const avgEngagements = totalEngagements / posts.length;
|
|
407
|
+
const maxEngagements = Math.max(...engagements);
|
|
408
|
+
|
|
409
|
+
return {
|
|
410
|
+
totalPosts: posts.length,
|
|
411
|
+
dateRange,
|
|
412
|
+
topHashtags,
|
|
413
|
+
postTypes,
|
|
414
|
+
engagementStats: {
|
|
415
|
+
total: totalEngagements,
|
|
416
|
+
average: Math.round(avgEngagements),
|
|
417
|
+
max: maxEngagements,
|
|
418
|
+
distribution: this.getEngagementDistribution(engagements)
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Get engagement distribution
|
|
425
|
+
*/
|
|
426
|
+
private getEngagementDistribution(engagements: number[]): Record<string, number> {
|
|
427
|
+
const distribution = {
|
|
428
|
+
'0-10': 0,
|
|
429
|
+
'11-50': 0,
|
|
430
|
+
'51-100': 0,
|
|
431
|
+
'101-500': 0,
|
|
432
|
+
'501-1000': 0,
|
|
433
|
+
'1000+': 0
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
engagements.forEach(e => {
|
|
437
|
+
if (e <= 10) distribution['0-10']++;
|
|
438
|
+
else if (e <= 50) distribution['11-50']++;
|
|
439
|
+
else if (e <= 100) distribution['51-100']++;
|
|
440
|
+
else if (e <= 500) distribution['101-500']++;
|
|
441
|
+
else if (e <= 1000) distribution['501-1000']++;
|
|
442
|
+
else distribution['1000+']++;
|
|
443
|
+
});
|
|
444
|
+
|
|
445
|
+
return distribution;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
}
|