@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 { HootSuiteBaseAction, HootSuiteAnalytics } from '../hootsuite-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { LogStatus, LogError } from '@memberjunction/core';
|
|
5
|
+
import { SocialAnalytics } from '../../../base/base-social.action';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Action to retrieve analytics data from HootSuite
|
|
9
|
+
*/
|
|
10
|
+
@RegisterClass(HootSuiteBaseAction, 'HootSuiteGetAnalyticsAction')
|
|
11
|
+
export class HootSuiteGetAnalyticsAction extends HootSuiteBaseAction {
|
|
12
|
+
/**
|
|
13
|
+
* Get analytics data from HootSuite
|
|
14
|
+
*/
|
|
15
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
16
|
+
const { Params, ContextUser } = params;
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
// Initialize OAuth
|
|
20
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
21
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
22
|
+
throw new Error('Failed to initialize OAuth connection');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Extract parameters
|
|
26
|
+
const postId = this.getParamValue(Params, 'PostID');
|
|
27
|
+
const profileId = this.getParamValue(Params, 'ProfileID');
|
|
28
|
+
const startDate = this.getParamValue(Params, 'StartDate');
|
|
29
|
+
const endDate = this.getParamValue(Params, 'EndDate');
|
|
30
|
+
const metricsType = this.getParamValue(Params, 'MetricsType') || 'all';
|
|
31
|
+
const aggregateByProfile = this.getParamValue(Params, 'AggregateByProfile') || false;
|
|
32
|
+
|
|
33
|
+
// Determine what analytics to fetch
|
|
34
|
+
let analyticsData: any;
|
|
35
|
+
|
|
36
|
+
if (postId) {
|
|
37
|
+
// Get analytics for specific post
|
|
38
|
+
analyticsData = await this.getPostAnalytics(postId, startDate, endDate);
|
|
39
|
+
} else if (profileId) {
|
|
40
|
+
// Get analytics for specific profile
|
|
41
|
+
analyticsData = await this.getProfileAnalytics(profileId, startDate, endDate, metricsType);
|
|
42
|
+
} else {
|
|
43
|
+
// Get analytics for all profiles
|
|
44
|
+
analyticsData = await this.getAllProfilesAnalytics(startDate, endDate, metricsType, aggregateByProfile);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Normalize analytics
|
|
48
|
+
const normalizedAnalytics = this.processAnalyticsData(analyticsData, metricsType);
|
|
49
|
+
|
|
50
|
+
// Create summary
|
|
51
|
+
const summary = {
|
|
52
|
+
period: {
|
|
53
|
+
start: startDate || 'Not specified',
|
|
54
|
+
end: endDate || 'Not specified'
|
|
55
|
+
},
|
|
56
|
+
metricsType: metricsType,
|
|
57
|
+
totalMetrics: this.calculateTotalMetrics(normalizedAnalytics),
|
|
58
|
+
topPerformingPosts: this.getTopPerformingPosts(normalizedAnalytics),
|
|
59
|
+
engagementRate: this.calculateEngagementRate(normalizedAnalytics)
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// Update output parameters
|
|
63
|
+
const outputParams = [...Params];
|
|
64
|
+
const analyticsParam = outputParams.find(p => p.Name === 'Analytics');
|
|
65
|
+
if (analyticsParam) analyticsParam.Value = normalizedAnalytics;
|
|
66
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
67
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
Success: true,
|
|
71
|
+
ResultCode: 'SUCCESS',
|
|
72
|
+
Message: 'Successfully retrieved analytics data',
|
|
73
|
+
Params: outputParams
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} catch (error) {
|
|
77
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
Success: false,
|
|
81
|
+
ResultCode: 'ERROR',
|
|
82
|
+
Message: `Failed to get analytics: ${errorMessage}`,
|
|
83
|
+
Params
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Get analytics for a specific post
|
|
90
|
+
*/
|
|
91
|
+
private async getPostAnalytics(postId: string, startDate?: string, endDate?: string): Promise<HootSuiteAnalytics> {
|
|
92
|
+
const params: any = {};
|
|
93
|
+
if (startDate) params.startTime = this.formatHootSuiteDate(startDate);
|
|
94
|
+
if (endDate) params.endTime = this.formatHootSuiteDate(endDate);
|
|
95
|
+
|
|
96
|
+
const response = await this.axiosInstance.get(`/analytics/posts/${postId}`, { params });
|
|
97
|
+
return response.data;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Get analytics for a specific profile
|
|
102
|
+
*/
|
|
103
|
+
private async getProfileAnalytics(
|
|
104
|
+
profileId: string,
|
|
105
|
+
startDate?: string,
|
|
106
|
+
endDate?: string,
|
|
107
|
+
metricsType?: string
|
|
108
|
+
): Promise<any> {
|
|
109
|
+
const params: any = {
|
|
110
|
+
socialProfileIds: profileId
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
if (startDate) params.startTime = this.formatHootSuiteDate(startDate);
|
|
114
|
+
if (endDate) params.endTime = this.formatHootSuiteDate(endDate);
|
|
115
|
+
if (metricsType && metricsType !== 'all') params.metrics = this.getMetricsList(metricsType);
|
|
116
|
+
|
|
117
|
+
const response = await this.axiosInstance.get('/analytics/profiles', { params });
|
|
118
|
+
return response.data;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Get analytics for all profiles
|
|
123
|
+
*/
|
|
124
|
+
private async getAllProfilesAnalytics(
|
|
125
|
+
startDate?: string,
|
|
126
|
+
endDate?: string,
|
|
127
|
+
metricsType?: string,
|
|
128
|
+
aggregateByProfile?: boolean
|
|
129
|
+
): Promise<any> {
|
|
130
|
+
// First get all profiles
|
|
131
|
+
const profiles = await this.getSocialProfiles();
|
|
132
|
+
|
|
133
|
+
if (profiles.length === 0) {
|
|
134
|
+
return { data: [] };
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const params: any = {
|
|
138
|
+
socialProfileIds: profiles.map(p => p.id).join(',')
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
if (startDate) params.startTime = this.formatHootSuiteDate(startDate);
|
|
142
|
+
if (endDate) params.endTime = this.formatHootSuiteDate(endDate);
|
|
143
|
+
if (metricsType && metricsType !== 'all') params.metrics = this.getMetricsList(metricsType);
|
|
144
|
+
if (aggregateByProfile) params.groupBy = 'socialProfile';
|
|
145
|
+
|
|
146
|
+
const response = await this.axiosInstance.get('/analytics/profiles', { params });
|
|
147
|
+
return response.data;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Get list of metrics based on type
|
|
152
|
+
*/
|
|
153
|
+
private getMetricsList(metricsType: string): string {
|
|
154
|
+
const metricsMap: Record<string, string[]> = {
|
|
155
|
+
'engagement': ['likes', 'comments', 'shares', 'engagements'],
|
|
156
|
+
'reach': ['impressions', 'reach'],
|
|
157
|
+
'clicks': ['clicks', 'linkClicks'],
|
|
158
|
+
'all': ['likes', 'comments', 'shares', 'clicks', 'impressions', 'engagements', 'reach']
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
return (metricsMap[metricsType] || metricsMap['all']).join(',');
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Process and normalize analytics data
|
|
166
|
+
*/
|
|
167
|
+
private processAnalyticsData(data: any, metricsType: string): SocialAnalytics[] {
|
|
168
|
+
if (!data || !data.data) return [];
|
|
169
|
+
|
|
170
|
+
const results: SocialAnalytics[] = [];
|
|
171
|
+
|
|
172
|
+
if (Array.isArray(data.data)) {
|
|
173
|
+
data.data.forEach((item: any) => {
|
|
174
|
+
results.push(this.normalizeAnalytics(item.metrics));
|
|
175
|
+
});
|
|
176
|
+
} else if (data.metrics) {
|
|
177
|
+
results.push(this.normalizeAnalytics(data.metrics));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return results;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Calculate total metrics across all data
|
|
185
|
+
*/
|
|
186
|
+
private calculateTotalMetrics(analytics: SocialAnalytics[]): SocialAnalytics {
|
|
187
|
+
return analytics.reduce((total, current) => ({
|
|
188
|
+
impressions: total.impressions + current.impressions,
|
|
189
|
+
engagements: total.engagements + current.engagements,
|
|
190
|
+
clicks: total.clicks + current.clicks,
|
|
191
|
+
shares: total.shares + current.shares,
|
|
192
|
+
comments: total.comments + current.comments,
|
|
193
|
+
likes: total.likes + current.likes,
|
|
194
|
+
reach: total.reach + current.reach,
|
|
195
|
+
saves: (total.saves || 0) + (current.saves || 0),
|
|
196
|
+
videoViews: (total.videoViews || 0) + (current.videoViews || 0),
|
|
197
|
+
platformMetrics: {}
|
|
198
|
+
}), {
|
|
199
|
+
impressions: 0,
|
|
200
|
+
engagements: 0,
|
|
201
|
+
clicks: 0,
|
|
202
|
+
shares: 0,
|
|
203
|
+
comments: 0,
|
|
204
|
+
likes: 0,
|
|
205
|
+
reach: 0,
|
|
206
|
+
saves: 0,
|
|
207
|
+
videoViews: 0,
|
|
208
|
+
platformMetrics: {}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Get top performing posts based on engagement
|
|
214
|
+
*/
|
|
215
|
+
private getTopPerformingPosts(analytics: SocialAnalytics[]): SocialAnalytics[] {
|
|
216
|
+
return analytics
|
|
217
|
+
.sort((a, b) => b.engagements - a.engagements)
|
|
218
|
+
.slice(0, 5);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Calculate average engagement rate
|
|
223
|
+
*/
|
|
224
|
+
private calculateEngagementRate(analytics: SocialAnalytics[]): number {
|
|
225
|
+
const total = this.calculateTotalMetrics(analytics);
|
|
226
|
+
if (total.impressions === 0) return 0;
|
|
227
|
+
|
|
228
|
+
return (total.engagements / total.impressions) * 100;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Define the parameters this action expects
|
|
233
|
+
*/
|
|
234
|
+
public get Params(): ActionParam[] {
|
|
235
|
+
return [
|
|
236
|
+
...this.commonSocialParams,
|
|
237
|
+
{
|
|
238
|
+
Name: 'PostID',
|
|
239
|
+
Type: 'Input',
|
|
240
|
+
Value: null
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
Name: 'StartDate',
|
|
244
|
+
Type: 'Input',
|
|
245
|
+
Value: null
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
Name: 'EndDate',
|
|
249
|
+
Type: 'Input',
|
|
250
|
+
Value: null
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
Name: 'MetricsType',
|
|
254
|
+
Type: 'Input',
|
|
255
|
+
Value: null
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
Name: 'AggregateByProfile',
|
|
259
|
+
Type: 'Input',
|
|
260
|
+
Value: null
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
Name: 'Analytics',
|
|
264
|
+
Type: 'Output',
|
|
265
|
+
Value: null
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
Name: 'Summary',
|
|
269
|
+
Type: 'Output',
|
|
270
|
+
Value: null
|
|
271
|
+
}
|
|
272
|
+
];
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Get action description
|
|
277
|
+
*/
|
|
278
|
+
public get Description(): string {
|
|
279
|
+
return 'Retrieves analytics data from HootSuite for posts, profiles, or overall account performance';
|
|
280
|
+
}
|
|
281
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { HootSuiteBaseAction, HootSuitePost } from '../hootsuite-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { LogStatus, LogError } from '@memberjunction/core';
|
|
5
|
+
import { SocialPost } from '../../../base/base-social.action';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Action to retrieve scheduled posts from HootSuite
|
|
9
|
+
*/
|
|
10
|
+
@RegisterClass(HootSuiteBaseAction, 'HootSuiteGetScheduledPostsAction')
|
|
11
|
+
export class HootSuiteGetScheduledPostsAction extends HootSuiteBaseAction {
|
|
12
|
+
/**
|
|
13
|
+
* Get scheduled posts from HootSuite
|
|
14
|
+
*/
|
|
15
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
16
|
+
const { Params, ContextUser } = params;
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
// Initialize OAuth
|
|
20
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
21
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
22
|
+
throw new Error('Failed to initialize OAuth connection');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Extract parameters
|
|
26
|
+
const profileId = this.getParamValue(Params, 'ProfileID');
|
|
27
|
+
const startDate = this.getParamValue(Params, 'StartDate');
|
|
28
|
+
const endDate = this.getParamValue(Params, 'EndDate');
|
|
29
|
+
const limit = this.getParamValue(Params, 'Limit') || 100;
|
|
30
|
+
const includeAnalytics = this.getParamValue(Params, 'IncludeAnalytics') || false;
|
|
31
|
+
|
|
32
|
+
// Build query parameters
|
|
33
|
+
const queryParams: any = {
|
|
34
|
+
state: 'SCHEDULED',
|
|
35
|
+
limit: Math.min(limit, 100),
|
|
36
|
+
maxResults: limit
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
if (profileId) {
|
|
40
|
+
queryParams.socialProfileIds = profileId;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (startDate) {
|
|
44
|
+
queryParams.scheduledAfter = this.formatHootSuiteDate(startDate);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (endDate) {
|
|
48
|
+
queryParams.scheduledBefore = this.formatHootSuiteDate(endDate);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Get scheduled posts
|
|
52
|
+
const posts = await this.makePaginatedRequest<HootSuitePost>('/messages', queryParams);
|
|
53
|
+
|
|
54
|
+
// Convert to common format
|
|
55
|
+
const normalizedPosts: SocialPost[] = await Promise.all(
|
|
56
|
+
posts.map(async (post) => {
|
|
57
|
+
const normalized = this.normalizePost(post);
|
|
58
|
+
|
|
59
|
+
// Optionally include analytics
|
|
60
|
+
if (includeAnalytics && post.state === 'PUBLISHED') {
|
|
61
|
+
try {
|
|
62
|
+
const analytics = await this.getPostAnalytics(post.id);
|
|
63
|
+
normalized.analytics = this.normalizeAnalytics(analytics);
|
|
64
|
+
} catch (error) {
|
|
65
|
+
LogStatus(`Failed to get analytics for post ${post.id}: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return normalized;
|
|
70
|
+
})
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
// Create summary
|
|
74
|
+
const summary = {
|
|
75
|
+
totalPosts: normalizedPosts.length,
|
|
76
|
+
byProfile: this.groupByProfile(posts),
|
|
77
|
+
byDate: this.groupByDate(normalizedPosts),
|
|
78
|
+
dateRange: {
|
|
79
|
+
start: startDate || 'Not specified',
|
|
80
|
+
end: endDate || 'Not specified'
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// Update output parameters
|
|
85
|
+
const outputParams = [...Params];
|
|
86
|
+
const postsParam = outputParams.find(p => p.Name === 'ScheduledPosts');
|
|
87
|
+
if (postsParam) postsParam.Value = normalizedPosts;
|
|
88
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
89
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
Success: true,
|
|
93
|
+
ResultCode: 'SUCCESS',
|
|
94
|
+
Message: `Retrieved ${normalizedPosts.length} scheduled posts`,
|
|
95
|
+
Params: outputParams
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
} catch (error) {
|
|
99
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
Success: false,
|
|
103
|
+
ResultCode: 'ERROR',
|
|
104
|
+
Message: `Failed to get scheduled posts: ${errorMessage}`,
|
|
105
|
+
Params
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Convert HootSuite post to common format
|
|
112
|
+
*/
|
|
113
|
+
protected normalizePost(hootsuitePost: HootSuitePost): SocialPost {
|
|
114
|
+
return {
|
|
115
|
+
id: hootsuitePost.id,
|
|
116
|
+
platform: 'HootSuite',
|
|
117
|
+
profileId: hootsuitePost.socialProfileIds.join(','), // Multiple profiles possible
|
|
118
|
+
content: hootsuitePost.text,
|
|
119
|
+
mediaUrls: hootsuitePost.mediaIds || [],
|
|
120
|
+
publishedAt: this.parseHootSuiteDate(hootsuitePost.createdTime),
|
|
121
|
+
scheduledFor: hootsuitePost.scheduledTime ? this.parseHootSuiteDate(hootsuitePost.scheduledTime) : undefined,
|
|
122
|
+
platformSpecificData: {
|
|
123
|
+
state: hootsuitePost.state,
|
|
124
|
+
tags: hootsuitePost.tags,
|
|
125
|
+
location: hootsuitePost.location,
|
|
126
|
+
socialProfileIds: hootsuitePost.socialProfileIds
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Get analytics for a specific post
|
|
133
|
+
*/
|
|
134
|
+
private async getPostAnalytics(postId: string): Promise<any> {
|
|
135
|
+
try {
|
|
136
|
+
const response = await this.axiosInstance.get(`/analytics/posts/${postId}`);
|
|
137
|
+
return response.data;
|
|
138
|
+
} catch (error) {
|
|
139
|
+
// Analytics might not be available for all posts
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Group posts by profile
|
|
146
|
+
*/
|
|
147
|
+
private groupByProfile(posts: HootSuitePost[]): Record<string, number> {
|
|
148
|
+
const groups: Record<string, number> = {};
|
|
149
|
+
|
|
150
|
+
posts.forEach(post => {
|
|
151
|
+
post.socialProfileIds.forEach(profileId => {
|
|
152
|
+
groups[profileId] = (groups[profileId] || 0) + 1;
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
return groups;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Group posts by scheduled date
|
|
161
|
+
*/
|
|
162
|
+
private groupByDate(posts: SocialPost[]): Record<string, number> {
|
|
163
|
+
const groups: Record<string, number> = {};
|
|
164
|
+
|
|
165
|
+
posts.forEach(post => {
|
|
166
|
+
if (post.scheduledFor) {
|
|
167
|
+
const dateKey = post.scheduledFor.toISOString().split('T')[0];
|
|
168
|
+
groups[dateKey] = (groups[dateKey] || 0) + 1;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
return groups;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Define the parameters this action expects
|
|
177
|
+
*/
|
|
178
|
+
public get Params(): ActionParam[] {
|
|
179
|
+
return [
|
|
180
|
+
...this.commonSocialParams,
|
|
181
|
+
{
|
|
182
|
+
Name: 'StartDate',
|
|
183
|
+
Type: 'Input',
|
|
184
|
+
Value: null
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
Name: 'EndDate',
|
|
188
|
+
Type: 'Input',
|
|
189
|
+
Value: null
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
Name: 'Limit',
|
|
193
|
+
Type: 'Input',
|
|
194
|
+
Value: null
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
Name: 'IncludeAnalytics',
|
|
198
|
+
Type: 'Input',
|
|
199
|
+
Value: null
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
Name: 'ScheduledPosts',
|
|
203
|
+
Type: 'Output',
|
|
204
|
+
Value: null
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
Name: 'Summary',
|
|
208
|
+
Type: 'Output',
|
|
209
|
+
Value: null
|
|
210
|
+
}
|
|
211
|
+
];
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Get action description
|
|
216
|
+
*/
|
|
217
|
+
public get Description(): string {
|
|
218
|
+
return 'Retrieves scheduled posts from HootSuite with optional date filtering and analytics';
|
|
219
|
+
}
|
|
220
|
+
}
|