@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,146 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { BufferBaseAction } from '../buffer-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Action to get detailed analytics for a specific Buffer post
|
|
7
|
+
*/
|
|
8
|
+
@RegisterClass(BufferBaseAction, 'BufferGetAnalyticsAction')
|
|
9
|
+
export class BufferGetAnalyticsAction extends BufferBaseAction {
|
|
10
|
+
/**
|
|
11
|
+
* Get analytics for a Buffer post
|
|
12
|
+
*/
|
|
13
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
14
|
+
const { Params, ContextUser } = params;
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
// Get parameters
|
|
18
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
19
|
+
const updateId = this.getParamValue(Params, 'UpdateID');
|
|
20
|
+
|
|
21
|
+
// Validate required parameters
|
|
22
|
+
if (!companyIntegrationId) {
|
|
23
|
+
throw new Error('CompanyIntegrationID is required');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (!updateId) {
|
|
27
|
+
throw new Error('UpdateID is required');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Initialize OAuth
|
|
31
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
32
|
+
return {
|
|
33
|
+
Success: false,
|
|
34
|
+
ResultCode: 'INVALID_TOKEN',
|
|
35
|
+
Message: 'Failed to initialize Buffer OAuth connection',
|
|
36
|
+
Params
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Get analytics
|
|
41
|
+
const analyticsData = await this.getAnalytics(updateId);
|
|
42
|
+
|
|
43
|
+
// Normalize analytics
|
|
44
|
+
const normalizedAnalytics = this.normalizeAnalytics(analyticsData);
|
|
45
|
+
|
|
46
|
+
// Create detailed analytics object
|
|
47
|
+
const detailedAnalytics = {
|
|
48
|
+
updateId: updateId,
|
|
49
|
+
metrics: normalizedAnalytics,
|
|
50
|
+
platformSpecific: analyticsData,
|
|
51
|
+
summary: {
|
|
52
|
+
totalEngagements: normalizedAnalytics.engagements,
|
|
53
|
+
engagementRate: analyticsData.reach > 0 ?
|
|
54
|
+
(normalizedAnalytics.engagements / analyticsData.reach) * 100 : 0,
|
|
55
|
+
primaryMetric: this.determinePrimaryMetric(analyticsData),
|
|
56
|
+
performanceLevel: this.calculatePerformanceLevel(normalizedAnalytics)
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// Update output parameters
|
|
61
|
+
const outputParams = [...Params];
|
|
62
|
+
const analyticsParam = outputParams.find(p => p.Name === 'Analytics');
|
|
63
|
+
if (analyticsParam) analyticsParam.Value = detailedAnalytics;
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
Success: true,
|
|
67
|
+
ResultCode: 'SUCCESS',
|
|
68
|
+
Message: `Successfully retrieved analytics for Buffer post ${updateId}`,
|
|
69
|
+
Params: outputParams
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
} catch (error) {
|
|
73
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
74
|
+
const resultCode = this.mapBufferError(error);
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
Success: false,
|
|
78
|
+
ResultCode: resultCode,
|
|
79
|
+
Message: `Failed to get analytics: ${errorMessage}`,
|
|
80
|
+
Params
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Determine the primary metric based on the platform
|
|
87
|
+
*/
|
|
88
|
+
private determinePrimaryMetric(analytics: any): { name: string; value: number } {
|
|
89
|
+
// Twitter/X focuses on retweets
|
|
90
|
+
if (analytics.retweets !== undefined) {
|
|
91
|
+
return { name: 'Retweets', value: analytics.retweets || 0 };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Facebook focuses on shares
|
|
95
|
+
if (analytics.shares !== undefined) {
|
|
96
|
+
return { name: 'Shares', value: analytics.shares || 0 };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// LinkedIn focuses on reach
|
|
100
|
+
if (analytics.reach !== undefined && analytics.reach > 0) {
|
|
101
|
+
return { name: 'Reach', value: analytics.reach };
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Default to clicks
|
|
105
|
+
return { name: 'Clicks', value: analytics.clicks || 0 };
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Calculate performance level based on engagement metrics
|
|
110
|
+
*/
|
|
111
|
+
private calculatePerformanceLevel(analytics: any): 'low' | 'medium' | 'high' | 'viral' {
|
|
112
|
+
const engagementRate = analytics.reach > 0 ?
|
|
113
|
+
(analytics.engagements / analytics.reach) * 100 : 0;
|
|
114
|
+
|
|
115
|
+
if (engagementRate >= 10) return 'viral';
|
|
116
|
+
if (engagementRate >= 5) return 'high';
|
|
117
|
+
if (engagementRate >= 2) return 'medium';
|
|
118
|
+
return 'low';
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Define the parameters this action expects
|
|
123
|
+
*/
|
|
124
|
+
public get Params(): ActionParam[] {
|
|
125
|
+
return [
|
|
126
|
+
...this.commonSocialParams,
|
|
127
|
+
{
|
|
128
|
+
Name: 'UpdateID',
|
|
129
|
+
Type: 'Input',
|
|
130
|
+
Value: null
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
Name: 'Analytics',
|
|
134
|
+
Type: 'Output',
|
|
135
|
+
Value: null
|
|
136
|
+
}
|
|
137
|
+
];
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Metadata about this action
|
|
142
|
+
*/
|
|
143
|
+
public get Description(): string {
|
|
144
|
+
return 'Retrieves detailed analytics and interaction metrics for a specific Buffer post';
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { BufferBaseAction } from '../buffer-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Action to get pending (scheduled) posts from Buffer
|
|
7
|
+
*/
|
|
8
|
+
@RegisterClass(BufferBaseAction, 'BufferGetPendingPostsAction')
|
|
9
|
+
export class BufferGetPendingPostsAction extends BufferBaseAction {
|
|
10
|
+
/**
|
|
11
|
+
* Get pending posts from Buffer
|
|
12
|
+
*/
|
|
13
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
14
|
+
const { Params, ContextUser } = params;
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
// Get parameters
|
|
18
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
19
|
+
const profileId = this.getParamValue(Params, 'ProfileID');
|
|
20
|
+
const page = this.getParamValue(Params, 'Page') || 1;
|
|
21
|
+
const count = this.getParamValue(Params, 'Count') || 10;
|
|
22
|
+
const since = this.getParamValue(Params, 'Since');
|
|
23
|
+
const useUTC = this.getParamValue(Params, 'UseUTC') !== false;
|
|
24
|
+
|
|
25
|
+
// Validate required parameters
|
|
26
|
+
if (!companyIntegrationId) {
|
|
27
|
+
throw new Error('CompanyIntegrationID is required');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (!profileId) {
|
|
31
|
+
throw new Error('ProfileID is required');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Initialize OAuth
|
|
35
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
36
|
+
return {
|
|
37
|
+
Success: false,
|
|
38
|
+
ResultCode: 'INVALID_TOKEN',
|
|
39
|
+
Message: 'Failed to initialize Buffer OAuth connection',
|
|
40
|
+
Params
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Get pending posts
|
|
45
|
+
const result = await this.getUpdates(profileId, 'pending', {
|
|
46
|
+
page,
|
|
47
|
+
count,
|
|
48
|
+
since: since ? new Date(since) : undefined,
|
|
49
|
+
utc: useUTC
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Format posts
|
|
53
|
+
const posts = result.updates || [];
|
|
54
|
+
const formattedPosts = posts.map((update: any) => this.normalizePost(update));
|
|
55
|
+
|
|
56
|
+
// Create summary
|
|
57
|
+
const summary = {
|
|
58
|
+
totalPosts: formattedPosts.length,
|
|
59
|
+
page: page,
|
|
60
|
+
hasMore: posts.length === count,
|
|
61
|
+
profileId: profileId,
|
|
62
|
+
dateRange: {
|
|
63
|
+
earliest: formattedPosts.length > 0 ?
|
|
64
|
+
formattedPosts[formattedPosts.length - 1].scheduledFor : null,
|
|
65
|
+
latest: formattedPosts.length > 0 ?
|
|
66
|
+
formattedPosts[0].scheduledFor : null
|
|
67
|
+
},
|
|
68
|
+
postsByDay: this.groupPostsByDay(formattedPosts)
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// Update output parameters
|
|
72
|
+
const outputParams = [...Params];
|
|
73
|
+
const postsParam = outputParams.find(p => p.Name === 'Posts');
|
|
74
|
+
if (postsParam) postsParam.Value = formattedPosts;
|
|
75
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
76
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
Success: true,
|
|
80
|
+
ResultCode: 'SUCCESS',
|
|
81
|
+
Message: `Retrieved ${formattedPosts.length} pending posts from Buffer`,
|
|
82
|
+
Params: outputParams
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
} catch (error) {
|
|
86
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
87
|
+
const resultCode = this.mapBufferError(error);
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
Success: false,
|
|
91
|
+
ResultCode: resultCode,
|
|
92
|
+
Message: `Failed to get pending posts: ${errorMessage}`,
|
|
93
|
+
Params
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Group posts by scheduled day
|
|
100
|
+
*/
|
|
101
|
+
private groupPostsByDay(posts: any[]): Record<string, number> {
|
|
102
|
+
return posts.reduce((acc, post) => {
|
|
103
|
+
if (post.scheduledFor) {
|
|
104
|
+
const day = post.scheduledFor.toISOString().split('T')[0];
|
|
105
|
+
acc[day] = (acc[day] || 0) + 1;
|
|
106
|
+
}
|
|
107
|
+
return acc;
|
|
108
|
+
}, {} as Record<string, number>);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Define the parameters this action expects
|
|
113
|
+
*/
|
|
114
|
+
public get Params(): ActionParam[] {
|
|
115
|
+
return [
|
|
116
|
+
...this.commonSocialParams,
|
|
117
|
+
{
|
|
118
|
+
Name: 'ProfileID',
|
|
119
|
+
Type: 'Input',
|
|
120
|
+
Value: null
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
Name: 'Page',
|
|
124
|
+
Type: 'Input',
|
|
125
|
+
Value: 1
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
Name: 'Count',
|
|
129
|
+
Type: 'Input',
|
|
130
|
+
Value: 10
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
Name: 'Since',
|
|
134
|
+
Type: 'Input',
|
|
135
|
+
Value: null
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
Name: 'UseUTC',
|
|
139
|
+
Type: 'Input',
|
|
140
|
+
Value: true
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
Name: 'Posts',
|
|
144
|
+
Type: 'Output',
|
|
145
|
+
Value: null
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
Name: 'Summary',
|
|
149
|
+
Type: 'Output',
|
|
150
|
+
Value: null
|
|
151
|
+
}
|
|
152
|
+
];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Metadata about this action
|
|
157
|
+
*/
|
|
158
|
+
public get Description(): string {
|
|
159
|
+
return 'Retrieves pending (scheduled) posts from Buffer for a specific social media profile';
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { BufferBaseAction } from '../buffer-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Action to get all Buffer profiles (social media accounts) for the authenticated user
|
|
7
|
+
*/
|
|
8
|
+
@RegisterClass(BufferBaseAction, 'BufferGetProfilesAction')
|
|
9
|
+
export class BufferGetProfilesAction extends BufferBaseAction {
|
|
10
|
+
/**
|
|
11
|
+
* Get Buffer profiles
|
|
12
|
+
*/
|
|
13
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
14
|
+
const { Params, ContextUser } = params;
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
// Get company integration ID
|
|
18
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
19
|
+
if (!companyIntegrationId) {
|
|
20
|
+
throw new Error('CompanyIntegrationID is required');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Initialize OAuth
|
|
24
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
25
|
+
return {
|
|
26
|
+
Success: false,
|
|
27
|
+
ResultCode: 'INVALID_TOKEN',
|
|
28
|
+
Message: 'Failed to initialize Buffer OAuth connection',
|
|
29
|
+
Params
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Get profiles
|
|
34
|
+
const profiles = await this.getProfiles();
|
|
35
|
+
|
|
36
|
+
// Format profile data
|
|
37
|
+
const formattedProfiles = profiles.map(profile => ({
|
|
38
|
+
id: profile.id,
|
|
39
|
+
service: profile.service,
|
|
40
|
+
serviceId: profile.service_id,
|
|
41
|
+
serviceUsername: profile.service_username,
|
|
42
|
+
serviceType: profile.service_type,
|
|
43
|
+
default: profile.default,
|
|
44
|
+
createdAt: new Date(profile.created_at * 1000),
|
|
45
|
+
formattedUsername: profile.formatted_username,
|
|
46
|
+
formattedServiceType: profile.formatted_service,
|
|
47
|
+
avatar: profile.avatar,
|
|
48
|
+
avatarHttps: profile.avatar_https,
|
|
49
|
+
statistics: {
|
|
50
|
+
followers: profile.statistics?.followers || 0
|
|
51
|
+
},
|
|
52
|
+
timezone: profile.timezone,
|
|
53
|
+
schedules: profile.schedules || []
|
|
54
|
+
}));
|
|
55
|
+
|
|
56
|
+
// Create summary
|
|
57
|
+
const summary = {
|
|
58
|
+
totalProfiles: formattedProfiles.length,
|
|
59
|
+
profilesByService: this.groupByService(formattedProfiles),
|
|
60
|
+
defaultProfile: formattedProfiles.find(p => p.default)?.id
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// Update output parameters
|
|
64
|
+
const outputParams = [...Params];
|
|
65
|
+
const profilesParam = outputParams.find(p => p.Name === 'Profiles');
|
|
66
|
+
if (profilesParam) profilesParam.Value = formattedProfiles;
|
|
67
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
68
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
Success: true,
|
|
72
|
+
ResultCode: 'SUCCESS',
|
|
73
|
+
Message: `Retrieved ${formattedProfiles.length} Buffer profiles`,
|
|
74
|
+
Params: outputParams
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
} catch (error) {
|
|
78
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
79
|
+
const resultCode = this.mapBufferError(error);
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
Success: false,
|
|
83
|
+
ResultCode: resultCode,
|
|
84
|
+
Message: `Failed to get Buffer profiles: ${errorMessage}`,
|
|
85
|
+
Params
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Group profiles by service
|
|
92
|
+
*/
|
|
93
|
+
private groupByService(profiles: any[]): Record<string, number> {
|
|
94
|
+
return profiles.reduce((acc, profile) => {
|
|
95
|
+
const service = profile.service || 'unknown';
|
|
96
|
+
acc[service] = (acc[service] || 0) + 1;
|
|
97
|
+
return acc;
|
|
98
|
+
}, {} as Record<string, number>);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Define the parameters this action expects
|
|
103
|
+
*/
|
|
104
|
+
public get Params(): ActionParam[] {
|
|
105
|
+
return [
|
|
106
|
+
...this.commonSocialParams,
|
|
107
|
+
{
|
|
108
|
+
Name: 'Profiles',
|
|
109
|
+
Type: 'Output',
|
|
110
|
+
Value: null
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
Name: 'Summary',
|
|
114
|
+
Type: 'Output',
|
|
115
|
+
Value: null
|
|
116
|
+
}
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Metadata about this action
|
|
122
|
+
*/
|
|
123
|
+
public get Description(): string {
|
|
124
|
+
return 'Retrieves all Buffer profiles (social media accounts) associated with the authenticated user';
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { BufferBaseAction } from '../buffer-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Action to get sent (published) posts from Buffer
|
|
7
|
+
*/
|
|
8
|
+
@RegisterClass(BufferBaseAction, 'BufferGetSentPostsAction')
|
|
9
|
+
export class BufferGetSentPostsAction extends BufferBaseAction {
|
|
10
|
+
/**
|
|
11
|
+
* Get sent posts from Buffer
|
|
12
|
+
*/
|
|
13
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
14
|
+
const { Params, ContextUser } = params;
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
// Get parameters
|
|
18
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
19
|
+
const profileId = this.getParamValue(Params, 'ProfileID');
|
|
20
|
+
const page = this.getParamValue(Params, 'Page') || 1;
|
|
21
|
+
const count = this.getParamValue(Params, 'Count') || 10;
|
|
22
|
+
const since = this.getParamValue(Params, 'Since');
|
|
23
|
+
const useUTC = this.getParamValue(Params, 'UseUTC') !== false;
|
|
24
|
+
|
|
25
|
+
// Validate required parameters
|
|
26
|
+
if (!companyIntegrationId) {
|
|
27
|
+
throw new Error('CompanyIntegrationID is required');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (!profileId) {
|
|
31
|
+
throw new Error('ProfileID is required');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Initialize OAuth
|
|
35
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
36
|
+
return {
|
|
37
|
+
Success: false,
|
|
38
|
+
ResultCode: 'INVALID_TOKEN',
|
|
39
|
+
Message: 'Failed to initialize Buffer OAuth connection',
|
|
40
|
+
Params
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Get sent posts
|
|
45
|
+
const result = await this.getUpdates(profileId, 'sent', {
|
|
46
|
+
page,
|
|
47
|
+
count,
|
|
48
|
+
since: since ? new Date(since) : undefined,
|
|
49
|
+
utc: useUTC
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Format posts
|
|
53
|
+
const posts = result.updates || [];
|
|
54
|
+
const formattedPosts = posts.map((update: any) => this.normalizePost(update));
|
|
55
|
+
|
|
56
|
+
// Create summary
|
|
57
|
+
const summary = {
|
|
58
|
+
totalPosts: formattedPosts.length,
|
|
59
|
+
page: page,
|
|
60
|
+
hasMore: posts.length === count,
|
|
61
|
+
profileId: profileId,
|
|
62
|
+
dateRange: {
|
|
63
|
+
earliest: formattedPosts.length > 0 ?
|
|
64
|
+
formattedPosts[formattedPosts.length - 1].publishedAt : null,
|
|
65
|
+
latest: formattedPosts.length > 0 ?
|
|
66
|
+
formattedPosts[0].publishedAt : null
|
|
67
|
+
},
|
|
68
|
+
postsByDay: this.groupPostsByDay(formattedPosts),
|
|
69
|
+
totalEngagements: this.calculateTotalEngagements(formattedPosts),
|
|
70
|
+
topPerformingPost: this.findTopPerformingPost(formattedPosts)
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// Update output parameters
|
|
74
|
+
const outputParams = [...Params];
|
|
75
|
+
const postsParam = outputParams.find(p => p.Name === 'Posts');
|
|
76
|
+
if (postsParam) postsParam.Value = formattedPosts;
|
|
77
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
78
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
Success: true,
|
|
82
|
+
ResultCode: 'SUCCESS',
|
|
83
|
+
Message: `Retrieved ${formattedPosts.length} sent posts from Buffer`,
|
|
84
|
+
Params: outputParams
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
} catch (error) {
|
|
88
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
89
|
+
const resultCode = this.mapBufferError(error);
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
Success: false,
|
|
93
|
+
ResultCode: resultCode,
|
|
94
|
+
Message: `Failed to get sent posts: ${errorMessage}`,
|
|
95
|
+
Params
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Group posts by published day
|
|
102
|
+
*/
|
|
103
|
+
private groupPostsByDay(posts: any[]): Record<string, number> {
|
|
104
|
+
return posts.reduce((acc, post) => {
|
|
105
|
+
if (post.publishedAt) {
|
|
106
|
+
const day = post.publishedAt.toISOString().split('T')[0];
|
|
107
|
+
acc[day] = (acc[day] || 0) + 1;
|
|
108
|
+
}
|
|
109
|
+
return acc;
|
|
110
|
+
}, {} as Record<string, number>);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Calculate total engagements across all posts
|
|
115
|
+
*/
|
|
116
|
+
private calculateTotalEngagements(posts: any[]): number {
|
|
117
|
+
return posts.reduce((total, post) => {
|
|
118
|
+
if (post.analytics) {
|
|
119
|
+
return total + post.analytics.engagements;
|
|
120
|
+
}
|
|
121
|
+
return total;
|
|
122
|
+
}, 0);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Find the top performing post by engagements
|
|
127
|
+
*/
|
|
128
|
+
private findTopPerformingPost(posts: any[]): any {
|
|
129
|
+
if (posts.length === 0) return null;
|
|
130
|
+
|
|
131
|
+
return posts.reduce((top, post) => {
|
|
132
|
+
if (!top || (post.analytics?.engagements || 0) > (top.analytics?.engagements || 0)) {
|
|
133
|
+
return post;
|
|
134
|
+
}
|
|
135
|
+
return top;
|
|
136
|
+
}, posts[0]);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Define the parameters this action expects
|
|
141
|
+
*/
|
|
142
|
+
public get Params(): ActionParam[] {
|
|
143
|
+
return [
|
|
144
|
+
...this.commonSocialParams,
|
|
145
|
+
{
|
|
146
|
+
Name: 'ProfileID',
|
|
147
|
+
Type: 'Input',
|
|
148
|
+
Value: null
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
Name: 'Page',
|
|
152
|
+
Type: 'Input',
|
|
153
|
+
Value: 1
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
Name: 'Count',
|
|
157
|
+
Type: 'Input',
|
|
158
|
+
Value: 10
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
Name: 'Since',
|
|
162
|
+
Type: 'Input',
|
|
163
|
+
Value: null
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
Name: 'UseUTC',
|
|
167
|
+
Type: 'Input',
|
|
168
|
+
Value: true
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
Name: 'Posts',
|
|
172
|
+
Type: 'Output',
|
|
173
|
+
Value: null
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
Name: 'Summary',
|
|
177
|
+
Type: 'Output',
|
|
178
|
+
Value: null
|
|
179
|
+
}
|
|
180
|
+
];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Metadata about this action
|
|
185
|
+
*/
|
|
186
|
+
public get Description(): string {
|
|
187
|
+
return 'Retrieves sent (published) posts from Buffer for a specific social media profile with analytics data';
|
|
188
|
+
}
|
|
189
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './get-profiles.action';
|
|
2
|
+
export * from './create-post.action';
|
|
3
|
+
export * from './get-pending-posts.action';
|
|
4
|
+
export * from './get-sent-posts.action';
|
|
5
|
+
export * from './get-analytics.action';
|
|
6
|
+
export * from './reorder-queue.action';
|
|
7
|
+
export * from './delete-post.action';
|
|
8
|
+
export * from './search-posts.action';
|