@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.
Files changed (458) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/CHANGELOG.md +16 -0
  3. package/README.md +375 -0
  4. package/dist/base/base-social.action.d.ts +137 -0
  5. package/dist/base/base-social.action.d.ts.map +1 -0
  6. package/dist/base/base-social.action.js +176 -0
  7. package/dist/base/base-social.action.js.map +1 -0
  8. package/dist/index.d.ts +10 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +35 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/providers/buffer/actions/create-post.action.d.ts +20 -0
  13. package/dist/providers/buffer/actions/create-post.action.d.ts.map +1 -0
  14. package/dist/providers/buffer/actions/create-post.action.js +195 -0
  15. package/dist/providers/buffer/actions/create-post.action.js.map +1 -0
  16. package/dist/providers/buffer/actions/delete-post.action.d.ts +20 -0
  17. package/dist/providers/buffer/actions/delete-post.action.d.ts.map +1 -0
  18. package/dist/providers/buffer/actions/delete-post.action.js +119 -0
  19. package/dist/providers/buffer/actions/delete-post.action.js.map +1 -0
  20. package/dist/providers/buffer/actions/get-analytics.action.d.ts +28 -0
  21. package/dist/providers/buffer/actions/get-analytics.action.d.ts.map +1 -0
  22. package/dist/providers/buffer/actions/get-analytics.action.js +143 -0
  23. package/dist/providers/buffer/actions/get-analytics.action.js.map +1 -0
  24. package/dist/providers/buffer/actions/get-pending-posts.action.d.ts +24 -0
  25. package/dist/providers/buffer/actions/get-pending-posts.action.d.ts.map +1 -0
  26. package/dist/providers/buffer/actions/get-pending-posts.action.js +161 -0
  27. package/dist/providers/buffer/actions/get-pending-posts.action.js.map +1 -0
  28. package/dist/providers/buffer/actions/get-profiles.action.d.ts +24 -0
  29. package/dist/providers/buffer/actions/get-profiles.action.d.ts.map +1 -0
  30. package/dist/providers/buffer/actions/get-profiles.action.js +128 -0
  31. package/dist/providers/buffer/actions/get-profiles.action.js.map +1 -0
  32. package/dist/providers/buffer/actions/get-sent-posts.action.d.ts +32 -0
  33. package/dist/providers/buffer/actions/get-sent-posts.action.d.ts.map +1 -0
  34. package/dist/providers/buffer/actions/get-sent-posts.action.js +187 -0
  35. package/dist/providers/buffer/actions/get-sent-posts.action.js.map +1 -0
  36. package/dist/providers/buffer/actions/index.d.ts +9 -0
  37. package/dist/providers/buffer/actions/index.d.ts.map +1 -0
  38. package/dist/providers/buffer/actions/index.js +25 -0
  39. package/dist/providers/buffer/actions/index.js.map +1 -0
  40. package/dist/providers/buffer/actions/reorder-queue.action.d.ts +20 -0
  41. package/dist/providers/buffer/actions/reorder-queue.action.d.ts.map +1 -0
  42. package/dist/providers/buffer/actions/reorder-queue.action.js +138 -0
  43. package/dist/providers/buffer/actions/reorder-queue.action.js.map +1 -0
  44. package/dist/providers/buffer/actions/search-posts.action.d.ts +28 -0
  45. package/dist/providers/buffer/actions/search-posts.action.d.ts.map +1 -0
  46. package/dist/providers/buffer/actions/search-posts.action.js +249 -0
  47. package/dist/providers/buffer/actions/search-posts.action.js.map +1 -0
  48. package/dist/providers/buffer/buffer-base.action.d.ts +95 -0
  49. package/dist/providers/buffer/buffer-base.action.d.ts.map +1 -0
  50. package/dist/providers/buffer/buffer-base.action.js +419 -0
  51. package/dist/providers/buffer/buffer-base.action.js.map +1 -0
  52. package/dist/providers/buffer/index.d.ts +3 -0
  53. package/dist/providers/buffer/index.d.ts.map +1 -0
  54. package/dist/providers/buffer/index.js +19 -0
  55. package/dist/providers/buffer/index.js.map +1 -0
  56. package/dist/providers/facebook/actions/boost-post.action.d.ts +45 -0
  57. package/dist/providers/facebook/actions/boost-post.action.d.ts.map +1 -0
  58. package/dist/providers/facebook/actions/boost-post.action.js +340 -0
  59. package/dist/providers/facebook/actions/boost-post.action.js.map +1 -0
  60. package/dist/providers/facebook/actions/create-album.action.d.ts +33 -0
  61. package/dist/providers/facebook/actions/create-album.action.d.ts.map +1 -0
  62. package/dist/providers/facebook/actions/create-album.action.js +285 -0
  63. package/dist/providers/facebook/actions/create-album.action.js.map +1 -0
  64. package/dist/providers/facebook/actions/create-post.action.d.ts +21 -0
  65. package/dist/providers/facebook/actions/create-post.action.d.ts.map +1 -0
  66. package/dist/providers/facebook/actions/create-post.action.js +223 -0
  67. package/dist/providers/facebook/actions/create-post.action.js.map +1 -0
  68. package/dist/providers/facebook/actions/get-page-insights.action.d.ts +37 -0
  69. package/dist/providers/facebook/actions/get-page-insights.action.d.ts.map +1 -0
  70. package/dist/providers/facebook/actions/get-page-insights.action.js +359 -0
  71. package/dist/providers/facebook/actions/get-page-insights.action.js.map +1 -0
  72. package/dist/providers/facebook/actions/get-page-posts.action.d.ts +29 -0
  73. package/dist/providers/facebook/actions/get-page-posts.action.d.ts.map +1 -0
  74. package/dist/providers/facebook/actions/get-page-posts.action.js +216 -0
  75. package/dist/providers/facebook/actions/get-page-posts.action.js.map +1 -0
  76. package/dist/providers/facebook/actions/get-post-insights.action.d.ts +33 -0
  77. package/dist/providers/facebook/actions/get-post-insights.action.d.ts.map +1 -0
  78. package/dist/providers/facebook/actions/get-post-insights.action.js +287 -0
  79. package/dist/providers/facebook/actions/get-post-insights.action.js.map +1 -0
  80. package/dist/providers/facebook/actions/index.d.ts +10 -0
  81. package/dist/providers/facebook/actions/index.d.ts.map +1 -0
  82. package/dist/providers/facebook/actions/index.js +26 -0
  83. package/dist/providers/facebook/actions/index.js.map +1 -0
  84. package/dist/providers/facebook/actions/respond-to-comments.action.d.ts +41 -0
  85. package/dist/providers/facebook/actions/respond-to-comments.action.d.ts.map +1 -0
  86. package/dist/providers/facebook/actions/respond-to-comments.action.js +328 -0
  87. package/dist/providers/facebook/actions/respond-to-comments.action.js.map +1 -0
  88. package/dist/providers/facebook/actions/schedule-post.action.d.ts +29 -0
  89. package/dist/providers/facebook/actions/schedule-post.action.d.ts.map +1 -0
  90. package/dist/providers/facebook/actions/schedule-post.action.js +289 -0
  91. package/dist/providers/facebook/actions/schedule-post.action.js.map +1 -0
  92. package/dist/providers/facebook/actions/search-posts.action.d.ts +54 -0
  93. package/dist/providers/facebook/actions/search-posts.action.d.ts.map +1 -0
  94. package/dist/providers/facebook/actions/search-posts.action.js +396 -0
  95. package/dist/providers/facebook/actions/search-posts.action.js.map +1 -0
  96. package/dist/providers/facebook/facebook-base.action.d.ts +230 -0
  97. package/dist/providers/facebook/facebook-base.action.d.ts.map +1 -0
  98. package/dist/providers/facebook/facebook-base.action.js +566 -0
  99. package/dist/providers/facebook/facebook-base.action.js.map +1 -0
  100. package/dist/providers/facebook/index.d.ts +3 -0
  101. package/dist/providers/facebook/index.d.ts.map +1 -0
  102. package/dist/providers/facebook/index.js +19 -0
  103. package/dist/providers/facebook/index.js.map +1 -0
  104. package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.d.ts +24 -0
  105. package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.d.ts.map +1 -0
  106. package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.js +266 -0
  107. package/dist/providers/hootsuite/actions/bulk-schedule-posts.action.js.map +1 -0
  108. package/dist/providers/hootsuite/actions/create-scheduled-post.action.d.ts +25 -0
  109. package/dist/providers/hootsuite/actions/create-scheduled-post.action.d.ts.map +1 -0
  110. package/dist/providers/hootsuite/actions/create-scheduled-post.action.js +202 -0
  111. package/dist/providers/hootsuite/actions/create-scheduled-post.action.js.map +1 -0
  112. package/dist/providers/hootsuite/actions/delete-scheduled-post.action.d.ts +20 -0
  113. package/dist/providers/hootsuite/actions/delete-scheduled-post.action.d.ts.map +1 -0
  114. package/dist/providers/hootsuite/actions/delete-scheduled-post.action.js +172 -0
  115. package/dist/providers/hootsuite/actions/delete-scheduled-post.action.js.map +1 -0
  116. package/dist/providers/hootsuite/actions/get-analytics.action.d.ts +52 -0
  117. package/dist/providers/hootsuite/actions/get-analytics.action.d.ts.map +1 -0
  118. package/dist/providers/hootsuite/actions/get-analytics.action.js +265 -0
  119. package/dist/providers/hootsuite/actions/get-analytics.action.js.map +1 -0
  120. package/dist/providers/hootsuite/actions/get-scheduled-posts.action.d.ts +37 -0
  121. package/dist/providers/hootsuite/actions/get-scheduled-posts.action.d.ts.map +1 -0
  122. package/dist/providers/hootsuite/actions/get-scheduled-posts.action.js +208 -0
  123. package/dist/providers/hootsuite/actions/get-scheduled-posts.action.js.map +1 -0
  124. package/dist/providers/hootsuite/actions/get-social-profiles.action.d.ts +36 -0
  125. package/dist/providers/hootsuite/actions/get-social-profiles.action.d.ts.map +1 -0
  126. package/dist/providers/hootsuite/actions/get-social-profiles.action.js +212 -0
  127. package/dist/providers/hootsuite/actions/get-social-profiles.action.js.map +1 -0
  128. package/dist/providers/hootsuite/actions/search-posts.action.d.ts +53 -0
  129. package/dist/providers/hootsuite/actions/search-posts.action.d.ts.map +1 -0
  130. package/dist/providers/hootsuite/actions/search-posts.action.js +353 -0
  131. package/dist/providers/hootsuite/actions/search-posts.action.js.map +1 -0
  132. package/dist/providers/hootsuite/actions/update-scheduled-post.action.d.ts +20 -0
  133. package/dist/providers/hootsuite/actions/update-scheduled-post.action.d.ts.map +1 -0
  134. package/dist/providers/hootsuite/actions/update-scheduled-post.action.js +217 -0
  135. package/dist/providers/hootsuite/actions/update-scheduled-post.action.js.map +1 -0
  136. package/dist/providers/hootsuite/hootsuite-base.action.d.ts +101 -0
  137. package/dist/providers/hootsuite/hootsuite-base.action.d.ts.map +1 -0
  138. package/dist/providers/hootsuite/hootsuite-base.action.js +274 -0
  139. package/dist/providers/hootsuite/hootsuite-base.action.js.map +1 -0
  140. package/dist/providers/hootsuite/index.d.ts +10 -0
  141. package/dist/providers/hootsuite/index.d.ts.map +1 -0
  142. package/dist/providers/hootsuite/index.js +28 -0
  143. package/dist/providers/hootsuite/index.js.map +1 -0
  144. package/dist/providers/instagram/actions/create-post.action.d.ts +30 -0
  145. package/dist/providers/instagram/actions/create-post.action.d.ts.map +1 -0
  146. package/dist/providers/instagram/actions/create-post.action.js +269 -0
  147. package/dist/providers/instagram/actions/create-post.action.js.map +1 -0
  148. package/dist/providers/instagram/actions/create-story.action.d.ts +43 -0
  149. package/dist/providers/instagram/actions/create-story.action.d.ts.map +1 -0
  150. package/dist/providers/instagram/actions/create-story.action.js +365 -0
  151. package/dist/providers/instagram/actions/create-story.action.js.map +1 -0
  152. package/dist/providers/instagram/actions/get-account-insights.action.d.ts +50 -0
  153. package/dist/providers/instagram/actions/get-account-insights.action.d.ts.map +1 -0
  154. package/dist/providers/instagram/actions/get-account-insights.action.js +390 -0
  155. package/dist/providers/instagram/actions/get-account-insights.action.js.map +1 -0
  156. package/dist/providers/instagram/actions/get-business-posts.action.d.ts +30 -0
  157. package/dist/providers/instagram/actions/get-business-posts.action.d.ts.map +1 -0
  158. package/dist/providers/instagram/actions/get-business-posts.action.js +246 -0
  159. package/dist/providers/instagram/actions/get-business-posts.action.js.map +1 -0
  160. package/dist/providers/instagram/actions/get-comments.action.d.ts +41 -0
  161. package/dist/providers/instagram/actions/get-comments.action.d.ts.map +1 -0
  162. package/dist/providers/instagram/actions/get-comments.action.js +337 -0
  163. package/dist/providers/instagram/actions/get-comments.action.js.map +1 -0
  164. package/dist/providers/instagram/actions/get-post-insights.action.d.ts +42 -0
  165. package/dist/providers/instagram/actions/get-post-insights.action.d.ts.map +1 -0
  166. package/dist/providers/instagram/actions/get-post-insights.action.js +271 -0
  167. package/dist/providers/instagram/actions/get-post-insights.action.js.map +1 -0
  168. package/dist/providers/instagram/actions/index.d.ts +9 -0
  169. package/dist/providers/instagram/actions/index.d.ts.map +1 -0
  170. package/dist/providers/instagram/actions/index.js +26 -0
  171. package/dist/providers/instagram/actions/index.js.map +1 -0
  172. package/dist/providers/instagram/actions/schedule-post.action.d.ts +34 -0
  173. package/dist/providers/instagram/actions/schedule-post.action.d.ts.map +1 -0
  174. package/dist/providers/instagram/actions/schedule-post.action.js +234 -0
  175. package/dist/providers/instagram/actions/schedule-post.action.js.map +1 -0
  176. package/dist/providers/instagram/actions/search-posts.action.d.ts +56 -0
  177. package/dist/providers/instagram/actions/search-posts.action.d.ts.map +1 -0
  178. package/dist/providers/instagram/actions/search-posts.action.js +479 -0
  179. package/dist/providers/instagram/actions/search-posts.action.js.map +1 -0
  180. package/dist/providers/instagram/index.d.ts +3 -0
  181. package/dist/providers/instagram/index.d.ts.map +1 -0
  182. package/dist/providers/instagram/index.js +20 -0
  183. package/dist/providers/instagram/index.js.map +1 -0
  184. package/dist/providers/instagram/instagram-base.action.d.ts +76 -0
  185. package/dist/providers/instagram/instagram-base.action.d.ts.map +1 -0
  186. package/dist/providers/instagram/instagram-base.action.js +362 -0
  187. package/dist/providers/instagram/instagram-base.action.js.map +1 -0
  188. package/dist/providers/linkedin/actions/create-article.action.d.ts +28 -0
  189. package/dist/providers/linkedin/actions/create-article.action.d.ts.map +1 -0
  190. package/dist/providers/linkedin/actions/create-article.action.js +275 -0
  191. package/dist/providers/linkedin/actions/create-article.action.js.map +1 -0
  192. package/dist/providers/linkedin/actions/create-post.action.d.ts +20 -0
  193. package/dist/providers/linkedin/actions/create-post.action.d.ts.map +1 -0
  194. package/dist/providers/linkedin/actions/create-post.action.js +188 -0
  195. package/dist/providers/linkedin/actions/create-post.action.js.map +1 -0
  196. package/dist/providers/linkedin/actions/get-followers.action.d.ts +29 -0
  197. package/dist/providers/linkedin/actions/get-followers.action.d.ts.map +1 -0
  198. package/dist/providers/linkedin/actions/get-followers.action.js +222 -0
  199. package/dist/providers/linkedin/actions/get-followers.action.js.map +1 -0
  200. package/dist/providers/linkedin/actions/get-organization-posts.action.d.ts +24 -0
  201. package/dist/providers/linkedin/actions/get-organization-posts.action.d.ts.map +1 -0
  202. package/dist/providers/linkedin/actions/get-organization-posts.action.js +163 -0
  203. package/dist/providers/linkedin/actions/get-organization-posts.action.js.map +1 -0
  204. package/dist/providers/linkedin/actions/get-personal-posts.action.d.ts +25 -0
  205. package/dist/providers/linkedin/actions/get-personal-posts.action.d.ts.map +1 -0
  206. package/dist/providers/linkedin/actions/get-personal-posts.action.js +156 -0
  207. package/dist/providers/linkedin/actions/get-personal-posts.action.js.map +1 -0
  208. package/dist/providers/linkedin/actions/get-post-analytics.action.d.ts +28 -0
  209. package/dist/providers/linkedin/actions/get-post-analytics.action.d.ts.map +1 -0
  210. package/dist/providers/linkedin/actions/get-post-analytics.action.js +200 -0
  211. package/dist/providers/linkedin/actions/get-post-analytics.action.js.map +1 -0
  212. package/dist/providers/linkedin/actions/index.d.ts +9 -0
  213. package/dist/providers/linkedin/actions/index.d.ts.map +1 -0
  214. package/dist/providers/linkedin/actions/index.js +25 -0
  215. package/dist/providers/linkedin/actions/index.js.map +1 -0
  216. package/dist/providers/linkedin/actions/schedule-post.action.d.ts +22 -0
  217. package/dist/providers/linkedin/actions/schedule-post.action.d.ts.map +1 -0
  218. package/dist/providers/linkedin/actions/schedule-post.action.js +205 -0
  219. package/dist/providers/linkedin/actions/schedule-post.action.js.map +1 -0
  220. package/dist/providers/linkedin/actions/search-posts.action.d.ts +41 -0
  221. package/dist/providers/linkedin/actions/search-posts.action.d.ts.map +1 -0
  222. package/dist/providers/linkedin/actions/search-posts.action.js +292 -0
  223. package/dist/providers/linkedin/actions/search-posts.action.js.map +1 -0
  224. package/dist/providers/linkedin/index.d.ts +3 -0
  225. package/dist/providers/linkedin/index.d.ts.map +1 -0
  226. package/dist/providers/linkedin/index.js +19 -0
  227. package/dist/providers/linkedin/index.js.map +1 -0
  228. package/dist/providers/linkedin/linkedin-base.action.d.ts +166 -0
  229. package/dist/providers/linkedin/linkedin-base.action.d.ts.map +1 -0
  230. package/dist/providers/linkedin/linkedin-base.action.js +346 -0
  231. package/dist/providers/linkedin/linkedin-base.action.js.map +1 -0
  232. package/dist/providers/tiktok/actions/create-video-post.action.d.ts +21 -0
  233. package/dist/providers/tiktok/actions/create-video-post.action.d.ts.map +1 -0
  234. package/dist/providers/tiktok/actions/create-video-post.action.js +226 -0
  235. package/dist/providers/tiktok/actions/create-video-post.action.js.map +1 -0
  236. package/dist/providers/tiktok/actions/get-account-analytics.action.d.ts +32 -0
  237. package/dist/providers/tiktok/actions/get-account-analytics.action.d.ts.map +1 -0
  238. package/dist/providers/tiktok/actions/get-account-analytics.action.js +242 -0
  239. package/dist/providers/tiktok/actions/get-account-analytics.action.js.map +1 -0
  240. package/dist/providers/tiktok/actions/get-comments.action.d.ts +44 -0
  241. package/dist/providers/tiktok/actions/get-comments.action.d.ts.map +1 -0
  242. package/dist/providers/tiktok/actions/get-comments.action.js +290 -0
  243. package/dist/providers/tiktok/actions/get-comments.action.js.map +1 -0
  244. package/dist/providers/tiktok/actions/get-trending-hashtags.action.d.ts +48 -0
  245. package/dist/providers/tiktok/actions/get-trending-hashtags.action.d.ts.map +1 -0
  246. package/dist/providers/tiktok/actions/get-trending-hashtags.action.js +309 -0
  247. package/dist/providers/tiktok/actions/get-trending-hashtags.action.js.map +1 -0
  248. package/dist/providers/tiktok/actions/get-user-videos.action.d.ts +20 -0
  249. package/dist/providers/tiktok/actions/get-user-videos.action.d.ts.map +1 -0
  250. package/dist/providers/tiktok/actions/get-user-videos.action.js +131 -0
  251. package/dist/providers/tiktok/actions/get-user-videos.action.js.map +1 -0
  252. package/dist/providers/tiktok/actions/get-video-analytics.action.d.ts +28 -0
  253. package/dist/providers/tiktok/actions/get-video-analytics.action.d.ts.map +1 -0
  254. package/dist/providers/tiktok/actions/get-video-analytics.action.js +198 -0
  255. package/dist/providers/tiktok/actions/get-video-analytics.action.js.map +1 -0
  256. package/dist/providers/tiktok/actions/index.d.ts +8 -0
  257. package/dist/providers/tiktok/actions/index.d.ts.map +1 -0
  258. package/dist/providers/tiktok/actions/index.js +25 -0
  259. package/dist/providers/tiktok/actions/index.js.map +1 -0
  260. package/dist/providers/tiktok/actions/search-videos.action.d.ts +89 -0
  261. package/dist/providers/tiktok/actions/search-videos.action.d.ts.map +1 -0
  262. package/dist/providers/tiktok/actions/search-videos.action.js +653 -0
  263. package/dist/providers/tiktok/actions/search-videos.action.js.map +1 -0
  264. package/dist/providers/tiktok/index.d.ts +3 -0
  265. package/dist/providers/tiktok/index.d.ts.map +1 -0
  266. package/dist/providers/tiktok/index.js +20 -0
  267. package/dist/providers/tiktok/index.js.map +1 -0
  268. package/dist/providers/tiktok/tiktok-base.action.d.ts +87 -0
  269. package/dist/providers/tiktok/tiktok-base.action.d.ts.map +1 -0
  270. package/dist/providers/tiktok/tiktok-base.action.js +294 -0
  271. package/dist/providers/tiktok/tiktok-base.action.js.map +1 -0
  272. package/dist/providers/twitter/actions/create-thread.action.d.ts +28 -0
  273. package/dist/providers/twitter/actions/create-thread.action.d.ts.map +1 -0
  274. package/dist/providers/twitter/actions/create-thread.action.js +217 -0
  275. package/dist/providers/twitter/actions/create-thread.action.js.map +1 -0
  276. package/dist/providers/twitter/actions/create-tweet.action.d.ts +24 -0
  277. package/dist/providers/twitter/actions/create-tweet.action.d.ts.map +1 -0
  278. package/dist/providers/twitter/actions/create-tweet.action.js +199 -0
  279. package/dist/providers/twitter/actions/create-tweet.action.js.map +1 -0
  280. package/dist/providers/twitter/actions/delete-tweet.action.d.ts +24 -0
  281. package/dist/providers/twitter/actions/delete-tweet.action.d.ts.map +1 -0
  282. package/dist/providers/twitter/actions/delete-tweet.action.js +158 -0
  283. package/dist/providers/twitter/actions/delete-tweet.action.js.map +1 -0
  284. package/dist/providers/twitter/actions/get-analytics.action.d.ts +44 -0
  285. package/dist/providers/twitter/actions/get-analytics.action.d.ts.map +1 -0
  286. package/dist/providers/twitter/actions/get-analytics.action.js +399 -0
  287. package/dist/providers/twitter/actions/get-analytics.action.js.map +1 -0
  288. package/dist/providers/twitter/actions/get-mentions.action.d.ts +24 -0
  289. package/dist/providers/twitter/actions/get-mentions.action.d.ts.map +1 -0
  290. package/dist/providers/twitter/actions/get-mentions.action.js +229 -0
  291. package/dist/providers/twitter/actions/get-mentions.action.js.map +1 -0
  292. package/dist/providers/twitter/actions/get-timeline.action.d.ts +24 -0
  293. package/dist/providers/twitter/actions/get-timeline.action.d.ts.map +1 -0
  294. package/dist/providers/twitter/actions/get-timeline.action.js +249 -0
  295. package/dist/providers/twitter/actions/get-timeline.action.js.map +1 -0
  296. package/dist/providers/twitter/actions/index.d.ts +14 -0
  297. package/dist/providers/twitter/actions/index.d.ts.map +1 -0
  298. package/dist/providers/twitter/actions/index.js +30 -0
  299. package/dist/providers/twitter/actions/index.js.map +1 -0
  300. package/dist/providers/twitter/actions/schedule-tweet.action.d.ts +30 -0
  301. package/dist/providers/twitter/actions/schedule-tweet.action.d.ts.map +1 -0
  302. package/dist/providers/twitter/actions/schedule-tweet.action.js +250 -0
  303. package/dist/providers/twitter/actions/schedule-tweet.action.js.map +1 -0
  304. package/dist/providers/twitter/actions/search-tweets.action.d.ts +41 -0
  305. package/dist/providers/twitter/actions/search-tweets.action.d.ts.map +1 -0
  306. package/dist/providers/twitter/actions/search-tweets.action.js +559 -0
  307. package/dist/providers/twitter/actions/search-tweets.action.js.map +1 -0
  308. package/dist/providers/twitter/index.d.ts +8 -0
  309. package/dist/providers/twitter/index.d.ts.map +1 -0
  310. package/dist/providers/twitter/index.js +24 -0
  311. package/dist/providers/twitter/index.js.map +1 -0
  312. package/dist/providers/twitter/twitter-base.action.d.ts +185 -0
  313. package/dist/providers/twitter/twitter-base.action.d.ts.map +1 -0
  314. package/dist/providers/twitter/twitter-base.action.js +484 -0
  315. package/dist/providers/twitter/twitter-base.action.js.map +1 -0
  316. package/dist/providers/youtube/actions/create-playlist.action.d.ts +28 -0
  317. package/dist/providers/youtube/actions/create-playlist.action.d.ts.map +1 -0
  318. package/dist/providers/youtube/actions/create-playlist.action.js +235 -0
  319. package/dist/providers/youtube/actions/create-playlist.action.js.map +1 -0
  320. package/dist/providers/youtube/actions/get-channel-analytics.action.d.ts +60 -0
  321. package/dist/providers/youtube/actions/get-channel-analytics.action.d.ts.map +1 -0
  322. package/dist/providers/youtube/actions/get-channel-analytics.action.js +429 -0
  323. package/dist/providers/youtube/actions/get-channel-analytics.action.js.map +1 -0
  324. package/dist/providers/youtube/actions/get-channel-videos.action.d.ts +28 -0
  325. package/dist/providers/youtube/actions/get-channel-videos.action.d.ts.map +1 -0
  326. package/dist/providers/youtube/actions/get-channel-videos.action.js +263 -0
  327. package/dist/providers/youtube/actions/get-channel-videos.action.js.map +1 -0
  328. package/dist/providers/youtube/actions/get-comments.action.d.ts +40 -0
  329. package/dist/providers/youtube/actions/get-comments.action.d.ts.map +1 -0
  330. package/dist/providers/youtube/actions/get-comments.action.js +381 -0
  331. package/dist/providers/youtube/actions/get-comments.action.js.map +1 -0
  332. package/dist/providers/youtube/actions/get-video-analytics.action.d.ts +48 -0
  333. package/dist/providers/youtube/actions/get-video-analytics.action.d.ts.map +1 -0
  334. package/dist/providers/youtube/actions/get-video-analytics.action.js +280 -0
  335. package/dist/providers/youtube/actions/get-video-analytics.action.js.map +1 -0
  336. package/dist/providers/youtube/actions/index.d.ts +10 -0
  337. package/dist/providers/youtube/actions/index.d.ts.map +1 -0
  338. package/dist/providers/youtube/actions/index.js +26 -0
  339. package/dist/providers/youtube/actions/index.js.map +1 -0
  340. package/dist/providers/youtube/actions/schedule-video.action.d.ts +24 -0
  341. package/dist/providers/youtube/actions/schedule-video.action.d.ts.map +1 -0
  342. package/dist/providers/youtube/actions/schedule-video.action.js +225 -0
  343. package/dist/providers/youtube/actions/schedule-video.action.js.map +1 -0
  344. package/dist/providers/youtube/actions/search-videos.action.d.ts +40 -0
  345. package/dist/providers/youtube/actions/search-videos.action.d.ts.map +1 -0
  346. package/dist/providers/youtube/actions/search-videos.action.js +483 -0
  347. package/dist/providers/youtube/actions/search-videos.action.js.map +1 -0
  348. package/dist/providers/youtube/actions/update-video-metadata.action.d.ts +32 -0
  349. package/dist/providers/youtube/actions/update-video-metadata.action.d.ts.map +1 -0
  350. package/dist/providers/youtube/actions/update-video-metadata.action.js +298 -0
  351. package/dist/providers/youtube/actions/update-video-metadata.action.js.map +1 -0
  352. package/dist/providers/youtube/actions/upload-video.action.d.ts +28 -0
  353. package/dist/providers/youtube/actions/upload-video.action.d.ts.map +1 -0
  354. package/dist/providers/youtube/actions/upload-video.action.js +266 -0
  355. package/dist/providers/youtube/actions/upload-video.action.js.map +1 -0
  356. package/dist/providers/youtube/index.d.ts +3 -0
  357. package/dist/providers/youtube/index.d.ts.map +1 -0
  358. package/dist/providers/youtube/index.js +19 -0
  359. package/dist/providers/youtube/index.js.map +1 -0
  360. package/dist/providers/youtube/youtube-base.action.d.ts +83 -0
  361. package/dist/providers/youtube/youtube-base.action.d.ts.map +1 -0
  362. package/dist/providers/youtube/youtube-base.action.js +319 -0
  363. package/dist/providers/youtube/youtube-base.action.js.map +1 -0
  364. package/package.json +42 -0
  365. package/social_actions_summary.md +439 -0
  366. package/src/base/base-social.action.ts +270 -0
  367. package/src/index.ts +26 -0
  368. package/src/providers/buffer/actions/create-post.action.ts +205 -0
  369. package/src/providers/buffer/actions/delete-post.action.ts +116 -0
  370. package/src/providers/buffer/actions/get-analytics.action.ts +146 -0
  371. package/src/providers/buffer/actions/get-pending-posts.action.ts +161 -0
  372. package/src/providers/buffer/actions/get-profiles.action.ts +126 -0
  373. package/src/providers/buffer/actions/get-sent-posts.action.ts +189 -0
  374. package/src/providers/buffer/actions/index.ts +8 -0
  375. package/src/providers/buffer/actions/reorder-queue.action.ts +141 -0
  376. package/src/providers/buffer/actions/search-posts.action.ts +262 -0
  377. package/src/providers/buffer/buffer-base.action.ts +490 -0
  378. package/src/providers/buffer/index.ts +2 -0
  379. package/src/providers/facebook/actions/boost-post.action.ts +412 -0
  380. package/src/providers/facebook/actions/create-album.action.ts +335 -0
  381. package/src/providers/facebook/actions/create-post.action.ts +243 -0
  382. package/src/providers/facebook/actions/get-page-insights.action.ts +427 -0
  383. package/src/providers/facebook/actions/get-page-posts.action.ts +241 -0
  384. package/src/providers/facebook/actions/get-post-insights.action.ts +338 -0
  385. package/src/providers/facebook/actions/index.ts +9 -0
  386. package/src/providers/facebook/actions/respond-to-comments.action.ts +372 -0
  387. package/src/providers/facebook/actions/schedule-post.action.ts +310 -0
  388. package/src/providers/facebook/actions/search-posts.action.ts +449 -0
  389. package/src/providers/facebook/facebook-base.action.ts +750 -0
  390. package/src/providers/facebook/index.ts +2 -0
  391. package/src/providers/hootsuite/actions/bulk-schedule-posts.action.ts +293 -0
  392. package/src/providers/hootsuite/actions/create-scheduled-post.action.ts +206 -0
  393. package/src/providers/hootsuite/actions/delete-scheduled-post.action.ts +173 -0
  394. package/src/providers/hootsuite/actions/get-analytics.action.ts +281 -0
  395. package/src/providers/hootsuite/actions/get-scheduled-posts.action.ts +220 -0
  396. package/src/providers/hootsuite/actions/get-social-profiles.action.ts +220 -0
  397. package/src/providers/hootsuite/actions/search-posts.action.ts +395 -0
  398. package/src/providers/hootsuite/actions/update-scheduled-post.action.ts +222 -0
  399. package/src/providers/hootsuite/hootsuite-base.action.ts +346 -0
  400. package/src/providers/hootsuite/index.ts +12 -0
  401. package/src/providers/instagram/README.md +129 -0
  402. package/src/providers/instagram/actions/create-post.action.ts +329 -0
  403. package/src/providers/instagram/actions/create-story.action.ts +415 -0
  404. package/src/providers/instagram/actions/get-account-insights.action.ts +449 -0
  405. package/src/providers/instagram/actions/get-business-posts.action.ts +281 -0
  406. package/src/providers/instagram/actions/get-comments.action.ts +395 -0
  407. package/src/providers/instagram/actions/get-post-insights.action.ts +302 -0
  408. package/src/providers/instagram/actions/index.ts +9 -0
  409. package/src/providers/instagram/actions/schedule-post.action.ts +248 -0
  410. package/src/providers/instagram/actions/search-posts.action.ts +569 -0
  411. package/src/providers/instagram/index.ts +3 -0
  412. package/src/providers/instagram/instagram-base.action.ts +430 -0
  413. package/src/providers/linkedin/actions/create-article.action.ts +301 -0
  414. package/src/providers/linkedin/actions/create-post.action.ts +190 -0
  415. package/src/providers/linkedin/actions/get-followers.action.ts +226 -0
  416. package/src/providers/linkedin/actions/get-organization-posts.action.ts +164 -0
  417. package/src/providers/linkedin/actions/get-personal-posts.action.ts +158 -0
  418. package/src/providers/linkedin/actions/get-post-analytics.action.ts +205 -0
  419. package/src/providers/linkedin/actions/index.ts +8 -0
  420. package/src/providers/linkedin/actions/schedule-post.action.ts +206 -0
  421. package/src/providers/linkedin/actions/search-posts.action.ts +323 -0
  422. package/src/providers/linkedin/index.ts +2 -0
  423. package/src/providers/linkedin/linkedin-base.action.ts +481 -0
  424. package/src/providers/tiktok/actions/create-video-post.action.ts +234 -0
  425. package/src/providers/tiktok/actions/get-account-analytics.action.ts +255 -0
  426. package/src/providers/tiktok/actions/get-comments.action.ts +332 -0
  427. package/src/providers/tiktok/actions/get-trending-hashtags.action.ts +341 -0
  428. package/src/providers/tiktok/actions/get-user-videos.action.ts +136 -0
  429. package/src/providers/tiktok/actions/get-video-analytics.action.ts +218 -0
  430. package/src/providers/tiktok/actions/index.ts +8 -0
  431. package/src/providers/tiktok/actions/search-videos.action.ts +717 -0
  432. package/src/providers/tiktok/index.ts +3 -0
  433. package/src/providers/tiktok/tiktok-base.action.ts +356 -0
  434. package/src/providers/twitter/README.md +207 -0
  435. package/src/providers/twitter/actions/create-thread.action.ts +227 -0
  436. package/src/providers/twitter/actions/create-tweet.action.ts +204 -0
  437. package/src/providers/twitter/actions/delete-tweet.action.ts +153 -0
  438. package/src/providers/twitter/actions/get-analytics.action.ts +440 -0
  439. package/src/providers/twitter/actions/get-mentions.action.ts +233 -0
  440. package/src/providers/twitter/actions/get-timeline.action.ts +248 -0
  441. package/src/providers/twitter/actions/index.ts +14 -0
  442. package/src/providers/twitter/actions/schedule-tweet.action.ts +259 -0
  443. package/src/providers/twitter/actions/search-tweets.action.ts +588 -0
  444. package/src/providers/twitter/index.ts +8 -0
  445. package/src/providers/twitter/twitter-base.action.ts +629 -0
  446. package/src/providers/youtube/actions/create-playlist.action.ts +256 -0
  447. package/src/providers/youtube/actions/get-channel-analytics.action.ts +502 -0
  448. package/src/providers/youtube/actions/get-channel-videos.action.ts +286 -0
  449. package/src/providers/youtube/actions/get-comments.action.ts +411 -0
  450. package/src/providers/youtube/actions/get-video-analytics.action.ts +298 -0
  451. package/src/providers/youtube/actions/index.ts +9 -0
  452. package/src/providers/youtube/actions/schedule-video.action.ts +246 -0
  453. package/src/providers/youtube/actions/search-videos.action.ts +530 -0
  454. package/src/providers/youtube/actions/update-video-metadata.action.ts +321 -0
  455. package/src/providers/youtube/actions/upload-video.action.ts +288 -0
  456. package/src/providers/youtube/index.ts +2 -0
  457. package/src/providers/youtube/youtube-base.action.ts +373 -0
  458. package/tsconfig.json +18 -0
