@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,293 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { HootSuiteBaseAction, HootSuitePost } from '../hootsuite-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { LogStatus, LogError } from '@memberjunction/core';
|
|
5
|
+
import { MediaFile } from '../../../base/base-social.action';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Interface for bulk post data
|
|
9
|
+
*/
|
|
10
|
+
interface BulkPostData {
|
|
11
|
+
content: string;
|
|
12
|
+
scheduledTime?: string;
|
|
13
|
+
profileIds?: string[];
|
|
14
|
+
mediaFiles?: MediaFile[];
|
|
15
|
+
tags?: string[];
|
|
16
|
+
location?: { latitude: number; longitude: number; };
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Action to bulk schedule multiple posts in HootSuite
|
|
21
|
+
*/
|
|
22
|
+
@RegisterClass(HootSuiteBaseAction, 'HootSuiteBulkSchedulePostsAction')
|
|
23
|
+
export class HootSuiteBulkSchedulePostsAction extends HootSuiteBaseAction {
|
|
24
|
+
/**
|
|
25
|
+
* Bulk schedule posts in HootSuite
|
|
26
|
+
*/
|
|
27
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
28
|
+
const { Params, ContextUser } = params;
|
|
29
|
+
|
|
30
|
+
try {
|
|
31
|
+
// Initialize OAuth
|
|
32
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
33
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
34
|
+
throw new Error('Failed to initialize OAuth connection');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Extract parameters
|
|
38
|
+
const posts = this.getParamValue(Params, 'Posts') as BulkPostData[];
|
|
39
|
+
const defaultProfileIds = this.getParamValue(Params, 'DefaultProfileIDs');
|
|
40
|
+
const scheduleInterval = this.getParamValue(Params, 'ScheduleInterval');
|
|
41
|
+
const startTime = this.getParamValue(Params, 'StartTime');
|
|
42
|
+
const skipOnError = this.getParamValue(Params, 'SkipOnError') || true;
|
|
43
|
+
const validateOnly = this.getParamValue(Params, 'ValidateOnly') || false;
|
|
44
|
+
|
|
45
|
+
// Validate required parameters
|
|
46
|
+
if (!posts || !Array.isArray(posts) || posts.length === 0) {
|
|
47
|
+
throw new Error('Posts array is required and must not be empty');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Get default profiles if not specified
|
|
51
|
+
let defaultProfiles: string[] = [];
|
|
52
|
+
if (defaultProfileIds && Array.isArray(defaultProfileIds)) {
|
|
53
|
+
defaultProfiles = defaultProfileIds;
|
|
54
|
+
} else if (defaultProfileIds && typeof defaultProfileIds === 'string') {
|
|
55
|
+
defaultProfiles = [defaultProfileIds];
|
|
56
|
+
} else {
|
|
57
|
+
// Get all available profiles as default
|
|
58
|
+
const profiles = await this.getSocialProfiles();
|
|
59
|
+
if (profiles.length === 0) {
|
|
60
|
+
throw new Error('No social profiles found. Please specify DefaultProfileIDs.');
|
|
61
|
+
}
|
|
62
|
+
defaultProfiles = profiles.map(p => p.id);
|
|
63
|
+
LogStatus(`Using ${defaultProfiles.length} default profiles`);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Calculate schedule times if interval is specified
|
|
67
|
+
let baseScheduleTime: Date | null = null;
|
|
68
|
+
if (scheduleInterval && startTime) {
|
|
69
|
+
baseScheduleTime = new Date(startTime);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Process posts
|
|
73
|
+
const results: any[] = [];
|
|
74
|
+
const errors: any[] = [];
|
|
75
|
+
let successCount = 0;
|
|
76
|
+
let failureCount = 0;
|
|
77
|
+
|
|
78
|
+
LogStatus(`Processing ${posts.length} posts for bulk scheduling...`);
|
|
79
|
+
|
|
80
|
+
for (let i = 0; i < posts.length; i++) {
|
|
81
|
+
const post = posts[i];
|
|
82
|
+
const postIndex = i + 1;
|
|
83
|
+
|
|
84
|
+
try {
|
|
85
|
+
// Validate post data
|
|
86
|
+
this.validateBulkPost(post, postIndex);
|
|
87
|
+
|
|
88
|
+
// Calculate scheduled time for this post
|
|
89
|
+
let scheduledTime = post.scheduledTime;
|
|
90
|
+
if (!scheduledTime && baseScheduleTime && scheduleInterval) {
|
|
91
|
+
const offsetMinutes = i * scheduleInterval;
|
|
92
|
+
const postScheduleTime = new Date(baseScheduleTime);
|
|
93
|
+
postScheduleTime.setMinutes(postScheduleTime.getMinutes() + offsetMinutes);
|
|
94
|
+
scheduledTime = postScheduleTime.toISOString();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Prepare profile IDs
|
|
98
|
+
const profileIds = post.profileIds || defaultProfiles;
|
|
99
|
+
|
|
100
|
+
// If validate only, just check the data
|
|
101
|
+
if (validateOnly) {
|
|
102
|
+
results.push({
|
|
103
|
+
index: postIndex,
|
|
104
|
+
status: 'VALIDATED',
|
|
105
|
+
content: post.content.substring(0, 50) + '...',
|
|
106
|
+
scheduledTime: scheduledTime,
|
|
107
|
+
profileCount: profileIds.length
|
|
108
|
+
});
|
|
109
|
+
successCount++;
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Upload media if provided
|
|
114
|
+
let mediaIds: string[] = [];
|
|
115
|
+
if (post.mediaFiles && Array.isArray(post.mediaFiles)) {
|
|
116
|
+
LogStatus(`Uploading ${post.mediaFiles.length} media files for post ${postIndex}...`);
|
|
117
|
+
mediaIds = await this.uploadMedia(post.mediaFiles);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Create the post
|
|
121
|
+
const postData: any = {
|
|
122
|
+
text: post.content,
|
|
123
|
+
socialProfileIds: profileIds,
|
|
124
|
+
scheduledTime: scheduledTime ? this.formatHootSuiteDate(scheduledTime) : undefined,
|
|
125
|
+
mediaIds: mediaIds.length > 0 ? mediaIds : undefined,
|
|
126
|
+
tags: post.tags,
|
|
127
|
+
location: post.location
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const response = await this.axiosInstance.post('/messages', postData);
|
|
131
|
+
const createdPost = response.data;
|
|
132
|
+
|
|
133
|
+
results.push({
|
|
134
|
+
index: postIndex,
|
|
135
|
+
status: 'SUCCESS',
|
|
136
|
+
postId: createdPost.id,
|
|
137
|
+
content: post.content.substring(0, 50) + '...',
|
|
138
|
+
scheduledTime: createdPost.scheduledTime,
|
|
139
|
+
profileCount: profileIds.length
|
|
140
|
+
});
|
|
141
|
+
successCount++;
|
|
142
|
+
|
|
143
|
+
} catch (error) {
|
|
144
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
145
|
+
|
|
146
|
+
errors.push({
|
|
147
|
+
index: postIndex,
|
|
148
|
+
content: post.content.substring(0, 50) + '...',
|
|
149
|
+
error: errorMessage
|
|
150
|
+
});
|
|
151
|
+
failureCount++;
|
|
152
|
+
|
|
153
|
+
if (!skipOnError) {
|
|
154
|
+
throw new Error(`Failed at post ${postIndex}: ${errorMessage}`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Log progress every 10 posts
|
|
159
|
+
if (i > 0 && (i + 1) % 10 === 0) {
|
|
160
|
+
LogStatus(`Processed ${i + 1}/${posts.length} posts...`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Create summary
|
|
165
|
+
const summary = {
|
|
166
|
+
totalPosts: posts.length,
|
|
167
|
+
successCount: successCount,
|
|
168
|
+
failureCount: failureCount,
|
|
169
|
+
validationOnly: validateOnly,
|
|
170
|
+
processingTime: new Date().toISOString(),
|
|
171
|
+
scheduleRange: baseScheduleTime ? {
|
|
172
|
+
start: baseScheduleTime.toISOString(),
|
|
173
|
+
end: new Date(baseScheduleTime.getTime() + (posts.length - 1) * (scheduleInterval || 0) * 60000).toISOString()
|
|
174
|
+
} : null
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
// Update output parameters
|
|
178
|
+
const outputParams = [...Params];
|
|
179
|
+
const resultsParam = outputParams.find(p => p.Name === 'Results');
|
|
180
|
+
if (resultsParam) resultsParam.Value = results;
|
|
181
|
+
const errorsParam = outputParams.find(p => p.Name === 'Errors');
|
|
182
|
+
if (errorsParam) errorsParam.Value = errors;
|
|
183
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
184
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
185
|
+
|
|
186
|
+
const resultCode = failureCount === 0 ? 'SUCCESS' : (successCount > 0 ? 'PARTIAL_SUCCESS' : 'FAILED');
|
|
187
|
+
const message = validateOnly
|
|
188
|
+
? `Validated ${successCount} posts, ${failureCount} failed validation`
|
|
189
|
+
: `Successfully scheduled ${successCount} posts, ${failureCount} failed`;
|
|
190
|
+
|
|
191
|
+
return {
|
|
192
|
+
Success: failureCount === 0 || (skipOnError && successCount > 0),
|
|
193
|
+
ResultCode: resultCode,
|
|
194
|
+
Message: message,
|
|
195
|
+
Params: outputParams
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
} catch (error) {
|
|
199
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
200
|
+
|
|
201
|
+
return {
|
|
202
|
+
Success: false,
|
|
203
|
+
ResultCode: 'ERROR',
|
|
204
|
+
Message: `Failed to bulk schedule posts: ${errorMessage}`,
|
|
205
|
+
Params
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Validate bulk post data
|
|
212
|
+
*/
|
|
213
|
+
private validateBulkPost(post: BulkPostData, index: number): void {
|
|
214
|
+
if (!post.content || typeof post.content !== 'string' || post.content.trim().length === 0) {
|
|
215
|
+
throw new Error(`Post ${index}: Content is required and must not be empty`);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if (post.content.length > 10000) {
|
|
219
|
+
throw new Error(`Post ${index}: Content exceeds maximum length of 10000 characters`);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (post.scheduledTime && isNaN(Date.parse(post.scheduledTime))) {
|
|
223
|
+
throw new Error(`Post ${index}: Invalid scheduled time format`);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (post.location) {
|
|
227
|
+
if (typeof post.location.latitude !== 'number' || typeof post.location.longitude !== 'number') {
|
|
228
|
+
throw new Error(`Post ${index}: Location must have numeric latitude and longitude`);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Define the parameters this action expects
|
|
235
|
+
*/
|
|
236
|
+
public get Params(): ActionParam[] {
|
|
237
|
+
return [
|
|
238
|
+
...this.oauthParams,
|
|
239
|
+
{
|
|
240
|
+
Name: 'Posts',
|
|
241
|
+
Type: 'Input',
|
|
242
|
+
Value: null
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
Name: 'DefaultProfileIDs',
|
|
246
|
+
Type: 'Input',
|
|
247
|
+
Value: null
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
Name: 'ScheduleInterval',
|
|
251
|
+
Type: 'Input',
|
|
252
|
+
Value: null
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
Name: 'StartTime',
|
|
256
|
+
Type: 'Input',
|
|
257
|
+
Value: null
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
Name: 'SkipOnError',
|
|
261
|
+
Type: 'Input',
|
|
262
|
+
Value: null
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
Name: 'ValidateOnly',
|
|
266
|
+
Type: 'Input',
|
|
267
|
+
Value: null
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
Name: 'Results',
|
|
271
|
+
Type: 'Output',
|
|
272
|
+
Value: null
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
Name: 'Errors',
|
|
276
|
+
Type: 'Output',
|
|
277
|
+
Value: null
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
Name: 'Summary',
|
|
281
|
+
Type: 'Output',
|
|
282
|
+
Value: null
|
|
283
|
+
}
|
|
284
|
+
];
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Get action description
|
|
289
|
+
*/
|
|
290
|
+
public get Description(): string {
|
|
291
|
+
return 'Bulk schedules multiple posts to HootSuite with support for auto-scheduling intervals and validation';
|
|
292
|
+
}
|
|
293
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
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 create a scheduled post in HootSuite
|
|
9
|
+
*/
|
|
10
|
+
@RegisterClass(HootSuiteBaseAction, 'HootSuiteCreateScheduledPostAction')
|
|
11
|
+
export class HootSuiteCreateScheduledPostAction extends HootSuiteBaseAction {
|
|
12
|
+
/**
|
|
13
|
+
* Create 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 content = this.getParamValue(Params, 'Content');
|
|
27
|
+
const profileIds = this.getParamValue(Params, 'ProfileIDs');
|
|
28
|
+
const scheduledTime = this.getParamValue(Params, 'ScheduledTime');
|
|
29
|
+
const mediaFiles = this.getParamValue(Params, 'MediaFiles');
|
|
30
|
+
const tags = this.getParamValue(Params, 'Tags');
|
|
31
|
+
const location = this.getParamValue(Params, 'Location');
|
|
32
|
+
const targetingOptions = this.getParamValue(Params, 'TargetingOptions');
|
|
33
|
+
|
|
34
|
+
// Validate required parameters
|
|
35
|
+
if (!content) {
|
|
36
|
+
throw new Error('Content is required');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Get profile IDs - either from parameter or default profiles
|
|
40
|
+
let socialProfileIds: string[] = [];
|
|
41
|
+
if (profileIds && Array.isArray(profileIds)) {
|
|
42
|
+
socialProfileIds = profileIds;
|
|
43
|
+
} else if (profileIds && typeof profileIds === 'string') {
|
|
44
|
+
socialProfileIds = [profileIds];
|
|
45
|
+
} else {
|
|
46
|
+
// Get default profiles if none specified
|
|
47
|
+
const profiles = await this.getSocialProfiles();
|
|
48
|
+
if (profiles.length === 0) {
|
|
49
|
+
throw new Error('No social profiles found. Please specify ProfileIDs.');
|
|
50
|
+
}
|
|
51
|
+
socialProfileIds = profiles.map(p => p.id);
|
|
52
|
+
LogStatus(`Using ${socialProfileIds.length} default profiles`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Upload media if provided
|
|
56
|
+
let mediaIds: string[] = [];
|
|
57
|
+
if (mediaFiles && Array.isArray(mediaFiles)) {
|
|
58
|
+
LogStatus(`Uploading ${mediaFiles.length} media files...`);
|
|
59
|
+
mediaIds = await this.uploadMedia(mediaFiles as MediaFile[]);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Build post data
|
|
63
|
+
const postData: any = {
|
|
64
|
+
text: content,
|
|
65
|
+
socialProfileIds: socialProfileIds,
|
|
66
|
+
scheduledTime: scheduledTime ? this.formatHootSuiteDate(scheduledTime) : undefined,
|
|
67
|
+
mediaIds: mediaIds.length > 0 ? mediaIds : undefined,
|
|
68
|
+
tags: tags && Array.isArray(tags) ? tags : undefined,
|
|
69
|
+
location: location ? {
|
|
70
|
+
latitude: location.latitude,
|
|
71
|
+
longitude: location.longitude
|
|
72
|
+
} : undefined
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// Add targeting options if provided
|
|
76
|
+
if (targetingOptions) {
|
|
77
|
+
postData.targeting = targetingOptions;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Create the post
|
|
81
|
+
LogStatus('Creating scheduled post...');
|
|
82
|
+
const response = await this.axiosInstance.post('/messages', postData);
|
|
83
|
+
const createdPost = response.data;
|
|
84
|
+
|
|
85
|
+
// Normalize the created post
|
|
86
|
+
const normalizedPost = this.normalizePost(createdPost);
|
|
87
|
+
|
|
88
|
+
// Update output parameters
|
|
89
|
+
const outputParams = [...Params];
|
|
90
|
+
const postParam = outputParams.find(p => p.Name === 'CreatedPost');
|
|
91
|
+
if (postParam) postParam.Value = normalizedPost;
|
|
92
|
+
const postIdParam = outputParams.find(p => p.Name === 'PostID');
|
|
93
|
+
if (postIdParam) postIdParam.Value = createdPost.id;
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
Success: true,
|
|
97
|
+
ResultCode: 'SUCCESS',
|
|
98
|
+
Message: `Successfully created scheduled post (ID: ${createdPost.id})`,
|
|
99
|
+
Params: outputParams
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
} catch (error) {
|
|
103
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
104
|
+
|
|
105
|
+
return {
|
|
106
|
+
Success: false,
|
|
107
|
+
ResultCode: 'ERROR',
|
|
108
|
+
Message: `Failed to create scheduled post: ${errorMessage}`,
|
|
109
|
+
Params
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Validate media files before upload
|
|
116
|
+
*/
|
|
117
|
+
protected validateMediaFile(file: MediaFile): void {
|
|
118
|
+
// HootSuite-specific media limits
|
|
119
|
+
const supportedTypes = [
|
|
120
|
+
'image/jpeg',
|
|
121
|
+
'image/png',
|
|
122
|
+
'image/gif',
|
|
123
|
+
'video/mp4',
|
|
124
|
+
'video/quicktime'
|
|
125
|
+
];
|
|
126
|
+
|
|
127
|
+
if (!supportedTypes.includes(file.mimeType)) {
|
|
128
|
+
throw new Error(`Unsupported media type: ${file.mimeType}. Supported types: ${supportedTypes.join(', ')}`);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Check file sizes
|
|
132
|
+
const maxSizes: Record<string, number> = {
|
|
133
|
+
'image/jpeg': 10 * 1024 * 1024, // 10MB
|
|
134
|
+
'image/png': 10 * 1024 * 1024, // 10MB
|
|
135
|
+
'image/gif': 15 * 1024 * 1024, // 15MB
|
|
136
|
+
'video/mp4': 500 * 1024 * 1024, // 500MB
|
|
137
|
+
'video/quicktime': 500 * 1024 * 1024 // 500MB
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const maxSize = maxSizes[file.mimeType];
|
|
141
|
+
if (file.size > maxSize) {
|
|
142
|
+
throw new Error(`File size exceeds limit for ${file.mimeType}. Max: ${maxSize / 1024 / 1024}MB, Got: ${file.size / 1024 / 1024}MB`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Define the parameters this action expects
|
|
148
|
+
*/
|
|
149
|
+
public get Params(): ActionParam[] {
|
|
150
|
+
return [
|
|
151
|
+
...this.commonSocialParams,
|
|
152
|
+
{
|
|
153
|
+
Name: 'Content',
|
|
154
|
+
Type: 'Input',
|
|
155
|
+
Value: null
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
Name: 'ProfileIDs',
|
|
159
|
+
Type: 'Input',
|
|
160
|
+
Value: null
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
Name: 'ScheduledTime',
|
|
164
|
+
Type: 'Input',
|
|
165
|
+
Value: null
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
Name: 'MediaFiles',
|
|
169
|
+
Type: 'Input',
|
|
170
|
+
Value: null
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
Name: 'Tags',
|
|
174
|
+
Type: 'Input',
|
|
175
|
+
Value: null
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
Name: 'Location',
|
|
179
|
+
Type: 'Input',
|
|
180
|
+
Value: null
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
Name: 'TargetingOptions',
|
|
184
|
+
Type: 'Input',
|
|
185
|
+
Value: null
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
Name: 'CreatedPost',
|
|
189
|
+
Type: 'Output',
|
|
190
|
+
Value: null
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
Name: 'PostID',
|
|
194
|
+
Type: 'Output',
|
|
195
|
+
Value: null
|
|
196
|
+
}
|
|
197
|
+
];
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Get action description
|
|
202
|
+
*/
|
|
203
|
+
public get Description(): string {
|
|
204
|
+
return 'Creates a scheduled post in HootSuite with support for multiple social profiles, media attachments, and scheduling';
|
|
205
|
+
}
|
|
206
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Action to delete a scheduled post from HootSuite
|
|
7
|
+
*/
|
|
8
|
+
@RegisterClass(HootSuiteBaseAction, 'HootSuiteDeleteScheduledPostAction')
|
|
9
|
+
export class HootSuiteDeleteScheduledPostAction extends HootSuiteBaseAction {
|
|
10
|
+
/**
|
|
11
|
+
* Delete a scheduled post from HootSuite
|
|
12
|
+
*/
|
|
13
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
14
|
+
const { Params, ContextUser } = params;
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
// Initialize OAuth
|
|
18
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
19
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
20
|
+
throw new Error('Failed to initialize OAuth connection');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Extract parameters
|
|
24
|
+
const postId = this.getParamValue(Params, 'PostID');
|
|
25
|
+
const confirmDeletion = this.getParamValue(Params, 'ConfirmDeletion') || false;
|
|
26
|
+
|
|
27
|
+
// Validate required parameters
|
|
28
|
+
if (!postId) {
|
|
29
|
+
throw new Error('PostID is required');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Safety check - require confirmation
|
|
33
|
+
if (!confirmDeletion) {
|
|
34
|
+
return {
|
|
35
|
+
Success: false,
|
|
36
|
+
ResultCode: 'CONFIRMATION_REQUIRED',
|
|
37
|
+
Message: 'Deletion not confirmed. Set ConfirmDeletion to true to proceed.',
|
|
38
|
+
Params
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// First, get the post details to verify it exists and can be deleted
|
|
43
|
+
LogStatus(`Fetching post ${postId} details...`);
|
|
44
|
+
let postDetails: any;
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
const response = await this.axiosInstance.get(`/messages/${postId}`);
|
|
48
|
+
postDetails = response.data;
|
|
49
|
+
} catch (error: any) {
|
|
50
|
+
if (error.response?.status === 404) {
|
|
51
|
+
return {
|
|
52
|
+
Success: false,
|
|
53
|
+
ResultCode: 'POST_NOT_FOUND',
|
|
54
|
+
Message: `Post with ID ${postId} not found`,
|
|
55
|
+
Params
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Check if post can be deleted
|
|
62
|
+
if (postDetails.state === 'PUBLISHED') {
|
|
63
|
+
return {
|
|
64
|
+
Success: false,
|
|
65
|
+
ResultCode: 'CANNOT_DELETE_PUBLISHED',
|
|
66
|
+
Message: 'Cannot delete published posts. Only scheduled, draft, or failed posts can be deleted.',
|
|
67
|
+
Params
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Store post details before deletion
|
|
72
|
+
const deletedPostInfo = {
|
|
73
|
+
id: postDetails.id,
|
|
74
|
+
content: postDetails.text,
|
|
75
|
+
state: postDetails.state,
|
|
76
|
+
scheduledTime: postDetails.scheduledTime,
|
|
77
|
+
profiles: postDetails.socialProfileIds,
|
|
78
|
+
mediaCount: postDetails.mediaIds?.length || 0,
|
|
79
|
+
tags: postDetails.tags || [],
|
|
80
|
+
deletedAt: new Date().toISOString()
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Delete the post
|
|
84
|
+
LogStatus(`Deleting post ${postId}...`);
|
|
85
|
+
await this.axiosInstance.delete(`/messages/${postId}`);
|
|
86
|
+
|
|
87
|
+
// Verify deletion by trying to fetch the post again
|
|
88
|
+
let verificationFailed = false;
|
|
89
|
+
try {
|
|
90
|
+
await this.axiosInstance.get(`/messages/${postId}`);
|
|
91
|
+
verificationFailed = true;
|
|
92
|
+
} catch (error: any) {
|
|
93
|
+
if (error.response?.status !== 404) {
|
|
94
|
+
verificationFailed = true;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (verificationFailed) {
|
|
99
|
+
LogStatus('Warning: Post deletion could not be verified');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Update output parameters
|
|
103
|
+
const outputParams = [...Params];
|
|
104
|
+
const deletedPostParam = outputParams.find(p => p.Name === 'DeletedPostInfo');
|
|
105
|
+
if (deletedPostParam) deletedPostParam.Value = deletedPostInfo;
|
|
106
|
+
const deletionVerifiedParam = outputParams.find(p => p.Name === 'DeletionVerified');
|
|
107
|
+
if (deletionVerifiedParam) deletionVerifiedParam.Value = !verificationFailed;
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
Success: true,
|
|
111
|
+
ResultCode: 'SUCCESS',
|
|
112
|
+
Message: `Successfully deleted post ${postId}`,
|
|
113
|
+
Params: outputParams
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
} catch (error) {
|
|
117
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
118
|
+
|
|
119
|
+
// Handle specific error cases
|
|
120
|
+
if (error instanceof Error && error.message.includes('404')) {
|
|
121
|
+
return {
|
|
122
|
+
Success: false,
|
|
123
|
+
ResultCode: 'POST_NOT_FOUND',
|
|
124
|
+
Message: `Post ${this.getParamValue(Params, 'PostID')} not found or already deleted`,
|
|
125
|
+
Params
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
Success: false,
|
|
131
|
+
ResultCode: 'ERROR',
|
|
132
|
+
Message: `Failed to delete scheduled post: ${errorMessage}`,
|
|
133
|
+
Params
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Define the parameters this action expects
|
|
140
|
+
*/
|
|
141
|
+
public get Params(): ActionParam[] {
|
|
142
|
+
return [
|
|
143
|
+
...this.oauthParams,
|
|
144
|
+
{
|
|
145
|
+
Name: 'PostID',
|
|
146
|
+
Type: 'Input',
|
|
147
|
+
Value: null
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
Name: 'ConfirmDeletion',
|
|
151
|
+
Type: 'Input',
|
|
152
|
+
Value: null
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
Name: 'DeletedPostInfo',
|
|
156
|
+
Type: 'Output',
|
|
157
|
+
Value: null
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
Name: 'DeletionVerified',
|
|
161
|
+
Type: 'Output',
|
|
162
|
+
Value: null
|
|
163
|
+
}
|
|
164
|
+
];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Get action description
|
|
169
|
+
*/
|
|
170
|
+
public get Description(): string {
|
|
171
|
+
return 'Deletes a scheduled post from HootSuite. Only SCHEDULED, DRAFT, or FAILED posts can be deleted. Published posts cannot be deleted.';
|
|
172
|
+
}
|
|
173
|
+
}
|