@memberjunction/actions-bizapps-social 2.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +4 -0
- package/CHANGELOG.md +16 -0
- package/README.md +375 -0
- package/dist/base/base-social.action.d.ts +137 -0
- package/dist/base/base-social.action.d.ts.map +1 -0
- package/dist/base/base-social.action.js +176 -0
- package/dist/base/base-social.action.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/buffer/actions/create-post.action.d.ts +20 -0
- package/dist/providers/buffer/actions/create-post.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/create-post.action.js +195 -0
- package/dist/providers/buffer/actions/create-post.action.js.map +1 -0
- package/dist/providers/buffer/actions/delete-post.action.d.ts +20 -0
- package/dist/providers/buffer/actions/delete-post.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/delete-post.action.js +119 -0
- package/dist/providers/buffer/actions/delete-post.action.js.map +1 -0
- package/dist/providers/buffer/actions/get-analytics.action.d.ts +28 -0
- package/dist/providers/buffer/actions/get-analytics.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/get-analytics.action.js +143 -0
- package/dist/providers/buffer/actions/get-analytics.action.js.map +1 -0
- package/dist/providers/buffer/actions/get-pending-posts.action.d.ts +24 -0
- package/dist/providers/buffer/actions/get-pending-posts.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/get-pending-posts.action.js +161 -0
- package/dist/providers/buffer/actions/get-pending-posts.action.js.map +1 -0
- package/dist/providers/buffer/actions/get-profiles.action.d.ts +24 -0
- package/dist/providers/buffer/actions/get-profiles.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/get-profiles.action.js +128 -0
- package/dist/providers/buffer/actions/get-profiles.action.js.map +1 -0
- package/dist/providers/buffer/actions/get-sent-posts.action.d.ts +32 -0
- package/dist/providers/buffer/actions/get-sent-posts.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/get-sent-posts.action.js +187 -0
- package/dist/providers/buffer/actions/get-sent-posts.action.js.map +1 -0
- package/dist/providers/buffer/actions/index.d.ts +9 -0
- package/dist/providers/buffer/actions/index.d.ts.map +1 -0
- package/dist/providers/buffer/actions/index.js +25 -0
- package/dist/providers/buffer/actions/index.js.map +1 -0
- package/dist/providers/buffer/actions/reorder-queue.action.d.ts +20 -0
- package/dist/providers/buffer/actions/reorder-queue.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/reorder-queue.action.js +138 -0
- package/dist/providers/buffer/actions/reorder-queue.action.js.map +1 -0
- package/dist/providers/buffer/actions/search-posts.action.d.ts +28 -0
- package/dist/providers/buffer/actions/search-posts.action.d.ts.map +1 -0
- package/dist/providers/buffer/actions/search-posts.action.js +249 -0
- package/dist/providers/buffer/actions/search-posts.action.js.map +1 -0
- package/dist/providers/buffer/buffer-base.action.d.ts +95 -0
- package/dist/providers/buffer/buffer-base.action.d.ts.map +1 -0
- package/dist/providers/buffer/buffer-base.action.js +419 -0
- package/dist/providers/buffer/buffer-base.action.js.map +1 -0
- package/dist/providers/buffer/index.d.ts +3 -0
- package/dist/providers/buffer/index.d.ts.map +1 -0
- package/dist/providers/buffer/index.js +19 -0
- package/dist/providers/buffer/index.js.map +1 -0
- package/dist/providers/facebook/actions/boost-post.action.d.ts +45 -0
- package/dist/providers/facebook/actions/boost-post.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/boost-post.action.js +340 -0
- package/dist/providers/facebook/actions/boost-post.action.js.map +1 -0
- package/dist/providers/facebook/actions/create-album.action.d.ts +33 -0
- package/dist/providers/facebook/actions/create-album.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/create-album.action.js +285 -0
- package/dist/providers/facebook/actions/create-album.action.js.map +1 -0
- package/dist/providers/facebook/actions/create-post.action.d.ts +21 -0
- package/dist/providers/facebook/actions/create-post.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/create-post.action.js +223 -0
- package/dist/providers/facebook/actions/create-post.action.js.map +1 -0
- package/dist/providers/facebook/actions/get-page-insights.action.d.ts +37 -0
- package/dist/providers/facebook/actions/get-page-insights.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/get-page-insights.action.js +359 -0
- package/dist/providers/facebook/actions/get-page-insights.action.js.map +1 -0
- package/dist/providers/facebook/actions/get-page-posts.action.d.ts +29 -0
- package/dist/providers/facebook/actions/get-page-posts.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/get-page-posts.action.js +216 -0
- package/dist/providers/facebook/actions/get-page-posts.action.js.map +1 -0
- package/dist/providers/facebook/actions/get-post-insights.action.d.ts +33 -0
- package/dist/providers/facebook/actions/get-post-insights.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/get-post-insights.action.js +287 -0
- package/dist/providers/facebook/actions/get-post-insights.action.js.map +1 -0
- package/dist/providers/facebook/actions/index.d.ts +10 -0
- package/dist/providers/facebook/actions/index.d.ts.map +1 -0
- package/dist/providers/facebook/actions/index.js +26 -0
- package/dist/providers/facebook/actions/index.js.map +1 -0
- package/dist/providers/facebook/actions/respond-to-comments.action.d.ts +41 -0
- package/dist/providers/facebook/actions/respond-to-comments.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/respond-to-comments.action.js +328 -0
- package/dist/providers/facebook/actions/respond-to-comments.action.js.map +1 -0
- package/dist/providers/facebook/actions/schedule-post.action.d.ts +29 -0
- package/dist/providers/facebook/actions/schedule-post.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/schedule-post.action.js +289 -0
- package/dist/providers/facebook/actions/schedule-post.action.js.map +1 -0
- package/dist/providers/facebook/actions/search-posts.action.d.ts +54 -0
- package/dist/providers/facebook/actions/search-posts.action.d.ts.map +1 -0
- package/dist/providers/facebook/actions/search-posts.action.js +396 -0
- package/dist/providers/facebook/actions/search-posts.action.js.map +1 -0
- package/dist/providers/facebook/facebook-base.action.d.ts +230 -0
- package/dist/providers/facebook/facebook-base.action.d.ts.map +1 -0
- package/dist/providers/facebook/facebook-base.action.js +566 -0
- package/dist/providers/facebook/facebook-base.action.js.map +1 -0
- package/dist/providers/facebook/index.d.ts +3 -0
- package/dist/providers/facebook/index.d.ts.map +1 -0
- package/dist/providers/facebook/index.js +19 -0
- package/dist/providers/facebook/index.js.map +1 -0
- package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.d.ts +24 -0
- package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.js +266 -0
- package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/create-scheduled-post.action.d.ts +25 -0
- package/dist/providers/hootsuite/actions/create-scheduled-post.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/create-scheduled-post.action.js +202 -0
- package/dist/providers/hootsuite/actions/create-scheduled-post.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/delete-scheduled-post.action.d.ts +20 -0
- package/dist/providers/hootsuite/actions/delete-scheduled-post.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/delete-scheduled-post.action.js +172 -0
- package/dist/providers/hootsuite/actions/delete-scheduled-post.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/get-analytics.action.d.ts +52 -0
- package/dist/providers/hootsuite/actions/get-analytics.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/get-analytics.action.js +265 -0
- package/dist/providers/hootsuite/actions/get-analytics.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/get-scheduled-posts.action.d.ts +37 -0
- package/dist/providers/hootsuite/actions/get-scheduled-posts.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/get-scheduled-posts.action.js +208 -0
- package/dist/providers/hootsuite/actions/get-scheduled-posts.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/get-social-profiles.action.d.ts +36 -0
- package/dist/providers/hootsuite/actions/get-social-profiles.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/get-social-profiles.action.js +212 -0
- package/dist/providers/hootsuite/actions/get-social-profiles.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/search-posts.action.d.ts +53 -0
- package/dist/providers/hootsuite/actions/search-posts.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/search-posts.action.js +353 -0
- package/dist/providers/hootsuite/actions/search-posts.action.js.map +1 -0
- package/dist/providers/hootsuite/actions/update-scheduled-post.action.d.ts +20 -0
- package/dist/providers/hootsuite/actions/update-scheduled-post.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/actions/update-scheduled-post.action.js +217 -0
- package/dist/providers/hootsuite/actions/update-scheduled-post.action.js.map +1 -0
- package/dist/providers/hootsuite/hootsuite-base.action.d.ts +101 -0
- package/dist/providers/hootsuite/hootsuite-base.action.d.ts.map +1 -0
- package/dist/providers/hootsuite/hootsuite-base.action.js +274 -0
- package/dist/providers/hootsuite/hootsuite-base.action.js.map +1 -0
- package/dist/providers/hootsuite/index.d.ts +10 -0
- package/dist/providers/hootsuite/index.d.ts.map +1 -0
- package/dist/providers/hootsuite/index.js +28 -0
- package/dist/providers/hootsuite/index.js.map +1 -0
- package/dist/providers/instagram/actions/create-post.action.d.ts +30 -0
- package/dist/providers/instagram/actions/create-post.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/create-post.action.js +269 -0
- package/dist/providers/instagram/actions/create-post.action.js.map +1 -0
- package/dist/providers/instagram/actions/create-story.action.d.ts +43 -0
- package/dist/providers/instagram/actions/create-story.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/create-story.action.js +365 -0
- package/dist/providers/instagram/actions/create-story.action.js.map +1 -0
- package/dist/providers/instagram/actions/get-account-insights.action.d.ts +50 -0
- package/dist/providers/instagram/actions/get-account-insights.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/get-account-insights.action.js +390 -0
- package/dist/providers/instagram/actions/get-account-insights.action.js.map +1 -0
- package/dist/providers/instagram/actions/get-business-posts.action.d.ts +30 -0
- package/dist/providers/instagram/actions/get-business-posts.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/get-business-posts.action.js +246 -0
- package/dist/providers/instagram/actions/get-business-posts.action.js.map +1 -0
- package/dist/providers/instagram/actions/get-comments.action.d.ts +41 -0
- package/dist/providers/instagram/actions/get-comments.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/get-comments.action.js +337 -0
- package/dist/providers/instagram/actions/get-comments.action.js.map +1 -0
- package/dist/providers/instagram/actions/get-post-insights.action.d.ts +42 -0
- package/dist/providers/instagram/actions/get-post-insights.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/get-post-insights.action.js +271 -0
- package/dist/providers/instagram/actions/get-post-insights.action.js.map +1 -0
- package/dist/providers/instagram/actions/index.d.ts +9 -0
- package/dist/providers/instagram/actions/index.d.ts.map +1 -0
- package/dist/providers/instagram/actions/index.js +26 -0
- package/dist/providers/instagram/actions/index.js.map +1 -0
- package/dist/providers/instagram/actions/schedule-post.action.d.ts +34 -0
- package/dist/providers/instagram/actions/schedule-post.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/schedule-post.action.js +234 -0
- package/dist/providers/instagram/actions/schedule-post.action.js.map +1 -0
- package/dist/providers/instagram/actions/search-posts.action.d.ts +56 -0
- package/dist/providers/instagram/actions/search-posts.action.d.ts.map +1 -0
- package/dist/providers/instagram/actions/search-posts.action.js +479 -0
- package/dist/providers/instagram/actions/search-posts.action.js.map +1 -0
- package/dist/providers/instagram/index.d.ts +3 -0
- package/dist/providers/instagram/index.d.ts.map +1 -0
- package/dist/providers/instagram/index.js +20 -0
- package/dist/providers/instagram/index.js.map +1 -0
- package/dist/providers/instagram/instagram-base.action.d.ts +76 -0
- package/dist/providers/instagram/instagram-base.action.d.ts.map +1 -0
- package/dist/providers/instagram/instagram-base.action.js +362 -0
- package/dist/providers/instagram/instagram-base.action.js.map +1 -0
- package/dist/providers/linkedin/actions/create-article.action.d.ts +28 -0
- package/dist/providers/linkedin/actions/create-article.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/create-article.action.js +275 -0
- package/dist/providers/linkedin/actions/create-article.action.js.map +1 -0
- package/dist/providers/linkedin/actions/create-post.action.d.ts +20 -0
- package/dist/providers/linkedin/actions/create-post.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/create-post.action.js +188 -0
- package/dist/providers/linkedin/actions/create-post.action.js.map +1 -0
- package/dist/providers/linkedin/actions/get-followers.action.d.ts +29 -0
- package/dist/providers/linkedin/actions/get-followers.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/get-followers.action.js +222 -0
- package/dist/providers/linkedin/actions/get-followers.action.js.map +1 -0
- package/dist/providers/linkedin/actions/get-organization-posts.action.d.ts +24 -0
- package/dist/providers/linkedin/actions/get-organization-posts.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/get-organization-posts.action.js +163 -0
- package/dist/providers/linkedin/actions/get-organization-posts.action.js.map +1 -0
- package/dist/providers/linkedin/actions/get-personal-posts.action.d.ts +25 -0
- package/dist/providers/linkedin/actions/get-personal-posts.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/get-personal-posts.action.js +156 -0
- package/dist/providers/linkedin/actions/get-personal-posts.action.js.map +1 -0
- package/dist/providers/linkedin/actions/get-post-analytics.action.d.ts +28 -0
- package/dist/providers/linkedin/actions/get-post-analytics.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/get-post-analytics.action.js +200 -0
- package/dist/providers/linkedin/actions/get-post-analytics.action.js.map +1 -0
- package/dist/providers/linkedin/actions/index.d.ts +9 -0
- package/dist/providers/linkedin/actions/index.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/index.js +25 -0
- package/dist/providers/linkedin/actions/index.js.map +1 -0
- package/dist/providers/linkedin/actions/schedule-post.action.d.ts +22 -0
- package/dist/providers/linkedin/actions/schedule-post.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/schedule-post.action.js +205 -0
- package/dist/providers/linkedin/actions/schedule-post.action.js.map +1 -0
- package/dist/providers/linkedin/actions/search-posts.action.d.ts +41 -0
- package/dist/providers/linkedin/actions/search-posts.action.d.ts.map +1 -0
- package/dist/providers/linkedin/actions/search-posts.action.js +292 -0
- package/dist/providers/linkedin/actions/search-posts.action.js.map +1 -0
- package/dist/providers/linkedin/index.d.ts +3 -0
- package/dist/providers/linkedin/index.d.ts.map +1 -0
- package/dist/providers/linkedin/index.js +19 -0
- package/dist/providers/linkedin/index.js.map +1 -0
- package/dist/providers/linkedin/linkedin-base.action.d.ts +166 -0
- package/dist/providers/linkedin/linkedin-base.action.d.ts.map +1 -0
- package/dist/providers/linkedin/linkedin-base.action.js +346 -0
- package/dist/providers/linkedin/linkedin-base.action.js.map +1 -0
- package/dist/providers/tiktok/actions/create-video-post.action.d.ts +21 -0
- package/dist/providers/tiktok/actions/create-video-post.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/create-video-post.action.js +226 -0
- package/dist/providers/tiktok/actions/create-video-post.action.js.map +1 -0
- package/dist/providers/tiktok/actions/get-account-analytics.action.d.ts +32 -0
- package/dist/providers/tiktok/actions/get-account-analytics.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/get-account-analytics.action.js +242 -0
- package/dist/providers/tiktok/actions/get-account-analytics.action.js.map +1 -0
- package/dist/providers/tiktok/actions/get-comments.action.d.ts +44 -0
- package/dist/providers/tiktok/actions/get-comments.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/get-comments.action.js +290 -0
- package/dist/providers/tiktok/actions/get-comments.action.js.map +1 -0
- package/dist/providers/tiktok/actions/get-trending-hashtags.action.d.ts +48 -0
- package/dist/providers/tiktok/actions/get-trending-hashtags.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/get-trending-hashtags.action.js +309 -0
- package/dist/providers/tiktok/actions/get-trending-hashtags.action.js.map +1 -0
- package/dist/providers/tiktok/actions/get-user-videos.action.d.ts +20 -0
- package/dist/providers/tiktok/actions/get-user-videos.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/get-user-videos.action.js +131 -0
- package/dist/providers/tiktok/actions/get-user-videos.action.js.map +1 -0
- package/dist/providers/tiktok/actions/get-video-analytics.action.d.ts +28 -0
- package/dist/providers/tiktok/actions/get-video-analytics.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/get-video-analytics.action.js +198 -0
- package/dist/providers/tiktok/actions/get-video-analytics.action.js.map +1 -0
- package/dist/providers/tiktok/actions/index.d.ts +8 -0
- package/dist/providers/tiktok/actions/index.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/index.js +25 -0
- package/dist/providers/tiktok/actions/index.js.map +1 -0
- package/dist/providers/tiktok/actions/search-videos.action.d.ts +89 -0
- package/dist/providers/tiktok/actions/search-videos.action.d.ts.map +1 -0
- package/dist/providers/tiktok/actions/search-videos.action.js +653 -0
- package/dist/providers/tiktok/actions/search-videos.action.js.map +1 -0
- package/dist/providers/tiktok/index.d.ts +3 -0
- package/dist/providers/tiktok/index.d.ts.map +1 -0
- package/dist/providers/tiktok/index.js +20 -0
- package/dist/providers/tiktok/index.js.map +1 -0
- package/dist/providers/tiktok/tiktok-base.action.d.ts +87 -0
- package/dist/providers/tiktok/tiktok-base.action.d.ts.map +1 -0
- package/dist/providers/tiktok/tiktok-base.action.js +294 -0
- package/dist/providers/tiktok/tiktok-base.action.js.map +1 -0
- package/dist/providers/twitter/actions/create-thread.action.d.ts +28 -0
- package/dist/providers/twitter/actions/create-thread.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/create-thread.action.js +217 -0
- package/dist/providers/twitter/actions/create-thread.action.js.map +1 -0
- package/dist/providers/twitter/actions/create-tweet.action.d.ts +24 -0
- package/dist/providers/twitter/actions/create-tweet.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/create-tweet.action.js +199 -0
- package/dist/providers/twitter/actions/create-tweet.action.js.map +1 -0
- package/dist/providers/twitter/actions/delete-tweet.action.d.ts +24 -0
- package/dist/providers/twitter/actions/delete-tweet.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/delete-tweet.action.js +158 -0
- package/dist/providers/twitter/actions/delete-tweet.action.js.map +1 -0
- package/dist/providers/twitter/actions/get-analytics.action.d.ts +44 -0
- package/dist/providers/twitter/actions/get-analytics.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/get-analytics.action.js +399 -0
- package/dist/providers/twitter/actions/get-analytics.action.js.map +1 -0
- package/dist/providers/twitter/actions/get-mentions.action.d.ts +24 -0
- package/dist/providers/twitter/actions/get-mentions.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/get-mentions.action.js +229 -0
- package/dist/providers/twitter/actions/get-mentions.action.js.map +1 -0
- package/dist/providers/twitter/actions/get-timeline.action.d.ts +24 -0
- package/dist/providers/twitter/actions/get-timeline.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/get-timeline.action.js +249 -0
- package/dist/providers/twitter/actions/get-timeline.action.js.map +1 -0
- package/dist/providers/twitter/actions/index.d.ts +14 -0
- package/dist/providers/twitter/actions/index.d.ts.map +1 -0
- package/dist/providers/twitter/actions/index.js +30 -0
- package/dist/providers/twitter/actions/index.js.map +1 -0
- package/dist/providers/twitter/actions/schedule-tweet.action.d.ts +30 -0
- package/dist/providers/twitter/actions/schedule-tweet.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/schedule-tweet.action.js +250 -0
- package/dist/providers/twitter/actions/schedule-tweet.action.js.map +1 -0
- package/dist/providers/twitter/actions/search-tweets.action.d.ts +41 -0
- package/dist/providers/twitter/actions/search-tweets.action.d.ts.map +1 -0
- package/dist/providers/twitter/actions/search-tweets.action.js +559 -0
- package/dist/providers/twitter/actions/search-tweets.action.js.map +1 -0
- package/dist/providers/twitter/index.d.ts +8 -0
- package/dist/providers/twitter/index.d.ts.map +1 -0
- package/dist/providers/twitter/index.js +24 -0
- package/dist/providers/twitter/index.js.map +1 -0
- package/dist/providers/twitter/twitter-base.action.d.ts +185 -0
- package/dist/providers/twitter/twitter-base.action.d.ts.map +1 -0
- package/dist/providers/twitter/twitter-base.action.js +484 -0
- package/dist/providers/twitter/twitter-base.action.js.map +1 -0
- package/dist/providers/youtube/actions/create-playlist.action.d.ts +28 -0
- package/dist/providers/youtube/actions/create-playlist.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/create-playlist.action.js +235 -0
- package/dist/providers/youtube/actions/create-playlist.action.js.map +1 -0
- package/dist/providers/youtube/actions/get-channel-analytics.action.d.ts +60 -0
- package/dist/providers/youtube/actions/get-channel-analytics.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/get-channel-analytics.action.js +429 -0
- package/dist/providers/youtube/actions/get-channel-analytics.action.js.map +1 -0
- package/dist/providers/youtube/actions/get-channel-videos.action.d.ts +28 -0
- package/dist/providers/youtube/actions/get-channel-videos.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/get-channel-videos.action.js +263 -0
- package/dist/providers/youtube/actions/get-channel-videos.action.js.map +1 -0
- package/dist/providers/youtube/actions/get-comments.action.d.ts +40 -0
- package/dist/providers/youtube/actions/get-comments.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/get-comments.action.js +381 -0
- package/dist/providers/youtube/actions/get-comments.action.js.map +1 -0
- package/dist/providers/youtube/actions/get-video-analytics.action.d.ts +48 -0
- package/dist/providers/youtube/actions/get-video-analytics.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/get-video-analytics.action.js +280 -0
- package/dist/providers/youtube/actions/get-video-analytics.action.js.map +1 -0
- package/dist/providers/youtube/actions/index.d.ts +10 -0
- package/dist/providers/youtube/actions/index.d.ts.map +1 -0
- package/dist/providers/youtube/actions/index.js +26 -0
- package/dist/providers/youtube/actions/index.js.map +1 -0
- package/dist/providers/youtube/actions/schedule-video.action.d.ts +24 -0
- package/dist/providers/youtube/actions/schedule-video.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/schedule-video.action.js +225 -0
- package/dist/providers/youtube/actions/schedule-video.action.js.map +1 -0
- package/dist/providers/youtube/actions/search-videos.action.d.ts +40 -0
- package/dist/providers/youtube/actions/search-videos.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/search-videos.action.js +483 -0
- package/dist/providers/youtube/actions/search-videos.action.js.map +1 -0
- package/dist/providers/youtube/actions/update-video-metadata.action.d.ts +32 -0
- package/dist/providers/youtube/actions/update-video-metadata.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/update-video-metadata.action.js +298 -0
- package/dist/providers/youtube/actions/update-video-metadata.action.js.map +1 -0
- package/dist/providers/youtube/actions/upload-video.action.d.ts +28 -0
- package/dist/providers/youtube/actions/upload-video.action.d.ts.map +1 -0
- package/dist/providers/youtube/actions/upload-video.action.js +266 -0
- package/dist/providers/youtube/actions/upload-video.action.js.map +1 -0
- package/dist/providers/youtube/index.d.ts +3 -0
- package/dist/providers/youtube/index.d.ts.map +1 -0
- package/dist/providers/youtube/index.js +19 -0
- package/dist/providers/youtube/index.js.map +1 -0
- package/dist/providers/youtube/youtube-base.action.d.ts +83 -0
- package/dist/providers/youtube/youtube-base.action.d.ts.map +1 -0
- package/dist/providers/youtube/youtube-base.action.js +319 -0
- package/dist/providers/youtube/youtube-base.action.js.map +1 -0
- package/package.json +42 -0
- package/social_actions_summary.md +439 -0
- package/src/base/base-social.action.ts +270 -0
- package/src/index.ts +26 -0
- package/src/providers/buffer/actions/create-post.action.ts +205 -0
- package/src/providers/buffer/actions/delete-post.action.ts +116 -0
- package/src/providers/buffer/actions/get-analytics.action.ts +146 -0
- package/src/providers/buffer/actions/get-pending-posts.action.ts +161 -0
- package/src/providers/buffer/actions/get-profiles.action.ts +126 -0
- package/src/providers/buffer/actions/get-sent-posts.action.ts +189 -0
- package/src/providers/buffer/actions/index.ts +8 -0
- package/src/providers/buffer/actions/reorder-queue.action.ts +141 -0
- package/src/providers/buffer/actions/search-posts.action.ts +262 -0
- package/src/providers/buffer/buffer-base.action.ts +490 -0
- package/src/providers/buffer/index.ts +2 -0
- package/src/providers/facebook/actions/boost-post.action.ts +412 -0
- package/src/providers/facebook/actions/create-album.action.ts +335 -0
- package/src/providers/facebook/actions/create-post.action.ts +243 -0
- package/src/providers/facebook/actions/get-page-insights.action.ts +427 -0
- package/src/providers/facebook/actions/get-page-posts.action.ts +241 -0
- package/src/providers/facebook/actions/get-post-insights.action.ts +338 -0
- package/src/providers/facebook/actions/index.ts +9 -0
- package/src/providers/facebook/actions/respond-to-comments.action.ts +372 -0
- package/src/providers/facebook/actions/schedule-post.action.ts +310 -0
- package/src/providers/facebook/actions/search-posts.action.ts +449 -0
- package/src/providers/facebook/facebook-base.action.ts +750 -0
- package/src/providers/facebook/index.ts +2 -0
- package/src/providers/hootsuite/actions/bulk-schedule-posts.action.ts +293 -0
- package/src/providers/hootsuite/actions/create-scheduled-post.action.ts +206 -0
- package/src/providers/hootsuite/actions/delete-scheduled-post.action.ts +173 -0
- package/src/providers/hootsuite/actions/get-analytics.action.ts +281 -0
- package/src/providers/hootsuite/actions/get-scheduled-posts.action.ts +220 -0
- package/src/providers/hootsuite/actions/get-social-profiles.action.ts +220 -0
- package/src/providers/hootsuite/actions/search-posts.action.ts +395 -0
- package/src/providers/hootsuite/actions/update-scheduled-post.action.ts +222 -0
- package/src/providers/hootsuite/hootsuite-base.action.ts +346 -0
- package/src/providers/hootsuite/index.ts +12 -0
- package/src/providers/instagram/README.md +129 -0
- package/src/providers/instagram/actions/create-post.action.ts +329 -0
- package/src/providers/instagram/actions/create-story.action.ts +415 -0
- package/src/providers/instagram/actions/get-account-insights.action.ts +449 -0
- package/src/providers/instagram/actions/get-business-posts.action.ts +281 -0
- package/src/providers/instagram/actions/get-comments.action.ts +395 -0
- package/src/providers/instagram/actions/get-post-insights.action.ts +302 -0
- package/src/providers/instagram/actions/index.ts +9 -0
- package/src/providers/instagram/actions/schedule-post.action.ts +248 -0
- package/src/providers/instagram/actions/search-posts.action.ts +569 -0
- package/src/providers/instagram/index.ts +3 -0
- package/src/providers/instagram/instagram-base.action.ts +430 -0
- package/src/providers/linkedin/actions/create-article.action.ts +301 -0
- package/src/providers/linkedin/actions/create-post.action.ts +190 -0
- package/src/providers/linkedin/actions/get-followers.action.ts +226 -0
- package/src/providers/linkedin/actions/get-organization-posts.action.ts +164 -0
- package/src/providers/linkedin/actions/get-personal-posts.action.ts +158 -0
- package/src/providers/linkedin/actions/get-post-analytics.action.ts +205 -0
- package/src/providers/linkedin/actions/index.ts +8 -0
- package/src/providers/linkedin/actions/schedule-post.action.ts +206 -0
- package/src/providers/linkedin/actions/search-posts.action.ts +323 -0
- package/src/providers/linkedin/index.ts +2 -0
- package/src/providers/linkedin/linkedin-base.action.ts +481 -0
- package/src/providers/tiktok/actions/create-video-post.action.ts +234 -0
- package/src/providers/tiktok/actions/get-account-analytics.action.ts +255 -0
- package/src/providers/tiktok/actions/get-comments.action.ts +332 -0
- package/src/providers/tiktok/actions/get-trending-hashtags.action.ts +341 -0
- package/src/providers/tiktok/actions/get-user-videos.action.ts +136 -0
- package/src/providers/tiktok/actions/get-video-analytics.action.ts +218 -0
- package/src/providers/tiktok/actions/index.ts +8 -0
- package/src/providers/tiktok/actions/search-videos.action.ts +717 -0
- package/src/providers/tiktok/index.ts +3 -0
- package/src/providers/tiktok/tiktok-base.action.ts +356 -0
- package/src/providers/twitter/README.md +207 -0
- package/src/providers/twitter/actions/create-thread.action.ts +227 -0
- package/src/providers/twitter/actions/create-tweet.action.ts +204 -0
- package/src/providers/twitter/actions/delete-tweet.action.ts +153 -0
- package/src/providers/twitter/actions/get-analytics.action.ts +440 -0
- package/src/providers/twitter/actions/get-mentions.action.ts +233 -0
- package/src/providers/twitter/actions/get-timeline.action.ts +248 -0
- package/src/providers/twitter/actions/index.ts +14 -0
- package/src/providers/twitter/actions/schedule-tweet.action.ts +259 -0
- package/src/providers/twitter/actions/search-tweets.action.ts +588 -0
- package/src/providers/twitter/index.ts +8 -0
- package/src/providers/twitter/twitter-base.action.ts +629 -0
- package/src/providers/youtube/actions/create-playlist.action.ts +256 -0
- package/src/providers/youtube/actions/get-channel-analytics.action.ts +502 -0
- package/src/providers/youtube/actions/get-channel-videos.action.ts +286 -0
- package/src/providers/youtube/actions/get-comments.action.ts +411 -0
- package/src/providers/youtube/actions/get-video-analytics.action.ts +298 -0
- package/src/providers/youtube/actions/index.ts +9 -0
- package/src/providers/youtube/actions/schedule-video.action.ts +246 -0
- package/src/providers/youtube/actions/search-videos.action.ts +530 -0
- package/src/providers/youtube/actions/update-video-metadata.action.ts +321 -0
- package/src/providers/youtube/actions/upload-video.action.ts +288 -0
- package/src/providers/youtube/index.ts +2 -0
- package/src/providers/youtube/youtube-base.action.ts +373 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { InstagramBaseAction } from '../instagram-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { LogError } from '@memberjunction/core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves account-level insights for an Instagram Business account.
|
|
8
|
+
* Includes follower demographics, reach, impressions, and profile activity.
|
|
9
|
+
*/
|
|
10
|
+
@RegisterClass(InstagramBaseAction, 'Instagram - Get Account Insights')
|
|
11
|
+
export class InstagramGetAccountInsightsAction extends InstagramBaseAction {
|
|
12
|
+
|
|
13
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
14
|
+
try {
|
|
15
|
+
const companyIntegrationId = this.getParamValue(params.Params, 'CompanyIntegrationID');
|
|
16
|
+
const period = this.getParamValue(params.Params, 'Period') || 'day';
|
|
17
|
+
const startDate = this.getParamValue(params.Params, 'StartDate');
|
|
18
|
+
const endDate = this.getParamValue(params.Params, 'EndDate');
|
|
19
|
+
const includeDemographics = this.getParamValue(params.Params, 'IncludeDemographics') !== false;
|
|
20
|
+
|
|
21
|
+
// Initialize OAuth
|
|
22
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
23
|
+
return {
|
|
24
|
+
Success: false,
|
|
25
|
+
Message: 'Failed to initialize Instagram authentication',
|
|
26
|
+
ResultCode: 'AUTH_FAILED'
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Define metrics based on period
|
|
31
|
+
const metrics = this.getAccountMetrics(period);
|
|
32
|
+
|
|
33
|
+
// Get account insights
|
|
34
|
+
const insights = await this.getInsights(
|
|
35
|
+
this.instagramBusinessAccountId,
|
|
36
|
+
metrics,
|
|
37
|
+
period as any
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
// Parse insights data
|
|
41
|
+
const parsedInsights = this.parseAccountInsights(insights);
|
|
42
|
+
|
|
43
|
+
// Get account info
|
|
44
|
+
const accountInfo = await this.getAccountInfo();
|
|
45
|
+
|
|
46
|
+
// Get demographics if requested
|
|
47
|
+
let demographics = null;
|
|
48
|
+
if (includeDemographics) {
|
|
49
|
+
demographics = await this.getAccountDemographics();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Get content performance summary
|
|
53
|
+
const contentSummary = await this.getContentPerformanceSummary(startDate, endDate);
|
|
54
|
+
|
|
55
|
+
// Calculate growth metrics
|
|
56
|
+
const growthMetrics = this.calculateGrowthMetrics(parsedInsights, accountInfo);
|
|
57
|
+
|
|
58
|
+
// Store result in output params
|
|
59
|
+
const outputParams = [...params.Params];
|
|
60
|
+
outputParams.push({
|
|
61
|
+
Name: 'ResultData',
|
|
62
|
+
Type: 'Output',
|
|
63
|
+
Value: JSON.stringify({
|
|
64
|
+
account: {
|
|
65
|
+
id: this.instagramBusinessAccountId,
|
|
66
|
+
username: accountInfo.username,
|
|
67
|
+
name: accountInfo.name,
|
|
68
|
+
biography: accountInfo.biography,
|
|
69
|
+
followersCount: accountInfo.followers_count,
|
|
70
|
+
followsCount: accountInfo.follows_count,
|
|
71
|
+
mediaCount: accountInfo.media_count,
|
|
72
|
+
profilePictureUrl: accountInfo.profile_picture_url,
|
|
73
|
+
websiteUrl: accountInfo.website
|
|
74
|
+
},
|
|
75
|
+
insights: parsedInsights,
|
|
76
|
+
demographics,
|
|
77
|
+
growth: growthMetrics,
|
|
78
|
+
contentPerformance: contentSummary,
|
|
79
|
+
period,
|
|
80
|
+
dataCollectedAt: new Date().toISOString()
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
Success: true,
|
|
86
|
+
Message: 'Successfully retrieved Instagram account insights',
|
|
87
|
+
ResultCode: 'SUCCESS',
|
|
88
|
+
Params: outputParams
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
} catch (error: any) {
|
|
92
|
+
LogError('Failed to retrieve Instagram account insights', error);
|
|
93
|
+
|
|
94
|
+
if (error.code === 'RATE_LIMIT') {
|
|
95
|
+
return {
|
|
96
|
+
Success: false,
|
|
97
|
+
Message: 'Instagram API rate limit exceeded. Please try again later.',
|
|
98
|
+
ResultCode: 'RATE_LIMIT'
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (error.code === 'INSUFFICIENT_PERMISSIONS') {
|
|
103
|
+
return {
|
|
104
|
+
Success: false,
|
|
105
|
+
Message: 'Insufficient permissions to access Instagram account insights',
|
|
106
|
+
ResultCode: 'INSUFFICIENT_PERMISSIONS'
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
Success: false,
|
|
112
|
+
Message: `Failed to retrieve account insights: ${error.message}`,
|
|
113
|
+
ResultCode: 'ERROR'
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Get appropriate metrics based on period
|
|
120
|
+
*/
|
|
121
|
+
private getAccountMetrics(period: string): string[] {
|
|
122
|
+
const baseMetrics = [
|
|
123
|
+
'impressions',
|
|
124
|
+
'reach',
|
|
125
|
+
'profile_views',
|
|
126
|
+
'website_clicks'
|
|
127
|
+
];
|
|
128
|
+
|
|
129
|
+
if (period === 'day') {
|
|
130
|
+
return [
|
|
131
|
+
...baseMetrics,
|
|
132
|
+
'follower_count',
|
|
133
|
+
'email_contacts',
|
|
134
|
+
'phone_call_clicks',
|
|
135
|
+
'text_message_clicks',
|
|
136
|
+
'get_directions_clicks'
|
|
137
|
+
];
|
|
138
|
+
} else if (period === 'week' || period === 'days_28') {
|
|
139
|
+
return [
|
|
140
|
+
...baseMetrics,
|
|
141
|
+
'accounts_engaged'
|
|
142
|
+
];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return baseMetrics;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Get account information
|
|
150
|
+
*/
|
|
151
|
+
private async getAccountInfo(): Promise<any> {
|
|
152
|
+
const response = await this.makeInstagramRequest(
|
|
153
|
+
this.instagramBusinessAccountId,
|
|
154
|
+
'GET',
|
|
155
|
+
null,
|
|
156
|
+
{
|
|
157
|
+
fields: 'username,name,biography,followers_count,follows_count,media_count,profile_picture_url,website',
|
|
158
|
+
access_token: this.getAccessToken()
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
return response;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Get account demographics
|
|
167
|
+
*/
|
|
168
|
+
private async getAccountDemographics(): Promise<any> {
|
|
169
|
+
try {
|
|
170
|
+
// Get follower demographics
|
|
171
|
+
const demographicMetrics = [
|
|
172
|
+
'audience_city',
|
|
173
|
+
'audience_country',
|
|
174
|
+
'audience_gender_age',
|
|
175
|
+
'audience_locale',
|
|
176
|
+
'online_followers'
|
|
177
|
+
];
|
|
178
|
+
|
|
179
|
+
const demographics = await this.getInsights(
|
|
180
|
+
this.instagramBusinessAccountId,
|
|
181
|
+
demographicMetrics,
|
|
182
|
+
'lifetime'
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
// Parse demographic data
|
|
186
|
+
const parsed: any = {
|
|
187
|
+
locations: {
|
|
188
|
+
cities: {},
|
|
189
|
+
countries: {}
|
|
190
|
+
},
|
|
191
|
+
genderAge: {},
|
|
192
|
+
languages: {},
|
|
193
|
+
onlineHours: {}
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
demographics.forEach((metric: any) => {
|
|
197
|
+
const value = metric.values?.[0]?.value;
|
|
198
|
+
|
|
199
|
+
switch (metric.name) {
|
|
200
|
+
case 'audience_city':
|
|
201
|
+
parsed.locations.cities = value || {};
|
|
202
|
+
break;
|
|
203
|
+
case 'audience_country':
|
|
204
|
+
parsed.locations.countries = value || {};
|
|
205
|
+
break;
|
|
206
|
+
case 'audience_gender_age':
|
|
207
|
+
parsed.genderAge = this.parseGenderAge(value || {});
|
|
208
|
+
break;
|
|
209
|
+
case 'audience_locale':
|
|
210
|
+
parsed.languages = value || {};
|
|
211
|
+
break;
|
|
212
|
+
case 'online_followers':
|
|
213
|
+
parsed.onlineHours = this.parseOnlineHours(value || {});
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
return parsed;
|
|
219
|
+
} catch (error) {
|
|
220
|
+
LogError('Failed to get demographics', error);
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Parse gender/age demographics
|
|
227
|
+
*/
|
|
228
|
+
private parseGenderAge(data: any): any {
|
|
229
|
+
const parsed: any = {
|
|
230
|
+
male: {},
|
|
231
|
+
female: {},
|
|
232
|
+
unknown: {}
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
Object.keys(data).forEach(key => {
|
|
236
|
+
const [gender, ageRange] = key.split('.');
|
|
237
|
+
if (parsed[gender]) {
|
|
238
|
+
parsed[gender][ageRange] = data[key];
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
return parsed;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Parse online hours data
|
|
247
|
+
*/
|
|
248
|
+
private parseOnlineHours(data: any): any {
|
|
249
|
+
const parsed: any = {};
|
|
250
|
+
|
|
251
|
+
Object.keys(data).forEach(hour => {
|
|
252
|
+
parsed[hour] = {
|
|
253
|
+
count: data[hour],
|
|
254
|
+
hour: parseInt(hour),
|
|
255
|
+
label: `${hour}:00`
|
|
256
|
+
};
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
return parsed;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Get content performance summary
|
|
264
|
+
*/
|
|
265
|
+
private async getContentPerformanceSummary(startDate?: string, endDate?: string): Promise<any> {
|
|
266
|
+
try {
|
|
267
|
+
// Get recent posts
|
|
268
|
+
const queryParams: any = {
|
|
269
|
+
fields: 'id,media_type,like_count,comments_count,timestamp',
|
|
270
|
+
access_token: this.getAccessToken(),
|
|
271
|
+
limit: 50
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
if (startDate) {
|
|
275
|
+
queryParams.since = Math.floor(new Date(startDate).getTime() / 1000);
|
|
276
|
+
}
|
|
277
|
+
if (endDate) {
|
|
278
|
+
queryParams.until = Math.floor(new Date(endDate).getTime() / 1000);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const response = await this.makeInstagramRequest<{ data: any[] }>(
|
|
282
|
+
`${this.instagramBusinessAccountId}/media`,
|
|
283
|
+
'GET',
|
|
284
|
+
null,
|
|
285
|
+
queryParams
|
|
286
|
+
);
|
|
287
|
+
|
|
288
|
+
const posts = response.data || [];
|
|
289
|
+
|
|
290
|
+
// Calculate performance metrics
|
|
291
|
+
const summary = {
|
|
292
|
+
totalPosts: posts.length,
|
|
293
|
+
avgLikes: 0,
|
|
294
|
+
avgComments: 0,
|
|
295
|
+
totalEngagements: 0,
|
|
296
|
+
topPerformingPost: null as any,
|
|
297
|
+
mediaTypeBreakdown: {
|
|
298
|
+
IMAGE: 0,
|
|
299
|
+
VIDEO: 0,
|
|
300
|
+
CAROUSEL_ALBUM: 0,
|
|
301
|
+
REELS: 0
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
if (posts.length > 0) {
|
|
306
|
+
let totalLikes = 0;
|
|
307
|
+
let totalComments = 0;
|
|
308
|
+
let topPost = posts[0];
|
|
309
|
+
|
|
310
|
+
posts.forEach(post => {
|
|
311
|
+
totalLikes += post.like_count || 0;
|
|
312
|
+
totalComments += post.comments_count || 0;
|
|
313
|
+
|
|
314
|
+
// Track media types
|
|
315
|
+
if (summary.mediaTypeBreakdown[post.media_type] !== undefined) {
|
|
316
|
+
summary.mediaTypeBreakdown[post.media_type]++;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// Find top performing post
|
|
320
|
+
const engagement = (post.like_count || 0) + (post.comments_count || 0);
|
|
321
|
+
const topEngagement = (topPost.like_count || 0) + (topPost.comments_count || 0);
|
|
322
|
+
if (engagement > topEngagement) {
|
|
323
|
+
topPost = post;
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
summary.avgLikes = Math.round(totalLikes / posts.length);
|
|
328
|
+
summary.avgComments = Math.round(totalComments / posts.length);
|
|
329
|
+
summary.totalEngagements = totalLikes + totalComments;
|
|
330
|
+
summary.topPerformingPost = {
|
|
331
|
+
id: topPost.id,
|
|
332
|
+
likes: topPost.like_count,
|
|
333
|
+
comments: topPost.comments_count,
|
|
334
|
+
engagement: (topPost.like_count || 0) + (topPost.comments_count || 0),
|
|
335
|
+
publishedAt: topPost.timestamp
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
return summary;
|
|
340
|
+
} catch (error) {
|
|
341
|
+
LogError('Failed to get content performance', error);
|
|
342
|
+
return null;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Parse account insights
|
|
348
|
+
*/
|
|
349
|
+
private parseAccountInsights(insights: any[]): Record<string, any> {
|
|
350
|
+
const parsed: Record<string, any> = {};
|
|
351
|
+
|
|
352
|
+
insights.forEach(metric => {
|
|
353
|
+
const name = metric.name;
|
|
354
|
+
const values = metric.values || [];
|
|
355
|
+
|
|
356
|
+
if (values.length > 0) {
|
|
357
|
+
parsed[name] = {
|
|
358
|
+
value: values[0].value || 0,
|
|
359
|
+
title: metric.title,
|
|
360
|
+
description: metric.description,
|
|
361
|
+
period: metric.period
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
// For time series data
|
|
365
|
+
if (values.length > 1) {
|
|
366
|
+
parsed[name].timeSeries = values.map((v: any) => ({
|
|
367
|
+
value: v.value,
|
|
368
|
+
endTime: v.end_time
|
|
369
|
+
}));
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
return parsed;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Calculate growth metrics
|
|
379
|
+
*/
|
|
380
|
+
private calculateGrowthMetrics(insights: any, accountInfo: any): any {
|
|
381
|
+
const growth: any = {
|
|
382
|
+
followersGrowth: 0,
|
|
383
|
+
followersGrowthRate: 0,
|
|
384
|
+
reachGrowth: 0,
|
|
385
|
+
impressionsGrowth: 0,
|
|
386
|
+
engagementRate: 0
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
// Calculate follower growth if we have time series data
|
|
390
|
+
const followerData = insights.follower_count;
|
|
391
|
+
if (followerData?.timeSeries && followerData.timeSeries.length > 1) {
|
|
392
|
+
const firstValue = followerData.timeSeries[0].value;
|
|
393
|
+
const lastValue = followerData.timeSeries[followerData.timeSeries.length - 1].value;
|
|
394
|
+
growth.followersGrowth = lastValue - firstValue;
|
|
395
|
+
|
|
396
|
+
if (firstValue > 0) {
|
|
397
|
+
growth.followersGrowthRate = ((lastValue - firstValue) / firstValue) * 100;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// Calculate engagement rate
|
|
402
|
+
const reach = insights.reach?.value || 0;
|
|
403
|
+
const profileViews = insights.profile_views?.value || 0;
|
|
404
|
+
const websiteClicks = insights.website_clicks?.value || 0;
|
|
405
|
+
|
|
406
|
+
if (reach > 0) {
|
|
407
|
+
const totalEngagements = profileViews + websiteClicks;
|
|
408
|
+
growth.engagementRate = (totalEngagements / reach) * 100;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
return growth;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Define the parameters for this action
|
|
416
|
+
*/
|
|
417
|
+
public get Params(): ActionParam[] {
|
|
418
|
+
return [
|
|
419
|
+
...this.commonSocialParams,
|
|
420
|
+
{
|
|
421
|
+
Name: 'Period',
|
|
422
|
+
Type: 'Input',
|
|
423
|
+
Value: 'day'
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
Name: 'StartDate',
|
|
427
|
+
Type: 'Input',
|
|
428
|
+
Value: null
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
Name: 'EndDate',
|
|
432
|
+
Type: 'Input',
|
|
433
|
+
Value: null
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
Name: 'IncludeDemographics',
|
|
437
|
+
Type: 'Input',
|
|
438
|
+
Value: true
|
|
439
|
+
}
|
|
440
|
+
];
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Get the description for this action
|
|
445
|
+
*/
|
|
446
|
+
public get Description(): string {
|
|
447
|
+
return 'Retrieves comprehensive account-level insights including follower demographics, reach, impressions, and growth metrics.';
|
|
448
|
+
}
|
|
449
|
+
}
|