@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,129 @@
|
|
|
1
|
+
# Instagram Actions for MemberJunction
|
|
2
|
+
|
|
3
|
+
This directory contains the Instagram implementation for the MemberJunction Social Media Actions package.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Instagram actions use the Facebook Graph API (v18.0) since Instagram is owned by Meta. The implementation requires:
|
|
8
|
+
- OAuth 2.0 authentication via CompanyIntegration table
|
|
9
|
+
- Instagram Business Account (stored in CustomAttribute1)
|
|
10
|
+
- Facebook Page ID (stored in CustomAttribute2)
|
|
11
|
+
- App ID and App Secret (stored in CustomAttribute3 and CustomAttribute4)
|
|
12
|
+
|
|
13
|
+
## Available Actions
|
|
14
|
+
|
|
15
|
+
### 1. Create Post (`Instagram - Create Post`)
|
|
16
|
+
Creates a new Instagram post with support for:
|
|
17
|
+
- Feed posts (single image/video)
|
|
18
|
+
- Carousel posts (multiple images/videos, max 10)
|
|
19
|
+
- Reels (short-form videos)
|
|
20
|
+
- Location tagging
|
|
21
|
+
- User tagging
|
|
22
|
+
- Scheduling (requires Facebook Creator Studio)
|
|
23
|
+
|
|
24
|
+
### 2. Get Business Posts (`Instagram - Get Business Posts`)
|
|
25
|
+
Retrieves posts from an Instagram Business account with:
|
|
26
|
+
- Pagination support
|
|
27
|
+
- Date range filtering
|
|
28
|
+
- Media type filtering
|
|
29
|
+
- Engagement metrics
|
|
30
|
+
- Insights data (optional)
|
|
31
|
+
|
|
32
|
+
### 3. Get Post Insights (`Instagram - Get Post Insights`)
|
|
33
|
+
Retrieves detailed analytics for a specific post including:
|
|
34
|
+
- Impressions and reach
|
|
35
|
+
- Engagement metrics (likes, comments, saves, shares)
|
|
36
|
+
- Video-specific metrics (views, completion rate)
|
|
37
|
+
- Performance scoring
|
|
38
|
+
- Time period analysis
|
|
39
|
+
|
|
40
|
+
### 4. Get Account Insights (`Instagram - Get Account Insights`)
|
|
41
|
+
Retrieves account-level insights including:
|
|
42
|
+
- Follower demographics (age, gender, location, language)
|
|
43
|
+
- Growth metrics
|
|
44
|
+
- Content performance summary
|
|
45
|
+
- Peak activity times
|
|
46
|
+
- Profile views and website clicks
|
|
47
|
+
|
|
48
|
+
### 5. Schedule Post (`Instagram - Schedule Post`)
|
|
49
|
+
Schedules posts for future publication:
|
|
50
|
+
- Returns scheduling data for integration with Creator Studio
|
|
51
|
+
- Validates scheduling constraints (10 min - 75 days)
|
|
52
|
+
- Supports all post types
|
|
53
|
+
- Note: Direct API scheduling is limited; requires third-party integration
|
|
54
|
+
|
|
55
|
+
### 6. Get Comments (`Instagram - Get Comments`)
|
|
56
|
+
Retrieves comments for a post with:
|
|
57
|
+
- Nested replies support
|
|
58
|
+
- Hidden comments (with moderation permissions)
|
|
59
|
+
- Sentiment analysis
|
|
60
|
+
- Engagement metrics
|
|
61
|
+
- Keyword and emoji analysis
|
|
62
|
+
|
|
63
|
+
### 7. Create Story (`Instagram - Create Story`)
|
|
64
|
+
Creates Instagram Stories with:
|
|
65
|
+
- Images or videos (max 60 seconds)
|
|
66
|
+
- Interactive stickers (polls, questions, countdown, music, location)
|
|
67
|
+
- Link stickers (requires 10k+ followers or verification)
|
|
68
|
+
- User mentions and hashtags
|
|
69
|
+
- 24-hour expiration
|
|
70
|
+
|
|
71
|
+
### 8. Search Posts (`Instagram - Search Posts`)
|
|
72
|
+
Searches historical posts from the business account:
|
|
73
|
+
- Text search in captions
|
|
74
|
+
- Hashtag filtering
|
|
75
|
+
- Date range filtering
|
|
76
|
+
- Media type filtering
|
|
77
|
+
- Minimum engagement threshold
|
|
78
|
+
- Performance analysis and suggestions
|
|
79
|
+
|
|
80
|
+
## Rate Limits
|
|
81
|
+
|
|
82
|
+
Instagram API rate limits:
|
|
83
|
+
- 200 calls per hour per user
|
|
84
|
+
- Rate limit headers are checked and respected
|
|
85
|
+
- Automatic retry with exponential backoff
|
|
86
|
+
|
|
87
|
+
## Media Requirements
|
|
88
|
+
|
|
89
|
+
### Images
|
|
90
|
+
- Formats: JPEG, PNG
|
|
91
|
+
- Max size: 5MB
|
|
92
|
+
- Aspect ratios: 1:1 (square), 4:5 (portrait), 1.91:1 (landscape)
|
|
93
|
+
|
|
94
|
+
### Videos
|
|
95
|
+
- Formats: MP4, MOV
|
|
96
|
+
- Max size: 100MB (feed), 512MB (IGTV)
|
|
97
|
+
- Duration: 3-60 seconds (feed), up to 60 seconds (reels), up to 10 minutes (IGTV)
|
|
98
|
+
|
|
99
|
+
### Stories
|
|
100
|
+
- Images: 30MB max
|
|
101
|
+
- Videos: 100MB max, 60 seconds max
|
|
102
|
+
- Aspect ratio: 9:16 (recommended)
|
|
103
|
+
|
|
104
|
+
## Important Notes
|
|
105
|
+
|
|
106
|
+
1. **Media Upload**: Instagram requires media to be hosted at public URLs. The current implementation includes placeholder methods for CDN upload that need to be implemented based on your infrastructure.
|
|
107
|
+
|
|
108
|
+
2. **Search Limitations**: Instagram API only allows searching within your own business account's posts, not general Instagram content.
|
|
109
|
+
|
|
110
|
+
3. **Story Links**: Link stickers in stories require either 10,000+ followers or account verification.
|
|
111
|
+
|
|
112
|
+
4. **Scheduling**: Native API scheduling is limited. The implementation returns scheduling data that can be used with Facebook Creator Studio or third-party scheduling tools.
|
|
113
|
+
|
|
114
|
+
5. **Permissions**: Ensure your Instagram app has the required permissions:
|
|
115
|
+
- `instagram_basic`
|
|
116
|
+
- `instagram_content_publish`
|
|
117
|
+
- `instagram_manage_insights`
|
|
118
|
+
- `instagram_manage_comments`
|
|
119
|
+
|
|
120
|
+
## Error Handling
|
|
121
|
+
|
|
122
|
+
All actions implement comprehensive error handling for:
|
|
123
|
+
- Rate limiting (with retry logic)
|
|
124
|
+
- Invalid media
|
|
125
|
+
- Insufficient permissions
|
|
126
|
+
- Post not found
|
|
127
|
+
- Platform-specific errors
|
|
128
|
+
|
|
129
|
+
Results are returned via output parameters following MemberJunction patterns.
|
|
@@ -0,0 +1,329 @@
|
|
|
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
|
+
import { MediaFile } from '../../../base/base-social.action';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new Instagram post (feed post, carousel, or reel).
|
|
9
|
+
* Supports images and videos with captions, hashtags, and location tagging.
|
|
10
|
+
*/
|
|
11
|
+
@RegisterClass(InstagramBaseAction, 'Instagram - Create Post')
|
|
12
|
+
export class InstagramCreatePostAction extends InstagramBaseAction {
|
|
13
|
+
|
|
14
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
15
|
+
try {
|
|
16
|
+
const companyIntegrationId = this.getParamValue(params.Params, 'CompanyIntegrationID');
|
|
17
|
+
const content = this.getParamValue(params.Params, 'Content');
|
|
18
|
+
const mediaFiles = this.getParamValue(params.Params, 'MediaFiles') as MediaFile[];
|
|
19
|
+
const postType = this.getParamValue(params.Params, 'PostType') || 'FEED';
|
|
20
|
+
const locationId = this.getParamValue(params.Params, 'LocationID');
|
|
21
|
+
const taggedUsers = this.getParamValue(params.Params, 'TaggedUsers') as string[];
|
|
22
|
+
const scheduledTime = this.getParamValue(params.Params, 'ScheduledTime');
|
|
23
|
+
|
|
24
|
+
// Initialize OAuth
|
|
25
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
26
|
+
return {
|
|
27
|
+
Success: false,
|
|
28
|
+
Message: 'Failed to initialize Instagram authentication',
|
|
29
|
+
ResultCode: 'AUTH_FAILED'
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Validate inputs
|
|
34
|
+
if (!mediaFiles || mediaFiles.length === 0) {
|
|
35
|
+
return {
|
|
36
|
+
Success: false,
|
|
37
|
+
Message: 'At least one media file is required for Instagram posts',
|
|
38
|
+
ResultCode: 'MISSING_MEDIA'
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Instagram has specific requirements for different post types
|
|
43
|
+
if (postType === 'CAROUSEL' && mediaFiles.length < 2) {
|
|
44
|
+
return {
|
|
45
|
+
Success: false,
|
|
46
|
+
Message: 'Carousel posts require at least 2 media files',
|
|
47
|
+
ResultCode: 'INVALID_CAROUSEL'
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (postType === 'REELS' && (!mediaFiles[0].mimeType.startsWith('video/') || mediaFiles.length > 1)) {
|
|
52
|
+
return {
|
|
53
|
+
Success: false,
|
|
54
|
+
Message: 'Reels require exactly one video file',
|
|
55
|
+
ResultCode: 'INVALID_REEL'
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Handle scheduled posts differently
|
|
60
|
+
if (scheduledTime) {
|
|
61
|
+
const scheduleDate = new Date(scheduledTime);
|
|
62
|
+
if (scheduleDate <= new Date()) {
|
|
63
|
+
return {
|
|
64
|
+
Success: false,
|
|
65
|
+
Message: 'Scheduled time must be in the future',
|
|
66
|
+
ResultCode: 'INVALID_SCHEDULE_TIME'
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Instagram requires Facebook Creator Studio for scheduling
|
|
71
|
+
return {
|
|
72
|
+
Success: false,
|
|
73
|
+
Message: 'Instagram post scheduling requires Facebook Creator Studio integration',
|
|
74
|
+
ResultCode: 'SCHEDULING_NOT_SUPPORTED'
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
let postId: string;
|
|
79
|
+
|
|
80
|
+
if (postType === 'CAROUSEL') {
|
|
81
|
+
postId = await this.createCarouselPost(mediaFiles, content, locationId, taggedUsers);
|
|
82
|
+
} else if (postType === 'REELS') {
|
|
83
|
+
postId = await this.createReelPost(mediaFiles[0], content, locationId, taggedUsers);
|
|
84
|
+
} else {
|
|
85
|
+
postId = await this.createFeedPost(mediaFiles[0], content, locationId, taggedUsers);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Store result in output params
|
|
89
|
+
const outputParams = [...params.Params];
|
|
90
|
+
outputParams.push({
|
|
91
|
+
Name: 'PostID',
|
|
92
|
+
Type: 'Output',
|
|
93
|
+
Value: postId
|
|
94
|
+
});
|
|
95
|
+
outputParams.push({
|
|
96
|
+
Name: 'Permalink',
|
|
97
|
+
Type: 'Output',
|
|
98
|
+
Value: `https://www.instagram.com/p/${postId}/`
|
|
99
|
+
});
|
|
100
|
+
outputParams.push({
|
|
101
|
+
Name: 'PostType',
|
|
102
|
+
Type: 'Output',
|
|
103
|
+
Value: postType
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
Success: true,
|
|
108
|
+
Message: `Instagram ${postType.toLowerCase()} created successfully`,
|
|
109
|
+
ResultCode: 'SUCCESS',
|
|
110
|
+
Params: outputParams
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
} catch (error: any) {
|
|
114
|
+
LogError('Failed to create Instagram post', error);
|
|
115
|
+
|
|
116
|
+
if (error.code === 'RATE_LIMIT') {
|
|
117
|
+
return {
|
|
118
|
+
Success: false,
|
|
119
|
+
Message: 'Instagram API rate limit exceeded. Please try again later.',
|
|
120
|
+
ResultCode: 'RATE_LIMIT'
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (error.code === 'INVALID_MEDIA') {
|
|
125
|
+
return {
|
|
126
|
+
Success: false,
|
|
127
|
+
Message: error.message,
|
|
128
|
+
ResultCode: 'INVALID_MEDIA'
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return {
|
|
133
|
+
Success: false,
|
|
134
|
+
Message: `Failed to create Instagram post: ${error.message}`,
|
|
135
|
+
ResultCode: 'ERROR'
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Create a standard feed post (single image or video)
|
|
142
|
+
*/
|
|
143
|
+
private async createFeedPost(
|
|
144
|
+
mediaFile: MediaFile,
|
|
145
|
+
caption: string,
|
|
146
|
+
locationId?: string,
|
|
147
|
+
taggedUsers?: string[]
|
|
148
|
+
): Promise<string> {
|
|
149
|
+
// Add metadata to media file
|
|
150
|
+
(mediaFile as any).metadata = { caption };
|
|
151
|
+
|
|
152
|
+
// Upload media and get container ID
|
|
153
|
+
const containerId = await this.uploadSingleMedia(mediaFile);
|
|
154
|
+
|
|
155
|
+
// Wait for media to be processed
|
|
156
|
+
await this.waitForMediaContainer(containerId);
|
|
157
|
+
|
|
158
|
+
// Add additional parameters if provided
|
|
159
|
+
const publishParams: any = {
|
|
160
|
+
creation_id: containerId,
|
|
161
|
+
access_token: this.getAccessToken()
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
if (locationId) {
|
|
165
|
+
publishParams.location_id = locationId;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (taggedUsers && taggedUsers.length > 0) {
|
|
169
|
+
publishParams.user_tags = taggedUsers.map(userId => ({
|
|
170
|
+
username: userId,
|
|
171
|
+
x: 0.5, // Center of image
|
|
172
|
+
y: 0.5
|
|
173
|
+
}));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Publish the post
|
|
177
|
+
const response = await this.makeInstagramRequest<{ id: string }>(
|
|
178
|
+
`${this.instagramBusinessAccountId}/media_publish`,
|
|
179
|
+
'POST',
|
|
180
|
+
publishParams
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
return response.id;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Create a carousel post (multiple images/videos)
|
|
188
|
+
*/
|
|
189
|
+
private async createCarouselPost(
|
|
190
|
+
mediaFiles: MediaFile[],
|
|
191
|
+
caption: string,
|
|
192
|
+
locationId?: string,
|
|
193
|
+
taggedUsers?: string[]
|
|
194
|
+
): Promise<string> {
|
|
195
|
+
// Upload all media items as carousel items
|
|
196
|
+
const containerIds: string[] = [];
|
|
197
|
+
|
|
198
|
+
for (const file of mediaFiles.slice(0, 10)) { // Instagram allows max 10 items
|
|
199
|
+
file.filename = `carousel_${file.filename}`; // Mark as carousel item
|
|
200
|
+
const containerId = await this.uploadSingleMedia(file);
|
|
201
|
+
containerIds.push(containerId);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// Wait for all media to be processed
|
|
205
|
+
await Promise.all(containerIds.map(id => this.waitForMediaContainer(id)));
|
|
206
|
+
|
|
207
|
+
// Create carousel container
|
|
208
|
+
const carouselParams: any = {
|
|
209
|
+
media_type: 'CAROUSEL',
|
|
210
|
+
children: containerIds,
|
|
211
|
+
caption: caption,
|
|
212
|
+
access_token: this.getAccessToken()
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
if (locationId) {
|
|
216
|
+
carouselParams.location_id = locationId;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const carouselResponse = await this.makeInstagramRequest<{ id: string }>(
|
|
220
|
+
`${this.instagramBusinessAccountId}/media`,
|
|
221
|
+
'POST',
|
|
222
|
+
carouselParams
|
|
223
|
+
);
|
|
224
|
+
|
|
225
|
+
// Wait for carousel container to be ready
|
|
226
|
+
await this.waitForMediaContainer(carouselResponse.id);
|
|
227
|
+
|
|
228
|
+
// Publish the carousel
|
|
229
|
+
const publishResponse = await this.makeInstagramRequest<{ id: string }>(
|
|
230
|
+
`${this.instagramBusinessAccountId}/media_publish`,
|
|
231
|
+
'POST',
|
|
232
|
+
{
|
|
233
|
+
creation_id: carouselResponse.id,
|
|
234
|
+
access_token: this.getAccessToken()
|
|
235
|
+
}
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
return publishResponse.id;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Create a Reel post
|
|
243
|
+
*/
|
|
244
|
+
private async createReelPost(
|
|
245
|
+
videoFile: MediaFile,
|
|
246
|
+
caption: string,
|
|
247
|
+
locationId?: string,
|
|
248
|
+
taggedUsers?: string[]
|
|
249
|
+
): Promise<string> {
|
|
250
|
+
// Validate video duration (Reels must be 90 seconds or less)
|
|
251
|
+
// In production, you'd check the actual video duration
|
|
252
|
+
|
|
253
|
+
// Add metadata
|
|
254
|
+
(videoFile as any).metadata = {
|
|
255
|
+
caption,
|
|
256
|
+
media_type: 'REELS'
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
// Upload video
|
|
260
|
+
const containerId = await this.uploadSingleMedia(videoFile);
|
|
261
|
+
|
|
262
|
+
// Wait for video to be processed (videos take longer)
|
|
263
|
+
await this.waitForMediaContainer(containerId, 300000); // 5 minute timeout for videos
|
|
264
|
+
|
|
265
|
+
// Publish the reel
|
|
266
|
+
const publishParams: any = {
|
|
267
|
+
creation_id: containerId,
|
|
268
|
+
access_token: this.getAccessToken()
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
if (locationId) {
|
|
272
|
+
publishParams.location_id = locationId;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const response = await this.makeInstagramRequest<{ id: string }>(
|
|
276
|
+
`${this.instagramBusinessAccountId}/media_publish`,
|
|
277
|
+
'POST',
|
|
278
|
+
publishParams
|
|
279
|
+
);
|
|
280
|
+
|
|
281
|
+
return response.id;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Define the parameters for this action
|
|
286
|
+
*/
|
|
287
|
+
public get Params(): ActionParam[] {
|
|
288
|
+
return [
|
|
289
|
+
...this.commonSocialParams,
|
|
290
|
+
{
|
|
291
|
+
Name: 'Content',
|
|
292
|
+
Type: 'Input',
|
|
293
|
+
Value: null,
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
Name: 'MediaFiles',
|
|
297
|
+
Type: 'Input',
|
|
298
|
+
Value: null,
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
Name: 'PostType',
|
|
302
|
+
Type: 'Input',
|
|
303
|
+
Value: 'FEED',
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
Name: 'LocationID',
|
|
307
|
+
Type: 'Input',
|
|
308
|
+
Value: null,
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
Name: 'TaggedUsers',
|
|
312
|
+
Type: 'Input',
|
|
313
|
+
Value: null,
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
Name: 'ScheduledTime',
|
|
317
|
+
Type: 'Input',
|
|
318
|
+
Value: null,
|
|
319
|
+
}
|
|
320
|
+
];
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Get the description for this action
|
|
325
|
+
*/
|
|
326
|
+
public get Description(): string {
|
|
327
|
+
return 'Creates a new Instagram post with images or videos. Supports feed posts, carousels, and reels.';
|
|
328
|
+
}
|
|
329
|
+
}
|