@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,248 @@
1
+ import { RegisterClass } from '@memberjunction/global';
2
+ import { TwitterBaseAction, Tweet } from '../twitter-base.action';
3
+ import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
4
+ import { LogStatus, LogError } from '@memberjunction/core';
5
+ import { SocialPost } from '../../../base/base-social.action';
6
+
7
+ /**
8
+ * Action to get timeline tweets (home timeline or user timeline) from Twitter/X
9
+ */
10
+ @RegisterClass(TwitterBaseAction, 'TwitterGetTimelineAction')
11
+ export class TwitterGetTimelineAction extends TwitterBaseAction {
12
+ /**
13
+ * Get timeline tweets from Twitter
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 timelineType = this.getParamValue(Params, 'TimelineType') || 'home'; // 'home' or 'user'
27
+ const userId = this.getParamValue(Params, 'UserID');
28
+ const username = this.getParamValue(Params, 'Username');
29
+ const maxResults = this.getParamValue(Params, 'MaxResults') || 100;
30
+ const excludeReplies = this.getParamValue(Params, 'ExcludeReplies') === true;
31
+ const excludeRetweets = this.getParamValue(Params, 'ExcludeRetweets') === true;
32
+ const startTime = this.getParamValue(Params, 'StartTime');
33
+ const endTime = this.getParamValue(Params, 'EndTime');
34
+ const sinceId = this.getParamValue(Params, 'SinceID');
35
+ const untilId = this.getParamValue(Params, 'UntilID');
36
+
37
+ let tweets: Tweet[] = [];
38
+ let endpoint: string;
39
+ const queryParams: Record<string, any> = {
40
+ 'tweet.fields': 'id,text,created_at,author_id,conversation_id,public_metrics,attachments,entities,referenced_tweets',
41
+ 'user.fields': 'id,name,username,profile_image_url,description,created_at,verified',
42
+ 'media.fields': 'url,preview_image_url,type,width,height',
43
+ 'expansions': 'author_id,attachments.media_keys,referenced_tweets.id,referenced_tweets.id.author_id',
44
+ 'max_results': Math.min(maxResults, 100) // API limit per request
45
+ };
46
+
47
+ if (timelineType === 'home') {
48
+ // Get home timeline (requires user context)
49
+ const currentUser = await this.getCurrentUser();
50
+ endpoint = `/users/${currentUser.id}/timelines/reverse_chronological`;
51
+
52
+ // Home timeline specific parameters
53
+ if (excludeReplies) {
54
+ queryParams['exclude'] = queryParams['exclude'] ? `${queryParams['exclude']},replies` : 'replies';
55
+ }
56
+ if (excludeRetweets) {
57
+ queryParams['exclude'] = queryParams['exclude'] ? `${queryParams['exclude']},retweets` : 'retweets';
58
+ }
59
+ } else {
60
+ // Get user timeline
61
+ let targetUserId: string;
62
+
63
+ if (userId) {
64
+ targetUserId = userId;
65
+ } else if (username) {
66
+ // Look up user by username
67
+ const userResponse = await this.axiosInstance.get(`/users/by/username/${username}`, {
68
+ params: { 'user.fields': 'id' }
69
+ });
70
+ targetUserId = userResponse.data.data.id;
71
+ } else {
72
+ // Default to authenticated user
73
+ const currentUser = await this.getCurrentUser();
74
+ targetUserId = currentUser.id;
75
+ }
76
+
77
+ endpoint = `/users/${targetUserId}/tweets`;
78
+
79
+ // User timeline specific parameters
80
+ if (excludeReplies) {
81
+ queryParams['exclude'] = queryParams['exclude'] ? `${queryParams['exclude']},replies` : 'replies';
82
+ }
83
+ if (excludeRetweets) {
84
+ queryParams['exclude'] = queryParams['exclude'] ? `${queryParams['exclude']},retweets` : 'retweets';
85
+ }
86
+ }
87
+
88
+ // Add time-based filters if provided
89
+ if (startTime) {
90
+ queryParams['start_time'] = this.formatTwitterDate(startTime);
91
+ }
92
+ if (endTime) {
93
+ queryParams['end_time'] = this.formatTwitterDate(endTime);
94
+ }
95
+ if (sinceId) {
96
+ queryParams['since_id'] = sinceId;
97
+ }
98
+ if (untilId) {
99
+ queryParams['until_id'] = untilId;
100
+ }
101
+
102
+ // Get paginated tweets
103
+ LogStatus(`Getting ${timelineType} timeline tweets...`);
104
+ tweets = await this.getPaginatedTweets(endpoint, queryParams, maxResults);
105
+
106
+ // Convert to normalized format
107
+ const normalizedPosts: SocialPost[] = tweets.map(tweet => this.normalizePost(tweet));
108
+
109
+ // Calculate summary statistics
110
+ const stats = {
111
+ totalTweets: normalizedPosts.length,
112
+ totalLikes: 0,
113
+ totalRetweets: 0,
114
+ totalReplies: 0,
115
+ totalImpressions: 0
116
+ };
117
+
118
+ normalizedPosts.forEach(post => {
119
+ if (post.analytics) {
120
+ stats.totalLikes += post.analytics.likes;
121
+ stats.totalRetweets += post.analytics.shares;
122
+ stats.totalReplies += post.analytics.comments;
123
+ stats.totalImpressions += post.analytics.impressions;
124
+ }
125
+ });
126
+
127
+ // Update output parameters
128
+ const outputParams = [...Params];
129
+ const postsParam = outputParams.find(p => p.Name === 'Posts');
130
+ if (postsParam) postsParam.Value = normalizedPosts;
131
+ const tweetsParam = outputParams.find(p => p.Name === 'Tweets');
132
+ if (tweetsParam) tweetsParam.Value = tweets;
133
+ const statsParam = outputParams.find(p => p.Name === 'Statistics');
134
+ if (statsParam) statsParam.Value = stats;
135
+
136
+ return {
137
+ Success: true,
138
+ ResultCode: 'SUCCESS',
139
+ Message: `Successfully retrieved ${normalizedPosts.length} tweets from ${timelineType} timeline`,
140
+ Params: outputParams
141
+ };
142
+
143
+ } catch (error) {
144
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
145
+
146
+ return {
147
+ Success: false,
148
+ ResultCode: this.getErrorCode(error),
149
+ Message: `Failed to get timeline: ${errorMessage}`,
150
+ Params
151
+ };
152
+ }
153
+ }
154
+
155
+ /**
156
+ * Get error code based on error type
157
+ */
158
+ private getErrorCode(error: any): string {
159
+ if (error instanceof Error) {
160
+ if (error.message.includes('Rate Limit')) return 'RATE_LIMIT';
161
+ if (error.message.includes('Unauthorized')) return 'INVALID_TOKEN';
162
+ if (error.message.includes('Not Found')) return 'USER_NOT_FOUND';
163
+ if (error.message.includes('Forbidden')) return 'INSUFFICIENT_PERMISSIONS';
164
+ }
165
+ return 'ERROR';
166
+ }
167
+
168
+ /**
169
+ * Define the parameters this action expects
170
+ */
171
+ public get Params(): ActionParam[] {
172
+ return [
173
+ ...this.commonSocialParams,
174
+ {
175
+ Name: 'TimelineType',
176
+ Type: 'Input',
177
+ Value: 'home' // 'home' or 'user'
178
+ },
179
+ {
180
+ Name: 'UserID',
181
+ Type: 'Input',
182
+ Value: null
183
+ },
184
+ {
185
+ Name: 'Username',
186
+ Type: 'Input',
187
+ Value: null
188
+ },
189
+ {
190
+ Name: 'MaxResults',
191
+ Type: 'Input',
192
+ Value: 100
193
+ },
194
+ {
195
+ Name: 'ExcludeReplies',
196
+ Type: 'Input',
197
+ Value: false
198
+ },
199
+ {
200
+ Name: 'ExcludeRetweets',
201
+ Type: 'Input',
202
+ Value: false
203
+ },
204
+ {
205
+ Name: 'StartTime',
206
+ Type: 'Input',
207
+ Value: null
208
+ },
209
+ {
210
+ Name: 'EndTime',
211
+ Type: 'Input',
212
+ Value: null
213
+ },
214
+ {
215
+ Name: 'SinceID',
216
+ Type: 'Input',
217
+ Value: null
218
+ },
219
+ {
220
+ Name: 'UntilID',
221
+ Type: 'Input',
222
+ Value: null
223
+ },
224
+ {
225
+ Name: 'Posts',
226
+ Type: 'Output',
227
+ Value: null
228
+ },
229
+ {
230
+ Name: 'Tweets',
231
+ Type: 'Output',
232
+ Value: null
233
+ },
234
+ {
235
+ Name: 'Statistics',
236
+ Type: 'Output',
237
+ Value: null
238
+ }
239
+ ];
240
+ }
241
+
242
+ /**
243
+ * Get action description
244
+ */
245
+ public get Description(): string {
246
+ return 'Gets timeline tweets from Twitter/X including home timeline or a specific user\'s timeline with filtering options';
247
+ }
248
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Twitter/X Actions for MemberJunction
3
+ *
4
+ * This module exports all Twitter-specific actions for social media automation.
5
+ */
6
+
7
+ export * from './create-tweet.action';
8
+ export * from './create-thread.action';
9
+ export * from './get-timeline.action';
10
+ export * from './get-mentions.action';
11
+ export * from './get-analytics.action';
12
+ export * from './schedule-tweet.action';
13
+ export * from './delete-tweet.action';
14
+ export * from './search-tweets.action';
@@ -0,0 +1,259 @@
1
+ import { RegisterClass } from '@memberjunction/global';
2
+ import { TwitterBaseAction, CreateTweetData } from '../twitter-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 schedule a tweet for future posting on Twitter/X
9
+ * Note: Twitter API v2 doesn't have native scheduling, so this action
10
+ * saves the tweet data for later posting via a separate scheduler service
11
+ */
12
+ @RegisterClass(TwitterBaseAction, 'TwitterScheduleTweetAction')
13
+ export class TwitterScheduleTweetAction extends TwitterBaseAction {
14
+ /**
15
+ * Schedule a tweet for future posting
16
+ */
17
+ protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
18
+ const { Params, ContextUser } = params;
19
+
20
+ try {
21
+ // Initialize OAuth
22
+ const companyIntegrationId = this.getParamValue(Params, 'CompanyIntegrationID');
23
+ if (!await this.initializeOAuth(companyIntegrationId)) {
24
+ throw new Error('Failed to initialize OAuth connection');
25
+ }
26
+
27
+ // Extract parameters
28
+ const content = this.getParamValue(Params, 'Content');
29
+ const scheduledTime = this.getParamValue(Params, 'ScheduledTime');
30
+ const mediaFiles = this.getParamValue(Params, 'MediaFiles');
31
+ const replyToTweetId = this.getParamValue(Params, 'ReplyToTweetID');
32
+ const quoteTweetId = this.getParamValue(Params, 'QuoteTweetID');
33
+ const pollOptions = this.getParamValue(Params, 'PollOptions');
34
+ const pollDurationMinutes = this.getParamValue(Params, 'PollDurationMinutes') || 1440; // Default 24 hours
35
+
36
+ // Validate required parameters
37
+ if (!content) {
38
+ throw new Error('Content is required');
39
+ }
40
+
41
+ if (!scheduledTime) {
42
+ throw new Error('ScheduledTime is required');
43
+ }
44
+
45
+ // Validate scheduled time is in the future
46
+ const scheduleDate = new Date(scheduledTime);
47
+ const now = new Date();
48
+
49
+ if (scheduleDate <= now) {
50
+ throw new Error('ScheduledTime must be in the future');
51
+ }
52
+
53
+ // Validate scheduled time is not too far in the future (e.g., 1 year)
54
+ const maxFutureDate = new Date();
55
+ maxFutureDate.setFullYear(maxFutureDate.getFullYear() + 1);
56
+
57
+ if (scheduleDate > maxFutureDate) {
58
+ throw new Error('ScheduledTime cannot be more than 1 year in the future');
59
+ }
60
+
61
+ // Validate content length
62
+ if (content.length > 280) {
63
+ throw new Error(`Content exceeds Twitter's 280 character limit (current: ${content.length} characters)`);
64
+ }
65
+
66
+ // Build tweet data structure
67
+ const tweetData: CreateTweetData = {
68
+ text: content
69
+ };
70
+
71
+ // Add reply if specified
72
+ if (replyToTweetId) {
73
+ tweetData.reply = {
74
+ in_reply_to_tweet_id: replyToTweetId
75
+ };
76
+ }
77
+
78
+ // Add quote tweet if specified
79
+ if (quoteTweetId) {
80
+ tweetData.quote_tweet_id = quoteTweetId;
81
+ }
82
+
83
+ // Add poll if specified
84
+ if (pollOptions && Array.isArray(pollOptions) && pollOptions.length >= 2) {
85
+ if (pollOptions.length > 4) {
86
+ throw new Error('Twitter polls support a maximum of 4 options');
87
+ }
88
+
89
+ // Validate poll option lengths
90
+ for (const option of pollOptions) {
91
+ if (option.length > 25) {
92
+ throw new Error(`Poll option "${option}" exceeds 25 character limit`);
93
+ }
94
+ }
95
+
96
+ tweetData.poll = {
97
+ options: pollOptions,
98
+ duration_minutes: Math.min(Math.max(pollDurationMinutes, 5), 10080)
99
+ };
100
+ }
101
+
102
+ // Handle media files
103
+ let uploadedMediaIds: string[] = [];
104
+ if (mediaFiles && Array.isArray(mediaFiles) && mediaFiles.length > 0) {
105
+ if (mediaFiles.length > 4) {
106
+ throw new Error('Twitter supports a maximum of 4 media items per tweet');
107
+ }
108
+
109
+ // For scheduling, we'll upload the media now and store the IDs
110
+ // Note: Twitter media IDs expire after 24 hours if not used
111
+ const hoursUntilScheduled = (scheduleDate.getTime() - now.getTime()) / (1000 * 60 * 60);
112
+
113
+ if (hoursUntilScheduled <= 24) {
114
+ // Upload now if scheduling within 24 hours
115
+ LogStatus(`Uploading ${mediaFiles.length} media files...`);
116
+ uploadedMediaIds = await this.uploadMedia(mediaFiles as MediaFile[]);
117
+ tweetData.media = {
118
+ media_ids: uploadedMediaIds
119
+ };
120
+ } else {
121
+ // For tweets scheduled beyond 24 hours, we'll need to store media
122
+ // data and upload closer to the scheduled time
123
+ LogStatus('Media will be uploaded closer to scheduled time due to Twitter\'s 24-hour media expiration');
124
+ }
125
+ }
126
+
127
+ // Create scheduled tweet record
128
+ // In a real implementation, this would save to a database or queue service
129
+ const scheduledTweet = {
130
+ id: this.generateScheduledTweetId(),
131
+ scheduledFor: scheduleDate.toISOString(),
132
+ tweetData: tweetData,
133
+ mediaFiles: mediaFiles, // Store for later upload if needed
134
+ companyIntegrationId: companyIntegrationId,
135
+ createdAt: new Date().toISOString(),
136
+ status: 'scheduled'
137
+ };
138
+
139
+ // Simulate saving to a scheduling service
140
+ LogStatus(`Tweet scheduled for ${scheduleDate.toLocaleString()}`);
141
+
142
+ // Get user info for context
143
+ const user = await this.getCurrentUser();
144
+
145
+ // Update output parameters
146
+ const outputParams = [...Params];
147
+ const scheduledIdParam = outputParams.find(p => p.Name === 'ScheduledTweetID');
148
+ if (scheduledIdParam) scheduledIdParam.Value = scheduledTweet.id;
149
+ const scheduledDataParam = outputParams.find(p => p.Name === 'ScheduledTweetData');
150
+ if (scheduledDataParam) scheduledDataParam.Value = scheduledTweet;
151
+ const estimatedUrlParam = outputParams.find(p => p.Name === 'EstimatedURL');
152
+ if (estimatedUrlParam) estimatedUrlParam.Value = `https://twitter.com/${user.username}/status/[pending]`;
153
+
154
+ return {
155
+ Success: true,
156
+ ResultCode: 'SUCCESS',
157
+ Message: `Successfully scheduled tweet for ${scheduleDate.toLocaleString()}`,
158
+ Params: outputParams
159
+ };
160
+
161
+ } catch (error) {
162
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
163
+
164
+ return {
165
+ Success: false,
166
+ ResultCode: this.getErrorCode(error),
167
+ Message: `Failed to schedule tweet: ${errorMessage}`,
168
+ Params
169
+ };
170
+ }
171
+ }
172
+
173
+ /**
174
+ * Generate a unique ID for scheduled tweet
175
+ */
176
+ private generateScheduledTweetId(): string {
177
+ return `scheduled_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
178
+ }
179
+
180
+ /**
181
+ * Get error code based on error type
182
+ */
183
+ private getErrorCode(error: any): string {
184
+ if (error instanceof Error) {
185
+ if (error.message.includes('Rate Limit')) return 'RATE_LIMIT';
186
+ if (error.message.includes('Unauthorized')) return 'INVALID_TOKEN';
187
+ if (error.message.includes('character limit')) return 'CONTENT_TOO_LONG';
188
+ if (error.message.includes('media')) return 'INVALID_MEDIA';
189
+ if (error.message.includes('future')) return 'INVALID_SCHEDULE_TIME';
190
+ }
191
+ return 'ERROR';
192
+ }
193
+
194
+ /**
195
+ * Define the parameters this action expects
196
+ */
197
+ public get Params(): ActionParam[] {
198
+ return [
199
+ ...this.commonSocialParams,
200
+ {
201
+ Name: 'Content',
202
+ Type: 'Input',
203
+ Value: null
204
+ },
205
+ {
206
+ Name: 'ScheduledTime',
207
+ Type: 'Input',
208
+ Value: null
209
+ },
210
+ {
211
+ Name: 'MediaFiles',
212
+ Type: 'Input',
213
+ Value: null
214
+ },
215
+ {
216
+ Name: 'ReplyToTweetID',
217
+ Type: 'Input',
218
+ Value: null
219
+ },
220
+ {
221
+ Name: 'QuoteTweetID',
222
+ Type: 'Input',
223
+ Value: null
224
+ },
225
+ {
226
+ Name: 'PollOptions',
227
+ Type: 'Input',
228
+ Value: null
229
+ },
230
+ {
231
+ Name: 'PollDurationMinutes',
232
+ Type: 'Input',
233
+ Value: 1440 // Default 24 hours
234
+ },
235
+ {
236
+ Name: 'ScheduledTweetID',
237
+ Type: 'Output',
238
+ Value: null
239
+ },
240
+ {
241
+ Name: 'ScheduledTweetData',
242
+ Type: 'Output',
243
+ Value: null
244
+ },
245
+ {
246
+ Name: 'EstimatedURL',
247
+ Type: 'Output',
248
+ Value: null
249
+ }
250
+ ];
251
+ }
252
+
253
+ /**
254
+ * Get action description
255
+ */
256
+ public get Description(): string {
257
+ return 'Schedules a tweet for future posting on Twitter/X with optional media attachments, polls, replies, or quote tweets';
258
+ }
259
+ }