@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,569 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { InstagramBaseAction } from '../instagram-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { LogError } from '@memberjunction/core';
|
|
5
|
+
import { SocialPost, SearchParams } from '../../../base/base-social.action';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Searches for historical Instagram posts from the business account.
|
|
9
|
+
* Instagram API only allows searching within your own business account's posts.
|
|
10
|
+
* Supports filtering by date range, hashtags, and content.
|
|
11
|
+
*/
|
|
12
|
+
@RegisterClass(InstagramBaseAction, 'Instagram - Search Posts')
|
|
13
|
+
export class InstagramSearchPostsAction extends InstagramBaseAction {
|
|
14
|
+
|
|
15
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
16
|
+
try {
|
|
17
|
+
const companyIntegrationId = this.getParamValue(params.Params, 'CompanyIntegrationID');
|
|
18
|
+
const query = this.getParamValue(params.Params, 'Query');
|
|
19
|
+
const hashtags = this.getParamValue(params.Params, 'Hashtags') as string[];
|
|
20
|
+
const startDate = this.getParamValue(params.Params, 'StartDate');
|
|
21
|
+
const endDate = this.getParamValue(params.Params, 'EndDate');
|
|
22
|
+
const mediaType = this.getParamValue(params.Params, 'MediaType');
|
|
23
|
+
const minEngagement = this.getParamValue(params.Params, 'MinEngagement') || 0;
|
|
24
|
+
const limit = this.getParamValue(params.Params, 'Limit') || 100;
|
|
25
|
+
const includeArchived = this.getParamValue(params.Params, 'IncludeArchived') || false;
|
|
26
|
+
|
|
27
|
+
// Initialize OAuth
|
|
28
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
29
|
+
return {
|
|
30
|
+
Success: false,
|
|
31
|
+
Message: 'Failed to initialize Instagram authentication',
|
|
32
|
+
ResultCode: 'AUTH_FAILED'
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Build search parameters
|
|
37
|
+
const searchParams: SearchParams = {
|
|
38
|
+
query,
|
|
39
|
+
hashtags,
|
|
40
|
+
startDate: startDate ? new Date(startDate) : undefined,
|
|
41
|
+
endDate: endDate ? new Date(endDate) : undefined,
|
|
42
|
+
limit
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// Perform search
|
|
46
|
+
const posts = await this.searchPosts(searchParams);
|
|
47
|
+
|
|
48
|
+
// Filter by media type if specified
|
|
49
|
+
let filteredPosts = posts;
|
|
50
|
+
if (mediaType) {
|
|
51
|
+
filteredPosts = posts.filter(post =>
|
|
52
|
+
post.platformSpecificData.mediaType === mediaType
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Filter by minimum engagement
|
|
57
|
+
if (minEngagement > 0) {
|
|
58
|
+
filteredPosts = filteredPosts.filter(post => {
|
|
59
|
+
const totalEngagement =
|
|
60
|
+
(post.analytics?.likes || 0) +
|
|
61
|
+
(post.analytics?.comments || 0);
|
|
62
|
+
return totalEngagement >= minEngagement;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Include archived posts if requested
|
|
67
|
+
if (includeArchived) {
|
|
68
|
+
const archivedPosts = await this.getArchivedPosts(searchParams);
|
|
69
|
+
filteredPosts = [...filteredPosts, ...archivedPosts];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Sort posts by relevance
|
|
73
|
+
const sortedPosts = this.sortByRelevance(filteredPosts, query, hashtags);
|
|
74
|
+
|
|
75
|
+
// Analyze search results
|
|
76
|
+
const analysis = this.analyzeSearchResults(sortedPosts, searchParams);
|
|
77
|
+
|
|
78
|
+
// Store result in output params
|
|
79
|
+
const outputParams = [...params.Params];
|
|
80
|
+
outputParams.push({
|
|
81
|
+
Name: 'ResultData',
|
|
82
|
+
Type: 'Output',
|
|
83
|
+
Value: JSON.stringify({
|
|
84
|
+
posts: sortedPosts.slice(0, limit),
|
|
85
|
+
totalFound: sortedPosts.length,
|
|
86
|
+
searchCriteria: {
|
|
87
|
+
query,
|
|
88
|
+
hashtags,
|
|
89
|
+
dateRange: {
|
|
90
|
+
start: startDate,
|
|
91
|
+
end: endDate
|
|
92
|
+
},
|
|
93
|
+
mediaType,
|
|
94
|
+
minEngagement
|
|
95
|
+
},
|
|
96
|
+
analysis,
|
|
97
|
+
suggestions: this.generateSearchSuggestions(sortedPosts, searchParams)
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
Success: true,
|
|
103
|
+
Message: `Found ${sortedPosts.length} matching posts`,
|
|
104
|
+
ResultCode: 'SUCCESS',
|
|
105
|
+
Params: outputParams
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
} catch (error: any) {
|
|
109
|
+
LogError('Failed to search Instagram posts', error);
|
|
110
|
+
|
|
111
|
+
if (error.code === 'RATE_LIMIT') {
|
|
112
|
+
return {
|
|
113
|
+
Success: false,
|
|
114
|
+
Message: 'Instagram API rate limit exceeded. Please try again later.',
|
|
115
|
+
ResultCode: 'RATE_LIMIT'
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return {
|
|
120
|
+
Success: false,
|
|
121
|
+
Message: `Failed to search posts: ${error.message}`,
|
|
122
|
+
ResultCode: 'ERROR'
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Search posts implementation (Instagram only allows searching own posts)
|
|
129
|
+
*/
|
|
130
|
+
protected async searchPosts(params: SearchParams): Promise<SocialPost[]> {
|
|
131
|
+
// Instagram doesn't have a public search API, so we fetch all posts
|
|
132
|
+
// and filter them client-side
|
|
133
|
+
const allPosts = await this.fetchAllAccountPosts(params.startDate, params.endDate);
|
|
134
|
+
|
|
135
|
+
// Filter posts based on search criteria
|
|
136
|
+
let filtered = allPosts;
|
|
137
|
+
|
|
138
|
+
// Filter by query in caption
|
|
139
|
+
if (params.query) {
|
|
140
|
+
const queryLower = params.query.toLowerCase();
|
|
141
|
+
filtered = filtered.filter(post =>
|
|
142
|
+
post.content.toLowerCase().includes(queryLower)
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Filter by hashtags
|
|
147
|
+
if (params.hashtags && params.hashtags.length > 0) {
|
|
148
|
+
const searchHashtags = params.hashtags.map(tag =>
|
|
149
|
+
tag.startsWith('#') ? tag.toLowerCase() : `#${tag}`.toLowerCase()
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
filtered = filtered.filter(post => {
|
|
153
|
+
const postHashtags = this.extractHashtags(post.content);
|
|
154
|
+
return searchHashtags.some(searchTag =>
|
|
155
|
+
postHashtags.includes(searchTag)
|
|
156
|
+
);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return filtered.slice(0, params.limit || 100);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Fetch all posts from the account within date range
|
|
165
|
+
*/
|
|
166
|
+
private async fetchAllAccountPosts(startDate?: Date, endDate?: Date): Promise<SocialPost[]> {
|
|
167
|
+
const posts: SocialPost[] = [];
|
|
168
|
+
let hasNext = true;
|
|
169
|
+
let afterCursor: string | undefined;
|
|
170
|
+
|
|
171
|
+
while (hasNext) {
|
|
172
|
+
const queryParams: any = {
|
|
173
|
+
fields: 'id,caption,media_type,media_url,permalink,timestamp,like_count,comments_count',
|
|
174
|
+
access_token: this.getAccessToken(),
|
|
175
|
+
limit: 100
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
if (afterCursor) {
|
|
179
|
+
queryParams.after = afterCursor;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (startDate) {
|
|
183
|
+
queryParams.since = Math.floor(startDate.getTime() / 1000);
|
|
184
|
+
}
|
|
185
|
+
if (endDate) {
|
|
186
|
+
queryParams.until = Math.floor(endDate.getTime() / 1000);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const response = await this.makeInstagramRequest<{
|
|
190
|
+
data: any[];
|
|
191
|
+
paging?: {
|
|
192
|
+
cursors: { after: string };
|
|
193
|
+
next?: string;
|
|
194
|
+
};
|
|
195
|
+
}>(
|
|
196
|
+
`${this.instagramBusinessAccountId}/media`,
|
|
197
|
+
'GET',
|
|
198
|
+
null,
|
|
199
|
+
queryParams
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
if (response.data) {
|
|
203
|
+
const normalizedPosts = response.data.map(post => this.normalizePost(post));
|
|
204
|
+
posts.push(...normalizedPosts);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (response.paging?.next && response.paging?.cursors?.after) {
|
|
208
|
+
afterCursor = response.paging.cursors.after;
|
|
209
|
+
} else {
|
|
210
|
+
hasNext = false;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Stop if we've reached the date range limit
|
|
214
|
+
if (posts.length > 0 && startDate) {
|
|
215
|
+
const oldestPost = posts[posts.length - 1];
|
|
216
|
+
if (oldestPost.publishedAt < startDate) {
|
|
217
|
+
hasNext = false;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return posts;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Get archived posts (if any)
|
|
227
|
+
*/
|
|
228
|
+
private async getArchivedPosts(params: SearchParams): Promise<SocialPost[]> {
|
|
229
|
+
try {
|
|
230
|
+
// Instagram API doesn't have a specific endpoint for archived posts
|
|
231
|
+
// This would require additional implementation or different API access
|
|
232
|
+
return [];
|
|
233
|
+
} catch (error) {
|
|
234
|
+
LogError('Failed to get archived posts', error);
|
|
235
|
+
return [];
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Extract hashtags from content
|
|
241
|
+
*/
|
|
242
|
+
private extractHashtags(content: string): string[] {
|
|
243
|
+
const hashtagRegex = /#[\w\u0590-\u05ff]+/g;
|
|
244
|
+
const matches = content.match(hashtagRegex) || [];
|
|
245
|
+
return matches.map(tag => tag.toLowerCase());
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Sort posts by relevance
|
|
250
|
+
*/
|
|
251
|
+
private sortByRelevance(
|
|
252
|
+
posts: SocialPost[],
|
|
253
|
+
query?: string,
|
|
254
|
+
hashtags?: string[]
|
|
255
|
+
): SocialPost[] {
|
|
256
|
+
return posts.sort((a, b) => {
|
|
257
|
+
let scoreA = 0;
|
|
258
|
+
let scoreB = 0;
|
|
259
|
+
|
|
260
|
+
// Score based on query match position
|
|
261
|
+
if (query) {
|
|
262
|
+
const queryLower = query.toLowerCase();
|
|
263
|
+
const posA = a.content.toLowerCase().indexOf(queryLower);
|
|
264
|
+
const posB = b.content.toLowerCase().indexOf(queryLower);
|
|
265
|
+
|
|
266
|
+
if (posA === 0) scoreA += 10; // Starts with query
|
|
267
|
+
else if (posA > 0) scoreA += 5; // Contains query
|
|
268
|
+
|
|
269
|
+
if (posB === 0) scoreB += 10;
|
|
270
|
+
else if (posB > 0) scoreB += 5;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// Score based on hashtag matches
|
|
274
|
+
if (hashtags && hashtags.length > 0) {
|
|
275
|
+
const hashtagsA = this.extractHashtags(a.content);
|
|
276
|
+
const hashtagsB = this.extractHashtags(b.content);
|
|
277
|
+
|
|
278
|
+
hashtags.forEach(tag => {
|
|
279
|
+
const searchTag = tag.startsWith('#') ? tag.toLowerCase() : `#${tag}`.toLowerCase();
|
|
280
|
+
if (hashtagsA.includes(searchTag)) scoreA += 3;
|
|
281
|
+
if (hashtagsB.includes(searchTag)) scoreB += 3;
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// Score based on engagement
|
|
286
|
+
const engagementA = (a.analytics?.likes || 0) + (a.analytics?.comments || 0);
|
|
287
|
+
const engagementB = (b.analytics?.likes || 0) + (b.analytics?.comments || 0);
|
|
288
|
+
|
|
289
|
+
scoreA += Math.log10(engagementA + 1);
|
|
290
|
+
scoreB += Math.log10(engagementB + 1);
|
|
291
|
+
|
|
292
|
+
// Sort by score (descending) then by date (descending)
|
|
293
|
+
if (scoreA !== scoreB) {
|
|
294
|
+
return scoreB - scoreA;
|
|
295
|
+
}
|
|
296
|
+
return b.publishedAt.getTime() - a.publishedAt.getTime();
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Analyze search results
|
|
302
|
+
*/
|
|
303
|
+
private analyzeSearchResults(posts: SocialPost[], params: SearchParams): any {
|
|
304
|
+
const analysis = {
|
|
305
|
+
totalPosts: posts.length,
|
|
306
|
+
dateRange: {
|
|
307
|
+
earliest: null as Date | null,
|
|
308
|
+
latest: null as Date | null
|
|
309
|
+
},
|
|
310
|
+
mediaTypes: {
|
|
311
|
+
IMAGE: 0,
|
|
312
|
+
VIDEO: 0,
|
|
313
|
+
CAROUSEL_ALBUM: 0,
|
|
314
|
+
REELS: 0
|
|
315
|
+
},
|
|
316
|
+
engagement: {
|
|
317
|
+
totalLikes: 0,
|
|
318
|
+
totalComments: 0,
|
|
319
|
+
avgLikesPerPost: 0,
|
|
320
|
+
avgCommentsPerPost: 0,
|
|
321
|
+
topPost: null as any
|
|
322
|
+
},
|
|
323
|
+
hashtagFrequency: {} as Record<string, number>,
|
|
324
|
+
postingPatterns: {
|
|
325
|
+
byDayOfWeek: {} as Record<string, number>,
|
|
326
|
+
byHour: {} as Record<number, number>
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
if (posts.length === 0) return analysis;
|
|
331
|
+
|
|
332
|
+
// Find date range
|
|
333
|
+
const dates = posts.map(p => p.publishedAt.getTime());
|
|
334
|
+
analysis.dateRange.earliest = new Date(Math.min(...dates));
|
|
335
|
+
analysis.dateRange.latest = new Date(Math.max(...dates));
|
|
336
|
+
|
|
337
|
+
// Analyze posts
|
|
338
|
+
let topEngagement = 0;
|
|
339
|
+
posts.forEach(post => {
|
|
340
|
+
// Media types
|
|
341
|
+
const mediaType = post.platformSpecificData.mediaType;
|
|
342
|
+
if (analysis.mediaTypes[mediaType] !== undefined) {
|
|
343
|
+
analysis.mediaTypes[mediaType]++;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// Engagement
|
|
347
|
+
const likes = post.analytics?.likes || 0;
|
|
348
|
+
const comments = post.analytics?.comments || 0;
|
|
349
|
+
const totalEngagement = likes + comments;
|
|
350
|
+
|
|
351
|
+
analysis.engagement.totalLikes += likes;
|
|
352
|
+
analysis.engagement.totalComments += comments;
|
|
353
|
+
|
|
354
|
+
if (totalEngagement > topEngagement) {
|
|
355
|
+
topEngagement = totalEngagement;
|
|
356
|
+
analysis.engagement.topPost = {
|
|
357
|
+
id: post.id,
|
|
358
|
+
content: post.content.substring(0, 100) + '...',
|
|
359
|
+
engagement: totalEngagement,
|
|
360
|
+
publishedAt: post.publishedAt
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// Hashtags
|
|
365
|
+
const hashtags = this.extractHashtags(post.content);
|
|
366
|
+
hashtags.forEach(tag => {
|
|
367
|
+
analysis.hashtagFrequency[tag] = (analysis.hashtagFrequency[tag] || 0) + 1;
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
// Posting patterns
|
|
371
|
+
const dayOfWeek = post.publishedAt.toLocaleDateString('en-US', { weekday: 'long' });
|
|
372
|
+
const hour = post.publishedAt.getHours();
|
|
373
|
+
|
|
374
|
+
analysis.postingPatterns.byDayOfWeek[dayOfWeek] =
|
|
375
|
+
(analysis.postingPatterns.byDayOfWeek[dayOfWeek] || 0) + 1;
|
|
376
|
+
analysis.postingPatterns.byHour[hour] =
|
|
377
|
+
(analysis.postingPatterns.byHour[hour] || 0) + 1;
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
// Calculate averages
|
|
381
|
+
analysis.engagement.avgLikesPerPost =
|
|
382
|
+
Math.round(analysis.engagement.totalLikes / posts.length);
|
|
383
|
+
analysis.engagement.avgCommentsPerPost =
|
|
384
|
+
Math.round(analysis.engagement.totalComments / posts.length);
|
|
385
|
+
|
|
386
|
+
return analysis;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Generate search suggestions based on results
|
|
391
|
+
*/
|
|
392
|
+
private generateSearchSuggestions(posts: SocialPost[], params: SearchParams): any {
|
|
393
|
+
const suggestions = {
|
|
394
|
+
relatedHashtags: [] as string[],
|
|
395
|
+
optimalPostingTimes: [] as any[],
|
|
396
|
+
contentThemes: [] as string[],
|
|
397
|
+
performanceInsights: [] as string[]
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
if (posts.length === 0) {
|
|
401
|
+
suggestions.performanceInsights.push('No posts found matching your criteria. Try broadening your search.');
|
|
402
|
+
return suggestions;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Related hashtags (most frequently used)
|
|
406
|
+
const hashtagCounts: Record<string, number> = {};
|
|
407
|
+
posts.forEach(post => {
|
|
408
|
+
const hashtags = this.extractHashtags(post.content);
|
|
409
|
+
hashtags.forEach(tag => {
|
|
410
|
+
if (!params.hashtags?.includes(tag)) {
|
|
411
|
+
hashtagCounts[tag] = (hashtagCounts[tag] || 0) + 1;
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
suggestions.relatedHashtags = Object.entries(hashtagCounts)
|
|
417
|
+
.sort(([, a], [, b]) => b - a)
|
|
418
|
+
.slice(0, 10)
|
|
419
|
+
.map(([tag]) => tag);
|
|
420
|
+
|
|
421
|
+
// Optimal posting times (based on engagement)
|
|
422
|
+
const timeEngagement: Record<string, { total: number; count: number }> = {};
|
|
423
|
+
posts.forEach(post => {
|
|
424
|
+
const hour = post.publishedAt.getHours();
|
|
425
|
+
const day = post.publishedAt.toLocaleDateString('en-US', { weekday: 'long' });
|
|
426
|
+
const key = `${day} ${hour}:00`;
|
|
427
|
+
|
|
428
|
+
if (!timeEngagement[key]) {
|
|
429
|
+
timeEngagement[key] = { total: 0, count: 0 };
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
const engagement = (post.analytics?.likes || 0) + (post.analytics?.comments || 0);
|
|
433
|
+
timeEngagement[key].total += engagement;
|
|
434
|
+
timeEngagement[key].count++;
|
|
435
|
+
});
|
|
436
|
+
|
|
437
|
+
suggestions.optimalPostingTimes = Object.entries(timeEngagement)
|
|
438
|
+
.map(([time, data]) => ({
|
|
439
|
+
time,
|
|
440
|
+
avgEngagement: Math.round(data.total / data.count)
|
|
441
|
+
}))
|
|
442
|
+
.sort((a, b) => b.avgEngagement - a.avgEngagement)
|
|
443
|
+
.slice(0, 5);
|
|
444
|
+
|
|
445
|
+
// Performance insights
|
|
446
|
+
const avgEngagement = posts.reduce((sum, post) =>
|
|
447
|
+
sum + (post.analytics?.likes || 0) + (post.analytics?.comments || 0), 0
|
|
448
|
+
) / posts.length;
|
|
449
|
+
|
|
450
|
+
suggestions.performanceInsights.push(
|
|
451
|
+
`Average engagement per post: ${Math.round(avgEngagement)}`,
|
|
452
|
+
`Most successful media type: ${this.getMostSuccessfulMediaType(posts)}`,
|
|
453
|
+
`Posts with questions get ${this.getQuestionEngagementBoost(posts)}% more engagement`
|
|
454
|
+
);
|
|
455
|
+
|
|
456
|
+
return suggestions;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Get most successful media type
|
|
461
|
+
*/
|
|
462
|
+
private getMostSuccessfulMediaType(posts: SocialPost[]): string {
|
|
463
|
+
const typeEngagement: Record<string, { total: number; count: number }> = {};
|
|
464
|
+
|
|
465
|
+
posts.forEach(post => {
|
|
466
|
+
const type = post.platformSpecificData.mediaType;
|
|
467
|
+
if (!typeEngagement[type]) {
|
|
468
|
+
typeEngagement[type] = { total: 0, count: 0 };
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
const engagement = (post.analytics?.likes || 0) + (post.analytics?.comments || 0);
|
|
472
|
+
typeEngagement[type].total += engagement;
|
|
473
|
+
typeEngagement[type].count++;
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
let bestType = 'IMAGE';
|
|
477
|
+
let bestAvg = 0;
|
|
478
|
+
|
|
479
|
+
Object.entries(typeEngagement).forEach(([type, data]) => {
|
|
480
|
+
const avg = data.total / data.count;
|
|
481
|
+
if (avg > bestAvg) {
|
|
482
|
+
bestAvg = avg;
|
|
483
|
+
bestType = type;
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
return bestType;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Calculate engagement boost for posts with questions
|
|
492
|
+
*/
|
|
493
|
+
private getQuestionEngagementBoost(posts: SocialPost[]): number {
|
|
494
|
+
const withQuestions = posts.filter(p => p.content.includes('?'));
|
|
495
|
+
const withoutQuestions = posts.filter(p => !p.content.includes('?'));
|
|
496
|
+
|
|
497
|
+
if (withQuestions.length === 0 || withoutQuestions.length === 0) {
|
|
498
|
+
return 0;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
const avgWithQuestions = withQuestions.reduce((sum, post) =>
|
|
502
|
+
sum + (post.analytics?.likes || 0) + (post.analytics?.comments || 0), 0
|
|
503
|
+
) / withQuestions.length;
|
|
504
|
+
|
|
505
|
+
const avgWithoutQuestions = withoutQuestions.reduce((sum, post) =>
|
|
506
|
+
sum + (post.analytics?.likes || 0) + (post.analytics?.comments || 0), 0
|
|
507
|
+
) / withoutQuestions.length;
|
|
508
|
+
|
|
509
|
+
if (avgWithoutQuestions === 0) return 0;
|
|
510
|
+
|
|
511
|
+
return Math.round(((avgWithQuestions - avgWithoutQuestions) / avgWithoutQuestions) * 100);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Define the parameters for this action
|
|
516
|
+
*/
|
|
517
|
+
public get Params(): ActionParam[] {
|
|
518
|
+
return [
|
|
519
|
+
...this.commonSocialParams,
|
|
520
|
+
{
|
|
521
|
+
Name: 'Query',
|
|
522
|
+
Type: 'Input',
|
|
523
|
+
Value: null
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
Name: 'Hashtags',
|
|
527
|
+
Type: 'Input',
|
|
528
|
+
Value: null
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
Name: 'StartDate',
|
|
532
|
+
Type: 'Input',
|
|
533
|
+
Value: null
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
Name: 'EndDate',
|
|
537
|
+
Type: 'Input',
|
|
538
|
+
Value: null
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
Name: 'MediaType',
|
|
542
|
+
Type: 'Input',
|
|
543
|
+
Value: null
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
Name: 'MinEngagement',
|
|
547
|
+
Type: 'Input',
|
|
548
|
+
Value: 0
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
Name: 'Limit',
|
|
552
|
+
Type: 'Input',
|
|
553
|
+
Value: 100
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
Name: 'IncludeArchived',
|
|
557
|
+
Type: 'Input',
|
|
558
|
+
Value: false
|
|
559
|
+
}
|
|
560
|
+
];
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Get the description for this action
|
|
565
|
+
*/
|
|
566
|
+
public get Description(): string {
|
|
567
|
+
return 'Searches historical Instagram posts from your business account with filters for date range, hashtags, content, and engagement metrics.';
|
|
568
|
+
}
|
|
569
|
+
}
|