@postpeer/node 0.3.2

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 (462) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/LICENSE +201 -0
  3. package/README.md +363 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +190 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +190 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +474 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +470 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +2 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +2 -0
  55. package/error.d.ts.map +1 -0
  56. package/error.js +6 -0
  57. package/error.js.map +1 -0
  58. package/error.mjs +2 -0
  59. package/error.mjs.map +1 -0
  60. package/index.d.mts +6 -0
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +6 -0
  63. package/index.d.ts.map +1 -0
  64. package/index.js +30 -0
  65. package/index.js.map +1 -0
  66. package/index.mjs +7 -0
  67. package/index.mjs.map +1 -0
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +40 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +37 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/qs/formats.d.mts +7 -0
  109. package/internal/qs/formats.d.mts.map +1 -0
  110. package/internal/qs/formats.d.ts +7 -0
  111. package/internal/qs/formats.d.ts.map +1 -0
  112. package/internal/qs/formats.js +13 -0
  113. package/internal/qs/formats.js.map +1 -0
  114. package/internal/qs/formats.mjs +9 -0
  115. package/internal/qs/formats.mjs.map +1 -0
  116. package/internal/qs/index.d.mts +10 -0
  117. package/internal/qs/index.d.mts.map +1 -0
  118. package/internal/qs/index.d.ts +10 -0
  119. package/internal/qs/index.d.ts.map +1 -0
  120. package/internal/qs/index.js +14 -0
  121. package/internal/qs/index.js.map +1 -0
  122. package/internal/qs/index.mjs +10 -0
  123. package/internal/qs/index.mjs.map +1 -0
  124. package/internal/qs/stringify.d.mts +3 -0
  125. package/internal/qs/stringify.d.mts.map +1 -0
  126. package/internal/qs/stringify.d.ts +3 -0
  127. package/internal/qs/stringify.d.ts.map +1 -0
  128. package/internal/qs/stringify.js +277 -0
  129. package/internal/qs/stringify.js.map +1 -0
  130. package/internal/qs/stringify.mjs +274 -0
  131. package/internal/qs/stringify.mjs.map +1 -0
  132. package/internal/qs/types.d.mts +57 -0
  133. package/internal/qs/types.d.mts.map +1 -0
  134. package/internal/qs/types.d.ts +57 -0
  135. package/internal/qs/types.d.ts.map +1 -0
  136. package/internal/qs/types.js +3 -0
  137. package/internal/qs/types.js.map +1 -0
  138. package/internal/qs/types.mjs +2 -0
  139. package/internal/qs/types.mjs.map +1 -0
  140. package/internal/qs/utils.d.mts +15 -0
  141. package/internal/qs/utils.d.mts.map +1 -0
  142. package/internal/qs/utils.d.ts +15 -0
  143. package/internal/qs/utils.d.ts.map +1 -0
  144. package/internal/qs/utils.js +230 -0
  145. package/internal/qs/utils.js.map +1 -0
  146. package/internal/qs/utils.mjs +217 -0
  147. package/internal/qs/utils.mjs.map +1 -0
  148. package/internal/request-options.d.mts +75 -0
  149. package/internal/request-options.d.mts.map +1 -0
  150. package/internal/request-options.d.ts +75 -0
  151. package/internal/request-options.d.ts.map +1 -0
  152. package/internal/request-options.js +14 -0
  153. package/internal/request-options.js.map +1 -0
  154. package/internal/request-options.mjs +10 -0
  155. package/internal/request-options.mjs.map +1 -0
  156. package/internal/shim-types.d.mts +17 -0
  157. package/internal/shim-types.d.mts.map +1 -0
  158. package/internal/shim-types.d.ts +17 -0
  159. package/internal/shim-types.d.ts.map +1 -0
  160. package/internal/shim-types.js +4 -0
  161. package/internal/shim-types.js.map +1 -0
  162. package/internal/shim-types.mjs +3 -0
  163. package/internal/shim-types.mjs.map +1 -0
  164. package/internal/shims.d.mts +20 -0
  165. package/internal/shims.d.mts.map +1 -0
  166. package/internal/shims.d.ts +20 -0
  167. package/internal/shims.d.ts.map +1 -0
  168. package/internal/shims.js +92 -0
  169. package/internal/shims.js.map +1 -0
  170. package/internal/shims.mjs +85 -0
  171. package/internal/shims.mjs.map +1 -0
  172. package/internal/to-file.d.mts +45 -0
  173. package/internal/to-file.d.mts.map +1 -0
  174. package/internal/to-file.d.ts +45 -0
  175. package/internal/to-file.d.ts.map +1 -0
  176. package/internal/to-file.js +91 -0
  177. package/internal/to-file.js.map +1 -0
  178. package/internal/to-file.mjs +88 -0
  179. package/internal/to-file.mjs.map +1 -0
  180. package/internal/tslib.js +81 -0
  181. package/internal/tslib.mjs +17 -0
  182. package/internal/types.d.mts +69 -0
  183. package/internal/types.d.mts.map +1 -0
  184. package/internal/types.d.ts +69 -0
  185. package/internal/types.d.ts.map +1 -0
  186. package/internal/types.js +4 -0
  187. package/internal/types.js.map +1 -0
  188. package/internal/types.mjs +3 -0
  189. package/internal/types.mjs.map +1 -0
  190. package/internal/uploads.d.mts +42 -0
  191. package/internal/uploads.d.mts.map +1 -0
  192. package/internal/uploads.d.ts +42 -0
  193. package/internal/uploads.d.ts.map +1 -0
  194. package/internal/uploads.js +141 -0
  195. package/internal/uploads.js.map +1 -0
  196. package/internal/uploads.mjs +131 -0
  197. package/internal/uploads.mjs.map +1 -0
  198. package/internal/utils/base64.d.mts +3 -0
  199. package/internal/utils/base64.d.mts.map +1 -0
  200. package/internal/utils/base64.d.ts +3 -0
  201. package/internal/utils/base64.d.ts.map +1 -0
  202. package/internal/utils/base64.js +38 -0
  203. package/internal/utils/base64.js.map +1 -0
  204. package/internal/utils/base64.mjs +33 -0
  205. package/internal/utils/base64.mjs.map +1 -0
  206. package/internal/utils/bytes.d.mts +4 -0
  207. package/internal/utils/bytes.d.mts.map +1 -0
  208. package/internal/utils/bytes.d.ts +4 -0
  209. package/internal/utils/bytes.d.ts.map +1 -0
  210. package/internal/utils/bytes.js +31 -0
  211. package/internal/utils/bytes.js.map +1 -0
  212. package/internal/utils/bytes.mjs +26 -0
  213. package/internal/utils/bytes.mjs.map +1 -0
  214. package/internal/utils/env.d.mts +9 -0
  215. package/internal/utils/env.d.mts.map +1 -0
  216. package/internal/utils/env.d.ts +9 -0
  217. package/internal/utils/env.d.ts.map +1 -0
  218. package/internal/utils/env.js +22 -0
  219. package/internal/utils/env.js.map +1 -0
  220. package/internal/utils/env.mjs +18 -0
  221. package/internal/utils/env.mjs.map +1 -0
  222. package/internal/utils/log.d.mts +37 -0
  223. package/internal/utils/log.d.mts.map +1 -0
  224. package/internal/utils/log.d.ts +37 -0
  225. package/internal/utils/log.d.ts.map +1 -0
  226. package/internal/utils/log.js +86 -0
  227. package/internal/utils/log.js.map +1 -0
  228. package/internal/utils/log.mjs +80 -0
  229. package/internal/utils/log.mjs.map +1 -0
  230. package/internal/utils/path.d.mts +15 -0
  231. package/internal/utils/path.d.mts.map +1 -0
  232. package/internal/utils/path.d.ts +15 -0
  233. package/internal/utils/path.d.ts.map +1 -0
  234. package/internal/utils/path.js +79 -0
  235. package/internal/utils/path.js.map +1 -0
  236. package/internal/utils/path.mjs +74 -0
  237. package/internal/utils/path.mjs.map +1 -0
  238. package/internal/utils/query.d.mts +2 -0
  239. package/internal/utils/query.d.mts.map +1 -0
  240. package/internal/utils/query.d.ts +2 -0
  241. package/internal/utils/query.d.ts.map +1 -0
  242. package/internal/utils/query.js +10 -0
  243. package/internal/utils/query.js.map +1 -0
  244. package/internal/utils/query.mjs +6 -0
  245. package/internal/utils/query.mjs.map +1 -0
  246. package/internal/utils/sleep.d.mts +2 -0
  247. package/internal/utils/sleep.d.mts.map +1 -0
  248. package/internal/utils/sleep.d.ts +2 -0
  249. package/internal/utils/sleep.d.ts.map +1 -0
  250. package/internal/utils/sleep.js +7 -0
  251. package/internal/utils/sleep.js.map +1 -0
  252. package/internal/utils/sleep.mjs +3 -0
  253. package/internal/utils/sleep.mjs.map +1 -0
  254. package/internal/utils/uuid.d.mts +5 -0
  255. package/internal/utils/uuid.d.mts.map +1 -0
  256. package/internal/utils/uuid.d.ts +5 -0
  257. package/internal/utils/uuid.d.ts.map +1 -0
  258. package/internal/utils/uuid.js +19 -0
  259. package/internal/utils/uuid.js.map +1 -0
  260. package/internal/utils/uuid.mjs +15 -0
  261. package/internal/utils/uuid.mjs.map +1 -0
  262. package/internal/utils/values.d.mts +18 -0
  263. package/internal/utils/values.d.mts.map +1 -0
  264. package/internal/utils/values.d.ts +18 -0
  265. package/internal/utils/values.d.ts.map +1 -0
  266. package/internal/utils/values.js +112 -0
  267. package/internal/utils/values.js.map +1 -0
  268. package/internal/utils/values.mjs +94 -0
  269. package/internal/utils/values.mjs.map +1 -0
  270. package/internal/utils.d.mts +8 -0
  271. package/internal/utils.d.mts.map +1 -0
  272. package/internal/utils.d.ts +8 -0
  273. package/internal/utils.d.ts.map +1 -0
  274. package/internal/utils.js +12 -0
  275. package/internal/utils.js.map +1 -0
  276. package/internal/utils.mjs +9 -0
  277. package/internal/utils.mjs.map +1 -0
  278. package/package.json +143 -0
  279. package/resource.d.mts +2 -0
  280. package/resource.d.mts.map +1 -0
  281. package/resource.d.ts +2 -0
  282. package/resource.d.ts.map +1 -0
  283. package/resource.js +6 -0
  284. package/resource.js.map +1 -0
  285. package/resource.mjs +2 -0
  286. package/resource.mjs.map +1 -0
  287. package/resources/connect/connect.d.mts +26 -0
  288. package/resources/connect/connect.d.mts.map +1 -0
  289. package/resources/connect/connect.d.ts +26 -0
  290. package/resources/connect/connect.d.ts.map +1 -0
  291. package/resources/connect/connect.js +24 -0
  292. package/resources/connect/connect.js.map +1 -0
  293. package/resources/connect/connect.mjs +19 -0
  294. package/resources/connect/connect.mjs.map +1 -0
  295. package/resources/connect/index.d.mts +3 -0
  296. package/resources/connect/index.d.mts.map +1 -0
  297. package/resources/connect/index.d.ts +3 -0
  298. package/resources/connect/index.d.ts.map +1 -0
  299. package/resources/connect/index.js +9 -0
  300. package/resources/connect/index.js.map +1 -0
  301. package/resources/connect/index.mjs +4 -0
  302. package/resources/connect/index.mjs.map +1 -0
  303. package/resources/connect/integrations.d.mts +47 -0
  304. package/resources/connect/integrations.d.mts.map +1 -0
  305. package/resources/connect/integrations.d.ts +47 -0
  306. package/resources/connect/integrations.d.ts.map +1 -0
  307. package/resources/connect/integrations.js +22 -0
  308. package/resources/connect/integrations.js.map +1 -0
  309. package/resources/connect/integrations.mjs +18 -0
  310. package/resources/connect/integrations.mjs.map +1 -0
  311. package/resources/connect.d.mts +2 -0
  312. package/resources/connect.d.mts.map +1 -0
  313. package/resources/connect.d.ts +2 -0
  314. package/resources/connect.d.ts.map +1 -0
  315. package/resources/connect.js +6 -0
  316. package/resources/connect.js.map +1 -0
  317. package/resources/connect.mjs +3 -0
  318. package/resources/connect.mjs.map +1 -0
  319. package/resources/health.d.mts +23 -0
  320. package/resources/health.d.mts.map +1 -0
  321. package/resources/health.d.ts +23 -0
  322. package/resources/health.d.ts.map +1 -0
  323. package/resources/health.js +21 -0
  324. package/resources/health.js.map +1 -0
  325. package/resources/health.mjs +17 -0
  326. package/resources/health.mjs.map +1 -0
  327. package/resources/index.d.mts +6 -0
  328. package/resources/index.d.mts.map +1 -0
  329. package/resources/index.d.ts +6 -0
  330. package/resources/index.d.ts.map +1 -0
  331. package/resources/index.js +15 -0
  332. package/resources/index.js.map +1 -0
  333. package/resources/index.mjs +7 -0
  334. package/resources/index.mjs.map +1 -0
  335. package/resources/media.d.mts +27 -0
  336. package/resources/media.d.mts.map +1 -0
  337. package/resources/media.d.ts +27 -0
  338. package/resources/media.d.ts.map +1 -0
  339. package/resources/media.js +15 -0
  340. package/resources/media.js.map +1 -0
  341. package/resources/media.mjs +11 -0
  342. package/resources/media.mjs.map +1 -0
  343. package/resources/platforms.d.mts +22 -0
  344. package/resources/platforms.d.mts.map +1 -0
  345. package/resources/platforms.d.ts +22 -0
  346. package/resources/platforms.d.ts.map +1 -0
  347. package/resources/platforms.js +15 -0
  348. package/resources/platforms.js.map +1 -0
  349. package/resources/platforms.mjs +11 -0
  350. package/resources/platforms.mjs.map +1 -0
  351. package/resources/posts/index.d.mts +3 -0
  352. package/resources/posts/index.d.mts.map +1 -0
  353. package/resources/posts/index.d.ts +3 -0
  354. package/resources/posts/index.d.ts.map +1 -0
  355. package/resources/posts/index.js +9 -0
  356. package/resources/posts/index.js.map +1 -0
  357. package/resources/posts/index.mjs +4 -0
  358. package/resources/posts/index.mjs.map +1 -0
  359. package/resources/posts/posts.d.mts +437 -0
  360. package/resources/posts/posts.d.mts.map +1 -0
  361. package/resources/posts/posts.d.ts +437 -0
  362. package/resources/posts/posts.d.ts.map +1 -0
  363. package/resources/posts/posts.js +69 -0
  364. package/resources/posts/posts.js.map +1 -0
  365. package/resources/posts/posts.mjs +64 -0
  366. package/resources/posts/posts.mjs.map +1 -0
  367. package/resources/posts/scheduled.d.mts +111 -0
  368. package/resources/posts/scheduled.d.mts.map +1 -0
  369. package/resources/posts/scheduled.d.ts +111 -0
  370. package/resources/posts/scheduled.d.ts.map +1 -0
  371. package/resources/posts/scheduled.js +48 -0
  372. package/resources/posts/scheduled.js.map +1 -0
  373. package/resources/posts/scheduled.mjs +44 -0
  374. package/resources/posts/scheduled.mjs.map +1 -0
  375. package/resources/posts.d.mts +2 -0
  376. package/resources/posts.d.mts.map +1 -0
  377. package/resources/posts.d.ts +2 -0
  378. package/resources/posts.d.ts.map +1 -0
  379. package/resources/posts.js +6 -0
  380. package/resources/posts.js.map +1 -0
  381. package/resources/posts.mjs +3 -0
  382. package/resources/posts.mjs.map +1 -0
  383. package/resources.d.mts +2 -0
  384. package/resources.d.mts.map +1 -0
  385. package/resources.d.ts +2 -0
  386. package/resources.d.ts.map +1 -0
  387. package/resources.js +5 -0
  388. package/resources.js.map +1 -0
  389. package/resources.mjs +2 -0
  390. package/resources.mjs.map +1 -0
  391. package/src/api-promise.ts +2 -0
  392. package/src/client.ts +779 -0
  393. package/src/core/README.md +3 -0
  394. package/src/core/api-promise.ts +92 -0
  395. package/src/core/error.ts +130 -0
  396. package/src/core/resource.ts +11 -0
  397. package/src/core/uploads.ts +2 -0
  398. package/src/error.ts +2 -0
  399. package/src/index.ts +22 -0
  400. package/src/internal/README.md +3 -0
  401. package/src/internal/builtin-types.ts +93 -0
  402. package/src/internal/detect-platform.ts +196 -0
  403. package/src/internal/errors.ts +33 -0
  404. package/src/internal/headers.ts +97 -0
  405. package/src/internal/parse.ts +56 -0
  406. package/src/internal/qs/LICENSE.md +13 -0
  407. package/src/internal/qs/README.md +3 -0
  408. package/src/internal/qs/formats.ts +10 -0
  409. package/src/internal/qs/index.ts +13 -0
  410. package/src/internal/qs/stringify.ts +385 -0
  411. package/src/internal/qs/types.ts +71 -0
  412. package/src/internal/qs/utils.ts +265 -0
  413. package/src/internal/request-options.ts +91 -0
  414. package/src/internal/shim-types.ts +26 -0
  415. package/src/internal/shims.ts +107 -0
  416. package/src/internal/to-file.ts +154 -0
  417. package/src/internal/types.ts +95 -0
  418. package/src/internal/uploads.ts +187 -0
  419. package/src/internal/utils/base64.ts +40 -0
  420. package/src/internal/utils/bytes.ts +32 -0
  421. package/src/internal/utils/env.ts +18 -0
  422. package/src/internal/utils/log.ts +127 -0
  423. package/src/internal/utils/path.ts +88 -0
  424. package/src/internal/utils/query.ts +7 -0
  425. package/src/internal/utils/sleep.ts +3 -0
  426. package/src/internal/utils/uuid.ts +17 -0
  427. package/src/internal/utils/values.ts +105 -0
  428. package/src/internal/utils.ts +9 -0
  429. package/src/lib/.keep +4 -0
  430. package/src/resource.ts +2 -0
  431. package/src/resources/connect/connect.ts +49 -0
  432. package/src/resources/connect/index.ts +8 -0
  433. package/src/resources/connect/integrations.ts +69 -0
  434. package/src/resources/connect.ts +3 -0
  435. package/src/resources/health.ts +36 -0
  436. package/src/resources/index.ts +17 -0
  437. package/src/resources/media.ts +38 -0
  438. package/src/resources/platforms.ts +30 -0
  439. package/src/resources/posts/index.ts +20 -0
  440. package/src/resources/posts/posts.ts +582 -0
  441. package/src/resources/posts/scheduled.ts +153 -0
  442. package/src/resources/posts.ts +3 -0
  443. package/src/resources.ts +1 -0
  444. package/src/tsconfig.json +11 -0
  445. package/src/uploads.ts +2 -0
  446. package/src/version.ts +1 -0
  447. package/uploads.d.mts +2 -0
  448. package/uploads.d.mts.map +1 -0
  449. package/uploads.d.ts +2 -0
  450. package/uploads.d.ts.map +1 -0
  451. package/uploads.js +6 -0
  452. package/uploads.js.map +1 -0
  453. package/uploads.mjs +2 -0
  454. package/uploads.mjs.map +1 -0
  455. package/version.d.mts +2 -0
  456. package/version.d.mts.map +1 -0
  457. package/version.d.ts +2 -0
  458. package/version.d.ts.map +1 -0
  459. package/version.js +5 -0
  460. package/version.js.map +1 -0
  461. package/version.mjs +2 -0
  462. package/version.mjs.map +1 -0
