@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,270 @@
|
|
|
1
|
+
import { BaseOAuthAction } from '@memberjunction/actions';
|
|
2
|
+
import { ActionParam } from '@memberjunction/actions-base';
|
|
3
|
+
import { LogStatus, LogError } from '@memberjunction/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Common interfaces for social media actions
|
|
7
|
+
*/
|
|
8
|
+
export interface SocialPost {
|
|
9
|
+
id: string;
|
|
10
|
+
platform: string;
|
|
11
|
+
profileId: string;
|
|
12
|
+
content: string;
|
|
13
|
+
mediaUrls: string[];
|
|
14
|
+
publishedAt: Date;
|
|
15
|
+
scheduledFor?: Date;
|
|
16
|
+
analytics?: SocialAnalytics;
|
|
17
|
+
platformSpecificData: Record<string, any>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface SocialAnalytics {
|
|
21
|
+
impressions: number;
|
|
22
|
+
engagements: number;
|
|
23
|
+
clicks: number;
|
|
24
|
+
shares: number;
|
|
25
|
+
comments: number;
|
|
26
|
+
likes: number;
|
|
27
|
+
reach: number;
|
|
28
|
+
saves?: number;
|
|
29
|
+
videoViews?: number;
|
|
30
|
+
platformMetrics: Record<string, any>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface SearchParams {
|
|
34
|
+
query?: string;
|
|
35
|
+
hashtags?: string[];
|
|
36
|
+
startDate?: Date;
|
|
37
|
+
endDate?: Date;
|
|
38
|
+
limit?: number;
|
|
39
|
+
offset?: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface MediaFile {
|
|
43
|
+
filename: string;
|
|
44
|
+
mimeType: string;
|
|
45
|
+
data: Buffer | string; // Base64 or buffer
|
|
46
|
+
size: number;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export enum SocialMediaErrorCode {
|
|
50
|
+
RATE_LIMIT_EXCEEDED = 'RATE_LIMIT',
|
|
51
|
+
INVALID_TOKEN = 'INVALID_TOKEN',
|
|
52
|
+
TOKEN_EXPIRED = 'TOKEN_EXPIRED',
|
|
53
|
+
PLATFORM_ERROR = 'PLATFORM_ERROR',
|
|
54
|
+
INVALID_MEDIA = 'INVALID_MEDIA',
|
|
55
|
+
POST_NOT_FOUND = 'POST_NOT_FOUND',
|
|
56
|
+
INSUFFICIENT_PERMISSIONS = 'INSUFFICIENT_PERMISSIONS'
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Base class for all social media actions.
|
|
61
|
+
* Provides common functionality for authentication, media handling,
|
|
62
|
+
* analytics normalization, and rate limiting.
|
|
63
|
+
*/
|
|
64
|
+
export abstract class BaseSocialMediaAction extends BaseOAuthAction {
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Common parameters for all social media actions
|
|
68
|
+
*/
|
|
69
|
+
protected get commonSocialParams(): ActionParam[] {
|
|
70
|
+
return [
|
|
71
|
+
...this.oauthParams,
|
|
72
|
+
{
|
|
73
|
+
Name: 'ProfileID',
|
|
74
|
+
Type: 'Input',
|
|
75
|
+
Value: null
|
|
76
|
+
}
|
|
77
|
+
];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get the platform name (e.g., 'Twitter', 'LinkedIn')
|
|
82
|
+
*/
|
|
83
|
+
protected abstract get platformName(): string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Get the API base URL for the platform
|
|
87
|
+
*/
|
|
88
|
+
protected abstract get apiBaseUrl(): string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Normalize platform-specific analytics to common format
|
|
92
|
+
*/
|
|
93
|
+
protected normalizeAnalytics(platformData: any): SocialAnalytics {
|
|
94
|
+
// Default implementation - override in platform-specific classes
|
|
95
|
+
return {
|
|
96
|
+
impressions: platformData.impressions || 0,
|
|
97
|
+
engagements: platformData.engagements || 0,
|
|
98
|
+
clicks: platformData.clicks || 0,
|
|
99
|
+
shares: platformData.shares || 0,
|
|
100
|
+
comments: platformData.comments || 0,
|
|
101
|
+
likes: platformData.likes || 0,
|
|
102
|
+
reach: platformData.reach || 0,
|
|
103
|
+
saves: platformData.saves,
|
|
104
|
+
videoViews: platformData.videoViews,
|
|
105
|
+
platformMetrics: platformData
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Upload media files to the platform
|
|
111
|
+
*/
|
|
112
|
+
protected async uploadMedia(files: MediaFile[]): Promise<string[]> {
|
|
113
|
+
const uploadedUrls: string[] = [];
|
|
114
|
+
|
|
115
|
+
for (const file of files) {
|
|
116
|
+
// Validate file
|
|
117
|
+
this.validateMediaFile(file);
|
|
118
|
+
|
|
119
|
+
// Upload file (platform-specific implementation)
|
|
120
|
+
const url = await this.uploadSingleMedia(file);
|
|
121
|
+
uploadedUrls.push(url);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return uploadedUrls;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Platform-specific media upload implementation
|
|
129
|
+
*/
|
|
130
|
+
protected abstract uploadSingleMedia(file: MediaFile): Promise<string>;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Validate media file meets platform requirements
|
|
134
|
+
*/
|
|
135
|
+
protected validateMediaFile(file: MediaFile): void {
|
|
136
|
+
const maxSizes: Record<string, number> = {
|
|
137
|
+
'image/jpeg': 5 * 1024 * 1024, // 5MB
|
|
138
|
+
'image/png': 5 * 1024 * 1024, // 5MB
|
|
139
|
+
'image/gif': 15 * 1024 * 1024, // 15MB
|
|
140
|
+
'video/mp4': 512 * 1024 * 1024 // 512MB
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const maxSize = maxSizes[file.mimeType];
|
|
144
|
+
if (!maxSize) {
|
|
145
|
+
throw new Error(`Unsupported media type: ${file.mimeType}`);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (file.size > maxSize) {
|
|
149
|
+
throw new Error(`File size exceeds limit. Max ${maxSize} bytes, got ${file.size} bytes`);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Handle rate limiting with exponential backoff
|
|
155
|
+
*/
|
|
156
|
+
protected async handleRateLimit(retryAfter?: number): Promise<void> {
|
|
157
|
+
const waitTime = retryAfter || 60; // Default to 60 seconds
|
|
158
|
+
LogStatus(`Rate limit hit. Waiting ${waitTime} seconds...`);
|
|
159
|
+
|
|
160
|
+
await new Promise(resolve => setTimeout(resolve, waitTime * 1000));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Search for posts on the platform
|
|
165
|
+
*/
|
|
166
|
+
protected abstract searchPosts(params: SearchParams): Promise<SocialPost[]>;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Convert platform-specific post data to common format
|
|
170
|
+
*/
|
|
171
|
+
protected abstract normalizePost(platformPost: any): SocialPost;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Parse rate limit headers from API response
|
|
175
|
+
*/
|
|
176
|
+
protected parseRateLimitHeaders(headers: any): {
|
|
177
|
+
remaining: number;
|
|
178
|
+
reset: Date;
|
|
179
|
+
limit: number;
|
|
180
|
+
} | null {
|
|
181
|
+
// Common header patterns across platforms
|
|
182
|
+
const remaining = headers['x-rate-limit-remaining'] ||
|
|
183
|
+
headers['x-ratelimit-remaining'] ||
|
|
184
|
+
headers['rate-limit-remaining'];
|
|
185
|
+
|
|
186
|
+
const reset = headers['x-rate-limit-reset'] ||
|
|
187
|
+
headers['x-ratelimit-reset'] ||
|
|
188
|
+
headers['rate-limit-reset'];
|
|
189
|
+
|
|
190
|
+
const limit = headers['x-rate-limit-limit'] ||
|
|
191
|
+
headers['x-ratelimit-limit'] ||
|
|
192
|
+
headers['rate-limit-limit'];
|
|
193
|
+
|
|
194
|
+
if (remaining !== undefined && reset && limit) {
|
|
195
|
+
return {
|
|
196
|
+
remaining: parseInt(remaining),
|
|
197
|
+
reset: new Date(parseInt(reset) * 1000), // Usually Unix timestamp
|
|
198
|
+
limit: parseInt(limit)
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Build common API headers including authentication
|
|
207
|
+
*/
|
|
208
|
+
protected buildHeaders(additionalHeaders?: Record<string, string>): Record<string, string> {
|
|
209
|
+
const token = this.getAccessToken();
|
|
210
|
+
if (!token) {
|
|
211
|
+
throw new Error('No access token available');
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return {
|
|
215
|
+
'Authorization': `Bearer ${token}`,
|
|
216
|
+
'Content-Type': 'application/json',
|
|
217
|
+
'Accept': 'application/json',
|
|
218
|
+
...additionalHeaders
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Format date for API requests (ISO 8601)
|
|
224
|
+
*/
|
|
225
|
+
protected formatDate(date: Date | string): string {
|
|
226
|
+
if (typeof date === 'string') {
|
|
227
|
+
date = new Date(date);
|
|
228
|
+
}
|
|
229
|
+
return date.toISOString();
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Parse date from API response
|
|
234
|
+
*/
|
|
235
|
+
protected parseDate(dateString: string): Date {
|
|
236
|
+
return new Date(dateString);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Get profile ID from parameters or default from integration
|
|
241
|
+
*/
|
|
242
|
+
protected getProfileId(params: any): string {
|
|
243
|
+
return params.ProfileID || this.getCustomAttribute(1) || '';
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Log API request for debugging
|
|
248
|
+
*/
|
|
249
|
+
protected logApiRequest(method: string, url: string, data?: any): void {
|
|
250
|
+
LogStatus(`${this.platformName} API Request: ${method} ${url}`);
|
|
251
|
+
if (data) {
|
|
252
|
+
LogStatus(`Request Data: ${JSON.stringify(data, null, 2)}`);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Log API response for debugging
|
|
258
|
+
*/
|
|
259
|
+
protected logApiResponse(response: any): void {
|
|
260
|
+
LogStatus(`${this.platformName} API Response: ${JSON.stringify(response, null, 2)}`);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Helper to get parameter value from params array
|
|
265
|
+
*/
|
|
266
|
+
protected getParamValue(params: ActionParam[], paramName: string): any {
|
|
267
|
+
const param = params.find(p => p.Name === paramName);
|
|
268
|
+
return param?.Value;
|
|
269
|
+
}
|
|
270
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Base classes
|
|
2
|
+
export * from './base/base-social.action';
|
|
3
|
+
|
|
4
|
+
// HootSuite
|
|
5
|
+
export * from './providers/hootsuite';
|
|
6
|
+
|
|
7
|
+
// Buffer
|
|
8
|
+
export * from './providers/buffer';
|
|
9
|
+
|
|
10
|
+
// LinkedIn
|
|
11
|
+
export * from './providers/linkedin';
|
|
12
|
+
|
|
13
|
+
// Twitter/X
|
|
14
|
+
export * from './providers/twitter';
|
|
15
|
+
|
|
16
|
+
// Facebook
|
|
17
|
+
export * from './providers/facebook';
|
|
18
|
+
|
|
19
|
+
// Instagram
|
|
20
|
+
export * from './providers/instagram';
|
|
21
|
+
|
|
22
|
+
// TikTok
|
|
23
|
+
export * from './providers/tiktok';
|
|
24
|
+
|
|
25
|
+
// YouTube
|
|
26
|
+
export * from './providers/youtube';
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { BufferBaseAction } from '../buffer-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { MediaFile } from '../../../base/base-social.action';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Action to create a new post in Buffer (scheduled or immediate)
|
|
8
|
+
*/
|
|
9
|
+
@RegisterClass(BufferBaseAction, 'BufferCreatePostAction')
|
|
10
|
+
export class BufferCreatePostAction extends BufferBaseAction {
|
|
11
|
+
/**
|
|
12
|
+
* Create a Buffer post
|
|
13
|
+
*/
|
|
14
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
15
|
+
const { Params, ContextUser } = params;
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
// Get parameters
|
|
19
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
20
|
+
const profileIds = this.getParamValue(Params, 'ProfileIDs');
|
|
21
|
+
const content = this.getParamValue(Params, 'Content');
|
|
22
|
+
const mediaFiles = this.getParamValue(Params, 'MediaFiles');
|
|
23
|
+
const scheduledTime = this.getParamValue(Params, 'ScheduledTime');
|
|
24
|
+
const postNow = this.getParamValue(Params, 'PostNow');
|
|
25
|
+
const addToTop = this.getParamValue(Params, 'AddToTop');
|
|
26
|
+
const shortenLinks = this.getParamValue(Params, 'ShortenLinks');
|
|
27
|
+
const mediaLink = this.getParamValue(Params, 'MediaLink');
|
|
28
|
+
const mediaDescription = this.getParamValue(Params, 'MediaDescription');
|
|
29
|
+
|
|
30
|
+
// Validate required parameters
|
|
31
|
+
if (!companyIntegrationId) {
|
|
32
|
+
throw new Error('CompanyIntegrationID is required');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (!profileIds || !Array.isArray(profileIds) || profileIds.length === 0) {
|
|
36
|
+
throw new Error('ProfileIDs array is required with at least one profile');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (!content && !mediaFiles && !mediaLink) {
|
|
40
|
+
throw new Error('Content, MediaFiles, or MediaLink is required');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Initialize OAuth
|
|
44
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
45
|
+
return {
|
|
46
|
+
Success: false,
|
|
47
|
+
ResultCode: 'INVALID_TOKEN',
|
|
48
|
+
Message: 'Failed to initialize Buffer OAuth connection',
|
|
49
|
+
Params
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Prepare media array
|
|
54
|
+
const media: any[] = [];
|
|
55
|
+
|
|
56
|
+
// Upload media files if provided
|
|
57
|
+
if (mediaFiles && Array.isArray(mediaFiles) && mediaFiles.length > 0) {
|
|
58
|
+
const uploadedUrls = await this.uploadMedia(mediaFiles as MediaFile[]);
|
|
59
|
+
uploadedUrls.forEach(url => {
|
|
60
|
+
media.push({ picture: url });
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Add media link if provided
|
|
65
|
+
if (mediaLink) {
|
|
66
|
+
const mediaItem: any = { link: mediaLink };
|
|
67
|
+
if (mediaDescription) {
|
|
68
|
+
mediaItem.description = mediaDescription;
|
|
69
|
+
}
|
|
70
|
+
media.push(mediaItem);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Create the update
|
|
74
|
+
const result = await this.createUpdate(
|
|
75
|
+
profileIds,
|
|
76
|
+
content || '',
|
|
77
|
+
media.length > 0 ? media : undefined,
|
|
78
|
+
scheduledTime ? new Date(scheduledTime) : undefined,
|
|
79
|
+
{
|
|
80
|
+
now: postNow === true,
|
|
81
|
+
top: addToTop === true,
|
|
82
|
+
shorten: shortenLinks !== false // Default to true
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
// Format the response
|
|
87
|
+
const createdPosts = result.updates || [];
|
|
88
|
+
const formattedPosts = createdPosts.map((update: any) => ({
|
|
89
|
+
id: update.id,
|
|
90
|
+
profileId: update.profile_id,
|
|
91
|
+
service: update.profile_service,
|
|
92
|
+
status: update.status,
|
|
93
|
+
scheduledAt: update.due_at ? new Date(update.due_at * 1000) : null,
|
|
94
|
+
text: update.text,
|
|
95
|
+
media: update.media,
|
|
96
|
+
createdAt: update.created_at ? new Date(update.created_at * 1000) : new Date()
|
|
97
|
+
}));
|
|
98
|
+
|
|
99
|
+
// Create summary
|
|
100
|
+
const summary = {
|
|
101
|
+
totalCreated: formattedPosts.length,
|
|
102
|
+
profilesPosted: profileIds,
|
|
103
|
+
scheduled: !postNow,
|
|
104
|
+
scheduledTime: scheduledTime || null,
|
|
105
|
+
hasMedia: media.length > 0
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// Update output parameters
|
|
109
|
+
const outputParams = [...Params];
|
|
110
|
+
const postsParam = outputParams.find(p => p.Name === 'CreatedPosts');
|
|
111
|
+
if (postsParam) postsParam.Value = formattedPosts;
|
|
112
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
113
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
Success: true,
|
|
117
|
+
ResultCode: 'SUCCESS',
|
|
118
|
+
Message: `Successfully created ${formattedPosts.length} Buffer post(s)`,
|
|
119
|
+
Params: outputParams
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
} catch (error) {
|
|
123
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
124
|
+
const resultCode = this.mapBufferError(error);
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
Success: false,
|
|
128
|
+
ResultCode: resultCode,
|
|
129
|
+
Message: `Failed to create Buffer post: ${errorMessage}`,
|
|
130
|
+
Params
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Define the parameters this action expects
|
|
137
|
+
*/
|
|
138
|
+
public get Params(): ActionParam[] {
|
|
139
|
+
return [
|
|
140
|
+
...this.commonSocialParams,
|
|
141
|
+
{
|
|
142
|
+
Name: 'ProfileIDs',
|
|
143
|
+
Type: 'Input',
|
|
144
|
+
Value: null
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
Name: 'Content',
|
|
148
|
+
Type: 'Input',
|
|
149
|
+
Value: null
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
Name: 'MediaFiles',
|
|
153
|
+
Type: 'Input',
|
|
154
|
+
Value: null
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
Name: 'MediaLink',
|
|
158
|
+
Type: 'Input',
|
|
159
|
+
Value: null
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
Name: 'MediaDescription',
|
|
163
|
+
Type: 'Input',
|
|
164
|
+
Value: null
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
Name: 'ScheduledTime',
|
|
168
|
+
Type: 'Input',
|
|
169
|
+
Value: null
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
Name: 'PostNow',
|
|
173
|
+
Type: 'Input',
|
|
174
|
+
Value: false
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
Name: 'AddToTop',
|
|
178
|
+
Type: 'Input',
|
|
179
|
+
Value: false
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
Name: 'ShortenLinks',
|
|
183
|
+
Type: 'Input',
|
|
184
|
+
Value: true
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
Name: 'CreatedPosts',
|
|
188
|
+
Type: 'Output',
|
|
189
|
+
Value: null
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
Name: 'Summary',
|
|
193
|
+
Type: 'Output',
|
|
194
|
+
Value: null
|
|
195
|
+
}
|
|
196
|
+
];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Metadata about this action
|
|
201
|
+
*/
|
|
202
|
+
public get Description(): string {
|
|
203
|
+
return 'Creates a new post in Buffer that can be scheduled or posted immediately to one or more social media profiles';
|
|
204
|
+
}
|
|
205
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { BufferBaseAction } from '../buffer-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Action to delete a post from Buffer
|
|
7
|
+
*/
|
|
8
|
+
@RegisterClass(BufferBaseAction, 'BufferDeletePostAction')
|
|
9
|
+
export class BufferDeletePostAction extends BufferBaseAction {
|
|
10
|
+
/**
|
|
11
|
+
* Delete a Buffer post
|
|
12
|
+
*/
|
|
13
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
14
|
+
const { Params, ContextUser } = params;
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
// Get parameters
|
|
18
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
19
|
+
const updateId = this.getParamValue(Params, 'UpdateID');
|
|
20
|
+
|
|
21
|
+
// Validate required parameters
|
|
22
|
+
if (!companyIntegrationId) {
|
|
23
|
+
throw new Error('CompanyIntegrationID is required');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (!updateId) {
|
|
27
|
+
throw new Error('UpdateID is required');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Initialize OAuth
|
|
31
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
32
|
+
return {
|
|
33
|
+
Success: false,
|
|
34
|
+
ResultCode: 'INVALID_TOKEN',
|
|
35
|
+
Message: 'Failed to initialize Buffer OAuth connection',
|
|
36
|
+
Params
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Delete the update
|
|
41
|
+
const success = await this.deleteUpdate(updateId);
|
|
42
|
+
|
|
43
|
+
// Create summary
|
|
44
|
+
const summary = {
|
|
45
|
+
updateId: updateId,
|
|
46
|
+
deleted: success,
|
|
47
|
+
deletedAt: new Date()
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Update output parameters
|
|
51
|
+
const outputParams = [...Params];
|
|
52
|
+
const deletedParam = outputParams.find(p => p.Name === 'Deleted');
|
|
53
|
+
if (deletedParam) deletedParam.Value = success;
|
|
54
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
55
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
56
|
+
|
|
57
|
+
if (success) {
|
|
58
|
+
return {
|
|
59
|
+
Success: true,
|
|
60
|
+
ResultCode: 'SUCCESS',
|
|
61
|
+
Message: `Successfully deleted Buffer post ${updateId}`,
|
|
62
|
+
Params: outputParams
|
|
63
|
+
};
|
|
64
|
+
} else {
|
|
65
|
+
return {
|
|
66
|
+
Success: false,
|
|
67
|
+
ResultCode: 'DELETE_FAILED',
|
|
68
|
+
Message: `Failed to delete Buffer post ${updateId}`,
|
|
69
|
+
Params: outputParams
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
} catch (error) {
|
|
74
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
75
|
+
const resultCode = this.mapBufferError(error);
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
Success: false,
|
|
79
|
+
ResultCode: resultCode,
|
|
80
|
+
Message: `Failed to delete post: ${errorMessage}`,
|
|
81
|
+
Params
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Define the parameters this action expects
|
|
88
|
+
*/
|
|
89
|
+
public get Params(): ActionParam[] {
|
|
90
|
+
return [
|
|
91
|
+
...this.commonSocialParams,
|
|
92
|
+
{
|
|
93
|
+
Name: 'UpdateID',
|
|
94
|
+
Type: 'Input',
|
|
95
|
+
Value: null
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
Name: 'Deleted',
|
|
99
|
+
Type: 'Output',
|
|
100
|
+
Value: false
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
Name: 'Summary',
|
|
104
|
+
Type: 'Output',
|
|
105
|
+
Value: null
|
|
106
|
+
}
|
|
107
|
+
];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Metadata about this action
|
|
112
|
+
*/
|
|
113
|
+
public get Description(): string {
|
|
114
|
+
return 'Deletes a pending or sent post from Buffer';
|
|
115
|
+
}
|
|
116
|
+
}
|