@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,302 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { InstagramBaseAction } from '../instagram-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { LogError } from '@memberjunction/core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves detailed insights and analytics for a specific Instagram post.
|
|
8
|
+
* Available metrics vary by post type (feed, reels, stories).
|
|
9
|
+
*/
|
|
10
|
+
@RegisterClass(InstagramBaseAction, 'Instagram - Get Post Insights')
|
|
11
|
+
export class InstagramGetPostInsightsAction extends InstagramBaseAction {
|
|
12
|
+
|
|
13
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
14
|
+
try {
|
|
15
|
+
const companyIntegrationId = this.getParamValue(params.Params, 'CompanyIntegrationID');
|
|
16
|
+
const postId = this.getParamValue(params.Params, 'PostID');
|
|
17
|
+
const metricTypes = this.getParamValue(params.Params, 'MetricTypes') as string[];
|
|
18
|
+
const period = this.getParamValue(params.Params, 'Period') || 'lifetime';
|
|
19
|
+
|
|
20
|
+
// Initialize OAuth
|
|
21
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
22
|
+
return {
|
|
23
|
+
Success: false,
|
|
24
|
+
Message: 'Failed to initialize Instagram authentication',
|
|
25
|
+
ResultCode: 'AUTH_FAILED'
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Validate inputs
|
|
30
|
+
if (!postId) {
|
|
31
|
+
return {
|
|
32
|
+
Success: false,
|
|
33
|
+
Message: 'PostID is required',
|
|
34
|
+
ResultCode: 'MISSING_PARAMS'
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// First, get the post details to determine its type
|
|
39
|
+
const postDetails = await this.getPostDetails(postId);
|
|
40
|
+
if (!postDetails) {
|
|
41
|
+
return {
|
|
42
|
+
Success: false,
|
|
43
|
+
Message: 'Post not found or access denied',
|
|
44
|
+
ResultCode: 'POST_NOT_FOUND'
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Determine available metrics based on post type
|
|
49
|
+
const availableMetrics = this.getAvailableMetrics(postDetails.media_type);
|
|
50
|
+
const requestedMetrics = metricTypes && metricTypes.length > 0
|
|
51
|
+
? metricTypes.filter(m => availableMetrics.includes(m))
|
|
52
|
+
: availableMetrics;
|
|
53
|
+
|
|
54
|
+
if (requestedMetrics.length === 0) {
|
|
55
|
+
return {
|
|
56
|
+
Success: false,
|
|
57
|
+
Message: 'No valid metrics specified for this post type',
|
|
58
|
+
ResultCode: 'INVALID_METRICS'
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Get insights
|
|
63
|
+
const insights = await this.getInsights(postId, requestedMetrics, period as any);
|
|
64
|
+
|
|
65
|
+
// Parse and structure the insights data
|
|
66
|
+
const parsedInsights = this.parseInsightsData(insights);
|
|
67
|
+
|
|
68
|
+
// Calculate engagement rate
|
|
69
|
+
const engagementRate = this.calculateEngagementRate(parsedInsights, postDetails);
|
|
70
|
+
|
|
71
|
+
// Store result in output params
|
|
72
|
+
const outputParams = [...params.Params];
|
|
73
|
+
outputParams.push({
|
|
74
|
+
Name: 'ResultData',
|
|
75
|
+
Type: 'Output',
|
|
76
|
+
Value: JSON.stringify({
|
|
77
|
+
postId,
|
|
78
|
+
postType: postDetails.media_type,
|
|
79
|
+
permalink: postDetails.permalink,
|
|
80
|
+
publishedAt: postDetails.timestamp,
|
|
81
|
+
metrics: parsedInsights,
|
|
82
|
+
summary: {
|
|
83
|
+
engagementRate,
|
|
84
|
+
totalEngagements: this.calculateTotalEngagements(parsedInsights),
|
|
85
|
+
performanceScore: this.calculatePerformanceScore(parsedInsights)
|
|
86
|
+
},
|
|
87
|
+
period,
|
|
88
|
+
dataCollectedAt: new Date().toISOString()
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
Success: true,
|
|
94
|
+
Message: 'Successfully retrieved post insights',
|
|
95
|
+
ResultCode: 'SUCCESS',
|
|
96
|
+
Params: outputParams
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
} catch (error: any) {
|
|
100
|
+
LogError('Failed to retrieve Instagram post insights', error);
|
|
101
|
+
|
|
102
|
+
if (error.code === 'RATE_LIMIT') {
|
|
103
|
+
return {
|
|
104
|
+
Success: false,
|
|
105
|
+
Message: 'Instagram API rate limit exceeded. Please try again later.',
|
|
106
|
+
ResultCode: 'RATE_LIMIT'
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (error.code === 'POST_NOT_FOUND') {
|
|
111
|
+
return {
|
|
112
|
+
Success: false,
|
|
113
|
+
Message: 'Instagram post not found or access denied',
|
|
114
|
+
ResultCode: 'POST_NOT_FOUND'
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
Success: false,
|
|
120
|
+
Message: `Failed to retrieve post insights: ${error.message}`,
|
|
121
|
+
ResultCode: 'ERROR'
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Get post details including media type
|
|
128
|
+
*/
|
|
129
|
+
private async getPostDetails(postId: string): Promise<any> {
|
|
130
|
+
try {
|
|
131
|
+
const response = await this.makeInstagramRequest(
|
|
132
|
+
postId,
|
|
133
|
+
'GET',
|
|
134
|
+
null,
|
|
135
|
+
{
|
|
136
|
+
fields: 'id,media_type,permalink,timestamp,caption,like_count,comments_count',
|
|
137
|
+
access_token: this.getAccessToken()
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
return response;
|
|
141
|
+
} catch (error) {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Get available metrics based on post type
|
|
148
|
+
*/
|
|
149
|
+
private getAvailableMetrics(mediaType: string): string[] {
|
|
150
|
+
const baseMetrics = ['impressions', 'reach', 'engagement'];
|
|
151
|
+
|
|
152
|
+
switch (mediaType) {
|
|
153
|
+
case 'IMAGE':
|
|
154
|
+
case 'CAROUSEL_ALBUM':
|
|
155
|
+
return [...baseMetrics, 'saved', 'shares'];
|
|
156
|
+
|
|
157
|
+
case 'VIDEO':
|
|
158
|
+
case 'REELS':
|
|
159
|
+
return [...baseMetrics, 'saved', 'shares', 'video_views', 'avg_watch_time', 'completion_rate'];
|
|
160
|
+
|
|
161
|
+
case 'STORY':
|
|
162
|
+
return ['impressions', 'reach', 'exits', 'replies', 'taps_forward', 'taps_back'];
|
|
163
|
+
|
|
164
|
+
default:
|
|
165
|
+
return baseMetrics;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Parse insights data into a structured format
|
|
171
|
+
*/
|
|
172
|
+
private parseInsightsData(insights: any[]): Record<string, any> {
|
|
173
|
+
const parsed: Record<string, any> = {};
|
|
174
|
+
|
|
175
|
+
insights.forEach(metric => {
|
|
176
|
+
const name = metric.name;
|
|
177
|
+
const values = metric.values || [];
|
|
178
|
+
|
|
179
|
+
if (values.length > 0) {
|
|
180
|
+
// For lifetime metrics, there's usually only one value
|
|
181
|
+
const primaryValue = values[0];
|
|
182
|
+
|
|
183
|
+
parsed[name] = {
|
|
184
|
+
value: primaryValue.value || 0,
|
|
185
|
+
title: metric.title,
|
|
186
|
+
description: metric.description,
|
|
187
|
+
period: metric.period
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
// For time series data (like daily metrics)
|
|
191
|
+
if (values.length > 1) {
|
|
192
|
+
parsed[name].timeSeries = values.map((v: any) => ({
|
|
193
|
+
value: v.value,
|
|
194
|
+
endTime: v.end_time
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
return parsed;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Calculate engagement rate
|
|
205
|
+
*/
|
|
206
|
+
private calculateEngagementRate(insights: Record<string, any>, postDetails: any): number {
|
|
207
|
+
const reach = insights.reach?.value || postDetails.reach || 0;
|
|
208
|
+
const engagement = insights.engagement?.value || 0;
|
|
209
|
+
|
|
210
|
+
if (reach === 0) return 0;
|
|
211
|
+
|
|
212
|
+
return Number(((engagement / reach) * 100).toFixed(2));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Calculate total engagements
|
|
217
|
+
*/
|
|
218
|
+
private calculateTotalEngagements(insights: Record<string, any>): number {
|
|
219
|
+
const engagement = insights.engagement?.value || 0;
|
|
220
|
+
const saves = insights.saved?.value || 0;
|
|
221
|
+
const shares = insights.shares?.value || 0;
|
|
222
|
+
|
|
223
|
+
return engagement + saves + shares;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Calculate a performance score (0-100)
|
|
228
|
+
*/
|
|
229
|
+
private calculatePerformanceScore(insights: Record<string, any>): number {
|
|
230
|
+
// Simple scoring algorithm based on key metrics
|
|
231
|
+
let score = 0;
|
|
232
|
+
let factors = 0;
|
|
233
|
+
|
|
234
|
+
// Engagement rate factor
|
|
235
|
+
const reach = insights.reach?.value || 0;
|
|
236
|
+
const engagement = insights.engagement?.value || 0;
|
|
237
|
+
if (reach > 0) {
|
|
238
|
+
const engagementRate = (engagement / reach) * 100;
|
|
239
|
+
score += Math.min(engagementRate * 10, 30); // Max 30 points
|
|
240
|
+
factors++;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Reach factor (compared to impressions)
|
|
244
|
+
const impressions = insights.impressions?.value || 0;
|
|
245
|
+
if (impressions > 0) {
|
|
246
|
+
const reachRate = (reach / impressions) * 100;
|
|
247
|
+
score += Math.min(reachRate, 20); // Max 20 points
|
|
248
|
+
factors++;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// Saves factor
|
|
252
|
+
const saves = insights.saved?.value || 0;
|
|
253
|
+
if (reach > 0) {
|
|
254
|
+
const saveRate = (saves / reach) * 100;
|
|
255
|
+
score += Math.min(saveRate * 20, 25); // Max 25 points
|
|
256
|
+
factors++;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Video completion rate (for videos)
|
|
260
|
+
const completionRate = insights.completion_rate?.value || 0;
|
|
261
|
+
if (completionRate > 0) {
|
|
262
|
+
score += Math.min(completionRate, 25); // Max 25 points
|
|
263
|
+
factors++;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Normalize score
|
|
267
|
+
if (factors === 0) return 0;
|
|
268
|
+
|
|
269
|
+
return Math.round(Math.min(score, 100));
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Define the parameters for this action
|
|
274
|
+
*/
|
|
275
|
+
public get Params(): ActionParam[] {
|
|
276
|
+
return [
|
|
277
|
+
...this.commonSocialParams,
|
|
278
|
+
{
|
|
279
|
+
Name: 'PostID',
|
|
280
|
+
Type: 'Input',
|
|
281
|
+
Value: null
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
Name: 'MetricTypes',
|
|
285
|
+
Type: 'Input',
|
|
286
|
+
Value: null
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
Name: 'Period',
|
|
290
|
+
Type: 'Input',
|
|
291
|
+
Value: 'lifetime'
|
|
292
|
+
}
|
|
293
|
+
];
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Get the description for this action
|
|
298
|
+
*/
|
|
299
|
+
public get Description(): string {
|
|
300
|
+
return 'Retrieves detailed analytics and insights for a specific Instagram post including impressions, reach, engagement, and more.';
|
|
301
|
+
}
|
|
302
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Instagram Actions
|
|
2
|
+
export * from './create-post.action';
|
|
3
|
+
export * from './get-business-posts.action';
|
|
4
|
+
export * from './get-post-insights.action';
|
|
5
|
+
export * from './get-account-insights.action';
|
|
6
|
+
export * from './schedule-post.action';
|
|
7
|
+
export * from './get-comments.action';
|
|
8
|
+
export * from './create-story.action';
|
|
9
|
+
export * from './search-posts.action';
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { InstagramBaseAction } from '../instagram-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { LogError } from '@memberjunction/core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Schedules an Instagram post for future publication.
|
|
8
|
+
* Note: Instagram API has limited native scheduling support. This action provides
|
|
9
|
+
* scheduling information that needs to be integrated with Facebook Creator Studio
|
|
10
|
+
* or third-party scheduling tools.
|
|
11
|
+
*/
|
|
12
|
+
@RegisterClass(InstagramBaseAction, 'Instagram - Schedule Post')
|
|
13
|
+
export class InstagramSchedulePostAction extends InstagramBaseAction {
|
|
14
|
+
|
|
15
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
16
|
+
try {
|
|
17
|
+
const companyIntegrationId = this.getParamValue(params.Params, 'CompanyIntegrationID');
|
|
18
|
+
const content = this.getParamValue(params.Params, 'Content');
|
|
19
|
+
const mediaUrls = this.getParamValue(params.Params, 'MediaUrls') as string[];
|
|
20
|
+
const scheduledTime = this.getParamValue(params.Params, 'ScheduledTime');
|
|
21
|
+
const postType = this.getParamValue(params.Params, 'PostType') || 'FEED';
|
|
22
|
+
const locationId = this.getParamValue(params.Params, 'LocationID');
|
|
23
|
+
const taggedUsers = this.getParamValue(params.Params, 'TaggedUsers') as string[];
|
|
24
|
+
const firstComment = this.getParamValue(params.Params, 'FirstComment');
|
|
25
|
+
|
|
26
|
+
// Initialize OAuth
|
|
27
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
28
|
+
return {
|
|
29
|
+
Success: false,
|
|
30
|
+
Message: 'Failed to initialize Instagram authentication',
|
|
31
|
+
ResultCode: 'AUTH_FAILED'
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Validate inputs
|
|
36
|
+
if (!scheduledTime) {
|
|
37
|
+
return {
|
|
38
|
+
Success: false,
|
|
39
|
+
Message: 'ScheduledTime is required',
|
|
40
|
+
ResultCode: 'MISSING_PARAMS'
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (!mediaUrls || mediaUrls.length === 0) {
|
|
45
|
+
return {
|
|
46
|
+
Success: false,
|
|
47
|
+
Message: 'At least one media URL is required',
|
|
48
|
+
ResultCode: 'MISSING_MEDIA'
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Validate scheduled time
|
|
53
|
+
const scheduleDate = new Date(scheduledTime);
|
|
54
|
+
const now = new Date();
|
|
55
|
+
|
|
56
|
+
if (scheduleDate <= now) {
|
|
57
|
+
return {
|
|
58
|
+
Success: false,
|
|
59
|
+
Message: 'Scheduled time must be in the future',
|
|
60
|
+
ResultCode: 'INVALID_SCHEDULE_TIME'
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Instagram requires scheduling at least 10 minutes in the future
|
|
65
|
+
const minScheduleTime = new Date(now.getTime() + 10 * 60 * 1000);
|
|
66
|
+
if (scheduleDate < minScheduleTime) {
|
|
67
|
+
return {
|
|
68
|
+
Success: false,
|
|
69
|
+
Message: 'Posts must be scheduled at least 10 minutes in the future',
|
|
70
|
+
ResultCode: 'SCHEDULE_TOO_SOON'
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Instagram limits scheduling to 75 days in the future
|
|
75
|
+
const maxScheduleTime = new Date(now.getTime() + 75 * 24 * 60 * 60 * 1000);
|
|
76
|
+
if (scheduleDate > maxScheduleTime) {
|
|
77
|
+
return {
|
|
78
|
+
Success: false,
|
|
79
|
+
Message: 'Posts cannot be scheduled more than 75 days in the future',
|
|
80
|
+
ResultCode: 'SCHEDULE_TOO_FAR'
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Create scheduling payload
|
|
85
|
+
const schedulingData = {
|
|
86
|
+
content,
|
|
87
|
+
mediaUrls,
|
|
88
|
+
scheduledTime: scheduleDate.toISOString(),
|
|
89
|
+
postType,
|
|
90
|
+
locationId,
|
|
91
|
+
taggedUsers,
|
|
92
|
+
firstComment,
|
|
93
|
+
accountId: this.instagramBusinessAccountId,
|
|
94
|
+
pageId: this.facebookPageId
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// Instagram doesn't have a direct scheduling API endpoint
|
|
98
|
+
// Instead, we need to use Facebook's Content Publishing API
|
|
99
|
+
// or integrate with Creator Studio
|
|
100
|
+
|
|
101
|
+
// For now, we'll store the scheduling data and return instructions
|
|
102
|
+
const schedulingId = this.generateSchedulingId();
|
|
103
|
+
|
|
104
|
+
// In a production environment, you would:
|
|
105
|
+
// 1. Store this in a database
|
|
106
|
+
// 2. Set up a cron job or scheduler to publish at the scheduled time
|
|
107
|
+
// 3. Or integrate with Facebook Creator Studio API
|
|
108
|
+
|
|
109
|
+
// Store scheduling data (this is a placeholder - implement your storage solution)
|
|
110
|
+
await this.storeSchedulingData(schedulingId, schedulingData);
|
|
111
|
+
|
|
112
|
+
// Store result in output params
|
|
113
|
+
const outputParams = [...params.Params];
|
|
114
|
+
outputParams.push({
|
|
115
|
+
Name: 'ResultData',
|
|
116
|
+
Type: 'Output',
|
|
117
|
+
Value: JSON.stringify({
|
|
118
|
+
schedulingId,
|
|
119
|
+
scheduledTime: scheduleDate.toISOString(),
|
|
120
|
+
postType,
|
|
121
|
+
mediaCount: mediaUrls.length,
|
|
122
|
+
instructions: {
|
|
123
|
+
creatorStudio: 'This post can be managed in Facebook Creator Studio',
|
|
124
|
+
api: 'Use the scheduling ID to retrieve and publish this post at the scheduled time',
|
|
125
|
+
webhook: 'Set up a webhook to be notified when it\'s time to publish'
|
|
126
|
+
},
|
|
127
|
+
schedulingData
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
Success: true,
|
|
133
|
+
Message: 'Instagram post scheduled successfully',
|
|
134
|
+
ResultCode: 'SUCCESS',
|
|
135
|
+
Params: outputParams
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
} catch (error: any) {
|
|
139
|
+
LogError('Failed to schedule Instagram post', error);
|
|
140
|
+
|
|
141
|
+
if (error.code === 'RATE_LIMIT') {
|
|
142
|
+
return {
|
|
143
|
+
Success: false,
|
|
144
|
+
Message: 'Instagram API rate limit exceeded. Please try again later.',
|
|
145
|
+
ResultCode: 'RATE_LIMIT'
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
Success: false,
|
|
151
|
+
Message: `Failed to schedule post: ${error.message}`,
|
|
152
|
+
ResultCode: 'ERROR'
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Generate a unique scheduling ID
|
|
159
|
+
*/
|
|
160
|
+
private generateSchedulingId(): string {
|
|
161
|
+
const timestamp = Date.now();
|
|
162
|
+
const random = Math.random().toString(36).substring(2, 9);
|
|
163
|
+
return `ig_schedule_${timestamp}_${random}`;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Store scheduling data (placeholder - implement based on your storage solution)
|
|
168
|
+
*/
|
|
169
|
+
private async storeSchedulingData(schedulingId: string, data: any): Promise<void> {
|
|
170
|
+
// In a real implementation, this would:
|
|
171
|
+
// 1. Store in a database (e.g., in a ScheduledPosts table)
|
|
172
|
+
// 2. Set up a scheduled job in your job queue
|
|
173
|
+
// 3. Or send to a scheduling service
|
|
174
|
+
|
|
175
|
+
// For demonstration, we'll just log it
|
|
176
|
+
LogError('Scheduling data would be stored:', schedulingId, data);
|
|
177
|
+
|
|
178
|
+
// You could also use MemberJunction entities to store this
|
|
179
|
+
// For example, create a "Social Media Scheduled Posts" entity
|
|
180
|
+
// and save the scheduling data there
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Create a scheduled post using Facebook Creator Studio API
|
|
185
|
+
* Note: This is a conceptual implementation as Creator Studio API
|
|
186
|
+
* has specific requirements and approval process
|
|
187
|
+
*/
|
|
188
|
+
private async createCreatorStudioScheduledPost(data: any): Promise<string> {
|
|
189
|
+
// This would require:
|
|
190
|
+
// 1. Creator Studio API access
|
|
191
|
+
// 2. Additional permissions
|
|
192
|
+
// 3. Different API endpoints
|
|
193
|
+
|
|
194
|
+
// For now, we return a placeholder
|
|
195
|
+
throw new Error('Creator Studio integration not implemented. Use the scheduling data to create your own scheduling solution.');
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Define the parameters for this action
|
|
200
|
+
*/
|
|
201
|
+
public get Params(): ActionParam[] {
|
|
202
|
+
return [
|
|
203
|
+
...this.commonSocialParams,
|
|
204
|
+
{
|
|
205
|
+
Name: 'Content',
|
|
206
|
+
Type: 'Input',
|
|
207
|
+
Value: null
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
Name: 'MediaUrls',
|
|
211
|
+
Type: 'Input',
|
|
212
|
+
Value: null
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
Name: 'ScheduledTime',
|
|
216
|
+
Type: 'Input',
|
|
217
|
+
Value: null
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
Name: 'PostType',
|
|
221
|
+
Type: 'Input',
|
|
222
|
+
Value: 'FEED'
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
Name: 'LocationID',
|
|
226
|
+
Type: 'Input',
|
|
227
|
+
Value: null
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
Name: 'TaggedUsers',
|
|
231
|
+
Type: 'Input',
|
|
232
|
+
Value: null
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
Name: 'FirstComment',
|
|
236
|
+
Type: 'Input',
|
|
237
|
+
Value: null
|
|
238
|
+
}
|
|
239
|
+
];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Get the description for this action
|
|
244
|
+
*/
|
|
245
|
+
public get Description(): string {
|
|
246
|
+
return 'Schedules an Instagram post for future publication. Returns scheduling data that can be used with Creator Studio or custom scheduling solutions.';
|
|
247
|
+
}
|
|
248
|
+
}
|