@@ -0,0 +1,437 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as PostsAPI from "./posts.js";
3
+ import * as ScheduledAPI from "./scheduled.js";
4
+ import { Scheduled, ScheduledCancelResponse, ScheduledListResponse, ScheduledRescheduleParams, ScheduledRescheduleResponse } from "./scheduled.js";
5
+ import { APIPromise } from "../../core/api-promise.js";
6
+ import { RequestOptions } from "../../internal/request-options.js";
7
+ export declare class Posts extends APIResource {
8
+ scheduled: ScheduledAPI.Scheduled;
9
+ /**
10
+ * Publish a post to one or more social media platforms
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const post = await client.posts.create({
15
+ * content: 'Hello world!',
16
+ * platforms: [
17
+ * { platform: 'twitter', accountId: '<your-account-id>' },
18
+ * ],
19
+ * publishNow: true,
20
+ * });
21
+ * ```
22
+ */
23
+ create(body: PostCreateParams, options?: RequestOptions): APIPromise<PostCreateResponse>;
24
+ /**
25
+ * Get a single post by ID
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * const post = await client.posts.retrieve('postId');
30
+ * ```
31
+ */
32
+ retrieve(postID: string, options?: RequestOptions): APIPromise<PostRetrieveResponse>;
33
+ /**
34
+ * Returns a paginated list of posts. Filter by status, platform (OR logic), and
35
+ * date ranges. Published posts include platformPostUrl per platform.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const posts = await client.posts.list();
40
+ * ```
41
+ */
42
+ list(query?: PostListParams | null | undefined, options?: RequestOptions): APIPromise<PostListResponse>;
43
+ /**
44
+ * Delete a post by ID
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const post = await client.posts.delete('postId');
49
+ * ```
50
+ */
51
+ delete(postID: string, options?: RequestOptions): APIPromise<PostDeleteResponse>;
52
+ }
53
+ export interface PostSummary {
54
+ content: string;
55
+ createdAt: string;
56
+ crosspostingEnabled: boolean;
57
+ mediaItems: Array<PostSummary.MediaItem>;
58
+ platforms: Array<PostSummary.Platform>;
59
+ /**
60
+ * MongoDB ObjectId of the Post document
61
+ */
62
+ postId: string;
63
+ rawRequestBody: {
64
+ [key: string]: unknown;
65
+ };
66
+ /**
67
+ * ISO 8601 scheduled datetime
68
+ */
69
+ scheduledFor: string | null;
70
+ status: Status;
71
+ timezone: string;
72
+ updatedAt: string;
73
+ }
74
+ export declare namespace PostSummary {
75
+ interface MediaItem {
76
+ filename: string;
77
+ mimeType: string;
78
+ size: number;
79
+ type: 'image' | 'video' | 'gif';
80
+ url: string;
81
+ }
82
+ interface Platform {
83
+ errorMessage: string | null;
84
+ platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
85
+ platformPostId: string | null;
86
+ /**
87
+ * Direct URL to the published post
88
+ */
89
+ platformPostUrl: string | null;
90
+ publishedAt: string | null;
91
+ status: PostsAPI.Status;
92
+ }
93
+ }
94
+ export type Status = 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
95
+ export interface PostCreateResponse {
96
+ platforms: Array<PostCreateResponse.Platform>;
97
+ /**
98
+ * id of the saved Post document
99
+ */
100
+ postId: string;
101
+ status: Status;
102
+ /**
103
+ * false only when every platform failed
104
+ */
105
+ success: boolean;
106
+ /**
107
+ * ISO 8601 datetime the post is scheduled for (only present for scheduled posts)
108
+ */
109
+ scheduledFor?: string;
110
+ }
111
+ export declare namespace PostCreateResponse {
112
+ interface Platform {
113
+ platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
114
+ success: boolean;
115
+ /**
116
+ * Error message when success is false
117
+ */
118
+ error?: string;
119
+ /**
120
+ * Direct URL to the published post
121
+ */
122
+ platformPostUrl?: string;
123
+ }
124
+ }
125
+ export interface PostRetrieveResponse {
126
+ post: PostSummary;
127
+ success: boolean;
128
+ }
129
+ export interface PostListResponse {
130
+ posts: Array<PostSummary>;
131
+ success: boolean;
132
+ /**
133
+ * Total matched posts across all pages
134
+ */
135
+ total: number;
136
+ }
137
+ export interface PostDeleteResponse {
138
+ success: boolean;
139
+ }
140
+ export interface PostCreateParams {
141
+ /**
142
+ * Post text body
143
+ */
144
+ content: string;
145
+ /**
146
+ * Target platform accounts to publish to
147
+ */
148
+ platforms: Array<PostCreateParams.Platform>;
149
+ /**
150
+ * Media attachments (images, videos, GIFs)
151
+ */
152
+ mediaItems?: Array<PostCreateParams.MediaItem>;
153
+ /**
154
+ * Publish immediately. Required when scheduledFor is omitted.
155
+ */
156
+ publishNow?: boolean;
157
+ /**
158
+ * ISO 8601 datetime to schedule the post for future publishing
159
+ */
160
+ scheduledFor?: string;
161
+ /**
162
+ * IANA timezone for the scheduled time (e.g. America/New_York). Defaults to UTC.
163
+ */
164
+ timezone?: string;
165
+ }
166
+ export declare namespace PostCreateParams {
167
+ interface Platform {
168
+ /**
169
+ * Integration.\_id — find yours via GET /connect/integrations
170
+ */
171
+ accountId: string;
172
+ platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
173
+ /**
174
+ * Platform-specific options. See TwitterConfigurations, YouTubeConfigurations,
175
+ * TikTokConfigurations, PinterestConfigurations, or LinkedInConfigurations
176
+ * depending on the target platform.
177
+ */
178
+ platformSpecificData?: Platform.TwitterConfigurations | Platform.YouTubeConfigurations | Platform.TikTokConfigurations | Platform.PinterestConfigurations | Platform.LinkedInConfigurations;
179
+ }
180
+ namespace Platform {
181
+ /**
182
+ * Pass this object in platformSpecificData when posting to Twitter/X, including
183
+ * Community post options.
184
+ */
185
+ interface TwitterConfigurations {
186
+ /**
187
+ * Community ID to publish this post into.
188
+ */
189
+ communityId?: string;
190
+ /**
191
+ * Cannot be combined with media or threadItems.
192
+ */
193
+ poll?: TwitterConfigurations.Poll;
194
+ /**
195
+ * Who can reply to this tweet.
196
+ */
197
+ replySettings?: 'following' | 'mentionedUsers' | 'subscribers' | 'verified';
198
+ /**
199
+ * Tweet ID to reply to.
200
+ */
201
+ replyToTweetId?: string;
202
+ /**
203
+ * When posting to a Community, also share the post with followers.
204
+ */
205
+ shareWithFollowers?: boolean;
206
+ /**
207
+ * Additional tweets to chain as a thread. The root tweet uses post.content.
208
+ */
209
+ threadItems?: Array<TwitterConfigurations.ThreadItem>;
210
+ }
211
+ namespace TwitterConfigurations {
212
+ /**
213
+ * Cannot be combined with media or threadItems.
214
+ */
215
+ interface Poll {
216
+ /**
217
+ * Poll duration in minutes (5 min – 7 days).
218
+ */
219
+ duration_minutes: number;
220
+ /**
221
+ * 2–4 poll options.
222
+ */
223
+ options: Array<string>;
224
+ }
225
+ interface ThreadItem {
226
+ /**
227
+ * Text of this thread tweet (max 280 chars)
228
+ */
229
+ content: string;
230
+ mediaItems?: Array<ThreadItem.MediaItem>;
231
+ }
232
+ namespace ThreadItem {
233
+ interface MediaItem {
234
+ type: 'image' | 'video' | 'gif';
235
+ url: string;
236
+ }
237
+ }
238
+ }
239
+ /**
240
+ * Pass this object in platformSpecificData when posting to YouTube.
241
+ */
242
+ interface YouTubeConfigurations {
243
+ /**
244
+ * YouTube category ID. Defaults to "22" (People & Blogs). Common values: "1" Film
245
+ * & Animation, "10" Music, "20" Gaming, "22" People & Blogs, "27" Education, "28"
246
+ * Science & Technology.
247
+ */
248
+ categoryId?: string;
249
+ /**
250
+ * AI-generated content disclosure. YouTube is increasingly enforcing this
251
+ * requirement. Defaults to false.
252
+ */
253
+ containsSyntheticMedia?: boolean;
254
+ /**
255
+ * Auto-posted comment after the video goes live. Max 10,000 characters. For
256
+ * publishNow posts: posted immediately after upload. For scheduled posts: posted
257
+ * when the video becomes public.
258
+ */
259
+ firstComment?: string;
260
+ /**
261
+ * COPPA compliance flag. Setting to true permanently disables comments,
262
+ * notification bell, personalized ads, end screens, and cards on the video.
263
+ * Defaults to false.
264
+ */
265
+ madeForKids?: boolean;
266
+ /**
267
+ * Video tags. Total characters across all tags must be ≤500.
268
+ */
269
+ tags?: Array<string>;
270
+ /**
271
+ * Video title (max 100 chars, no < or >). Defaults to first 100 chars of content,
272
+ * or "Untitled Video".
273
+ */
274
+ title?: string;
275
+ /**
276
+ * Who can see the video. Defaults to "public". Scheduled posts upload as private
277
+ * and flip to this value at publish time.
278
+ */
279
+ visibility?: 'public' | 'private' | 'unlisted';
280
+ }
281
+ /**
282
+ * Pass this object in platformSpecificData when posting to TikTok.
283
+ */
284
+ interface TikTokConfigurations {
285
+ /**
286
+ * Automatically add background music to photo carousels. Photo posts only.
287
+ * Defaults to true.
288
+ */
289
+ auto_add_music?: boolean;
290
+ /**
291
+ * Mark as branded content (paid partnership). Defaults to false.
292
+ */
293
+ brand_content_toggle?: boolean;
294
+ /**
295
+ * Mark as organic brand promotion. Defaults to false.
296
+ */
297
+ brand_organic_toggle?: boolean;
298
+ /**
299
+ * Disable comments on this post. Defaults to false.
300
+ */
301
+ disable_comment?: boolean;
302
+ /**
303
+ * Disable duet for this video. Videos only. Defaults to false.
304
+ */
305
+ disable_duet?: boolean;
306
+ /**
307
+ * Disable stitch for this video. Videos only. Defaults to false.
308
+ */
309
+ disable_stitch?: boolean;
310
+ /**
311
+ * When true (default), sends content to the creator's TikTok inbox as a draft. Set
312
+ * to false to publish immediately (requires an audited app).
313
+ */
314
+ draft?: boolean;
315
+ /**
316
+ * AI-generated content disclosure. Defaults to false.
317
+ */
318
+ is_aigc?: boolean;
319
+ /**
320
+ * 0-indexed position of the cover image in a photo carousel. Photo posts only.
321
+ * Defaults to 0.
322
+ */
323
+ photo_cover_index?: number;
324
+ /**
325
+ * Who can see this post. Defaults to "SELF_ONLY" (required for unreviewed apps).
326
+ * Upgrade to PUBLIC_TO_EVERYONE after TikTok app review.
327
+ */
328
+ privacy_level?: 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | 'SELF_ONLY';
329
+ /**
330
+ * Timestamp in milliseconds to use as the video cover frame. Videos only. Defaults
331
+ * to 1000ms.
332
+ */
333
+ video_cover_timestamp_ms?: number;
334
+ }
335
+ /**
336
+ * Pass this object in platformSpecificData when posting to Pinterest.
337
+ */
338
+ interface PinterestConfigurations {
339
+ /**
340
+ * Target board ID. Retrieve available boards via GET /connect/pinterest/boards.
341
+ */
342
+ boardId: string;
343
+ /**
344
+ * Accessible image description. Max 500 characters.
345
+ */
346
+ altText?: string;
347
+ /**
348
+ * Custom cover image URL for video pins.
349
+ */
350
+ coverImageUrl?: string;
351
+ /**
352
+ * Hex color for the loading placeholder (e.g. "#6E7874").
353
+ */
354
+ dominantColor?: string;
355
+ /**
356
+ * HTTPS destination URL when the pin is clicked. Important for driving traffic.
357
+ */
358
+ link?: string;
359
+ /**
360
+ * Pin title. Max 100 characters. Defaults to first line of content.
361
+ */
362
+ title?: string;
363
+ }
364
+ /**
365
+ * Pass this object in platformSpecificData when posting to LinkedIn.
366
+ */
367
+ interface LinkedInConfigurations {
368
+ /**
369
+ * Description for the article preview card. Max 400 characters.
370
+ */
371
+ article_description?: string;
372
+ /**
373
+ * Title for the article preview card. Max 400 characters.
374
+ */
375
+ article_title?: string;
376
+ /**
377
+ * URL for an article/link post. When provided, the post becomes a link share with
378
+ * a preview card.
379
+ */
380
+ article_url?: string;
381
+ /**
382
+ * Post visibility. "PUBLIC" = visible to everyone, "CONNECTIONS" = visible to
383
+ * connections only. Defaults to "PUBLIC".
384
+ */
385
+ visibility?: 'PUBLIC' | 'CONNECTIONS';
386
+ }
387
+ }
388
+ interface MediaItem {
389
+ type: 'image' | 'video' | 'gif';
390
+ url: string;
391
+ /**
392
+ * Thumbnail image URL for video items. Supported on YouTube regular videos (not
393
+ * Shorts). JPEG, PNG, or GIF, max 2 MB, min 640 px wide.
394
+ */
395
+ thumbnail?: string;
396
+ }
397
+ }
398
+ export interface PostListParams {
399
+ /**
400
+ * ISO 8601 lower bound on createdAt
401
+ */
402
+ createdAfter?: string;
403
+ /**
404
+ * ISO 8601 upper bound on createdAt
405
+ */
406
+ createdBefore?: string;
407
+ /**
408
+ * Page size (max 100)
409
+ */
410
+ limit?: number;
411
+ /**
412
+ * Number of posts to skip
413
+ */
414
+ offset?: number;
415
+ /**
416
+ * Filter by platform (repeatable — OR logic)
417
+ */
418
+ platform?: Array<'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin'>;
419
+ /**
420
+ * ISO 8601 lower bound on scheduledFor
421
+ */
422
+ scheduledAfter?: string;
423
+ /**
424
+ * ISO 8601 upper bound on scheduledFor
425
+ */
426
+ scheduledBefore?: string;
427
+ /**
428
+ * Sort direction by createdAt
429
+ */
430
+ sort?: 'asc' | 'desc';
431
+ status?: Status;
432
+ }
433
+ export declare namespace Posts {
434
+ export { type PostSummary as PostSummary, type Status as Status, type PostCreateResponse as PostCreateResponse, type PostRetrieveResponse as PostRetrieveResponse, type PostListResponse as PostListResponse, type PostDeleteResponse as PostDeleteResponse, type PostCreateParams as PostCreateParams, type PostListParams as PostListParams, };
435
+ export { Scheduled as Scheduled, type ScheduledListResponse as ScheduledListResponse, type ScheduledCancelResponse as ScheduledCancelResponse, type ScheduledRescheduleResponse as ScheduledRescheduleResponse, type ScheduledRescheduleParams as ScheduledRescheduleParams, };
436
+ }
437
+ //# sourceMappingURL=posts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posts.d.ts","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,KAAK,YAAY;OACjB,EACL,SAAS,EACT,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC5B;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC,SAAS,EAAE,YAAY,CAAC,SAAS,CAA4C;IAE7E;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAIxF;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIpF;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,c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;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;IAEF,OAAO,EACL,SAAS,IAAI,SAAS,EACtB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Posts = void 0;
5
+ const tslib_1 = require("../../internal/tslib.js");
6
+ const resource_1 = require("../../core/resource.js");
7
+ const ScheduledAPI = tslib_1.__importStar(require("./scheduled.js"));
8
+ const scheduled_1 = require("./scheduled.js");
9
+ const path_1 = require("../../internal/utils/path.js");
10
+ class Posts extends resource_1.APIResource {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.scheduled = new ScheduledAPI.Scheduled(this._client);
14
+ }
15
+ /**
16
+ * Publish a post to one or more social media platforms
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const post = await client.posts.create({
21
+ * content: 'Hello world!',
22
+ * platforms: [
23
+ * { platform: 'twitter', accountId: '<your-account-id>' },
24
+ * ],
25
+ * publishNow: true,
26
+ * });
27
+ * ```
28
+ */
29
+ create(body, options) {
30
+ return this._client.post('/v1/posts/', { body, ...options });
31
+ }
32
+ /**
33
+ * Get a single post by ID
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const post = await client.posts.retrieve('postId');
38
+ * ```
39
+ */
40
+ retrieve(postID, options) {
41
+ return this._client.get((0, path_1.path) `/v1/posts/${postID}`, options);
42
+ }
43
+ /**
44
+ * Returns a paginated list of posts. Filter by status, platform (OR logic), and
45
+ * date ranges. Published posts include platformPostUrl per platform.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const posts = await client.posts.list();
50
+ * ```
51
+ */
52
+ list(query = {}, options) {
53
+ return this._client.get('/v1/posts/', { query, ...options });
54
+ }
55
+ /**
56
+ * Delete a post by ID
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * const post = await client.posts.delete('postId');
61
+ * ```
62
+ */
63
+ delete(postID, options) {
64
+ return this._client.delete((0, path_1.path) `/v1/posts/${postID}`, options);
65
+ }
66
+ }
67
+ exports.Posts = Posts;
68
+ Posts.Scheduled = scheduled_1.Scheduled;
69
+ //# sourceMappingURL=posts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posts.js","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,qEAA4C;AAC5C,8CAMqB;AAGrB,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IAAtC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2D/E,CAAC;IAzDC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AA5DD,sBA4DC;AAoeD,KAAK,CAAC,SAAS,GAAG,qBAAS,CAAC"}
@@ -0,0 +1,64 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import * as ScheduledAPI from "./scheduled.mjs";
4
+ import { Scheduled, } from "./scheduled.mjs";
5
+ import { path } from "../../internal/utils/path.mjs";
6
+ export class Posts extends APIResource {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.scheduled = new ScheduledAPI.Scheduled(this._client);
10
+ }
11
+ /**
12
+ * Publish a post to one or more social media platforms
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const post = await client.posts.create({
17
+ * content: 'Hello world!',
18
+ * platforms: [
19
+ * { platform: 'twitter', accountId: '<your-account-id>' },
20
+ * ],
21
+ * publishNow: true,
22
+ * });
23
+ * ```
24
+ */
25
+ create(body, options) {
26
+ return this._client.post('/v1/posts/', { body, ...options });
27
+ }
28
+ /**
29
+ * Get a single post by ID
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const post = await client.posts.retrieve('postId');
34
+ * ```
35
+ */
36
+ retrieve(postID, options) {
37
+ return this._client.get(path `/v1/posts/${postID}`, options);
38
+ }
39
+ /**
40
+ * Returns a paginated list of posts. Filter by status, platform (OR logic), and
41
+ * date ranges. Published posts include platformPostUrl per platform.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const posts = await client.posts.list();
46
+ * ```
47
+ */
48
+ list(query = {}, options) {
49
+ return this._client.get('/v1/posts/', { query, ...options });
50
+ }
51
+ /**
52
+ * Delete a post by ID
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const post = await client.posts.delete('postId');
57
+ * ```
58
+ */
59
+ delete(postID, options) {
60
+ return this._client.delete(path `/v1/posts/${postID}`, options);
61
+ }
62
+ }
63
+ Posts.Scheduled = Scheduled;
64
+ //# sourceMappingURL=posts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posts.mjs","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,YAAY;OACjB,EACL,SAAS,GAKV;OAGM,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2D/E,CAAC;IAzDC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AAoeD,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC"}