@postpeer/node 0.7.0 → 0.8.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 (467) hide show
  1. package/CHANGELOG.md +5 -130
  2. package/README.md +91 -317
  3. package/dist/index.cjs +1709 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +3484 -0
  6. package/dist/index.d.ts +3484 -0
  7. package/dist/index.js +1690 -0
  8. package/dist/index.js.map +1 -0
  9. package/package.json +59 -131
  10. package/api-promise.d.mts +0 -3
  11. package/api-promise.d.mts.map +0 -1
  12. package/api-promise.d.ts +0 -3
  13. package/api-promise.d.ts.map +0 -1
  14. package/api-promise.js +0 -6
  15. package/api-promise.js.map +0 -1
  16. package/api-promise.mjs +0 -3
  17. package/api-promise.mjs.map +0 -1
  18. package/client.d.mts +0 -190
  19. package/client.d.mts.map +0 -1
  20. package/client.d.ts +0 -190
  21. package/client.d.ts.map +0 -1
  22. package/client.js +0 -485
  23. package/client.js.map +0 -1
  24. package/client.mjs +0 -481
  25. package/client.mjs.map +0 -1
  26. package/core/api-promise.d.mts +0 -46
  27. package/core/api-promise.d.mts.map +0 -1
  28. package/core/api-promise.d.ts +0 -46
  29. package/core/api-promise.d.ts.map +0 -1
  30. package/core/api-promise.js +0 -74
  31. package/core/api-promise.js.map +0 -1
  32. package/core/api-promise.mjs +0 -70
  33. package/core/api-promise.mjs.map +0 -1
  34. package/core/error.d.mts +0 -46
  35. package/core/error.d.mts.map +0 -1
  36. package/core/error.d.ts +0 -46
  37. package/core/error.d.ts.map +0 -1
  38. package/core/error.js +0 -113
  39. package/core/error.js.map +0 -1
  40. package/core/error.mjs +0 -97
  41. package/core/error.mjs.map +0 -1
  42. package/core/resource.d.mts +0 -6
  43. package/core/resource.d.mts.map +0 -1
  44. package/core/resource.d.ts +0 -6
  45. package/core/resource.d.ts.map +0 -1
  46. package/core/resource.js +0 -11
  47. package/core/resource.js.map +0 -1
  48. package/core/resource.mjs +0 -7
  49. package/core/resource.mjs.map +0 -1
  50. package/core/uploads.d.mts +0 -3
  51. package/core/uploads.d.mts.map +0 -1
  52. package/core/uploads.d.ts +0 -3
  53. package/core/uploads.d.ts.map +0 -1
  54. package/core/uploads.js +0 -6
  55. package/core/uploads.js.map +0 -1
  56. package/core/uploads.mjs +0 -2
  57. package/core/uploads.mjs.map +0 -1
  58. package/error.d.mts +0 -3
  59. package/error.d.mts.map +0 -1
  60. package/error.d.ts +0 -3
  61. package/error.d.ts.map +0 -1
  62. package/error.js +0 -6
  63. package/error.js.map +0 -1
  64. package/error.mjs +0 -3
  65. package/error.mjs.map +0 -1
  66. package/index.d.mts +0 -6
  67. package/index.d.mts.map +0 -1
  68. package/index.d.ts +0 -6
  69. package/index.d.ts.map +0 -1
  70. package/index.js +0 -30
  71. package/index.js.map +0 -1
  72. package/index.mjs +0 -7
  73. package/index.mjs.map +0 -1
  74. package/internal/builtin-types.d.mts +0 -73
  75. package/internal/builtin-types.d.mts.map +0 -1
  76. package/internal/builtin-types.d.ts +0 -73
  77. package/internal/builtin-types.d.ts.map +0 -1
  78. package/internal/builtin-types.js +0 -4
  79. package/internal/builtin-types.js.map +0 -1
  80. package/internal/builtin-types.mjs +0 -3
  81. package/internal/builtin-types.mjs.map +0 -1
  82. package/internal/detect-platform.d.mts +0 -15
  83. package/internal/detect-platform.d.mts.map +0 -1
  84. package/internal/detect-platform.d.ts +0 -15
  85. package/internal/detect-platform.d.ts.map +0 -1
  86. package/internal/detect-platform.js +0 -162
  87. package/internal/detect-platform.js.map +0 -1
  88. package/internal/detect-platform.mjs +0 -157
  89. package/internal/detect-platform.mjs.map +0 -1
  90. package/internal/errors.d.mts +0 -3
  91. package/internal/errors.d.mts.map +0 -1
  92. package/internal/errors.d.ts +0 -3
  93. package/internal/errors.d.ts.map +0 -1
  94. package/internal/errors.js +0 -41
  95. package/internal/errors.js.map +0 -1
  96. package/internal/errors.mjs +0 -36
  97. package/internal/errors.mjs.map +0 -1
  98. package/internal/headers.d.mts +0 -20
  99. package/internal/headers.d.mts.map +0 -1
  100. package/internal/headers.d.ts +0 -20
  101. package/internal/headers.d.ts.map +0 -1
  102. package/internal/headers.js +0 -79
  103. package/internal/headers.js.map +0 -1
  104. package/internal/headers.mjs +0 -74
  105. package/internal/headers.mjs.map +0 -1
  106. package/internal/parse.d.mts +0 -12
  107. package/internal/parse.d.mts.map +0 -1
  108. package/internal/parse.d.ts +0 -12
  109. package/internal/parse.d.ts.map +0 -1
  110. package/internal/parse.js +0 -40
  111. package/internal/parse.js.map +0 -1
  112. package/internal/parse.mjs +0 -37
  113. package/internal/parse.mjs.map +0 -1
  114. package/internal/qs/formats.d.mts +0 -7
  115. package/internal/qs/formats.d.mts.map +0 -1
  116. package/internal/qs/formats.d.ts +0 -7
  117. package/internal/qs/formats.d.ts.map +0 -1
  118. package/internal/qs/formats.js +0 -13
  119. package/internal/qs/formats.js.map +0 -1
  120. package/internal/qs/formats.mjs +0 -9
  121. package/internal/qs/formats.mjs.map +0 -1
  122. package/internal/qs/index.d.mts +0 -10
  123. package/internal/qs/index.d.mts.map +0 -1
  124. package/internal/qs/index.d.ts +0 -10
  125. package/internal/qs/index.d.ts.map +0 -1
  126. package/internal/qs/index.js +0 -14
  127. package/internal/qs/index.js.map +0 -1
  128. package/internal/qs/index.mjs +0 -10
  129. package/internal/qs/index.mjs.map +0 -1
  130. package/internal/qs/stringify.d.mts +0 -3
  131. package/internal/qs/stringify.d.mts.map +0 -1
  132. package/internal/qs/stringify.d.ts +0 -3
  133. package/internal/qs/stringify.d.ts.map +0 -1
  134. package/internal/qs/stringify.js +0 -277
  135. package/internal/qs/stringify.js.map +0 -1
  136. package/internal/qs/stringify.mjs +0 -274
  137. package/internal/qs/stringify.mjs.map +0 -1
  138. package/internal/qs/types.d.mts +0 -57
  139. package/internal/qs/types.d.mts.map +0 -1
  140. package/internal/qs/types.d.ts +0 -57
  141. package/internal/qs/types.d.ts.map +0 -1
  142. package/internal/qs/types.js +0 -3
  143. package/internal/qs/types.js.map +0 -1
  144. package/internal/qs/types.mjs +0 -2
  145. package/internal/qs/types.mjs.map +0 -1
  146. package/internal/qs/utils.d.mts +0 -15
  147. package/internal/qs/utils.d.mts.map +0 -1
  148. package/internal/qs/utils.d.ts +0 -15
  149. package/internal/qs/utils.d.ts.map +0 -1
  150. package/internal/qs/utils.js +0 -230
  151. package/internal/qs/utils.js.map +0 -1
  152. package/internal/qs/utils.mjs +0 -217
  153. package/internal/qs/utils.mjs.map +0 -1
  154. package/internal/request-options.d.mts +0 -75
  155. package/internal/request-options.d.mts.map +0 -1
  156. package/internal/request-options.d.ts +0 -75
  157. package/internal/request-options.d.ts.map +0 -1
  158. package/internal/request-options.js +0 -14
  159. package/internal/request-options.js.map +0 -1
  160. package/internal/request-options.mjs +0 -10
  161. package/internal/request-options.mjs.map +0 -1
  162. package/internal/shim-types.d.mts +0 -17
  163. package/internal/shim-types.d.mts.map +0 -1
  164. package/internal/shim-types.d.ts +0 -17
  165. package/internal/shim-types.d.ts.map +0 -1
  166. package/internal/shim-types.js +0 -4
  167. package/internal/shim-types.js.map +0 -1
  168. package/internal/shim-types.mjs +0 -3
  169. package/internal/shim-types.mjs.map +0 -1
  170. package/internal/shims.d.mts +0 -26
  171. package/internal/shims.d.mts.map +0 -1
  172. package/internal/shims.d.ts +0 -26
  173. package/internal/shims.d.ts.map +0 -1
  174. package/internal/shims.js +0 -92
  175. package/internal/shims.js.map +0 -1
  176. package/internal/shims.mjs +0 -85
  177. package/internal/shims.mjs.map +0 -1
  178. package/internal/to-file.d.mts +0 -45
  179. package/internal/to-file.d.mts.map +0 -1
  180. package/internal/to-file.d.ts +0 -45
  181. package/internal/to-file.d.ts.map +0 -1
  182. package/internal/to-file.js +0 -91
  183. package/internal/to-file.js.map +0 -1
  184. package/internal/to-file.mjs +0 -88
  185. package/internal/to-file.mjs.map +0 -1
  186. package/internal/tslib.js +0 -81
  187. package/internal/tslib.mjs +0 -17
  188. package/internal/types.d.mts +0 -69
  189. package/internal/types.d.mts.map +0 -1
  190. package/internal/types.d.ts +0 -69
  191. package/internal/types.d.ts.map +0 -1
  192. package/internal/types.js +0 -4
  193. package/internal/types.js.map +0 -1
  194. package/internal/types.mjs +0 -3
  195. package/internal/types.mjs.map +0 -1
  196. package/internal/uploads.d.mts +0 -42
  197. package/internal/uploads.d.mts.map +0 -1
  198. package/internal/uploads.d.ts +0 -42
  199. package/internal/uploads.d.ts.map +0 -1
  200. package/internal/uploads.js +0 -141
  201. package/internal/uploads.js.map +0 -1
  202. package/internal/uploads.mjs +0 -131
  203. package/internal/uploads.mjs.map +0 -1
  204. package/internal/utils/base64.d.mts +0 -3
  205. package/internal/utils/base64.d.mts.map +0 -1
  206. package/internal/utils/base64.d.ts +0 -3
  207. package/internal/utils/base64.d.ts.map +0 -1
  208. package/internal/utils/base64.js +0 -38
  209. package/internal/utils/base64.js.map +0 -1
  210. package/internal/utils/base64.mjs +0 -33
  211. package/internal/utils/base64.mjs.map +0 -1
  212. package/internal/utils/bytes.d.mts +0 -4
  213. package/internal/utils/bytes.d.mts.map +0 -1
  214. package/internal/utils/bytes.d.ts +0 -4
  215. package/internal/utils/bytes.d.ts.map +0 -1
  216. package/internal/utils/bytes.js +0 -31
  217. package/internal/utils/bytes.js.map +0 -1
  218. package/internal/utils/bytes.mjs +0 -26
  219. package/internal/utils/bytes.mjs.map +0 -1
  220. package/internal/utils/env.d.mts +0 -9
  221. package/internal/utils/env.d.mts.map +0 -1
  222. package/internal/utils/env.d.ts +0 -9
  223. package/internal/utils/env.d.ts.map +0 -1
  224. package/internal/utils/env.js +0 -22
  225. package/internal/utils/env.js.map +0 -1
  226. package/internal/utils/env.mjs +0 -18
  227. package/internal/utils/env.mjs.map +0 -1
  228. package/internal/utils/log.d.mts +0 -37
  229. package/internal/utils/log.d.mts.map +0 -1
  230. package/internal/utils/log.d.ts +0 -37
  231. package/internal/utils/log.d.ts.map +0 -1
  232. package/internal/utils/log.js +0 -88
  233. package/internal/utils/log.js.map +0 -1
  234. package/internal/utils/log.mjs +0 -82
  235. package/internal/utils/log.mjs.map +0 -1
  236. package/internal/utils/path.d.mts +0 -15
  237. package/internal/utils/path.d.mts.map +0 -1
  238. package/internal/utils/path.d.ts +0 -15
  239. package/internal/utils/path.d.ts.map +0 -1
  240. package/internal/utils/path.js +0 -79
  241. package/internal/utils/path.js.map +0 -1
  242. package/internal/utils/path.mjs +0 -74
  243. package/internal/utils/path.mjs.map +0 -1
  244. package/internal/utils/query.d.mts +0 -2
  245. package/internal/utils/query.d.mts.map +0 -1
  246. package/internal/utils/query.d.ts +0 -2
  247. package/internal/utils/query.d.ts.map +0 -1
  248. package/internal/utils/query.js +0 -10
  249. package/internal/utils/query.js.map +0 -1
  250. package/internal/utils/query.mjs +0 -6
  251. package/internal/utils/query.mjs.map +0 -1
  252. package/internal/utils/sleep.d.mts +0 -2
  253. package/internal/utils/sleep.d.mts.map +0 -1
  254. package/internal/utils/sleep.d.ts +0 -2
  255. package/internal/utils/sleep.d.ts.map +0 -1
  256. package/internal/utils/sleep.js +0 -7
  257. package/internal/utils/sleep.js.map +0 -1
  258. package/internal/utils/sleep.mjs +0 -3
  259. package/internal/utils/sleep.mjs.map +0 -1
  260. package/internal/utils/uuid.d.mts +0 -5
  261. package/internal/utils/uuid.d.mts.map +0 -1
  262. package/internal/utils/uuid.d.ts +0 -5
  263. package/internal/utils/uuid.d.ts.map +0 -1
  264. package/internal/utils/uuid.js +0 -19
  265. package/internal/utils/uuid.js.map +0 -1
  266. package/internal/utils/uuid.mjs +0 -15
  267. package/internal/utils/uuid.mjs.map +0 -1
  268. package/internal/utils/values.d.mts +0 -18
  269. package/internal/utils/values.d.mts.map +0 -1
  270. package/internal/utils/values.d.ts +0 -18
  271. package/internal/utils/values.d.ts.map +0 -1
  272. package/internal/utils/values.js +0 -112
  273. package/internal/utils/values.js.map +0 -1
  274. package/internal/utils/values.mjs +0 -94
  275. package/internal/utils/values.mjs.map +0 -1
  276. package/internal/utils.d.mts +0 -8
  277. package/internal/utils.d.mts.map +0 -1
  278. package/internal/utils.d.ts +0 -8
  279. package/internal/utils.d.ts.map +0 -1
  280. package/internal/utils.js +0 -12
  281. package/internal/utils.js.map +0 -1
  282. package/internal/utils.mjs +0 -9
  283. package/internal/utils.mjs.map +0 -1
  284. package/resource.d.mts +0 -3
  285. package/resource.d.mts.map +0 -1
  286. package/resource.d.ts +0 -3
  287. package/resource.d.ts.map +0 -1
  288. package/resource.js +0 -6
  289. package/resource.js.map +0 -1
  290. package/resource.mjs +0 -3
  291. package/resource.mjs.map +0 -1
  292. package/resources/connect/connect.d.mts +0 -31
  293. package/resources/connect/connect.d.mts.map +0 -1
  294. package/resources/connect/connect.d.ts +0 -31
  295. package/resources/connect/connect.d.ts.map +0 -1
  296. package/resources/connect/connect.js +0 -24
  297. package/resources/connect/connect.js.map +0 -1
  298. package/resources/connect/connect.mjs +0 -19
  299. package/resources/connect/connect.mjs.map +0 -1
  300. package/resources/connect/index.d.mts +0 -3
  301. package/resources/connect/index.d.mts.map +0 -1
  302. package/resources/connect/index.d.ts +0 -3
  303. package/resources/connect/index.d.ts.map +0 -1
  304. package/resources/connect/index.js +0 -9
  305. package/resources/connect/index.js.map +0 -1
  306. package/resources/connect/index.mjs +0 -4
  307. package/resources/connect/index.mjs.map +0 -1
  308. package/resources/connect/integrations.d.mts +0 -78
  309. package/resources/connect/integrations.d.mts.map +0 -1
  310. package/resources/connect/integrations.d.ts +0 -78
  311. package/resources/connect/integrations.d.ts.map +0 -1
  312. package/resources/connect/integrations.js +0 -22
  313. package/resources/connect/integrations.js.map +0 -1
  314. package/resources/connect/integrations.mjs +0 -18
  315. package/resources/connect/integrations.mjs.map +0 -1
  316. package/resources/connect.d.mts +0 -2
  317. package/resources/connect.d.mts.map +0 -1
  318. package/resources/connect.d.ts +0 -2
  319. package/resources/connect.d.ts.map +0 -1
  320. package/resources/connect.js +0 -6
  321. package/resources/connect.js.map +0 -1
  322. package/resources/connect.mjs +0 -3
  323. package/resources/connect.mjs.map +0 -1
  324. package/resources/health.d.mts +0 -23
  325. package/resources/health.d.mts.map +0 -1
  326. package/resources/health.d.ts +0 -23
  327. package/resources/health.d.ts.map +0 -1
  328. package/resources/health.js +0 -21
  329. package/resources/health.js.map +0 -1
  330. package/resources/health.mjs +0 -17
  331. package/resources/health.mjs.map +0 -1
  332. package/resources/index.d.mts +0 -6
  333. package/resources/index.d.mts.map +0 -1
  334. package/resources/index.d.ts +0 -6
  335. package/resources/index.d.ts.map +0 -1
  336. package/resources/index.js +0 -15
  337. package/resources/index.js.map +0 -1
  338. package/resources/index.mjs +0 -7
  339. package/resources/index.mjs.map +0 -1
  340. package/resources/media.d.mts +0 -27
  341. package/resources/media.d.mts.map +0 -1
  342. package/resources/media.d.ts +0 -27
  343. package/resources/media.d.ts.map +0 -1
  344. package/resources/media.js +0 -15
  345. package/resources/media.js.map +0 -1
  346. package/resources/media.mjs +0 -11
  347. package/resources/media.mjs.map +0 -1
  348. package/resources/platforms.d.mts +0 -22
  349. package/resources/platforms.d.mts.map +0 -1
  350. package/resources/platforms.d.ts +0 -22
  351. package/resources/platforms.d.ts.map +0 -1
  352. package/resources/platforms.js +0 -15
  353. package/resources/platforms.js.map +0 -1
  354. package/resources/platforms.mjs +0 -11
  355. package/resources/platforms.mjs.map +0 -1
  356. package/resources/posts/index.d.mts +0 -3
  357. package/resources/posts/index.d.mts.map +0 -1
  358. package/resources/posts/index.d.ts +0 -3
  359. package/resources/posts/index.d.ts.map +0 -1
  360. package/resources/posts/index.js +0 -9
  361. package/resources/posts/index.js.map +0 -1
  362. package/resources/posts/index.mjs +0 -4
  363. package/resources/posts/index.mjs.map +0 -1
  364. package/resources/posts/posts.d.mts +0 -300
  365. package/resources/posts/posts.d.mts.map +0 -1
  366. package/resources/posts/posts.d.ts +0 -300
  367. package/resources/posts/posts.d.ts.map +0 -1
  368. package/resources/posts/posts.js +0 -69
  369. package/resources/posts/posts.js.map +0 -1
  370. package/resources/posts/posts.mjs +0 -64
  371. package/resources/posts/posts.mjs.map +0 -1
  372. package/resources/posts/scheduled.d.mts +0 -121
  373. package/resources/posts/scheduled.d.mts.map +0 -1
  374. package/resources/posts/scheduled.d.ts +0 -121
  375. package/resources/posts/scheduled.d.ts.map +0 -1
  376. package/resources/posts/scheduled.js +0 -49
  377. package/resources/posts/scheduled.js.map +0 -1
  378. package/resources/posts/scheduled.mjs +0 -45
  379. package/resources/posts/scheduled.mjs.map +0 -1
  380. package/resources/posts.d.mts +0 -2
  381. package/resources/posts.d.mts.map +0 -1
  382. package/resources/posts.d.ts +0 -2
  383. package/resources/posts.d.ts.map +0 -1
  384. package/resources/posts.js +0 -6
  385. package/resources/posts.js.map +0 -1
  386. package/resources/posts.mjs +0 -3
  387. package/resources/posts.mjs.map +0 -1
  388. package/resources.d.mts +0 -2
  389. package/resources.d.mts.map +0 -1
  390. package/resources.d.ts +0 -2
  391. package/resources.d.ts.map +0 -1
  392. package/resources.js +0 -5
  393. package/resources.js.map +0 -1
  394. package/resources.mjs +0 -2
  395. package/resources.mjs.map +0 -1
  396. package/src/api-promise.ts +0 -2
  397. package/src/client.ts +0 -789
  398. package/src/core/README.md +0 -3
  399. package/src/core/api-promise.ts +0 -92
  400. package/src/core/error.ts +0 -130
  401. package/src/core/resource.ts +0 -11
  402. package/src/core/uploads.ts +0 -2
  403. package/src/error.ts +0 -2
  404. package/src/index.ts +0 -22
  405. package/src/internal/README.md +0 -3
  406. package/src/internal/builtin-types.ts +0 -93
  407. package/src/internal/detect-platform.ts +0 -196
  408. package/src/internal/errors.ts +0 -33
  409. package/src/internal/headers.ts +0 -97
  410. package/src/internal/parse.ts +0 -56
  411. package/src/internal/qs/LICENSE.md +0 -13
  412. package/src/internal/qs/README.md +0 -3
  413. package/src/internal/qs/formats.ts +0 -10
  414. package/src/internal/qs/index.ts +0 -13
  415. package/src/internal/qs/stringify.ts +0 -385
  416. package/src/internal/qs/types.ts +0 -71
  417. package/src/internal/qs/utils.ts +0 -265
  418. package/src/internal/request-options.ts +0 -91
  419. package/src/internal/shim-types.ts +0 -26
  420. package/src/internal/shims.ts +0 -107
  421. package/src/internal/to-file.ts +0 -154
  422. package/src/internal/types.ts +0 -93
  423. package/src/internal/uploads.ts +0 -187
  424. package/src/internal/utils/base64.ts +0 -40
  425. package/src/internal/utils/bytes.ts +0 -32
  426. package/src/internal/utils/env.ts +0 -18
  427. package/src/internal/utils/log.ts +0 -129
  428. package/src/internal/utils/path.ts +0 -88
  429. package/src/internal/utils/query.ts +0 -7
  430. package/src/internal/utils/sleep.ts +0 -3
  431. package/src/internal/utils/uuid.ts +0 -17
  432. package/src/internal/utils/values.ts +0 -105
  433. package/src/internal/utils.ts +0 -9
  434. package/src/lib/.keep +0 -4
  435. package/src/resource.ts +0 -2
  436. package/src/resources/connect/connect.ts +0 -70
  437. package/src/resources/connect/index.ts +0 -9
  438. package/src/resources/connect/integrations.ts +0 -130
  439. package/src/resources/connect.ts +0 -3
  440. package/src/resources/health.ts +0 -36
  441. package/src/resources/index.ts +0 -16
  442. package/src/resources/media.ts +0 -38
  443. package/src/resources/platforms.ts +0 -39
  444. package/src/resources/posts/index.ts +0 -20
  445. package/src/resources/posts/posts.ts +0 -472
  446. package/src/resources/posts/scheduled.ts +0 -180
  447. package/src/resources/posts.ts +0 -3
  448. package/src/resources.ts +0 -1
  449. package/src/tsconfig.json +0 -11
  450. package/src/uploads.ts +0 -2
  451. package/src/version.ts +0 -1
  452. package/uploads.d.mts +0 -3
  453. package/uploads.d.mts.map +0 -1
  454. package/uploads.d.ts +0 -3
  455. package/uploads.d.ts.map +0 -1
  456. package/uploads.js +0 -6
  457. package/uploads.js.map +0 -1
  458. package/uploads.mjs +0 -3
  459. package/uploads.mjs.map +0 -1
  460. package/version.d.mts +0 -2
  461. package/version.d.mts.map +0 -1
  462. package/version.d.ts +0 -2
  463. package/version.d.ts.map +0 -1
  464. package/version.js +0 -5
  465. package/version.js.map +0 -1
  466. package/version.mjs +0 -2
  467. package/version.mjs.map +0 -1
