@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,286 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { YouTubeBaseAction } from '../youtube-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { SocialPost } from '../../../base/base-social.action';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Action to get videos from a YouTube channel
|
|
8
|
+
*/
|
|
9
|
+
@RegisterClass(YouTubeBaseAction, 'YouTubeGetChannelVideosAction')
|
|
10
|
+
export class YouTubeGetChannelVideosAction extends YouTubeBaseAction {
|
|
11
|
+
/**
|
|
12
|
+
* Get videos from a YouTube channel
|
|
13
|
+
*/
|
|
14
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
15
|
+
const { Params, ContextUser } = params;
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
// Initialize OAuth
|
|
19
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
20
|
+
if (!companyIntegrationId) {
|
|
21
|
+
throw new Error('CompanyIntegrationID is required');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const initialized = await this.initializeOAuth(companyIntegrationId);
|
|
25
|
+
if (!initialized) {
|
|
26
|
+
throw new Error('Failed to initialize YouTube OAuth connection');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Extract parameters
|
|
30
|
+
const channelId = this.getParamValue(Params, 'ChannelID') || this.getCustomAttribute(1);
|
|
31
|
+
const maxResults = this.getParamValue(Params, 'MaxResults') || 50;
|
|
32
|
+
const orderBy = this.getParamValue(Params, 'OrderBy') || 'date';
|
|
33
|
+
const publishedAfter = this.getParamValue(Params, 'PublishedAfter');
|
|
34
|
+
const publishedBefore = this.getParamValue(Params, 'PublishedBefore');
|
|
35
|
+
const includePrivate = this.getParamValue(Params, 'IncludePrivate') || false;
|
|
36
|
+
const videoType = this.getParamValue(Params, 'VideoType') || 'any';
|
|
37
|
+
const videoDuration = this.getParamValue(Params, 'VideoDuration') || 'any';
|
|
38
|
+
const pageToken = this.getParamValue(Params, 'PageToken');
|
|
39
|
+
|
|
40
|
+
// If no channel ID provided, get the authenticated user's channel
|
|
41
|
+
let actualChannelId = channelId;
|
|
42
|
+
if (!actualChannelId) {
|
|
43
|
+
const channelResponse = await this.makeYouTubeRequest<any>(
|
|
44
|
+
'/channels',
|
|
45
|
+
'GET',
|
|
46
|
+
undefined,
|
|
47
|
+
{
|
|
48
|
+
part: 'id,snippet',
|
|
49
|
+
mine: true
|
|
50
|
+
},
|
|
51
|
+
ContextUser
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
if (!channelResponse.items || channelResponse.items.length === 0) {
|
|
55
|
+
throw new Error('No channel found for authenticated user');
|
|
56
|
+
}
|
|
57
|
+
actualChannelId = channelResponse.items[0].id;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Build search parameters
|
|
61
|
+
const searchParams: any = {
|
|
62
|
+
part: 'id,snippet',
|
|
63
|
+
channelId: actualChannelId,
|
|
64
|
+
type: 'video',
|
|
65
|
+
maxResults: Math.min(maxResults, 50), // YouTube max is 50
|
|
66
|
+
order: orderBy
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// Add date filters
|
|
70
|
+
if (publishedAfter) {
|
|
71
|
+
searchParams.publishedAfter = this.formatDate(publishedAfter);
|
|
72
|
+
}
|
|
73
|
+
if (publishedBefore) {
|
|
74
|
+
searchParams.publishedBefore = this.formatDate(publishedBefore);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Add video type filter
|
|
78
|
+
if (videoType !== 'any') {
|
|
79
|
+
searchParams.videoType = videoType; // 'episode' or 'movie'
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Add duration filter
|
|
83
|
+
if (videoDuration !== 'any') {
|
|
84
|
+
searchParams.videoDuration = videoDuration; // 'short', 'medium', 'long'
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Add pagination token
|
|
88
|
+
if (pageToken) {
|
|
89
|
+
searchParams.pageToken = pageToken;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Search for videos
|
|
93
|
+
const searchResponse = await this.makeYouTubeRequest<any>(
|
|
94
|
+
'/search',
|
|
95
|
+
'GET',
|
|
96
|
+
undefined,
|
|
97
|
+
searchParams,
|
|
98
|
+
ContextUser
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
// Extract video IDs
|
|
102
|
+
const videoIds = searchResponse.items.map((item: any) => item.id.videoId);
|
|
103
|
+
|
|
104
|
+
if (videoIds.length === 0) {
|
|
105
|
+
// No videos found
|
|
106
|
+
const outputParams = [...Params];
|
|
107
|
+
const videosParam = outputParams.find(p => p.Name === 'Videos');
|
|
108
|
+
if (videosParam) videosParam.Value = [];
|
|
109
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
110
|
+
if (summaryParam) summaryParam.Value = { totalVideos: 0, channelId: actualChannelId };
|
|
111
|
+
|
|
112
|
+
return {
|
|
113
|
+
Success: true,
|
|
114
|
+
ResultCode: 'SUCCESS',
|
|
115
|
+
Message: 'No videos found for the specified criteria',
|
|
116
|
+
Params: outputParams
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Get detailed video information
|
|
121
|
+
const videosResponse = await this.makeYouTubeRequest<any>(
|
|
122
|
+
'/videos',
|
|
123
|
+
'GET',
|
|
124
|
+
undefined,
|
|
125
|
+
{
|
|
126
|
+
part: 'snippet,contentDetails,statistics,status',
|
|
127
|
+
id: videoIds.join(',')
|
|
128
|
+
},
|
|
129
|
+
ContextUser
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
// Filter out private videos if not requested
|
|
133
|
+
let videos = videosResponse.items;
|
|
134
|
+
if (!includePrivate) {
|
|
135
|
+
videos = videos.filter((v: any) => v.status.privacyStatus !== 'private');
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Convert to social posts
|
|
139
|
+
const socialPosts: SocialPost[] = videos.map((video: any) => this.normalizePost(video));
|
|
140
|
+
|
|
141
|
+
// Calculate summary statistics
|
|
142
|
+
const summary = {
|
|
143
|
+
totalVideos: videos.length,
|
|
144
|
+
channelId: actualChannelId,
|
|
145
|
+
totalViews: videos.reduce((sum: number, v: any) => sum + parseInt(v.statistics.viewCount || '0'), 0),
|
|
146
|
+
totalLikes: videos.reduce((sum: number, v: any) => sum + parseInt(v.statistics.likeCount || '0'), 0),
|
|
147
|
+
totalComments: videos.reduce((sum: number, v: any) => sum + parseInt(v.statistics.commentCount || '0'), 0),
|
|
148
|
+
averageViews: Math.round(videos.reduce((sum: number, v: any) => sum + parseInt(v.statistics.viewCount || '0'), 0) / videos.length),
|
|
149
|
+
dateRange: {
|
|
150
|
+
oldest: videos.length > 0 ? videos[videos.length - 1].snippet.publishedAt : null,
|
|
151
|
+
newest: videos.length > 0 ? videos[0].snippet.publishedAt : null
|
|
152
|
+
},
|
|
153
|
+
privacyBreakdown: this.groupByPrivacy(videos),
|
|
154
|
+
nextPageToken: searchResponse.nextPageToken,
|
|
155
|
+
prevPageToken: searchResponse.prevPageToken,
|
|
156
|
+
quotaCost: this.getQuotaCost('search.list') + this.getQuotaCost('videos.list')
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// Update output parameters
|
|
160
|
+
const outputParams = [...Params];
|
|
161
|
+
const videosParam = outputParams.find(p => p.Name === 'Videos');
|
|
162
|
+
if (videosParam) videosParam.Value = socialPosts;
|
|
163
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
164
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
165
|
+
const nextPageTokenParam = outputParams.find(p => p.Name === 'NextPageToken');
|
|
166
|
+
if (nextPageTokenParam) nextPageTokenParam.Value = searchResponse.nextPageToken;
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
Success: true,
|
|
170
|
+
ResultCode: 'SUCCESS',
|
|
171
|
+
Message: `Retrieved ${videos.length} videos from channel`,
|
|
172
|
+
Params: outputParams
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
} catch (error) {
|
|
176
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
177
|
+
|
|
178
|
+
return {
|
|
179
|
+
Success: false,
|
|
180
|
+
ResultCode: this.getErrorCode(errorMessage),
|
|
181
|
+
Message: `Failed to get channel videos: ${errorMessage}`,
|
|
182
|
+
Params
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Group videos by privacy status
|
|
189
|
+
*/
|
|
190
|
+
private groupByPrivacy(videos: any[]): Record<string, number> {
|
|
191
|
+
return videos.reduce((acc, video) => {
|
|
192
|
+
const privacy = video.status.privacyStatus;
|
|
193
|
+
acc[privacy] = (acc[privacy] || 0) + 1;
|
|
194
|
+
return acc;
|
|
195
|
+
}, {});
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Get error code from error message
|
|
200
|
+
*/
|
|
201
|
+
private getErrorCode(message: string): string {
|
|
202
|
+
if (message.includes('quota')) return 'QUOTA_EXCEEDED';
|
|
203
|
+
if (message.includes('401') || message.includes('unauthorized')) return 'INVALID_TOKEN';
|
|
204
|
+
if (message.includes('403') || message.includes('forbidden')) return 'INSUFFICIENT_PERMISSIONS';
|
|
205
|
+
if (message.includes('404')) return 'NOT_FOUND';
|
|
206
|
+
if (message.includes('rate limit')) return 'RATE_LIMIT';
|
|
207
|
+
return 'ERROR';
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Define the parameters this action expects
|
|
212
|
+
*/
|
|
213
|
+
public get Params(): ActionParam[] {
|
|
214
|
+
const baseParams = this.commonSocialParams;
|
|
215
|
+
const specificParams: ActionParam[] = [
|
|
216
|
+
{
|
|
217
|
+
Name: 'ChannelID',
|
|
218
|
+
Type: 'Input',
|
|
219
|
+
Value: null
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
Name: 'MaxResults',
|
|
223
|
+
Type: 'Input',
|
|
224
|
+
Value: 50
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
Name: 'OrderBy',
|
|
228
|
+
Type: 'Input',
|
|
229
|
+
Value: 'date'
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
Name: 'PublishedAfter',
|
|
233
|
+
Type: 'Input',
|
|
234
|
+
Value: null
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
Name: 'PublishedBefore',
|
|
238
|
+
Type: 'Input',
|
|
239
|
+
Value: null
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
Name: 'IncludePrivate',
|
|
243
|
+
Type: 'Input',
|
|
244
|
+
Value: false
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
Name: 'VideoType',
|
|
248
|
+
Type: 'Input',
|
|
249
|
+
Value: 'any'
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
Name: 'VideoDuration',
|
|
253
|
+
Type: 'Input',
|
|
254
|
+
Value: 'any'
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
Name: 'PageToken',
|
|
258
|
+
Type: 'Input',
|
|
259
|
+
Value: null
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
Name: 'Videos',
|
|
263
|
+
Type: 'Output',
|
|
264
|
+
Value: null
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
Name: 'Summary',
|
|
268
|
+
Type: 'Output',
|
|
269
|
+
Value: null
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
Name: 'NextPageToken',
|
|
273
|
+
Type: 'Output',
|
|
274
|
+
Value: null
|
|
275
|
+
}
|
|
276
|
+
];
|
|
277
|
+
return [...baseParams, ...specificParams];
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Metadata about this action
|
|
282
|
+
*/
|
|
283
|
+
public get Description(): string {
|
|
284
|
+
return 'Gets videos from a YouTube channel with filtering and pagination support';
|
|
285
|
+
}
|
|
286
|
+
}
|
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { YouTubeBaseAction } from '../youtube-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Action to get comments from YouTube videos
|
|
7
|
+
*/
|
|
8
|
+
@RegisterClass(YouTubeBaseAction, 'YouTubeGetCommentsAction')
|
|
9
|
+
export class YouTubeGetCommentsAction extends YouTubeBaseAction {
|
|
10
|
+
/**
|
|
11
|
+
* Get comments from YouTube videos
|
|
12
|
+
*/
|
|
13
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
14
|
+
const { Params, ContextUser } = params;
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
// Initialize OAuth
|
|
18
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
19
|
+
if (!companyIntegrationId) {
|
|
20
|
+
throw new Error('CompanyIntegrationID is required');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const initialized = await this.initializeOAuth(companyIntegrationId);
|
|
24
|
+
if (!initialized) {
|
|
25
|
+
throw new Error('Failed to initialize YouTube OAuth connection');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Extract parameters
|
|
29
|
+
const videoId = this.getParamValue(Params, 'VideoID');
|
|
30
|
+
const channelId = this.getParamValue(Params, 'ChannelID');
|
|
31
|
+
const maxResults = this.getParamValue(Params, 'MaxResults') || 100;
|
|
32
|
+
const orderBy = this.getParamValue(Params, 'OrderBy') || 'time';
|
|
33
|
+
const searchTerms = this.getParamValue(Params, 'SearchTerms');
|
|
34
|
+
const includeReplies = this.getParamValue(Params, 'IncludeReplies') ?? true;
|
|
35
|
+
const textFormat = this.getParamValue(Params, 'TextFormat') || 'plainText';
|
|
36
|
+
const pageToken = this.getParamValue(Params, 'PageToken');
|
|
37
|
+
|
|
38
|
+
// Validate parameters - need either videoId or channelId
|
|
39
|
+
if (!videoId && !channelId) {
|
|
40
|
+
throw new Error('Either VideoID or ChannelID is required');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Build request parameters
|
|
44
|
+
const requestParams: any = {
|
|
45
|
+
part: 'snippet,replies',
|
|
46
|
+
maxResults: Math.min(maxResults, 100), // YouTube max is 100
|
|
47
|
+
order: orderBy,
|
|
48
|
+
textFormat: textFormat
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
if (videoId) {
|
|
52
|
+
requestParams.videoId = videoId;
|
|
53
|
+
} else if (channelId) {
|
|
54
|
+
requestParams.allThreadsRelatedToChannelId = channelId;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (searchTerms) {
|
|
58
|
+
requestParams.searchTerms = searchTerms;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (pageToken) {
|
|
62
|
+
requestParams.pageToken = pageToken;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Get comment threads
|
|
66
|
+
const commentsResponse = await this.makeYouTubeRequest<any>(
|
|
67
|
+
'/commentThreads',
|
|
68
|
+
'GET',
|
|
69
|
+
undefined,
|
|
70
|
+
requestParams,
|
|
71
|
+
ContextUser
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
// Process comments
|
|
75
|
+
const comments = this.processComments(commentsResponse.items || [], includeReplies);
|
|
76
|
+
|
|
77
|
+
// Get video details if videoId provided
|
|
78
|
+
let videoDetails = null;
|
|
79
|
+
if (videoId) {
|
|
80
|
+
const videoResponse = await this.makeYouTubeRequest<any>(
|
|
81
|
+
'/videos',
|
|
82
|
+
'GET',
|
|
83
|
+
undefined,
|
|
84
|
+
{
|
|
85
|
+
part: 'snippet,statistics',
|
|
86
|
+
id: videoId
|
|
87
|
+
},
|
|
88
|
+
ContextUser
|
|
89
|
+
);
|
|
90
|
+
if (videoResponse.items && videoResponse.items.length > 0) {
|
|
91
|
+
videoDetails = videoResponse.items[0];
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Calculate statistics
|
|
96
|
+
const stats = this.calculateCommentStats(comments);
|
|
97
|
+
|
|
98
|
+
// Prepare summary
|
|
99
|
+
const summary = {
|
|
100
|
+
totalComments: comments.length,
|
|
101
|
+
totalThreads: commentsResponse.items?.length || 0,
|
|
102
|
+
statistics: stats,
|
|
103
|
+
videoDetails: videoDetails ? {
|
|
104
|
+
id: videoDetails.id,
|
|
105
|
+
title: videoDetails.snippet.title,
|
|
106
|
+
channelId: videoDetails.snippet.channelId,
|
|
107
|
+
channelTitle: videoDetails.snippet.channelTitle,
|
|
108
|
+
viewCount: parseInt(videoDetails.statistics.viewCount || '0'),
|
|
109
|
+
commentCount: parseInt(videoDetails.statistics.commentCount || '0')
|
|
110
|
+
} : null,
|
|
111
|
+
sentiment: this.analyzeSentiment(comments),
|
|
112
|
+
topCommenters: this.getTopCommenters(comments),
|
|
113
|
+
nextPageToken: commentsResponse.nextPageToken,
|
|
114
|
+
prevPageToken: commentsResponse.prevPageToken,
|
|
115
|
+
quotaCost: this.getQuotaCost('commentThreads.list') + (videoId ? this.getQuotaCost('videos.list') : 0)
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// Update output parameters
|
|
119
|
+
const outputParams = [...Params];
|
|
120
|
+
const commentsParam = outputParams.find(p => p.Name === 'Comments');
|
|
121
|
+
if (commentsParam) commentsParam.Value = comments;
|
|
122
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
123
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
124
|
+
const nextPageTokenParam = outputParams.find(p => p.Name === 'NextPageToken');
|
|
125
|
+
if (nextPageTokenParam) nextPageTokenParam.Value = commentsResponse.nextPageToken;
|
|
126
|
+
|
|
127
|
+
return {
|
|
128
|
+
Success: true,
|
|
129
|
+
ResultCode: 'SUCCESS',
|
|
130
|
+
Message: `Retrieved ${comments.length} comments from ${commentsResponse.items?.length || 0} threads`,
|
|
131
|
+
Params: outputParams
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
} catch (error) {
|
|
135
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
Success: false,
|
|
139
|
+
ResultCode: this.getErrorCode(errorMessage),
|
|
140
|
+
Message: `Failed to get comments: ${errorMessage}`,
|
|
141
|
+
Params
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Process raw comment threads into a flat array
|
|
148
|
+
*/
|
|
149
|
+
private processComments(threads: any[], includeReplies: boolean): any[] {
|
|
150
|
+
const comments: any[] = [];
|
|
151
|
+
|
|
152
|
+
for (const thread of threads) {
|
|
153
|
+
const topComment = thread.snippet.topLevelComment;
|
|
154
|
+
|
|
155
|
+
// Add top-level comment
|
|
156
|
+
comments.push({
|
|
157
|
+
id: topComment.id,
|
|
158
|
+
threadId: thread.id,
|
|
159
|
+
text: topComment.snippet.textDisplay,
|
|
160
|
+
authorDisplayName: topComment.snippet.authorDisplayName,
|
|
161
|
+
authorChannelId: topComment.snippet.authorChannelId?.value,
|
|
162
|
+
authorProfileImageUrl: topComment.snippet.authorProfileImageUrl,
|
|
163
|
+
likeCount: topComment.snippet.likeCount,
|
|
164
|
+
publishedAt: topComment.snippet.publishedAt,
|
|
165
|
+
updatedAt: topComment.snippet.updatedAt,
|
|
166
|
+
isTopLevel: true,
|
|
167
|
+
replyCount: thread.snippet.totalReplyCount,
|
|
168
|
+
videoId: topComment.snippet.videoId,
|
|
169
|
+
canReply: thread.snippet.canReply,
|
|
170
|
+
isPublic: thread.snippet.isPublic
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// Add replies if requested and available
|
|
174
|
+
if (includeReplies && thread.replies?.comments) {
|
|
175
|
+
for (const reply of thread.replies.comments) {
|
|
176
|
+
comments.push({
|
|
177
|
+
id: reply.id,
|
|
178
|
+
threadId: thread.id,
|
|
179
|
+
parentId: topComment.id,
|
|
180
|
+
text: reply.snippet.textDisplay,
|
|
181
|
+
authorDisplayName: reply.snippet.authorDisplayName,
|
|
182
|
+
authorChannelId: reply.snippet.authorChannelId?.value,
|
|
183
|
+
authorProfileImageUrl: reply.snippet.authorProfileImageUrl,
|
|
184
|
+
likeCount: reply.snippet.likeCount,
|
|
185
|
+
publishedAt: reply.snippet.publishedAt,
|
|
186
|
+
updatedAt: reply.snippet.updatedAt,
|
|
187
|
+
isTopLevel: false,
|
|
188
|
+
videoId: reply.snippet.videoId
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return comments;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Calculate comment statistics
|
|
199
|
+
*/
|
|
200
|
+
private calculateCommentStats(comments: any[]): any {
|
|
201
|
+
const stats = {
|
|
202
|
+
totalLikes: 0,
|
|
203
|
+
averageLikes: 0,
|
|
204
|
+
topLevelComments: 0,
|
|
205
|
+
replies: 0,
|
|
206
|
+
commentersCount: new Set(),
|
|
207
|
+
averageCommentLength: 0,
|
|
208
|
+
longestComment: 0,
|
|
209
|
+
shortestComment: Infinity
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
let totalLength = 0;
|
|
213
|
+
|
|
214
|
+
for (const comment of comments) {
|
|
215
|
+
stats.totalLikes += comment.likeCount || 0;
|
|
216
|
+
if (comment.isTopLevel) {
|
|
217
|
+
stats.topLevelComments++;
|
|
218
|
+
} else {
|
|
219
|
+
stats.replies++;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (comment.authorChannelId) {
|
|
223
|
+
stats.commentersCount.add(comment.authorChannelId);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const length = comment.text.length;
|
|
227
|
+
totalLength += length;
|
|
228
|
+
stats.longestComment = Math.max(stats.longestComment, length);
|
|
229
|
+
stats.shortestComment = Math.min(stats.shortestComment, length);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
stats.averageLikes = comments.length > 0 ? Math.round(stats.totalLikes / comments.length * 100) / 100 : 0;
|
|
233
|
+
stats.averageCommentLength = comments.length > 0 ? Math.round(totalLength / comments.length) : 0;
|
|
234
|
+
|
|
235
|
+
return {
|
|
236
|
+
totalLikes: stats.totalLikes,
|
|
237
|
+
averageLikes: stats.averageLikes,
|
|
238
|
+
topLevelComments: stats.topLevelComments,
|
|
239
|
+
replies: stats.replies,
|
|
240
|
+
uniqueCommenters: stats.commentersCount.size,
|
|
241
|
+
averageCommentLength: stats.averageCommentLength,
|
|
242
|
+
longestComment: stats.longestComment,
|
|
243
|
+
shortestComment: stats.shortestComment === Infinity ? 0 : stats.shortestComment
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Basic sentiment analysis (simplified)
|
|
249
|
+
*/
|
|
250
|
+
private analyzeSentiment(comments: any[]): any {
|
|
251
|
+
const positiveWords = ['love', 'great', 'amazing', 'awesome', 'excellent', 'fantastic', 'wonderful', 'best', 'perfect', 'thank'];
|
|
252
|
+
const negativeWords = ['hate', 'bad', 'terrible', 'awful', 'worst', 'horrible', 'disgusting', 'trash', 'waste', 'dislike'];
|
|
253
|
+
|
|
254
|
+
let positive = 0;
|
|
255
|
+
let negative = 0;
|
|
256
|
+
let neutral = 0;
|
|
257
|
+
|
|
258
|
+
for (const comment of comments) {
|
|
259
|
+
const text = comment.text.toLowerCase();
|
|
260
|
+
let hasPositive = false;
|
|
261
|
+
let hasNegative = false;
|
|
262
|
+
|
|
263
|
+
for (const word of positiveWords) {
|
|
264
|
+
if (text.includes(word)) {
|
|
265
|
+
hasPositive = true;
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
for (const word of negativeWords) {
|
|
271
|
+
if (text.includes(word)) {
|
|
272
|
+
hasNegative = true;
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (hasPositive && !hasNegative) {
|
|
278
|
+
positive++;
|
|
279
|
+
} else if (hasNegative && !hasPositive) {
|
|
280
|
+
negative++;
|
|
281
|
+
} else {
|
|
282
|
+
neutral++;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
const total = comments.length || 1;
|
|
287
|
+
return {
|
|
288
|
+
positive: positive,
|
|
289
|
+
negative: negative,
|
|
290
|
+
neutral: neutral,
|
|
291
|
+
positivePercentage: Math.round((positive / total) * 100),
|
|
292
|
+
negativePercentage: Math.round((negative / total) * 100),
|
|
293
|
+
neutralPercentage: Math.round((neutral / total) * 100)
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Get top commenters by frequency
|
|
299
|
+
*/
|
|
300
|
+
private getTopCommenters(comments: any[]): any[] {
|
|
301
|
+
const commenterMap = new Map<string, any>();
|
|
302
|
+
|
|
303
|
+
for (const comment of comments) {
|
|
304
|
+
if (!comment.authorChannelId) continue;
|
|
305
|
+
|
|
306
|
+
const key = comment.authorChannelId;
|
|
307
|
+
if (!commenterMap.has(key)) {
|
|
308
|
+
commenterMap.set(key, {
|
|
309
|
+
channelId: comment.authorChannelId,
|
|
310
|
+
displayName: comment.authorDisplayName,
|
|
311
|
+
profileImage: comment.authorProfileImageUrl,
|
|
312
|
+
commentCount: 0,
|
|
313
|
+
totalLikes: 0
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
const commenter = commenterMap.get(key);
|
|
318
|
+
commenter.commentCount++;
|
|
319
|
+
commenter.totalLikes += comment.likeCount || 0;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
return Array.from(commenterMap.values())
|
|
323
|
+
.sort((a, b) => b.commentCount - a.commentCount)
|
|
324
|
+
.slice(0, 10);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Get error code from error message
|
|
329
|
+
*/
|
|
330
|
+
private getErrorCode(message: string): string {
|
|
331
|
+
if (message.includes('quota')) return 'QUOTA_EXCEEDED';
|
|
332
|
+
if (message.includes('401') || message.includes('unauthorized')) return 'INVALID_TOKEN';
|
|
333
|
+
if (message.includes('403') || message.includes('forbidden')) return 'INSUFFICIENT_PERMISSIONS';
|
|
334
|
+
if (message.includes('404')) return 'NOT_FOUND';
|
|
335
|
+
if (message.includes('rate limit')) return 'RATE_LIMIT';
|
|
336
|
+
if (message.includes('disabled')) return 'COMMENTS_DISABLED';
|
|
337
|
+
return 'ERROR';
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Define the parameters this action expects
|
|
342
|
+
*/
|
|
343
|
+
public get Params(): ActionParam[] {
|
|
344
|
+
const baseParams = this.commonSocialParams;
|
|
345
|
+
const specificParams: ActionParam[] = [
|
|
346
|
+
{
|
|
347
|
+
Name: 'VideoID',
|
|
348
|
+
Type: 'Input',
|
|
349
|
+
Value: null
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
Name: 'ChannelID',
|
|
353
|
+
Type: 'Input',
|
|
354
|
+
Value: null
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
Name: 'MaxResults',
|
|
358
|
+
Type: 'Input',
|
|
359
|
+
Value: 100
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
Name: 'OrderBy',
|
|
363
|
+
Type: 'Input',
|
|
364
|
+
Value: 'time'
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
Name: 'SearchTerms',
|
|
368
|
+
Type: 'Input',
|
|
369
|
+
Value: null
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
Name: 'IncludeReplies',
|
|
373
|
+
Type: 'Input',
|
|
374
|
+
Value: true
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
Name: 'TextFormat',
|
|
378
|
+
Type: 'Input',
|
|
379
|
+
Value: 'plainText'
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
Name: 'PageToken',
|
|
383
|
+
Type: 'Input',
|
|
384
|
+
Value: null
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
Name: 'Comments',
|
|
388
|
+
Type: 'Output',
|
|
389
|
+
Value: null
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
Name: 'Summary',
|
|
393
|
+
Type: 'Output',
|
|
394
|
+
Value: null
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
Name: 'NextPageToken',
|
|
398
|
+
Type: 'Output',
|
|
399
|
+
Value: null
|
|
400
|
+
}
|
|
401
|
+
];
|
|
402
|
+
return [...baseParams, ...specificParams];
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Metadata about this action
|
|
407
|
+
*/
|
|
408
|
+
public get Description(): string {
|
|
409
|
+
return 'Gets comments from YouTube videos or channels with sentiment analysis and statistics';
|
|
410
|
+
}
|
|
411
|
+
}
|