@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,356 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { BaseSocialMediaAction, SocialPost, SocialAnalytics, MediaFile } from '../../base/base-social.action';
|
|
3
|
+
import { LogError, LogStatus } from '@memberjunction/core';
|
|
4
|
+
import axios, { AxiosInstance, AxiosError } from 'axios';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* TikTok video information
|
|
8
|
+
*/
|
|
9
|
+
export interface TikTokVideo {
|
|
10
|
+
id: string;
|
|
11
|
+
share_url: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
duration: number;
|
|
15
|
+
cover_image_url: string;
|
|
16
|
+
share_count: number;
|
|
17
|
+
view_count: number;
|
|
18
|
+
like_count: number;
|
|
19
|
+
comment_count: number;
|
|
20
|
+
create_time: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* TikTok user information
|
|
25
|
+
*/
|
|
26
|
+
export interface TikTokUser {
|
|
27
|
+
open_id: string;
|
|
28
|
+
union_id: string;
|
|
29
|
+
avatar_url: string;
|
|
30
|
+
display_name: string;
|
|
31
|
+
bio_description: string;
|
|
32
|
+
profile_deep_link: string;
|
|
33
|
+
is_verified: boolean;
|
|
34
|
+
follower_count: number;
|
|
35
|
+
following_count: number;
|
|
36
|
+
likes_count: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Base class for all TikTok social media actions.
|
|
41
|
+
* Handles TikTok-specific authentication and API interaction patterns.
|
|
42
|
+
*/
|
|
43
|
+
@RegisterClass(BaseSocialMediaAction, 'TikTokBaseAction')
|
|
44
|
+
export abstract class TikTokBaseAction extends BaseSocialMediaAction {
|
|
45
|
+
|
|
46
|
+
protected get platformName(): string {
|
|
47
|
+
return 'TikTok';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
protected get apiBaseUrl(): string {
|
|
51
|
+
return 'https://open-api.tiktok.com';
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
private axiosInstance: AxiosInstance | null = null;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Initialize axios instance with interceptors
|
|
58
|
+
*/
|
|
59
|
+
protected getAxiosInstance(): AxiosInstance {
|
|
60
|
+
if (!this.axiosInstance) {
|
|
61
|
+
this.axiosInstance = axios.create({
|
|
62
|
+
baseURL: this.apiBaseUrl,
|
|
63
|
+
timeout: 30000,
|
|
64
|
+
headers: {
|
|
65
|
+
'Content-Type': 'application/json',
|
|
66
|
+
'Accept': 'application/json'
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// Request interceptor for logging
|
|
71
|
+
this.axiosInstance.interceptors.request.use(
|
|
72
|
+
(config) => {
|
|
73
|
+
this.logApiRequest(config.method?.toUpperCase() || 'GET', config.url || '', config.data);
|
|
74
|
+
return config;
|
|
75
|
+
},
|
|
76
|
+
(error) => {
|
|
77
|
+
LogError(`TikTok API Request Error: ${error.message}`);
|
|
78
|
+
return Promise.reject(error);
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
// Response interceptor for logging and error handling
|
|
83
|
+
this.axiosInstance.interceptors.response.use(
|
|
84
|
+
(response) => {
|
|
85
|
+
this.logApiResponse(response.data);
|
|
86
|
+
return response;
|
|
87
|
+
},
|
|
88
|
+
async (error: AxiosError) => {
|
|
89
|
+
if (error.response?.status === 429) {
|
|
90
|
+
// Rate limit hit
|
|
91
|
+
const retryAfter = error.response.headers['retry-after'];
|
|
92
|
+
await this.handleRateLimit(retryAfter ? parseInt(retryAfter) : undefined);
|
|
93
|
+
|
|
94
|
+
// Retry the request
|
|
95
|
+
return this.axiosInstance?.request(error.config!);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
LogError(`TikTok API Response Error: ${error.message}`);
|
|
99
|
+
return Promise.reject(error);
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return this.axiosInstance;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Make authenticated TikTok API request
|
|
109
|
+
*/
|
|
110
|
+
protected async makeTikTokRequest<T>(
|
|
111
|
+
endpoint: string,
|
|
112
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' = 'GET',
|
|
113
|
+
data?: any,
|
|
114
|
+
params?: any
|
|
115
|
+
): Promise<T> {
|
|
116
|
+
const token = this.getAccessToken();
|
|
117
|
+
if (!token) {
|
|
118
|
+
throw new Error('No access token available for TikTok');
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const axios = this.getAxiosInstance();
|
|
122
|
+
|
|
123
|
+
try {
|
|
124
|
+
const response = await axios.request<T>({
|
|
125
|
+
method,
|
|
126
|
+
url: endpoint,
|
|
127
|
+
data,
|
|
128
|
+
params,
|
|
129
|
+
headers: {
|
|
130
|
+
'Authorization': `Bearer ${token}`
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
return response.data;
|
|
135
|
+
} catch (error) {
|
|
136
|
+
if (error instanceof AxiosError) {
|
|
137
|
+
if (error.response?.status === 401) {
|
|
138
|
+
// Token might be expired, try to refresh
|
|
139
|
+
await this.refreshAccessToken();
|
|
140
|
+
|
|
141
|
+
// Retry with new token
|
|
142
|
+
const newToken = this.getAccessToken();
|
|
143
|
+
const retryResponse = await axios.request<T>({
|
|
144
|
+
method,
|
|
145
|
+
url: endpoint,
|
|
146
|
+
data,
|
|
147
|
+
params,
|
|
148
|
+
headers: {
|
|
149
|
+
'Authorization': `Bearer ${newToken}`
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
return retryResponse.data;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const errorMessage = error.response?.data?.error?.message || error.message;
|
|
157
|
+
throw new Error(`TikTok API error: ${errorMessage}`);
|
|
158
|
+
}
|
|
159
|
+
throw error;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Refresh TikTok access token
|
|
165
|
+
*/
|
|
166
|
+
protected async refreshAccessToken(): Promise<void> {
|
|
167
|
+
const refreshToken = this.getRefreshToken();
|
|
168
|
+
if (!refreshToken) {
|
|
169
|
+
throw new Error('No refresh token available for TikTok');
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
try {
|
|
173
|
+
const response = await axios.post(`${this.apiBaseUrl}/oauth/refresh_token/`, {
|
|
174
|
+
client_key: this.getCustomAttribute(2), // Store client key in CustomAttribute2
|
|
175
|
+
grant_type: 'refresh_token',
|
|
176
|
+
refresh_token: refreshToken
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
const { access_token, refresh_token: newRefreshToken, expires_in } = response.data.data;
|
|
180
|
+
|
|
181
|
+
// Update stored tokens
|
|
182
|
+
await this.updateStoredTokens(access_token, newRefreshToken, expires_in);
|
|
183
|
+
|
|
184
|
+
LogStatus('TikTok access token refreshed successfully');
|
|
185
|
+
} catch (error) {
|
|
186
|
+
LogError(`Failed to refresh TikTok access token: ${error}`);
|
|
187
|
+
throw new Error('Failed to refresh TikTok access token');
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Upload media to TikTok (requires special approval)
|
|
193
|
+
*/
|
|
194
|
+
protected async uploadSingleMedia(file: MediaFile): Promise<string> {
|
|
195
|
+
// TikTok video upload requires special approval
|
|
196
|
+
// This is a placeholder implementation
|
|
197
|
+
throw new Error('TikTok video upload requires special API approval. Please use TikTok Creator Studio for video uploads.');
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Search posts (videos) - TikTok only allows searching user's own videos
|
|
202
|
+
*/
|
|
203
|
+
protected async searchPosts(params: any): Promise<SocialPost[]> {
|
|
204
|
+
// TikTok doesn't provide a general search API for security/privacy reasons
|
|
205
|
+
// We can only search within a user's own videos
|
|
206
|
+
const videos = await this.getUserVideos();
|
|
207
|
+
|
|
208
|
+
let filtered = videos;
|
|
209
|
+
|
|
210
|
+
// Apply filters if provided
|
|
211
|
+
if (params.query) {
|
|
212
|
+
const query = params.query.toLowerCase();
|
|
213
|
+
filtered = filtered.filter(video =>
|
|
214
|
+
video.title.toLowerCase().includes(query) ||
|
|
215
|
+
video.description.toLowerCase().includes(query)
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (params.hashtags && params.hashtags.length > 0) {
|
|
220
|
+
filtered = filtered.filter(video => {
|
|
221
|
+
const videoHashtags = this.extractHashtags(video.description);
|
|
222
|
+
return params.hashtags.some((tag: string) =>
|
|
223
|
+
videoHashtags.includes(tag.toLowerCase())
|
|
224
|
+
);
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (params.startDate) {
|
|
229
|
+
const startTime = new Date(params.startDate).getTime() / 1000;
|
|
230
|
+
filtered = filtered.filter(video => video.create_time >= startTime);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (params.endDate) {
|
|
234
|
+
const endTime = new Date(params.endDate).getTime() / 1000;
|
|
235
|
+
filtered = filtered.filter(video => video.create_time <= endTime);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// Apply limit and offset
|
|
239
|
+
if (params.offset) {
|
|
240
|
+
filtered = filtered.slice(params.offset);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (params.limit) {
|
|
244
|
+
filtered = filtered.slice(0, params.limit);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return filtered.map(video => this.normalizePost(video));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Get user's videos
|
|
252
|
+
*/
|
|
253
|
+
protected async getUserVideos(): Promise<TikTokVideo[]> {
|
|
254
|
+
const response = await this.makeTikTokRequest<any>(
|
|
255
|
+
'/v2/video/list/',
|
|
256
|
+
'GET',
|
|
257
|
+
undefined,
|
|
258
|
+
{
|
|
259
|
+
fields: 'id,share_url,title,description,duration,cover_image_url,share_count,view_count,like_count,comment_count,create_time'
|
|
260
|
+
}
|
|
261
|
+
);
|
|
262
|
+
|
|
263
|
+
return response.data?.videos || [];
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Convert TikTok video to common post format
|
|
268
|
+
*/
|
|
269
|
+
protected normalizePost(video: TikTokVideo): SocialPost {
|
|
270
|
+
return {
|
|
271
|
+
id: video.id,
|
|
272
|
+
platform: this.platformName,
|
|
273
|
+
profileId: this.getCustomAttribute(1) || '', // Store user ID in CustomAttribute1
|
|
274
|
+
content: video.description || video.title,
|
|
275
|
+
mediaUrls: [video.cover_image_url],
|
|
276
|
+
publishedAt: new Date(video.create_time * 1000),
|
|
277
|
+
analytics: {
|
|
278
|
+
impressions: video.view_count,
|
|
279
|
+
engagements: video.like_count + video.comment_count + video.share_count,
|
|
280
|
+
clicks: 0, // Not available in TikTok API
|
|
281
|
+
shares: video.share_count,
|
|
282
|
+
comments: video.comment_count,
|
|
283
|
+
likes: video.like_count,
|
|
284
|
+
reach: video.view_count,
|
|
285
|
+
videoViews: video.view_count,
|
|
286
|
+
platformMetrics: {
|
|
287
|
+
duration: video.duration,
|
|
288
|
+
shareUrl: video.share_url
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
platformSpecificData: {
|
|
292
|
+
...video,
|
|
293
|
+
videoUrl: video.share_url
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Normalize TikTok analytics to common format
|
|
300
|
+
*/
|
|
301
|
+
protected normalizeAnalytics(platformData: any): SocialAnalytics {
|
|
302
|
+
return {
|
|
303
|
+
impressions: platformData.view_count || 0,
|
|
304
|
+
engagements: (platformData.like_count || 0) + (platformData.comment_count || 0) + (platformData.share_count || 0),
|
|
305
|
+
clicks: 0, // Not available in TikTok API
|
|
306
|
+
shares: platformData.share_count || 0,
|
|
307
|
+
comments: platformData.comment_count || 0,
|
|
308
|
+
likes: platformData.like_count || 0,
|
|
309
|
+
reach: platformData.view_count || 0,
|
|
310
|
+
videoViews: platformData.view_count || 0,
|
|
311
|
+
platformMetrics: platformData
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Extract hashtags from video description
|
|
317
|
+
*/
|
|
318
|
+
protected extractHashtags(description: string): string[] {
|
|
319
|
+
const hashtagRegex = /#(\w+)/g;
|
|
320
|
+
const matches = description.match(hashtagRegex) || [];
|
|
321
|
+
return matches.map(tag => tag.substring(1).toLowerCase());
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Get current user info
|
|
326
|
+
*/
|
|
327
|
+
protected async getCurrentUser(): Promise<TikTokUser> {
|
|
328
|
+
const response = await this.makeTikTokRequest<any>(
|
|
329
|
+
'/v2/user/info/',
|
|
330
|
+
'GET',
|
|
331
|
+
undefined,
|
|
332
|
+
{
|
|
333
|
+
fields: 'open_id,union_id,avatar_url,display_name,bio_description,profile_deep_link,is_verified,follower_count,following_count,likes_count'
|
|
334
|
+
}
|
|
335
|
+
);
|
|
336
|
+
|
|
337
|
+
return response.data?.user;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Validate TikTok-specific media requirements
|
|
342
|
+
*/
|
|
343
|
+
protected validateMediaFile(file: MediaFile): void {
|
|
344
|
+
const allowedTypes = ['video/mp4', 'video/quicktime', 'video/webm'];
|
|
345
|
+
|
|
346
|
+
if (!allowedTypes.includes(file.mimeType)) {
|
|
347
|
+
throw new Error(`TikTok only supports video files. Got: ${file.mimeType}`);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// Max file size: 287.6 MB
|
|
351
|
+
const maxSize = 287.6 * 1024 * 1024;
|
|
352
|
+
if (file.size > maxSize) {
|
|
353
|
+
throw new Error(`File size exceeds TikTok limit of 287.6 MB. Got: ${(file.size / 1024 / 1024).toFixed(2)} MB`);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Twitter/X Actions for MemberJunction
|
|
2
|
+
|
|
3
|
+
This directory contains the Twitter/X implementation for MemberJunction's Social Media Actions package.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Twitter implementation provides comprehensive access to Twitter's API v2 with OAuth 2.0 authentication, enabling automated social media operations including content creation, analytics, and advanced search capabilities.
|
|
8
|
+
|
|
9
|
+
## Architecture
|
|
10
|
+
|
|
11
|
+
### Base Class: `TwitterBaseAction`
|
|
12
|
+
- Extends `BaseSocialMediaAction`
|
|
13
|
+
- Handles OAuth 2.0 authentication with token refresh
|
|
14
|
+
- Manages rate limiting with automatic retry
|
|
15
|
+
- Provides common Twitter API utilities
|
|
16
|
+
- Supports media upload with chunking for large files
|
|
17
|
+
|
|
18
|
+
## Available Actions
|
|
19
|
+
|
|
20
|
+
### 1. **Create Tweet** (`TwitterCreateTweetAction`)
|
|
21
|
+
- Post tweets with text content (up to 280 characters)
|
|
22
|
+
- Attach up to 4 media files (images, GIFs, videos)
|
|
23
|
+
- Create polls with 2-4 options
|
|
24
|
+
- Reply to existing tweets
|
|
25
|
+
- Quote tweet functionality
|
|
26
|
+
|
|
27
|
+
### 2. **Create Thread** (`TwitterCreateThreadAction`)
|
|
28
|
+
- Post connected series of tweets (up to 25)
|
|
29
|
+
- Automatic thread numbering (customizable format)
|
|
30
|
+
- Media support for each tweet in thread
|
|
31
|
+
- Maintains reply chain for proper threading
|
|
32
|
+
|
|
33
|
+
### 3. **Get Timeline** (`TwitterGetTimelineAction`)
|
|
34
|
+
- Retrieve home timeline (authenticated user's feed)
|
|
35
|
+
- Get specific user's timeline
|
|
36
|
+
- Filter options (exclude replies/retweets)
|
|
37
|
+
- Time-based filtering with date ranges
|
|
38
|
+
- Pagination support for large result sets
|
|
39
|
+
|
|
40
|
+
### 4. **Get Mentions** (`TwitterGetMentionsAction`)
|
|
41
|
+
- Retrieve tweets mentioning the authenticated user
|
|
42
|
+
- Analyze mention types (direct, replies, quotes)
|
|
43
|
+
- Engagement statistics for mentions
|
|
44
|
+
- Identify top engaging mentions
|
|
45
|
+
|
|
46
|
+
### 5. **Get Analytics** (`TwitterGetAnalyticsAction`)
|
|
47
|
+
- Tweet-level analytics for specific tweet IDs
|
|
48
|
+
- Account-level analytics with time-based aggregation
|
|
49
|
+
- Engagement metrics (likes, retweets, replies, impressions)
|
|
50
|
+
- Top performing content identification
|
|
51
|
+
- Time-series analysis (hourly, daily, total)
|
|
52
|
+
|
|
53
|
+
### 6. **Schedule Tweet** (`TwitterScheduleTweetAction`)
|
|
54
|
+
- Schedule tweets for future posting
|
|
55
|
+
- Supports all tweet features (media, polls, etc.)
|
|
56
|
+
- Handles media upload timing (24-hour expiration)
|
|
57
|
+
- Returns scheduling metadata for tracking
|
|
58
|
+
|
|
59
|
+
### 7. **Delete Tweet** (`TwitterDeleteTweetAction`)
|
|
60
|
+
- Delete tweets by ID
|
|
61
|
+
- Requires explicit confirmation
|
|
62
|
+
- Verifies ownership before deletion
|
|
63
|
+
- Captures tweet details before deletion
|
|
64
|
+
|
|
65
|
+
### 8. **Search Tweets** (`TwitterSearchTweetsAction`)
|
|
66
|
+
- **Full historical search with advanced operators**
|
|
67
|
+
- Text search with boolean operators
|
|
68
|
+
- User filters (from:, to:, @mentions)
|
|
69
|
+
- Content filters (has:media, has:links)
|
|
70
|
+
- Tweet type filters (is:retweet, is:reply, is:quote)
|
|
71
|
+
- Language filtering
|
|
72
|
+
- Engagement thresholds (with Academic access)
|
|
73
|
+
- Date range searches for historical data
|
|
74
|
+
- Comprehensive result analysis
|
|
75
|
+
|
|
76
|
+
## Authentication
|
|
77
|
+
|
|
78
|
+
Uses OAuth 2.0 with credentials stored in CompanyIntegration:
|
|
79
|
+
- `AccessToken`: OAuth 2.0 access token
|
|
80
|
+
- `RefreshToken`: OAuth 2.0 refresh token
|
|
81
|
+
- `CustomAttribute2`: Client ID
|
|
82
|
+
- `CustomAttribute3`: Client Secret
|
|
83
|
+
|
|
84
|
+
## Rate Limiting
|
|
85
|
+
|
|
86
|
+
Twitter API v2 rate limits vary by endpoint:
|
|
87
|
+
- Search: 450 requests per 15-minute window (app-level)
|
|
88
|
+
- Timeline: 75 requests per 15-minute window (user-level)
|
|
89
|
+
- Tweet creation: 300 per 3-hour window
|
|
90
|
+
- Media upload: 415 per 15-minute window
|
|
91
|
+
|
|
92
|
+
The implementation automatically handles rate limiting with:
|
|
93
|
+
- Header parsing for remaining requests
|
|
94
|
+
- Automatic retry with exponential backoff
|
|
95
|
+
- Proper wait times based on reset timestamps
|
|
96
|
+
|
|
97
|
+
## Search Capabilities
|
|
98
|
+
|
|
99
|
+
The search implementation provides powerful capabilities:
|
|
100
|
+
|
|
101
|
+
### Basic Search
|
|
102
|
+
```typescript
|
|
103
|
+
{
|
|
104
|
+
Query: "memberjunction",
|
|
105
|
+
MaxResults: 100
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Advanced Search with Operators
|
|
110
|
+
```typescript
|
|
111
|
+
{
|
|
112
|
+
Query: "data platform",
|
|
113
|
+
FromUser: "memberjunction",
|
|
114
|
+
HasMedia: true,
|
|
115
|
+
StartDate: "2023-01-01",
|
|
116
|
+
EndDate: "2023-12-31",
|
|
117
|
+
Language: "en",
|
|
118
|
+
MinLikes: 10
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Search Operators Supported
|
|
123
|
+
- **Text**: Exact phrases, boolean (AND/OR)
|
|
124
|
+
- **Users**: from:username, to:username, @mentions
|
|
125
|
+
- **Content**: has:media, has:links, has:hashtags
|
|
126
|
+
- **Type**: is:retweet, is:reply, is:quote, is:verified
|
|
127
|
+
- **Engagement**: min_faves:n, min_retweets:n (Academic access)
|
|
128
|
+
- **Time**: Start/end dates for historical searches
|
|
129
|
+
- **Location**: place:"location name"
|
|
130
|
+
|
|
131
|
+
## Error Handling
|
|
132
|
+
|
|
133
|
+
Comprehensive error handling with specific result codes:
|
|
134
|
+
- `RATE_LIMIT`: Rate limit exceeded
|
|
135
|
+
- `INVALID_TOKEN`: Authentication failure
|
|
136
|
+
- `CONTENT_TOO_LONG`: Tweet exceeds character limit
|
|
137
|
+
- `INVALID_MEDIA`: Media validation failure
|
|
138
|
+
- `TWEET_NOT_FOUND`: Tweet doesn't exist
|
|
139
|
+
- `INSUFFICIENT_PERMISSIONS`: Missing required scopes
|
|
140
|
+
- `NOT_OWNER`: Attempting to modify another user's content
|
|
141
|
+
|
|
142
|
+
## Media Support
|
|
143
|
+
|
|
144
|
+
### Supported Formats
|
|
145
|
+
- Images: JPEG, PNG, GIF, WebP (max 5MB, 15MB for GIFs)
|
|
146
|
+
- Videos: MP4 (max 512MB)
|
|
147
|
+
|
|
148
|
+
### Upload Process
|
|
149
|
+
1. Initialize upload with media metadata
|
|
150
|
+
2. Upload in chunks (5MB chunks for large files)
|
|
151
|
+
3. Finalize upload
|
|
152
|
+
4. Wait for processing (videos only)
|
|
153
|
+
5. Attach media ID to tweet
|
|
154
|
+
|
|
155
|
+
## Usage Examples
|
|
156
|
+
|
|
157
|
+
### Create a Tweet with Media
|
|
158
|
+
```typescript
|
|
159
|
+
const action = new TwitterCreateTweetAction();
|
|
160
|
+
await action.Run({
|
|
161
|
+
CompanyIntegrationID: 'integration-id',
|
|
162
|
+
Content: 'Check out our new features!',
|
|
163
|
+
MediaFiles: [{
|
|
164
|
+
filename: 'screenshot.png',
|
|
165
|
+
mimeType: 'image/png',
|
|
166
|
+
data: base64ImageData,
|
|
167
|
+
size: 1024000
|
|
168
|
+
}]
|
|
169
|
+
});
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Search Historical Tweets
|
|
173
|
+
```typescript
|
|
174
|
+
const action = new TwitterSearchTweetsAction();
|
|
175
|
+
const result = await action.Run({
|
|
176
|
+
CompanyIntegrationID: 'integration-id',
|
|
177
|
+
Query: 'artificial intelligence',
|
|
178
|
+
StartDate: '2023-01-01',
|
|
179
|
+
EndDate: '2023-12-31',
|
|
180
|
+
HasMedia: true,
|
|
181
|
+
IsVerified: true,
|
|
182
|
+
MaxResults: 500
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
// Access comprehensive analysis
|
|
186
|
+
const analysis = result.Params.find(p => p.Name === 'Analysis').Value;
|
|
187
|
+
console.log('Top hashtags:', analysis.topHashtags);
|
|
188
|
+
console.log('Engagement stats:', analysis.engagementStats);
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Testing
|
|
192
|
+
|
|
193
|
+
When testing Twitter actions:
|
|
194
|
+
1. Use a test account with proper API access
|
|
195
|
+
2. Be mindful of rate limits during testing
|
|
196
|
+
3. Test media upload with various file sizes
|
|
197
|
+
4. Verify search operators work as expected
|
|
198
|
+
5. Test error scenarios (rate limits, invalid content)
|
|
199
|
+
|
|
200
|
+
## Future Enhancements
|
|
201
|
+
|
|
202
|
+
1. Streaming API support for real-time monitoring
|
|
203
|
+
2. Twitter Spaces integration
|
|
204
|
+
3. Advanced analytics with Twitter Analytics API
|
|
205
|
+
4. Batch operations for bulk tweet management
|
|
206
|
+
5. DM (Direct Message) support
|
|
207
|
+
6. Twitter Lists management
|