@@ -1,472 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../core/resource';
4
- import * as ScheduledAPI from './scheduled';
5
- import {
6
- Scheduled,
7
- ScheduledCancelResponse,
8
- ScheduledListParams,
9
- ScheduledListResponse,
10
- ScheduledRescheduleParams,
11
- ScheduledRescheduleResponse,
12
- } from './scheduled';
13
- import { APIPromise } from '../../core/api-promise';
14
- import { RequestOptions } from '../../internal/request-options';
15
- import { path } from '../../internal/utils/path';
16
-
17
- export class Posts extends APIResource {
18
- scheduled: ScheduledAPI.Scheduled = new ScheduledAPI.Scheduled(this._client);
19
-
20
- /**
21
- * Publish a post to one or more social media platforms
22
- *
23
- * @example
24
- * ```ts
25
- * const post = await client.posts.create({
26
- * content: 'Hello world!',
27
- * platforms: [
28
- * { platform: 'twitter', accountId: '<your-account-id>' },
29
- * ],
30
- * publishNow: true,
31
- * });
32
- * ```
33
- */
34
- create(body: PostCreateParams, options?: RequestOptions): APIPromise<PostCreateResponse> {
35
- return this._client.post('/v1/posts/', { body, ...options });
36
- }
37
-
38
- /**
39
- * Get a single post by ID
40
- *
41
- * @example
42
- * ```ts
43
- * const post = await client.posts.retrieve('postId');
44
- * ```
45
- */
46
- retrieve(postID: string, options?: RequestOptions): APIPromise<PostRetrieveResponse> {
47
- return this._client.get(path`/v1/posts/${postID}`, options);
48
- }
49
-
50
- /**
51
- * Returns a paginated list of posts. Filter by status, platform (OR logic), and
52
- * date ranges. Published posts include platformPostUrl per platform.
53
- *
54
- * @example
55
- * ```ts
56
- * const posts = await client.posts.list();
57
- * ```
58
- */
59
- list(
60
- query: PostListParams | null | undefined = {},
61
- options?: RequestOptions,
62
- ): APIPromise<PostListResponse> {
63
- return this._client.get('/v1/posts/', { query, ...options });
64
- }
65
-
66
- /**
67
- * Delete a post by ID
68
- *
69
- * @example
70
- * ```ts
71
- * const post = await client.posts.delete('postId');
72
- * ```
73
- */
74
- delete(postID: string, options?: RequestOptions): APIPromise<PostDeleteResponse> {
75
- return this._client.delete(path`/v1/posts/${postID}`, options);
76
- }
77
- }
78
-
79
- export type Status = 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
80
-
81
- export interface PostCreateResponse {
82
- platforms: Array<PostCreateResponse.Platform>;
83
-
84
- /**
85
- * id of the saved Post document
86
- */
87
- postId: string;
88
-
89
- status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
90
-
91
- /**
92
- * false only when every platform failed
93
- */
94
- success: boolean;
95
-
96
- /**
97
- * ISO 8601 datetime the post is scheduled for (only present for scheduled posts)
98
- */
99
- scheduledFor?: string;
100
- }
101
-
102
- export namespace PostCreateResponse {
103
- export interface Platform {
104
- platform:
105
- | 'twitter'
106
- | 'instagram'
107
- | 'youtube'
108
- | 'tiktok'
109
- | 'pinterest'
110
- | 'linkedin'
111
- | 'bluesky'
112
- | 'facebook'
113
- | 'threads';
114
-
115
- success: boolean;
116
-
117
- /**
118
- * Error message when success is false
119
- */
120
- error?: string;
121
-
122
- /**
123
- * Direct URL to the published post
124
- */
125
- platformPostUrl?: string;
126
-
127
- /**
128
- * Warning message when the post published but a non-critical follow-up action
129
- * failed
130
- */
131
- warningMessage?: string;
132
- }
133
- }
134
-
135
- export interface PostRetrieveResponse {
136
- post: PostRetrieveResponse.Post;
137
-
138
- success: boolean;
139
- }
140
-
141
- export namespace PostRetrieveResponse {
142
- export interface Post {
143
- content: string;
144
-
145
- createdAt: string;
146
-
147
- crosspostingEnabled: boolean;
148
-
149
- mediaItems: Array<Post.MediaItem>;
150
-
151
- platforms: Array<Post.Platform>;
152
-
153
- /**
154
- * MongoDB ObjectId of the Post document
155
- */
156
- postId: string;
157
-
158
- rawRequestBody: { [key: string]: unknown };
159
-
160
- /**
161
- * ISO 8601 scheduled datetime
162
- */
163
- scheduledFor: string | null;
164
-
165
- status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
166
-
167
- timezone: string;
168
-
169
- updatedAt: string;
170
- }
171
-
172
- export namespace Post {
173
- export interface MediaItem {
174
- filename: string;
175
-
176
- mimeType: string;
177
-
178
- size: number;
179
-
180
- type: 'image' | 'video' | 'gif';
181
-
182
- url: string;
183
- }
184
-
185
- export interface Platform {
186
- /**
187
- * Per-platform text override that was used for this platform. Null when the
188
- * top-level `content` was used.
189
- */
190
- content: string | null;
191
-
192
- errorMessage: string | null;
193
-
194
- platform:
195
- | 'twitter'
196
- | 'instagram'
197
- | 'youtube'
198
- | 'tiktok'
199
- | 'pinterest'
200
- | 'linkedin'
201
- | 'bluesky'
202
- | 'facebook'
203
- | 'threads';
204
-
205
- platformPostId: string | null;
206
-
207
- /**
208
- * Direct URL to the published post
209
- */
210
- platformPostUrl: string | null;
211
-
212
- publishedAt: string | null;
213
-
214
- status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
215
-
216
- warningMessage: string | null;
217
- }
218
- }
219
- }
220
-
221
- export interface PostListResponse {
222
- posts: Array<PostListResponse.Post>;
223
-
224
- success: boolean;
225
-
226
- /**
227
- * Total matched posts across all pages
228
- */
229
- total: number;
230
- }
231
-
232
- export namespace PostListResponse {
233
- export interface Post {
234
- content: string;
235
-
236
- createdAt: string;
237
-
238
- crosspostingEnabled: boolean;
239
-
240
- mediaItems: Array<Post.MediaItem>;
241
-
242
- platforms: Array<Post.Platform>;
243
-
244
- /**
245
- * MongoDB ObjectId of the Post document
246
- */
247
- postId: string;
248
-
249
- rawRequestBody: { [key: string]: unknown };
250
-
251
- /**
252
- * ISO 8601 scheduled datetime
253
- */
254
- scheduledFor: string | null;
255
-
256
- status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
257
-
258
- timezone: string;
259
-
260
- updatedAt: string;
261
- }
262
-
263
- export namespace Post {
264
- export interface MediaItem {
265
- filename: string;
266
-
267
- mimeType: string;
268
-
269
- size: number;
270
-
271
- type: 'image' | 'video' | 'gif';
272
-
273
- url: string;
274
- }
275
-
276
- export interface Platform {
277
- /**
278
- * Per-platform text override that was used for this platform. Null when the
279
- * top-level `content` was used.
280
- */
281
- content: string | null;
282
-
283
- errorMessage: string | null;
284
-
285
- platform:
286
- | 'twitter'
287
- | 'instagram'
288
- | 'youtube'
289
- | 'tiktok'
290
- | 'pinterest'
291
- | 'linkedin'
292
- | 'bluesky'
293
- | 'facebook'
294
- | 'threads';
295
-
296
- platformPostId: string | null;
297
-
298
- /**
299
- * Direct URL to the published post
300
- */
301
- platformPostUrl: string | null;
302
-
303
- publishedAt: string | null;
304
-
305
- status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
306
-
307
- warningMessage: string | null;
308
- }
309
- }
310
- }
311
-
312
- export interface PostDeleteResponse {
313
- success: boolean;
314
- }
315
-
316
- export interface PostCreateParams {
317
- /**
318
- * Post text body
319
- */
320
- content: string;
321
-
322
- /**
323
- * Target platform accounts to publish to
324
- */
325
- platforms: Array<PostCreateParams.Platform>;
326
-
327
- /**
328
- * Media attachments (images, videos, GIFs)
329
- */
330
- mediaItems?: Array<PostCreateParams.MediaItem>;
331
-
332
- /**
333
- * Publish immediately. Required when scheduledFor is omitted.
334
- */
335
- publishNow?: boolean;
336
-
337
- /**
338
- * ISO 8601 datetime to schedule the post for future publishing
339
- */
340
- scheduledFor?: string;
341
-
342
- /**
343
- * IANA timezone for the scheduled time (e.g. America/New_York). Defaults to UTC.
344
- */
345
- timezone?: string;
346
- }
347
-
348
- export namespace PostCreateParams {
349
- export interface Platform {
350
- /**
351
- * Integration.\_id — find yours via GET /connect/integrations
352
- */
353
- accountId: string;
354
-
355
- platform:
356
- | 'twitter'
357
- | 'instagram'
358
- | 'youtube'
359
- | 'tiktok'
360
- | 'pinterest'
361
- | 'linkedin'
362
- | 'bluesky'
363
- | 'facebook'
364
- | 'threads';
365
-
366
- /**
367
- * Optional per-platform text override. Use when you want to change the text for
368
- * this platform because different platforms talk differently. When omitted, the
369
- * top-level `content` is used.
370
- */
371
- content?: string;
372
-
373
- /**
374
- * Platform-specific options. See TwitterConfigurations, YouTubeConfigurations,
375
- * TikTokConfigurations, PinterestConfigurations, or LinkedInConfigurations in the
376
- * schema reference for available fields per platform.
377
- */
378
- platformSpecificData?: { [key: string]: unknown };
379
- }
380
-
381
- export interface MediaItem {
382
- type: 'image' | 'video' | 'gif';
383
-
384
- url: string;
385
-
386
- /**
387
- * Thumbnail image URL for video items. Supported on YouTube regular videos (not
388
- * Shorts). JPEG, PNG, or GIF, max 2 MB, min 640 px wide.
389
- */
390
- thumbnail?: string;
391
- }
392
- }
393
-
394
- export interface PostListParams {
395
- /**
396
- * ISO 8601 lower bound on createdAt
397
- */
398
- createdAfter?: string;
399
-
400
- /**
401
- * ISO 8601 upper bound on createdAt
402
- */
403
- createdBefore?: string;
404
-
405
- /**
406
- * Page size (max 100)
407
- */
408
- limit?: number;
409
-
410
- /**
411
- * Number of posts to skip
412
- */
413
- offset?: number;
414
-
415
- /**
416
- * Filter by platform (repeatable — OR logic)
417
- */
418
- platform?: Array<
419
- | 'twitter'
420
- | 'instagram'
421
- | 'youtube'
422
- | 'tiktok'
423
- | 'pinterest'
424
- | 'linkedin'
425
- | 'bluesky'
426
- | 'facebook'
427
- | 'threads'
428
- >;
429
-
430
- /**
431
- * Filter to posts targeting an integration bound to this profile. Pass "null"
432
- * (literal string) to filter to posts whose integrations have no profile.
433
- */
434
- profileId?: string;
435
-
436
- /**
437
- * ISO 8601 lower bound on scheduledFor
438
- */
439
- scheduledAfter?: string;
440
-
441
- /**
442
- * ISO 8601 upper bound on scheduledFor
443
- */
444
- scheduledBefore?: string;
445
-
446
- sort?: 'asc' | 'desc';
447
-
448
- status?: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
449
- }
450
-
451
- Posts.Scheduled = Scheduled;
452
-
453
- export declare namespace Posts {
454
- export {
455
- type Status as Status,
456
- type PostCreateResponse as PostCreateResponse,
457
- type PostRetrieveResponse as PostRetrieveResponse,
458
- type PostListResponse as PostListResponse,
459
- type PostDeleteResponse as PostDeleteResponse,
460
- type PostCreateParams as PostCreateParams,
461
- type PostListParams as PostListParams,
462
- };
463
-
464
- export {
465
- Scheduled as Scheduled,
466
- type ScheduledListResponse as ScheduledListResponse,
467
- type ScheduledCancelResponse as ScheduledCancelResponse,
468
- type ScheduledRescheduleResponse as ScheduledRescheduleResponse,
469
- type ScheduledListParams as ScheduledListParams,
470
- type ScheduledRescheduleParams as ScheduledRescheduleParams,
471
- };
472
- }
@@ -1,180 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../core/resource';
4
- import { APIPromise } from '../../core/api-promise';
5
- import { RequestOptions } from '../../internal/request-options';
6
- import { path } from '../../internal/utils/path';
7
-
8
- export class Scheduled extends APIResource {
9
- /**
10
- * Returns a paginated list of scheduled posts. Use `limit` + `offset` to page
11
- * through the results.
12
- *
13
- * @example
14
- * ```ts
15
- * const scheduleds = await client.posts.scheduled.list();
16
- * ```
17
- */
18
- list(
19
- query: ScheduledListParams | null | undefined = {},
20
- options?: RequestOptions,
21
- ): APIPromise<ScheduledListResponse> {
22
- return this._client.get('/v1/posts/scheduled/', { query, ...options });
23
- }
24
-
25
- /**
26
- * Cancel a scheduled post (moves it back to draft)
27
- *
28
- * @example
29
- * ```ts
30
- * const response = await client.posts.scheduled.cancel(
31
- * 'postId',
32
- * );
33
- * ```
34
- */
35
- cancel(postID: string, options?: RequestOptions): APIPromise<ScheduledCancelResponse> {
36
- return this._client.delete(path`/v1/posts/scheduled/${postID}`, options);
37
- }
38
-
39
- /**
40
- * Reschedule a post to a new time
41
- *
42
- * @example
43
- * ```ts
44
- * const response = await client.posts.scheduled.reschedule(
45
- * 'postId',
46
- * { scheduledFor: '2019-12-27T18:11:19.117Z' },
47
- * );
48
- * ```
49
- */
50
- reschedule(
51
- postID: string,
52
- body: ScheduledRescheduleParams,
53
- options?: RequestOptions,
54
- ): APIPromise<ScheduledRescheduleResponse> {
55
- return this._client.patch(path`/v1/posts/scheduled/${postID}`, { body, ...options });
56
- }
57
- }
58
-
59
- export interface ScheduledListResponse {
60
- posts: Array<ScheduledListResponse.Post>;
61
-
62
- success: boolean;
63
-
64
- /**
65
- * Total matched scheduled posts across all pages
66
- */
67
- total: number;
68
- }
69
-
70
- export namespace ScheduledListResponse {
71
- export interface Post {
72
- /**
73
- * Post text body
74
- */
75
- content: string;
76
-
77
- createdAt: string;
78
-
79
- platforms: Array<Post.Platform>;
80
-
81
- /**
82
- * MongoDB ObjectId of the Post document
83
- */
84
- postId: string;
85
-
86
- /**
87
- * ISO 8601 scheduled datetime
88
- */
89
- scheduledFor: string | null;
90
-
91
- /**
92
- * IANA timezone for the scheduled time
93
- */
94
- timezone: string;
95
-
96
- /**
97
- * Media attachments
98
- */
99
- mediaItems?: Array<Post.MediaItem>;
100
- }
101
-
102
- export namespace Post {
103
- export interface Platform {
104
- platform:
105
- | 'twitter'
106
- | 'instagram'
107
- | 'youtube'
108
- | 'tiktok'
109
- | 'pinterest'
110
- | 'linkedin'
111
- | 'bluesky'
112
- | 'facebook'
113
- | 'threads';
114
-
115
- status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
116
- }
117
-
118
- export interface MediaItem {
119
- type: 'image' | 'video' | 'gif';
120
-
121
- url: string;
122
-
123
- /**
124
- * Thumbnail image URL for video items. Supported on YouTube regular videos (not
125
- * Shorts). JPEG, PNG, or GIF, max 2 MB, min 640 px wide.
126
- */
127
- thumbnail?: string;
128
- }
129
- }
130
- }
131
-
132
- export interface ScheduledCancelResponse {
133
- message: string;
134
-
135
- success: boolean;
136
- }
137
-
138
- export interface ScheduledRescheduleResponse {
139
- message: string;
140
-
141
- scheduledFor: string;
142
-
143
- success: boolean;
144
- }
145
-
146
- export interface ScheduledListParams {
147
- /**
148
- * Page size (max 100)
149
- */
150
- limit?: number;
151
-
152
- /**
153
- * Number of scheduled posts to skip
154
- */
155
- offset?: number;
156
-
157
- sort?: 'asc' | 'desc';
158
- }
159
-
160
- export interface ScheduledRescheduleParams {
161
- /**
162
- * New ISO 8601 datetime to schedule the post
163
- */
164
- scheduledFor: string;
165
-
166
- /**
167
- * IANA timezone
168
- */
169
- timezone?: string;
170
- }
171
-
172
- export declare namespace Scheduled {
173
- export {
174
- type ScheduledListResponse as ScheduledListResponse,
175
- type ScheduledCancelResponse as ScheduledCancelResponse,
176
- type ScheduledRescheduleResponse as ScheduledRescheduleResponse,
177
- type ScheduledListParams as ScheduledListParams,
178
- type ScheduledRescheduleParams as ScheduledRescheduleParams,
179
- };
180
- }
@@ -1,3 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- export * from './posts/index';
package/src/resources.ts DELETED
@@ -1 +0,0 @@
1
- export * from './resources/index';
package/src/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- // this config is included in the published src directory to prevent TS errors
3
- // from appearing when users go to source, and VSCode opens the source .ts file
4
- // via declaration maps
5
- "include": ["index.ts"],
6
- "compilerOptions": {
7
- "target": "ES2015",
8
- "lib": ["DOM", "DOM.Iterable", "ES2018"],
9
- "moduleResolution": "node"
10
- }
11
- }
package/src/uploads.ts DELETED
@@ -1,2 +0,0 @@
1
- /** @deprecated Import from ./core/uploads instead */
2
- export * from './core/uploads';
package/src/version.ts DELETED
@@ -1 +0,0 @@
1
- export const VERSION = '0.7.0'; // x-release-please-version
package/uploads.d.mts DELETED
@@ -1,3 +0,0 @@
1
- /** @deprecated Import from ./core/uploads instead */
2
- export * from "./core/uploads.mjs";
3
- //# sourceMappingURL=uploads.d.mts.map
package/uploads.d.mts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
package/uploads.d.ts DELETED
@@ -1,3 +0,0 @@
1
- /** @deprecated Import from ./core/uploads instead */
2
- export * from "./core/uploads.js";
3
- //# sourceMappingURL=uploads.d.ts.map
package/uploads.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,kCAA+B"}
package/uploads.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("./internal/tslib.js");
4
- /** @deprecated Import from ./core/uploads instead */
5
- tslib_1.__exportStar(require("./core/uploads.js"), exports);
6
- //# sourceMappingURL=uploads.js.map
package/uploads.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"uploads.js","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACrD,4DAA+B"}
package/uploads.mjs DELETED
@@ -1,3 +0,0 @@
1
- /** @deprecated Import from ./core/uploads instead */
2
- export * from "./core/uploads.mjs";
3
- //# sourceMappingURL=uploads.mjs.map