@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,281 @@
|
|
|
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 } from '../../../base/base-social.action';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves posts from an Instagram Business account.
|
|
9
|
+
* Returns feed posts, carousels, reels, and IGTV videos with basic metrics.
|
|
10
|
+
*/
|
|
11
|
+
@RegisterClass(InstagramBaseAction, 'Instagram - Get Business Posts')
|
|
12
|
+
export class InstagramGetBusinessPostsAction extends InstagramBaseAction {
|
|
13
|
+
|
|
14
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
15
|
+
try {
|
|
16
|
+
const companyIntegrationId = this.getParamValue(params.Params, 'CompanyIntegrationID');
|
|
17
|
+
const limit = this.getParamValue(params.Params, 'Limit') || 25;
|
|
18
|
+
const mediaType = this.getParamValue(params.Params, 'MediaType');
|
|
19
|
+
const includeMetrics = this.getParamValue(params.Params, 'IncludeMetrics') !== false;
|
|
20
|
+
const afterCursor = this.getParamValue(params.Params, 'AfterCursor');
|
|
21
|
+
const startDate = this.getParamValue(params.Params, 'StartDate');
|
|
22
|
+
const endDate = this.getParamValue(params.Params, 'EndDate');
|
|
23
|
+
|
|
24
|
+
// Initialize OAuth
|
|
25
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
26
|
+
return {
|
|
27
|
+
Success: false,
|
|
28
|
+
Message: 'Failed to initialize Instagram authentication',
|
|
29
|
+
ResultCode: 'AUTH_FAILED'
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Build fields parameter
|
|
34
|
+
let fields = 'id,caption,media_type,media_url,thumbnail_url,permalink,timestamp';
|
|
35
|
+
if (includeMetrics) {
|
|
36
|
+
fields += ',like_count,comments_count,impressions,reach,saved,video_views';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Build query parameters
|
|
40
|
+
const queryParams: any = {
|
|
41
|
+
fields,
|
|
42
|
+
access_token: this.getAccessToken(),
|
|
43
|
+
limit: Math.min(limit, 100) // Instagram max is 100 per request
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
if (afterCursor) {
|
|
47
|
+
queryParams.after = afterCursor;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Add date filtering if provided
|
|
51
|
+
if (startDate) {
|
|
52
|
+
queryParams.since = Math.floor(new Date(startDate).getTime() / 1000);
|
|
53
|
+
}
|
|
54
|
+
if (endDate) {
|
|
55
|
+
queryParams.until = Math.floor(new Date(endDate).getTime() / 1000);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Fetch posts
|
|
59
|
+
const response = await this.makeInstagramRequest<{
|
|
60
|
+
data: any[];
|
|
61
|
+
paging?: {
|
|
62
|
+
cursors: {
|
|
63
|
+
before: string;
|
|
64
|
+
after: string;
|
|
65
|
+
};
|
|
66
|
+
next?: string;
|
|
67
|
+
previous?: string;
|
|
68
|
+
};
|
|
69
|
+
}>(
|
|
70
|
+
`${this.instagramBusinessAccountId}/media`,
|
|
71
|
+
'GET',
|
|
72
|
+
null,
|
|
73
|
+
queryParams
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
// Filter by media type if specified
|
|
77
|
+
let posts = response.data || [];
|
|
78
|
+
if (mediaType) {
|
|
79
|
+
posts = posts.filter(post => post.media_type === mediaType);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Transform to common format
|
|
83
|
+
const normalizedPosts: SocialPost[] = posts.map(post => this.normalizePost(post));
|
|
84
|
+
|
|
85
|
+
// Get additional insights if requested and available
|
|
86
|
+
if (includeMetrics && posts.length > 0) {
|
|
87
|
+
await this.enrichPostsWithInsights(normalizedPosts);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Store result in output params
|
|
91
|
+
const outputParams = [...params.Params];
|
|
92
|
+
outputParams.push({
|
|
93
|
+
Name: 'ResultData',
|
|
94
|
+
Type: 'Output',
|
|
95
|
+
Value: JSON.stringify({
|
|
96
|
+
posts: normalizedPosts,
|
|
97
|
+
paging: {
|
|
98
|
+
hasNext: !!response.paging?.next,
|
|
99
|
+
hasPrevious: !!response.paging?.previous,
|
|
100
|
+
afterCursor: response.paging?.cursors?.after,
|
|
101
|
+
beforeCursor: response.paging?.cursors?.before
|
|
102
|
+
},
|
|
103
|
+
summary: {
|
|
104
|
+
totalPosts: normalizedPosts.length,
|
|
105
|
+
mediaTypes: this.summarizeMediaTypes(posts),
|
|
106
|
+
dateRange: this.getDateRange(normalizedPosts)
|
|
107
|
+
}
|
|
108
|
+
})
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
return {
|
|
112
|
+
Success: true,
|
|
113
|
+
Message: `Retrieved ${normalizedPosts.length} Instagram posts`,
|
|
114
|
+
ResultCode: 'SUCCESS',
|
|
115
|
+
Params: outputParams
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
} catch (error: any) {
|
|
119
|
+
LogError('Failed to retrieve Instagram business posts', error);
|
|
120
|
+
|
|
121
|
+
if (error.code === 'RATE_LIMIT') {
|
|
122
|
+
return {
|
|
123
|
+
Success: false,
|
|
124
|
+
Message: 'Instagram API rate limit exceeded. Please try again later.',
|
|
125
|
+
ResultCode: 'RATE_LIMIT'
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (error.code === 'INSUFFICIENT_PERMISSIONS') {
|
|
130
|
+
return {
|
|
131
|
+
Success: false,
|
|
132
|
+
Message: 'Insufficient permissions to access Instagram business posts',
|
|
133
|
+
ResultCode: 'INSUFFICIENT_PERMISSIONS'
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
Success: false,
|
|
139
|
+
Message: `Failed to retrieve Instagram posts: ${error.message}`,
|
|
140
|
+
ResultCode: 'ERROR'
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Enrich posts with additional insights data
|
|
147
|
+
*/
|
|
148
|
+
private async enrichPostsWithInsights(posts: SocialPost[]): Promise<void> {
|
|
149
|
+
// Instagram allows batch insights requests
|
|
150
|
+
const postIds = posts.map(p => p.id);
|
|
151
|
+
const batchSize = 50; // Instagram's batch limit
|
|
152
|
+
|
|
153
|
+
for (let i = 0; i < postIds.length; i += batchSize) {
|
|
154
|
+
const batch = postIds.slice(i, i + batchSize);
|
|
155
|
+
|
|
156
|
+
try {
|
|
157
|
+
// Get insights for this batch
|
|
158
|
+
const metrics = ['impressions', 'reach', 'engagement', 'saved', 'video_views'];
|
|
159
|
+
const insightsPromises = batch.map(postId =>
|
|
160
|
+
this.getInsights(postId, metrics, 'lifetime')
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
const insightsResults = await Promise.allSettled(insightsPromises);
|
|
164
|
+
|
|
165
|
+
// Map insights back to posts
|
|
166
|
+
insightsResults.forEach((result, index) => {
|
|
167
|
+
if (result.status === 'fulfilled' && result.value) {
|
|
168
|
+
const postIndex = i + index;
|
|
169
|
+
const post = posts[postIndex];
|
|
170
|
+
|
|
171
|
+
// Parse insights data
|
|
172
|
+
result.value.forEach((metric: any) => {
|
|
173
|
+
const value = metric.values?.[0]?.value || 0;
|
|
174
|
+
|
|
175
|
+
switch (metric.name) {
|
|
176
|
+
case 'impressions':
|
|
177
|
+
post.analytics!.impressions = value;
|
|
178
|
+
break;
|
|
179
|
+
case 'reach':
|
|
180
|
+
post.analytics!.reach = value;
|
|
181
|
+
break;
|
|
182
|
+
case 'engagement':
|
|
183
|
+
post.analytics!.engagements = value;
|
|
184
|
+
break;
|
|
185
|
+
case 'saved':
|
|
186
|
+
post.analytics!.saves = value;
|
|
187
|
+
break;
|
|
188
|
+
case 'video_views':
|
|
189
|
+
post.analytics!.videoViews = value;
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
} catch (error) {
|
|
196
|
+
// Log but don't fail the whole operation
|
|
197
|
+
LogError(`Failed to get insights for batch starting at ${i}`, error);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Summarize media types in the response
|
|
204
|
+
*/
|
|
205
|
+
private summarizeMediaTypes(posts: any[]): Record<string, number> {
|
|
206
|
+
const summary: Record<string, number> = {
|
|
207
|
+
IMAGE: 0,
|
|
208
|
+
VIDEO: 0,
|
|
209
|
+
CAROUSEL_ALBUM: 0
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
posts.forEach(post => {
|
|
213
|
+
if (summary[post.media_type] !== undefined) {
|
|
214
|
+
summary[post.media_type]++;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
return summary;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Get date range of posts
|
|
223
|
+
*/
|
|
224
|
+
private getDateRange(posts: SocialPost[]): { earliest: Date | null; latest: Date | null } {
|
|
225
|
+
if (posts.length === 0) {
|
|
226
|
+
return { earliest: null, latest: null };
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const dates = posts.map(p => p.publishedAt.getTime());
|
|
230
|
+
return {
|
|
231
|
+
earliest: new Date(Math.min(...dates)),
|
|
232
|
+
latest: new Date(Math.max(...dates))
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Define the parameters for this action
|
|
238
|
+
*/
|
|
239
|
+
public get Params(): ActionParam[] {
|
|
240
|
+
return [
|
|
241
|
+
...this.commonSocialParams,
|
|
242
|
+
{
|
|
243
|
+
Name: 'Limit',
|
|
244
|
+
Type: 'Input',
|
|
245
|
+
Value: 25
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
Name: 'MediaType',
|
|
249
|
+
Type: 'Input',
|
|
250
|
+
Value: null
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
Name: 'IncludeMetrics',
|
|
254
|
+
Type: 'Input',
|
|
255
|
+
Value: true
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
Name: 'AfterCursor',
|
|
259
|
+
Type: 'Input',
|
|
260
|
+
Value: null
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
Name: 'StartDate',
|
|
264
|
+
Type: 'Input',
|
|
265
|
+
Value: null
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
Name: 'EndDate',
|
|
269
|
+
Type: 'Input',
|
|
270
|
+
Value: null
|
|
271
|
+
}
|
|
272
|
+
];
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Get the description for this action
|
|
277
|
+
*/
|
|
278
|
+
public get Description(): string {
|
|
279
|
+
return 'Retrieves posts from an Instagram Business account with optional metrics and filtering.';
|
|
280
|
+
}
|
|
281
|
+
}
|
|
@@ -0,0 +1,395 @@
|
|
|
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
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves comments for an Instagram post, including nested replies.
|
|
8
|
+
* Supports filtering, pagination, and sentiment analysis.
|
|
9
|
+
*/
|
|
10
|
+
@RegisterClass(InstagramBaseAction, 'Instagram - Get Comments')
|
|
11
|
+
export class InstagramGetCommentsAction extends InstagramBaseAction {
|
|
12
|
+
|
|
13
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
14
|
+
try {
|
|
15
|
+
const companyIntegrationId = this.getParamValue(params.Params, 'CompanyIntegrationID');
|
|
16
|
+
const postId = this.getParamValue(params.Params, 'PostID');
|
|
17
|
+
const includeReplies = this.getParamValue(params.Params, 'IncludeReplies') !== false;
|
|
18
|
+
const includeHidden = this.getParamValue(params.Params, 'IncludeHidden') || false;
|
|
19
|
+
const limit = this.getParamValue(params.Params, 'Limit') || 50;
|
|
20
|
+
const afterCursor = this.getParamValue(params.Params, 'AfterCursor');
|
|
21
|
+
|
|
22
|
+
// Initialize OAuth
|
|
23
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
24
|
+
return {
|
|
25
|
+
Success: false,
|
|
26
|
+
Message: 'Failed to initialize Instagram authentication',
|
|
27
|
+
ResultCode: 'AUTH_FAILED'
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Validate inputs
|
|
32
|
+
if (!postId) {
|
|
33
|
+
return {
|
|
34
|
+
Success: false,
|
|
35
|
+
Message: 'PostID is required',
|
|
36
|
+
ResultCode: 'MISSING_PARAMS'
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Build fields for comment data
|
|
41
|
+
const fields = 'id,text,username,timestamp,like_count,replies{id,text,username,timestamp,like_count}';
|
|
42
|
+
|
|
43
|
+
// Build query parameters
|
|
44
|
+
const queryParams: any = {
|
|
45
|
+
fields,
|
|
46
|
+
access_token: this.getAccessToken(),
|
|
47
|
+
limit: Math.min(limit, 100)
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
if (afterCursor) {
|
|
51
|
+
queryParams.after = afterCursor;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Get comments
|
|
55
|
+
const response = await this.makeInstagramRequest<{
|
|
56
|
+
data: any[];
|
|
57
|
+
paging?: {
|
|
58
|
+
cursors: {
|
|
59
|
+
before: string;
|
|
60
|
+
after: string;
|
|
61
|
+
};
|
|
62
|
+
next?: string;
|
|
63
|
+
};
|
|
64
|
+
}>(
|
|
65
|
+
`${postId}/comments`,
|
|
66
|
+
'GET',
|
|
67
|
+
null,
|
|
68
|
+
queryParams
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
const comments = response.data || [];
|
|
72
|
+
|
|
73
|
+
// Process comments
|
|
74
|
+
const processedComments = await this.processComments(comments, includeReplies);
|
|
75
|
+
|
|
76
|
+
// Get hidden comments if requested
|
|
77
|
+
let hiddenComments: any[] = [];
|
|
78
|
+
if (includeHidden) {
|
|
79
|
+
hiddenComments = await this.getHiddenComments(postId);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Calculate engagement metrics
|
|
83
|
+
const metrics = this.calculateCommentMetrics(processedComments);
|
|
84
|
+
|
|
85
|
+
// Analyze sentiment patterns
|
|
86
|
+
const sentimentAnalysis = this.analyzeSentiment(processedComments);
|
|
87
|
+
|
|
88
|
+
// Store result in output params
|
|
89
|
+
const outputParams = [...params.Params];
|
|
90
|
+
outputParams.push({
|
|
91
|
+
Name: 'ResultData',
|
|
92
|
+
Type: 'Output',
|
|
93
|
+
Value: JSON.stringify({
|
|
94
|
+
postId,
|
|
95
|
+
comments: processedComments,
|
|
96
|
+
hiddenComments,
|
|
97
|
+
metrics,
|
|
98
|
+
sentimentAnalysis,
|
|
99
|
+
paging: {
|
|
100
|
+
hasNext: !!response.paging?.next,
|
|
101
|
+
afterCursor: response.paging?.cursors?.after
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
Success: true,
|
|
108
|
+
Message: `Retrieved ${processedComments.length} comments`,
|
|
109
|
+
ResultCode: 'SUCCESS',
|
|
110
|
+
Params: outputParams
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
} catch (error: any) {
|
|
114
|
+
LogError('Failed to retrieve Instagram comments', error);
|
|
115
|
+
|
|
116
|
+
if (error.code === 'RATE_LIMIT') {
|
|
117
|
+
return {
|
|
118
|
+
Success: false,
|
|
119
|
+
Message: 'Instagram API rate limit exceeded. Please try again later.',
|
|
120
|
+
ResultCode: 'RATE_LIMIT'
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (error.code === 'POST_NOT_FOUND') {
|
|
125
|
+
return {
|
|
126
|
+
Success: false,
|
|
127
|
+
Message: 'Instagram post not found or access denied',
|
|
128
|
+
ResultCode: 'POST_NOT_FOUND'
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return {
|
|
133
|
+
Success: false,
|
|
134
|
+
Message: `Failed to retrieve comments: ${error.message}`,
|
|
135
|
+
ResultCode: 'ERROR'
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Process comments and fetch replies if needed
|
|
142
|
+
*/
|
|
143
|
+
private async processComments(comments: any[], includeReplies: boolean): Promise<any[]> {
|
|
144
|
+
const processed: any[] = [];
|
|
145
|
+
|
|
146
|
+
for (const comment of comments) {
|
|
147
|
+
const processedComment: any = {
|
|
148
|
+
id: comment.id,
|
|
149
|
+
text: comment.text,
|
|
150
|
+
username: comment.username,
|
|
151
|
+
timestamp: comment.timestamp,
|
|
152
|
+
likeCount: comment.like_count || 0,
|
|
153
|
+
replies: [],
|
|
154
|
+
metrics: {
|
|
155
|
+
wordCount: this.countWords(comment.text),
|
|
156
|
+
hasEmojis: this.containsEmojis(comment.text),
|
|
157
|
+
hasMentions: this.containsMentions(comment.text),
|
|
158
|
+
hasHashtags: this.containsHashtags(comment.text)
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// Process replies if they exist and are requested
|
|
163
|
+
if (includeReplies && comment.replies?.data) {
|
|
164
|
+
processedComment.replies = comment.replies.data.map((reply: any) => ({
|
|
165
|
+
id: reply.id,
|
|
166
|
+
text: reply.text,
|
|
167
|
+
username: reply.username,
|
|
168
|
+
timestamp: reply.timestamp,
|
|
169
|
+
likeCount: reply.like_count || 0,
|
|
170
|
+
metrics: {
|
|
171
|
+
wordCount: this.countWords(reply.text),
|
|
172
|
+
hasEmojis: this.containsEmojis(reply.text),
|
|
173
|
+
hasMentions: this.containsMentions(reply.text),
|
|
174
|
+
hasHashtags: this.containsHashtags(reply.text)
|
|
175
|
+
}
|
|
176
|
+
}));
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
processed.push(processedComment);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return processed;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Get hidden comments (comments hidden by the account)
|
|
187
|
+
*/
|
|
188
|
+
private async getHiddenComments(postId: string): Promise<any[]> {
|
|
189
|
+
try {
|
|
190
|
+
const response = await this.makeInstagramRequest<{ data: any[] }>(
|
|
191
|
+
`${postId}/comments`,
|
|
192
|
+
'GET',
|
|
193
|
+
null,
|
|
194
|
+
{
|
|
195
|
+
fields: 'id,text,username,timestamp,hidden',
|
|
196
|
+
access_token: this.getAccessToken(),
|
|
197
|
+
filter: 'hidden'
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
return response.data || [];
|
|
202
|
+
} catch (error) {
|
|
203
|
+
LogError('Failed to get hidden comments', error);
|
|
204
|
+
return [];
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Calculate comment metrics
|
|
210
|
+
*/
|
|
211
|
+
private calculateCommentMetrics(comments: any[]): any {
|
|
212
|
+
const metrics = {
|
|
213
|
+
totalComments: comments.length,
|
|
214
|
+
totalReplies: 0,
|
|
215
|
+
avgCommentLength: 0,
|
|
216
|
+
avgLikesPerComment: 0,
|
|
217
|
+
topCommenters: [] as any[],
|
|
218
|
+
engagementRate: 0,
|
|
219
|
+
responseRate: 0
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
if (comments.length === 0) return metrics;
|
|
223
|
+
|
|
224
|
+
let totalLength = 0;
|
|
225
|
+
let totalLikes = 0;
|
|
226
|
+
const commenterCounts: Record<string, number> = {};
|
|
227
|
+
|
|
228
|
+
comments.forEach(comment => {
|
|
229
|
+
totalLength += comment.metrics.wordCount;
|
|
230
|
+
totalLikes += comment.likeCount;
|
|
231
|
+
|
|
232
|
+
// Count commenters
|
|
233
|
+
commenterCounts[comment.username] = (commenterCounts[comment.username] || 0) + 1;
|
|
234
|
+
|
|
235
|
+
// Count replies
|
|
236
|
+
metrics.totalReplies += comment.replies.length;
|
|
237
|
+
|
|
238
|
+
// Add reply stats
|
|
239
|
+
comment.replies.forEach((reply: any) => {
|
|
240
|
+
totalLength += reply.metrics.wordCount;
|
|
241
|
+
totalLikes += reply.likeCount;
|
|
242
|
+
commenterCounts[reply.username] = (commenterCounts[reply.username] || 0) + 1;
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
const totalInteractions = comments.length + metrics.totalReplies;
|
|
247
|
+
metrics.avgCommentLength = Math.round(totalLength / totalInteractions);
|
|
248
|
+
metrics.avgLikesPerComment = Math.round(totalLikes / totalInteractions);
|
|
249
|
+
|
|
250
|
+
// Get top commenters
|
|
251
|
+
metrics.topCommenters = Object.entries(commenterCounts)
|
|
252
|
+
.sort(([, a], [, b]) => b - a)
|
|
253
|
+
.slice(0, 10)
|
|
254
|
+
.map(([username, count]) => ({ username, count }));
|
|
255
|
+
|
|
256
|
+
// Calculate response rate (comments with replies)
|
|
257
|
+
const commentsWithReplies = comments.filter(c => c.replies.length > 0).length;
|
|
258
|
+
metrics.responseRate = (commentsWithReplies / comments.length) * 100;
|
|
259
|
+
|
|
260
|
+
return metrics;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Analyze sentiment patterns in comments
|
|
265
|
+
*/
|
|
266
|
+
private analyzeSentiment(comments: any[]): any {
|
|
267
|
+
const analysis = {
|
|
268
|
+
positive: 0,
|
|
269
|
+
negative: 0,
|
|
270
|
+
neutral: 0,
|
|
271
|
+
questions: 0,
|
|
272
|
+
keywords: [] as any[],
|
|
273
|
+
emojis: [] as any[]
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
const keywordCounts: Record<string, number> = {};
|
|
277
|
+
const emojiCounts: Record<string, number> = {};
|
|
278
|
+
|
|
279
|
+
// Simple sentiment analysis based on keywords and patterns
|
|
280
|
+
const positiveWords = ['love', 'amazing', 'beautiful', 'great', 'awesome', 'perfect', 'excellent', 'wonderful', '❤️', '😍', '🔥', '💯'];
|
|
281
|
+
const negativeWords = ['hate', 'awful', 'terrible', 'bad', 'worst', 'ugly', 'disgusting', '😠', '😡', '👎'];
|
|
282
|
+
const questionWords = ['?', 'what', 'where', 'when', 'how', 'why', 'who'];
|
|
283
|
+
|
|
284
|
+
comments.forEach(comment => {
|
|
285
|
+
const text = comment.text.toLowerCase();
|
|
286
|
+
|
|
287
|
+
// Check sentiment
|
|
288
|
+
const hasPositive = positiveWords.some(word => text.includes(word));
|
|
289
|
+
const hasNegative = negativeWords.some(word => text.includes(word));
|
|
290
|
+
const hasQuestion = questionWords.some(word => text.includes(word));
|
|
291
|
+
|
|
292
|
+
if (hasQuestion) {
|
|
293
|
+
analysis.questions++;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (hasPositive && !hasNegative) {
|
|
297
|
+
analysis.positive++;
|
|
298
|
+
} else if (hasNegative && !hasPositive) {
|
|
299
|
+
analysis.negative++;
|
|
300
|
+
} else {
|
|
301
|
+
analysis.neutral++;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// Extract keywords (simple word frequency)
|
|
305
|
+
const words = text.split(/\s+/).filter(word => word.length > 3);
|
|
306
|
+
words.forEach(word => {
|
|
307
|
+
keywordCounts[word] = (keywordCounts[word] || 0) + 1;
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
// Extract emojis
|
|
311
|
+
const emojis = text.match(/[\u{1F300}-\u{1F9FF}]|[\u{2600}-\u{26FF}]/gu) || [];
|
|
312
|
+
emojis.forEach(emoji => {
|
|
313
|
+
emojiCounts[emoji] = (emojiCounts[emoji] || 0) + 1;
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
// Analyze replies too
|
|
317
|
+
comment.replies.forEach((reply: any) => {
|
|
318
|
+
// Similar analysis for replies...
|
|
319
|
+
});
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
// Get top keywords and emojis
|
|
323
|
+
analysis.keywords = Object.entries(keywordCounts)
|
|
324
|
+
.sort(([, a], [, b]) => b - a)
|
|
325
|
+
.slice(0, 20)
|
|
326
|
+
.map(([keyword, count]) => ({ keyword, count }));
|
|
327
|
+
|
|
328
|
+
analysis.emojis = Object.entries(emojiCounts)
|
|
329
|
+
.sort(([, a], [, b]) => b - a)
|
|
330
|
+
.slice(0, 10)
|
|
331
|
+
.map(([emoji, count]) => ({ emoji, count }));
|
|
332
|
+
|
|
333
|
+
return analysis;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Helper methods for text analysis
|
|
338
|
+
*/
|
|
339
|
+
private countWords(text: string): number {
|
|
340
|
+
return text.trim().split(/\s+/).length;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
private containsEmojis(text: string): boolean {
|
|
344
|
+
return /[\u{1F300}-\u{1F9FF}]|[\u{2600}-\u{26FF}]/u.test(text);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
private containsMentions(text: string): boolean {
|
|
348
|
+
return /@\w+/.test(text);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
private containsHashtags(text: string): boolean {
|
|
352
|
+
return /#\w+/.test(text);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Define the parameters for this action
|
|
357
|
+
*/
|
|
358
|
+
public get Params(): ActionParam[] {
|
|
359
|
+
return [
|
|
360
|
+
...this.commonSocialParams,
|
|
361
|
+
{
|
|
362
|
+
Name: 'PostID',
|
|
363
|
+
Type: 'Input',
|
|
364
|
+
Value: null
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
Name: 'IncludeReplies',
|
|
368
|
+
Type: 'Input',
|
|
369
|
+
Value: true
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
Name: 'IncludeHidden',
|
|
373
|
+
Type: 'Input',
|
|
374
|
+
Value: false
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
Name: 'Limit',
|
|
378
|
+
Type: 'Input',
|
|
379
|
+
Value: 50
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
Name: 'AfterCursor',
|
|
383
|
+
Type: 'Input',
|
|
384
|
+
Value: null
|
|
385
|
+
}
|
|
386
|
+
];
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Get the description for this action
|
|
391
|
+
*/
|
|
392
|
+
public get Description(): string {
|
|
393
|
+
return 'Retrieves comments for an Instagram post including replies, metrics, and sentiment analysis.';
|
|
394
|
+
}
|
|
395
|
+
}
|