@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,222 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { HootSuiteBaseAction } from '../hootsuite-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { LogStatus, LogError } from '@memberjunction/core';
|
|
5
|
+
import { MediaFile } from '../../../base/base-social.action';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Action to update a scheduled post in HootSuite
|
|
9
|
+
*/
|
|
10
|
+
@RegisterClass(HootSuiteBaseAction, 'HootSuiteUpdateScheduledPostAction')
|
|
11
|
+
export class HootSuiteUpdateScheduledPostAction extends HootSuiteBaseAction {
|
|
12
|
+
/**
|
|
13
|
+
* Update a scheduled post in 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 content = this.getParamValue(Params, 'Content');
|
|
28
|
+
const profileIds = this.getParamValue(Params, 'ProfileIDs');
|
|
29
|
+
const scheduledTime = this.getParamValue(Params, 'ScheduledTime');
|
|
30
|
+
const mediaFiles = this.getParamValue(Params, 'MediaFiles');
|
|
31
|
+
const replaceMedia = this.getParamValue(Params, 'ReplaceMedia') || false;
|
|
32
|
+
const tags = this.getParamValue(Params, 'Tags');
|
|
33
|
+
const location = this.getParamValue(Params, 'Location');
|
|
34
|
+
|
|
35
|
+
// Validate required parameters
|
|
36
|
+
if (!postId) {
|
|
37
|
+
throw new Error('PostID is required');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// First, get the existing post
|
|
41
|
+
LogStatus(`Fetching existing post ${postId}...`);
|
|
42
|
+
const existingPostResponse = await this.axiosInstance.get(`/messages/${postId}`);
|
|
43
|
+
const existingPost = existingPostResponse.data;
|
|
44
|
+
|
|
45
|
+
// Check if post can be updated
|
|
46
|
+
if (existingPost.state !== 'SCHEDULED' && existingPost.state !== 'DRAFT') {
|
|
47
|
+
throw new Error(`Cannot update post in ${existingPost.state} state. Only SCHEDULED and DRAFT posts can be updated.`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Build update data
|
|
51
|
+
const updateData: any = {};
|
|
52
|
+
|
|
53
|
+
// Update content if provided
|
|
54
|
+
if (content !== undefined && content !== null) {
|
|
55
|
+
updateData.text = content;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Update profile IDs if provided
|
|
59
|
+
if (profileIds) {
|
|
60
|
+
if (Array.isArray(profileIds)) {
|
|
61
|
+
updateData.socialProfileIds = profileIds;
|
|
62
|
+
} else if (typeof profileIds === 'string') {
|
|
63
|
+
updateData.socialProfileIds = [profileIds];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Update scheduled time if provided
|
|
68
|
+
if (scheduledTime !== undefined) {
|
|
69
|
+
updateData.scheduledTime = scheduledTime ? this.formatHootSuiteDate(scheduledTime) : null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Handle media updates
|
|
73
|
+
if (mediaFiles !== undefined) {
|
|
74
|
+
if (replaceMedia || !existingPost.mediaIds || existingPost.mediaIds.length === 0) {
|
|
75
|
+
// Replace all media or add new media
|
|
76
|
+
if (mediaFiles && Array.isArray(mediaFiles) && mediaFiles.length > 0) {
|
|
77
|
+
LogStatus(`Uploading ${mediaFiles.length} media files...`);
|
|
78
|
+
const mediaIds = await this.uploadMedia(mediaFiles as MediaFile[]);
|
|
79
|
+
updateData.mediaIds = mediaIds;
|
|
80
|
+
} else {
|
|
81
|
+
// Remove all media
|
|
82
|
+
updateData.mediaIds = [];
|
|
83
|
+
}
|
|
84
|
+
} else if (mediaFiles && Array.isArray(mediaFiles) && mediaFiles.length > 0) {
|
|
85
|
+
// Append new media to existing
|
|
86
|
+
LogStatus(`Uploading ${mediaFiles.length} additional media files...`);
|
|
87
|
+
const newMediaIds = await this.uploadMedia(mediaFiles as MediaFile[]);
|
|
88
|
+
updateData.mediaIds = [...(existingPost.mediaIds || []), ...newMediaIds];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Update tags if provided
|
|
93
|
+
if (tags !== undefined) {
|
|
94
|
+
updateData.tags = Array.isArray(tags) ? tags : [];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Update location if provided
|
|
98
|
+
if (location !== undefined) {
|
|
99
|
+
updateData.location = location ? {
|
|
100
|
+
latitude: location.latitude,
|
|
101
|
+
longitude: location.longitude
|
|
102
|
+
} : null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Only proceed if there are updates
|
|
106
|
+
if (Object.keys(updateData).length === 0) {
|
|
107
|
+
return {
|
|
108
|
+
Success: true,
|
|
109
|
+
ResultCode: 'NO_CHANGES',
|
|
110
|
+
Message: 'No updates were provided',
|
|
111
|
+
Params
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Update the post
|
|
116
|
+
LogStatus(`Updating post ${postId}...`);
|
|
117
|
+
const response = await this.axiosInstance.patch(`/messages/${postId}`, updateData);
|
|
118
|
+
const updatedPost = response.data;
|
|
119
|
+
|
|
120
|
+
// Normalize the updated post
|
|
121
|
+
const normalizedPost = this.normalizePost(updatedPost);
|
|
122
|
+
|
|
123
|
+
// Update output parameters
|
|
124
|
+
const outputParams = [...Params];
|
|
125
|
+
const postParam = outputParams.find(p => p.Name === 'UpdatedPost');
|
|
126
|
+
if (postParam) postParam.Value = normalizedPost;
|
|
127
|
+
const changesSummaryParam = outputParams.find(p => p.Name === 'ChangesSummary');
|
|
128
|
+
if (changesSummaryParam) changesSummaryParam.Value = {
|
|
129
|
+
fieldsUpdated: Object.keys(updateData),
|
|
130
|
+
previousState: existingPost.state,
|
|
131
|
+
newState: updatedPost.state,
|
|
132
|
+
mediaChanges: {
|
|
133
|
+
before: existingPost.mediaIds?.length || 0,
|
|
134
|
+
after: updatedPost.mediaIds?.length || 0
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
Success: true,
|
|
140
|
+
ResultCode: 'SUCCESS',
|
|
141
|
+
Message: `Successfully updated scheduled post (ID: ${postId})`,
|
|
142
|
+
Params: outputParams
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
} catch (error) {
|
|
146
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
147
|
+
|
|
148
|
+
return {
|
|
149
|
+
Success: false,
|
|
150
|
+
ResultCode: 'ERROR',
|
|
151
|
+
Message: `Failed to update scheduled post: ${errorMessage}`,
|
|
152
|
+
Params
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Define the parameters this action expects
|
|
159
|
+
*/
|
|
160
|
+
public get Params(): ActionParam[] {
|
|
161
|
+
return [
|
|
162
|
+
...this.commonSocialParams,
|
|
163
|
+
{
|
|
164
|
+
Name: 'PostID',
|
|
165
|
+
Type: 'Input',
|
|
166
|
+
Value: null
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
Name: 'Content',
|
|
170
|
+
Type: 'Input',
|
|
171
|
+
Value: null
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
Name: 'ProfileIDs',
|
|
175
|
+
Type: 'Input',
|
|
176
|
+
Value: null
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
Name: 'ScheduledTime',
|
|
180
|
+
Type: 'Input',
|
|
181
|
+
Value: null
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
Name: 'MediaFiles',
|
|
185
|
+
Type: 'Input',
|
|
186
|
+
Value: null
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
Name: 'ReplaceMedia',
|
|
190
|
+
Type: 'Input',
|
|
191
|
+
Value: null
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
Name: 'Tags',
|
|
195
|
+
Type: 'Input',
|
|
196
|
+
Value: null
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
Name: 'Location',
|
|
200
|
+
Type: 'Input',
|
|
201
|
+
Value: null
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
Name: 'UpdatedPost',
|
|
205
|
+
Type: 'Output',
|
|
206
|
+
Value: null
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
Name: 'ChangesSummary',
|
|
210
|
+
Type: 'Output',
|
|
211
|
+
Value: null
|
|
212
|
+
}
|
|
213
|
+
];
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Get action description
|
|
218
|
+
*/
|
|
219
|
+
public get Description(): string {
|
|
220
|
+
return 'Updates a scheduled post in HootSuite. Only SCHEDULED and DRAFT posts can be updated.';
|
|
221
|
+
}
|
|
222
|
+
}
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { BaseSocialMediaAction, MediaFile, SocialPost, SearchParams } from '../../base/base-social.action';
|
|
3
|
+
import axios, { AxiosInstance, AxiosError } from 'axios';
|
|
4
|
+
import { ActionParam } from '@memberjunction/actions-base';
|
|
5
|
+
import { LogStatus, LogError } from '@memberjunction/core';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Base class for all HootSuite actions.
|
|
9
|
+
* Handles HootSuite-specific authentication, API interactions, and rate limiting.
|
|
10
|
+
*/
|
|
11
|
+
@RegisterClass(BaseSocialMediaAction, 'HootSuiteBaseAction')
|
|
12
|
+
export abstract class HootSuiteBaseAction extends BaseSocialMediaAction {
|
|
13
|
+
protected get platformName(): string {
|
|
14
|
+
return 'HootSuite';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
protected get apiBaseUrl(): string {
|
|
18
|
+
return 'https://platform.hootsuite.com/v1';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Axios instance for making HTTP requests
|
|
23
|
+
*/
|
|
24
|
+
private _axiosInstance: AxiosInstance | null = null;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Get or create axios instance with interceptors
|
|
28
|
+
*/
|
|
29
|
+
protected get axiosInstance(): AxiosInstance {
|
|
30
|
+
if (!this._axiosInstance) {
|
|
31
|
+
this._axiosInstance = axios.create({
|
|
32
|
+
baseURL: this.apiBaseUrl,
|
|
33
|
+
timeout: 30000,
|
|
34
|
+
headers: {
|
|
35
|
+
'Content-Type': 'application/json',
|
|
36
|
+
'Accept': 'application/json'
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Add request interceptor for auth
|
|
41
|
+
this._axiosInstance.interceptors.request.use(
|
|
42
|
+
(config) => {
|
|
43
|
+
const token = this.getAccessToken();
|
|
44
|
+
if (token) {
|
|
45
|
+
config.headers.Authorization = `Bearer ${token}`;
|
|
46
|
+
}
|
|
47
|
+
return config;
|
|
48
|
+
},
|
|
49
|
+
(error) => Promise.reject(error)
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
// Add response interceptor for rate limit handling
|
|
53
|
+
this._axiosInstance.interceptors.response.use(
|
|
54
|
+
(response) => {
|
|
55
|
+
// Log rate limit info
|
|
56
|
+
const rateLimitInfo = this.parseRateLimitHeaders(response.headers);
|
|
57
|
+
if (rateLimitInfo) {
|
|
58
|
+
LogStatus(`HootSuite Rate Limit - Remaining: ${rateLimitInfo.remaining}/${rateLimitInfo.limit}, Reset: ${rateLimitInfo.reset}`);
|
|
59
|
+
}
|
|
60
|
+
return response;
|
|
61
|
+
},
|
|
62
|
+
async (error: AxiosError) => {
|
|
63
|
+
if (error.response?.status === 429) {
|
|
64
|
+
// Rate limit exceeded
|
|
65
|
+
const retryAfter = error.response.headers['retry-after'];
|
|
66
|
+
const waitTime = retryAfter ? parseInt(retryAfter) : 60;
|
|
67
|
+
await this.handleRateLimit(waitTime);
|
|
68
|
+
|
|
69
|
+
// Retry the request
|
|
70
|
+
return this._axiosInstance!.request(error.config!);
|
|
71
|
+
}
|
|
72
|
+
return Promise.reject(error);
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
return this._axiosInstance;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Refresh the access token using the refresh token
|
|
81
|
+
*/
|
|
82
|
+
protected async refreshAccessToken(): Promise<void> {
|
|
83
|
+
const refreshToken = this.getRefreshToken();
|
|
84
|
+
if (!refreshToken) {
|
|
85
|
+
throw new Error('No refresh token available for HootSuite');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
try {
|
|
89
|
+
const response = await axios.post('https://platform.hootsuite.com/oauth2/token', {
|
|
90
|
+
grant_type: 'refresh_token',
|
|
91
|
+
refresh_token: refreshToken,
|
|
92
|
+
client_id: this.getCustomAttribute(2), // Client ID stored in CustomAttribute2
|
|
93
|
+
client_secret: this.getCustomAttribute(3) // Client Secret stored in CustomAttribute3
|
|
94
|
+
}, {
|
|
95
|
+
headers: {
|
|
96
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
const { access_token, refresh_token: newRefreshToken, expires_in } = response.data;
|
|
101
|
+
|
|
102
|
+
// Update stored tokens
|
|
103
|
+
await this.updateStoredTokens(
|
|
104
|
+
access_token,
|
|
105
|
+
newRefreshToken || refreshToken,
|
|
106
|
+
expires_in
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
LogStatus('HootSuite access token refreshed successfully');
|
|
110
|
+
} catch (error) {
|
|
111
|
+
LogError(`Failed to refresh HootSuite access token: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Upload media to HootSuite
|
|
118
|
+
*/
|
|
119
|
+
protected async uploadSingleMedia(file: MediaFile): Promise<string> {
|
|
120
|
+
try {
|
|
121
|
+
// First, request an upload URL
|
|
122
|
+
const uploadRequest = await this.axiosInstance.post('/media', {
|
|
123
|
+
mimeType: file.mimeType,
|
|
124
|
+
sizeBytes: file.size
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
const { uploadUrl, mediaId } = uploadRequest.data;
|
|
128
|
+
|
|
129
|
+
// Upload the file to the provided URL
|
|
130
|
+
const fileData = typeof file.data === 'string'
|
|
131
|
+
? Buffer.from(file.data, 'base64')
|
|
132
|
+
: file.data;
|
|
133
|
+
|
|
134
|
+
await axios.put(uploadUrl, fileData, {
|
|
135
|
+
headers: {
|
|
136
|
+
'Content-Type': file.mimeType,
|
|
137
|
+
'Content-Length': file.size.toString()
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
// Wait for processing
|
|
142
|
+
await this.waitForMediaProcessing(mediaId);
|
|
143
|
+
|
|
144
|
+
return mediaId;
|
|
145
|
+
} catch (error) {
|
|
146
|
+
LogError(`Failed to upload media to HootSuite: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
147
|
+
throw error;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Wait for media to finish processing
|
|
153
|
+
*/
|
|
154
|
+
private async waitForMediaProcessing(mediaId: string, maxAttempts: number = 30): Promise<void> {
|
|
155
|
+
for (let i = 0; i < maxAttempts; i++) {
|
|
156
|
+
try {
|
|
157
|
+
const response = await this.axiosInstance.get(`/media/${mediaId}`);
|
|
158
|
+
const { state } = response.data;
|
|
159
|
+
|
|
160
|
+
if (state === 'READY') {
|
|
161
|
+
return;
|
|
162
|
+
} else if (state === 'FAILED') {
|
|
163
|
+
throw new Error('Media processing failed');
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Wait 2 seconds before next check
|
|
167
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
168
|
+
} catch (error) {
|
|
169
|
+
if (i === maxAttempts - 1) {
|
|
170
|
+
throw new Error(`Media processing timeout for ${mediaId}`);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Get social profiles for the authenticated user
|
|
178
|
+
*/
|
|
179
|
+
protected async getSocialProfiles(): Promise<HootSuiteProfile[]> {
|
|
180
|
+
try {
|
|
181
|
+
const response = await this.axiosInstance.get('/socialProfiles');
|
|
182
|
+
return response.data.data || [];
|
|
183
|
+
} catch (error) {
|
|
184
|
+
LogError(`Failed to get social profiles: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
185
|
+
throw error;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Make a paginated request to HootSuite API
|
|
191
|
+
*/
|
|
192
|
+
protected async makePaginatedRequest<T>(
|
|
193
|
+
endpoint: string,
|
|
194
|
+
params: Record<string, any> = {}
|
|
195
|
+
): Promise<T[]> {
|
|
196
|
+
const results: T[] = [];
|
|
197
|
+
let cursor: string | null = null;
|
|
198
|
+
const limit = params.limit || 50;
|
|
199
|
+
|
|
200
|
+
do {
|
|
201
|
+
const queryParams: any = { ...params, limit };
|
|
202
|
+
if (cursor) {
|
|
203
|
+
queryParams.cursor = cursor;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const response = await this.axiosInstance.get(endpoint, { params: queryParams });
|
|
207
|
+
const data = response.data;
|
|
208
|
+
|
|
209
|
+
if (data.data && Array.isArray(data.data)) {
|
|
210
|
+
results.push(...data.data);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
cursor = data.cursor || null;
|
|
214
|
+
|
|
215
|
+
// Check if we've reached the desired number of results
|
|
216
|
+
if (params.maxResults && results.length >= params.maxResults) {
|
|
217
|
+
return results.slice(0, params.maxResults);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
} while (cursor);
|
|
221
|
+
|
|
222
|
+
return results;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Format date for HootSuite API (ISO 8601)
|
|
227
|
+
*/
|
|
228
|
+
protected formatHootSuiteDate(date: Date | string): string {
|
|
229
|
+
if (typeof date === 'string') {
|
|
230
|
+
date = new Date(date);
|
|
231
|
+
}
|
|
232
|
+
return date.toISOString();
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Parse HootSuite date string
|
|
237
|
+
*/
|
|
238
|
+
protected parseHootSuiteDate(dateString: string): Date {
|
|
239
|
+
return new Date(dateString);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Convert HootSuite post to common format
|
|
244
|
+
*/
|
|
245
|
+
protected normalizePost(hootsuitePost: HootSuitePost): SocialPost {
|
|
246
|
+
return {
|
|
247
|
+
id: hootsuitePost.id,
|
|
248
|
+
platform: 'HootSuite',
|
|
249
|
+
profileId: hootsuitePost.socialProfileIds.join(','), // Multiple profiles possible
|
|
250
|
+
content: hootsuitePost.text,
|
|
251
|
+
mediaUrls: hootsuitePost.mediaIds || [],
|
|
252
|
+
publishedAt: this.parseHootSuiteDate(hootsuitePost.createdTime),
|
|
253
|
+
scheduledFor: hootsuitePost.scheduledTime ? this.parseHootSuiteDate(hootsuitePost.scheduledTime) : undefined,
|
|
254
|
+
platformSpecificData: {
|
|
255
|
+
state: hootsuitePost.state,
|
|
256
|
+
tags: hootsuitePost.tags,
|
|
257
|
+
location: hootsuitePost.location,
|
|
258
|
+
socialProfileIds: hootsuitePost.socialProfileIds
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Search for posts - implemented in search action
|
|
265
|
+
*/
|
|
266
|
+
protected async searchPosts(params: SearchParams): Promise<SocialPost[]> {
|
|
267
|
+
// This is implemented in the search-posts.action.ts
|
|
268
|
+
throw new Error('Search posts is implemented in HootSuiteSearchPostsAction');
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Handle HootSuite-specific errors
|
|
273
|
+
*/
|
|
274
|
+
protected handleHootSuiteError(error: AxiosError): never {
|
|
275
|
+
if (error.response) {
|
|
276
|
+
const { status, data } = error.response;
|
|
277
|
+
const errorData = data as any;
|
|
278
|
+
|
|
279
|
+
switch (status) {
|
|
280
|
+
case 400:
|
|
281
|
+
throw new Error(`Bad Request: ${errorData.message || 'Invalid request parameters'}`);
|
|
282
|
+
case 401:
|
|
283
|
+
throw new Error('Unauthorized: Invalid or expired access token');
|
|
284
|
+
case 403:
|
|
285
|
+
throw new Error('Forbidden: Insufficient permissions');
|
|
286
|
+
case 404:
|
|
287
|
+
throw new Error('Not Found: Resource does not exist');
|
|
288
|
+
case 429:
|
|
289
|
+
throw new Error('Rate Limit Exceeded: Too many requests');
|
|
290
|
+
case 500:
|
|
291
|
+
throw new Error('Internal Server Error: HootSuite service error');
|
|
292
|
+
default:
|
|
293
|
+
throw new Error(`HootSuite API Error (${status}): ${errorData.message || 'Unknown error'}`);
|
|
294
|
+
}
|
|
295
|
+
} else if (error.request) {
|
|
296
|
+
throw new Error('Network Error: No response from HootSuite');
|
|
297
|
+
} else {
|
|
298
|
+
throw new Error(`Request Error: ${error.message}`);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* HootSuite-specific interfaces
|
|
305
|
+
*/
|
|
306
|
+
export interface HootSuiteProfile {
|
|
307
|
+
id: string;
|
|
308
|
+
socialNetworkId: string;
|
|
309
|
+
socialNetworkUserId: string;
|
|
310
|
+
avatarUrl: string;
|
|
311
|
+
displayName: string;
|
|
312
|
+
type: string;
|
|
313
|
+
ownerId: string;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export interface HootSuitePost {
|
|
317
|
+
id: string;
|
|
318
|
+
socialProfileIds: string[];
|
|
319
|
+
text: string;
|
|
320
|
+
scheduledTime?: string;
|
|
321
|
+
createdTime: string;
|
|
322
|
+
state: 'SCHEDULED' | 'PUBLISHED' | 'FAILED' | 'DRAFT';
|
|
323
|
+
mediaIds?: string[];
|
|
324
|
+
tags?: string[];
|
|
325
|
+
location?: {
|
|
326
|
+
latitude: number;
|
|
327
|
+
longitude: number;
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface HootSuiteAnalytics {
|
|
332
|
+
postId: string;
|
|
333
|
+
metrics: {
|
|
334
|
+
likes: number;
|
|
335
|
+
comments: number;
|
|
336
|
+
shares: number;
|
|
337
|
+
clicks: number;
|
|
338
|
+
impressions: number;
|
|
339
|
+
engagements: number;
|
|
340
|
+
reach: number;
|
|
341
|
+
};
|
|
342
|
+
period: {
|
|
343
|
+
start: string;
|
|
344
|
+
end: string;
|
|
345
|
+
};
|
|
346
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Export base class
|
|
2
|
+
export * from './hootsuite-base.action';
|
|
3
|
+
|
|
4
|
+
// Export all HootSuite actions
|
|
5
|
+
export * from './actions/get-scheduled-posts.action';
|
|
6
|
+
export * from './actions/create-scheduled-post.action';
|
|
7
|
+
export * from './actions/get-analytics.action';
|
|
8
|
+
export * from './actions/get-social-profiles.action';
|
|
9
|
+
export * from './actions/update-scheduled-post.action';
|
|
10
|
+
export * from './actions/delete-scheduled-post.action';
|
|
11
|
+
export * from './actions/bulk-schedule-posts.action';
|
|
12
|
+
export * from './actions/search-posts.action';
|