@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,717 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { TikTokBaseAction, TikTokVideo } from '../tiktok-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { SocialPost, SearchParams } from '../../../base/base-social.action';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Action to search for videos on TikTok
|
|
8
|
+
* Note: TikTok API only allows searching within authenticated user's own videos
|
|
9
|
+
*/
|
|
10
|
+
@RegisterClass(TikTokBaseAction, 'SearchVideosAction')
|
|
11
|
+
export class SearchVideosAction extends TikTokBaseAction {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Search for videos on TikTok
|
|
15
|
+
*/
|
|
16
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
17
|
+
const { Params } = params;
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
// Initialize OAuth
|
|
21
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
22
|
+
if (!companyIntegrationId) {
|
|
23
|
+
throw new Error('CompanyIntegrationID is required');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
await this.initializeOAuth(companyIntegrationId);
|
|
27
|
+
|
|
28
|
+
// Extract search parameters
|
|
29
|
+
const query = this.getParamValue(Params, 'Query');
|
|
30
|
+
const hashtags = this.getParamValue(Params, 'Hashtags') || [];
|
|
31
|
+
const startDate = this.getParamValue(Params, 'StartDate');
|
|
32
|
+
const endDate = this.getParamValue(Params, 'EndDate');
|
|
33
|
+
const minViews = this.getParamValue(Params, 'MinViews');
|
|
34
|
+
const minEngagement = this.getParamValue(Params, 'MinEngagement');
|
|
35
|
+
const sortBy = this.getParamValue(Params, 'SortBy') || 'date';
|
|
36
|
+
const sortOrder = this.getParamValue(Params, 'SortOrder') || 'desc';
|
|
37
|
+
const limit = this.getParamValue(Params, 'Limit') || 50;
|
|
38
|
+
const offset = this.getParamValue(Params, 'Offset') || 0;
|
|
39
|
+
|
|
40
|
+
// Build search params
|
|
41
|
+
const searchParams: SearchParams = {
|
|
42
|
+
query,
|
|
43
|
+
hashtags,
|
|
44
|
+
startDate: startDate ? new Date(startDate) : undefined,
|
|
45
|
+
endDate: endDate ? new Date(endDate) : undefined,
|
|
46
|
+
limit,
|
|
47
|
+
offset
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Note about TikTok limitations
|
|
51
|
+
const apiLimitation = {
|
|
52
|
+
notice: 'TikTok API only allows searching within your own videos',
|
|
53
|
+
recommendation: 'For broader search capabilities, use TikTok\'s web interface or mobile app',
|
|
54
|
+
alternativeApproach: 'This search filters your own video library based on the provided criteria'
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// Get all user videos to search through
|
|
58
|
+
const allVideos = await this.getUserVideos();
|
|
59
|
+
|
|
60
|
+
// Apply search filters
|
|
61
|
+
let filteredVideos = this.filterVideos(allVideos, {
|
|
62
|
+
query,
|
|
63
|
+
hashtags,
|
|
64
|
+
startDate,
|
|
65
|
+
endDate,
|
|
66
|
+
minViews,
|
|
67
|
+
minEngagement
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// Sort results
|
|
71
|
+
filteredVideos = this.sortVideos(filteredVideos, sortBy, sortOrder);
|
|
72
|
+
|
|
73
|
+
// Apply pagination
|
|
74
|
+
const paginatedVideos = filteredVideos.slice(offset, offset + limit);
|
|
75
|
+
|
|
76
|
+
// Convert to social posts
|
|
77
|
+
const socialPosts: SocialPost[] = paginatedVideos.map(video => this.normalizePost(video));
|
|
78
|
+
|
|
79
|
+
// Analyze search results
|
|
80
|
+
const searchAnalytics = this.analyzeSearchResults(filteredVideos, paginatedVideos);
|
|
81
|
+
|
|
82
|
+
// Create time-based insights for historical analysis
|
|
83
|
+
const historicalInsights = this.generateHistoricalInsights(filteredVideos, startDate, endDate);
|
|
84
|
+
|
|
85
|
+
// Generate content insights
|
|
86
|
+
const contentInsights = this.generateContentInsights(filteredVideos, query, hashtags);
|
|
87
|
+
|
|
88
|
+
// Create summary
|
|
89
|
+
const summary = {
|
|
90
|
+
totalResults: filteredVideos.length,
|
|
91
|
+
returnedResults: paginatedVideos.length,
|
|
92
|
+
searchCriteria: {
|
|
93
|
+
query,
|
|
94
|
+
hashtags,
|
|
95
|
+
dateRange: startDate && endDate ? {
|
|
96
|
+
start: startDate,
|
|
97
|
+
end: endDate,
|
|
98
|
+
daysSpanned: Math.ceil((new Date(endDate).getTime() - new Date(startDate).getTime()) / (1000 * 60 * 60 * 24))
|
|
99
|
+
} : null,
|
|
100
|
+
filters: {
|
|
101
|
+
minViews,
|
|
102
|
+
minEngagement
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
analytics: searchAnalytics,
|
|
106
|
+
historicalInsights,
|
|
107
|
+
contentInsights,
|
|
108
|
+
apiLimitation,
|
|
109
|
+
pagination: {
|
|
110
|
+
offset,
|
|
111
|
+
limit,
|
|
112
|
+
hasMore: offset + limit < filteredVideos.length,
|
|
113
|
+
totalPages: Math.ceil(filteredVideos.length / limit)
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// Update output parameters
|
|
118
|
+
const outputParams = [...Params];
|
|
119
|
+
const videosParam = outputParams.find(p => p.Name === 'Videos');
|
|
120
|
+
if (videosParam) videosParam.Value = socialPosts;
|
|
121
|
+
const summaryParam = outputParams.find(p => p.Name === 'Summary');
|
|
122
|
+
if (summaryParam) summaryParam.Value = summary;
|
|
123
|
+
const rawDataParam = outputParams.find(p => p.Name === 'RawData');
|
|
124
|
+
if (rawDataParam) rawDataParam.Value = paginatedVideos;
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
Success: true,
|
|
128
|
+
ResultCode: 'SUCCESS',
|
|
129
|
+
Message: `Found ${filteredVideos.length} videos matching search criteria (showing ${paginatedVideos.length})`,
|
|
130
|
+
Params: outputParams
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
} catch (error) {
|
|
134
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
Success: false,
|
|
138
|
+
ResultCode: this.isAuthError(error) ? 'INVALID_TOKEN' : 'ERROR',
|
|
139
|
+
Message: `Failed to search TikTok videos: ${errorMessage}`,
|
|
140
|
+
Params
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Filter videos based on search criteria
|
|
147
|
+
*/
|
|
148
|
+
private filterVideos(videos: TikTokVideo[], filters: any): TikTokVideo[] {
|
|
149
|
+
return videos.filter(video => {
|
|
150
|
+
// Query filter
|
|
151
|
+
if (filters.query) {
|
|
152
|
+
const query = filters.query.toLowerCase();
|
|
153
|
+
const matchesQuery = video.title.toLowerCase().includes(query) ||
|
|
154
|
+
video.description.toLowerCase().includes(query);
|
|
155
|
+
if (!matchesQuery) return false;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Hashtag filter
|
|
159
|
+
if (filters.hashtags && filters.hashtags.length > 0) {
|
|
160
|
+
const videoHashtags = this.extractHashtags(video.description);
|
|
161
|
+
const hasMatchingHashtag = filters.hashtags.some((tag: string) => {
|
|
162
|
+
const cleanTag = tag.replace('#', '').toLowerCase();
|
|
163
|
+
return videoHashtags.includes(cleanTag);
|
|
164
|
+
});
|
|
165
|
+
if (!hasMatchingHashtag) return false;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Date range filter
|
|
169
|
+
if (filters.startDate) {
|
|
170
|
+
const startTime = new Date(filters.startDate).getTime() / 1000;
|
|
171
|
+
if (video.create_time < startTime) return false;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (filters.endDate) {
|
|
175
|
+
const endTime = new Date(filters.endDate).getTime() / 1000;
|
|
176
|
+
if (video.create_time > endTime) return false;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// View count filter
|
|
180
|
+
if (filters.minViews && video.view_count < filters.minViews) {
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Engagement filter
|
|
185
|
+
if (filters.minEngagement) {
|
|
186
|
+
const engagement = video.like_count + video.comment_count + video.share_count;
|
|
187
|
+
if (engagement < filters.minEngagement) return false;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return true;
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Sort videos based on criteria
|
|
196
|
+
*/
|
|
197
|
+
private sortVideos(videos: TikTokVideo[], sortBy: string, order: string): TikTokVideo[] {
|
|
198
|
+
const sorted = [...videos];
|
|
199
|
+
|
|
200
|
+
sorted.sort((a, b) => {
|
|
201
|
+
let aValue: number;
|
|
202
|
+
let bValue: number;
|
|
203
|
+
|
|
204
|
+
switch (sortBy) {
|
|
205
|
+
case 'views':
|
|
206
|
+
aValue = a.view_count;
|
|
207
|
+
bValue = b.view_count;
|
|
208
|
+
break;
|
|
209
|
+
case 'likes':
|
|
210
|
+
aValue = a.like_count;
|
|
211
|
+
bValue = b.like_count;
|
|
212
|
+
break;
|
|
213
|
+
case 'comments':
|
|
214
|
+
aValue = a.comment_count;
|
|
215
|
+
bValue = b.comment_count;
|
|
216
|
+
break;
|
|
217
|
+
case 'shares':
|
|
218
|
+
aValue = a.share_count;
|
|
219
|
+
bValue = b.share_count;
|
|
220
|
+
break;
|
|
221
|
+
case 'engagement':
|
|
222
|
+
aValue = a.like_count + a.comment_count + a.share_count;
|
|
223
|
+
bValue = b.like_count + b.comment_count + b.share_count;
|
|
224
|
+
break;
|
|
225
|
+
case 'date':
|
|
226
|
+
default:
|
|
227
|
+
aValue = a.create_time;
|
|
228
|
+
bValue = b.create_time;
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return order === 'desc' ? bValue - aValue : aValue - bValue;
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
return sorted;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Analyze search results
|
|
240
|
+
*/
|
|
241
|
+
private analyzeSearchResults(allResults: TikTokVideo[], displayedResults: TikTokVideo[]): any {
|
|
242
|
+
if (allResults.length === 0) {
|
|
243
|
+
return {
|
|
244
|
+
totalViews: 0,
|
|
245
|
+
totalEngagement: 0,
|
|
246
|
+
averageViews: 0,
|
|
247
|
+
averageEngagement: 0,
|
|
248
|
+
topPerformer: null
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const totalViews = allResults.reduce((sum, v) => sum + v.view_count, 0);
|
|
253
|
+
const totalEngagement = allResults.reduce((sum, v) =>
|
|
254
|
+
sum + v.like_count + v.comment_count + v.share_count, 0
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
return {
|
|
258
|
+
totalViews,
|
|
259
|
+
totalEngagement,
|
|
260
|
+
averageViews: Math.round(totalViews / allResults.length),
|
|
261
|
+
averageEngagement: Math.round(totalEngagement / allResults.length),
|
|
262
|
+
engagementRate: totalViews > 0 ? ((totalEngagement / totalViews) * 100).toFixed(2) + '%' : '0%',
|
|
263
|
+
topPerformer: allResults.reduce((best, current) =>
|
|
264
|
+
current.view_count > best.view_count ? current : best
|
|
265
|
+
),
|
|
266
|
+
performanceDistribution: this.calculatePerformanceDistribution(allResults)
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Generate historical insights
|
|
272
|
+
*/
|
|
273
|
+
private generateHistoricalInsights(videos: TikTokVideo[], startDate?: string, endDate?: string): any {
|
|
274
|
+
if (videos.length === 0) return null;
|
|
275
|
+
|
|
276
|
+
// Group videos by time period
|
|
277
|
+
const timeGroups = this.groupVideosByTimePeriod(videos);
|
|
278
|
+
|
|
279
|
+
// Calculate trends
|
|
280
|
+
const viewTrend = this.calculateTrend(timeGroups, 'views');
|
|
281
|
+
const engagementTrend = this.calculateTrend(timeGroups, 'engagement');
|
|
282
|
+
|
|
283
|
+
// Find best performing periods
|
|
284
|
+
const bestPeriods = Object.entries(timeGroups)
|
|
285
|
+
.map(([period, vids]) => ({
|
|
286
|
+
period,
|
|
287
|
+
totalViews: vids.reduce((sum, v) => sum + v.view_count, 0),
|
|
288
|
+
videoCount: vids.length
|
|
289
|
+
}))
|
|
290
|
+
.sort((a, b) => b.totalViews - a.totalViews)
|
|
291
|
+
.slice(0, 3);
|
|
292
|
+
|
|
293
|
+
return {
|
|
294
|
+
timeRange: {
|
|
295
|
+
start: startDate || new Date(Math.min(...videos.map(v => v.create_time)) * 1000),
|
|
296
|
+
end: endDate || new Date(Math.max(...videos.map(v => v.create_time)) * 1000)
|
|
297
|
+
},
|
|
298
|
+
totalVideosInPeriod: videos.length,
|
|
299
|
+
trends: {
|
|
300
|
+
views: viewTrend,
|
|
301
|
+
engagement: engagementTrend
|
|
302
|
+
},
|
|
303
|
+
bestPerformingPeriods: bestPeriods,
|
|
304
|
+
postingFrequency: this.calculatePostingFrequency(videos),
|
|
305
|
+
seasonalPatterns: this.identifySeasonalPatterns(timeGroups)
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Generate content insights
|
|
311
|
+
*/
|
|
312
|
+
private generateContentInsights(videos: TikTokVideo[], query?: string, hashtags?: string[]): any {
|
|
313
|
+
if (videos.length === 0) return null;
|
|
314
|
+
|
|
315
|
+
// Analyze content themes
|
|
316
|
+
const commonHashtags = this.findCommonHashtags(videos);
|
|
317
|
+
const contentLength = this.analyzeContentLength(videos);
|
|
318
|
+
|
|
319
|
+
return {
|
|
320
|
+
searchRelevance: {
|
|
321
|
+
query: query || 'all content',
|
|
322
|
+
matchingVideos: videos.length,
|
|
323
|
+
averageRelevanceScore: this.calculateRelevanceScore(videos, query, hashtags)
|
|
324
|
+
},
|
|
325
|
+
contentPatterns: {
|
|
326
|
+
commonHashtags: commonHashtags.slice(0, 10),
|
|
327
|
+
averageDescriptionLength: contentLength.average,
|
|
328
|
+
optimalLength: contentLength.optimal,
|
|
329
|
+
titlePatterns: this.analyzeTitlePatterns(videos)
|
|
330
|
+
},
|
|
331
|
+
performanceCorrelations: {
|
|
332
|
+
hashtagsToViews: this.correlateHashtagsToPerformance(videos),
|
|
333
|
+
lengthToEngagement: contentLength.correlation,
|
|
334
|
+
timeOfDayImpact: this.analyzeTimeOfDayImpact(videos)
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Group videos by time period
|
|
341
|
+
*/
|
|
342
|
+
private groupVideosByTimePeriod(videos: TikTokVideo[]): Record<string, TikTokVideo[]> {
|
|
343
|
+
const groups: Record<string, TikTokVideo[]> = {};
|
|
344
|
+
|
|
345
|
+
videos.forEach(video => {
|
|
346
|
+
const date = new Date(video.create_time * 1000);
|
|
347
|
+
const monthKey = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}`;
|
|
348
|
+
|
|
349
|
+
if (!groups[monthKey]) {
|
|
350
|
+
groups[monthKey] = [];
|
|
351
|
+
}
|
|
352
|
+
groups[monthKey].push(video);
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
return groups;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Calculate performance trend
|
|
360
|
+
*/
|
|
361
|
+
private calculateTrend(timeGroups: Record<string, TikTokVideo[]>, metric: string): string {
|
|
362
|
+
const periods = Object.keys(timeGroups).sort();
|
|
363
|
+
if (periods.length < 2) return 'insufficient_data';
|
|
364
|
+
|
|
365
|
+
const recentPeriod = periods[periods.length - 1];
|
|
366
|
+
const previousPeriod = periods[periods.length - 2];
|
|
367
|
+
|
|
368
|
+
let recentValue: number;
|
|
369
|
+
let previousValue: number;
|
|
370
|
+
|
|
371
|
+
if (metric === 'views') {
|
|
372
|
+
recentValue = timeGroups[recentPeriod].reduce((sum, v) => sum + v.view_count, 0);
|
|
373
|
+
previousValue = timeGroups[previousPeriod].reduce((sum, v) => sum + v.view_count, 0);
|
|
374
|
+
} else {
|
|
375
|
+
recentValue = timeGroups[recentPeriod].reduce((sum, v) =>
|
|
376
|
+
sum + v.like_count + v.comment_count + v.share_count, 0
|
|
377
|
+
);
|
|
378
|
+
previousValue = timeGroups[previousPeriod].reduce((sum, v) =>
|
|
379
|
+
sum + v.like_count + v.comment_count + v.share_count, 0
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
const changePercent = previousValue > 0
|
|
384
|
+
? ((recentValue - previousValue) / previousValue) * 100
|
|
385
|
+
: 100;
|
|
386
|
+
|
|
387
|
+
if (changePercent > 20) return 'increasing';
|
|
388
|
+
if (changePercent < -20) return 'decreasing';
|
|
389
|
+
return 'stable';
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Calculate posting frequency
|
|
394
|
+
*/
|
|
395
|
+
private calculatePostingFrequency(videos: TikTokVideo[]): any {
|
|
396
|
+
if (videos.length < 2) return { average: 0, pattern: 'insufficient_data' };
|
|
397
|
+
|
|
398
|
+
const timestamps = videos.map(v => v.create_time).sort();
|
|
399
|
+
const daysBetweenPosts: number[] = [];
|
|
400
|
+
|
|
401
|
+
for (let i = 1; i < timestamps.length; i++) {
|
|
402
|
+
const daysDiff = (timestamps[i] - timestamps[i-1]) / (60 * 60 * 24);
|
|
403
|
+
daysBetweenPosts.push(daysDiff);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
const avgDaysBetween = daysBetweenPosts.reduce((sum, days) => sum + days, 0) / daysBetweenPosts.length;
|
|
407
|
+
|
|
408
|
+
let pattern: string;
|
|
409
|
+
if (avgDaysBetween < 1) pattern = 'multiple_daily';
|
|
410
|
+
else if (avgDaysBetween <= 1.5) pattern = 'daily';
|
|
411
|
+
else if (avgDaysBetween <= 3.5) pattern = 'every_few_days';
|
|
412
|
+
else if (avgDaysBetween <= 7.5) pattern = 'weekly';
|
|
413
|
+
else pattern = 'irregular';
|
|
414
|
+
|
|
415
|
+
return {
|
|
416
|
+
averageDaysBetween: avgDaysBetween.toFixed(1),
|
|
417
|
+
pattern,
|
|
418
|
+
postsPerWeek: (7 / avgDaysBetween).toFixed(1)
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Find common hashtags
|
|
424
|
+
*/
|
|
425
|
+
private findCommonHashtags(videos: TikTokVideo[]): any[] {
|
|
426
|
+
const hashtagCount = new Map<string, number>();
|
|
427
|
+
|
|
428
|
+
videos.forEach(video => {
|
|
429
|
+
const hashtags = this.extractHashtags(video.description);
|
|
430
|
+
hashtags.forEach(tag => {
|
|
431
|
+
hashtagCount.set(tag, (hashtagCount.get(tag) || 0) + 1);
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
return Array.from(hashtagCount.entries())
|
|
436
|
+
.map(([tag, count]) => ({ hashtag: `#${tag}`, count, percentage: (count / videos.length * 100).toFixed(1) }))
|
|
437
|
+
.sort((a, b) => b.count - a.count);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Analyze content length
|
|
442
|
+
*/
|
|
443
|
+
private analyzeContentLength(videos: TikTokVideo[]): any {
|
|
444
|
+
const lengths = videos.map(v => (v.description || '').length);
|
|
445
|
+
const avgLength = lengths.reduce((sum, len) => sum + len, 0) / lengths.length;
|
|
446
|
+
|
|
447
|
+
// Find optimal length (videos with above-average performance)
|
|
448
|
+
const avgViews = videos.reduce((sum, v) => sum + v.view_count, 0) / videos.length;
|
|
449
|
+
const highPerformers = videos.filter(v => v.view_count > avgViews);
|
|
450
|
+
const optimalLength = highPerformers.length > 0
|
|
451
|
+
? highPerformers.reduce((sum, v) => sum + (v.description || '').length, 0) / highPerformers.length
|
|
452
|
+
: avgLength;
|
|
453
|
+
|
|
454
|
+
return {
|
|
455
|
+
average: Math.round(avgLength),
|
|
456
|
+
optimal: Math.round(optimalLength),
|
|
457
|
+
correlation: optimalLength > avgLength ? 'longer_performs_better' : 'shorter_performs_better'
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Calculate relevance score
|
|
463
|
+
*/
|
|
464
|
+
private calculateRelevanceScore(videos: TikTokVideo[], query?: string, hashtags?: string[]): number {
|
|
465
|
+
if (!query && (!hashtags || hashtags.length === 0)) return 100;
|
|
466
|
+
|
|
467
|
+
let totalScore = 0;
|
|
468
|
+
|
|
469
|
+
videos.forEach(video => {
|
|
470
|
+
let score = 0;
|
|
471
|
+
|
|
472
|
+
if (query) {
|
|
473
|
+
const queryLower = query.toLowerCase();
|
|
474
|
+
if (video.title.toLowerCase().includes(queryLower)) score += 50;
|
|
475
|
+
if (video.description.toLowerCase().includes(queryLower)) score += 30;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
if (hashtags && hashtags.length > 0) {
|
|
479
|
+
const videoHashtags = this.extractHashtags(video.description);
|
|
480
|
+
const matchingHashtags = hashtags.filter(tag =>
|
|
481
|
+
videoHashtags.includes(tag.replace('#', '').toLowerCase())
|
|
482
|
+
);
|
|
483
|
+
score += (matchingHashtags.length / hashtags.length) * 20;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
totalScore += score;
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
return videos.length > 0 ? Math.round(totalScore / videos.length) : 0;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Analyze title patterns
|
|
494
|
+
*/
|
|
495
|
+
private analyzeTitlePatterns(videos: TikTokVideo[]): any {
|
|
496
|
+
const patterns = {
|
|
497
|
+
questions: videos.filter(v => v.title.includes('?')).length,
|
|
498
|
+
exclamations: videos.filter(v => v.title.includes('!')).length,
|
|
499
|
+
emojis: videos.filter(v => /[\u{1F600}-\u{1F64F}]/u.test(v.title)).length,
|
|
500
|
+
numbers: videos.filter(v => /\d/.test(v.title)).length,
|
|
501
|
+
allCaps: videos.filter(v => v.title === v.title.toUpperCase() && v.title.length > 3).length
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
return {
|
|
505
|
+
...patterns,
|
|
506
|
+
mostCommonPattern: Object.entries(patterns)
|
|
507
|
+
.sort(([, a], [, b]) => b - a)[0][0]
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Correlate hashtags to performance
|
|
513
|
+
*/
|
|
514
|
+
private correlateHashtagsToPerformance(videos: TikTokVideo[]): any[] {
|
|
515
|
+
const hashtagPerformance = new Map<string, { views: number; count: number }>();
|
|
516
|
+
|
|
517
|
+
videos.forEach(video => {
|
|
518
|
+
const hashtags = this.extractHashtags(video.description);
|
|
519
|
+
hashtags.forEach(tag => {
|
|
520
|
+
const current = hashtagPerformance.get(tag) || { views: 0, count: 0 };
|
|
521
|
+
current.views += video.view_count;
|
|
522
|
+
current.count += 1;
|
|
523
|
+
hashtagPerformance.set(tag, current);
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
return Array.from(hashtagPerformance.entries())
|
|
528
|
+
.map(([tag, data]) => ({
|
|
529
|
+
hashtag: `#${tag}`,
|
|
530
|
+
averageViews: Math.round(data.views / data.count),
|
|
531
|
+
usageCount: data.count
|
|
532
|
+
}))
|
|
533
|
+
.sort((a, b) => b.averageViews - a.averageViews)
|
|
534
|
+
.slice(0, 5);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Analyze time of day impact
|
|
539
|
+
*/
|
|
540
|
+
private analyzeTimeOfDayImpact(videos: TikTokVideo[]): any {
|
|
541
|
+
const hourBuckets: Record<number, { views: number; count: number }> = {};
|
|
542
|
+
|
|
543
|
+
videos.forEach(video => {
|
|
544
|
+
const hour = new Date(video.create_time * 1000).getHours();
|
|
545
|
+
if (!hourBuckets[hour]) {
|
|
546
|
+
hourBuckets[hour] = { views: 0, count: 0 };
|
|
547
|
+
}
|
|
548
|
+
hourBuckets[hour].views += video.view_count;
|
|
549
|
+
hourBuckets[hour].count += 1;
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
const hourlyPerformance = Object.entries(hourBuckets)
|
|
553
|
+
.map(([hour, data]) => ({
|
|
554
|
+
hour: parseInt(hour),
|
|
555
|
+
averageViews: Math.round(data.views / data.count),
|
|
556
|
+
postCount: data.count
|
|
557
|
+
}))
|
|
558
|
+
.sort((a, b) => b.averageViews - a.averageViews);
|
|
559
|
+
|
|
560
|
+
return {
|
|
561
|
+
bestHours: hourlyPerformance.slice(0, 3).map(h => h.hour),
|
|
562
|
+
worstHours: hourlyPerformance.slice(-3).map(h => h.hour),
|
|
563
|
+
recommendation: this.generateTimeRecommendation(hourlyPerformance)
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Generate time posting recommendation
|
|
569
|
+
*/
|
|
570
|
+
private generateTimeRecommendation(hourlyPerformance: any[]): string {
|
|
571
|
+
if (hourlyPerformance.length === 0) return 'Insufficient data for recommendations';
|
|
572
|
+
|
|
573
|
+
const bestHour = hourlyPerformance[0].hour;
|
|
574
|
+
const timeOfDay = bestHour < 12 ? 'morning' : bestHour < 17 ? 'afternoon' : 'evening';
|
|
575
|
+
|
|
576
|
+
return `Best posting time appears to be ${bestHour}:00 (${timeOfDay}) based on historical performance`;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Calculate performance distribution
|
|
581
|
+
*/
|
|
582
|
+
private calculatePerformanceDistribution(videos: TikTokVideo[]): any {
|
|
583
|
+
const viewBuckets = {
|
|
584
|
+
'0-1k': 0,
|
|
585
|
+
'1k-10k': 0,
|
|
586
|
+
'10k-100k': 0,
|
|
587
|
+
'100k-1M': 0,
|
|
588
|
+
'1M+': 0
|
|
589
|
+
};
|
|
590
|
+
|
|
591
|
+
videos.forEach(video => {
|
|
592
|
+
const views = video.view_count;
|
|
593
|
+
if (views < 1000) viewBuckets['0-1k']++;
|
|
594
|
+
else if (views < 10000) viewBuckets['1k-10k']++;
|
|
595
|
+
else if (views < 100000) viewBuckets['10k-100k']++;
|
|
596
|
+
else if (views < 1000000) viewBuckets['100k-1M']++;
|
|
597
|
+
else viewBuckets['1M+']++;
|
|
598
|
+
});
|
|
599
|
+
|
|
600
|
+
return viewBuckets;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Identify seasonal patterns
|
|
605
|
+
*/
|
|
606
|
+
private identifySeasonalPatterns(timeGroups: Record<string, TikTokVideo[]>): string[] {
|
|
607
|
+
const patterns: string[] = [];
|
|
608
|
+
|
|
609
|
+
// Simple seasonal analysis
|
|
610
|
+
const monthlyAvgs: Record<number, number[]> = {};
|
|
611
|
+
|
|
612
|
+
Object.entries(timeGroups).forEach(([period, videos]) => {
|
|
613
|
+
const month = parseInt(period.split('-')[1]);
|
|
614
|
+
if (!monthlyAvgs[month]) monthlyAvgs[month] = [];
|
|
615
|
+
|
|
616
|
+
const avgViews = videos.reduce((sum, v) => sum + v.view_count, 0) / videos.length;
|
|
617
|
+
monthlyAvgs[month].push(avgViews);
|
|
618
|
+
});
|
|
619
|
+
|
|
620
|
+
// Find high-performing months
|
|
621
|
+
const monthPerformance = Object.entries(monthlyAvgs)
|
|
622
|
+
.map(([month, avgs]) => ({
|
|
623
|
+
month: parseInt(month),
|
|
624
|
+
avgPerformance: avgs.reduce((sum, avg) => sum + avg, 0) / avgs.length
|
|
625
|
+
}))
|
|
626
|
+
.sort((a, b) => b.avgPerformance - a.avgPerformance);
|
|
627
|
+
|
|
628
|
+
if (monthPerformance.length > 0) {
|
|
629
|
+
const bestMonth = monthPerformance[0].month;
|
|
630
|
+
const monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
631
|
+
patterns.push(`${monthNames[bestMonth - 1]} shows strongest performance historically`);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
return patterns;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Define the parameters this action expects
|
|
639
|
+
*/
|
|
640
|
+
public get Params(): ActionParam[] {
|
|
641
|
+
return [
|
|
642
|
+
...this.commonSocialParams,
|
|
643
|
+
{
|
|
644
|
+
Name: 'Query',
|
|
645
|
+
Type: 'Input',
|
|
646
|
+
Value: null
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
Name: 'Hashtags',
|
|
650
|
+
Type: 'Input',
|
|
651
|
+
Value: []
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
Name: 'StartDate',
|
|
655
|
+
Type: 'Input',
|
|
656
|
+
Value: null
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
Name: 'EndDate',
|
|
660
|
+
Type: 'Input',
|
|
661
|
+
Value: null
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
Name: 'MinViews',
|
|
665
|
+
Type: 'Input',
|
|
666
|
+
Value: null
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
Name: 'MinEngagement',
|
|
670
|
+
Type: 'Input',
|
|
671
|
+
Value: null
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
Name: 'SortBy',
|
|
675
|
+
Type: 'Input',
|
|
676
|
+
Value: 'date'
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
Name: 'SortOrder',
|
|
680
|
+
Type: 'Input',
|
|
681
|
+
Value: 'desc'
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
Name: 'Limit',
|
|
685
|
+
Type: 'Input',
|
|
686
|
+
Value: 50
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
Name: 'Offset',
|
|
690
|
+
Type: 'Input',
|
|
691
|
+
Value: 0
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
Name: 'Videos',
|
|
695
|
+
Type: 'Output',
|
|
696
|
+
Value: null
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
Name: 'Summary',
|
|
700
|
+
Type: 'Output',
|
|
701
|
+
Value: null
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
Name: 'RawData',
|
|
705
|
+
Type: 'Output',
|
|
706
|
+
Value: null
|
|
707
|
+
}
|
|
708
|
+
];
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* Metadata about this action
|
|
713
|
+
*/
|
|
714
|
+
public get Description(): string {
|
|
715
|
+
return 'Searches historical TikTok videos with advanced filtering, date ranges, and performance analytics (searches within your own videos only due to API limitations)';
|
|
716
|
+
}
|
|
717
|
+
}
|