@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,298 @@
|
|
|
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 YouTube videos
|
|
7
|
+
*/
|
|
8
|
+
@RegisterClass(YouTubeBaseAction, 'YouTubeGetVideoAnalyticsAction')
|
|
9
|
+
export class YouTubeGetVideoAnalyticsAction extends YouTubeBaseAction {
|
|
10
|
+
/**
|
|
11
|
+
* Get analytics for 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 videoIds = this.getParamValue(Params, 'VideoIDs');
|
|
30
|
+
const metricsRequested = this.getParamValue(Params, 'Metrics') || ['views', 'likes', 'comments', 'shares'];
|
|
31
|
+
const startDate = this.getParamValue(Params, 'StartDate');
|
|
32
|
+
const endDate = this.getParamValue(Params, 'EndDate');
|
|
33
|
+
const dimensions = this.getParamValue(Params, 'Dimensions');
|
|
34
|
+
|
|
35
|
+
// Validate parameters
|
|
36
|
+
if (!videoIds || (Array.isArray(videoIds) && videoIds.length === 0)) {
|
|
37
|
+
throw new Error('VideoIDs parameter is required');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Convert single video ID to array
|
|
41
|
+
const videoIdArray = Array.isArray(videoIds) ? videoIds : [videoIds];
|
|
42
|
+
|
|
43
|
+
// YouTube Data API provides basic statistics
|
|
44
|
+
// For advanced analytics, YouTube Analytics API would be needed
|
|
45
|
+
const videoDetails = await this.getVideoStatistics(videoIdArray, ContextUser);
|
|
46
|
+
|
|
47
|
+
// Process analytics for each video
|
|
48
|
+
const analyticsData = videoDetails.map((video: any) => {
|
|
49
|
+
const stats = video.statistics || {};
|
|
50
|
+
const snippet = video.snippet || {};
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
videoId: video.id,
|
|
54
|
+
title: snippet.title,
|
|
55
|
+
publishedAt: snippet.publishedAt,
|
|
56
|
+
metrics: {
|
|
57
|
+
views: parseInt(stats.viewCount || '0'),
|
|
58
|
+
likes: parseInt(stats.likeCount || '0'),
|
|
59
|
+
dislikes: parseInt(stats.dislikeCount || '0'),
|
|
60
|
+
comments: parseInt(stats.commentCount || '0'),
|
|
61
|
+
favorites: parseInt(stats.favoriteCount || '0'),
|
|
62
|
+
// Engagement rate calculation
|
|
63
|
+
engagementRate: this.calculateEngagementRate(stats),
|
|
64
|
+
// Like/dislike ratio
|
|
65
|
+
likeRatio: this.calculateLikeRatio(stats)
|
|
66
|
+
},
|
|
67
|
+
// Additional metadata
|
|
68
|
+
duration: video.contentDetails?.duration,
|
|
69
|
+
privacyStatus: video.status?.privacyStatus,
|
|
70
|
+
categoryId: snippet.categoryId,
|
|
71
|
+
tags: snippet.tags || [],
|
|
72
|
+
// Thumbnail for reference
|
|
73
|
+
thumbnail: snippet.thumbnails?.high?.url || snippet.thumbnails?.default?.url
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// Calculate aggregate metrics
|
|
78
|
+
const aggregateMetrics = this.calculateAggregateMetrics(analyticsData);
|
|
79
|
+
|
|
80
|
+
// If YouTube Analytics API was available, we could get:
|
|
81
|
+
// - Watch time
|
|
82
|
+
// - Average view duration
|
|
83
|
+
// - Impressions
|
|
84
|
+
// - Click-through rate
|
|
85
|
+
// - Revenue data
|
|
86
|
+
// - Geographic data
|
|
87
|
+
// - Traffic sources
|
|
88
|
+
// - Device types
|
|
89
|
+
// - Audience retention
|
|
90
|
+
|
|
91
|
+
// Create summary
|
|
92
|
+
const summary = {
|
|
93
|
+
totalVideos: analyticsData.length,
|
|
94
|
+
dateRange: {
|
|
95
|
+
start: startDate || 'N/A',
|
|
96
|
+
end: endDate || 'N/A'
|
|
97
|
+
},
|
|
98
|
+
aggregateMetrics: aggregateMetrics,
|
|
99
|
+
topPerformers: this.getTopPerformers(analyticsData),
|
|
100
|
+
quotaCost: this.getQuotaCost('videos.list') * Math.ceil(videoIdArray.length / 50)
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// Update output parameters
|
|
104
|
+
const outputParams = [...Params];
|
|
105
|
+
const analyticsParam = outputParams.find(p => p.Name === 'Analytics');
|
|
106
|
+
if (analyticsParam) analyticsParam.Value = analyticsData;
|
|
107
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
108
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
Success: true,
|
|
112
|
+
ResultCode: 'SUCCESS',
|
|
113
|
+
Message: `Retrieved analytics for ${analyticsData.length} videos`,
|
|
114
|
+
Params: outputParams
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
} catch (error) {
|
|
118
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
119
|
+
|
|
120
|
+
return {
|
|
121
|
+
Success: false,
|
|
122
|
+
ResultCode: this.getErrorCode(errorMessage),
|
|
123
|
+
Message: `Failed to get video analytics: ${errorMessage}`,
|
|
124
|
+
Params
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Get video statistics from YouTube Data API
|
|
131
|
+
*/
|
|
132
|
+
private async getVideoStatistics(videoIds: string[], contextUser?: any): Promise<any[]> {
|
|
133
|
+
const results: any[] = [];
|
|
134
|
+
|
|
135
|
+
// YouTube allows up to 50 video IDs per request
|
|
136
|
+
const chunks = this.chunkArray(videoIds, 50);
|
|
137
|
+
|
|
138
|
+
for (const chunk of chunks) {
|
|
139
|
+
const response = await this.makeYouTubeRequest<any>(
|
|
140
|
+
'/videos',
|
|
141
|
+
'GET',
|
|
142
|
+
undefined,
|
|
143
|
+
{
|
|
144
|
+
part: 'snippet,statistics,contentDetails,status',
|
|
145
|
+
id: chunk.join(',')
|
|
146
|
+
},
|
|
147
|
+
contextUser
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
if (response.items) {
|
|
151
|
+
results.push(...response.items);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return results;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Calculate engagement rate
|
|
160
|
+
*/
|
|
161
|
+
private calculateEngagementRate(stats: any): number {
|
|
162
|
+
const views = parseInt(stats.viewCount || '0');
|
|
163
|
+
if (views === 0) return 0;
|
|
164
|
+
|
|
165
|
+
const engagements = parseInt(stats.likeCount || '0') +
|
|
166
|
+
parseInt(stats.dislikeCount || '0') +
|
|
167
|
+
parseInt(stats.commentCount || '0');
|
|
168
|
+
|
|
169
|
+
return Math.round((engagements / views) * 10000) / 100; // Percentage with 2 decimals
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Calculate like ratio
|
|
174
|
+
*/
|
|
175
|
+
private calculateLikeRatio(stats: any): number {
|
|
176
|
+
const likes = parseInt(stats.likeCount || '0');
|
|
177
|
+
const dislikes = parseInt(stats.dislikeCount || '0');
|
|
178
|
+
const total = likes + dislikes;
|
|
179
|
+
|
|
180
|
+
if (total === 0) return 0;
|
|
181
|
+
return Math.round((likes / total) * 10000) / 100; // Percentage with 2 decimals
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Calculate aggregate metrics across all videos
|
|
186
|
+
*/
|
|
187
|
+
private calculateAggregateMetrics(analyticsData: any[]): any {
|
|
188
|
+
const totals = analyticsData.reduce((acc, video) => {
|
|
189
|
+
acc.views += video.metrics.views;
|
|
190
|
+
acc.likes += video.metrics.likes;
|
|
191
|
+
acc.dislikes += video.metrics.dislikes;
|
|
192
|
+
acc.comments += video.metrics.comments;
|
|
193
|
+
acc.favorites += video.metrics.favorites;
|
|
194
|
+
return acc;
|
|
195
|
+
}, { views: 0, likes: 0, dislikes: 0, comments: 0, favorites: 0 });
|
|
196
|
+
|
|
197
|
+
const avgEngagement = analyticsData.reduce((sum, v) => sum + v.metrics.engagementRate, 0) / analyticsData.length;
|
|
198
|
+
const avgLikeRatio = analyticsData.reduce((sum, v) => sum + v.metrics.likeRatio, 0) / analyticsData.length;
|
|
199
|
+
|
|
200
|
+
return {
|
|
201
|
+
total: totals,
|
|
202
|
+
average: {
|
|
203
|
+
views: Math.round(totals.views / analyticsData.length),
|
|
204
|
+
likes: Math.round(totals.likes / analyticsData.length),
|
|
205
|
+
dislikes: Math.round(totals.dislikes / analyticsData.length),
|
|
206
|
+
comments: Math.round(totals.comments / analyticsData.length),
|
|
207
|
+
engagementRate: Math.round(avgEngagement * 100) / 100,
|
|
208
|
+
likeRatio: Math.round(avgLikeRatio * 100) / 100
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Get top performing videos
|
|
215
|
+
*/
|
|
216
|
+
private getTopPerformers(analyticsData: any[]): any {
|
|
217
|
+
return {
|
|
218
|
+
byViews: [...analyticsData].sort((a, b) => b.metrics.views - a.metrics.views).slice(0, 5),
|
|
219
|
+
byEngagement: [...analyticsData].sort((a, b) => b.metrics.engagementRate - a.metrics.engagementRate).slice(0, 5),
|
|
220
|
+
byLikes: [...analyticsData].sort((a, b) => b.metrics.likes - a.metrics.likes).slice(0, 5)
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Chunk array into smaller arrays
|
|
226
|
+
*/
|
|
227
|
+
private chunkArray<T>(array: T[], size: number): T[][] {
|
|
228
|
+
const chunks: T[][] = [];
|
|
229
|
+
for (let i = 0; i < array.length; i += size) {
|
|
230
|
+
chunks.push(array.slice(i, i + size));
|
|
231
|
+
}
|
|
232
|
+
return chunks;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Get error code from error message
|
|
237
|
+
*/
|
|
238
|
+
private getErrorCode(message: string): string {
|
|
239
|
+
if (message.includes('quota')) return 'QUOTA_EXCEEDED';
|
|
240
|
+
if (message.includes('401') || message.includes('unauthorized')) return 'INVALID_TOKEN';
|
|
241
|
+
if (message.includes('403') || message.includes('forbidden')) return 'INSUFFICIENT_PERMISSIONS';
|
|
242
|
+
if (message.includes('404')) return 'NOT_FOUND';
|
|
243
|
+
if (message.includes('rate limit')) return 'RATE_LIMIT';
|
|
244
|
+
return 'ERROR';
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Define the parameters this action expects
|
|
249
|
+
*/
|
|
250
|
+
public get Params(): ActionParam[] {
|
|
251
|
+
const baseParams = this.commonSocialParams;
|
|
252
|
+
const specificParams: ActionParam[] = [
|
|
253
|
+
{
|
|
254
|
+
Name: 'VideoIDs',
|
|
255
|
+
Type: 'Input',
|
|
256
|
+
Value: null
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
Name: 'Metrics',
|
|
260
|
+
Type: 'Input',
|
|
261
|
+
Value: ['views', 'likes', 'comments', 'shares']
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
Name: 'StartDate',
|
|
265
|
+
Type: 'Input',
|
|
266
|
+
Value: null
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
Name: 'EndDate',
|
|
270
|
+
Type: 'Input',
|
|
271
|
+
Value: null
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
Name: 'Dimensions',
|
|
275
|
+
Type: 'Input',
|
|
276
|
+
Value: null
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
Name: 'Analytics',
|
|
280
|
+
Type: 'Output',
|
|
281
|
+
Value: null
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
Name: 'Summary',
|
|
285
|
+
Type: 'Output',
|
|
286
|
+
Value: null
|
|
287
|
+
}
|
|
288
|
+
];
|
|
289
|
+
return [...baseParams, ...specificParams];
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Metadata about this action
|
|
294
|
+
*/
|
|
295
|
+
public get Description(): string {
|
|
296
|
+
return 'Gets analytics data for YouTube videos including views, engagement, and performance metrics';
|
|
297
|
+
}
|
|
298
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './upload-video.action';
|
|
2
|
+
export * from './get-channel-videos.action';
|
|
3
|
+
export * from './get-video-analytics.action';
|
|
4
|
+
export * from './update-video-metadata.action';
|
|
5
|
+
export * from './create-playlist.action';
|
|
6
|
+
export * from './schedule-video.action';
|
|
7
|
+
export * from './get-comments.action';
|
|
8
|
+
export * from './get-channel-analytics.action';
|
|
9
|
+
export * from './search-videos.action';
|
|
@@ -0,0 +1,246 @@
|
|
|
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 schedule a YouTube video for publishing
|
|
7
|
+
*/
|
|
8
|
+
@RegisterClass(YouTubeBaseAction, 'YouTubeScheduleVideoAction')
|
|
9
|
+
export class YouTubeScheduleVideoAction extends YouTubeBaseAction {
|
|
10
|
+
/**
|
|
11
|
+
* Schedule a video for publishing on YouTube
|
|
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 publishAt = this.getParamValue(Params, 'PublishAt');
|
|
31
|
+
const notifySubscribers = this.getParamValue(Params, 'NotifySubscribers') ?? true;
|
|
32
|
+
const premiereTiming = this.getParamValue(Params, 'PremiereTiming');
|
|
33
|
+
const enableChat = this.getParamValue(Params, 'EnableChat') ?? false;
|
|
34
|
+
|
|
35
|
+
// Validate required parameters
|
|
36
|
+
if (!videoId) {
|
|
37
|
+
throw new Error('VideoID is required');
|
|
38
|
+
}
|
|
39
|
+
if (!publishAt) {
|
|
40
|
+
throw new Error('PublishAt date/time is required');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Validate publish date is in the future
|
|
44
|
+
const publishDate = new Date(publishAt);
|
|
45
|
+
if (publishDate <= new Date()) {
|
|
46
|
+
throw new Error('PublishAt must be a future date/time');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Get current video details
|
|
50
|
+
const currentVideo = await this.makeYouTubeRequest<any>(
|
|
51
|
+
'/videos',
|
|
52
|
+
'GET',
|
|
53
|
+
undefined,
|
|
54
|
+
{
|
|
55
|
+
part: 'snippet,status',
|
|
56
|
+
id: videoId
|
|
57
|
+
},
|
|
58
|
+
ContextUser
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
if (!currentVideo.items || currentVideo.items.length === 0) {
|
|
62
|
+
throw new Error(`Video not found: ${videoId}`);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const video = currentVideo.items[0];
|
|
66
|
+
|
|
67
|
+
// Verify video is currently private
|
|
68
|
+
if (video.status.privacyStatus !== 'private') {
|
|
69
|
+
throw new Error(`Video must be private to schedule. Current status: ${video.status.privacyStatus}`);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Prepare update data
|
|
73
|
+
const updateData: any = {
|
|
74
|
+
id: videoId,
|
|
75
|
+
status: {
|
|
76
|
+
privacyStatus: 'private', // Keep private until publish time
|
|
77
|
+
publishAt: this.formatDate(publishDate),
|
|
78
|
+
selfDeclaredMadeForKids: video.status.selfDeclaredMadeForKids,
|
|
79
|
+
notifySubscribers: notifySubscribers
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Handle premiere settings
|
|
84
|
+
if (premiereTiming === 'premiere') {
|
|
85
|
+
// Set up as a premiere
|
|
86
|
+
updateData.status.privacyStatus = 'unlisted'; // Premieres start as unlisted
|
|
87
|
+
updateData.liveStreamingDetails = {
|
|
88
|
+
scheduledStartTime: this.formatDate(publishDate),
|
|
89
|
+
enableLowLatency: false,
|
|
90
|
+
enableAutoStart: true,
|
|
91
|
+
enableDvr: true
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
if (enableChat) {
|
|
95
|
+
updateData.liveStreamingDetails.enableClosedCaptions = false;
|
|
96
|
+
updateData.liveStreamingDetails.enableContentEncryption = false;
|
|
97
|
+
updateData.liveStreamingDetails.enableEmbed = true;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Update the video
|
|
102
|
+
const updateResponse = await this.makeYouTubeRequest<any>(
|
|
103
|
+
'/videos',
|
|
104
|
+
'PUT',
|
|
105
|
+
updateData,
|
|
106
|
+
{
|
|
107
|
+
part: 'status' + (premiereTiming === 'premiere' ? ',liveStreamingDetails' : '')
|
|
108
|
+
},
|
|
109
|
+
ContextUser
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
// Get updated video details
|
|
113
|
+
const updatedVideo = await this.makeYouTubeRequest<any>(
|
|
114
|
+
'/videos',
|
|
115
|
+
'GET',
|
|
116
|
+
undefined,
|
|
117
|
+
{
|
|
118
|
+
part: 'snippet,status,contentDetails' + (premiereTiming === 'premiere' ? ',liveStreamingDetails' : ''),
|
|
119
|
+
id: videoId
|
|
120
|
+
},
|
|
121
|
+
ContextUser
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
const finalVideo = updatedVideo.items[0];
|
|
125
|
+
|
|
126
|
+
// Calculate time until publish
|
|
127
|
+
const timeUntilPublish = publishDate.getTime() - Date.now();
|
|
128
|
+
const hoursUntilPublish = Math.floor(timeUntilPublish / (1000 * 60 * 60));
|
|
129
|
+
const minutesUntilPublish = Math.floor((timeUntilPublish % (1000 * 60 * 60)) / (1000 * 60));
|
|
130
|
+
|
|
131
|
+
// Prepare result
|
|
132
|
+
const result = {
|
|
133
|
+
videoId: finalVideo.id,
|
|
134
|
+
videoUrl: `https://www.youtube.com/watch?v=${finalVideo.id}`,
|
|
135
|
+
title: finalVideo.snippet.title,
|
|
136
|
+
scheduledFor: finalVideo.status.publishAt,
|
|
137
|
+
scheduledForLocal: new Date(finalVideo.status.publishAt).toLocaleString(),
|
|
138
|
+
timeUntilPublish: {
|
|
139
|
+
hours: hoursUntilPublish,
|
|
140
|
+
minutes: minutesUntilPublish,
|
|
141
|
+
formatted: `${hoursUntilPublish}h ${minutesUntilPublish}m`
|
|
142
|
+
},
|
|
143
|
+
privacyStatus: finalVideo.status.privacyStatus,
|
|
144
|
+
notifySubscribers: notifySubscribers,
|
|
145
|
+
isPremiere: premiereTiming === 'premiere',
|
|
146
|
+
premiereDetails: premiereTiming === 'premiere' ? {
|
|
147
|
+
scheduledStartTime: finalVideo.liveStreamingDetails?.scheduledStartTime,
|
|
148
|
+
chatEnabled: enableChat
|
|
149
|
+
} : null,
|
|
150
|
+
thumbnails: finalVideo.snippet.thumbnails,
|
|
151
|
+
duration: finalVideo.contentDetails.duration,
|
|
152
|
+
quotaCost: this.getQuotaCost('videos.update')
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
// Update output parameters
|
|
156
|
+
const outputParams = [...Params];
|
|
157
|
+
const scheduleDetailsParam = outputParams.find(p => p.Name === 'ScheduleDetails');
|
|
158
|
+
if (scheduleDetailsParam) scheduleDetailsParam.Value = result;
|
|
159
|
+
const scheduledTimeParam = outputParams.find(p => p.Name === 'ScheduledTime');
|
|
160
|
+
if (scheduledTimeParam) scheduledTimeParam.Value = result.scheduledFor;
|
|
161
|
+
|
|
162
|
+
return {
|
|
163
|
+
Success: true,
|
|
164
|
+
ResultCode: 'SUCCESS',
|
|
165
|
+
Message: `Video scheduled successfully for ${result.scheduledForLocal} (${result.timeUntilPublish.formatted} from now)`,
|
|
166
|
+
Params: outputParams
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
} catch (error) {
|
|
170
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
171
|
+
|
|
172
|
+
return {
|
|
173
|
+
Success: false,
|
|
174
|
+
ResultCode: this.getErrorCode(errorMessage),
|
|
175
|
+
Message: `Failed to schedule video: ${errorMessage}`,
|
|
176
|
+
Params
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Get error code from error message
|
|
183
|
+
*/
|
|
184
|
+
private getErrorCode(message: string): string {
|
|
185
|
+
if (message.includes('quota')) return 'QUOTA_EXCEEDED';
|
|
186
|
+
if (message.includes('401') || message.includes('unauthorized')) return 'INVALID_TOKEN';
|
|
187
|
+
if (message.includes('403') || message.includes('forbidden')) return 'INSUFFICIENT_PERMISSIONS';
|
|
188
|
+
if (message.includes('404')) return 'NOT_FOUND';
|
|
189
|
+
if (message.includes('rate limit')) return 'RATE_LIMIT';
|
|
190
|
+
if (message.includes('future')) return 'INVALID_DATE';
|
|
191
|
+
if (message.includes('private')) return 'INVALID_STATUS';
|
|
192
|
+
return 'ERROR';
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Define the parameters this action expects
|
|
197
|
+
*/
|
|
198
|
+
public get Params(): ActionParam[] {
|
|
199
|
+
const baseParams = this.commonSocialParams;
|
|
200
|
+
const specificParams: ActionParam[] = [
|
|
201
|
+
{
|
|
202
|
+
Name: 'VideoID',
|
|
203
|
+
Type: 'Input',
|
|
204
|
+
Value: null
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
Name: 'PublishAt',
|
|
208
|
+
Type: 'Input',
|
|
209
|
+
Value: null
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
Name: 'NotifySubscribers',
|
|
213
|
+
Type: 'Input',
|
|
214
|
+
Value: true
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
Name: 'PremiereTiming',
|
|
218
|
+
Type: 'Input',
|
|
219
|
+
Value: 'standard'
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
Name: 'EnableChat',
|
|
223
|
+
Type: 'Input',
|
|
224
|
+
Value: false
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
Name: 'ScheduleDetails',
|
|
228
|
+
Type: 'Output',
|
|
229
|
+
Value: null
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
Name: 'ScheduledTime',
|
|
233
|
+
Type: 'Output',
|
|
234
|
+
Value: null
|
|
235
|
+
}
|
|
236
|
+
];
|
|
237
|
+
return [...baseParams, ...specificParams];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Metadata about this action
|
|
242
|
+
*/
|
|
243
|
+
public get Description(): string {
|
|
244
|
+
return 'Schedules a private YouTube video to be published at a specific date/time with optional premiere settings';
|
|
245
|
+
}
|
|
246
|
+
}
|