@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,502 @@
|
|
|
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 analytics for a YouTube channel
|
|
7
|
+
*/
|
|
8
|
+
@RegisterClass(YouTubeBaseAction, 'YouTubeGetChannelAnalyticsAction')
|
|
9
|
+
export class YouTubeGetChannelAnalyticsAction extends YouTubeBaseAction {
|
|
10
|
+
/**
|
|
11
|
+
* Get analytics for a YouTube channel
|
|
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 channelId = this.getParamValue(Params, 'ChannelID') || this.getCustomAttribute(1);
|
|
30
|
+
const dateRange = this.getParamValue(Params, 'DateRange') || 'last30Days';
|
|
31
|
+
const startDate = this.getParamValue(Params, 'StartDate');
|
|
32
|
+
const endDate = this.getParamValue(Params, 'EndDate');
|
|
33
|
+
const includeVideos = this.getParamValue(Params, 'IncludeVideos') ?? true;
|
|
34
|
+
const videoLimit = this.getParamValue(Params, 'VideoLimit') || 50;
|
|
35
|
+
|
|
36
|
+
// If no channel ID provided, get the authenticated user's channel
|
|
37
|
+
let actualChannelId = channelId;
|
|
38
|
+
if (!actualChannelId) {
|
|
39
|
+
const channelResponse = await this.makeYouTubeRequest<any>(
|
|
40
|
+
'/channels',
|
|
41
|
+
'GET',
|
|
42
|
+
undefined,
|
|
43
|
+
{
|
|
44
|
+
part: 'id,snippet,statistics,contentDetails,brandingSettings',
|
|
45
|
+
mine: true
|
|
46
|
+
},
|
|
47
|
+
ContextUser
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
if (!channelResponse.items || channelResponse.items.length === 0) {
|
|
51
|
+
throw new Error('No channel found for authenticated user');
|
|
52
|
+
}
|
|
53
|
+
actualChannelId = channelResponse.items[0].id;
|
|
54
|
+
} else {
|
|
55
|
+
// Get channel details for specified channel
|
|
56
|
+
const channelResponse = await this.makeYouTubeRequest<any>(
|
|
57
|
+
'/channels',
|
|
58
|
+
'GET',
|
|
59
|
+
undefined,
|
|
60
|
+
{
|
|
61
|
+
part: 'snippet,statistics,contentDetails,brandingSettings',
|
|
62
|
+
id: actualChannelId
|
|
63
|
+
},
|
|
64
|
+
ContextUser
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
if (!channelResponse.items || channelResponse.items.length === 0) {
|
|
68
|
+
throw new Error(`Channel not found: ${actualChannelId}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Get channel details
|
|
73
|
+
const channelData = await this.getChannelDetails(actualChannelId, ContextUser);
|
|
74
|
+
const channel = channelData.items[0];
|
|
75
|
+
|
|
76
|
+
// Calculate date range
|
|
77
|
+
const { start, end } = this.calculateDateRange(dateRange, startDate, endDate);
|
|
78
|
+
|
|
79
|
+
// Get videos for the date range if requested
|
|
80
|
+
let videos: any[] = [];
|
|
81
|
+
let videoAnalytics: any = {};
|
|
82
|
+
|
|
83
|
+
if (includeVideos) {
|
|
84
|
+
videos = await this.getChannelVideosForDateRange(actualChannelId, start, end, videoLimit, ContextUser);
|
|
85
|
+
if (videos.length > 0) {
|
|
86
|
+
videoAnalytics = await this.aggregateVideoAnalytics(videos);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Prepare channel analytics
|
|
91
|
+
const channelAnalytics = {
|
|
92
|
+
channelId: channel.id,
|
|
93
|
+
channelTitle: channel.snippet.title,
|
|
94
|
+
channelDescription: channel.snippet.description,
|
|
95
|
+
channelUrl: `https://www.youtube.com/channel/${channel.id}`,
|
|
96
|
+
customUrl: channel.snippet.customUrl,
|
|
97
|
+
country: channel.snippet.country,
|
|
98
|
+
publishedAt: channel.snippet.publishedAt,
|
|
99
|
+
thumbnails: channel.snippet.thumbnails,
|
|
100
|
+
|
|
101
|
+
// Overall statistics
|
|
102
|
+
statistics: {
|
|
103
|
+
viewCount: parseInt(channel.statistics.viewCount || '0'),
|
|
104
|
+
subscriberCount: parseInt(channel.statistics.subscriberCount || '0'),
|
|
105
|
+
videoCount: parseInt(channel.statistics.videoCount || '0'),
|
|
106
|
+
// Note: hiddenSubscriberCount indicates if subscriber count is public
|
|
107
|
+
subscribersHidden: channel.statistics.hiddenSubscriberCount
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
// Date range specific analytics
|
|
111
|
+
dateRangeAnalytics: {
|
|
112
|
+
dateRange: {
|
|
113
|
+
start: start.toISOString(),
|
|
114
|
+
end: end.toISOString(),
|
|
115
|
+
days: Math.ceil((end.getTime() - start.getTime()) / (1000 * 60 * 60 * 24))
|
|
116
|
+
},
|
|
117
|
+
videosPublished: videos.length,
|
|
118
|
+
totalViews: videoAnalytics.totalViews || 0,
|
|
119
|
+
totalLikes: videoAnalytics.totalLikes || 0,
|
|
120
|
+
totalComments: videoAnalytics.totalComments || 0,
|
|
121
|
+
averageViewsPerVideo: videoAnalytics.averageViews || 0,
|
|
122
|
+
topPerformingVideos: videoAnalytics.topVideos || []
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
// Growth metrics (if we had historical data)
|
|
126
|
+
growth: {
|
|
127
|
+
note: 'Growth metrics require YouTube Analytics API access',
|
|
128
|
+
subscriberGrowth: 'N/A',
|
|
129
|
+
viewGrowth: 'N/A'
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
// Content details
|
|
133
|
+
contentDetails: {
|
|
134
|
+
relatedPlaylists: channel.contentDetails.relatedPlaylists,
|
|
135
|
+
uploadPlaylistId: channel.contentDetails.relatedPlaylists.uploads
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
// Branding
|
|
139
|
+
branding: {
|
|
140
|
+
keywords: channel.brandingSettings?.channel?.keywords,
|
|
141
|
+
unsubscribedTrailer: channel.brandingSettings?.channel?.unsubscribedTrailer,
|
|
142
|
+
featuredChannelsUrls: channel.brandingSettings?.channel?.featuredChannelsUrls
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
quotaCost: this.getQuotaCost('channels.list') +
|
|
146
|
+
(videos.length > 0 ? this.getQuotaCost('search.list') + this.getQuotaCost('videos.list') : 0)
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
// Prepare summary
|
|
150
|
+
const summary = {
|
|
151
|
+
channelHealth: this.calculateChannelHealth(channel, videoAnalytics),
|
|
152
|
+
recommendations: this.generateRecommendations(channel, videoAnalytics),
|
|
153
|
+
performanceIndicators: {
|
|
154
|
+
engagementRate: this.calculateEngagementRate(channel.statistics, videoAnalytics),
|
|
155
|
+
averageViewsPerSubscriber: this.calculateViewsPerSubscriber(channel.statistics),
|
|
156
|
+
uploadFrequency: this.calculateUploadFrequency(videos, start, end)
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
// Update output parameters
|
|
161
|
+
const outputParams = [...Params];
|
|
162
|
+
const analyticsParam = outputParams.find(p => p.Name === 'Analytics');
|
|
163
|
+
if (analyticsParam) analyticsParam.Value = channelAnalytics;
|
|
164
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
165
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
166
|
+
const videosParam = outputParams.find(p => p.Name === 'Videos');
|
|
167
|
+
if (videosParam) videosParam.Value = videos;
|
|
168
|
+
|
|
169
|
+
return {
|
|
170
|
+
Success: true,
|
|
171
|
+
ResultCode: 'SUCCESS',
|
|
172
|
+
Message: `Retrieved analytics for channel: ${channel.snippet.title}`,
|
|
173
|
+
Params: outputParams
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
} catch (error) {
|
|
177
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
178
|
+
|
|
179
|
+
return {
|
|
180
|
+
Success: false,
|
|
181
|
+
ResultCode: this.getErrorCode(errorMessage),
|
|
182
|
+
Message: `Failed to get channel analytics: ${errorMessage}`,
|
|
183
|
+
Params
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Get channel details
|
|
190
|
+
*/
|
|
191
|
+
private async getChannelDetails(channelId: string, contextUser?: any): Promise<any> {
|
|
192
|
+
return await this.makeYouTubeRequest(
|
|
193
|
+
'/channels',
|
|
194
|
+
'GET',
|
|
195
|
+
undefined,
|
|
196
|
+
{
|
|
197
|
+
part: 'snippet,statistics,contentDetails,brandingSettings',
|
|
198
|
+
id: channelId
|
|
199
|
+
},
|
|
200
|
+
contextUser
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Get videos for a date range
|
|
206
|
+
*/
|
|
207
|
+
private async getChannelVideosForDateRange(
|
|
208
|
+
channelId: string,
|
|
209
|
+
startDate: Date,
|
|
210
|
+
endDate: Date,
|
|
211
|
+
limit: number,
|
|
212
|
+
contextUser?: any
|
|
213
|
+
): Promise<any[]> {
|
|
214
|
+
const searchResponse = await this.makeYouTubeRequest<any>(
|
|
215
|
+
'/search',
|
|
216
|
+
'GET',
|
|
217
|
+
undefined,
|
|
218
|
+
{
|
|
219
|
+
part: 'id',
|
|
220
|
+
channelId: channelId,
|
|
221
|
+
type: 'video',
|
|
222
|
+
publishedAfter: startDate.toISOString(),
|
|
223
|
+
publishedBefore: endDate.toISOString(),
|
|
224
|
+
maxResults: Math.min(limit, 50),
|
|
225
|
+
order: 'date'
|
|
226
|
+
},
|
|
227
|
+
contextUser
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
if (!searchResponse.items || searchResponse.items.length === 0) {
|
|
231
|
+
return [];
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const videoIds = searchResponse.items.map((item: any) => item.id.videoId).join(',');
|
|
235
|
+
|
|
236
|
+
const videosResponse = await this.makeYouTubeRequest<any>(
|
|
237
|
+
'/videos',
|
|
238
|
+
'GET',
|
|
239
|
+
undefined,
|
|
240
|
+
{
|
|
241
|
+
part: 'snippet,statistics,contentDetails',
|
|
242
|
+
id: videoIds
|
|
243
|
+
},
|
|
244
|
+
contextUser
|
|
245
|
+
);
|
|
246
|
+
|
|
247
|
+
return videosResponse.items || [];
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Aggregate video analytics
|
|
252
|
+
*/
|
|
253
|
+
private aggregateVideoAnalytics(videos: any[]): any {
|
|
254
|
+
let totalViews = 0;
|
|
255
|
+
let totalLikes = 0;
|
|
256
|
+
let totalComments = 0;
|
|
257
|
+
let totalDislikes = 0;
|
|
258
|
+
|
|
259
|
+
for (const video of videos) {
|
|
260
|
+
const stats = video.statistics || {};
|
|
261
|
+
totalViews += parseInt(stats.viewCount || '0');
|
|
262
|
+
totalLikes += parseInt(stats.likeCount || '0');
|
|
263
|
+
totalComments += parseInt(stats.commentCount || '0');
|
|
264
|
+
totalDislikes += parseInt(stats.dislikeCount || '0');
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
const topVideos = [...videos]
|
|
268
|
+
.sort((a, b) => parseInt(b.statistics?.viewCount || '0') - parseInt(a.statistics?.viewCount || '0'))
|
|
269
|
+
.slice(0, 5)
|
|
270
|
+
.map(v => ({
|
|
271
|
+
id: v.id,
|
|
272
|
+
title: v.snippet.title,
|
|
273
|
+
views: parseInt(v.statistics?.viewCount || '0'),
|
|
274
|
+
likes: parseInt(v.statistics?.likeCount || '0'),
|
|
275
|
+
comments: parseInt(v.statistics?.commentCount || '0'),
|
|
276
|
+
publishedAt: v.snippet.publishedAt,
|
|
277
|
+
url: `https://www.youtube.com/watch?v=${v.id}`
|
|
278
|
+
}));
|
|
279
|
+
|
|
280
|
+
return {
|
|
281
|
+
totalViews,
|
|
282
|
+
totalLikes,
|
|
283
|
+
totalComments,
|
|
284
|
+
totalDislikes,
|
|
285
|
+
averageViews: videos.length > 0 ? Math.round(totalViews / videos.length) : 0,
|
|
286
|
+
averageLikes: videos.length > 0 ? Math.round(totalLikes / videos.length) : 0,
|
|
287
|
+
topVideos
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Calculate date range
|
|
293
|
+
*/
|
|
294
|
+
private calculateDateRange(
|
|
295
|
+
dateRange: string,
|
|
296
|
+
startDate?: string,
|
|
297
|
+
endDate?: string
|
|
298
|
+
): { start: Date; end: Date } {
|
|
299
|
+
const end = endDate ? new Date(endDate) : new Date();
|
|
300
|
+
let start: Date;
|
|
301
|
+
|
|
302
|
+
if (startDate) {
|
|
303
|
+
start = new Date(startDate);
|
|
304
|
+
} else {
|
|
305
|
+
switch (dateRange) {
|
|
306
|
+
case 'last7Days':
|
|
307
|
+
start = new Date(end.getTime() - 7 * 24 * 60 * 60 * 1000);
|
|
308
|
+
break;
|
|
309
|
+
case 'last30Days':
|
|
310
|
+
start = new Date(end.getTime() - 30 * 24 * 60 * 60 * 1000);
|
|
311
|
+
break;
|
|
312
|
+
case 'last90Days':
|
|
313
|
+
start = new Date(end.getTime() - 90 * 24 * 60 * 60 * 1000);
|
|
314
|
+
break;
|
|
315
|
+
case 'lastYear':
|
|
316
|
+
start = new Date(end.getTime() - 365 * 24 * 60 * 60 * 1000);
|
|
317
|
+
break;
|
|
318
|
+
default:
|
|
319
|
+
start = new Date(end.getTime() - 30 * 24 * 60 * 60 * 1000);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
return { start, end };
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Calculate channel health score
|
|
328
|
+
*/
|
|
329
|
+
private calculateChannelHealth(channel: any, videoAnalytics: any): any {
|
|
330
|
+
const stats = channel.statistics;
|
|
331
|
+
const subscribers = parseInt(stats.subscriberCount || '0');
|
|
332
|
+
const views = parseInt(stats.viewCount || '0');
|
|
333
|
+
const videos = parseInt(stats.videoCount || '0');
|
|
334
|
+
|
|
335
|
+
// Simple health score based on engagement
|
|
336
|
+
let score = 0;
|
|
337
|
+
let factors: string[] = [];
|
|
338
|
+
|
|
339
|
+
// Subscriber to view ratio
|
|
340
|
+
if (subscribers > 0 && views > subscribers * 100) {
|
|
341
|
+
score += 25;
|
|
342
|
+
factors.push('Good view-to-subscriber ratio');
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// Video count
|
|
346
|
+
if (videos > 50) {
|
|
347
|
+
score += 25;
|
|
348
|
+
factors.push('Active content creation');
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// Recent engagement
|
|
352
|
+
if (videoAnalytics.averageViews > subscribers * 0.1) {
|
|
353
|
+
score += 25;
|
|
354
|
+
factors.push('Strong recent engagement');
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// Upload consistency
|
|
358
|
+
if (videoAnalytics.topVideos?.length >= 3) {
|
|
359
|
+
score += 25;
|
|
360
|
+
factors.push('Consistent uploads');
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
return {
|
|
364
|
+
score: Math.min(score, 100),
|
|
365
|
+
rating: score >= 75 ? 'Excellent' : score >= 50 ? 'Good' : score >= 25 ? 'Fair' : 'Needs Improvement',
|
|
366
|
+
factors
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Generate recommendations
|
|
372
|
+
*/
|
|
373
|
+
private generateRecommendations(channel: any, videoAnalytics: any): string[] {
|
|
374
|
+
const recommendations: string[] = [];
|
|
375
|
+
const stats = channel.statistics;
|
|
376
|
+
const subscribers = parseInt(stats.subscriberCount || '0');
|
|
377
|
+
|
|
378
|
+
if (videoAnalytics.averageViews < subscribers * 0.05) {
|
|
379
|
+
recommendations.push('Consider improving video titles and thumbnails to increase click-through rate');
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
if (videoAnalytics.topVideos?.length < 3) {
|
|
383
|
+
recommendations.push('Increase upload frequency to maintain audience engagement');
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
if (!channel.brandingSettings?.channel?.keywords) {
|
|
387
|
+
recommendations.push('Add channel keywords to improve discoverability');
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
if (!channel.snippet.customUrl) {
|
|
391
|
+
recommendations.push('Claim a custom URL for easier channel sharing');
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
return recommendations;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Calculate engagement rate
|
|
399
|
+
*/
|
|
400
|
+
private calculateEngagementRate(stats: any, videoAnalytics: any): number {
|
|
401
|
+
const views = videoAnalytics.totalViews || parseInt(stats.viewCount || '0');
|
|
402
|
+
const engagements = (videoAnalytics.totalLikes || 0) + (videoAnalytics.totalComments || 0);
|
|
403
|
+
|
|
404
|
+
return views > 0 ? Math.round((engagements / views) * 10000) / 100 : 0;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Calculate views per subscriber
|
|
409
|
+
*/
|
|
410
|
+
private calculateViewsPerSubscriber(stats: any): number {
|
|
411
|
+
const views = parseInt(stats.viewCount || '0');
|
|
412
|
+
const subscribers = parseInt(stats.subscriberCount || '0');
|
|
413
|
+
|
|
414
|
+
return subscribers > 0 ? Math.round((views / subscribers) * 100) / 100 : 0;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Calculate upload frequency
|
|
419
|
+
*/
|
|
420
|
+
private calculateUploadFrequency(videos: any[], start: Date, end: Date): string {
|
|
421
|
+
const days = Math.ceil((end.getTime() - start.getTime()) / (1000 * 60 * 60 * 24));
|
|
422
|
+
const videosPerDay = videos.length / days;
|
|
423
|
+
|
|
424
|
+
if (videosPerDay >= 1) return `${Math.round(videosPerDay * 10) / 10} videos/day`;
|
|
425
|
+
if (videosPerDay >= 1/7) return `${Math.round(videosPerDay * 7 * 10) / 10} videos/week`;
|
|
426
|
+
return `${Math.round(videosPerDay * 30 * 10) / 10} videos/month`;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Get error code from error message
|
|
431
|
+
*/
|
|
432
|
+
private getErrorCode(message: string): string {
|
|
433
|
+
if (message.includes('quota')) return 'QUOTA_EXCEEDED';
|
|
434
|
+
if (message.includes('401') || message.includes('unauthorized')) return 'INVALID_TOKEN';
|
|
435
|
+
if (message.includes('403') || message.includes('forbidden')) return 'INSUFFICIENT_PERMISSIONS';
|
|
436
|
+
if (message.includes('404')) return 'NOT_FOUND';
|
|
437
|
+
if (message.includes('rate limit')) return 'RATE_LIMIT';
|
|
438
|
+
return 'ERROR';
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Define the parameters this action expects
|
|
443
|
+
*/
|
|
444
|
+
public get Params(): ActionParam[] {
|
|
445
|
+
const baseParams = this.commonSocialParams;
|
|
446
|
+
const specificParams: ActionParam[] = [
|
|
447
|
+
{
|
|
448
|
+
Name: 'ChannelID',
|
|
449
|
+
Type: 'Input',
|
|
450
|
+
Value: null
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
Name: 'DateRange',
|
|
454
|
+
Type: 'Input',
|
|
455
|
+
Value: 'last30Days'
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
Name: 'StartDate',
|
|
459
|
+
Type: 'Input',
|
|
460
|
+
Value: null
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
Name: 'EndDate',
|
|
464
|
+
Type: 'Input',
|
|
465
|
+
Value: null
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
Name: 'IncludeVideos',
|
|
469
|
+
Type: 'Input',
|
|
470
|
+
Value: true
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
Name: 'VideoLimit',
|
|
474
|
+
Type: 'Input',
|
|
475
|
+
Value: 50
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
Name: 'Analytics',
|
|
479
|
+
Type: 'Output',
|
|
480
|
+
Value: null
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
Name: 'Summary',
|
|
484
|
+
Type: 'Output',
|
|
485
|
+
Value: null
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
Name: 'Videos',
|
|
489
|
+
Type: 'Output',
|
|
490
|
+
Value: null
|
|
491
|
+
}
|
|
492
|
+
];
|
|
493
|
+
return [...baseParams, ...specificParams];
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Metadata about this action
|
|
498
|
+
*/
|
|
499
|
+
public get Description(): string {
|
|
500
|
+
return 'Gets comprehensive analytics for a YouTube channel including statistics, growth metrics, and performance indicators';
|
|
501
|
+
}
|
|
502
|
+
}
|