@@ -0,0 +1,2 @@
1
+ export * from './facebook-base.action';
2
+ export * from './actions';
@@ -0,0 +1,293 @@
1
+ import { RegisterClass } from '@memberjunction/global';
2
+ import { HootSuiteBaseAction, HootSuitePost } from '../hootsuite-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
+ * Interface for bulk post data
9
+ */
10
+ interface BulkPostData {
11
+ content: string;
12
+ scheduledTime?: string;
13
+ profileIds?: string[];
14
+ mediaFiles?: MediaFile[];
15
+ tags?: string[];
16
+ location?: { latitude: number; longitude: number; };
17
+ }
18
+
19
+ /**
20
+ * Action to bulk schedule multiple posts in HootSuite
21
+ */
22
+ @RegisterClass(HootSuiteBaseAction, 'HootSuiteBulkSchedulePostsAction')
23
+ export class HootSuiteBulkSchedulePostsAction extends HootSuiteBaseAction {
24
+ /**
25
+ * Bulk schedule posts in HootSuite
26
+ */
27
+ protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
28
+ const { Params, ContextUser } = params;
29
+
30
+ try {
31
+ // Initialize OAuth
32
+ const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
33
+ if (!await this.initializeOAuth(companyIntegrationId)) {
34
+ throw new Error('Failed to initialize OAuth connection');
35
+ }
36
+
37
+ // Extract parameters
38
+ const posts = this.getParamValue(Params, 'Posts') as BulkPostData[];
39
+ const defaultProfileIds = this.getParamValue(Params, 'DefaultProfileIDs');
40
+ const scheduleInterval = this.getParamValue(Params, 'ScheduleInterval');
41
+ const startTime = this.getParamValue(Params, 'StartTime');
42
+ const skipOnError = this.getParamValue(Params, 'SkipOnError') || true;
43
+ const validateOnly = this.getParamValue(Params, 'ValidateOnly') || false;
44
+
45
+ // Validate required parameters
46
+ if (!posts || !Array.isArray(posts) || posts.length === 0) {
47
+ throw new Error('Posts array is required and must not be empty');
48
+ }
49
+
50
+ // Get default profiles if not specified
51
+ let defaultProfiles: string[] = [];
52
+ if (defaultProfileIds && Array.isArray(defaultProfileIds)) {
53
+ defaultProfiles = defaultProfileIds;
54
+ } else if (defaultProfileIds && typeof defaultProfileIds === 'string') {
55
+ defaultProfiles = [defaultProfileIds];
56
+ } else {
57
+ // Get all available profiles as default
58
+ const profiles = await this.getSocialProfiles();
59
+ if (profiles.length === 0) {
60
+ throw new Error('No social profiles found. Please specify DefaultProfileIDs.');
61
+ }
62
+ defaultProfiles = profiles.map(p => p.id);
63
+ LogStatus(`Using ${defaultProfiles.length} default profiles`);
64
+ }
65
+
66
+ // Calculate schedule times if interval is specified
67
+ let baseScheduleTime: Date | null = null;
68
+ if (scheduleInterval && startTime) {
69
+ baseScheduleTime = new Date(startTime);
70
+ }
71
+
72
+ // Process posts
73
+ const results: any[] = [];
74
+ const errors: any[] = [];
75
+ let successCount = 0;
76
+ let failureCount = 0;
77
+
78
+ LogStatus(`Processing ${posts.length} posts for bulk scheduling...`);
79
+
80
+ for (let i = 0; i < posts.length; i++) {
81
+ const post = posts[i];
82
+ const postIndex = i + 1;
83
+
84
+ try {
85
+ // Validate post data
86
+ this.validateBulkPost(post, postIndex);
87
+
88
+ // Calculate scheduled time for this post
89
+ let scheduledTime = post.scheduledTime;
90
+ if (!scheduledTime && baseScheduleTime && scheduleInterval) {
91
+ const offsetMinutes = i * scheduleInterval;
92
+ const postScheduleTime = new Date(baseScheduleTime);
93
+ postScheduleTime.setMinutes(postScheduleTime.getMinutes() + offsetMinutes);
94
+ scheduledTime = postScheduleTime.toISOString();
95
+ }
96
+
97
+ // Prepare profile IDs
98
+ const profileIds = post.profileIds || defaultProfiles;
99
+
100
+ // If validate only, just check the data
101
+ if (validateOnly) {
102
+ results.push({
103
+ index: postIndex,
104
+ status: 'VALIDATED',
105
+ content: post.content.substring(0, 50) + '...',
106
+ scheduledTime: scheduledTime,
107
+ profileCount: profileIds.length
108
+ });
109
+ successCount++;
110
+ continue;
111
+ }
112
+
113
+ // Upload media if provided
114
+ let mediaIds: string[] = [];
115
+ if (post.mediaFiles && Array.isArray(post.mediaFiles)) {
116
+ LogStatus(`Uploading ${post.mediaFiles.length} media files for post ${postIndex}...`);
117
+ mediaIds = await this.uploadMedia(post.mediaFiles);
118
+ }
119
+
120
+ // Create the post
121
+ const postData: any = {
122
+ text: post.content,
123
+ socialProfileIds: profileIds,
124
+ scheduledTime: scheduledTime ? this.formatHootSuiteDate(scheduledTime) : undefined,
125
+ mediaIds: mediaIds.length > 0 ? mediaIds : undefined,
126
+ tags: post.tags,
127
+ location: post.location
128
+ };
129
+
130
+ const response = await this.axiosInstance.post('/messages', postData);
131
+ const createdPost = response.data;
132
+
133
+ results.push({
134
+ index: postIndex,
135
+ status: 'SUCCESS',
136
+ postId: createdPost.id,
137
+ content: post.content.substring(0, 50) + '...',
138
+ scheduledTime: createdPost.scheduledTime,
139
+ profileCount: profileIds.length
140
+ });
141
+ successCount++;
142
+
143
+ } catch (error) {
144
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
145
+
146
+ errors.push({
147
+ index: postIndex,
148
+ content: post.content.substring(0, 50) + '...',
149
+ error: errorMessage
150
+ });
151
+ failureCount++;
152
+
153
+ if (!skipOnError) {
154
+ throw new Error(`Failed at post ${postIndex}: ${errorMessage}`);
155
+ }
156
+ }
157
+
158
+ // Log progress every 10 posts
159
+ if (i > 0 && (i + 1) % 10 === 0) {
160
+ LogStatus(`Processed ${i + 1}/${posts.length} posts...`);
161
+ }
162
+ }
163
+
164
+ // Create summary
165
+ const summary = {
166
+ totalPosts: posts.length,
167
+ successCount: successCount,
168
+ failureCount: failureCount,
169
+ validationOnly: validateOnly,
170
+ processingTime: new Date().toISOString(),
171
+ scheduleRange: baseScheduleTime ? {
172
+ start: baseScheduleTime.toISOString(),
173
+ end: new Date(baseScheduleTime.getTime() + (posts.length - 1) * (scheduleInterval || 0) * 60000).toISOString()
174
+ } : null
175
+ };
176
+
177
+ // Update output parameters
178
+ const outputParams = [...Params];
179
+ const resultsParam = outputParams.find(p => p.Name === 'Results');
180
+ if (resultsParam) resultsParam.Value = results;
181
+ const errorsParam = outputParams.find(p => p.Name === 'Errors');
182
+ if (errorsParam) errorsParam.Value = errors;
183
+ const summaryParam = outputParams.find(p => p.Name === 'Summary');
184
+ if (summaryParam) summaryParam.Value = summary;
185
+
186
+ const resultCode = failureCount === 0 ? 'SUCCESS' : (successCount > 0 ? 'PARTIAL_SUCCESS' : 'FAILED');
187
+ const message = validateOnly
188
+ ? `Validated ${successCount} posts, ${failureCount} failed validation`
189
+ : `Successfully scheduled ${successCount} posts, ${failureCount} failed`;
190
+
191
+ return {
192
+ Success: failureCount === 0 || (skipOnError && successCount > 0),
193
+ ResultCode: resultCode,
194
+ Message: message,
195
+ Params: outputParams
196
+ };
197
+
198
+ } catch (error) {
199
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
200
+
201
+ return {
202
+ Success: false,
203
+ ResultCode: 'ERROR',
204
+ Message: `Failed to bulk schedule posts: ${errorMessage}`,
205
+ Params
206
+ };
207
+ }
208
+ }
209
+
210
+ /**
211
+ * Validate bulk post data
212
+ */
213
+ private validateBulkPost(post: BulkPostData, index: number): void {
214
+ if (!post.content || typeof post.content !== 'string' || post.content.trim().length === 0) {
215
+ throw new Error(`Post ${index}: Content is required and must not be empty`);
216
+ }
217
+
218
+ if (post.content.length > 10000) {
219
+ throw new Error(`Post ${index}: Content exceeds maximum length of 10000 characters`);
220
+ }
221
+
222
+ if (post.scheduledTime && isNaN(Date.parse(post.scheduledTime))) {
223
+ throw new Error(`Post ${index}: Invalid scheduled time format`);
224
+ }
225
+
226
+ if (post.location) {
227
+ if (typeof post.location.latitude !== 'number' || typeof post.location.longitude !== 'number') {
228
+ throw new Error(`Post ${index}: Location must have numeric latitude and longitude`);
229
+ }
230
+ }
231
+ }
232
+
233
+ /**
234
+ * Define the parameters this action expects
235
+ */
236
+ public get Params(): ActionParam[] {
237
+ return [
238
+ ...this.oauthParams,
239
+ {
240
+ Name: 'Posts',
241
+ Type: 'Input',
242
+ Value: null
243
+ },
244
+ {
245
+ Name: 'DefaultProfileIDs',
246
+ Type: 'Input',
247
+ Value: null
248
+ },
249
+ {
250
+ Name: 'ScheduleInterval',
251
+ Type: 'Input',
252
+ Value: null
253
+ },
254
+ {
255
+ Name: 'StartTime',
256
+ Type: 'Input',
257
+ Value: null
258
+ },
259
+ {
260
+ Name: 'SkipOnError',
261
+ Type: 'Input',
262
+ Value: null
263
+ },
264
+ {
265
+ Name: 'ValidateOnly',
266
+ Type: 'Input',
267
+ Value: null
268
+ },
269
+ {
270
+ Name: 'Results',
271
+ Type: 'Output',
272
+ Value: null
273
+ },
274
+ {
275
+ Name: 'Errors',
276
+ Type: 'Output',
277
+ Value: null
278
+ },
279
+ {
280
+ Name: 'Summary',
281
+ Type: 'Output',
282
+ Value: null
283
+ }
284
+ ];
285
+ }
286
+
287
+ /**
288
+ * Get action description
289
+ */
290
+ public get Description(): string {
291
+ return 'Bulk schedules multiple posts to HootSuite with support for auto-scheduling intervals and validation';
292
+ }
293
+ }
@@ -0,0 +1,206 @@
1
+ import { RegisterClass } from '@memberjunction/global';
2
+ import { HootSuiteBaseAction } from '../hootsuite-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 scheduled post in HootSuite
9
+ */
10
+ @RegisterClass(HootSuiteBaseAction, 'HootSuiteCreateScheduledPostAction')
11
+ export class HootSuiteCreateScheduledPostAction extends HootSuiteBaseAction {
12
+ /**
13
+ * Create a scheduled post in HootSuite
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 profileIds = this.getParamValue(Params, 'ProfileIDs');
28
+ const scheduledTime = this.getParamValue(Params, 'ScheduledTime');
29
+ const mediaFiles = this.getParamValue(Params, 'MediaFiles');
30
+ const tags = this.getParamValue(Params, 'Tags');
31
+ const location = this.getParamValue(Params, 'Location');
32
+ const targetingOptions = this.getParamValue(Params, 'TargetingOptions');
33
+
34
+ // Validate required parameters
35
+ if (!content) {
36
+ throw new Error('Content is required');
37
+ }
38
+
39
+ // Get profile IDs - either from parameter or default profiles
40
+ let socialProfileIds: string[] = [];
41
+ if (profileIds && Array.isArray(profileIds)) {
42
+ socialProfileIds = profileIds;
43
+ } else if (profileIds && typeof profileIds === 'string') {
44
+ socialProfileIds = [profileIds];
45
+ } else {
46
+ // Get default profiles if none specified
47
+ const profiles = await this.getSocialProfiles();
48
+ if (profiles.length === 0) {
49
+ throw new Error('No social profiles found. Please specify ProfileIDs.');
50
+ }
51
+ socialProfileIds = profiles.map(p => p.id);
52
+ LogStatus(`Using ${socialProfileIds.length} default profiles`);
53
+ }
54
+
55
+ // Upload media if provided
56
+ let mediaIds: string[] = [];
57
+ if (mediaFiles && Array.isArray(mediaFiles)) {
58
+ LogStatus(`Uploading ${mediaFiles.length} media files...`);
59
+ mediaIds = await this.uploadMedia(mediaFiles as MediaFile[]);
60
+ }
61
+
62
+ // Build post data
63
+ const postData: any = {
64
+ text: content,
65
+ socialProfileIds: socialProfileIds,
66
+ scheduledTime: scheduledTime ? this.formatHootSuiteDate(scheduledTime) : undefined,
67
+ mediaIds: mediaIds.length > 0 ? mediaIds : undefined,
68
+ tags: tags && Array.isArray(tags) ? tags : undefined,
69
+ location: location ? {
70
+ latitude: location.latitude,
71
+ longitude: location.longitude
72
+ } : undefined
73
+ };
74
+
75
+ // Add targeting options if provided
76
+ if (targetingOptions) {
77
+ postData.targeting = targetingOptions;
78
+ }
79
+
80
+ // Create the post
81
+ LogStatus('Creating scheduled post...');
82
+ const response = await this.axiosInstance.post('/messages', postData);
83
+ const createdPost = response.data;
84
+
85
+ // Normalize the created post
86
+ const normalizedPost = this.normalizePost(createdPost);
87
+
88
+ // Update output parameters
89
+ const outputParams = [...Params];
90
+ const postParam = outputParams.find(p => p.Name === 'CreatedPost');
91
+ if (postParam) postParam.Value = normalizedPost;
92
+ const postIdParam = outputParams.find(p => p.Name === 'PostID');
93
+ if (postIdParam) postIdParam.Value = createdPost.id;
94
+
95
+ return {
96
+ Success: true,
97
+ ResultCode: 'SUCCESS',
98
+ Message: `Successfully created scheduled post (ID: ${createdPost.id})`,
99
+ Params: outputParams
100
+ };
101
+
102
+ } catch (error) {
103
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
104
+
105
+ return {
106
+ Success: false,
107
+ ResultCode: 'ERROR',
108
+ Message: `Failed to create scheduled post: ${errorMessage}`,
109
+ Params
110
+ };
111
+ }
112
+ }
113
+
114
+ /**
115
+ * Validate media files before upload
116
+ */
117
+ protected validateMediaFile(file: MediaFile): void {
118
+ // HootSuite-specific media limits
119
+ const supportedTypes = [
120
+ 'image/jpeg',
121
+ 'image/png',
122
+ 'image/gif',
123
+ 'video/mp4',
124
+ 'video/quicktime'
125
+ ];
126
+
127
+ if (!supportedTypes.includes(file.mimeType)) {
128
+ throw new Error(`Unsupported media type: ${file.mimeType}. Supported types: ${supportedTypes.join(', ')}`);
129
+ }
130
+
131
+ // Check file sizes
132
+ const maxSizes: Record<string, number> = {
133
+ 'image/jpeg': 10 * 1024 * 1024, // 10MB
134
+ 'image/png': 10 * 1024 * 1024, // 10MB
135
+ 'image/gif': 15 * 1024 * 1024, // 15MB
136
+ 'video/mp4': 500 * 1024 * 1024, // 500MB
137
+ 'video/quicktime': 500 * 1024 * 1024 // 500MB
138
+ };
139
+
140
+ const maxSize = maxSizes[file.mimeType];
141
+ if (file.size > maxSize) {
142
+ throw new Error(`File size exceeds limit for ${file.mimeType}. Max: ${maxSize / 1024 / 1024}MB, Got: ${file.size / 1024 / 1024}MB`);
143
+ }
144
+ }
145
+
146
+ /**
147
+ * Define the parameters this action expects
148
+ */
149
+ public get Params(): ActionParam[] {
150
+ return [
151
+ ...this.commonSocialParams,
152
+ {
153
+ Name: 'Content',
154
+ Type: 'Input',
155
+ Value: null
156
+ },
157
+ {
158
+ Name: 'ProfileIDs',
159
+ Type: 'Input',
160
+ Value: null
161
+ },
162
+ {
163
+ Name: 'ScheduledTime',
164
+ Type: 'Input',
165
+ Value: null
166
+ },
167
+ {
168
+ Name: 'MediaFiles',
169
+ Type: 'Input',
170
+ Value: null
171
+ },
172
+ {
173
+ Name: 'Tags',
174
+ Type: 'Input',
175
+ Value: null
176
+ },
177
+ {
178
+ Name: 'Location',
179
+ Type: 'Input',
180
+ Value: null
181
+ },
182
+ {
183
+ Name: 'TargetingOptions',
184
+ Type: 'Input',
185
+ Value: null
186
+ },
187
+ {
188
+ Name: 'CreatedPost',
189
+ Type: 'Output',
190
+ Value: null
191
+ },
192
+ {
193
+ Name: 'PostID',
194
+ Type: 'Output',
195
+ Value: null
196
+ }
197
+ ];
198
+ }
199
+
200
+ /**
201
+ * Get action description
202
+ */
203
+ public get Description(): string {
204
+ return 'Creates a scheduled post in HootSuite with support for multiple social profiles, media attachments, and scheduling';
205
+ }
206
+ }
@@ -0,0 +1,173 @@
1
+ import { RegisterClass } from '@memberjunction/global';
2
+ import { HootSuiteBaseAction } from '../hootsuite-base.action';
3
+ import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
4
+ import { LogStatus, LogError } from '@memberjunction/core';
5
+ /**
6
+ * Action to delete a scheduled post from HootSuite
7
+ */
8
+ @RegisterClass(HootSuiteBaseAction, 'HootSuiteDeleteScheduledPostAction')
9
+ export class HootSuiteDeleteScheduledPostAction extends HootSuiteBaseAction {
10
+ /**
11
+ * Delete a scheduled post from HootSuite
12
+ */
13
+ protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
14
+ const { Params, ContextUser } = params;
15
+
16
+ try {
17
+ // Initialize OAuth
18
+ const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
19
+ if (!await this.initializeOAuth(companyIntegrationId)) {
20
+ throw new Error('Failed to initialize OAuth connection');
21
+ }
22
+
23
+ // Extract parameters
24
+ const postId = this.getParamValue(Params, 'PostID');
25
+ const confirmDeletion = this.getParamValue(Params, 'ConfirmDeletion') || false;
26
+
27
+ // Validate required parameters
28
+ if (!postId) {
29
+ throw new Error('PostID is required');
30
+ }
31
+
32
+ // Safety check - require confirmation
33
+ if (!confirmDeletion) {
34
+ return {
35
+ Success: false,
36
+ ResultCode: 'CONFIRMATION_REQUIRED',
37
+ Message: 'Deletion not confirmed. Set ConfirmDeletion to true to proceed.',
38
+ Params
39
+ };
40
+ }
41
+
42
+ // First, get the post details to verify it exists and can be deleted
43
+ LogStatus(`Fetching post ${postId} details...`);
44
+ let postDetails: any;
45
+
46
+ try {
47
+ const response = await this.axiosInstance.get(`/messages/${postId}`);
48
+ postDetails = response.data;
49
+ } catch (error: any) {
50
+ if (error.response?.status === 404) {
51
+ return {
52
+ Success: false,
53
+ ResultCode: 'POST_NOT_FOUND',
54
+ Message: `Post with ID ${postId} not found`,
55
+ Params
56
+ };
57
+ }
58
+ throw error;
59
+ }
60
+
61
+ // Check if post can be deleted
62
+ if (postDetails.state === 'PUBLISHED') {
63
+ return {
64
+ Success: false,
65
+ ResultCode: 'CANNOT_DELETE_PUBLISHED',
66
+ Message: 'Cannot delete published posts. Only scheduled, draft, or failed posts can be deleted.',
67
+ Params
68
+ };
69
+ }
70
+
71
+ // Store post details before deletion
72
+ const deletedPostInfo = {
73
+ id: postDetails.id,
74
+ content: postDetails.text,
75
+ state: postDetails.state,
76
+ scheduledTime: postDetails.scheduledTime,
77
+ profiles: postDetails.socialProfileIds,
78
+ mediaCount: postDetails.mediaIds?.length || 0,
79
+ tags: postDetails.tags || [],
80
+ deletedAt: new Date().toISOString()
81
+ };
82
+
83
+ // Delete the post
84
+ LogStatus(`Deleting post ${postId}...`);
85
+ await this.axiosInstance.delete(`/messages/${postId}`);
86
+
87
+ // Verify deletion by trying to fetch the post again
88
+ let verificationFailed = false;
89
+ try {
90
+ await this.axiosInstance.get(`/messages/${postId}`);
91
+ verificationFailed = true;
92
+ } catch (error: any) {
93
+ if (error.response?.status !== 404) {
94
+ verificationFailed = true;
95
+ }
96
+ }
97
+
98
+ if (verificationFailed) {
99
+ LogStatus('Warning: Post deletion could not be verified');
100
+ }
101
+
102
+ // Update output parameters
103
+ const outputParams = [...Params];
104
+ const deletedPostParam = outputParams.find(p => p.Name === 'DeletedPostInfo');
105
+ if (deletedPostParam) deletedPostParam.Value = deletedPostInfo;
106
+ const deletionVerifiedParam = outputParams.find(p => p.Name === 'DeletionVerified');
107
+ if (deletionVerifiedParam) deletionVerifiedParam.Value = !verificationFailed;
108
+
109
+ return {
110
+ Success: true,
111
+ ResultCode: 'SUCCESS',
112
+ Message: `Successfully deleted post ${postId}`,
113
+ Params: outputParams
114
+ };
115
+
116
+ } catch (error) {
117
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
118
+
119
+ // Handle specific error cases
120
+ if (error instanceof Error && error.message.includes('404')) {
121
+ return {
122
+ Success: false,
123
+ ResultCode: 'POST_NOT_FOUND',
124
+ Message: `Post ${this.getParamValue(Params, 'PostID')} not found or already deleted`,
125
+ Params
126
+ };
127
+ }
128
+
129
+ return {
130
+ Success: false,
131
+ ResultCode: 'ERROR',
132
+ Message: `Failed to delete scheduled post: ${errorMessage}`,
133
+ Params
134
+ };
135
+ }
136
+ }
137
+
138
+ /**
139
+ * Define the parameters this action expects
140
+ */
141
+ public get Params(): ActionParam[] {
142
+ return [
143
+ ...this.oauthParams,
144
+ {
145
+ Name: 'PostID',
146
+ Type: 'Input',
147
+ Value: null
148
+ },
149
+ {
150
+ Name: 'ConfirmDeletion',
151
+ Type: 'Input',
152
+ Value: null
153
+ },
154
+ {
155
+ Name: 'DeletedPostInfo',
156
+ Type: 'Output',
157
+ Value: null
158
+ },
159
+ {
160
+ Name: 'DeletionVerified',
161
+ Type: 'Output',
162
+ Value: null
163
+ }
164
+ ];
165
+ }
166
+
167
+ /**
168
+ * Get action description
169
+ */
170
+ public get Description(): string {
171
+ return 'Deletes a scheduled post from HootSuite. Only SCHEDULED, DRAFT, or FAILED posts can be deleted. Published posts cannot be deleted.';
172
+ }
173
+ }