@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,301 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { LinkedInBaseAction, LinkedInShareData, LinkedInArticle } from '../linkedin-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { LogStatus, LogError } from '@memberjunction/core';
|
|
5
|
+
import { MediaFile } from '../../../base/base-social.action';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Action to create a LinkedIn article (long-form content)
|
|
9
|
+
*/
|
|
10
|
+
@RegisterClass(LinkedInBaseAction, 'LinkedInCreateArticleAction')
|
|
11
|
+
export class LinkedInCreateArticleAction extends LinkedInBaseAction {
|
|
12
|
+
/**
|
|
13
|
+
* Create a LinkedIn article
|
|
14
|
+
*/
|
|
15
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
16
|
+
const { Params, ContextUser } = params;
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
// Initialize OAuth
|
|
20
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
21
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
22
|
+
throw new Error('Failed to initialize OAuth connection');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Extract parameters
|
|
26
|
+
const title = this.getParamValue(Params, 'Title');
|
|
27
|
+
const content = this.getParamValue(Params, 'Content');
|
|
28
|
+
const description = this.getParamValue(Params, 'Description');
|
|
29
|
+
const coverImage = this.getParamValue(Params, 'CoverImage');
|
|
30
|
+
const authorType = this.getParamValue(Params, 'AuthorType') || 'personal'; // 'personal' or 'organization'
|
|
31
|
+
const organizationId = this.getParamValue(Params, 'OrganizationID');
|
|
32
|
+
const visibility = this.getParamValue(Params, 'Visibility') || 'PUBLIC';
|
|
33
|
+
const publishImmediately = this.getParamValue(Params, 'PublishImmediately') !== false; // Default true
|
|
34
|
+
|
|
35
|
+
// Validate required parameters
|
|
36
|
+
if (!title) {
|
|
37
|
+
throw new Error('Title is required');
|
|
38
|
+
}
|
|
39
|
+
if (!content) {
|
|
40
|
+
throw new Error('Content is required');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Determine author URN
|
|
44
|
+
let authorUrn: string;
|
|
45
|
+
if (authorType === 'organization') {
|
|
46
|
+
if (!organizationId) {
|
|
47
|
+
// Get first admin organization if not specified
|
|
48
|
+
const orgs = await this.getAdminOrganizations();
|
|
49
|
+
if (orgs.length === 0) {
|
|
50
|
+
throw new Error('No organizations found. Please specify OrganizationID.');
|
|
51
|
+
}
|
|
52
|
+
authorUrn = orgs[0].urn;
|
|
53
|
+
LogStatus(`Using organization: ${orgs[0].name}`);
|
|
54
|
+
} else {
|
|
55
|
+
authorUrn = `urn:li:organization:${organizationId}`;
|
|
56
|
+
}
|
|
57
|
+
} else {
|
|
58
|
+
// Personal article
|
|
59
|
+
authorUrn = await this.getCurrentUserUrn();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Upload cover image if provided
|
|
63
|
+
let coverImageUrn: string | undefined;
|
|
64
|
+
if (coverImage) {
|
|
65
|
+
LogStatus('Uploading cover image...');
|
|
66
|
+
const coverImageFile = coverImage as MediaFile;
|
|
67
|
+
const uploadedUrns = await this.uploadMedia([coverImageFile]);
|
|
68
|
+
coverImageUrn = uploadedUrns[0];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Create article share data
|
|
72
|
+
const articleShareData: LinkedInShareData = {
|
|
73
|
+
author: authorUrn,
|
|
74
|
+
lifecycleState: publishImmediately ? 'PUBLISHED' : 'DRAFT',
|
|
75
|
+
specificContent: {
|
|
76
|
+
'com.linkedin.ugc.ShareContent': {
|
|
77
|
+
shareCommentary: {
|
|
78
|
+
text: description || `Check out my new article: ${title}`
|
|
79
|
+
},
|
|
80
|
+
shareMediaCategory: 'ARTICLE',
|
|
81
|
+
media: [{
|
|
82
|
+
status: 'READY' as const,
|
|
83
|
+
media: '', // Article URL will be filled after creation
|
|
84
|
+
title: {
|
|
85
|
+
text: title
|
|
86
|
+
},
|
|
87
|
+
description: description ? {
|
|
88
|
+
text: description
|
|
89
|
+
} : undefined
|
|
90
|
+
}]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
visibility: {
|
|
94
|
+
'com.linkedin.ugc.MemberNetworkVisibility': visibility as any
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// Format content for LinkedIn article
|
|
99
|
+
const formattedContent = this.formatArticleContent(content);
|
|
100
|
+
|
|
101
|
+
// Create the article
|
|
102
|
+
LogStatus('Creating LinkedIn article...');
|
|
103
|
+
|
|
104
|
+
// Note: LinkedIn's v2 API has limited article creation support
|
|
105
|
+
// Full article creation typically requires using the Publishing Platform API
|
|
106
|
+
// This implementation creates an article-style share with rich content
|
|
107
|
+
|
|
108
|
+
// For now, we'll create a rich media share that looks like an article
|
|
109
|
+
const articlePost = await this.createRichMediaShare(
|
|
110
|
+
authorUrn,
|
|
111
|
+
title,
|
|
112
|
+
formattedContent,
|
|
113
|
+
description,
|
|
114
|
+
coverImageUrn,
|
|
115
|
+
visibility,
|
|
116
|
+
publishImmediately
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
// Update output parameters
|
|
120
|
+
const outputParams = [...Params];
|
|
121
|
+
const articleParam = outputParams.find(p => p.Name === 'Article');
|
|
122
|
+
if (articleParam) articleParam.Value = articlePost;
|
|
123
|
+
const articleIdParam = outputParams.find(p => p.Name === 'ArticleID');
|
|
124
|
+
if (articleIdParam) articleIdParam.Value = articlePost.id;
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
Success: true,
|
|
128
|
+
ResultCode: 'SUCCESS',
|
|
129
|
+
Message: `Successfully created LinkedIn article: ${title}`,
|
|
130
|
+
Params: outputParams
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
} catch (error) {
|
|
134
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
Success: false,
|
|
138
|
+
ResultCode: 'ERROR',
|
|
139
|
+
Message: `Failed to create LinkedIn article: ${errorMessage}`,
|
|
140
|
+
Params
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Format article content for LinkedIn
|
|
147
|
+
*/
|
|
148
|
+
private formatArticleContent(content: string): string {
|
|
149
|
+
// LinkedIn articles support basic HTML formatting
|
|
150
|
+
// Convert markdown-style formatting to LinkedIn-compatible format
|
|
151
|
+
let formatted = content;
|
|
152
|
+
|
|
153
|
+
// Convert markdown headers to bold text
|
|
154
|
+
formatted = formatted.replace(/^### (.+)$/gm, '\n**$1**\n');
|
|
155
|
+
formatted = formatted.replace(/^## (.+)$/gm, '\n**$1**\n');
|
|
156
|
+
formatted = formatted.replace(/^# (.+)$/gm, '\n**$1**\n');
|
|
157
|
+
|
|
158
|
+
// Convert markdown bold
|
|
159
|
+
formatted = formatted.replace(/\*\*(.+?)\*\*/g, '**$1**');
|
|
160
|
+
|
|
161
|
+
// Convert markdown italic
|
|
162
|
+
formatted = formatted.replace(/\*(.+?)\*/g, '_$1_');
|
|
163
|
+
|
|
164
|
+
// Add line breaks for paragraphs
|
|
165
|
+
formatted = formatted.replace(/\n\n/g, '\n\n');
|
|
166
|
+
|
|
167
|
+
// Truncate if too long (LinkedIn has character limits)
|
|
168
|
+
const maxLength = 3000; // LinkedIn's limit for share commentary
|
|
169
|
+
if (formatted.length > maxLength) {
|
|
170
|
+
formatted = formatted.substring(0, maxLength - 3) + '...';
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return formatted;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Create a rich media share that resembles an article
|
|
178
|
+
*/
|
|
179
|
+
private async createRichMediaShare(
|
|
180
|
+
authorUrn: string,
|
|
181
|
+
title: string,
|
|
182
|
+
content: string,
|
|
183
|
+
description?: string,
|
|
184
|
+
coverImageUrn?: string,
|
|
185
|
+
visibility: string = 'PUBLIC',
|
|
186
|
+
publishImmediately: boolean = true
|
|
187
|
+
): Promise<any> {
|
|
188
|
+
try {
|
|
189
|
+
// Create a rich share with article-like formatting
|
|
190
|
+
const shareData: LinkedInShareData = {
|
|
191
|
+
author: authorUrn,
|
|
192
|
+
lifecycleState: publishImmediately ? 'PUBLISHED' : 'DRAFT',
|
|
193
|
+
specificContent: {
|
|
194
|
+
'com.linkedin.ugc.ShareContent': {
|
|
195
|
+
shareCommentary: {
|
|
196
|
+
text: `📝 ${title}\n\n${content}`
|
|
197
|
+
},
|
|
198
|
+
shareMediaCategory: coverImageUrn ? 'IMAGE' : 'NONE',
|
|
199
|
+
media: coverImageUrn ? [{
|
|
200
|
+
status: 'READY' as const,
|
|
201
|
+
media: coverImageUrn,
|
|
202
|
+
title: {
|
|
203
|
+
text: title
|
|
204
|
+
},
|
|
205
|
+
description: description ? {
|
|
206
|
+
text: description
|
|
207
|
+
} : undefined
|
|
208
|
+
}] : undefined
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
visibility: {
|
|
212
|
+
'com.linkedin.ugc.MemberNetworkVisibility': visibility as any
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
const postId = await this.createShare(shareData);
|
|
217
|
+
|
|
218
|
+
// Return article-like object
|
|
219
|
+
return {
|
|
220
|
+
id: postId,
|
|
221
|
+
title: title,
|
|
222
|
+
content: content,
|
|
223
|
+
description: description,
|
|
224
|
+
coverImage: coverImageUrn,
|
|
225
|
+
author: authorUrn,
|
|
226
|
+
publishedAt: publishImmediately ? new Date().toISOString() : null,
|
|
227
|
+
visibility: visibility,
|
|
228
|
+
url: `https://www.linkedin.com/feed/update/${postId}/`
|
|
229
|
+
};
|
|
230
|
+
} catch (error) {
|
|
231
|
+
LogError(`Failed to create rich media share: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
232
|
+
throw error;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Define the parameters this action expects
|
|
238
|
+
*/
|
|
239
|
+
public get Params(): ActionParam[] {
|
|
240
|
+
return [
|
|
241
|
+
...this.commonSocialParams,
|
|
242
|
+
{
|
|
243
|
+
Name: 'Title',
|
|
244
|
+
Type: 'Input',
|
|
245
|
+
Value: null
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
Name: 'Content',
|
|
249
|
+
Type: 'Input',
|
|
250
|
+
Value: null
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
Name: 'Description',
|
|
254
|
+
Type: 'Input',
|
|
255
|
+
Value: null
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
Name: 'CoverImage',
|
|
259
|
+
Type: 'Input',
|
|
260
|
+
Value: null
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
Name: 'AuthorType',
|
|
264
|
+
Type: 'Input',
|
|
265
|
+
Value: 'personal' // 'personal' or 'organization'
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
Name: 'OrganizationID',
|
|
269
|
+
Type: 'Input',
|
|
270
|
+
Value: null
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
Name: 'Visibility',
|
|
274
|
+
Type: 'Input',
|
|
275
|
+
Value: 'PUBLIC' // 'PUBLIC', 'CONNECTIONS', 'LOGGED_IN', 'CONTAINER'
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
Name: 'PublishImmediately',
|
|
279
|
+
Type: 'Input',
|
|
280
|
+
Value: true
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
Name: 'Article',
|
|
284
|
+
Type: 'Output',
|
|
285
|
+
Value: null
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
Name: 'ArticleID',
|
|
289
|
+
Type: 'Output',
|
|
290
|
+
Value: null
|
|
291
|
+
}
|
|
292
|
+
];
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Get action description
|
|
297
|
+
*/
|
|
298
|
+
public get Description(): string {
|
|
299
|
+
return 'Creates a LinkedIn article (long-form content) with title, content, and optional cover image. Note: Uses rich media shares to simulate article functionality due to API limitations.';
|
|
300
|
+
}
|
|
301
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
2
|
+
import { LinkedInBaseAction, LinkedInShareData } from '../linkedin-base.action';
|
|
3
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
4
|
+
import { LogStatus, LogError } from '@memberjunction/core';
|
|
5
|
+
import { MediaFile } from '../../../base/base-social.action';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Action to create a post on LinkedIn
|
|
9
|
+
*/
|
|
10
|
+
@RegisterClass(LinkedInBaseAction, 'LinkedInCreatePostAction')
|
|
11
|
+
export class LinkedInCreatePostAction extends LinkedInBaseAction {
|
|
12
|
+
/**
|
|
13
|
+
* Create a post on LinkedIn (personal or organization)
|
|
14
|
+
*/
|
|
15
|
+
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
|
|
16
|
+
const { Params, ContextUser } = params;
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
// Initialize OAuth
|
|
20
|
+
const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
|
|
21
|
+
if (!await this.initializeOAuth(companyIntegrationId)) {
|
|
22
|
+
throw new Error('Failed to initialize OAuth connection');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Extract parameters
|
|
26
|
+
const content = this.getParamValue(Params, 'Content');
|
|
27
|
+
const authorType = this.getParamValue(Params, 'AuthorType') || 'personal'; // 'personal' or 'organization'
|
|
28
|
+
const organizationId = this.getParamValue(Params, 'OrganizationID');
|
|
29
|
+
const mediaFiles = this.getParamValue(Params, 'MediaFiles');
|
|
30
|
+
const visibility = this.getParamValue(Params, 'Visibility') || 'PUBLIC';
|
|
31
|
+
const visibleToGuest = this.getParamValue(Params, 'VisibleToGuest') !== false; // Default true
|
|
32
|
+
|
|
33
|
+
// Validate required parameters
|
|
34
|
+
if (!content) {
|
|
35
|
+
throw new Error('Content is required');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Determine author URN
|
|
39
|
+
let authorUrn: string;
|
|
40
|
+
if (authorType === 'organization') {
|
|
41
|
+
if (!organizationId) {
|
|
42
|
+
// Get first admin organization if not specified
|
|
43
|
+
const orgs = await this.getAdminOrganizations();
|
|
44
|
+
if (orgs.length === 0) {
|
|
45
|
+
throw new Error('No organizations found. Please specify OrganizationID.');
|
|
46
|
+
}
|
|
47
|
+
authorUrn = orgs[0].urn;
|
|
48
|
+
LogStatus(`Using organization: ${orgs[0].name}`);
|
|
49
|
+
} else {
|
|
50
|
+
authorUrn = `urn:li:organization:${organizationId}`;
|
|
51
|
+
}
|
|
52
|
+
} else {
|
|
53
|
+
// Personal post
|
|
54
|
+
authorUrn = await this.getCurrentUserUrn();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Upload media if provided
|
|
58
|
+
let mediaUrns: string[] = [];
|
|
59
|
+
if (mediaFiles && Array.isArray(mediaFiles)) {
|
|
60
|
+
LogStatus(`Uploading ${mediaFiles.length} media files...`);
|
|
61
|
+
mediaUrns = await this.uploadMedia(mediaFiles as MediaFile[]);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Build share data
|
|
65
|
+
const shareData: LinkedInShareData = {
|
|
66
|
+
author: authorUrn,
|
|
67
|
+
lifecycleState: 'PUBLISHED',
|
|
68
|
+
specificContent: {
|
|
69
|
+
'com.linkedin.ugc.ShareContent': {
|
|
70
|
+
shareCommentary: {
|
|
71
|
+
text: content
|
|
72
|
+
},
|
|
73
|
+
shareMediaCategory: mediaUrns.length > 0 ? 'IMAGE' : 'NONE',
|
|
74
|
+
media: mediaUrns.length > 0 ? mediaUrns.map(urn => ({
|
|
75
|
+
status: 'READY' as const,
|
|
76
|
+
media: urn
|
|
77
|
+
})) : undefined
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
visibility: {
|
|
81
|
+
'com.linkedin.ugc.MemberNetworkVisibility': visibility as any
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// Add distribution settings if public
|
|
86
|
+
if (visibility === 'PUBLIC') {
|
|
87
|
+
shareData.distribution = {
|
|
88
|
+
linkedInDistributionTarget: {
|
|
89
|
+
visibleToGuest: visibleToGuest
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Create the post
|
|
95
|
+
LogStatus('Creating LinkedIn post...');
|
|
96
|
+
const postId = await this.createShare(shareData);
|
|
97
|
+
|
|
98
|
+
// Get the created post details
|
|
99
|
+
const shares = await this.getShares(authorUrn, 1);
|
|
100
|
+
const createdPost = shares.find(s => s.id === postId);
|
|
101
|
+
|
|
102
|
+
if (!createdPost) {
|
|
103
|
+
throw new Error('Failed to retrieve created post');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Normalize the created post
|
|
107
|
+
const normalizedPost = this.normalizePost(createdPost);
|
|
108
|
+
|
|
109
|
+
// Update output parameters
|
|
110
|
+
const outputParams = [...Params];
|
|
111
|
+
const postParam = outputParams.find(p => p.Name === 'CreatedPost');
|
|
112
|
+
if (postParam) postParam.Value = normalizedPost;
|
|
113
|
+
const postIdParam = outputParams.find(p => p.Name === 'PostID');
|
|
114
|
+
if (postIdParam) postIdParam.Value = postId;
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
Success: true,
|
|
118
|
+
ResultCode: 'SUCCESS',
|
|
119
|
+
Message: `Successfully created LinkedIn post (ID: ${postId})`,
|
|
120
|
+
Params: outputParams
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
} catch (error) {
|
|
124
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
Success: false,
|
|
128
|
+
ResultCode: 'ERROR',
|
|
129
|
+
Message: `Failed to create LinkedIn post: ${errorMessage}`,
|
|
130
|
+
Params
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Define the parameters this action expects
|
|
137
|
+
*/
|
|
138
|
+
public get Params(): ActionParam[] {
|
|
139
|
+
return [
|
|
140
|
+
...this.commonSocialParams,
|
|
141
|
+
{
|
|
142
|
+
Name: 'Content',
|
|
143
|
+
Type: 'Input',
|
|
144
|
+
Value: null
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
Name: 'AuthorType',
|
|
148
|
+
Type: 'Input',
|
|
149
|
+
Value: 'personal' // 'personal' or 'organization'
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
Name: 'OrganizationID',
|
|
153
|
+
Type: 'Input',
|
|
154
|
+
Value: null
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
Name: 'MediaFiles',
|
|
158
|
+
Type: 'Input',
|
|
159
|
+
Value: null
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
Name: 'Visibility',
|
|
163
|
+
Type: 'Input',
|
|
164
|
+
Value: 'PUBLIC' // 'PUBLIC', 'CONNECTIONS', 'LOGGED_IN', 'CONTAINER'
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
Name: 'VisibleToGuest',
|
|
168
|
+
Type: 'Input',
|
|
169
|
+
Value: true
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
Name: 'CreatedPost',
|
|
173
|
+
Type: 'Output',
|
|
174
|
+
Value: null
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
Name: 'PostID',
|
|
178
|
+
Type: 'Output',
|
|
179
|
+
Value: null
|
|
180
|
+
}
|
|
181
|
+
];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Get action description
|
|
186
|
+
*/
|
|
187
|
+
public get Description(): string {
|
|
188
|
+
return 'Creates a post on LinkedIn for personal profiles or organization pages with optional media attachments';
|
|
189
|
+
}
|
|
190
|
+
}
|